summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/status.cc
diff options
context:
space:
mode:
authorelliptic <hyperelliptical@gmail.com>2014-03-29 05:12:16 -0400
committerelliptic <hyperelliptical@gmail.com>2014-03-29 05:14:12 -0400
commit8f8d78454c2a6ee500f1329d9a8cf6dbd673f520 (patch)
treea51d8e102080333a20135e6099b95e46dfc9c9c8 /crawl-ref/source/status.cc
parente5bc28c969f94bf86bcb1e9584b34d3e0d6a30b3 (diff)
downloadcrawl-ref-8f8d78454c2a6ee500f1329d9a8cf6dbd673f520.tar.gz
crawl-ref-8f8d78454c2a6ee500f1329d9a8cf6dbd673f520.zip
Fix poison status incorrectly showing as lethal sometimes.
The HP bar was correct; this just affects the status light and the @ status.
Diffstat (limited to 'crawl-ref/source/status.cc')
-rw-r--r--crawl-ref/source/status.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/status.cc b/crawl-ref/source/status.cc
index 1f9703bdc5..ff6ce8404c 100644
--- a/crawl-ref/source/status.cc
+++ b/crawl-ref/source/status.cc
@@ -830,8 +830,8 @@ static void _describe_regen(status_info* inf)
static void _describe_poison(status_info* inf)
{
- int pois_perc = (get_player_poisoning() >= you.hp ? 100
- : (you.hp - poison_survival()) * 100 / you.hp);
+ int pois_perc = (you.hp <= 0) ? 100
+ : ((you.hp - 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";