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

@@ -1,4 +1,4 @@
/* NetHack 3.7 trap.c $NHDT-Date: 1699640827 2023/11/10 18:27:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.554 $ */
/* NetHack 3.7 trap.c $NHDT-Date: 1702274034 2023/12/11 05:53:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.559 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2923,20 +2923,8 @@ steedintrap(struct trap *trap, struct obj *otmp)
break;
case POLY_TRAP:
if (!resists_magm(steed) && !resist(steed, WAND_CLASS, 0, NOTELL)) {
struct permonst *mdat = steed->data;
/* newcham() will probably end up calling poly_steed() */
(void) newcham(steed, (struct permonst *) 0, NC_SHOW_MSG);
if (!can_saddle(steed) || !can_ride(steed)) {
dismount_steed(DISMOUNT_POLY);
} else {
char buf[BUFSZ];
Strcpy(buf, x_monnam(steed, ARTICLE_YOUR, (char *) 0,
SUPPRESS_SADDLE, FALSE));
if (mdat != steed->data)
(void) strsubst(buf, "your ", "your new ");
You("adjust yourself in the saddle on %s.", buf);
}
}
steedhit = TRUE;
break;