new composite status conditions: weaponstatus,\

armorstatus, and terrainstatus

This adds three special status items to show at a glance what the hero
is wielding, wearing, and standing on.

Each of the three items has its own boolean option rather than try to
fix them in with the existing opttional status conditions.  After a
lot of testing, I think the weapon and armor ones will prove useful
but the terrain one probably won't be.

Presently it is implemented for tty and curses.  When I developed it
six years ago, it was also working for X11 but I'm not able to test
the resurrection of that part so have left it out.
This commit is contained in:
PatR
2026-04-16 13:35:08 -07:00
parent 45e8305918
commit 84ddf85cb4
20 changed files with 659 additions and 72 deletions

View File

@@ -5,7 +5,12 @@
#ifndef BOTL_H
#define BOTL_H
/* MAXCO must hold longest uncompressed status line, and must be larger
/* Note: this comment is about the pre-VIA_WINDOWPORT two line status
* which is still available but has not added a bunch of conditional
* extra status conditions (Grab, InLava, Held, Zzz and many others)
* or the new fields Weapon, Armor, and Terrain.
*
* MAXCO must hold longest uncompressed status line, and must be larger
* than COLNO
*
* longest practical second status line at the moment is
@@ -39,13 +44,20 @@ enum statusfields {
BL_CHARACTERISTICS = -3, /* alias for BL_STR..BL_CH */
BL_RESET = -2, /* Force everything to redisplay */
BL_FLUSH = -1, /* Finished cycling through bot fields */
/*
* Note: status_sanity_check() in wintty.c has strings for the rest
* of these, so if any get renumbered or more get added, be sure to
* keep those in sync.
*/
BL_TITLE = 0,
BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, /* 1..6 */
BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX, /* 7..12 */
BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, /* 13..18 */
BL_HPMAX, BL_LEVELDESC, BL_EXP, BL_CONDITION, /* 19..22 */
BL_VERS, /* 23 */
MAXBLSTATS, /* [24] */
BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, /* 1.. 6 */
BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, /* 7..10 */
BL_ENE, BL_ENEMAX, BL_XP, BL_AC, BL_HD, /* 11..15 */
BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, /* 16..19 */
BL_LEVELDESC, BL_EXP, BL_CONDITION, /* 20..22 */
BL_WEAPON, BL_ARMOR, BL_TERRAIN, /* 23..25 */
BL_VERS, /* 26 */
MAXBLSTATS /* [27] */
};
enum relationships {
@@ -55,7 +67,7 @@ enum relationships {
};
enum blconditions {
bl_bareh,
bl_bareh, /* deprecated -- bl_weapon encompasses this */
bl_blind,
bl_busy,
bl_conf,
@@ -67,7 +79,7 @@ enum blconditions {
bl_grab,
bl_hallu,
bl_held,
bl_icy,
bl_icy, /* bl_terrain encompasses this */
bl_inlava,
bl_lev,
bl_parlyz,
@@ -78,7 +90,7 @@ enum blconditions {
bl_stone,
bl_strngl,
bl_stun,
bl_submerged,
bl_submerged, /* bl_terrain encompasses this */
bl_termill,
bl_tethered,
bl_trapped,