mirror of
https://github.com/ppy/osu.git
synced 2024-12-19 00:32:58 +08:00
Merge pull request #7 from TextAdventurer12/no-combo-scaling
Fix adding a diffspike reducing PP
This commit is contained in:
commit
1d19bd2e34
@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
protected virtual double DifficultyMultiplier => DEFAULT_DIFFICULTY_MULTIPLIER;
|
protected virtual double DifficultyMultiplier => DEFAULT_DIFFICULTY_MULTIPLIER;
|
||||||
|
|
||||||
protected List<double> objectStrains = new List<double>();
|
protected List<double> objectStrains = new List<double>();
|
||||||
|
protected double difficulty;
|
||||||
|
|
||||||
protected OsuStrainSkill(Mod[] mods)
|
protected OsuStrainSkill(Mod[] mods)
|
||||||
: base(mods)
|
: base(mods)
|
||||||
@ -45,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
|
|
||||||
public override double DifficultyValue()
|
public override double DifficultyValue()
|
||||||
{
|
{
|
||||||
double difficulty = 0;
|
difficulty = 0;
|
||||||
double weight = 1;
|
double weight = 1;
|
||||||
|
|
||||||
// Sections with 0 strain are excluded to avoid worst-case time complexity of the following sort (e.g. /b/2351871).
|
// 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
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public double CountDifficultStrains()
|
public double CountDifficultStrains()
|
||||||
{
|
{
|
||||||
double topStrain = objectStrains.Max();
|
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 => Math.Pow(s / topStrain, 4));
|
return objectStrains.Sum(s => 1.1 / (1 + Math.Exp(-10 * (s / consistentTopStrain - 0.88))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user