diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs index 51842f65d5..7ab4232a19 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs @@ -25,10 +25,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty public double SliderFactor { get; set; } [JsonProperty("aim_difficult_strain_count")] - public int AimDifficultStrainCount { get; set; } + public double AimDifficultStrainCount { get; set; } [JsonProperty("speed_difficult_strain_count")] - public int SpeedDifficultStrainCount { get; set; } + public double SpeedDifficultStrainCount { get; set; } [JsonProperty("approach_rate")] public double ApproachRate { get; set; } diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs index 27d97e9d75..3c039c9b7e 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs @@ -40,8 +40,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty double sliderFactor = aimRating > 0 ? aimRatingNoSliders / aimRating : 1; - int aimDifficultyStrainCount = ((OsuStrainSkill)skills[0]).CountDifficultStrains(clockRate); - int speedDifficultyStrainCount = ((OsuStrainSkill)skills[2]).CountDifficultStrains(clockRate); + double aimDifficultyStrainCount = ((OsuStrainSkill)skills[0]).CountDifficultStrains(clockRate); + double speedDifficultyStrainCount = ((OsuStrainSkill)skills[2]).CountDifficultStrains(clockRate); if (mods.Any(h => h is OsuModRelax)) speedRating = 0.0; diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs index 1513befad5..46dc9c683b 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs @@ -62,12 +62,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills /// Returns the number of strains above a threshold averaged as the threshold varies. /// The result is scaled by clock rate as it affects the total number of strains. /// - public int CountDifficultStrains(double clockRate) + public double CountDifficultStrains(double clockRate) { List strains = GetCurrentStrainPeaks().ToList(); // This is the average value of strains.Count(s => s > p * strains.Max()) for p between 0 and 1. double realtimeCount = strains.Sum() / strains.Max(); - return (int)(clockRate * realtimeCount); + return clockRate * realtimeCount; } } }