public virtual bool CheckResisted(Mobile target, double damage)
{
bool canattack = false;
int noto = Notoriety.Compute(Caster, target);
if (noto == Notoriety.Enemy)
{
canattack = true;
}
else if (((Caster.FindItemOnLayer(Layer.TwoHanded) is OrderShield) && (target.FindItemOnLayer(Layer.TwoHanded) is ChaosShield)) && target is PlayerMobile)
{
canattack = true;
}
else if (((Caster.FindItemOnLayer(Layer.TwoHanded) is ChaosShield) && (target.FindItemOnLayer(Layer.TwoHanded) is OrderShield)) && target is PlayerMobile)
{
canattack = true;
}
if (SpellHelper.IsTown(target.Location, Caster) && !canattack)
{
damage = 1;
}
double sk = damage * 2.5;
if (sk > 124.9)
{
sk = 124.9;
}
return(target.CheckSkill(SkillName.MagicResist, sk - 25.0, sk + 25.0));
}