wounded legs fixes
Document 'HWounded_legs' vs 'EWounded_legs'; they aren't used the way other properties use their intrinsic and extrinsic values. And they switch from hero to steed when riding. (Can't start riding when hero's legs are wounded and the steed's legs magically heal when hero dismounts, so existing wounds never transfer from one to the other.) Having one leg become injured when the other already was would cure the other leg but keep the longer of their two timeouts for the new injury. Eliminate that mystery cure. Since their timeouts aren't tracked separately, the best that can be done is to make both legs eventually recover at the same time. Make ^X report which leg is the wounded one when only one of them is. (It already implicitly reports the both-legs case by using plural.) When zapping a wand of probing downward while riding, include wounded leg feedback for the steed. Simplify wounded leg feedback when probing self a little bit. Make drinking blessed potions of full healing cure wounded legs for hero when not mounted or for steed when mounted. (The latter is a bit strange--hero drinks potion, steed gets affected--but it's magic.) Make drinking uncursed potions of full healing or blessed potions of extra healing cure wounded legs for hero (but not steed; the magic either isn't that strong or maybe not that reliable...).
This commit is contained in:
14
src/do.c
14
src/do.c
@@ -2137,20 +2137,24 @@ set_wounded_legs(long side, int timex)
|
||||
* You still call this function, but don't lose hp.
|
||||
* Caller is also responsible for adjusting messages.
|
||||
*/
|
||||
|
||||
g.context.botl = 1;
|
||||
if (!Wounded_legs)
|
||||
ATEMP(A_DEX)--;
|
||||
|
||||
if (!Wounded_legs || (HWounded_legs & TIMEOUT) < timex)
|
||||
if (!Wounded_legs || (HWounded_legs & TIMEOUT) < (long) timex)
|
||||
set_itimeout(&HWounded_legs, (long) timex);
|
||||
EWounded_legs = side;
|
||||
/* the leg being wounded and its timeout might differ from one
|
||||
attack to the next, but we don't track the legs separately;
|
||||
3.7: both legs will ultimately heal together; this used to use
|
||||
direct assignment instead of bitwise-OR so getting wounded in
|
||||
one leg mysteriously healed the other */
|
||||
EWounded_legs |= side;
|
||||
(void) encumber_msg();
|
||||
}
|
||||
|
||||
void
|
||||
heal_legs(int how) /* 0: ordinary, 1: dismounting steed,
|
||||
2: limbs turn to stone */
|
||||
heal_legs(
|
||||
int how) /* 0: ordinary, 1: dismounting steed, 2: limbs turn to stone */
|
||||
{
|
||||
if (Wounded_legs) {
|
||||
g.context.botl = 1;
|
||||
|
||||
Reference in New Issue
Block a user