1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 18:52:57 +08:00

add visual adjust for skill pp

This commit is contained in:
Givikap120 2024-11-18 02:14:05 +02:00
parent ac305423f4
commit 3cae490e8d

View File

@ -123,7 +123,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
performanceAttributes.Total *= multiplier;
return performanceAttributes;
return visualAdjust(performanceAttributes);
}
// Internal function
@ -182,6 +182,20 @@ namespace osu.Game.Rulesets.Osu.Difficulty
};
}
private OsuPerformanceAttributes visualAdjust(OsuPerformanceAttributes attributes)
{
double sum = attributes.Aim + attributes.Speed + attributes.Accuracy + attributes.Flashlight + attributes.Reading;
double multiplier = attributes.Total / sum;
attributes.Aim *= multiplier;
attributes.Speed *= multiplier;
attributes.Accuracy *= multiplier;
attributes.Flashlight *= multiplier;
attributes.Reading *= multiplier;
return attributes;
}
public static double CalculateDefaultLengthBonus(int objectsCount) => 0.95 + 0.4 * Math.Min(1.0, objectsCount / 2000.0) + (objectsCount > 2000 ? Math.Log10(objectsCount / 2000.0) * 0.5 : 0.0);
private double computeAimValue(ScoreInfo score, OsuDifficultyAttributes attributes)