예제 #1
0
        /// <summary>
        /// Calculates the melee critical chance for the class at a specific level, base Agility and added Agility.
        /// TODO: Implement diminishing returns
        /// </summary>
        /// <param name="level">the player's level</param>
        /// <param name="agility">the player's Agility</param>
        /// <returns>the total melee critical chance</returns>
        public float CalculateMeleeCritChance(int level, int agility, int luck)
        {
            float psysicCritChance = CharacterFormulas.CalculatePsysicCritChance(Id, level, luck);

            if (psysicCritChance <= 5.0)
            {
                return(5f);
            }
            return(psysicCritChance);
        }
예제 #2
0
        /// <summary>
        /// Calculates the melee critical chance for the class at a specific level, base Agility and added Agility.
        /// TODO: Implement diminishing returns
        /// </summary>
        /// <param name="level">the player's level</param>
        /// <param name="agility">the player's Agility</param>
        /// <returns>the total melee critical chance</returns>
        public float CalculateMeleeCritChance(int level, int agility, int luck)
        {
            var crit = CharacterFormulas.CalculatePsysicCritChance(Id, level, luck);

            return(crit > 5 ? crit : 5);            // Naked crit is always at least 5%
        }