Esempio n. 1
0
        public HealthPoint Recover(HealthPoint inc, MaxHealthPoint max)
        {
            var refHp = max.MaxHealth;
            int after = Math.Min(refHp.value, value + inc.value);

            return(new HealthPoint(after));
        }
Esempio n. 2
0
        public HealthPoint Reduce(HealthPoint down)
        {
            int newerValue = Math.Max(0, value - down.value);

            return(new HealthPoint(newerValue));
        }