From 44d7fbb36c55859117824fe25a298afbe437221b Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 6 Jul 2008 20:14:35 +0000 Subject: Fix 1870427: Max hp misreported if frail and rotted. Fix 2002931: feature_item_brand not working No, it's not the important bugs, but at least these are bugs I can reproduce. :P git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6433 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/output.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/output.cc') diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index aaa206bd50..c5ff49069e 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -307,7 +307,7 @@ static void _print_stats_mp(int x, int y) static void _print_stats_hp(int x, int y) { - const int max_max_hp = you.hp_max + player_rotted(); + const int max_max_hp = get_real_hp(true, true); // Calculate colour short hp_colour = HUD_VALUE_COLOR; @@ -315,8 +315,8 @@ static void _print_stats_hp(int x, int y) const int hp_percent = (you.hp * 100) / (max_max_hp ? max_max_hp : you.hp); - for ( unsigned int i = 0; i < Options.hp_colour.size(); ++i ) - if ( hp_percent <= Options.hp_colour[i].first ) + for (unsigned int i = 0; i < Options.hp_colour.size(); ++i) + if (hp_percent <= Options.hp_colour[i].first) hp_colour = Options.hp_colour[i].second; } @@ -1751,11 +1751,11 @@ static std::vector _get_overview_stats() column_composer cols1(4, 18, 28, 40); if (!player_rotted()) - snprintf(buf, sizeof buf, "HP %3d/%d",you.hp,you.hp_max); + snprintf(buf, sizeof buf, "HP %3d/%d", you.hp, you.hp_max); else { snprintf(buf, sizeof buf, "HP %3d/%d (%d)", - you.hp, you.hp_max, you.hp_max + player_rotted() ); + you.hp, you.hp_max, get_real_hp(true, true) ); } cols1.add_formatted(0, buf, false); -- cgit v1.2.3-54-g00ecf