summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-13 20:18:22 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-13 20:18:22 +0000
commit4c9cb7b8e0b5d0e557dc9d3c5398f59393d4a1c0 (patch)
tree53dc58f84534220deadaa0208917b74368e942bf /crawl-ref/source/spells2.cc
parent4569bd57d97ccfee399ce1d4aba3c133edc56881 (diff)
downloadcrawl-ref-4c9cb7b8e0b5d0e557dc9d3c5398f59393d4a1c0.tar.gz
crawl-ref-4c9cb7b8e0b5d0e557dc9d3c5398f59393d4a1c0.zip
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
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc9
1 files changed, 5 insertions, 4 deletions
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);