From 145a784f92e2ae637f097b04723d1b792c60bedb Mon Sep 17 00:00:00 2001 From: evktalo Date: Sat, 11 Jul 2009 09:07:45 +0000 Subject: Implement FR#2812523: Vampiric Draining works against summons, just without the healing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10141 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells2.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/spells2.cc') diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 7c5eb2add9..457a6ee206 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -752,8 +752,7 @@ bool vampiric_drain(int pow, const dist &vmove) } if (mons_holiness(monster) != MH_NATURAL - || mons_res_negative_energy(monster) - || mons_is_summoned(monster)) + || mons_res_negative_energy(monster)) { canned_msg(MSG_NOTHING_HAPPENS); return (false); @@ -771,6 +770,8 @@ bool vampiric_drain(int pow, const dist &vmove) return (false); } + const bool mons_was_summoned = mons_is_summoned(monster); + monster->hurt(&you, hp_gain); if (monster->alive()) @@ -778,7 +779,7 @@ bool vampiric_drain(int pow, const dist &vmove) hp_gain /= 2; - if (hp_gain) + if (hp_gain && !mons_was_summoned) { mpr("You feel life coursing into your body."); inc_hp(hp_gain, false); -- cgit v1.2.3-54-g00ecf