MCPcopy Create free account
hub / github.com/NetHack/NetHack / removed_from_icebox

Function removed_from_icebox

src/pickup.c:2780–2799  ·  view source on GitHub ↗

taking a corpse out of an ice box needs a couple of adjustments */

Source from the content-addressed store, hash-verified

2778
2779/* taking a corpse out of an ice box needs a couple of adjustments */
2780void
2781removed_from_icebox(struct obj *obj)
2782{
2783 if (!age_is_relative(obj)) {
2784 obj->age = svm.moves - obj->age; /* actual age */
2785 if (obj->otyp == CORPSE) {
2786 struct monst *m = get_mtraits(obj, FALSE);
2787 boolean iceT = m ? (m->data == &mons[PM_ICE_TROLL])
2788 : (obj->corpsenm == PM_ICE_TROLL);
2789
2790 /* start a revive timer if this corpse is for an ice troll,
2791 otherwise start a rot-away timer (even for other trolls) */
2792 obj->norevive = iceT ? 0 : 1;
2793 start_corpse_timeout(obj);
2794 } else if (obj->globby) {
2795 /* non-frozen globs gradually shrink away to nothing */
2796 start_glob_timeout(obj, 0L);
2797 }
2798 }
2799}
2800
2801/* an object inside a cursed bag of holding is being destroyed */
2802staticfn long

Callers 4

out_containerFunction · 0.85
tipcontainerFunction · 0.85
meatboxFunction · 0.85
mloot_containerFunction · 0.85

Calls 3

get_mtraitsFunction · 0.85
start_corpse_timeoutFunction · 0.85
start_glob_timeoutFunction · 0.85

Tested by

no test coverage detected