2021-05-16 03:16:12 +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.
|
|
|
|
|
2021-05-16 04:03:03 +00:00
|
|
|
using System;
|
|
|
|
using System.Linq;
|
2021-05-16 03:16:12 +00:00
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
using osu.Game.Rulesets.Taiko.Beatmaps;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Mods
|
|
|
|
{
|
2021-05-16 04:51:40 +00:00
|
|
|
public class TaikoModInvert : ModInvert, IApplicableToBeatmap
|
2021-05-16 03:16:12 +00:00
|
|
|
{
|
|
|
|
public override string Description => @"Dons become kats, kats become dons";
|
2021-05-16 04:03:03 +00:00
|
|
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModRandom)).ToArray();
|
2021-05-16 03:16:12 +00:00
|
|
|
|
|
|
|
public void ApplyToBeatmap(IBeatmap beatmap)
|
|
|
|
{
|
|
|
|
var taikoBeatmap = (TaikoBeatmap)beatmap;
|
|
|
|
|
|
|
|
foreach (var obj in taikoBeatmap.HitObjects)
|
|
|
|
{
|
|
|
|
if (obj is Hit hit)
|
2021-05-16 03:28:11 +00:00
|
|
|
hit.Type = hit.Type == HitType.Centre ? HitType.Rim : HitType.Centre;
|
2021-05-16 03:16:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|