1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:22:54 +08:00

Add difficulty calculation mod types

This commit is contained in:
smoogipoo 2018-05-28 01:10:41 +09:00
parent 68910745d8
commit 2ccffb9ac4
4 changed files with 175 additions and 8 deletions

View File

@ -96,6 +96,20 @@ namespace osu.Game.Rulesets.Mania
yield return new ManiaModSuddenDeath(); yield return new ManiaModSuddenDeath();
} }
private static readonly Mod[] key_mods =
{
new MultiMod(),
new ManiaModKey1(),
new ManiaModKey2(),
new ManiaModKey3(),
new ManiaModKey4(),
new ManiaModKey5(),
new ManiaModKey6(),
new ManiaModKey7(),
new ManiaModKey8(),
new ManiaModKey9(),
};
public override IEnumerable<Mod> GetModsFor(ModType type) public override IEnumerable<Mod> GetModsFor(ModType type)
{ {
switch (type) switch (type)
@ -114,7 +128,6 @@ namespace osu.Game.Rulesets.Mania
}, },
}, },
}; };
case ModType.DifficultyIncrease: case ModType.DifficultyIncrease:
return new Mod[] return new Mod[]
{ {
@ -145,7 +158,6 @@ namespace osu.Game.Rulesets.Mania
}, },
new ManiaModFlashlight(), new ManiaModFlashlight(),
}; };
case ModType.Special: case ModType.Special:
return new Mod[] return new Mod[]
{ {
@ -176,7 +188,85 @@ namespace osu.Game.Rulesets.Mania
}, },
}, },
}; };
case ModType.DifficultyCalculation:
var mods = new List<Mod>();
foreach (var keyMod in key_mods)
{
mods.AddRange(new[]
{
keyMod,
new MultiMod
{
Mods = new[]
{
keyMod,
new ManiaModDoubleTime(),
}
},
new MultiMod
{
Mods = new[]
{
keyMod,
new ManiaModHalfTime(),
}
},
new MultiMod
{
Mods = new[]
{
keyMod,
new ManiaModEasy(),
}
},
new MultiMod
{
Mods = new[]
{
keyMod,
new ManiaModHardRock(),
}
},
new MultiMod
{
Mods = new[]
{
keyMod,
new ManiaModEasy(),
new ManiaModDoubleTime(),
}
},
new MultiMod
{
Mods = new[]
{
keyMod,
new ManiaModEasy(),
new ManiaModHalfTime(),
}
},
new MultiMod
{
Mods = new[]
{
keyMod,
new ManiaModHardRock(),
new ManiaModDoubleTime(),
}
},
new MultiMod
{
Mods = new[]
{
keyMod,
new ManiaModHardRock(),
new ManiaModHalfTime(),
}
},
});
}
return mods.ToArray();
default: default:
return new Mod[] { }; return new Mod[] { };
} }

View File

@ -102,7 +102,6 @@ namespace osu.Game.Rulesets.Osu
}, },
}, },
}; };
case ModType.DifficultyIncrease: case ModType.DifficultyIncrease:
return new Mod[] return new Mod[]
{ {
@ -126,7 +125,6 @@ namespace osu.Game.Rulesets.Osu
new OsuModHidden(), new OsuModHidden(),
new OsuModFlashlight(), new OsuModFlashlight(),
}; };
case ModType.Special: case ModType.Special:
return new Mod[] return new Mod[]
{ {
@ -143,7 +141,47 @@ namespace osu.Game.Rulesets.Osu
}, },
new OsuModTarget(), new OsuModTarget(),
}; };
case ModType.DifficultyCalculation:
return new Mod[]
{
new MultiMod(),
new OsuModDoubleTime(),
new OsuModHalfTime(),
new OsuModEasy(),
new OsuModHardRock(),
new MultiMod
{
Mods = new Mod[]
{
new OsuModEasy(),
new OsuModDoubleTime(),
}
},
new MultiMod
{
Mods = new Mod[]
{
new OsuModEasy(),
new OsuModHalfTime(),
}
},
new MultiMod
{
Mods = new Mod[]
{
new OsuModHardRock(),
new OsuModDoubleTime(),
}
},
new MultiMod
{
Mods = new Mod[]
{
new OsuModHardRock(),
new OsuModHalfTime(),
}
},
};
default: default:
return new Mod[] { }; return new Mod[] { };
} }

View File

@ -93,7 +93,6 @@ namespace osu.Game.Rulesets.Taiko
}, },
}, },
}; };
case ModType.DifficultyIncrease: case ModType.DifficultyIncrease:
return new Mod[] return new Mod[]
{ {
@ -117,7 +116,6 @@ namespace osu.Game.Rulesets.Taiko
new TaikoModHidden(), new TaikoModHidden(),
new TaikoModFlashlight(), new TaikoModFlashlight(),
}; };
case ModType.Special: case ModType.Special:
return new Mod[] return new Mod[]
{ {
@ -133,7 +131,47 @@ namespace osu.Game.Rulesets.Taiko
}, },
}, },
}; };
case ModType.DifficultyCalculation:
return new Mod[]
{
new MultiMod(),
new TaikoModDoubleTime(),
new TaikoModHalfTime(),
new TaikoModEasy(),
new TaikoModHardRock(),
new MultiMod
{
Mods = new Mod[]
{
new TaikoModEasy(),
new TaikoModDoubleTime(),
}
},
new MultiMod
{
Mods = new Mod[]
{
new TaikoModEasy(),
new TaikoModHalfTime(),
}
},
new MultiMod
{
Mods = new Mod[]
{
new TaikoModHardRock(),
new TaikoModDoubleTime(),
}
},
new MultiMod
{
Mods = new Mod[]
{
new TaikoModHardRock(),
new TaikoModHalfTime(),
}
},
};
default: default:
return new Mod[] { }; return new Mod[] { };
} }

View File

@ -8,5 +8,6 @@ namespace osu.Game.Rulesets.Mods
DifficultyReduction, DifficultyReduction,
DifficultyIncrease, DifficultyIncrease,
Special, Special,
DifficultyCalculation
} }
} }