diff --git a/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertHit.cs b/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertHit.cs index 72d18664bf..bdcd1abf3c 100644 --- a/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertHit.cs +++ b/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertHit.cs @@ -11,5 +11,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Taiko internal sealed class ConvertHit : HitObject, IHasCombo { public bool NewCombo { get; set; } + + protected override HitWindows CreateHitWindows() => new ConvertTaikoHitWindows(); } } diff --git a/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSlider.cs b/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSlider.cs index e810e687bd..0237ab9619 100644 --- a/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSlider.cs +++ b/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSlider.cs @@ -11,5 +11,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Taiko internal sealed class ConvertSlider : Legacy.ConvertSlider, IHasCombo { public bool NewCombo { get; set; } + + protected override HitWindows CreateHitWindows() => new ConvertTaikoHitWindows(); } } diff --git a/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSpinner.cs b/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSpinner.cs index 193e50aed6..899f383bee 100644 --- a/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSpinner.cs +++ b/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSpinner.cs @@ -13,5 +13,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Taiko public double EndTime { get; set; } public double Duration => EndTime - StartTime; + + protected override HitWindows CreateHitWindows() => new ConvertTaikoHitWindows(); } } diff --git a/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertTaikoHitWindows.cs b/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertTaikoHitWindows.cs new file mode 100644 index 0000000000..d3e8718307 --- /dev/null +++ b/osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertTaikoHitWindows.cs @@ -0,0 +1,28 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System.Collections.Generic; +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Scoring; + +namespace osu.Game.Rulesets.Objects.Legacy.Taiko +{ + public class ConvertTaikoHitWindows : HitWindows + { + private static readonly IReadOnlyDictionary base_ranges = new Dictionary + { + { HitResult.Great, (100, 70, 40) }, + { HitResult.Good, (240, 160, 100) }, + { HitResult.Meh, (270, 190, 140) }, + { HitResult.Miss, (400, 400, 400) }, + }; + + public override void SetDifficulty(double difficulty) + { + Great = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Great]); + Good = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Good]); + Meh = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Meh]); + Miss = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Miss]); + } + } +}