From 8c1e678b4248d885cef159c90d1c47bed74d98bd Mon Sep 17 00:00:00 2001 From: Fina Date: Thu, 21 Mar 2024 20:57:33 -0700 Subject: [PATCH] Use betterAccuracyPercentage Everywhere Someone brought this up during discussion, and from what I can tell, there's no real reason why this wasn't done either. All this does is use the number of circles instead of the number of objects for accuracy calculations, since circles are the only objects that check for accuracy. Could also be merged with #27063 to use circles + sliders when sliders check for accuracy (aka when classic mod is disabled). Currently the code for that is included but commented out. --- .../Difficulty/OsuPerformanceCalculator.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index ddabf866ff..bbd1016f08 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -51,7 +51,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty usingClassicSliderAccuracy = score.Mods.OfType().Any(m => m.NoSliderHeadAccuracy.Value); - accuracy = score.Accuracy; scoreMaxCombo = score.MaxCombo; countGreat = score.Statistics.GetValueOrDefault(HitResult.Great); countOk = score.Statistics.GetValueOrDefault(HitResult.Ok); @@ -256,12 +255,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty betterAccuracyPercentage = 0; // It is possible to reach a negative accuracy with this formula. Cap it at zero - zero points. - if (betterAccuracyPercentage < 0) - betterAccuracyPercentage = 0; + if (accuracy < 0) + accuracy = 0; // Lots of arbitrary values from testing. // Considering to use derivation from perfect accuracy in a probabilistic manner - assume normal distribution. - double accuracyValue = Math.Pow(1.52163, attributes.OverallDifficulty) * Math.Pow(betterAccuracyPercentage, 24) * 2.83; + double accuracyValue = Math.Pow(1.52163, attributes.OverallDifficulty) * Math.Pow(accuracy, 24) * 2.83; // Bonus for many hitcircles - it's harder to keep good accuracy up for longer. accuracyValue *= Math.Min(1.15, Math.Pow(amountHitObjectsWithAccuracy / 1000.0, 0.3));