status line update
Adding deafness to the status line spurred me on to something I've wanted to do for a long time. This adds 'Stone' and 'Strngl' as new status conditions, and moves the five fatal ones: "Stone Slime Strngl FoodPois TermIll" to the front of the status list since information about them is more important than any of the others. "Ill" has been renamed "TermIll"; "Df" has been renamed "Deaf"; "Lev", "Fly", and "Ride" are three additional new conditions, with Lev and Fly being mutually exclusive. After the fatal ones, the order of the rest is now <hunger> <encumbrance> Blind Deaf Stun Conf Hallu Lev Fly Ride To handle the longer potential status line, the basic bot2() is now smarter. If the line is wider than the map, 'T:moves' is moved from the middle to the end. If the line without time is still wider than the map, then experience (HD if polyd, Xp:M/nnnnnn is showexp is on, or Exp:M) is moved in front of time at the end. If the line without experience and time is still wider than the map, dungeon level plus gold is moved from the beginning to be in front of experience. The fields are just reordered, not truncated, so if the interface code can display lines wider than the map they'll retain the extra info. The gist is than health and associated fields (Hp, Pw, Ac) get first priority, status conditions get second priority, then the rest. In the usual case where there aren't many conditions, status display is the same as it has been in the past. STATUS_VIA_WINDOWPORT has been updated too, and it builds for tty and X11. But the bot2() revision to reorder sections has not been implemented for that. win/win32/mswproc.c has been updated but not tested. STATUS_VIA_WINDOWPORT without STATUS_HILITES had several compile problems; now fixed for core and tty. STATUS_VIA_WINDOWPORT with STATUS_HILITES has not been tested.
This commit is contained in:
39
src/potion.c
39
src/potion.c
@@ -165,12 +165,12 @@ const char *msg;
|
||||
if (Unaware)
|
||||
msg = 0;
|
||||
#endif
|
||||
if ((!xtime && old) || (xtime && !old)) {
|
||||
set_itimeout(&Slimed, xtime);
|
||||
if ((xtime != 0L) ^ (old != 0L)) {
|
||||
context.botl = TRUE;
|
||||
if (msg)
|
||||
pline1(msg);
|
||||
context.botl = 1;
|
||||
}
|
||||
set_itimeout(&Slimed, xtime);
|
||||
if (!Slimed)
|
||||
dealloc_killer(find_delayed_killer(SLIMED));
|
||||
}
|
||||
@@ -189,12 +189,12 @@ const char *killername;
|
||||
if (Unaware)
|
||||
msg = 0;
|
||||
#endif
|
||||
if ((!xtime && old) || (xtime && !old)) {
|
||||
set_itimeout(&Stoned, xtime);
|
||||
if ((xtime != 0L) ^ (old != 0L)) {
|
||||
context.botl = TRUE;
|
||||
if (msg)
|
||||
pline1(msg);
|
||||
/* context.botl = 1; --- Stoned is not a status line item */
|
||||
}
|
||||
set_itimeout(&Stoned, xtime);
|
||||
if (!Stoned)
|
||||
dealloc_killer(find_delayed_killer(STONED));
|
||||
else if (!old)
|
||||
@@ -211,11 +211,11 @@ boolean talk;
|
||||
if (Unaware)
|
||||
talk = FALSE;
|
||||
|
||||
set_itimeout(&Vomiting, xtime);
|
||||
context.botl = TRUE;
|
||||
if (!xtime && old)
|
||||
if (talk)
|
||||
You_feel("much less nauseated now.");
|
||||
|
||||
set_itimeout(&Vomiting, xtime);
|
||||
}
|
||||
|
||||
static const char vismsg[] = "vision seems to %s for a moment but is %s now.";
|
||||
@@ -292,7 +292,7 @@ boolean talk;
|
||||
set_itimeout(&Blinded, xtime);
|
||||
|
||||
if (u_could_see ^ can_see_now) { /* one or the other but not both */
|
||||
context.botl = 1;
|
||||
context.botl = TRUE;
|
||||
vision_full_recalc = 1; /* blindness just got toggled */
|
||||
/* this vision recalculation used to be deferred until
|
||||
moveloop(), but that made it possible for vision
|
||||
@@ -383,7 +383,7 @@ long mask; /* nonzero if resistance status should change by mask */
|
||||
(eg. Qt windowport's equipped items display) */
|
||||
update_inventory();
|
||||
|
||||
context.botl = 1;
|
||||
context.botl = TRUE;
|
||||
if (talk)
|
||||
pline(message, verb);
|
||||
}
|
||||
@@ -396,25 +396,16 @@ long xtime;
|
||||
boolean talk;
|
||||
{
|
||||
long old = HDeaf;
|
||||
boolean toggled = FALSE;
|
||||
|
||||
if (Unaware)
|
||||
talk = FALSE;
|
||||
|
||||
if (!xtime && old) {
|
||||
if (talk)
|
||||
You("can hear again.");
|
||||
toggled = TRUE;
|
||||
} else if (xtime && !old) {
|
||||
if (talk)
|
||||
You("are unable to hear anything.");
|
||||
toggled = TRUE;
|
||||
}
|
||||
/* request a status update */
|
||||
if (toggled)
|
||||
context.botl = TRUE;
|
||||
|
||||
set_itimeout(&HDeaf, xtime);
|
||||
if ((xtime != 0L) ^ (old != 0L)) {
|
||||
context.botl = TRUE;
|
||||
if (talk)
|
||||
You(old ? "can hear again." : "are unable to hear anything.");
|
||||
}
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
|
||||
Reference in New Issue
Block a user