mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 02:03:01 +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")]
|
||||
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()
|
||||
{
|
||||
foreach (var attribute in base.GetAttributesForDisplay())
|
||||
|
@ -42,6 +42,15 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
public OsuPerformanceCalculator()
|
||||
@ -93,6 +102,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
|
||||
effectiveMissCount = Math.Max(countMiss, effectiveMissCount);
|
||||
effectiveMissCount = Math.Min(totalHits, effectiveMissCount);
|
||||
estimatedAimSliderbreaks = calculateEstimatedSliderbreaks(osuAttributes.AimTopWeightedSliderFactor, osuAttributes);
|
||||
estimatedSpeedSliderbreaks = calculateEstimatedSliderbreaks(osuAttributes.SpeedTopWeightedSliderFactor, osuAttributes);
|
||||
|
||||
double multiplier = PERFORMANCE_BASE_MULTIPLIER;
|
||||
|
||||
@ -137,6 +148,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
Flashlight = flashlightValue,
|
||||
EffectiveMissCount = effectiveMissCount,
|
||||
SpeedDeviation = speedDeviation,
|
||||
EstimatedAimSliderbreaks = estimatedAimSliderbreaks,
|
||||
EstimatedSpeedSliderbreaks = estimatedSpeedSliderbreaks,
|
||||
Total = totalValue
|
||||
};
|
||||
}
|
||||
@ -177,8 +190,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
|
||||
if (effectiveMissCount > 0)
|
||||
{
|
||||
double estimatedSliderbreaks = calculateEstimatedSliderbreaks(attributes.AimTopWeightedSliderFactor, attributes);
|
||||
aimValue *= calculateMissPenalty(effectiveMissCount + estimatedSliderbreaks, attributes.AimDifficultStrainCount);
|
||||
aimValue *= calculateMissPenalty(effectiveMissCount + estimatedAimSliderbreaks, attributes.AimDifficultStrainCount);
|
||||
}
|
||||
|
||||
double approachRateFactor = 0.0;
|
||||
@ -220,8 +232,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
|
||||
if (effectiveMissCount > 0)
|
||||
{
|
||||
double estimatedSliderbreaks = calculateEstimatedSliderbreaks(attributes.SpeedTopWeightedSliderFactor, attributes);
|
||||
speedValue *= calculateMissPenalty(effectiveMissCount + estimatedSliderbreaks, attributes.SpeedDifficultStrainCount);
|
||||
speedValue *= calculateMissPenalty(effectiveMissCount + estimatedSpeedSliderbreaks, attributes.SpeedDifficultStrainCount);
|
||||
}
|
||||
|
||||
double approachRateFactor = 0.0;
|
||||
|
Loading…
Reference in New Issue
Block a user