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

Function pm_to_cham

src/mon.c:534–546  ·  view source on GitHub ↗

return monster index if chameleon, or NON_PM if not */

Source from the content-addressed store, hash-verified

532
533/* return monster index if chameleon, or NON_PM if not */
534int
535pm_to_cham(int mndx)
536{
537 int mcham = NON_PM;
538
539 /*
540 * As of 3.6.0 we just check M2_SHAPESHIFTER instead of having a
541 * big switch statement with hardcoded shapeshifter types here.
542 */
543 if (ismnum(mndx) && is_shapeshifter(&mons[mndx]))
544 mcham = mndx;
545 return mcham;
546}
547
548/* for deciding whether corpse will carry along full monster data */
549#define KEEPTRAITS(mon) \

Callers 5

mon_polyFunction · 0.85
m_restartchamFunction · 0.85
restore_chamFunction · 0.85
newchamFunction · 0.85
makemonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected