1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-08 07:02:54 +08:00

more convenient FL vs reading separation

This commit is contained in:
Givikap120 2024-08-29 20:56:55 +03:00
parent 74f24b0c71
commit 30fe7a87a1
2 changed files with 15 additions and 1 deletions

View File

@ -18,6 +18,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty
[JsonProperty("accuracy")]
public double Accuracy { get; set; }
[JsonProperty("flashlight")]
public double Flashlight { get; set; }
[JsonProperty("cognition")]
public double Cognition { get; set; }

View File

@ -100,12 +100,23 @@ namespace osu.Game.Rulesets.Osu.Difficulty
(Math.Pow(Math.Pow(mechanicalValue, power) + Math.Pow(accuracyValue, power), 1.0 / power)
+ cognitionValue) * multiplier;
// Fancy stuff for better visual display of FL pp
double flashlightPortion = Math.Pow(flashlightValue, flPower) / Math.Pow(flashlightARValue, flPower);
double flashlightARPortion = flashlightARValue / (flashlightARValue + readingHDValue);
// Filter reading difficulty out of FL
double visualFlashlightValue = cognitionValue * flashlightARPortion * flashlightPortion;
// Calculate reading difficulty as there was no FL in the first place
double visualCognitionValue = AdjustCognitionPerformance(readingARValue + readingHDValue, mechanicalValue, potentialHiddenFlashlightValue);
return new OsuPerformanceAttributes
{
Aim = aimValue,
Speed = speedValue,
Accuracy = accuracyValue,
Cognition = cognitionValue,
Flashlight = visualFlashlightValue,
Cognition = visualCognitionValue,
EffectiveMissCount = effectiveMissCount,
Total = totalValue
};