Ejemplo n.º 1
0
        public static int GetHitChanceBonus(Mobile m)
        {
            CalledShotSpell spell = GetSpell(m, typeof(CalledShotSpell)) as CalledShotSpell;

            if (spell != null)
            {
                return(spell._HCIBonus);
            }

            return(0);
        }
Ejemplo n.º 2
0
        public override bool CheckCast()
        {
            if (IsInCooldown(Caster, this.GetType()))
            {
                return(false);
            }

            if (!CheckWeapon())
            {
                Caster.SendLocalizedMessage(1156016); // You must have a throwing weapon equipped to use this ability.
                return(false);
            }

            CalledShotSpell spell = GetSpell(Caster, this.GetType()) as CalledShotSpell;

            if (spell != null)
            {
                spell.Expire();
                return(false);
            }

            return(base.CheckCast());
        }
Ejemplo n.º 3
0
        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);
        }