public static int HitChanceBonus(Mobile m) { PlayingTheOddsSpell spell = GetSpellForParty(m, typeof(PlayingTheOddsSpell)) as PlayingTheOddsSpell; if (spell != null) { return(spell._HCIBonus); } return(0); }
public static int SwingSpeedBonus(Mobile m) { PlayingTheOddsSpell spell = GetSpellForParty(m, typeof(PlayingTheOddsSpell)) as PlayingTheOddsSpell; if (spell != null) { return(spell._SSIBonus); } return(0); }
public static int RangeModifier(BaseWeapon weapon) { if (weapon is BaseRanged && !(weapon is BaseThrown)) { Mobile m = weapon.RootParent as Mobile; if (m != null) { PlayingTheOddsSpell spell = GetSpell(m, typeof(PlayingTheOddsSpell)) as PlayingTheOddsSpell; if (spell != null) { return(weapon.DefMaxRange / 2); } } } return(weapon.DefMaxRange); }
public override bool CheckCast() { if (IsInCooldown(Caster, this.GetType())) { return(false); } if (!CheckWeapon()) { Caster.SendLocalizedMessage(1156000); // You must have an Archery weapon to use this ability! return(false); } PlayingTheOddsSpell spell = GetSpellForParty(Caster, typeof(PlayingTheOddsSpell)) as PlayingTheOddsSpell; if (spell != null) { Caster.SendLocalizedMessage(1062945); // That ability is already in effect. return(false); } return(base.CheckCast()); }
public static int GetAttributeBonus(Mobile m, AosAttribute attr) { int value = 0; SkillMasterySpell spell = null; switch (attr) { case AosAttribute.AttackChance: spell = SkillMasterySpell.GetSpellForParty(m, typeof(InspireSpell)); if (spell != null) { value += spell.PropertyBonus(); } spell = SkillMasterySpell.GetSpellForParty(m, typeof(TribulationSpell)); if (spell != null) { value += spell.PropertyBonus(); } value += FocusedEyeSpell.HitChanceBonus(m); value += PlayingTheOddsSpell.HitChanceBonus(m); value += CalledShotSpell.GetHitChanceBonus(m); value += CombatTrainingSpell.GetHitChanceBonus(m); value += MasteryInfo.SavingThrowChance(m, attr); break; case AosAttribute.DefendChance: spell = SkillMasterySpell.GetSpellForParty(m, typeof(PerseveranceSpell)); if (spell != null) { value += spell.PropertyBonus(); } if (Server.Spells.SkillMasteries.WhiteTigerFormSpell.IsActive(m)) { value += 20; } value += MasteryInfo.SavingThrowChance(m, attr); break; case AosAttribute.RegenHits: spell = SkillMasterySpell.GetSpellForParty(m, typeof(ResilienceSpell)); if (spell != null) { value += spell.PropertyBonus(); } break; case AosAttribute.RegenStam: spell = SkillMasterySpell.GetSpellForParty(m, typeof(ResilienceSpell)); if (spell != null) { value += spell.PropertyBonus(); } break; case AosAttribute.RegenMana: spell = SkillMasterySpell.GetSpellForParty(m, typeof(ResilienceSpell)); if (spell != null) { value += spell.PropertyBonus(); } break; case AosAttribute.WeaponDamage: spell = SkillMasterySpell.GetSpellForParty(m, typeof(InspireSpell)); if (spell != null) { value += spell.DamageBonus(); } value += MasteryInfo.SavingThrowChance(m, attr); break; case AosAttribute.SpellDamage: spell = SkillMasterySpell.GetSpellForParty(m, typeof(InspireSpell)); if (spell != null) { value += spell.PropertyBonus(); } break; case AosAttribute.WeaponSpeed: value += RampageSpell.GetBonus(m, RampageSpell.BonusType.SwingSpeed); value += PlayingTheOddsSpell.SwingSpeedBonus(m); value -= StaggerSpell.GetStagger(m); break; case AosAttribute.BonusStr: value += MasteryInfo.SavingThrowChance(m, attr); break; } return(value); }