Example #1
0
        public static double ManaRegen(Mobile from)
        {
            double points = AosAttributes.GetValue(from, AosAttribute.RegenMana);

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

            if (CheckTransform(from, typeof(VampiricEmbraceSpell)))
            {
                points += 3;
            }
            else if (CheckTransform(from, typeof(LichFormSpell)))
            {
                points += 13;
            }

            if (from is PlayerMobile && from.Race == Race.Gargoyle)
            {
                points += 2;
            }

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

                points += handler(from);
            }

            return(points);
        }
Example #2
0
        public static double HitPointRegen(Mobile from)
        {
            double points = AosAttributes.GetValue(from, AosAttribute.RegenHits);

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

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

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

            if (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);

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

                points += handler(from);
            }

            return(points);
        }
Example #3
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);
        }