mirror of
https://github.com/ppy/osu.git
synced 2024-11-16 10:17:36 +08:00
Remove abusable 0.66 threshold by averaging
This commit is contained in:
commit
391110ca5a
@ -25,10 +25,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
public double SliderFactor { get; set; }
|
public double SliderFactor { get; set; }
|
||||||
|
|
||||||
[JsonProperty("aim_difficult_strain_count")]
|
[JsonProperty("aim_difficult_strain_count")]
|
||||||
public int AimDifficultStrainCount { get; set; }
|
public double AimDifficultStrainCount { get; set; }
|
||||||
|
|
||||||
[JsonProperty("speed_difficult_strain_count")]
|
[JsonProperty("speed_difficult_strain_count")]
|
||||||
public int SpeedDifficultStrainCount { get; set; }
|
public double SpeedDifficultStrainCount { get; set; }
|
||||||
|
|
||||||
[JsonProperty("approach_rate")]
|
[JsonProperty("approach_rate")]
|
||||||
public double ApproachRate { get; set; }
|
public double ApproachRate { get; set; }
|
||||||
|
@ -40,8 +40,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
|
|
||||||
double sliderFactor = aimRating > 0 ? aimRatingNoSliders / aimRating : 1;
|
double sliderFactor = aimRating > 0 ? aimRatingNoSliders / aimRating : 1;
|
||||||
|
|
||||||
int aimDifficultyStrainCount = ((OsuStrainSkill)skills[0]).CountDifficultStrains(clockRate);
|
double aimDifficultyStrainCount = ((OsuStrainSkill)skills[0]).CountDifficultStrains(clockRate);
|
||||||
int speedDifficultyStrainCount = ((OsuStrainSkill)skills[2]).CountDifficultStrains(clockRate);
|
double speedDifficultyStrainCount = ((OsuStrainSkill)skills[2]).CountDifficultStrains(clockRate);
|
||||||
|
|
||||||
if (mods.Any(h => h is OsuModRelax))
|
if (mods.Any(h => h is OsuModRelax))
|
||||||
speedRating = 0.0;
|
speedRating = 0.0;
|
||||||
|
@ -59,15 +59,15 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the number of difficult strains.
|
/// Returns the number of strains above a threshold averaged as the threshold varies.
|
||||||
/// A strain is considered difficult if it's higher than 66% of the highest strain.
|
/// The result is scaled by clock rate as it affects the total number of strains.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int CountDifficultStrains(double clockRate)
|
public double CountDifficultStrains(double clockRate)
|
||||||
{
|
{
|
||||||
List<double> strains = GetCurrentStrainPeaks().OrderByDescending(d => d).ToList();
|
List<double> strains = GetCurrentStrainPeaks().ToList();
|
||||||
|
// This is the average value of strains.Count(s => s > p * strains.Max()) for p between 0 and 1.
|
||||||
// Total number of strains in a map can vary by clockrate, and this needs to be corrected for.
|
double realtimeCount = strains.Sum() / strains.Max();
|
||||||
return (int)(strains.Count(s => s > strains[0] * 0.66) * clockRate);
|
return clockRate * realtimeCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user