* Returns an obj->age for a corpse object on ice, that would be the * actual obj->age if the corpse had just been lifted from the ice. * This is useful when just using obj->age in a check or calculation because * rot timers pertaining to the object don't have to be stopped and * restarted etc. */
| 2420 | * restarted etc. |
| 2421 | */ |
| 2422 | long |
| 2423 | peek_at_iced_corpse_age(struct obj *otmp) |
| 2424 | { |
| 2425 | long age, retval = otmp->age; |
| 2426 | |
| 2427 | if (otmp->otyp == CORPSE && otmp->on_ice) { |
| 2428 | /* Adjust the age; must be same as obj_timer_checks() for off ice*/ |
| 2429 | age = svm.moves - otmp->age; |
| 2430 | retval += age * (ROT_ICE_ADJUSTMENT - 1) / ROT_ICE_ADJUSTMENT; |
| 2431 | debugpline3( |
| 2432 | "The %s age has ice modifications: otmp->age = %ld, returning %ld.", |
| 2433 | s_suffix(doname(otmp)), otmp->age, retval); |
| 2434 | debugpline1("Effective age of corpse: %ld.", svm.moves - retval); |
| 2435 | } |
| 2436 | return retval; |
| 2437 | } |
| 2438 | |
| 2439 | staticfn void |
| 2440 | obj_timer_checks( |
no test coverage detected