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

Function has_shrine

src/priest.c:375–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375staticfn boolean
376has_shrine(struct monst *pri)
377{
378 struct rm *lev;
379 struct epri *epri_p;
380
381 if (!pri || !pri->ispriest)
382 return FALSE;
383 epri_p = EPRI(pri);
384 lev = &levl[epri_p->shrpos.x][epri_p->shrpos.y];
385 if (!IS_ALTAR(lev->typ) || !(lev->altarmask & AM_SHRINE))
386 return FALSE;
387 return (boolean) (epri_p->shralign
388 == (Amask2align(lev->altarmask & ~AM_SHRINE)));
389}
390
391struct monst *
392findpriest(char roomno)

Callers 5

inhistempleFunction · 0.85
intempleFunction · 0.85
priest_talkFunction · 0.85
in_your_sanctuaryFunction · 0.85
ghod_hitsuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected