summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/abl-show.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-20 10:27:50 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-20 10:27:50 +0000
commitb926fb5cd10ca674313c3b8aa2bf99d6233db143 (patch)
tree684005c2710117904ed0228b745af4eeab4cd493 /crawl-ref/source/abl-show.cc
parent82abef2e72f839e3d3b75ec771cdfe8219761b20 (diff)
downloadcrawl-ref-b926fb5cd10ca674313c3b8aa2bf99d6233db143.tar.gz
crawl-ref-b926fb5cd10ca674313c3b8aa2bf99d6233db143.zip
Fix 1885453: Apply Lugonu's hp penalty (on entering the Abyss) to
you.base_hp2 (rather than you.hp_max) and thus really make it permanent (I think). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5149 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/abl-show.cc')
-rw-r--r--crawl-ref/source/abl-show.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 34ae3129c9..e05e686682 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -1731,7 +1731,7 @@ static bool _do_ability(const ability_def& abil)
// Move permanent hp/mp loss from leaving to entering the Abyss. (jpeg)
const int maxloss = std::max(2, div_rand_round(you.hp_max, 30));
// Lose permanent HP
- you.hp_max -= random_range(1, maxloss);
+ dec_max_hp(random_range(1, maxloss));
// Paranoia.
if (you.hp_max < 1)
@@ -1742,6 +1742,7 @@ static bool _do_ability(const ability_def& abil)
// Lose 1d2 permanent MP
rot_mp(coinflip() ? 2 : 1);
+
// Deflate MP
if (you.magic_points)
set_mp(random2(you.magic_points), false);