mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 15:52:55 +08:00
45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Calculates the reading coefficient of taiko difficulty.
|
||
|
/// </summary>
|
||
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|