fix #K4060 - "you walk quietly" while riding

Donning elven boots while riding and not already stealthy, you'd get
the message "you walk quietly" when not walking at all.  Instead of
just changing the message, make riding a non-flying steed block
stealth.  Riding a flying steed (or one you take aloft with an amulet
of flying) does not.  It would have been quite a bit simpler to have
made riding anything block stealth, but the hard part is done.
This commit is contained in:
PatR
2023-12-10 22:09:26 -08:00
parent f3408b87ba
commit a7db78f7d6
10 changed files with 103 additions and 40 deletions

View File

@@ -2792,6 +2792,7 @@ extern void exercise_steed(void);
extern void kick_steed(void);
extern void dismount_steed(int);
extern void place_monster(struct monst *, coordxy, coordxy);
extern void poly_steed(struct monst *, struct permonst *);
extern boolean stucksteed(boolean);
/* ### symbols.c ### */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 prop.h $NHDT-Date: 1596498555 2020/08/03 23:49:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */
/* NetHack 3.7 prop.h $NHDT-Date: 1702274027 2023/12/11 05:53:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.24 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
@@ -129,14 +129,14 @@ struct prop {
long intrinsic;
/* Timed properties */
#define TIMEOUT 0x00ffffffL /* Up to 16 million turns */
/* Permanent properties */
#define FROMEXPER 0x01000000L /* Gain/lose with experience, for role */
#define FROMRACE 0x02000000L /* Gain/lose with experience, for race */
/* Permanent properties */
#define FROMEXPER 0x01000000L /* Gain/lose with experience, for role */
#define FROMRACE 0x02000000L /* Gain/lose with experience, for race */
#define FROMOUTSIDE 0x04000000L /* By corpses, prayer, thrones, etc. */
#define INTRINSIC (FROMOUTSIDE | FROMRACE | FROMEXPER)
#define INTRINSIC (FROMOUTSIDE | FROMRACE | FROMEXPER)
/* Control flags */
#define FROMFORM 0x10000000L /* Polyd; conferred by monster form */
#define I_SPECIAL 0x20000000L /* Property is controllable */
#define FROMFORM 0x10000000L /* Polyd; conferred by monster form */
#define I_SPECIAL 0x20000000L /* Property is controllable */
};
/*** Definitions for backwards compatibility ***/

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 youprop.h $NHDT-Date: 1596498577 2020/08/03 23:49:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.32 $ */
/* NetHack 3.7 youprop.h $NHDT-Date: 1702274029 2023/12/11 05:53:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.44 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
@@ -200,6 +200,7 @@
#define HStealth u.uprops[STEALTH].intrinsic
#define EStealth u.uprops[STEALTH].extrinsic
/* BStealth has FROMOUTSIDE set if mounted on non-flying steed */
#define BStealth u.uprops[STEALTH].blocked
#define Stealth ((HStealth || EStealth) && !BStealth)
@@ -384,6 +385,10 @@
* Some pseudo-properties.
*/
/* the code will needs lots of updating to use this so leave it commented
#define Riding (u.usteed != NULL)
*/
/* unconscious() includes u.usleep but not is_fainted(); the multi test is
redundant but allows the function calls to be skipped most of the time */
#define Unaware (gm.multi < 0 && (unconscious() || is_fainted()))