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.7 insight.c $NHDT-Date: 1581362470 2020/02/10 19:21:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $ */
/* NetHack 3.7 insight.c $NHDT-Date: 1582155881 2020/02/19 23:44:41 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -927,7 +927,12 @@ int final;
enl_msg(buf, " has", " had", " wounded legs", "");
}
} else {
Sprintf(buf, "wounded %s", makeplural(body_part(LEG)));
long wl = (EWounded_legs & BOTH_SIDES);
const char *bp = body_part(LEG), *article = "a ";
if (wl == BOTH_SIDES)
bp = makeplural(bp), article = "";
Sprintf(buf, "%swounded %s", article, bp);
you_have(buf, "");
}
}