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

Function mondied

src/mon.c:3252–3263  ·  view source on GitHub ↗

drop (perhaps) a cadaver and remove monster */

Source from the content-addressed store, hash-verified

3250
3251/* drop (perhaps) a cadaver and remove monster */
3252void
3253mondied(struct monst *mdef)
3254{
3255 mondead(mdef);
3256 if (!DEADMONSTER(mdef))
3257 return; /* lifesaved */
3258
3259 /* this assumes that the dead monster's map coordinates remain accurate */
3260 if (corpse_chance(mdef, (struct monst *) 0, FALSE)
3261 && (accessible(mdef->mx, mdef->my) || is_pool(mdef->mx, mdef->my)))
3262 (void) make_corpse(mdef, CORPSTAT_NONE);
3263}
3264
3265/* monster disappears, not dies */
3266void

Callers 14

mhitm_ad_cursFunction · 0.85
mhitm_ad_dgstFunction · 0.85
boulder_hits_poolFunction · 0.85
flooreffectsFunction · 0.85
dog_starveFunction · 0.85
eat_brainsFunction · 0.85
minliquid_coreFunction · 0.85
corpse_chanceFunction · 0.85
monkilledFunction · 0.85
grow_upFunction · 0.85
mb_trappedFunction · 0.85
use_offensiveFunction · 0.85

Calls 5

mondeadFunction · 0.85
corpse_chanceFunction · 0.85
accessibleFunction · 0.85
is_poolFunction · 0.85
make_corpseFunction · 0.85

Tested by

no test coverage detected