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

Function valid_vampshiftform

src/mon.c:5014–5023  ·  view source on GitHub ↗

used for hero polyself handling */

Source from the content-addressed store, hash-verified

5012
5013/* used for hero polyself handling */
5014boolean
5015valid_vampshiftform(int base, int form)
5016{
5017 if (base >= LOW_PM && is_vampire(&mons[base])) {
5018 if (form == PM_VAMPIRE_BAT || form == PM_FOG_CLOUD
5019 || (form == PM_WOLF && base != PM_VAMPIRE))
5020 return TRUE;
5021 }
5022 return FALSE;
5023}
5024
5025/* prevent wizard mode user from specifying invalid vampshifter shape
5026 when using monpolycontrol to assign a new form to a vampshifter */

Callers 1

set_uasmonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected