From abe2ee90e0b8836a0339e2d55d3d1f2d1b60a421 Mon Sep 17 00:00:00 2001 From: Jay Lawton Date: Thu, 31 Oct 2024 12:12:14 +1000 Subject: [PATCH] Change naming of onlyMono to SingleColourStamina --- osu.Game.Rulesets.Taiko/Difficulty/Skills/Stamina.cs | 12 ++++++------ .../Difficulty/TaikoDifficultyCalculator.cs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Difficulty/Skills/Stamina.cs b/osu.Game.Rulesets.Taiko/Difficulty/Skills/Stamina.cs index 38ae7bd2ca..7d259becb1 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/Skills/Stamina.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/Skills/Stamina.cs @@ -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 skill. /// /// Mods for use in skill calculations. - /// I hate strangeprogram - public Stamina(Mod[] mods, bool onlyMono) + /// Reads when Stamina is from a single coloured pattern. + 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); } } diff --git a/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs b/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs index 5ff8f2f31a..2dca44fb76 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs @@ -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);