mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 23:22:55 +08:00
add estimated sliderbreaks to performance attributes
This commit is contained in:
parent
ceda902ee6
commit
6ac1067553
@ -27,6 +27,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
[JsonProperty("speed_deviation")]
|
[JsonProperty("speed_deviation")]
|
||||||
public double? SpeedDeviation { get; set; }
|
public double? SpeedDeviation { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("estimated_aim_sliderbreaks")]
|
||||||
|
public double EstimatedAimSliderbreaks { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("estimated_speed_sliderbreaks")]
|
||||||
|
public double EstimatedSpeedSliderbreaks { get; set; }
|
||||||
|
|
||||||
public override IEnumerable<PerformanceDisplayAttribute> GetAttributesForDisplay()
|
public override IEnumerable<PerformanceDisplayAttribute> GetAttributesForDisplay()
|
||||||
{
|
{
|
||||||
foreach (var attribute in base.GetAttributesForDisplay())
|
foreach (var attribute in base.GetAttributesForDisplay())
|
||||||
|
@ -42,6 +42,15 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private double effectiveMissCount;
|
private double effectiveMissCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// estimated number of sliderbreaks from aim difficulty
|
||||||
|
/// </summary>
|
||||||
|
private double estimatedAimSliderbreaks;
|
||||||
|
/// <summary>
|
||||||
|
/// estimated number of sliderbreaks from speed difficulty
|
||||||
|
/// </summary>
|
||||||
|
private double estimatedSpeedSliderbreaks;
|
||||||
|
|
||||||
private double? speedDeviation;
|
private double? speedDeviation;
|
||||||
|
|
||||||
public OsuPerformanceCalculator()
|
public OsuPerformanceCalculator()
|
||||||
@ -93,6 +102,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
|
|
||||||
effectiveMissCount = Math.Max(countMiss, effectiveMissCount);
|
effectiveMissCount = Math.Max(countMiss, effectiveMissCount);
|
||||||
effectiveMissCount = Math.Min(totalHits, effectiveMissCount);
|
effectiveMissCount = Math.Min(totalHits, effectiveMissCount);
|
||||||
|
estimatedAimSliderbreaks = calculateEstimatedSliderbreaks(osuAttributes.AimTopWeightedSliderFactor, osuAttributes);
|
||||||
|
estimatedSpeedSliderbreaks = calculateEstimatedSliderbreaks(osuAttributes.SpeedTopWeightedSliderFactor, osuAttributes);
|
||||||
|
|
||||||
double multiplier = PERFORMANCE_BASE_MULTIPLIER;
|
double multiplier = PERFORMANCE_BASE_MULTIPLIER;
|
||||||
|
|
||||||
@ -137,6 +148,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
Flashlight = flashlightValue,
|
Flashlight = flashlightValue,
|
||||||
EffectiveMissCount = effectiveMissCount,
|
EffectiveMissCount = effectiveMissCount,
|
||||||
SpeedDeviation = speedDeviation,
|
SpeedDeviation = speedDeviation,
|
||||||
|
EstimatedAimSliderbreaks = estimatedAimSliderbreaks,
|
||||||
|
EstimatedSpeedSliderbreaks = estimatedSpeedSliderbreaks,
|
||||||
Total = totalValue
|
Total = totalValue
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -177,8 +190,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
|
|
||||||
if (effectiveMissCount > 0)
|
if (effectiveMissCount > 0)
|
||||||
{
|
{
|
||||||
double estimatedSliderbreaks = calculateEstimatedSliderbreaks(attributes.AimTopWeightedSliderFactor, attributes);
|
aimValue *= calculateMissPenalty(effectiveMissCount + estimatedAimSliderbreaks, attributes.AimDifficultStrainCount);
|
||||||
aimValue *= calculateMissPenalty(effectiveMissCount + estimatedSliderbreaks, attributes.AimDifficultStrainCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double approachRateFactor = 0.0;
|
double approachRateFactor = 0.0;
|
||||||
@ -220,8 +232,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
|
|
||||||
if (effectiveMissCount > 0)
|
if (effectiveMissCount > 0)
|
||||||
{
|
{
|
||||||
double estimatedSliderbreaks = calculateEstimatedSliderbreaks(attributes.SpeedTopWeightedSliderFactor, attributes);
|
speedValue *= calculateMissPenalty(effectiveMissCount + estimatedSpeedSliderbreaks, attributes.SpeedDifficultStrainCount);
|
||||||
speedValue *= calculateMissPenalty(effectiveMissCount + estimatedSliderbreaks, attributes.SpeedDifficultStrainCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double approachRateFactor = 0.0;
|
double approachRateFactor = 0.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user