mirror of https://github.com/ppy/osu
Add mono streak index calculation to strain values
This commit is contained in:
parent
abe2ee90e0
commit
ff05bbd63f
|
@ -18,7 +18,7 @@ public class Stamina : StrainSkill
|
|||
private double skillMultiplier => 1.1;
|
||||
private double strainDecayBase => 0.4;
|
||||
|
||||
private bool singleColourStamina;
|
||||
private readonly bool singleColourStamina;
|
||||
|
||||
private double currentStrain;
|
||||
|
||||
|
@ -40,8 +40,12 @@ protected override double StrainValueAt(DifficultyHitObject current)
|
|||
currentStrain *= strainDecay(current.DeltaTime);
|
||||
currentStrain += StaminaEvaluator.EvaluateDifficultyOf(current) * skillMultiplier;
|
||||
|
||||
// Safely prevents previous strains from shifting as new notes are added.
|
||||
var currentObject = current as TaikoDifficultyHitObject;
|
||||
int index = currentObject?.Colour.MonoStreak?.HitObjects.IndexOf(currentObject) ?? 0;
|
||||
|
||||
if (singleColourStamina)
|
||||
return ((TaikoDifficultyHitObject)current).Colour.MonoStreak?.RunLength >= 16 ? currentStrain : 0;
|
||||
return currentStrain / (1 + Math.Exp(-(index - 10) / 2.0));
|
||||
|
||||
return currentStrain;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue