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

Function num_gone

src/insight.c:2984–3002  ·  view source on GitHub ↗

collect both genocides and extinctions, skipping uniques */

Source from the content-addressed store, hash-verified

2982
2983/* collect both genocides and extinctions, skipping uniques */
2984staticfn int
2985num_gone(int mvflags, int *mindx)
2986{
2987 uchar mflg = (uchar) mvflags;
2988 int i, n = 0;
2989
2990 (void) memset((genericptr_t) mindx, 0, NUMMONS * sizeof *mindx);
2991
2992 for (i = LOW_PM; i < NUMMONS; ++i) {
2993 /* uniques can't be genocided but can become extinct;
2994 however, they're never reported as extinct, so skip them */
2995 if (UniqCritterIndx(i))
2996 continue;
2997
2998 if ((svm.mvitals[i].mvflags & mflg) != 0)
2999 mindx[n++] = i;
3000 }
3001 return n;
3002}
3003
3004/* show genocided and extinct monster types for final disclosure/dumplog
3005 or for the #genocided command */

Callers 1

list_genocidedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected