diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-11 12:21:22 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-11 12:21:22 +0000 |
commit | 5fea6587dc86610499025f4978f0f5746dfea393 (patch) | |
tree | ab2922afbc6cee20a954d3ee76e4e145d49222f4 /crawl-ref/source/spells2.cc | |
parent | be59b04a8a8e0fecb301dea1b3071eef34f07fc7 (diff) | |
download | crawl-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.cc | 12 |
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)) { |