1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 16:27:43 +08:00
osu-lazer/osu.Game.Rulesets.Mania/Mods/ManiaModNoRelease.cs
Nathan Du 960d552dc1 Initial implemention of the No Release mod
This commit adds a new osu!mania mod No Release that relaxes tail
judgements. The current implementation automatically awards Perfect
(or Meh if the hold note is broken midway) for a hold note tail at
the end of its Perfect window, as long as it is held by then.

Tests are pending for the next commit.
2024-06-28 22:21:08 +08:00

36 lines
1.1 KiB
C#

// 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.Framework.Localisation;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Mods
{
public class ManiaModNoRelease : Mod, IApplicableToDrawableHitObject
{
public override string Name => "No Release";
public override string Acronym => "NR";
public override LocalisableString Description => "No more timing the end of hold notes.";
public override double ScoreMultiplier => 0.9;
public override ModType Type => ModType.DifficultyReduction;
public void ApplyToDrawableHitObject(DrawableHitObject drawable)
{
if (drawable is DrawableHoldNote hold)
{
hold.HitObjectApplied += dho =>
{
((DrawableHoldNote)dho).Tail.LateReleaseResult = HitResult.Perfect;
};
}
}
}
}