summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorevktalo <evktalo@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-11 09:07:45 +0000
committerevktalo <evktalo@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-11 09:07:45 +0000
commit145a784f92e2ae637f097b04723d1b792c60bedb (patch)
tree62fcd48bda69369cbeb9244d783ce741ab82ecac /crawl-ref/source/spells2.cc
parent72cbf102e2181050aafb14365bc12a40e22260ff (diff)
downloadcrawl-ref-145a784f92e2ae637f097b04723d1b792c60bedb.tar.gz
crawl-ref-145a784f92e2ae637f097b04723d1b792c60bedb.zip
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
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc7
1 files changed, 4 insertions, 3 deletions
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);