diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-06 20:14:35 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-06 20:14:35 +0000 |
commit | 44d7fbb36c55859117824fe25a298afbe437221b (patch) | |
tree | 8854c7d492879cb8ddda79ca91f44d964c5828a9 /crawl-ref/source/output.cc | |
parent | b847d4bad842066f8721cf68650d5087528e8486 (diff) | |
download | crawl-ref-44d7fbb36c55859117824fe25a298afbe437221b.tar.gz crawl-ref-44d7fbb36c55859117824fe25a298afbe437221b.zip |
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
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r-- | crawl-ref/source/output.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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<formatted_string> _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); |