That does not do what you intended to do.
if (resiPierce > 0 || resiPierce > 0 && ad.AttackType == AttackData.eAttackType.Spell && Spell.SpellType == "Archery")
Not grouped correctly, since it mixes AND and OR, but regardless this will always be true if resiPierce > 0
What you need to do here is discover when you don't want to execute this code and then make logic for it. Perhaps it should always happen?