summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 457a6ee206..b952bbe504 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -679,8 +679,7 @@ void drain_life(int pow)
if (!monster->alive()
|| mons_holiness(monster) != MH_NATURAL
- || mons_res_negative_energy(monster)
- || mons_is_summoned(monster))
+ || mons_res_negative_energy(monster))
{
continue;
}
@@ -692,7 +691,8 @@ void drain_life(int pow)
const int hurted = 3 + random2(7) + random2(pow);
behaviour_event(monster, ME_WHACK, MHITYOU, you.pos());
- hp_gain += hurted;
+ if (!mons_is_summoned(monster))
+ hp_gain += hurted;
monster->hurt(&you, hurted);
@@ -770,8 +770,8 @@ bool vampiric_drain(int pow, const dist &vmove)
return (false);
}
- const bool mons_was_summoned = mons_is_summoned(monster);
-
+ const bool mons_was_summoned = mons_is_summoned(monster);
+
monster->hurt(&you, hp_gain);
if (monster->alive())
@@ -939,7 +939,7 @@ bool cast_summon_small_mammals(int pow, god_type god)
int count = 0;
const int count_max = 2;
- do
+ do
{
switch (random2(pow+1))
{