From 3ea12fe048a0b160625f39ec11a9477d8da62da0 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 10 Jan 2017 20:45:16 +0200 Subject: [PATCH] Show all statusline info in #attributes --- doc/fixes36.1 | 1 + src/cmd.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 7142c52ca..290a9d4ae 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -364,6 +364,7 @@ some death by the-poison-was-deadly situations left stale non-zero HP shown on the status line during final disclosure when sitting at a trap spot: You sit down. You step on a level teleporter. (likewise for polymorph trap, and similar issue for web) +show all statusline information in #attributes Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/src/cmd.c b/src/cmd.c index a1020bdba..4d39a8ba6 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1592,10 +1592,44 @@ characteristics_enlightenment(mode, final) int mode; int final; { + char buf[BUFSZ]; + int hp = Upolyd ? u.mh : u.uhp; + int hpmax = Upolyd ? u.mhmax : u.uhpmax; + putstr(en_win, 0, ""); /* separator after background */ putstr(en_win, 0, final ? "Final Characteristics:" : "Current Characteristics:"); + if (hp < 0) + hp = 0; + Sprintf(buf, "%d hit points (max:%d)", hp, hpmax); + you_have(buf, ""); + + Sprintf(buf, "%d magic power (max:%d)", u.uen, u.uenmax); + you_have(buf, ""); + + Sprintf(buf, "%d", u.uac); + enl_msg("Your armor class ", "is ", "was ", buf, ""); + + if (Upolyd) { + Sprintf(buf, "%d hit dice", mons[u.umonnum].mlevel); + } else { + /* flags.showexp does not matter */ + /* experience level is already shown in the Background section */ + Sprintf(buf, "%-1ld experience point%s", + u.uexp, u.uexp == 1 ? "" : "s"); + } + you_have(buf, ""); + + Sprintf(buf, " You entered the dungeon %ld turn%s ago", + moves, moves == 1 ? "" : "s"); + putstr(en_win, 0, buf); + +#ifdef SCORE_ON_BOTL + Sprintf(buf, "%ld", botl_score()); + enl_msg("Your score ", "is ", "was ", buf, ""); +#endif + /* bottom line order */ one_characteristic(mode, final, A_STR); /* strength */ one_characteristic(mode, final, A_DEX); /* dexterity */ -- 2.40.0