2017-02-17 04:05:03 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Modes
|
|
|
|
|
{
|
2017-02-23 19:59:27 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The base class for gameplay modifiers.
|
|
|
|
|
/// </summary>
|
2017-02-18 19:44:46 +08:00
|
|
|
|
public abstract class Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
2017-02-23 19:57:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of this mod.
|
|
|
|
|
/// </summary>
|
2017-02-18 19:44:46 +08:00
|
|
|
|
public abstract Mods Name { get; }
|
2017-02-23 19:57:58 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The icon of this mod.
|
|
|
|
|
/// </summary>
|
2017-02-18 19:44:46 +08:00
|
|
|
|
public abstract FontAwesome Icon { get; }
|
2017-02-23 19:57:58 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-03-02 08:57:33 +08:00
|
|
|
|
/// The user readable description of this mod.
|
2017-02-23 19:57:58 +08:00
|
|
|
|
/// </summary>
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract string Description { get; }
|
2017-02-23 19:57:58 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-03-02 08:57:33 +08:00
|
|
|
|
/// The score multiplier of this mod.
|
2017-02-23 19:57:58 +08:00
|
|
|
|
/// </summary>
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract double ScoreMultiplier { get; }
|
2017-02-23 19:57:58 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-03-02 08:57:33 +08:00
|
|
|
|
/// Returns if this mod is ranked.
|
2017-02-23 19:57:58 +08:00
|
|
|
|
/// </summary>
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract bool Ranked { get; }
|
2017-02-23 19:57:58 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-03-02 08:57:33 +08:00
|
|
|
|
/// The mods this mod cannot be enabled with.
|
2017-02-23 19:57:58 +08:00
|
|
|
|
/// </summary>
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract Mods[] DisablesMods { get; }
|
2017-02-18 19:44:46 +08:00
|
|
|
|
}
|
2017-02-17 04:05:03 +08:00
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModNoFail : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.NoFail;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_nofail;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"You can't fail, no matter what.";
|
|
|
|
|
public override double ScoreMultiplier => 0.5;
|
|
|
|
|
public override bool Ranked => true;
|
|
|
|
|
public override Mods[] DisablesMods => new Mods[] { Mods.Relax, Mods.Autopilot, Mods.SuddenDeath, Mods.Perfect };
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModEasy : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.Easy;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_easy;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"Reduces overall difficulty - larger circles, more forgiving HP drain, less accuracy required.";
|
|
|
|
|
public override double ScoreMultiplier => 0.5;
|
|
|
|
|
public override bool Ranked => true;
|
|
|
|
|
public override Mods[] DisablesMods => new Mods[] { Mods.HardRock };
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModHidden : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.Hidden;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_hidden;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override bool Ranked => true;
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModHardRock : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.HardRock;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_hardrock;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"Everything just got a bit harder...";
|
|
|
|
|
public override Mods[] DisablesMods => new Mods[] { Mods.Easy };
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModSuddenDeath : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.SuddenDeath;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_suddendeath;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"Miss a note and fail.";
|
|
|
|
|
public override double ScoreMultiplier => 1;
|
|
|
|
|
public override bool Ranked => true;
|
|
|
|
|
public override Mods[] DisablesMods => new Mods[] { Mods.NoFail, Mods.Relax, Mods.Autopilot, Mods.Autoplay, Mods.Cinema };
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModDoubleTime : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.DoubleTime;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_doubletime;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"Zoooooooooom";
|
|
|
|
|
public override bool Ranked => true;
|
|
|
|
|
public override Mods[] DisablesMods => new Mods[] { Mods.HalfTime };
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModRelax : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.Relax;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_relax;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override double ScoreMultiplier => 0;
|
|
|
|
|
public override bool Ranked => false;
|
|
|
|
|
public override Mods[] DisablesMods => new Mods[] { Mods.Autopilot, Mods.Autoplay, Mods.Cinema, Mods.NoFail, Mods.SuddenDeath, Mods.Perfect };
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModHalfTime : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.HalfTime;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_halftime;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"Less zoom";
|
|
|
|
|
public override bool Ranked => true;
|
|
|
|
|
public override Mods[] DisablesMods => new Mods[] { Mods.DoubleTime, Mods.Nightcore };
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModNightcore : ModDoubleTime
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.Nightcore;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_nightcore;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"uguuuuuuuu";
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public abstract class ModFlashlight : Mod
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.Flashlight;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_flashlight;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"Restricted view area.";
|
|
|
|
|
public override bool Ranked => true;
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ModAutoplay : Mod
|
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.Autoplay;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_auto;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"Watch a perfect automated play through the song";
|
|
|
|
|
public override double ScoreMultiplier => 0;
|
|
|
|
|
public override bool Ranked => false;
|
|
|
|
|
public override Mods[] DisablesMods => new Mods[] { Mods.Relax, Mods.Autopilot, Mods.SpunOut, Mods.SuddenDeath, Mods.Perfect };
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-02-17 06:32:27 +08:00
|
|
|
|
public class ModPerfect : ModSuddenDeath
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.Perfect;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_perfect;
|
2017-03-02 08:57:33 +08:00
|
|
|
|
public override string Description => @"SS or quit.";
|
2017-02-17 04:05:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-02-22 23:34:22 +08:00
|
|
|
|
public class ModCinema : ModAutoplay
|
2017-02-17 04:05:03 +08:00
|
|
|
|
{
|
|
|
|
|
public override Mods Name => Mods.Cinema;
|
|
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_cinema;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Flags]
|
|
|
|
|
public enum Mods
|
|
|
|
|
{
|
|
|
|
|
None = 0,
|
|
|
|
|
|
|
|
|
|
[Description(@"No Fail")]
|
|
|
|
|
NoFail = 1 << 0,
|
|
|
|
|
|
|
|
|
|
[Description(@"Easy")]
|
|
|
|
|
Easy = 1 << 1,
|
|
|
|
|
|
|
|
|
|
//NoVideo = 1 << 2,
|
|
|
|
|
|
|
|
|
|
[Description(@"Hidden")]
|
|
|
|
|
Hidden = 1 << 3,
|
|
|
|
|
|
|
|
|
|
[Description(@"Hard Rock")]
|
|
|
|
|
HardRock = 1 << 4,
|
|
|
|
|
|
|
|
|
|
[Description(@"Sudden Death")]
|
|
|
|
|
SuddenDeath = 1 << 5,
|
|
|
|
|
|
|
|
|
|
[Description(@"Double Time")]
|
|
|
|
|
DoubleTime = 1 << 6,
|
|
|
|
|
|
|
|
|
|
[Description(@"Relax")]
|
|
|
|
|
Relax = 1 << 7,
|
|
|
|
|
|
|
|
|
|
[Description(@"Halftime")]
|
|
|
|
|
HalfTime = 1 << 8,
|
|
|
|
|
|
|
|
|
|
[Description(@"Nightcore")]
|
|
|
|
|
Nightcore = 1 << 9,
|
|
|
|
|
|
|
|
|
|
[Description(@"Flashlight")]
|
|
|
|
|
Flashlight = 1 << 10,
|
|
|
|
|
|
|
|
|
|
[Description(@"Auto")]
|
|
|
|
|
Autoplay = 1 << 11,
|
|
|
|
|
|
|
|
|
|
[Description(@"Spun Out")]
|
|
|
|
|
SpunOut = 1 << 12,
|
|
|
|
|
|
|
|
|
|
[Description(@"Autopilot")]
|
2017-02-17 06:32:27 +08:00
|
|
|
|
Autopilot = 1 << 13,
|
2017-02-17 04:05:03 +08:00
|
|
|
|
|
|
|
|
|
[Description(@"Perfect")]
|
|
|
|
|
Perfect = 1 << 14,
|
|
|
|
|
|
|
|
|
|
[Description(@"4K")]
|
|
|
|
|
Key4 = 1 << 15,
|
|
|
|
|
|
|
|
|
|
[Description(@"5K")]
|
|
|
|
|
Key5 = 1 << 16,
|
|
|
|
|
|
|
|
|
|
[Description(@"6K")]
|
|
|
|
|
Key6 = 1 << 17,
|
|
|
|
|
|
|
|
|
|
[Description(@"7K")]
|
|
|
|
|
Key7 = 1 << 18,
|
|
|
|
|
|
|
|
|
|
[Description(@"8K")]
|
|
|
|
|
Key8 = 1 << 19,
|
|
|
|
|
|
|
|
|
|
[Description(@"Fade In")]
|
|
|
|
|
FadeIn = 1 << 20,
|
|
|
|
|
|
|
|
|
|
[Description(@"Random")]
|
|
|
|
|
Random = 1 << 21,
|
|
|
|
|
|
|
|
|
|
[Description(@"Cinema")]
|
|
|
|
|
Cinema = 1 << 22,
|
|
|
|
|
|
|
|
|
|
[Description(@"Target Practice")]
|
|
|
|
|
Target = 1 << 23,
|
|
|
|
|
|
|
|
|
|
[Description(@"9K")]
|
|
|
|
|
Key9 = 1 << 24,
|
|
|
|
|
|
|
|
|
|
[Description(@"Co-Op")]
|
|
|
|
|
KeyCoop = 1 << 25,
|
|
|
|
|
|
|
|
|
|
[Description(@"1K")]
|
|
|
|
|
Key1 = 1 << 26,
|
|
|
|
|
|
|
|
|
|
[Description(@"3K")]
|
|
|
|
|
Key3 = 1 << 27,
|
|
|
|
|
|
|
|
|
|
[Description(@"2K")]
|
|
|
|
|
Key2 = 1 << 28,
|
|
|
|
|
|
|
|
|
|
LastMod = 1 << 29,
|
|
|
|
|
|
|
|
|
|
KeyMod = Key1 | Key2 | Key3 | Key4 | Key5 | Key6 | Key7 | Key8 | Key9 | KeyCoop,
|
2017-02-17 06:32:27 +08:00
|
|
|
|
FreeModAllowed = NoFail | Easy | Hidden | HardRock | SuddenDeath | Flashlight | FadeIn | Relax | Autopilot | SpunOut | KeyMod,
|
2017-02-17 04:05:03 +08:00
|
|
|
|
ScoreIncreaseMods = Hidden | HardRock | DoubleTime | Flashlight | FadeIn
|
|
|
|
|
}
|
2017-03-02 08:57:33 +08:00
|
|
|
|
}
|