From 4c9cb7b8e0b5d0e557dc9d3c5398f59393d4a1c0 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 13 Mar 2009 20:18:22 +0000 Subject: Add a few last consistency fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9439 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells2.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/spells2.cc') diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 74dc81c019..704509adb0 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -143,8 +143,8 @@ static bool _mark_detected_creature(coord_def where, const monsters *mon, // the monster where it really is (and may fail). for (int itry = 0; itry < 5; ++itry) { - place.set( where.x + random2(fuzz_diam) - fuzz_radius, - where.y + random2(fuzz_diam) - fuzz_radius ); + place.set(where.x + random2(fuzz_diam) - fuzz_radius, + where.y + random2(fuzz_diam) - fuzz_radius); // If the player would be able to see a monster at this location // don't place it there. @@ -752,7 +752,8 @@ bool vampiric_drain(int pow, const dist &vmove) return (false); } - if (mons_res_negative_energy(monster) + if (mons_holiness(monster) != MH_NATURAL + || mons_res_negative_energy(monster) || mons_is_summoned(monster)) { canned_msg(MSG_NOTHING_HAPPENS); @@ -765,7 +766,7 @@ bool vampiric_drain(int pow, const dist &vmove) hp_gain = std::min(monster->hit_points, hp_gain); hp_gain = std::min(you.hp_max - you.hp, hp_gain); - if (hp_gain == 0) + if (!hp_gain) { canned_msg(MSG_NOTHING_HAPPENS); return (false); -- cgit v1.2.3-54-g00ecf