1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-24 10:53:22 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.1 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
using System;
using System.Linq;
using osu.Framework.Bindables;
using osu.Game.Configuration;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Scoring;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Rulesets.Osu.Mods
{
public class OsuModSuddenDeath : ModSuddenDeath
{
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[]
{
2022-11-01 18:47:20 +08:00
typeof(OsuModTargetPractice),
}).ToArray();
2025-02-18 12:04:38 +08:00
[SettingSource("Also fail when missing a slider tail")]
public BindableBool FailOnSliderTail { get; } = new BindableBool();
protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result)
{
2025-02-18 12:04:38 +08:00
if (base.FailCondition(healthProcessor, result))
return true;
2025-02-18 12:04:38 +08:00
if (FailOnSliderTail.Value && result.HitObject is SliderTailCircle && !result.IsHit)
return true;
return false;
}
}
}