2019-01-24 08:43:03 +00: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 06:32:00 +00:00
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using osu.Game.Beatmaps;
|
2018-05-17 04:35:06 +00:00
|
|
|
|
using osu.Game.Rulesets.Objects;
|
2018-05-11 06:32:00 +00:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
|
|
|
|
|
2018-05-17 04:35:06 +00:00
|
|
|
|
namespace osu.Game.Rulesets.Mania.Objects
|
2018-05-11 06:32:00 +00:00
|
|
|
|
{
|
2018-05-17 04:35:06 +00:00
|
|
|
|
public class ManiaHitWindows : HitWindows
|
2018-05-11 06:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
private static readonly IReadOnlyDictionary<HitResult, (double od0, double od5, double od10)> base_ranges = new Dictionary<HitResult, (double, double, double)>
|
|
|
|
|
{
|
|
|
|
|
{ HitResult.Perfect, (44.8, 38.8, 27.8) },
|
2019-02-28 04:31:40 +00:00
|
|
|
|
{ HitResult.Great, (128, 98, 68) },
|
2018-05-11 06:32:00 +00:00
|
|
|
|
{ HitResult.Good, (194, 164, 134) },
|
|
|
|
|
{ HitResult.Ok, (254, 224, 194) },
|
|
|
|
|
{ HitResult.Meh, (302, 272, 242) },
|
|
|
|
|
{ HitResult.Miss, (376, 346, 316) },
|
|
|
|
|
};
|
|
|
|
|
|
2018-12-06 12:04:54 +00:00
|
|
|
|
public override bool IsHitResultAllowed(HitResult result) => true;
|
|
|
|
|
|
2018-05-11 06:32:00 +00:00
|
|
|
|
public override void SetDifficulty(double difficulty)
|
|
|
|
|
{
|
|
|
|
|
Perfect = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Perfect]);
|
|
|
|
|
Great = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Great]);
|
|
|
|
|
Good = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Good]);
|
|
|
|
|
Ok = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Ok]);
|
|
|
|
|
Meh = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Meh]);
|
|
|
|
|
Miss = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Miss]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|