From ecc0d0b11c14073f9f7a675cc4825aaeac861d7c Mon Sep 17 00:00:00 2001 From: Shawdooow Date: Tue, 30 May 2017 12:49:06 -0400 Subject: [PATCH] Daycore mod --- osu.Game.Rulesets.Catch/CatchRuleset.cs | 9 ++++++++- osu.Game.Rulesets.Catch/Mods/CatchMod.cs | 5 +++++ osu.Game.Rulesets.Mania/ManiaRuleset.cs | 9 ++++++++- osu.Game.Rulesets.Mania/Mods/ManiaMod.cs | 5 +++++ osu.Game.Rulesets.Osu/Mods/OsuMod.cs | 5 +++++ osu.Game.Rulesets.Osu/OsuRuleset.cs | 9 ++++++++- osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs | 5 +++++ osu.Game.Rulesets.Taiko/TaikoRuleset.cs | 9 ++++++++- osu.Game/Rulesets/Mods/ModDaycore.cs | 25 ++++++++++++++++++++++++ osu.Game/Rulesets/Mods/ModHalfTime.cs | 2 +- osu.Game/osu.Game.csproj | 1 + 11 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 osu.Game/Rulesets/Mods/ModDaycore.cs diff --git a/osu.Game.Rulesets.Catch/CatchRuleset.cs b/osu.Game.Rulesets.Catch/CatchRuleset.cs index 53449fd5f5..df212f7df7 100644 --- a/osu.Game.Rulesets.Catch/CatchRuleset.cs +++ b/osu.Game.Rulesets.Catch/CatchRuleset.cs @@ -28,7 +28,14 @@ namespace osu.Game.Rulesets.Catch { new CatchModEasy(), new CatchModNoFail(), - new CatchModHalfTime(), + new MultiMod + { + Mods = new Mod[] + { + new CatchModHalfTime(), + new CatchModDaycore(), + }, + }, }; case ModType.DifficultyIncrease: diff --git a/osu.Game.Rulesets.Catch/Mods/CatchMod.cs b/osu.Game.Rulesets.Catch/Mods/CatchMod.cs index 64a0c51b72..b0880d7e1d 100644 --- a/osu.Game.Rulesets.Catch/Mods/CatchMod.cs +++ b/osu.Game.Rulesets.Catch/Mods/CatchMod.cs @@ -32,6 +32,11 @@ namespace osu.Game.Rulesets.Catch.Mods } + public class CatchModDaycore : ModDaycore + { + public override double ScoreMultiplier => 0.5; + } + public class CatchModDoubleTime : ModDoubleTime { public override double ScoreMultiplier => 1.06; diff --git a/osu.Game.Rulesets.Mania/ManiaRuleset.cs b/osu.Game.Rulesets.Mania/ManiaRuleset.cs index 30d1846746..0af8825208 100644 --- a/osu.Game.Rulesets.Mania/ManiaRuleset.cs +++ b/osu.Game.Rulesets.Mania/ManiaRuleset.cs @@ -27,7 +27,14 @@ namespace osu.Game.Rulesets.Mania { new ManiaModEasy(), new ManiaModNoFail(), - new ManiaModHalfTime(), + new MultiMod + { + Mods = new Mod[] + { + new ManiaModHalfTime(), + new ManiaModDaycore(), + }, + }, }; case ModType.DifficultyIncrease: diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs b/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs index b402d3a010..f64f96e6c2 100644 --- a/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs +++ b/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs @@ -34,6 +34,11 @@ namespace osu.Game.Rulesets.Mania.Mods } + public class ManiaModDaycore : ModDaycore + { + public override double ScoreMultiplier => 0.5; + } + public class ManiaModDoubleTime : ModDoubleTime { public override double ScoreMultiplier => 1.0; diff --git a/osu.Game.Rulesets.Osu/Mods/OsuMod.cs b/osu.Game.Rulesets.Osu/Mods/OsuMod.cs index cc06946d38..3b0cfc1ef1 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuMod.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuMod.cs @@ -39,6 +39,11 @@ namespace osu.Game.Rulesets.Osu.Mods 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; diff --git a/osu.Game.Rulesets.Osu/OsuRuleset.cs b/osu.Game.Rulesets.Osu/OsuRuleset.cs index af4a099e0d..bfed889b36 100644 --- a/osu.Game.Rulesets.Osu/OsuRuleset.cs +++ b/osu.Game.Rulesets.Osu/OsuRuleset.cs @@ -46,7 +46,14 @@ namespace osu.Game.Rulesets.Osu { new OsuModEasy(), new OsuModNoFail(), - new OsuModHalfTime(), + new MultiMod + { + Mods = new Mod[] + { + new OsuModHalfTime(), + new OsuModDaycore(), + }, + }, }; case ModType.DifficultyIncrease: diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs index 8b7a099b9a..abaa8c1bc1 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoMod.cs @@ -37,6 +37,11 @@ namespace osu.Game.Rulesets.Taiko.Mods } + public class TaikoModDaycore : ModDaycore + { + public override double ScoreMultiplier => 0.5; + } + public class TaikoModDoubleTime : ModDoubleTime { public override double ScoreMultiplier => 1.12; diff --git a/osu.Game.Rulesets.Taiko/TaikoRuleset.cs b/osu.Game.Rulesets.Taiko/TaikoRuleset.cs index 7c169f820b..303d936fb9 100644 --- a/osu.Game.Rulesets.Taiko/TaikoRuleset.cs +++ b/osu.Game.Rulesets.Taiko/TaikoRuleset.cs @@ -28,7 +28,14 @@ namespace osu.Game.Rulesets.Taiko { new TaikoModEasy(), new TaikoModNoFail(), - new TaikoModHalfTime(), + new MultiMod + { + Mods = new Mod[] + { + new TaikoModHalfTime(), + new TaikoModDaycore(), + }, + }, }; case ModType.DifficultyIncrease: diff --git a/osu.Game/Rulesets/Mods/ModDaycore.cs b/osu.Game/Rulesets/Mods/ModDaycore.cs new file mode 100644 index 0000000000..2853a7372f --- /dev/null +++ b/osu.Game/Rulesets/Mods/ModDaycore.cs @@ -0,0 +1,25 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Audio; +using osu.Framework.Timing; +using osu.Game.Graphics; + +namespace osu.Game.Rulesets.Mods +{ + public abstract class ModDaycore : ModHalfTime + { + public override string Name => "Daycore"; + public override FontAwesome Icon => FontAwesome.fa_osu_mod_nightcore; + public override string Description => "whoaaaaa"; + + public override void ApplyToClock(IAdjustableClock clock) + { + var pitchAdjust = clock as IHasPitchAdjust; + if (pitchAdjust != null) + pitchAdjust.PitchAdjust = 0.75; + else + base.ApplyToClock(clock); + } + } +} \ No newline at end of file diff --git a/osu.Game/Rulesets/Mods/ModHalfTime.cs b/osu.Game/Rulesets/Mods/ModHalfTime.cs index 207a6ec2a1..14aede0809 100644 --- a/osu.Game/Rulesets/Mods/ModHalfTime.cs +++ b/osu.Game/Rulesets/Mods/ModHalfTime.cs @@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Mods public override double ScoreMultiplier => 1.12; - public void ApplyToClock(IAdjustableClock clock) + public virtual void ApplyToClock(IAdjustableClock clock) { clock.Rate = 0.75; } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 0ec0624978..09b7784d47 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -125,6 +125,7 @@ +