From 5fea6587dc86610499025f4978f0f5746dfea393 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 11 Jul 2009 12:21:22 +0000 Subject: Make Yred's Drain Life work on summons again, too, but without the healing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10145 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells2.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/spells2.cc') 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)) { -- cgit v1.2.3-54-g00ecf