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

Function can_fog

src/monmove.c:2364–2371  ·  view source on GitHub ↗

monster can change form into a fog if necessary */

Source from the content-addressed store, hash-verified

2362
2363/* monster can change form into a fog if necessary */
2364boolean
2365can_fog(struct monst *mtmp)
2366{
2367 if (!(svm.mvitals[PM_FOG_CLOUD].mvflags & G_GENOD) && is_vampshifter(mtmp)
2368 && !Protection_from_shape_changers && !stuff_prevents_passage(mtmp))
2369 return TRUE;
2370 return FALSE;
2371}
2372
2373/* this is called when a vampire turns into a fog cloud in order to move
2374 under a closed door; if it was sensed via telepathy or seen via

Callers 4

cant_squeeze_thruFunction · 0.85
mfndposFunction · 0.85
postmovFunction · 0.85
set_apparxyFunction · 0.85

Calls 1

stuff_prevents_passageFunction · 0.85

Tested by

no test coverage detected