From fa5922337da11583469482d26b8b4043badc8574 Mon Sep 17 00:00:00 2001 From: Plextora <71889427+Plextora@users.noreply.github.com> Date: Sat, 21 Dec 2024 21:17:03 -0500 Subject: [PATCH 1/6] Fail on slider tail miss option in Sudden Death --- osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs index e661610fe773..f781bf0b908c 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs @@ -3,7 +3,12 @@ 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; namespace osu.Game.Rulesets.Osu.Mods { @@ -13,5 +18,16 @@ public class OsuModSuddenDeath : ModSuddenDeath { typeof(OsuModTargetPractice), }).ToArray(); + + [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; + } } } From 87697a72e333d1468a35d4a3fec388319cc16e2a Mon Sep 17 00:00:00 2001 From: Plextora <71889427+Plextora@users.noreply.github.com> Date: Sat, 21 Dec 2024 21:32:09 -0500 Subject: [PATCH 2/6] Rename to PFC mode --- osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs index f781bf0b908c..3a65ba3b10f7 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs @@ -19,7 +19,7 @@ public class OsuModSuddenDeath : ModSuddenDeath typeof(OsuModTargetPractice), }).ToArray(); - [SettingSource("Fail on slider tail miss", "Fail when missing on the end of a slider")] + [SettingSource("PFC mode", "Fail when missing on a slider tail")] public BindableBool SliderTailMiss { get; } = new BindableBool(); protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result) From 420c5577d3a8aef97af82158110211c72cf5f8aa Mon Sep 17 00:00:00 2001 From: Plextora <71889427+Plextora@users.noreply.github.com> Date: Sat, 21 Dec 2024 22:55:30 -0500 Subject: [PATCH 3/6] Rename option (again) --- osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs index 3a65ba3b10f7..fb587a94ca9c 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs @@ -19,7 +19,7 @@ public class OsuModSuddenDeath : ModSuddenDeath typeof(OsuModTargetPractice), }).ToArray(); - [SettingSource("PFC mode", "Fail when missing on a slider tail")] + [SettingSource("Fail when missing on a slider tail")] public BindableBool SliderTailMiss { get; } = new BindableBool(); protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result) From 5c9278ee2f5c044e0b6565973497b559f620ab5e Mon Sep 17 00:00:00 2001 From: Plextora <71889427+Plextora@users.noreply.github.com> Date: Sat, 21 Dec 2024 22:56:42 -0500 Subject: [PATCH 4/6] One line return for FailCondition --- osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs index fb587a94ca9c..a90d44c4734a 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs @@ -22,12 +22,7 @@ public class OsuModSuddenDeath : ModSuddenDeath [SettingSource("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; - } + protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result) => ( + SliderTailMiss.Value && result.HitObject is SliderTailCircle && result.Type == HitResult.IgnoreMiss) || (result.Type.AffectsCombo() && !result.IsHit); } } From 047c448741a6c2ab038a04085ebab97048e8473d Mon Sep 17 00:00:00 2001 From: Plextora <71889427+Plextora@users.noreply.github.com> Date: Sun, 22 Dec 2024 12:09:27 -0500 Subject: [PATCH 5/6] Return base for default FailCondition --- osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs index a90d44c4734a..ea32b4868a3c 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs @@ -22,7 +22,7 @@ public class OsuModSuddenDeath : ModSuddenDeath [SettingSource("Fail when missing on a slider tail")] public BindableBool SliderTailMiss { get; } = new BindableBool(); - protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result) => ( - SliderTailMiss.Value && result.HitObject is SliderTailCircle && result.Type == HitResult.IgnoreMiss) || (result.Type.AffectsCombo() && !result.IsHit); + protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result) => + (SliderTailMiss.Value && result.HitObject is SliderTailCircle && result.Type == HitResult.IgnoreMiss) || base.FailCondition(healthProcessor, result); } } From fd1cc34e3fd01747eb132c04b831a22429be7c99 Mon Sep 17 00:00:00 2001 From: Plextora <71889427+Plextora@users.noreply.github.com> Date: Sun, 22 Dec 2024 17:46:01 -0500 Subject: [PATCH 6/6] No more one line return for FailCondition --- osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs index ea32b4868a3c..73d0403e3f47 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModSuddenDeath.cs @@ -22,7 +22,12 @@ public class OsuModSuddenDeath : ModSuddenDeath [SettingSource("Fail when missing on a slider tail")] public BindableBool SliderTailMiss { get; } = new BindableBool(); - protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result) => - (SliderTailMiss.Value && result.HitObject is SliderTailCircle && result.Type == HitResult.IgnoreMiss) || base.FailCondition(healthProcessor, result); + protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result) + { + if (SliderTailMiss.Value && result.HitObject is SliderTailCircle && result.Type == HitResult.IgnoreMiss) + return true; + + return base.FailCondition(healthProcessor, result); + } } }