Пример #1
0
        private static int CalculateCombatStat(int classBaseValue, int firstAbilityStat, int secondAbilityStat, int thirdAbilityStat, int characterLevel)
        {
            AbilityStat a = new AbilityStat();

            int[] abilityStats = { firstAbilityStat, secondAbilityStat, thirdAbilityStat };
            Array.Sort(abilityStats);
            int combatStat = classBaseValue + a.CalculateModifierWithLevel(abilityStats[1], characterLevel);

            return(combatStat);
        }
        public int CalculateHitPoints(int constitution, int characterLevel)
        {
            AbilityStat a = Factory.CreateAbilityStat();

            // TODO: Add lookup for base value and multiplier for Hit Points
            int baseValue       = 6;                  // default value for sorcerer - will need to look up against class
            int levelMultiplier = characterLevel + 2; // Only correct up to level 4 - will need to look up against class and level
            int hitPoints       = (baseValue + a.CalculateModifier(constitution)) * levelMultiplier;

            return(hitPoints);
        }