From 81854e221aa7bf86c7b29e237aaf067fbc066d2d Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Fri, 30 Aug 2024 18:28:19 +0900 Subject: [PATCH] Apply suggested changes to fix implementation + tests --- osu.Game/Rulesets/Scoring/HealthProcessor.cs | 4 ++-- osu.Game/Tests/Visual/ModForceFailTestScene.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Rulesets/Scoring/HealthProcessor.cs b/osu.Game/Rulesets/Scoring/HealthProcessor.cs index b6bb3a98d8..09aad81f94 100644 --- a/osu.Game/Rulesets/Scoring/HealthProcessor.cs +++ b/osu.Game/Rulesets/Scoring/HealthProcessor.cs @@ -26,14 +26,14 @@ namespace osu.Game.Rulesets.Scoring if (CheckDefaultFailCondition(result)) { - bool allowFail = false; + bool allowFail = true; for (int i = 0; i < Mods.Value.Count; i++) { if (Mods.Value[i] is IBlockFail blockMod) { // Intentionally does not early return so that all mods have a chance to update internal states (e.g. ModEasyWithExtraLives). - allowFail |= blockMod.AllowFail(); + allowFail &= blockMod.AllowFail(); break; } } diff --git a/osu.Game/Tests/Visual/ModForceFailTestScene.cs b/osu.Game/Tests/Visual/ModForceFailTestScene.cs index 4c6988f5ed..86b5527a95 100644 --- a/osu.Game/Tests/Visual/ModForceFailTestScene.cs +++ b/osu.Game/Tests/Visual/ModForceFailTestScene.cs @@ -40,12 +40,12 @@ namespace osu.Game.Tests.Visual protected override bool CheckModsAllowFailure() => true; - public bool CheckFailed(bool failed) + public bool CheckFailed(bool shouldHaveFailed) { - if (!failed) + if (!shouldHaveFailed) return ScoreProcessor.HasCompleted.Value && !HealthProcessor.HasFailed; - return HealthProcessor.HasFailed; + return HealthProcessor.HasFailed || ScoreProcessor.HasFailed; } }