introduce effective misscount, accuracy rescale

This commit is contained in:
Jay L 2022-08-19 22:57:28 +10:00
parent c02990ad67
commit fea31cc895
1 changed files with 18 additions and 7 deletions

View File

@ -21,6 +21,8 @@ public class TaikoPerformanceCalculator : PerformanceCalculator
private int countMeh;
private int countMiss;
private double effectiveMissCount;
public TaikoPerformanceCalculator()
: base(new TaikoRuleset())
{
@ -35,7 +37,10 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
countMeh = score.Statistics.GetValueOrDefault(HitResult.Meh);
countMiss = score.Statistics.GetValueOrDefault(HitResult.Miss);
double multiplier = 1.12; // This is being adjusted to keep the final pp value scaled around what it used to be when changing things
// The effectiveMissCount is calculated by gaining a ratio for totalSuccessfulHits and increasing the misspenalty for shorter object counts lower than 1000, past 1000 is 1:1.
effectiveMissCount = Math.Max(1.0, 1000.0 / totalSuccessfulHits) * countMiss;
double multiplier = 1.13;
if (score.Mods.Any(m => m is ModHidden))
multiplier *= 1.075;
@ -55,6 +60,7 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
{
Difficulty = difficultyValue,
Accuracy = accuracyValue,
EffectiveMissCount = effectiveMissCount,
Total = totalValue
};
}
@ -66,18 +72,21 @@ private double computeDifficultyValue(ScoreInfo score, TaikoDifficultyAttributes
double lengthBonus = 1 + 0.1 * Math.Min(1.0, totalHits / 1500.0);
difficultyValue *= lengthBonus;
difficultyValue *= Math.Pow(0.986, countMiss);
difficultyValue *= Math.Pow(0.986, effectiveMissCount);
if (score.Mods.Any(m => m is ModEasy))
difficultyValue *= 0.980;
difficultyValue *= 0.985;
if (score.Mods.Any(m => m is ModHidden))
difficultyValue *= 1.025;
if (score.Mods.Any(m => m is ModHardRock))
difficultyValue *= 1.050;
if (score.Mods.Any(m => m is ModFlashlight<TaikoHitObject>))
difficultyValue *= 1.05 * lengthBonus;
return difficultyValue * Math.Pow(score.Accuracy, 1.5);
return difficultyValue * Math.Pow(score.Accuracy, 2.0);
}
private double computeAccuracyValue(ScoreInfo score, TaikoDifficultyAttributes attributes)
@ -85,18 +94,20 @@ private double computeAccuracyValue(ScoreInfo score, TaikoDifficultyAttributes a
if (attributes.GreatHitWindow <= 0)
return 0;
double accuracyValue = Math.Pow(140.0 / attributes.GreatHitWindow, 1.1) * Math.Pow(score.Accuracy, 12.0) * 27;
double accuracyValue = Math.Pow(60.0 / attributes.GreatHitWindow, 1.1) * Math.Pow(score.Accuracy, 8.0) * Math.Pow(attributes.StarRating, 0.4) * 27.0;
double lengthBonus = Math.Min(1.15, Math.Pow(totalHits / 1500.0, 0.3));
accuracyValue *= lengthBonus;
// Slight HDFL Bonus for accuracy.
// Slight HDFL Bonus for accuracy. A clamp is used to prevent against negative values
if (score.Mods.Any(m => m is ModFlashlight<TaikoHitObject>) && score.Mods.Any(m => m is ModHidden))
accuracyValue *= 1.10 * lengthBonus;
accuracyValue *= Math.Max(1.050, 1.075 * lengthBonus);
return accuracyValue;
}
private int totalHits => countGreat + countOk + countMeh + countMiss;
private int totalSuccessfulHits => countGreat + countOk + countMeh;
}
}