diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-13 19:03:11 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-13 19:03:11 +0000 |
commit | 40dd030218f9e44226230dfd532a3d41483f07ba (patch) | |
tree | 754b7c06acdf415732c968a5fc7aabd9133fbc62 /crawl-ref/source/spells2.cc | |
parent | 1bb4f01f6576b82fbaa24c30961f12fba5b3e07d (diff) | |
download | crawl-ref-40dd030218f9e44226230dfd532a3d41483f07ba.tar.gz crawl-ref-40dd030218f9e44226230dfd532a3d41483f07ba.zip |
Fix [2686002]: Vampiric draining (and Yred's Drain Life ability) could
succeed, but give you 0 HP, so make them give a minimum of 1 HP.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9430 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r-- | crawl-ref/source/spells2.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index e730a7a7a8..19399d3c7c 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -706,7 +706,7 @@ void drain_life(int pow) } } - hp_gain /= 2; + hp_gain = hp_gain / 2 + 1; hp_gain = std::min(pow * 2, hp_gain); @@ -776,7 +776,7 @@ bool vampiric_drain(int pow, const dist &vmove) if (monster->alive()) print_wounds(monster); - inc_hp(inflicted / 2, false); + inc_hp(inflicted / 2 + 1, false); } return (success); |