mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:17:51 +08:00
Add mod perfect relaxed
This commit is contained in:
parent
3a1c05337d
commit
bf6a36aa42
11
osu.Game.Rulesets.Osu/Mods/OsuModPerfectRelaxed.cs
Normal file
11
osu.Game.Rulesets.Osu/Mods/OsuModPerfectRelaxed.cs
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Rulesets.Mods;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
public class OsuModPerfectRelaxed : ModPerfectRelaxed
|
||||
{
|
||||
}
|
||||
}
|
@ -166,7 +166,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
return new Mod[]
|
||||
{
|
||||
new OsuModHardRock(),
|
||||
new MultiMod(new OsuModSuddenDeath(), new OsuModPerfect()),
|
||||
new MultiMod(new OsuModSuddenDeath(), new OsuModPerfect(), new OsuModPerfectRelaxed()),
|
||||
new MultiMod(new OsuModDoubleTime(), new OsuModNightcore()),
|
||||
new OsuModHidden(),
|
||||
new MultiMod(new OsuModFlashlight(), new OsuModBlinds()),
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override IconUsage? Icon => OsuIcon.ModCinema;
|
||||
public override LocalisableString Description => "Watch the video without visual distractions.";
|
||||
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModFailCondition) }).ToArray();
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModFailCondition), typeof(ModPerfectRelaxed) }).ToArray();
|
||||
|
||||
public void ApplyToHUD(HUDOverlay overlay)
|
||||
{
|
||||
|
58
osu.Game/Rulesets/Mods/ModPerfectRelaxed.cs
Normal file
58
osu.Game/Rulesets/Mods/ModPerfectRelaxed.cs
Normal file
@ -0,0 +1,58 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
public abstract class ModPerfectRelaxed : Mod, IApplicableToHitObject, IApplicableToBeatmap
|
||||
{
|
||||
public override string Name => "Perfect Relaxed";
|
||||
public override string Acronym => "PFR";
|
||||
public override IconUsage? Icon => OsuIcon.ModPerfect;
|
||||
public override ModType Type => ModType.DifficultyIncrease;
|
||||
public override double ScoreMultiplier => 1;
|
||||
public override LocalisableString Description => "300 or miss.";
|
||||
public override bool Ranked => false;
|
||||
|
||||
public void ApplyToHitObject(HitObject ho) {
|
||||
/*
|
||||
ho.HitWindows = new HitWindowsPerfect();
|
||||
ho.HitWindows.SetDifficulty(6);
|
||||
*/
|
||||
}
|
||||
|
||||
public void ApplyToBeatmap(IBeatmap beatmap)
|
||||
{
|
||||
BeatmapDifficulty bd = beatmap.Difficulty;
|
||||
|
||||
foreach(var ho in beatmap.HitObjects){
|
||||
ho.HitWindows = new HitWindowsPerfect(bd);
|
||||
|
||||
foreach(var nested_ho in ho.NestedHitObjects) {
|
||||
nested_ho.HitWindows = new HitWindowsPerfect(bd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class HitWindowsPerfect : HitWindows {
|
||||
public HitWindowsPerfect(BeatmapDifficulty bd) {
|
||||
this.SetDifficulty(bd.OverallDifficulty);
|
||||
}
|
||||
|
||||
public override bool IsHitResultAllowed(HitResult result) {
|
||||
return result == HitResult.Great || result == HitResult.Miss;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user