1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 16:27:43 +08:00

adjust weighting function

This commit is contained in:
TextAdventurer12 2024-04-13 02:43:33 +12:00
parent 9f5f6b5d37
commit b32d73ec9b

View File

@ -80,9 +80,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
public double CountDifficultStrains()
{
double consistentTopStrain = difficulty / 10; // What would the top strain be if all strain values were identical
// Apply a power to nerf diffspikes, but only apply that power if s / adjustedDifficulty is less than 1, to prevent buffing certain spiky maps
return objectStrains.Sum(s => s >= adjustedDifficulty ? s / adjustedDifficulty : Math.Pow(s / adjustedDifficulty, 8));
// Use a weighted sum of all strains. Constants are arbitrary and give nice values
return objectStrains.Sum(s => 1.3 / (1 + Math.Exp(-14.15 * (Math.Pow(s / consistentTopStrain, 2) - 0.945))));
}
}
}