From 63444c9939463175ac6ad27ad1c680a04f0dbf66 Mon Sep 17 00:00:00 2001 From: Givikap120 Date: Sun, 17 Nov 2024 20:38:43 +0200 Subject: [PATCH] Update Skill.cs --- osu.Game/Rulesets/Difficulty/Skills/Skill.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game/Rulesets/Difficulty/Skills/Skill.cs b/osu.Game/Rulesets/Difficulty/Skills/Skill.cs index 0b1809b21c..6b48fa041f 100644 --- a/osu.Game/Rulesets/Difficulty/Skills/Skill.cs +++ b/osu.Game/Rulesets/Difficulty/Skills/Skill.cs @@ -52,6 +52,10 @@ namespace osu.Game.Rulesets.Difficulty.Skills return 0.0; double consistentTopStrain = DifficultyValue() / 10; // What would the top strain be if all strain values were identical + + if (consistentTopStrain == 0) + return ObjectStrains.Count; + // 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)))); }