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

Function attacks

src/artifact.c:625–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625boolean
626attacks(int adtyp, struct obj *otmp)
627{
628 const struct artifact *weap;
629
630 if ((weap = get_artifact(otmp)) != &artilist[ART_NONARTIFACT])
631 return (boolean) (weap->attk.adtyp == adtyp);
632 return FALSE;
633}
634
635boolean
636defends(int adtyp, struct obj *otmp)

Callers 4

artifact_hitFunction · 0.85
domove_fight_webFunction · 0.85
untrap_probFunction · 0.85
disarm_holdingtrapFunction · 0.85

Calls 1

get_artifactFunction · 0.85

Tested by

no test coverage detected