conflicting countdowns again

Use the make_foo() intrinsic set/reset routines instead of trying
to manipulate the intrinsics directly.  Previous patch left Dex
down by 1 if stoning caused wounded legs to be fixed, and left
delayed killer allocated if stoning cured sliming or vice versa.
This commit is contained in:
PatR
2018-11-12 11:02:40 -08:00
parent 53a6ce2c2a
commit 1295e7ee28
8 changed files with 40 additions and 33 deletions

View File

@@ -1882,7 +1882,8 @@ register int timex;
}
void
heal_legs()
heal_legs(how)
int how; /* 0: ordinary, 1: dismounting steed, 2: limbs turn to stone */
{
if (Wounded_legs) {
if (ATEMP(A_DEX) < 0) {
@@ -1890,7 +1891,11 @@ heal_legs()
context.botl = 1;
}
if (!u.usteed) {
/* when mounted, wounded legs applies to the steed;
during petrification countdown, "your limbs turn to stone"
before the final stages and that calls us (how==2) to cure
wounded legs, but we want to suppress the feel better message */
if (!u.usteed && how != 2) {
const char *legs = body_part(LEG);
if ((EWounded_legs & BOTH_SIDES) == BOTH_SIDES)
@@ -1900,7 +1905,7 @@ heal_legs()
Your("%s %s better.", legs, vtense(legs, "feel"));
}
HWounded_legs = EWounded_legs = 0;
HWounded_legs = EWounded_legs = 0L;
/* Wounded_legs reduces carrying capacity, so we want
an encumbrance check when they're healed. However,
@@ -1912,7 +1917,7 @@ heal_legs()
it might be immediately contradicted [able to carry
more when steed becomes healthy, then possible floor
feedback, then able to carry less when back on foot]. */
if (!in_steed_dismounting)
if (how == 0)
(void) encumber_msg();
}
}