MCPcopy Index your code
hub / github.com/NetHack/NetHack / zombie_maker

Function zombie_maker

src/mon.c:361–380  ·  view source on GitHub ↗

return True if mon is capable of converting other monsters into zombies */

Source from the content-addressed store, hash-verified

359
360/* return True if mon is capable of converting other monsters into zombies */
361boolean
362zombie_maker(struct monst *mon)
363{
364 struct permonst *pm = mon->data;
365
366 if (mon->mcan)
367 return FALSE;
368
369 switch (pm->mlet) {
370 case S_ZOMBIE:
371 /* Z-class monsters that aren't actually zombies go here */
372 if (pm == &mons[PM_GHOUL] || pm == &mons[PM_SKELETON])
373 return FALSE;
374 return TRUE;
375 case S_LICH:
376 /* all liches will create zombies as well */
377 return TRUE;
378 }
379 return FALSE;
380}
381
382/* Return monster index of zombie monster which this monster could
383 be turned into, or NON_PM if it doesn't have a direct counterpart.

Callers 4

end.cFile · 0.85
mdamagemFunction · 0.85
mm_2way_aggressionFunction · 0.85
xkilledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected