| 2446 | } |
| 2447 | |
| 2448 | void |
| 2449 | heal_legs( |
| 2450 | int how) /* 0: ordinary, 1: dismounting steed, 2: limbs turn to stone */ |
| 2451 | { |
| 2452 | if (Wounded_legs) { |
| 2453 | disp.botl = TRUE; |
| 2454 | if (ATEMP(A_DEX) < 0) |
| 2455 | ATEMP(A_DEX)++; |
| 2456 | |
| 2457 | /* when mounted, wounded legs applies to the steed; |
| 2458 | during petrification countdown, "your limbs turn to stone" |
| 2459 | before the final stages and that calls us (how==2) to cure |
| 2460 | wounded legs, but we want to suppress the feel better message */ |
| 2461 | if (!u.usteed && how != 2) { |
| 2462 | const char *legs = body_part(LEG); |
| 2463 | |
| 2464 | if ((EWounded_legs & BOTH_SIDES) == BOTH_SIDES) |
| 2465 | legs = makeplural(legs); |
| 2466 | /* this used to say "somewhat better" but that was |
| 2467 | misleading since legs are being fully healed */ |
| 2468 | Your("%s %s better.", legs, vtense(legs, "feel")); |
| 2469 | } |
| 2470 | |
| 2471 | HWounded_legs = EWounded_legs = 0L; |
| 2472 | |
| 2473 | /* Wounded_legs reduces carrying capacity, so we want |
| 2474 | an encumbrance check when they're healed. However, |
| 2475 | while dismounting, first steed's legs get healed, |
| 2476 | then hero is dropped to floor and a new encumbrance |
| 2477 | check is made [in dismount_steed()]. So don't give |
| 2478 | encumbrance feedback during the dismount stage |
| 2479 | because it could seem to be shown out of order and |
| 2480 | it might be immediately contradicted [able to carry |
| 2481 | more when steed becomes healthy, then possible floor |
| 2482 | feedback, then able to carry less when back on foot]. */ |
| 2483 | if (how == 0) |
| 2484 | encumber_msg(); |
| 2485 | } |
| 2486 | } |
| 2487 | |
| 2488 | /*do.c*/ |
no test coverage detected