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

Function bane_applies

src/artifact.c:992–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990}
991
992staticfn boolean
993bane_applies(const struct artifact *oart, struct monst *mon)
994{
995 struct artifact atmp;
996
997 if (oart != &artilist[ART_NONARTIFACT]
998 && (oart->spfx & SPFX_DBONUS) != 0) {
999 atmp = *oart;
1000 atmp.spfx &= SPFX_DBONUS; /* clear other spfx fields */
1001 if (spec_applies(&atmp, mon))
1002 return TRUE;
1003 }
1004 return FALSE;
1005}
1006
1007/* decide whether an artifact's special attacks apply against mtmp */
1008staticfn int

Callers 2

touch_artifactFunction · 0.85
retouch_objectFunction · 0.85

Calls 1

spec_appliesFunction · 0.85

Tested by

no test coverage detected