Ejemplo n.º 1
0
        public override void OnThink()
        {
            base.OnThink();

            if (Combatant == null)
            {
                return;
            }

            if (_NextMastery < DateTime.UtcNow)
            {
                if (SkillMasterySpell.HasSpell(this, typeof(RampageSpell)) || Utility.RandomDouble() > 0.5)
                {
                    SpecialMove.SetCurrentMove(this, SpellRegistry.GetSpecialMove(740));
                }
                else
                {
                    SkillMasterySpell spell = new RampageSpell(this, null);
                    spell.Cast();
                }

                _NextMastery = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(45, 70));
            }

            if (_NextSpecial < DateTime.UtcNow)
            {
                DoSpecial();
                _NextSpecial = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(45, 60));
            }
        }
Ejemplo n.º 2
0
        private static TimeSpan Mobile_StamRegenRate(Mobile from)
        {
            if (from.Skills == null)
            {
                return(Mobile.DefaultStamRate);
            }

            CheckBonusSkill(from, from.Stam, from.StamMax, SkillName.Focus);

            int points = (int)(from.Skills[SkillName.Focus].Value * 0.1);

            if (from is BaseCreature)
            {
                if (((BaseCreature)from).IsParagon || from is Leviathan)
                {
                    points += 40;
                }

                // Skill Masteries
                points += MasteryInfo.EnchantedSummoningBonus((BaseCreature)from);
            }

            int cappedPoints = AosAttributes.GetValue(from, AosAttribute.RegenStam);

            if (CheckTransform(from, typeof(VampiricEmbraceSpell)))
            {
                cappedPoints += 15;
            }

            if (CheckAnimal(from, typeof(Kirin)))
            {
                cappedPoints += 20;
            }

            if (Core.ML && from is PlayerMobile)
            {
                cappedPoints = Math.Min(cappedPoints, 24);
            }

            points += cappedPoints;

            // Skill Masteries
            points += RampageSpell.GetBonus(from, RampageSpell.BonusType.StamRegen); // After the cap???

            if (points < -1)
            {
                points = -1;
            }

            if (Core.AOS)
            {
                foreach (RegenBonusHandler handler in StamBonusHandlers)
                {
                    points += handler(from);
                }
            }

            return(TimeSpan.FromSeconds(1.0 / (0.1 * (2 + points))));
        }
Ejemplo n.º 3
0
        public static double HitPointRegen(Mobile from)
        {
            double points = AosAttributes.GetValue(from, AosAttribute.RegenHits);

            if (from is BaseCreature)
            {
                points += ((BaseCreature)from).DefaultHitsRegen;
            }

            if (Core.ML && from is PlayerMobile && from.Race == Race.Human)     //Is this affected by the cap?
            {
                points += 2;
            }

            if (points < 0)
            {
                points = 0;
            }

            if (Core.ML && from is PlayerMobile)        //does racial bonus go before/after?
            {
                points = Math.Min(points, 18);
            }

            if (CheckTransform(from, typeof(HorrificBeastSpell)))
            {
                points += 20;
            }

            if (CheckAnimal(from, typeof(Dog)) || CheckAnimal(from, typeof(Cat)))
            {
                points += from.Skills[SkillName.Ninjitsu].Fixed / 30;
            }

            // Skill Masteries - goes after cap
            points += RampageSpell.GetBonus(from, RampageSpell.BonusType.HitPointRegen);
            points += CombatTrainingSpell.RegenBonus(from);
            points += BarrabHemolymphConcentrate.HPRegenBonus(from);

            if (Core.AOS)
            {
                foreach (RegenBonusHandler handler in HitsBonusHandlers)
                {
                    points += handler(from);
                }
            }

            return(points);
        }
Ejemplo n.º 4
0
        public static double StamRegen(Mobile from)
        {
            double points = AosAttributes.GetValue(from, AosAttribute.RegenStam);

            if (from is BaseCreature)
            {
                points += ((BaseCreature)from).DefaultStamRegen;
            }

            if (CheckTransform(from, typeof(VampiricEmbraceSpell)))
            {
                points += 15;
            }

            if (CheckAnimal(from, typeof(Kirin)))
            {
                points += 20;
            }

            if (Core.ML && from is PlayerMobile)
            {
                points = Math.Min(points, 24);
            }

            // Skill Masteries - goes after cap
            points += RampageSpell.GetBonus(from, RampageSpell.BonusType.StamRegen);

            if (points < -1)
            {
                points = -1;
            }

            if (Core.AOS)
            {
                foreach (RegenBonusHandler handler in StamBonusHandlers)
                {
                    points += handler(from);
                }
            }

            return(points);
        }
Ejemplo n.º 5
0
        public static double StamRegen(Mobile from)
        {
            double points = AosAttributes.GetValue(from, AosAttribute.RegenStam);

            if (from is BaseCreature creature)
            {
                points += creature.DefaultStamRegen;
            }

            if (CheckTransform(from, typeof(VampiricEmbraceSpell)))
            {
                points += 15;
            }

            if (CheckAnimal(from, typeof(Kirin)))
            {
                points += 20;
            }

            if (from is PlayerMobile)
            {
                points = Math.Min(points, 24);
            }

            // Skill Masteries - goes after cap
            points += RampageSpell.GetBonus(from, RampageSpell.BonusType.StamRegen);

            if (points < -1)
            {
                points = -1;
            }

            for (var index = 0; index < StamBonusHandlers.Count; index++)
            {
                RegenBonusHandler handler = StamBonusHandlers[index];

                points += handler(from);
            }

            return(points);
        }
Ejemplo n.º 6
0
        private static TimeSpan Mobile_HitsRegenRate(Mobile from)
        {
            int points = AosAttributes.GetValue(from, AosAttribute.RegenHits);

            if (from is BaseCreature && !((BaseCreature)from).IsAnimatedDead)
            {
                points += 4;
            }

            if ((from is BaseCreature && ((BaseCreature)from).IsParagon) || from is Leviathan)
            {
                points += 40;
            }

            if (Core.ML && from.Race == Race.Human)     //Is this affected by the cap?
            {
                points += 2;
            }

            if (points < 0)
            {
                points = 0;
            }

            if (Core.ML && from is PlayerMobile)        //does racial bonus go before/after?
            {
                points = Math.Min(points, 18);
            }

            if (CheckTransform(from, typeof(HorrificBeastSpell)))
            {
                points += 20;
            }

            if (from is BaseCreature && ((BaseCreature)from).HumilityBuff > 0)
            {
                switch (((BaseCreature)@from).HumilityBuff)
                {
                case 1:
                    points += 10;
                    break;

                case 2:
                    points += 20;
                    break;

                case 3:
                    points += 30;
                    break;
                }
            }

            if (CheckAnimal(from, typeof(Dog)) || CheckAnimal(from, typeof(Cat)))
            {
                points += from.Skills[SkillName.Ninjitsu].Fixed / 30;
            }

            // Skill Masteries
            points += RampageSpell.GetBonus(from, RampageSpell.BonusType.HitPointRegen);
            points += CombatTrainingSpell.RegenBonus(from);
            points += BarrabHemolymphConcentrate.HPRegenBonus(from);

            if (Core.AOS)
            {
                foreach (RegenBonusHandler handler in HitsBonusHandlers)
                {
                    points += handler(from);
                }
            }

            return(TimeSpan.FromSeconds(1.0 / (0.1 * (1 + points))));
        }