diff options
author | elliptic <hyperelliptical@gmail.com> | 2014-04-07 13:55:04 -0400 |
---|---|---|
committer | elliptic <hyperelliptical@gmail.com> | 2014-04-07 13:56:46 -0400 |
commit | da4a0999e32825c045062dfcbb2887e6dd0bc3e3 (patch) | |
tree | fae492efd30f8394c1be5955a218928bf33c4205 /crawl-ref/source/status.cc | |
parent | d827497410ed5daaedc76ef5a7811998f3c3b6e1 (diff) | |
download | crawl-ref-da4a0999e32825c045062dfcbb2887e6dd0bc3e3.tar.gz crawl-ref-da4a0999e32825c045062dfcbb2887e6dd0bc3e3.zip |
Let @ (and lua) display negative values for poison_survival().
So that players have a way of guessing whether heal wounds might be enough
to survive.
Diffstat (limited to 'crawl-ref/source/status.cc')
-rw-r--r-- | crawl-ref/source/status.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/status.cc b/crawl-ref/source/status.cc index ff6ce8404c..565aa140a6 100644 --- a/crawl-ref/source/status.cc +++ b/crawl-ref/source/status.cc @@ -831,7 +831,7 @@ static void _describe_regen(status_info* inf) static void _describe_poison(status_info* inf) { int pois_perc = (you.hp <= 0) ? 100 - : ((you.hp - poison_survival()) * 100 / you.hp); + : ((you.hp - max(0, poison_survival())) * 100 / you.hp); inf->light_colour = (player_res_poison(false) >= 3 ? DARKGREY : _bad_ench_colour(pois_perc, 35, 100)); inf->light_text = "Pois"; |