public double GetChances(Mobile atk, Mobile def) { double chances = 0; chances = GetBonus(atk.Skills[SkillName.Vol].Value, StealingScaling, StealingBonus); chances += GetBonus(atk.Skills[SkillName.Fouille].Value, SnoopingScaling, SnoopingBonus); Item weapon = Weapon(def); if (weapon != null) { chances -= GetBonus(def.Skills[(CombatStrategy.GetStrategy(def).ToucherSkill)].Value, 0.05, 5); if (weapon.Layer == Layer.TwoHanded) { chances -= 0.15; } if (def.FindItemOnLayer(Layer.TwoHanded) as BaseShield != null) { chances -= GetBonus(def.Skills[SkillName.Parer].Value, 0.15, 5); } } return(chances); }
public virtual void FinishSequence() { State = SpellState.None; if (Caster.Spell == this) { Caster.Spell = null; } CombatStrategy.GetStrategy(Caster).ResetAttackAfterCast(Caster); }
public virtual void DoFizzle() { Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502632); // The spell fizzles. if (Caster.Player) { Effects.SendTargetEffect(Caster, 0x3735, 6, 30); Caster.PlaySound(0x5C); } CombatStrategy.GetStrategy(Caster).ResetAttackAfterCast(Caster); }