mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Change naming of onlyMono to SingleColourStamina
This commit is contained in:
parent
21b458d268
commit
abe2ee90e0
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
||||
private double skillMultiplier => 1.1;
|
||||
private double strainDecayBase => 0.4;
|
||||
|
||||
private bool onlyMono;
|
||||
private bool singleColourStamina;
|
||||
|
||||
private double currentStrain;
|
||||
|
||||
@ -26,11 +26,11 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
||||
/// Creates a <see cref="Stamina"/> skill.
|
||||
/// </summary>
|
||||
/// <param name="mods">Mods for use in skill calculations.</param>
|
||||
/// <param name="onlyMono">I hate strangeprogram</param>
|
||||
public Stamina(Mod[] mods, bool onlyMono)
|
||||
/// <param name="singleColourStamina">Reads when Stamina is from a single coloured pattern.</param>
|
||||
public Stamina(Mod[] mods, bool singleColourStamina)
|
||||
: base(mods)
|
||||
{
|
||||
this.onlyMono = onlyMono;
|
||||
this.singleColourStamina = singleColourStamina;
|
||||
}
|
||||
|
||||
private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000);
|
||||
@ -40,12 +40,12 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
||||
currentStrain *= strainDecay(current.DeltaTime);
|
||||
currentStrain += StaminaEvaluator.EvaluateDifficultyOf(current) * skillMultiplier;
|
||||
|
||||
if (onlyMono)
|
||||
if (singleColourStamina)
|
||||
return ((TaikoDifficultyHitObject)current).Colour.MonoStreak?.RunLength >= 16 ? currentStrain : 0;
|
||||
|
||||
return currentStrain;
|
||||
}
|
||||
|
||||
protected override double CalculateInitialStrain(double time, DifficultyHitObject current) => onlyMono ? 0 : currentStrain * strainDecay(time - current.Previous(0).StartTime);
|
||||
protected override double CalculateInitialStrain(double time, DifficultyHitObject current) => singleColourStamina ? 0 : currentStrain * strainDecay(time - current.Previous(0).StartTime);
|
||||
}
|
||||
}
|
||||
|
@ -80,12 +80,12 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
|
||||
Colour colour = (Colour)skills.First(x => x is Colour);
|
||||
Rhythm rhythm = (Rhythm)skills.First(x => x is Rhythm);
|
||||
Stamina stamina = (Stamina)skills.First(x => x is Stamina);
|
||||
Stamina staminaMonos = (Stamina)skills.Last(x => x is Stamina);
|
||||
Stamina singleColourStamina = (Stamina)skills.Last(x => x is Stamina);
|
||||
|
||||
double colourRating = colour.DifficultyValue() * colour_skill_multiplier;
|
||||
double rhythmRating = rhythm.DifficultyValue() * rhythm_skill_multiplier;
|
||||
double staminaRating = stamina.DifficultyValue() * stamina_skill_multiplier;
|
||||
double monoStaminaRating = staminaMonos.DifficultyValue() * stamina_skill_multiplier;
|
||||
double monoStaminaRating = singleColourStamina.DifficultyValue() * stamina_skill_multiplier;
|
||||
|
||||
double monoStaminaFactor = Math.Pow(monoStaminaRating / staminaRating, 5);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user