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

Function fixup_death

src/end.c:365–384  ·  view source on GitHub ↗

clear away while-helpless when the cause of death caused that helplessness (ie, "petrified by while getting stoned") */

Source from the content-addressed store, hash-verified

363/* clear away while-helpless when the cause of death caused that
364 helplessness (ie, "petrified by <foo> while getting stoned") */
365staticfn void
366fixup_death(int how)
367{
368 int i;
369
370 if (gm.multi_reason) {
371 for (i = 0; i < SIZE(death_fixups); ++i)
372 if (death_fixups[i].why == how
373 && !strcmp(death_fixups[i].exclude, gm.multi_reason)) {
374 if (death_fixups[i].include) /* substitute alternate reason */
375 gm.multi_reason = death_fixups[i].include;
376 else /* remove the helplessness reason */
377 gm.multi_reason = (char *) 0;
378 gm.multireasonbuf[0] = '\0'; /* dynamic buf stale either way */
379 if (death_fixups[i].unmulti) /* possibly hide helplessness */
380 gm.multi = 0L;
381 break;
382 }
383 }
384}
385
386#if defined(WIN32) && !defined(SYSCF)
387#define NOTIFY_NETHACK_BUGS

Callers 1

really_doneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected