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

Function spec_abon

src/artifact.c:1075–1087  ·  view source on GitHub ↗

special attack bonus */

Source from the content-addressed store, hash-verified

1073
1074/* special attack bonus */
1075int
1076spec_abon(struct obj *otmp, struct monst *mon)
1077{
1078 const struct artifact *weap = get_artifact(otmp);
1079
1080 /* no need for an extra check for `NO_ATTK' because this will
1081 always return 0 for any artifact which has that attribute */
1082
1083 if (weap != &artilist[ART_NONARTIFACT]
1084 && weap->attk.damn && spec_applies(weap, mon))
1085 return rnd((int) weap->attk.damn);
1086 return 0;
1087}
1088
1089/* special damage bonus */
1090int

Callers 3

hitvalFunction · 0.85
thitmonstFunction · 0.85
ohitmonFunction · 0.85

Calls 3

get_artifactFunction · 0.85
spec_appliesFunction · 0.85
rndFunction · 0.85

Tested by

no test coverage detected