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

34 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;
2018-04-13 17:19:50 +08:00
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();
2024-12-22 10:32:09 +08:00
[SettingSource("PFC mode", "Fail when missing on a slider tail")]
public BindableBool SliderTailMiss { get; } = new BindableBool();
protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result)
{
if (SliderTailMiss.Value && result.HitObject is SliderTailCircle && result.Type == HitResult.IgnoreMiss)
return true;
return result.Type.AffectsCombo() && !result.IsHit;
}
2018-04-13 17:19:50 +08:00
}
}