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); }
public double GetDamageOfGCDAttack(StatsGroup stats, out bool isCrit, out bool isDirectHit) { double critRate = RatingConversions.GetCritChance(stats.CritRating); double critMult = RatingConversions.GetCritDamageMultiplier(stats.CritRating); double directHitRate = RatingConversions.GetDirectHitChance(stats.DirectHitRating); double determinationFactor = RatingConversions.GetDeterminationFactor(stats.Determination); double tenacityFactor = RatingConversions.GetTenacityFactor(stats.Tenacity); isCrit = (rng.NextDouble() < critRate); isDirectHit = (rng.NextDouble() < directHitRate); double damage = 1; if (isCrit) { damage *= critMult; } if (isDirectHit) { damage *= RatingConversions.GetDirectHitDamageFactor(stats.DirectHitRating); } damage *= determinationFactor; damage *= tenacityFactor; TotalCrits += isCrit ? 1 : 0; TotalDirectHits += isDirectHit ? 1 : 0; TotalAttacks++; return(damage); }
public static double CalculateDamageFromAbility(StatsGroup stats) { double critRate = RatingConversions.GetCritChance(stats.CritRating); double critMult = RatingConversions.GetCritDamageMultiplier(stats.CritRating); double directHitRate = RatingConversions.GetDirectHitChance(stats.DirectHitRating); double determinationFactor = RatingConversions.GetDeterminationFactor(stats.Determination); double tenacityFactor = RatingConversions.GetTenacityFactor(stats.Tenacity); return(CalculateDamageFromGCD(critRate, critMult, 1.0, directHitRate, determinationFactor, tenacityFactor)); }
public double GetDamageOfGCDAttack(StatsGroup stats) { double critRate = RatingConversions.GetCritChance(stats.CritRating); double critMult = RatingConversions.GetCritDamageMultiplier(stats.CritRating); double directHitRate = RatingConversions.GetDirectHitChance(stats.DirectHitRating); 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); }
private static void PrintInfo() { Console.WriteLine($"Crit Chance: {RatingConversions.GetCritChance(CurrentStats.CritRating) * 100:0.0}%"); Console.WriteLine($"Crit Mult: {RatingConversions.GetCritDamageMultiplier(CurrentStats.CritRating) * 100:0.0}%"); Console.WriteLine($"DH Chance: {RatingConversions.GetDirectHitChance(CurrentStats.DirectHitRating) * 100:0.0}%"); Console.WriteLine($"GCD: {2.5 / RatingConversions.GetSpeedFactor(CurrentStats.SpeedRating):0.00}"); Console.WriteLine($"Ten/Det Mult: {RatingConversions.GetDeterminationFactor(CurrentStats.Determination) * RatingConversions.GetTenacityFactor(CurrentStats.Tenacity):0.00}"); Console.WriteLine(); Console.ReadKey(true); }