Change naming of onlyMono to SingleColourStamina

This commit is contained in:
Jay Lawton 2024-10-31 12:12:14 +10:00
parent 21b458d268
commit abe2ee90e0
2 changed files with 8 additions and 8 deletions

View File

@ -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);
}
}

View File

@ -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);