summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-11 12:21:22 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-11 12:21:22 +0000
commit5fea6587dc86610499025f4978f0f5746dfea393 (patch)
treeab2922afbc6cee20a954d3ee76e4e145d49222f4 /crawl-ref/source/spells2.cc
parentbe59b04a8a8e0fecb301dea1b3071eef34f07fc7 (diff)
downloadcrawl-ref-5fea6587dc86610499025f4978f0f5746dfea393.tar.gz
crawl-ref-5fea6587dc86610499025f4978f0f5746dfea393.zip
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
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))
{