diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-13 20:14:34 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-13 20:14:34 +0000 |
commit | 4569bd57d97ccfee399ce1d4aba3c133edc56881 (patch) | |
tree | a73d32bd956cd93f8f86da88f0b8f26f68654d68 /crawl-ref/source/spells2.cc | |
parent | c806d0576cf54c3f3ab3ecb4c17fb3bf596f9d63 (diff) | |
download | crawl-ref-4569bd57d97ccfee399ce1d4aba3c133edc56881.tar.gz crawl-ref-4569bd57d97ccfee399ce1d4aba3c133edc56881.zip |
Fix Vampiric Drain backlash check.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9438 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r-- | crawl-ref/source/spells2.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 4f635a50cd..74dc81c019 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -739,11 +739,7 @@ bool vampiric_drain(int pow, const dist &vmove) if (success) { - if (!monster->alive() - || (mons_holiness(monster) != MH_NATURAL - && !mons_is_unholy(monster)) - || mons_res_negative_energy(monster) - || mons_is_summoned(monster)) + if (!monster->alive()) { canned_msg(MSG_NOTHING_HAPPENS); return (false); @@ -756,6 +752,13 @@ bool vampiric_drain(int pow, const dist &vmove) return (false); } + if (mons_res_negative_energy(monster) + || mons_is_summoned(monster)) + { + canned_msg(MSG_NOTHING_HAPPENS); + return (false); + } + // The practical maximum of this is about 25 (pow @ 100). - bwr int hp_gain = 3 + random2avg(9, 2) + random2(pow) / 7; |