1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-13 04:57:19 +08:00

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.
This commit is contained in:
Fina 2024-03-21 20:57:33 -07:00 committed by finadoggie
parent a039ee8305
commit 8c1e678b42
No known key found for this signature in database

View File

@ -51,7 +51,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty
usingClassicSliderAccuracy = score.Mods.OfType<OsuModClassic>().Any(m => m.NoSliderHeadAccuracy.Value); usingClassicSliderAccuracy = score.Mods.OfType<OsuModClassic>().Any(m => m.NoSliderHeadAccuracy.Value);
accuracy = score.Accuracy;
scoreMaxCombo = score.MaxCombo; scoreMaxCombo = score.MaxCombo;
countGreat = score.Statistics.GetValueOrDefault(HitResult.Great); countGreat = score.Statistics.GetValueOrDefault(HitResult.Great);
countOk = score.Statistics.GetValueOrDefault(HitResult.Ok); countOk = score.Statistics.GetValueOrDefault(HitResult.Ok);
@ -256,12 +255,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
betterAccuracyPercentage = 0; betterAccuracyPercentage = 0;
// It is possible to reach a negative accuracy with this formula. Cap it at zero - zero points. // It is possible to reach a negative accuracy with this formula. Cap it at zero - zero points.
if (betterAccuracyPercentage < 0) if (accuracy < 0)
betterAccuracyPercentage = 0; accuracy = 0;
// Lots of arbitrary values from testing. // Lots of arbitrary values from testing.
// Considering to use derivation from perfect accuracy in a probabilistic manner - assume normal distribution. // 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. // 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)); accuracyValue *= Math.Min(1.15, Math.Pow(amountHitObjectsWithAccuracy / 1000.0, 0.3));