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

Function defends_when_carried

src/artifact.c:686–694  ·  view source on GitHub ↗

used for monsters */

Source from the content-addressed store, hash-verified

684
685/* used for monsters */
686boolean
687defends_when_carried(int adtyp, struct obj *otmp)
688{
689 const struct artifact *weap;
690
691 if ((weap = get_artifact(otmp)) != &artilist[ART_NONARTIFACT])
692 return (boolean) (weap->cary.adtyp == adtyp);
693 return FALSE;
694}
695
696/* determine whether an item confers Protection */
697boolean

Callers 5

Resists_ElemFunction · 0.85
resists_magmFunction · 0.85
resists_blnd_by_artiFunction · 0.85
trapeffect_anti_magicFunction · 0.85
drain_itemFunction · 0.85

Calls 1

get_artifactFunction · 0.85

Tested by

no test coverage detected