Macros for checking is object artifact

This commit is contained in:
Pasi Kallinen
2022-08-12 19:37:34 +03:00
parent fc3729d249
commit 9be2e581b7
19 changed files with 53 additions and 54 deletions

View File

@@ -2084,7 +2084,7 @@ trapeffect_anti_magic(
if (Half_physical_damage || Half_spell_damage)
dmgval2 += rnd(4);
/* give Magicbane wielder dose of own medicine */
if (uwep && uwep->oartifact == ART_MAGICBANE)
if (u_wield_art(ART_MAGICBANE))
dmgval2 += rnd(4);
/* having an artifact--other than own quest one--which
confers magic resistance simply by being carried
@@ -2130,7 +2130,7 @@ trapeffect_anti_magic(
int dmgval2 = rnd(4);
if ((otmp = MON_WEP(mtmp)) != 0
&& otmp->oartifact == ART_MAGICBANE)
&& is_art(otmp, ART_MAGICBANE))
dmgval2 += rnd(4);
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
if (otmp->oartifact