2019-01-24 16:43:03 +08:00
|
|
|
|
// 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
|
|
|
|
|
2018-01-09 12:41:57 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
2024-12-22 10:17:03 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
|
|
|
|
using osu.Game.Configuration;
|
|
|
|
|
using osu.Game.Rulesets.Judgements;
|
2018-01-09 12:41:57 +08:00
|
|
|
|
using osu.Game.Rulesets.Mods;
|
2024-12-22 10:17:03 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2018-01-09 12:41:57 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Mods
|
|
|
|
|
{
|
|
|
|
|
public class OsuModSuddenDeath : ModSuddenDeath
|
|
|
|
|
{
|
2022-04-27 04:09:51 +08:00
|
|
|
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[]
|
|
|
|
|
{
|
2022-11-01 18:47:20 +08:00
|
|
|
|
typeof(OsuModTargetPractice),
|
2022-04-27 04:09:51 +08:00
|
|
|
|
}).ToArray();
|
2024-12-22 10:17:03 +08:00
|
|
|
|
|
|
|
|
|
[SettingSource("Fail on slider tail miss", "Fail when missing on the end of a slider")]
|
|
|
|
|
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-01-09 12:41:57 +08:00
|
|
|
|
}
|
|
|
|
|
}
|