mirror of
https://github.com/ppy/osu.git
synced 2025-02-08 09:42:55 +08:00
more convenient FL vs reading separation
This commit is contained in:
parent
74f24b0c71
commit
30fe7a87a1
@ -18,6 +18,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
[JsonProperty("accuracy")]
|
[JsonProperty("accuracy")]
|
||||||
public double Accuracy { get; set; }
|
public double Accuracy { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("flashlight")]
|
||||||
|
public double Flashlight { get; set; }
|
||||||
|
|
||||||
[JsonProperty("cognition")]
|
[JsonProperty("cognition")]
|
||||||
public double Cognition { get; set; }
|
public double Cognition { get; set; }
|
||||||
|
|
||||||
|
@ -100,12 +100,23 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
(Math.Pow(Math.Pow(mechanicalValue, power) + Math.Pow(accuracyValue, power), 1.0 / power)
|
(Math.Pow(Math.Pow(mechanicalValue, power) + Math.Pow(accuracyValue, power), 1.0 / power)
|
||||||
+ cognitionValue) * multiplier;
|
+ 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
|
return new OsuPerformanceAttributes
|
||||||
{
|
{
|
||||||
Aim = aimValue,
|
Aim = aimValue,
|
||||||
Speed = speedValue,
|
Speed = speedValue,
|
||||||
Accuracy = accuracyValue,
|
Accuracy = accuracyValue,
|
||||||
Cognition = cognitionValue,
|
Flashlight = visualFlashlightValue,
|
||||||
|
Cognition = visualCognitionValue,
|
||||||
EffectiveMissCount = effectiveMissCount,
|
EffectiveMissCount = effectiveMissCount,
|
||||||
Total = totalValue
|
Total = totalValue
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user