Wounded_legs condition

Mounting a steed while legs are wounded would offer to cure them
but wasn't going through the heal_legs() routine so didn't update
the status line when Wounded_legs condition is enabled.

Move some common code for describing left/right/both legs into a
new routine used for feedback by jumping, kicking, and ridiing.

For ^X, distinguish between one wounded leg and both but don't
bother with left vs right when it is just one.
This commit is contained in:
PatR
2020-02-19 15:47:55 -08:00
parent 16d32b3002
commit cfd425d5db
6 changed files with 44 additions and 32 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 apply.c $NHDT-Date: 1581886857 2020/02/16 21:00:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.317 $ */
/* NetHack 3.6 apply.c $NHDT-Date: 1582155875 2020/02/19 23:44:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.318 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1747,18 +1747,7 @@ int magic; /* 0=Physical, otherwise skill level */
You("lack the strength to jump!");
return 0;
} else if (!magic && Wounded_legs) {
long wl = (Wounded_legs & BOTH_SIDES);
const char *bp = body_part(LEG);
if (wl == BOTH_SIDES)
bp = makeplural(bp);
if (u.usteed)
pline("%s is in no shape for jumping.", Monnam(u.usteed));
else
Your("%s%s %s in no shape for jumping.",
(wl == LEFT_SIDE) ? "left " : (wl == RIGHT_SIDE) ? "right "
: "",
bp, (wl == BOTH_SIDES) ? "are" : "is");
legs_in_no_shape("jumping", u.usteed != 0);
return 0;
} else if (u.usteed && u.utrap) {
pline("%s is stuck in a trap.", Monnam(u.usteed));