2020-06-08 15:30:26 +08:00
|
|
|
|
// 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;
|
2024-12-27 21:30:30 +08:00
|
|
|
|
using osu.Game.Rulesets.Difficulty.Utils;
|
2021-02-06 12:06:16 +08:00
|
|
|
|
using osu.Game.Rulesets.Mods;
|
2024-12-27 21:30:30 +08:00
|
|
|
|
using osu.Game.Rulesets.Taiko.Difficulty.Evaluators;
|
2020-06-08 15:30:26 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
|
|
|
|
{
|
2020-08-23 01:34:16 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Calculates the rhythm coefficient of taiko difficulty.
|
|
|
|
|
/// </summary>
|
2021-08-17 06:14:29 +08:00
|
|
|
|
public class Rhythm : StrainDecaySkill
|
2020-06-08 15:30:26 +08:00
|
|
|
|
{
|
2024-12-27 21:30:30 +08:00
|
|
|
|
protected override double SkillMultiplier => 1.0;
|
|
|
|
|
protected override double StrainDecayBase => 0.4;
|
2020-08-22 23:51:35 +08:00
|
|
|
|
|
2024-12-27 21:30:30 +08:00
|
|
|
|
private readonly double greatHitWindow;
|
2020-08-23 01:34:16 +08:00
|
|
|
|
|
2024-12-27 21:30:30 +08:00
|
|
|
|
public Rhythm(Mod[] mods, double greatHitWindow)
|
2021-02-06 12:06:16 +08:00
|
|
|
|
: base(mods)
|
|
|
|
|
{
|
2024-12-27 21:30:30 +08:00
|
|
|
|
this.greatHitWindow = greatHitWindow;
|
2021-02-06 12:06:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-22 23:51:35 +08:00
|
|
|
|
protected override double StrainValueOf(DifficultyHitObject current)
|
2020-06-08 15:30:26 +08:00
|
|
|
|
{
|
2024-12-27 21:30:30 +08:00
|
|
|
|
double difficulty = RhythmEvaluator.EvaluateDifficultyOf(current, greatHitWindow);
|
2020-06-08 15:30:26 +08:00
|
|
|
|
|
2024-12-27 21:30:30 +08:00
|
|
|
|
// To prevent abuse of exceedingly long intervals between awkward rhythms, we penalise its difficulty.
|
|
|
|
|
difficulty *= DifficultyCalculationUtils.Logistic(current.DeltaTime, 350, -1 / 25.0, 0.5) + 0.5;
|
2020-06-08 15:30:26 +08:00
|
|
|
|
|
2024-12-27 21:30:30 +08:00
|
|
|
|
return difficulty;
|
2020-08-19 01:51:19 +08:00
|
|
|
|
}
|
2020-06-08 15:30:26 +08:00
|
|
|
|
}
|
|
|
|
|
}
|