2019-01-24 16:43:03 +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.
|
2018-05-11 14:31:36 +08:00
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using osu.Game.Beatmaps;
|
2018-05-17 12:35:06 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects;
|
2018-05-11 14:31:36 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
|
|
|
|
|
2018-05-17 12:35:06 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Objects
|
2018-05-11 14:31:36 +08:00
|
|
|
|
{
|
2018-05-17 12:35:06 +08:00
|
|
|
|
public class OsuHitWindows : HitWindows
|
2018-05-11 14:31:36 +08:00
|
|
|
|
{
|
|
|
|
|
private static readonly IReadOnlyDictionary<HitResult, (double od0, double od5, double od10)> base_ranges = new Dictionary<HitResult, (double, double, double)>
|
|
|
|
|
{
|
|
|
|
|
{ HitResult.Great, (160, 100, 40) },
|
|
|
|
|
{ HitResult.Good, (280, 200, 120) },
|
|
|
|
|
{ HitResult.Meh, (400, 300, 200) },
|
|
|
|
|
{ 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]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|