예제 #1
0
        public double GetDamageOfDoTTick(StatsGroup stats)
        {
            double critRate            = RatingConversions.GetCritChance(stats.CritRating);
            double critMult            = RatingConversions.GetCritDamageMultiplier(stats.CritRating);
            double directHitRate       = RatingConversions.GetDirectHitChance(stats.DirectHitRating);
            double directHitMult       = RatingConversions.GetDirectHitDamageFactor(stats.DirectHitRating);
            double determinationFactor = RatingConversions.GetDeterminationFactor(stats.Determination);
            double tenacityFactor      = RatingConversions.GetTenacityFactor(stats.Tenacity);
            double speedFactor         = RatingConversions.GetSpeedDoTContribution(stats.SpeedRating);

            bool isCrit      = (rng.NextDouble() < critRate);
            bool isDirectHit = (rng.NextDouble() < directHitRate);

            double damage = 1;

            if (isCrit)
            {
                damage *= critMult;
            }
            if (isDirectHit)
            {
                damage *= directHitMult;
            }
            damage *= determinationFactor;
            damage *= tenacityFactor;
            damage *= speedFactor;
            return(damage);
        }
예제 #2
0
        public static double CalculateDamageFromDoT(StatsGroup stats)
        {
            double critRate            = RatingConversions.GetCritChance(stats.CritRating);
            double critMult            = RatingConversions.GetCritDamageMultiplier(stats.CritRating);
            double speedFactor         = RatingConversions.GetSpeedDoTContribution(stats.SpeedRating);
            double directHitRate       = RatingConversions.GetDirectHitChance(stats.DirectHitRating);
            double determinationFactor = RatingConversions.GetDeterminationFactor(stats.Determination);
            double tenacityFactor      = RatingConversions.GetTenacityFactor(stats.Tenacity);

            return(CalculateDamageFromGCD(critRate, critMult, speedFactor, directHitRate, determinationFactor, tenacityFactor));
        }
        public double GetDamageOfDoTTick(StatsGroup stats)
        {
            double critRate            = RatingConversions.GetCritChance(stats.CritRating);
            double critMult            = RatingConversions.GetCritDamageMultiplier(stats.CritRating);
            double directHitRate       = RatingConversions.GetDirectHitChance(stats.DirectHitRating);
            double speedFactor         = RatingConversions.GetSpeedDoTContribution(stats.SpeedRating);
            double determinationFactor = RatingConversions.GetDeterminationFactor(stats.Determination);
            double tenacityFactor      = RatingConversions.GetTenacityFactor(stats.Tenacity);

            double critFactor      = (1 - critRate) + (critRate * critMult);
            double directHitFactor = (1 - directHitRate) + (directHitRate * 1.25);

            return(critFactor * directHitFactor * determinationFactor * tenacityFactor * speedFactor);
        }