decide whether an artifact itself is vulnerable to a particular type of erosion damage, independent of the properties of its bearer */
| 976 | /* decide whether an artifact itself is vulnerable to a particular type |
| 977 | of erosion damage, independent of the properties of its bearer */ |
| 978 | boolean |
| 979 | arti_immune(struct obj *obj, int dtyp) |
| 980 | { |
| 981 | const struct artifact *weap = get_artifact(obj); |
| 982 | |
| 983 | if (weap == &artilist[ART_NONARTIFACT]) |
| 984 | return FALSE; |
| 985 | if (dtyp == AD_PHYS) |
| 986 | return FALSE; /* nothing is immune to phys dmg */ |
| 987 | return (boolean) (weap->attk.adtyp == dtyp |
| 988 | || weap->defn.adtyp == dtyp |
| 989 | || weap->cary.adtyp == dtyp); |
| 990 | } |
| 991 | |
| 992 | staticfn boolean |
| 993 | bane_applies(const struct artifact *oart, struct monst *mon) |
nothing calls this directly
no test coverage detected