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

Function fatal_corpse_mistake

src/pickup.c:284–299  ·  view source on GitHub ↗

check whether hero is bare-handedly touching a cockatrice corpse */

Source from the content-addressed store, hash-verified

282
283/* check whether hero is bare-handedly touching a cockatrice corpse */
284staticfn boolean
285fatal_corpse_mistake(struct obj *obj, boolean remotely)
286{
287 if (u_safe_from_fatal_corpse(obj, st_all) || remotely)
288 return FALSE;
289
290 if (poly_when_stoned(gy.youmonst.data) && polymon(PM_STONE_GOLEM)) {
291 display_nhwindow(WIN_MESSAGE, FALSE); /* --More-- */
292 return FALSE;
293 }
294
295 pline("Touching %s is a fatal mistake.",
296 corpse_xname(obj, (const char *) 0, CXN_SINGULAR | CXN_ARTICLE));
297 instapetrify(killer_xname(obj));
298 return TRUE;
299}
300
301/* attempting to manipulate a Rider's corpse triggers its revival */
302boolean

Callers 3

pickup_objectFunction · 0.85
in_containerFunction · 0.85
out_containerFunction · 0.85

Calls 7

u_safe_from_fatal_corpseFunction · 0.85
poly_when_stonedFunction · 0.85
polymonFunction · 0.85
corpse_xnameFunction · 0.85
instapetrifyFunction · 0.85
killer_xnameFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected