mirror of
https://github.com/ppy/osu.git
synced 2025-01-10 01:12:56 +08: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 skillMultiplier => 1.1;
|
||||||
private double strainDecayBase => 0.4;
|
private double strainDecayBase => 0.4;
|
||||||
|
|
||||||
private bool onlyMono;
|
private bool singleColourStamina;
|
||||||
|
|
||||||
private double currentStrain;
|
private double currentStrain;
|
||||||
|
|
||||||
@ -26,11 +26,11 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
|||||||
/// Creates a <see cref="Stamina"/> skill.
|
/// Creates a <see cref="Stamina"/> skill.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mods">Mods for use in skill calculations.</param>
|
/// <param name="mods">Mods for use in skill calculations.</param>
|
||||||
/// <param name="onlyMono">I hate strangeprogram</param>
|
/// <param name="singleColourStamina">Reads when Stamina is from a single coloured pattern.</param>
|
||||||
public Stamina(Mod[] mods, bool onlyMono)
|
public Stamina(Mod[] mods, bool singleColourStamina)
|
||||||
: base(mods)
|
: base(mods)
|
||||||
{
|
{
|
||||||
this.onlyMono = onlyMono;
|
this.singleColourStamina = singleColourStamina;
|
||||||
}
|
}
|
||||||
|
|
||||||
private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000);
|
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 *= strainDecay(current.DeltaTime);
|
||||||
currentStrain += StaminaEvaluator.EvaluateDifficultyOf(current) * skillMultiplier;
|
currentStrain += StaminaEvaluator.EvaluateDifficultyOf(current) * skillMultiplier;
|
||||||
|
|
||||||
if (onlyMono)
|
if (singleColourStamina)
|
||||||
return ((TaikoDifficultyHitObject)current).Colour.MonoStreak?.RunLength >= 16 ? currentStrain : 0;
|
return ((TaikoDifficultyHitObject)current).Colour.MonoStreak?.RunLength >= 16 ? currentStrain : 0;
|
||||||
|
|
||||||
return currentStrain;
|
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);
|
Colour colour = (Colour)skills.First(x => x is Colour);
|
||||||
Rhythm rhythm = (Rhythm)skills.First(x => x is Rhythm);
|
Rhythm rhythm = (Rhythm)skills.First(x => x is Rhythm);
|
||||||
Stamina stamina = (Stamina)skills.First(x => x is Stamina);
|
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 colourRating = colour.DifficultyValue() * colour_skill_multiplier;
|
||||||
double rhythmRating = rhythm.DifficultyValue() * rhythm_skill_multiplier;
|
double rhythmRating = rhythm.DifficultyValue() * rhythm_skill_multiplier;
|
||||||
double staminaRating = stamina.DifficultyValue() * stamina_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);
|
double monoStaminaFactor = Math.Pow(monoStaminaRating / staminaRating, 5);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user