diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs index 918e702b45..beaf1d1288 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs @@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills protected virtual double DifficultyMultiplier => DEFAULT_DIFFICULTY_MULTIPLIER; protected List objectStrains = new List(); + protected double difficulty; protected OsuStrainSkill(Mod[] mods) : base(mods) @@ -45,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills public override double DifficultyValue() { - double difficulty = 0; + difficulty = 0; double weight = 1; // Sections with 0 strain are excluded to avoid worst-case time complexity of the following sort (e.g. /b/2351871). @@ -78,9 +79,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills /// public double CountDifficultStrains() { - double topStrain = objectStrains.Max(); - - return objectStrains.Sum(s => Math.Pow(s / topStrain, 4)); + double consistentTopStrain = difficulty / 10; // What would the top strain be if all strain values were identical + // Use a weighted sum of all strains. Constants are arbitrary and give nice values + return objectStrains.Sum(s => 1.1 / (1 + Math.Exp(-10 * (s / consistentTopStrain - 0.88)))); } } -} +} \ No newline at end of file