RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

hit point regeneration

Two Wolves

Knight
I've been searching all through PlayerMobile and can not find, what is the formula that determines natural hit point regeneration, what is the amount of increased hit point regeneration from the human racial trait.

Thanks in advance.
 

Rhivan

Sorceror
Its in the RunUO/Scripts/Misc/RegenRates.cs

Code:
                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 ( CheckAnimal( from, typeof( Dog ) ) || CheckAnimal( from, typeof( Cat ) ) )
                points += from.Skills[SkillName.Ninjitsu].Fixed / 30;

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

Two Wolves

Knight
The way I read this, it says players have natural HPR of 18 or 20 for humans. If one point of HPR is worth 0.1 points per second, 20 HPR gives 2 HP per second regardless of strength or health attributes. That's what I needed to know.
 
Top