From 4569bd57d97ccfee399ce1d4aba3c133edc56881 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 13 Mar 2009 20:14:34 +0000 Subject: Fix Vampiric Drain backlash check. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9438 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells2.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/spells2.cc') 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; -- cgit v1.2.3-54-g00ecf