(not used) */
| 452 | |
| 453 | /* (not used) */ |
| 454 | void |
| 455 | restore_attrib(void) |
| 456 | { |
| 457 | int i, equilibrium;; |
| 458 | |
| 459 | /* |
| 460 | * Note: this used to get called by moveloop() on every turn but |
| 461 | * ATIME() is never set to non-zero anywhere so didn't do anything. |
| 462 | * Presumably it once supported something like potion of heroism |
| 463 | * which conferred temporary characteristics boost(s). |
| 464 | * |
| 465 | * ATEMP() is used for strength loss from hunger, which doesn't |
| 466 | * time out, and for dexterity loss from wounded legs, which has |
| 467 | * its own timeout routine. |
| 468 | */ |
| 469 | |
| 470 | for (i = 0; i < A_MAX; i++) { /* all temporary losses/gains */ |
| 471 | equilibrium = ((i == A_STR && u.uhs >= WEAK) |
| 472 | || (i == A_DEX && Wounded_legs)) ? -1 : 0; |
| 473 | if (ATEMP(i) != equilibrium && ATIME(i) != 0) { |
| 474 | if (!(--(ATIME(i)))) { /* countdown for change */ |
| 475 | ATEMP(i) += (ATEMP(i) > 0) ? -1 : 1; |
| 476 | disp.botl = TRUE; |
| 477 | if (ATEMP(i)) /* reset timer */ |
| 478 | ATIME(i) = 100 / ACURR(A_CON); |
| 479 | } |
| 480 | } |
| 481 | } |
| 482 | if (disp.botl) |
| 483 | encumber_msg(); |
| 484 | } |
| 485 | |
| 486 | #define AVAL 50 /* tune value for exercise gains */ |
| 487 |
nothing calls this directly
no test coverage detected