示例#1
0
文件: Rampage.cs 项目: pallop/Servuo
        public override void OnCast()
        {
            RampageSpell spell = GetSpell(Caster, typeof(RampageSpell)) as RampageSpell;

            if (spell != null)
            {
                spell.Expire();
            }
            else if (CheckSequence())
            {
                Effects.SendTargetParticles(Caster, 0x37CC, 1, 40, 2724, 5, 9907, EffectLayer.LeftFoot, 0);
                Caster.PlaySound(0x101);

                TimeSpan duration = TimeSpan.FromSeconds(60);

                Expires = DateTime.UtcNow + duration;
                BeginTimer();

                AddToTable();
            }

            FinishSequence();
        }
示例#2
0
 public RampageContext(RampageSpell spell)
 {
     Spell = spell;
 }
示例#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);
        }