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
|
|
|
|
|
|
|
|
|
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-04-13 17:19:50 +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
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2025-02-18 12:04:38 +08:00
|
|
|
|
[SettingSource("Also fail when missing a slider tail")]
|
|
|
|
|
public BindableBool FailOnSliderTail { get; } = new BindableBool();
|
2024-12-22 10:17:03 +08:00
|
|
|
|
|
2024-12-23 06:46:01 +08:00
|
|
|
|
protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result)
|
|
|
|
|
{
|
2025-02-18 12:04:38 +08:00
|
|
|
|
if (base.FailCondition(healthProcessor, result))
|
2024-12-23 06:46:01 +08:00
|
|
|
|
return true;
|
|
|
|
|
|
2025-02-18 12:04:38 +08:00
|
|
|
|
if (FailOnSliderTail.Value && result.HitObject is SliderTailCircle && !result.IsHit)
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
return false;
|
2024-12-23 06:46:01 +08:00
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|