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 dokick.c $NHDT-Date: 1577674533 2019/12/30 02:55:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.152 $ */
/* NetHack 3.6 dokick.c $NHDT-Date: 1582155880 2020/02/19 23:44:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.153 $ */
/* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
/* NetHack may be freely redistributed. See license for details. */
@@ -788,15 +788,7 @@ dokick()
return 0;
}
} else if (Wounded_legs) {
/* note: jump() has similar code */
long wl = (EWounded_legs & BOTH_SIDES);
const char *bp = body_part(LEG);
if (wl == BOTH_SIDES)
bp = makeplural(bp);
Your("%s%s %s in no shape for kicking.",
(wl == LEFT_SIDE) ? "left " : (wl == RIGHT_SIDE) ? "right " : "",
bp, (wl == BOTH_SIDES) ? "are" : "is");
legs_in_no_shape("kicking", FALSE);
no_kick = TRUE;
} else if (near_capacity() > SLT_ENCUMBER) {
Your("load is too heavy to balance yourself for a kick.");