// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Rulesets.Difficulty.Skills; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Taiko.Difficulty.Evaluators; using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing; using osu.Game.Rulesets.Taiko.Objects; namespace osu.Game.Rulesets.Taiko.Difficulty.Skills { /// /// Calculates the reading coefficient of taiko difficulty. /// public class Reading : StrainDecaySkill { protected override double SkillMultiplier => 1.0; protected override double StrainDecayBase => 0.4; private double currentStrain; public Reading(Mod[] mods) : base(mods) { } protected override double StrainValueOf(DifficultyHitObject current) { // Drum Rolls and Swells are exempt. if (current.BaseObject is not Hit) { return 0.0; } var taikoObject = (TaikoDifficultyHitObject)current; currentStrain *= StrainDecayBase; currentStrain += ReadingEvaluator.EvaluateDifficultyOf(taikoObject) * SkillMultiplier; return currentStrain; } } }