From b8bb0a52e39d91180dfad5ca4b3651b01deaa05d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 9 Jan 2018 13:41:57 +0900 Subject: [PATCH] Move mod implementations to individual files --- osu.Game.Rulesets.Catch/Mods/CatchMod.cs | 69 ------ .../Mods/CatchModDaycore.cs | 12 ++ .../Mods/CatchModDoubleTime.cs | 12 ++ osu.Game.Rulesets.Catch/Mods/CatchModEasy.cs | 11 + .../Mods/CatchModFlashlight.cs | 12 ++ .../Mods/CatchModHalfTime.cs | 12 ++ .../Mods/CatchModHardRock.cs | 13 ++ .../Mods/CatchModHidden.cs | 13 ++ .../Mods/CatchModNightcore.cs | 12 ++ .../Mods/CatchModNoFail.cs | 11 + .../Mods/CatchModPerfect.cs | 11 + osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs | 12 ++ .../Mods/CatchModSuddenDeath.cs | 11 + .../osu.Game.Rulesets.Catch.csproj | 13 +- osu.Game.Rulesets.Mania/Mods/ManiaKeyMod.cs | 29 +++ osu.Game.Rulesets.Mania/Mods/ManiaMod.cs | 197 ------------------ .../Mods/ManiaModAutoplay.cs | 24 +++ .../Mods/ManiaModDaycore.cs | 12 ++ .../Mods/ManiaModDoubleTime.cs | 12 ++ osu.Game.Rulesets.Mania/Mods/ManiaModEasy.cs | 11 + .../Mods/ManiaModFadeIn.cs | 20 ++ .../Mods/ManiaModFlashlight.cs | 14 ++ .../Mods/ManiaModGravity.cs | 14 +- .../Mods/ManiaModHalfTime.cs | 12 ++ .../Mods/ManiaModHardRock.cs | 12 ++ .../Mods/ManiaModHidden.cs | 15 ++ osu.Game.Rulesets.Mania/Mods/ManiaModKey1.cs | 11 + osu.Game.Rulesets.Mania/Mods/ManiaModKey2.cs | 11 + osu.Game.Rulesets.Mania/Mods/ManiaModKey3.cs | 11 + osu.Game.Rulesets.Mania/Mods/ManiaModKey4.cs | 11 + osu.Game.Rulesets.Mania/Mods/ManiaModKey5.cs | 11 + osu.Game.Rulesets.Mania/Mods/ManiaModKey6.cs | 11 + osu.Game.Rulesets.Mania/Mods/ManiaModKey7.cs | 11 + osu.Game.Rulesets.Mania/Mods/ManiaModKey8.cs | 11 + osu.Game.Rulesets.Mania/Mods/ManiaModKey9.cs | 11 + .../Mods/ManiaModKeyCoop.cs | 16 ++ .../Mods/ManiaModNightcore.cs | 12 ++ .../Mods/ManiaModNoFail.cs | 11 + .../Mods/ManiaModPerfect.cs | 11 + .../Mods/ManiaModRandom.cs | 31 +++ .../Mods/ManiaModSuddenDeath.cs | 11 + .../osu.Game.Rulesets.Mania.csproj | 26 ++- osu.Game.Rulesets.Osu/Mods/OsuMod.cs | 189 ----------------- osu.Game.Rulesets.Osu/Mods/OsuModAutopilot.cs | 20 ++ osu.Game.Rulesets.Osu/Mods/OsuModAutoplay.cs | 26 +++ osu.Game.Rulesets.Osu/Mods/OsuModDaycore.cs | 12 ++ .../Mods/OsuModDoubleTime.cs | 12 ++ osu.Game.Rulesets.Osu/Mods/OsuModEasy.cs | 11 + .../Mods/OsuModFlashlight.cs | 12 ++ osu.Game.Rulesets.Osu/Mods/OsuModHalfTime.cs | 12 ++ osu.Game.Rulesets.Osu/Mods/OsuModHardRock.cs | 32 +++ osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs | 79 +++++++ osu.Game.Rulesets.Osu/Mods/OsuModNightcore.cs | 12 ++ osu.Game.Rulesets.Osu/Mods/OsuModNoFail.cs | 14 ++ osu.Game.Rulesets.Osu/Mods/OsuModPerfect.cs | 11 + osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs | 15 ++ osu.Game.Rulesets.Osu/Mods/OsuModSpunOut.cs | 20 ++ .../Mods/OsuModSuddenDeath.cs | 14 ++ osu.Game.Rulesets.Osu/Mods/OsuModTarget.cs | 17 ++ .../osu.Game.Rulesets.Osu.csproj | 17 +- osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs | 83 -------- .../Mods/TaikoModAutoplay.cs | 24 +++ .../Mods/TaikoModDaycore.cs | 12 ++ .../Mods/TaikoModDoubleTime.cs | 12 ++ osu.Game.Rulesets.Taiko/Mods/TaikoModEasy.cs | 11 + .../Mods/TaikoModFlashlight.cs | 12 ++ .../Mods/TaikoModHalfTime.cs | 12 ++ .../Mods/TaikoModHardRock.cs | 13 ++ .../Mods/TaikoModHidden.cs | 13 ++ .../Mods/TaikoModNightcore.cs | 12 ++ .../Mods/TaikoModNoFail.cs | 11 + .../Mods/TaikoModPerfect.cs | 11 + osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs | 12 ++ .../Mods/TaikoModSuddenDeath.cs | 11 + .../osu.Game.Rulesets.Taiko.csproj | 14 +- 75 files changed, 1052 insertions(+), 549 deletions(-) delete mode 100644 osu.Game.Rulesets.Catch/Mods/CatchMod.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModEasy.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModHidden.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModNoFail.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModPerfect.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs create mode 100644 osu.Game.Rulesets.Catch/Mods/CatchModSuddenDeath.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaKeyMod.cs delete mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaMod.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModAutoplay.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModDaycore.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModDoubleTime.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModEasy.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModFlashlight.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModHalfTime.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModHardRock.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey1.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey2.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey3.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey4.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey5.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey6.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey7.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey8.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKey9.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModKeyCoop.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModNightcore.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModNoFail.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModPerfect.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModRandom.cs create mode 100644 osu.Game.Rulesets.Mania/Mods/ManiaModSuddenDeath.cs delete mode 100644 osu.Game.Rulesets.Osu/Mods/OsuMod.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModAutopilot.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModAutoplay.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModDaycore.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModDoubleTime.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModEasy.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModFlashlight.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModHalfTime.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModHardRock.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModNightcore.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModNoFail.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModPerfect.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModSpunOut.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs create mode 100644 osu.Game.Rulesets.Osu/Mods/OsuModTarget.cs delete mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModAutoplay.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModDaycore.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModDoubleTime.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModEasy.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModHalfTime.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModHardRock.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModNightcore.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModNoFail.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModPerfect.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs create mode 100644 osu.Game.Rulesets.Taiko/Mods/TaikoModSuddenDeath.cs diff --git a/osu.Game.Rulesets.Catch/Mods/CatchMod.cs b/osu.Game.Rulesets.Catch/Mods/CatchMod.cs deleted file mode 100644 index d243ee69e3..0000000000 --- a/osu.Game.Rulesets.Catch/Mods/CatchMod.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Rulesets.Mods; - -namespace osu.Game.Rulesets.Catch.Mods -{ - public class CatchModNoFail : ModNoFail - { - - } - - public class CatchModEasy : ModEasy - { - - } - - public class CatchModHidden : ModHidden - { - public override string Description => @"Play with fading notes for a slight score advantage."; - public override double ScoreMultiplier => 1.06; - } - - public class CatchModHardRock : ModHardRock - { - public override double ScoreMultiplier => 1.12; - public override bool Ranked => true; - } - - public class CatchModSuddenDeath : ModSuddenDeath - { - - } - - public class CatchModDaycore : ModDaycore - { - public override double ScoreMultiplier => 0.5; - } - - public class CatchModDoubleTime : ModDoubleTime - { - public override double ScoreMultiplier => 1.06; - } - - public class CatchModRelax : ModRelax - { - public override string Description => @"Use the mouse to control the catcher."; - } - - public class CatchModHalfTime : ModHalfTime - { - public override double ScoreMultiplier => 0.5; - } - - public class CatchModNightcore : ModNightcore - { - public override double ScoreMultiplier => 1.06; - } - - public class CatchModFlashlight : ModFlashlight - { - public override double ScoreMultiplier => 1.12; - } - - public class CatchModPerfect : ModPerfect - { - - } -} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs b/osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs new file mode 100644 index 0000000000..124af06d56 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModDaycore : ModDaycore + { + public override double ScoreMultiplier => 0.5; + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs b/osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs new file mode 100644 index 0000000000..7a7eeed719 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModDoubleTime : ModDoubleTime + { + public override double ScoreMultiplier => 1.06; + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModEasy.cs b/osu.Game.Rulesets.Catch/Mods/CatchModEasy.cs new file mode 100644 index 0000000000..5c025bdea0 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModEasy.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModEasy : ModEasy + { + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs b/osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs new file mode 100644 index 0000000000..424f14ad02 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModFlashlight : ModFlashlight + { + public override double ScoreMultiplier => 1.12; + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs b/osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs new file mode 100644 index 0000000000..303fa6011d --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModHalfTime : ModHalfTime + { + public override double ScoreMultiplier => 0.5; + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs b/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs new file mode 100644 index 0000000000..ed33bf7124 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs @@ -0,0 +1,13 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModHardRock : ModHardRock + { + public override double ScoreMultiplier => 1.12; + public override bool Ranked => true; + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModHidden.cs b/osu.Game.Rulesets.Catch/Mods/CatchModHidden.cs new file mode 100644 index 0000000000..981ebda9eb --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModHidden.cs @@ -0,0 +1,13 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModHidden : ModHidden + { + public override string Description => @"Play with fading notes for a slight score advantage."; + public override double ScoreMultiplier => 1.06; + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs b/osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs new file mode 100644 index 0000000000..b53cac0d7c --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModNightcore : ModNightcore + { + public override double ScoreMultiplier => 1.06; + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModNoFail.cs b/osu.Game.Rulesets.Catch/Mods/CatchModNoFail.cs new file mode 100644 index 0000000000..afb2d83720 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModNoFail.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModNoFail : ModNoFail + { + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModPerfect.cs b/osu.Game.Rulesets.Catch/Mods/CatchModPerfect.cs new file mode 100644 index 0000000000..bc0dd10f6c --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModPerfect.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModPerfect : ModPerfect + { + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs b/osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs new file mode 100644 index 0000000000..de0b6bc614 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModRelax : ModRelax + { + public override string Description => @"Use the mouse to control the catcher."; + } +} diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModSuddenDeath.cs b/osu.Game.Rulesets.Catch/Mods/CatchModSuddenDeath.cs new file mode 100644 index 0000000000..1e778e5305 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Mods/CatchModSuddenDeath.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Catch.Mods +{ + public class CatchModSuddenDeath : ModSuddenDeath + { + } +} diff --git a/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj b/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj index 16c909e063..6c42c4341f 100644 --- a/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj +++ b/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj @@ -49,6 +49,17 @@ + + + + + + + + + + + @@ -71,7 +82,7 @@ - + diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaKeyMod.cs b/osu.Game.Rulesets.Mania/Mods/ManiaKeyMod.cs new file mode 100644 index 0000000000..e6711923ff --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaKeyMod.cs @@ -0,0 +1,29 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Mania.Beatmaps; +using osu.Game.Rulesets.Mania.Objects; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public abstract class ManiaKeyMod : Mod, IApplicableMod, IApplicableToBeatmapConverter + { + public override string ShortenedName => Name; + public abstract int KeyCount { get; } + public override double ScoreMultiplier => 1; // TODO: Implement the mania key mod score multiplier + public override bool Ranked => true; + + public void ApplyToBeatmapConverter(BeatmapConverter beatmapConverter) + { + var mbc = (ManiaBeatmapConverter)beatmapConverter; + + // Although this can work, for now let's not allow keymods for mania-specific beatmaps + if (mbc.IsForCurrentRuleset) + return; + + mbc.TargetColumns = KeyCount; + } + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs b/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs deleted file mode 100644 index 4cfc4cdd2a..0000000000 --- a/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Graphics; -using osu.Game.Rulesets.Mods; -using System; -using System.Linq; -using osu.Framework.Extensions.IEnumerableExtensions; -using osu.Framework.MathUtils; -using osu.Game.Beatmaps; -using osu.Game.Rulesets.Mania.Beatmaps; -using osu.Game.Rulesets.Mania.Objects; -using osu.Game.Rulesets.Mania.Replays; -using osu.Game.Rulesets.Mania.UI; -using osu.Game.Rulesets.Scoring; -using osu.Game.Users; -using osu.Game.Rulesets.UI; - -namespace osu.Game.Rulesets.Mania.Mods -{ - public class ManiaModNoFail : ModNoFail - { - - } - - public class ManiaModEasy : ModEasy - { - - } - - public class ManiaModHidden : ModHidden - { - public override string Description => @"The notes fade out before you hit them!"; - public override double ScoreMultiplier => 1.0; - public override Type[] IncompatibleMods => new[] { typeof(ModFlashlight) }; - } - - public class ManiaModHardRock : ModHardRock - { - public override double ScoreMultiplier => 1.0; - } - - public class ManiaModSuddenDeath : ModSuddenDeath - { - - } - - public class ManiaModDaycore : ModDaycore - { - public override double ScoreMultiplier => 0.3; - } - - public class ManiaModDoubleTime : ModDoubleTime - { - public override double ScoreMultiplier => 1.0; - } - - public class ManiaModHalfTime : ModHalfTime - { - public override double ScoreMultiplier => 0.3; - } - - public class ManiaModNightcore : ModNightcore - { - public override double ScoreMultiplier => 1.0; - } - - public class ManiaModFlashlight : ModFlashlight - { - public override double ScoreMultiplier => 1.0; - public override Type[] IncompatibleMods => new[] { typeof(ModHidden) }; - } - - public class ManiaModPerfect : ModPerfect - { - - } - - public class ManiaModFadeIn : Mod - { - public override string Name => "FadeIn"; - public override string ShortenedName => "FI"; - public override FontAwesome Icon => FontAwesome.fa_osu_mod_hidden; - public override ModType Type => ModType.DifficultyIncrease; - public override double ScoreMultiplier => 1; - public override bool Ranked => true; - public override Type[] IncompatibleMods => new[] { typeof(ModFlashlight) }; - } - - public class ManiaModRandom : Mod, IApplicableToRulesetContainer - { - public override string Name => "Random"; - public override string ShortenedName => "RD"; - public override FontAwesome Icon => FontAwesome.fa_osu_dice; - public override string Description => @"Shuffle around the notes!"; - public override double ScoreMultiplier => 1; - - public void ApplyToRulesetContainer(RulesetContainer rulesetContainer) - { - int availableColumns = ((ManiaRulesetContainer)rulesetContainer).Beatmap.TotalColumns; - var shuffledColumns = Enumerable.Range(0, availableColumns).OrderBy(item => RNG.Next()).ToList(); - - rulesetContainer.Objects.OfType().ForEach(h => h.Column = shuffledColumns[h.Column]); - } - } - - public abstract class ManiaKeyMod : Mod, IApplicableMod, IApplicableToBeatmapConverter - { - public override string ShortenedName => Name; - public abstract int KeyCount { get; } - public override double ScoreMultiplier => 1; // TODO: Implement the mania key mod score multiplier - public override bool Ranked => true; - - public void ApplyToBeatmapConverter(BeatmapConverter beatmapConverter) - { - var mbc = (ManiaBeatmapConverter)beatmapConverter; - - // Although this can work, for now let's not allow keymods for mania-specific beatmaps - if (mbc.IsForCurrentRuleset) - return; - - mbc.TargetColumns = KeyCount; - } - } - - public class ManiaModKey1 : ManiaKeyMod - { - public override int KeyCount => 1; - public override string Name => "1K"; - } - - public class ManiaModKey2 : ManiaKeyMod - { - public override int KeyCount => 2; - public override string Name => "2K"; - } - - public class ManiaModKey3 : ManiaKeyMod - { - public override int KeyCount => 3; - public override string Name => "3K"; - } - - public class ManiaModKey4 : ManiaKeyMod - { - public override int KeyCount => 4; - public override string Name => "4K"; - } - - public class ManiaModKey5 : ManiaKeyMod - { - public override int KeyCount => 5; - public override string Name => "5K"; - } - - public class ManiaModKey6 : ManiaKeyMod - { - public override int KeyCount => 6; - public override string Name => "6K"; - } - - public class ManiaModKey7 : ManiaKeyMod - { - public override int KeyCount => 7; - public override string Name => "7K"; - } - - public class ManiaModKey8 : ManiaKeyMod - { - public override int KeyCount => 8; - public override string Name => "8K"; - } - - public class ManiaModKey9 : ManiaKeyMod - { - public override int KeyCount => 9; - public override string Name => "9K"; - } - - public class ManiaModKeyCoop : Mod - { - public override string Name => "KeyCoop"; - public override string ShortenedName => "2P"; - public override string Description => @"Double the key amount, double the fun!"; - public override double ScoreMultiplier => 1; - public override bool Ranked => true; - } - - public class ManiaModAutoplay : ModAutoplay - { - protected override Score CreateReplayScore(Beatmap beatmap) => new Score - { - User = new User { Username = "osu!topus!" }, - Replay = new ManiaAutoGenerator(beatmap).Generate(), - }; - } -} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModAutoplay.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModAutoplay.cs new file mode 100644 index 0000000000..3c5179cef0 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModAutoplay.cs @@ -0,0 +1,24 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Mania.Objects; +using osu.Game.Rulesets.Mania.Replays; +using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.Scoring; +using osu.Game.Users; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModAutoplay : ModAutoplay + { + protected override Score CreateReplayScore(Beatmap beatmap) + { + return new Score + { + User = new User { Username = "osu!topus!" }, + Replay = new ManiaAutoGenerator(beatmap).Generate(), + }; + } + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModDaycore.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModDaycore.cs new file mode 100644 index 0000000000..7c7dc5e4f7 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModDaycore.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModDaycore : ModDaycore + { + public override double ScoreMultiplier => 0.3; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModDoubleTime.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModDoubleTime.cs new file mode 100644 index 0000000000..64ce86e748 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModDoubleTime.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModDoubleTime : ModDoubleTime + { + public override double ScoreMultiplier => 1.0; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModEasy.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModEasy.cs new file mode 100644 index 0000000000..1faed5e1c0 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModEasy.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModEasy : ModEasy + { + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs new file mode 100644 index 0000000000..03442507d6 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs @@ -0,0 +1,20 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Game.Graphics; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModFadeIn : Mod + { + public override string Name => "FadeIn"; + public override string ShortenedName => "FI"; + public override FontAwesome Icon => FontAwesome.fa_osu_mod_hidden; + public override ModType Type => ModType.DifficultyIncrease; + public override double ScoreMultiplier => 1; + public override bool Ranked => true; + public override Type[] IncompatibleMods => new[] { typeof(ModFlashlight) }; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModFlashlight.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModFlashlight.cs new file mode 100644 index 0000000000..89eb02268e --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModFlashlight.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModFlashlight : ModFlashlight + { + public override double ScoreMultiplier => 1.0; + public override Type[] IncompatibleMods => new[] { typeof(ModHidden) }; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModGravity.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModGravity.cs index 8b61d33f21..9d158cf3bb 100644 --- a/osu.Game.Rulesets.Mania/Mods/ManiaModGravity.cs +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModGravity.cs @@ -3,13 +3,12 @@ using System.Collections.Generic; using System.Linq; +using osu.Game.Graphics; using osu.Game.Rulesets.Mania.Objects; +using osu.Game.Rulesets.Mania.Timing; using osu.Game.Rulesets.Mania.UI; using osu.Game.Rulesets.Mods; -using osu.Game.Graphics; -using osu.Game.Rulesets.Mania.Timing; using osu.Game.Rulesets.Timing; -using osu.Game.Rulesets.Mania.Objects.Drawables; namespace osu.Game.Rulesets.Mania.Mods { @@ -22,12 +21,13 @@ namespace osu.Game.Rulesets.Mania.Mods public override FontAwesome Icon => FontAwesome.fa_sort_desc; - public void ApplyToRulesetContainer(ManiaRulesetContainer rulesetContainer, ref List[] hitObjectTimingChanges, ref List barlineTimingChanges) + public void ApplyToRulesetContainer(ManiaRulesetContainer rulesetContainer, ref List[] hitObjectTimingChanges, + ref List barlineTimingChanges) { // We have to generate one speed adjustment per hit object for gravity - foreach (ManiaHitObject obj in rulesetContainer.Objects.OfType()) + foreach (var obj in rulesetContainer.Objects.OfType()) { - MultiplierControlPoint controlPoint = rulesetContainer.CreateControlPointAt(obj.StartTime); + var controlPoint = rulesetContainer.CreateControlPointAt(obj.StartTime); // Beat length has too large of an effect for gravity, so we'll force it to a constant value for now controlPoint.TimingPoint.BeatLength = 1000; @@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Mania.Mods } // Like with hit objects, we need to generate one speed adjustment per bar line - foreach (DrawableBarLine barLine in rulesetContainer.BarLines) + foreach (var barLine in rulesetContainer.BarLines) { var controlPoint = rulesetContainer.CreateControlPointAt(barLine.HitObject.StartTime); // Beat length has too large of an effect for gravity, so we'll force it to a constant value for now diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModHalfTime.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModHalfTime.cs new file mode 100644 index 0000000000..2f8404609f --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModHalfTime.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModHalfTime : ModHalfTime + { + public override double ScoreMultiplier => 0.3; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModHardRock.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModHardRock.cs new file mode 100644 index 0000000000..91edbaf0cf --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModHardRock.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModHardRock : ModHardRock + { + public override double ScoreMultiplier => 1.0; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs new file mode 100644 index 0000000000..c2fc07da89 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs @@ -0,0 +1,15 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModHidden : ModHidden + { + public override string Description => @"The notes fade out before you hit them!"; + public override double ScoreMultiplier => 1.0; + public override Type[] IncompatibleMods => new[] { typeof(ModFlashlight) }; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey1.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey1.cs new file mode 100644 index 0000000000..8a6943d99b --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey1.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey1 : ManiaKeyMod + { + public override int KeyCount => 1; + public override string Name => "1K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey2.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey2.cs new file mode 100644 index 0000000000..553827ac1c --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey2.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey2 : ManiaKeyMod + { + public override int KeyCount => 2; + public override string Name => "2K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey3.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey3.cs new file mode 100644 index 0000000000..ef048c848e --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey3.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey3 : ManiaKeyMod + { + public override int KeyCount => 3; + public override string Name => "3K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey4.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey4.cs new file mode 100644 index 0000000000..9c713d920f --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey4.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey4 : ManiaKeyMod + { + public override int KeyCount => 4; + public override string Name => "4K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey5.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey5.cs new file mode 100644 index 0000000000..a83faf4627 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey5.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey5 : ManiaKeyMod + { + public override int KeyCount => 5; + public override string Name => "5K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey6.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey6.cs new file mode 100644 index 0000000000..d7df901048 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey6.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey6 : ManiaKeyMod + { + public override int KeyCount => 6; + public override string Name => "6K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey7.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey7.cs new file mode 100644 index 0000000000..4a3f9857e5 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey7.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey7 : ManiaKeyMod + { + public override int KeyCount => 7; + public override string Name => "7K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey8.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey8.cs new file mode 100644 index 0000000000..22c301fb7a --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey8.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey8 : ManiaKeyMod + { + public override int KeyCount => 8; + public override string Name => "8K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKey9.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKey9.cs new file mode 100644 index 0000000000..b2a0bc4ddf --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKey9.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKey9 : ManiaKeyMod + { + public override int KeyCount => 9; + public override string Name => "9K"; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModKeyCoop.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModKeyCoop.cs new file mode 100644 index 0000000000..893e81f165 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModKeyCoop.cs @@ -0,0 +1,16 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModKeyCoop : Mod + { + public override string Name => "KeyCoop"; + public override string ShortenedName => "2P"; + public override string Description => @"Double the key amount, double the fun!"; + public override double ScoreMultiplier => 1; + public override bool Ranked => true; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModNightcore.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModNightcore.cs new file mode 100644 index 0000000000..a977eef5e3 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModNightcore.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModNightcore : ModNightcore + { + public override double ScoreMultiplier => 1.0; + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModNoFail.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModNoFail.cs new file mode 100644 index 0000000000..c9c50f9919 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModNoFail.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModNoFail : ModNoFail + { + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModPerfect.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModPerfect.cs new file mode 100644 index 0000000000..2c0bd5f8c3 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModPerfect.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModPerfect : ModPerfect + { + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModRandom.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModRandom.cs new file mode 100644 index 0000000000..a6cbad44d7 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModRandom.cs @@ -0,0 +1,31 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System.Linq; +using osu.Framework.Extensions.IEnumerableExtensions; +using osu.Framework.MathUtils; +using osu.Game.Graphics; +using osu.Game.Rulesets.Mania.Objects; +using osu.Game.Rulesets.Mania.UI; +using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.UI; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModRandom : Mod, IApplicableToRulesetContainer + { + public override string Name => "Random"; + public override string ShortenedName => "RD"; + public override FontAwesome Icon => FontAwesome.fa_osu_dice; + public override string Description => @"Shuffle around the notes!"; + public override double ScoreMultiplier => 1; + + public void ApplyToRulesetContainer(RulesetContainer rulesetContainer) + { + var availableColumns = ((ManiaRulesetContainer)rulesetContainer).Beatmap.TotalColumns; + var shuffledColumns = Enumerable.Range(0, availableColumns).OrderBy(item => RNG.Next()).ToList(); + + rulesetContainer.Objects.OfType().ForEach(h => h.Column = shuffledColumns[h.Column]); + } + } +} diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModSuddenDeath.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModSuddenDeath.cs new file mode 100644 index 0000000000..9edf131195 --- /dev/null +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModSuddenDeath.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Mania.Mods +{ + public class ManiaModSuddenDeath : ModSuddenDeath + { + } +} diff --git a/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj b/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj index e9a572835b..11f354ec7d 100644 --- a/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj +++ b/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj @@ -65,6 +65,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -98,7 +122,7 @@ - + diff --git a/osu.Game.Rulesets.Osu/Mods/OsuMod.cs b/osu.Game.Rulesets.Osu/Mods/OsuMod.cs deleted file mode 100644 index bd2f8090ed..0000000000 --- a/osu.Game.Rulesets.Osu/Mods/OsuMod.cs +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Beatmaps; -using osu.Game.Graphics; -using osu.Game.Rulesets.Osu.Replays; -using osu.Game.Rulesets.Mods; -using osu.Game.Rulesets.Osu.Objects; -using System; -using System.Collections.Generic; -using System.Linq; -using osu.Game.Rulesets.Osu.UI; -using osu.Game.Rulesets.Scoring; -using OpenTK; -using osu.Game.Rulesets.Objects.Drawables; -using osu.Game.Rulesets.Osu.Objects.Drawables; -using osu.Framework.Graphics; -using osu.Game.Rulesets.Objects.Types; - -namespace osu.Game.Rulesets.Osu.Mods -{ - public class OsuModNoFail : ModNoFail - { - public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot) }).ToArray(); - } - - public class OsuModEasy : ModEasy - { - } - - public class OsuModHidden : ModHidden, IApplicableToDrawableHitObjects - { - public override string Description => @"Play with no approach circles and fading notes for a slight score advantage."; - public override double ScoreMultiplier => 1.06; - - private const double fade_in_duration_multiplier = 0.4; - private const double fade_out_duration_multiplier = 0.3; - - private float preEmpt => DrawableOsuHitObject.TIME_PREEMPT; - - public void ApplyToDrawableHitObjects(IEnumerable drawables) - { - foreach (var d in drawables.OfType()) - { - d.ApplyCustomUpdateState += ApplyHiddenState; - d.FadeInDuration = preEmpt * fade_in_duration_multiplier; - } - } - - protected void ApplyHiddenState(DrawableHitObject drawable, ArmedState state) - { - if (!(drawable is DrawableOsuHitObject d)) - return; - - var fadeOutStartTime = d.HitObject.StartTime - preEmpt + d.FadeInDuration; - var fadeOutDuration = preEmpt * fade_out_duration_multiplier; - - // new duration from completed fade in to end (before fading out) - var longFadeDuration = ((d.HitObject as IHasEndTime)?.EndTime ?? d.HitObject.StartTime) - fadeOutStartTime; - - switch (drawable) - { - case DrawableHitCircle circle: - // we don't want to see the approach circle - circle.ApproachCircle.Hide(); - - // fade out immediately after fade in. - using (drawable.BeginAbsoluteSequence(fadeOutStartTime, true)) - circle.FadeOut(fadeOutDuration); - break; - case DrawableSlider slider: - using (slider.BeginAbsoluteSequence(fadeOutStartTime, true)) - slider.Body.FadeOut(longFadeDuration, Easing.Out); - break; - case DrawableSpinner spinner: - // hide elements we don't care about. - spinner.Disc.Hide(); - spinner.Ticks.Hide(); - spinner.Background.Hide(); - - using (spinner.BeginAbsoluteSequence(fadeOutStartTime + longFadeDuration, true)) - spinner.FadeOut(fadeOutDuration); - break; - } - } - } - - public class OsuModHardRock : ModHardRock, IApplicableToHitObject - { - public override double ScoreMultiplier => 1.06; - public override bool Ranked => true; - - public void ApplyToHitObject(OsuHitObject hitObject) - { - hitObject.Position = new Vector2(hitObject.Position.X, OsuPlayfield.BASE_SIZE.Y - hitObject.Y); - - var slider = hitObject as Slider; - if (slider == null) - return; - - var newControlPoints = new List(); - slider.ControlPoints.ForEach(c => newControlPoints.Add(new Vector2(c.X, OsuPlayfield.BASE_SIZE.Y - c.Y))); - - slider.ControlPoints = newControlPoints; - slider.Curve?.Calculate(); // Recalculate the slider curve - } - } - - public class OsuModSuddenDeath : ModSuddenDeath - { - public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot) }).ToArray(); - } - - public class OsuModDaycore : ModDaycore - { - public override double ScoreMultiplier => 0.5; - } - - public class OsuModDoubleTime : ModDoubleTime - { - public override double ScoreMultiplier => 1.12; - } - - public class OsuModRelax : ModRelax - { - public override string Description => "You don't need to click.\nGive your clicking/tapping finger a break from the heat of things."; - public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot) }).ToArray(); - } - - public class OsuModHalfTime : ModHalfTime - { - public override double ScoreMultiplier => 0.5; - } - - public class OsuModNightcore : ModNightcore - { - public override double ScoreMultiplier => 1.12; - } - - public class OsuModFlashlight : ModFlashlight - { - public override double ScoreMultiplier => 1.12; - } - - public class OsuModPerfect : ModPerfect - { - } - - public class OsuModSpunOut : Mod - { - public override string Name => "Spun Out"; - public override string ShortenedName => "SO"; - public override FontAwesome Icon => FontAwesome.fa_osu_mod_spunout; - public override string Description => @"Spinners will be automatically completed"; - public override double ScoreMultiplier => 0.9; - public override bool Ranked => true; - public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(OsuModAutopilot) }; - } - - public class OsuModAutopilot : Mod - { - public override string Name => "Autopilot"; - public override string ShortenedName => "AP"; - public override FontAwesome Icon => FontAwesome.fa_osu_mod_autopilot; - public override string Description => @"Automatic cursor movement - just follow the rhythm."; - public override double ScoreMultiplier => 0; - public override bool Ranked => false; - public override Type[] IncompatibleMods => new[] { typeof(OsuModSpunOut), typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail), typeof(ModAutoplay) }; - } - - public class OsuModAutoplay : ModAutoplay - { - public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot), typeof(OsuModSpunOut) }).ToArray(); - - protected override Score CreateReplayScore(Beatmap beatmap) => new Score - { - Replay = new OsuAutoGenerator(beatmap).Generate() - }; - } - - public class OsuModTarget : Mod - { - public override string Name => "Target"; - public override string ShortenedName => "TP"; - public override FontAwesome Icon => FontAwesome.fa_osu_mod_target; - public override string Description => @""; - public override double ScoreMultiplier => 1; - } -} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModAutopilot.cs b/osu.Game.Rulesets.Osu/Mods/OsuModAutopilot.cs new file mode 100644 index 0000000000..0c842143e4 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModAutopilot.cs @@ -0,0 +1,20 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Game.Graphics; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModAutopilot : Mod + { + public override string Name => "Autopilot"; + public override string ShortenedName => "AP"; + public override FontAwesome Icon => FontAwesome.fa_osu_mod_autopilot; + public override string Description => @"Automatic cursor movement - just follow the rhythm."; + public override double ScoreMultiplier => 0; + public override bool Ranked => false; + public override Type[] IncompatibleMods => new[] { typeof(OsuModSpunOut), typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail), typeof(ModAutoplay) }; + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModAutoplay.cs b/osu.Game.Rulesets.Osu/Mods/OsuModAutoplay.cs new file mode 100644 index 0000000000..42fe95356d --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModAutoplay.cs @@ -0,0 +1,26 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Linq; +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.Osu.Objects; +using osu.Game.Rulesets.Osu.Replays; +using osu.Game.Rulesets.Scoring; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModAutoplay : ModAutoplay + { + public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot), typeof(OsuModSpunOut) }).ToArray(); + + protected override Score CreateReplayScore(Beatmap beatmap) + { + return new Score + { + Replay = new OsuAutoGenerator(beatmap).Generate() + }; + } + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModDaycore.cs b/osu.Game.Rulesets.Osu/Mods/OsuModDaycore.cs new file mode 100644 index 0000000000..eb90338e2f --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModDaycore.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModDaycore : ModDaycore + { + public override double ScoreMultiplier => 0.5; + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModDoubleTime.cs b/osu.Game.Rulesets.Osu/Mods/OsuModDoubleTime.cs new file mode 100644 index 0000000000..5a835aac75 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModDoubleTime.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModDoubleTime : ModDoubleTime + { + public override double ScoreMultiplier => 1.12; + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModEasy.cs b/osu.Game.Rulesets.Osu/Mods/OsuModEasy.cs new file mode 100644 index 0000000000..80c83bf5d8 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModEasy.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModEasy : ModEasy + { + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModFlashlight.cs b/osu.Game.Rulesets.Osu/Mods/OsuModFlashlight.cs new file mode 100644 index 0000000000..342c53b41f --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModFlashlight.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModFlashlight : ModFlashlight + { + public override double ScoreMultiplier => 1.12; + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModHalfTime.cs b/osu.Game.Rulesets.Osu/Mods/OsuModHalfTime.cs new file mode 100644 index 0000000000..7d009b0344 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModHalfTime.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModHalfTime : ModHalfTime + { + public override double ScoreMultiplier => 0.5; + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModHardRock.cs b/osu.Game.Rulesets.Osu/Mods/OsuModHardRock.cs new file mode 100644 index 0000000000..dfbe9ad021 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModHardRock.cs @@ -0,0 +1,32 @@ +// 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.Rulesets.Mods; +using osu.Game.Rulesets.Osu.Objects; +using osu.Game.Rulesets.Osu.UI; +using OpenTK; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModHardRock : ModHardRock, IApplicableToHitObject + { + public override double ScoreMultiplier => 1.06; + public override bool Ranked => true; + + public void ApplyToHitObject(OsuHitObject hitObject) + { + hitObject.Position = new Vector2(hitObject.Position.X, OsuPlayfield.BASE_SIZE.Y - hitObject.Y); + + var slider = hitObject as Slider; + if (slider == null) + return; + + var newControlPoints = new List(); + slider.ControlPoints.ForEach(c => newControlPoints.Add(new Vector2(c.X, OsuPlayfield.BASE_SIZE.Y - c.Y))); + + slider.ControlPoints = newControlPoints; + slider.Curve?.Calculate(); // Recalculate the slider curve + } + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs b/osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs new file mode 100644 index 0000000000..0356ba9aca --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs @@ -0,0 +1,79 @@ +// 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 System.Linq; +using osu.Framework.Graphics; +using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.Objects.Drawables; +using osu.Game.Rulesets.Objects.Types; +using osu.Game.Rulesets.Osu.Objects.Drawables; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModHidden : ModHidden, IApplicableToDrawableHitObjects + { + public override string Description => @"Play with no approach circles and fading notes for a slight score advantage."; + public override double ScoreMultiplier => 1.06; + + private const double fade_in_duration_multiplier = 0.4; + private const double fade_out_duration_multiplier = 0.3; + + private float preEmpt => DrawableOsuHitObject.TIME_PREEMPT; + + public void ApplyToDrawableHitObjects(IEnumerable drawables) + { + foreach (var d in drawables.OfType()) + { + d.ApplyCustomUpdateState += ApplyHiddenState; + d.FadeInDuration = preEmpt * fade_in_duration_multiplier; + } + } + + protected void ApplyHiddenState(DrawableHitObject drawable, ArmedState state) + { + if (!(drawable is DrawableOsuHitObject d)) + return; + + var fadeOutStartTime = d.HitObject.StartTime - preEmpt + d.FadeInDuration; + var fadeOutDuration = preEmpt * fade_out_duration_multiplier; + + // new duration from completed fade in to end (before fading out) + var longFadeDuration = ((d.HitObject as IHasEndTime)?.EndTime ?? d.HitObject.StartTime) - fadeOutStartTime; + + switch (drawable) + { + case DrawableHitCircle circle: + // we don't want to see the approach circle + circle.ApproachCircle.Hide(); + + // fade out immediately after fade in. + using (drawable.BeginAbsoluteSequence(fadeOutStartTime, true)) + { + circle.FadeOut(fadeOutDuration); + } + + break; + case DrawableSlider slider: + using (slider.BeginAbsoluteSequence(fadeOutStartTime, true)) + { + slider.Body.FadeOut(longFadeDuration, Easing.Out); + } + + break; + case DrawableSpinner spinner: + // hide elements we don't care about. + spinner.Disc.Hide(); + spinner.Ticks.Hide(); + spinner.Background.Hide(); + + using (spinner.BeginAbsoluteSequence(fadeOutStartTime + longFadeDuration, true)) + { + spinner.FadeOut(fadeOutDuration); + } + + break; + } + } + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModNightcore.cs b/osu.Game.Rulesets.Osu/Mods/OsuModNightcore.cs new file mode 100644 index 0000000000..aa0acff68d --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModNightcore.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModNightcore : ModNightcore + { + public override double ScoreMultiplier => 1.12; + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModNoFail.cs b/osu.Game.Rulesets.Osu/Mods/OsuModNoFail.cs new file mode 100644 index 0000000000..f94ee484fc --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModNoFail.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Linq; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModNoFail : ModNoFail + { + public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot) }).ToArray(); + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModPerfect.cs b/osu.Game.Rulesets.Osu/Mods/OsuModPerfect.cs new file mode 100644 index 0000000000..886048cd30 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModPerfect.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModPerfect : ModPerfect + { + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs b/osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs new file mode 100644 index 0000000000..057916c04b --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs @@ -0,0 +1,15 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Linq; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModRelax : ModRelax + { + public override string Description => "You don't need to click.\nGive your clicking/tapping finger a break from the heat of things."; + public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot) }).ToArray(); + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModSpunOut.cs b/osu.Game.Rulesets.Osu/Mods/OsuModSpunOut.cs new file mode 100644 index 0000000000..18b212f781 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModSpunOut.cs @@ -0,0 +1,20 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Game.Graphics; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModSpunOut : Mod + { + public override string Name => "Spun Out"; + public override string ShortenedName => "SO"; + public override FontAwesome Icon => FontAwesome.fa_osu_mod_spunout; + public override string Description => @"Spinners will be automatically completed"; + public override double ScoreMultiplier => 0.9; + public override bool Ranked => true; + public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(OsuModAutopilot) }; + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs new file mode 100644 index 0000000000..797e0af0ad --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Linq; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModSuddenDeath : ModSuddenDeath + { + public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot) }).ToArray(); + } +} diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModTarget.cs b/osu.Game.Rulesets.Osu/Mods/OsuModTarget.cs new file mode 100644 index 0000000000..b2b5130be3 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Mods/OsuModTarget.cs @@ -0,0 +1,17 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Graphics; +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Osu.Mods +{ + public class OsuModTarget : Mod + { + public override string Name => "Target"; + public override string ShortenedName => "TP"; + public override FontAwesome Icon => FontAwesome.fa_osu_mod_target; + public override string Description => @""; + public override double ScoreMultiplier => 1; + } +} diff --git a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj index 05dec5a20d..7d6001359a 100644 --- a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj +++ b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj @@ -51,6 +51,21 @@ + + + + + + + + + + + + + + + @@ -108,7 +123,7 @@ - + diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs deleted file mode 100644 index 8d13954cf4..0000000000 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Beatmaps; -using osu.Game.Rulesets.Mods; -using osu.Game.Rulesets.Scoring; -using osu.Game.Rulesets.Taiko.Objects; -using osu.Game.Rulesets.Taiko.Replays; -using osu.Game.Users; - -namespace osu.Game.Rulesets.Taiko.Mods -{ - public class TaikoModNoFail : ModNoFail - { - - } - - public class TaikoModEasy : ModEasy - { - - } - - public class TaikoModHidden : ModHidden - { - public override string Description => @"The notes fade out before you hit them!"; - public override double ScoreMultiplier => 1.06; - } - - public class TaikoModHardRock : ModHardRock - { - public override double ScoreMultiplier => 1.06; - public override bool Ranked => true; - } - - public class TaikoModSuddenDeath : ModSuddenDeath - { - - } - - public class TaikoModDaycore : ModDaycore - { - public override double ScoreMultiplier => 0.5; - } - - public class TaikoModDoubleTime : ModDoubleTime - { - public override double ScoreMultiplier => 1.12; - } - - public class TaikoModRelax : ModRelax - { - public override string Description => @"Relax! You will no longer get dizzyfied by ninja-like spinners, demanding drumrolls or unexpected katu's."; - } - - public class TaikoModHalfTime : ModHalfTime - { - public override double ScoreMultiplier => 0.5; - } - - public class TaikoModNightcore : ModNightcore - { - public override double ScoreMultiplier => 1.12; - } - - public class TaikoModFlashlight : ModFlashlight - { - public override double ScoreMultiplier => 1.12; - } - - public class TaikoModPerfect : ModPerfect - { - - } - - public class TaikoModAutoplay : ModAutoplay - { - protected override Score CreateReplayScore(Beatmap beatmap) => new Score - { - User = new User { Username = "mekkadosu!" }, - Replay = new TaikoAutoGenerator(beatmap).Generate(), - }; - } -} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModAutoplay.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModAutoplay.cs new file mode 100644 index 0000000000..239f0d5a6b --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModAutoplay.cs @@ -0,0 +1,24 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.Scoring; +using osu.Game.Rulesets.Taiko.Objects; +using osu.Game.Rulesets.Taiko.Replays; +using osu.Game.Users; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModAutoplay : ModAutoplay + { + protected override Score CreateReplayScore(Beatmap beatmap) + { + return new Score + { + User = new User { Username = "mekkadosu!" }, + Replay = new TaikoAutoGenerator(beatmap).Generate(), + }; + } + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModDaycore.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModDaycore.cs new file mode 100644 index 0000000000..c50878c6a3 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModDaycore.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModDaycore : ModDaycore + { + public override double ScoreMultiplier => 0.5; + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModDoubleTime.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModDoubleTime.cs new file mode 100644 index 0000000000..2ae52b4549 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModDoubleTime.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModDoubleTime : ModDoubleTime + { + public override double ScoreMultiplier => 1.12; + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModEasy.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModEasy.cs new file mode 100644 index 0000000000..1c5e43f411 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModEasy.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModEasy : ModEasy + { + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs new file mode 100644 index 0000000000..a2c6d7f9e0 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModFlashlight : ModFlashlight + { + public override double ScoreMultiplier => 1.12; + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModHalfTime.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModHalfTime.cs new file mode 100644 index 0000000000..9813f8b78e --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModHalfTime.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModHalfTime : ModHalfTime + { + public override double ScoreMultiplier => 0.5; + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModHardRock.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModHardRock.cs new file mode 100644 index 0000000000..ba304c41d8 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModHardRock.cs @@ -0,0 +1,13 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModHardRock : ModHardRock + { + public override double ScoreMultiplier => 1.06; + public override bool Ranked => true; + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs new file mode 100644 index 0000000000..b0ad43b851 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs @@ -0,0 +1,13 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModHidden : ModHidden + { + public override string Description => @"The notes fade out before you hit them!"; + public override double ScoreMultiplier => 1.06; + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModNightcore.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModNightcore.cs new file mode 100644 index 0000000000..0504b7c5b6 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModNightcore.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModNightcore : ModNightcore + { + public override double ScoreMultiplier => 1.12; + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModNoFail.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModNoFail.cs new file mode 100644 index 0000000000..3e10f58bbd --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModNoFail.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModNoFail : ModNoFail + { + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModPerfect.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModPerfect.cs new file mode 100644 index 0000000000..7388283d41 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModPerfect.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModPerfect : ModPerfect + { + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs new file mode 100644 index 0000000000..ec2385bfba --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModRelax : ModRelax + { + public override string Description => @"Relax! You will no longer get dizzyfied by ninja-like spinners, demanding drumrolls or unexpected katu's."; + } +} diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModSuddenDeath.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModSuddenDeath.cs new file mode 100644 index 0000000000..129d181616 --- /dev/null +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModSuddenDeath.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Rulesets.Mods; + +namespace osu.Game.Rulesets.Taiko.Mods +{ + public class TaikoModSuddenDeath : ModSuddenDeath + { + } +} diff --git a/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj b/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj index 1aed86f8f9..36ac9384cf 100644 --- a/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj +++ b/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj @@ -49,6 +49,18 @@ + + + + + + + + + + + + @@ -94,7 +106,7 @@ - +