From 230278f2c94230803f11310b592dcbc15043274c Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 3 Dec 2023 01:45:15 +0900 Subject: [PATCH 1/2] Once again remove Mania passive HP drain --- .../ManiaHealthProcessorTest.cs | 31 +++++++++++++++++++ .../Scoring/ManiaHealthProcessor.cs | 8 +++++ 2 files changed, 39 insertions(+) create mode 100644 osu.Game.Rulesets.Mania.Tests/ManiaHealthProcessorTest.cs diff --git a/osu.Game.Rulesets.Mania.Tests/ManiaHealthProcessorTest.cs b/osu.Game.Rulesets.Mania.Tests/ManiaHealthProcessorTest.cs new file mode 100644 index 0000000000..315849f7de --- /dev/null +++ b/osu.Game.Rulesets.Mania.Tests/ManiaHealthProcessorTest.cs @@ -0,0 +1,31 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using NUnit.Framework; +using osu.Game.Rulesets.Mania.Beatmaps; +using osu.Game.Rulesets.Mania.Objects; +using osu.Game.Rulesets.Mania.Scoring; + +namespace osu.Game.Rulesets.Mania.Tests +{ + [TestFixture] + public class ManiaHealthProcessorTest + { + [Test] + public void TestNoDrain() + { + var processor = new ManiaHealthProcessor(0); + processor.ApplyBeatmap(new ManiaBeatmap(new StageDefinition(4)) + { + HitObjects = + { + new Note { StartTime = 0 }, + new Note { StartTime = 1000 }, + } + }); + + // No matter what, mania doesn't have passive HP drain. + Assert.That(processor.DrainRate, Is.Zero); + } + } +} diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs index 183550eb7b..34b1787a71 100644 --- a/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs +++ b/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs @@ -15,6 +15,14 @@ namespace osu.Game.Rulesets.Mania.Scoring { } + protected override double ComputeDrainRate() + { + // Base call is run only to compute HP recovery. + base.ComputeDrainRate(); + + return 0; + } + protected override IEnumerable EnumerateTopLevelHitObjects() => Beatmap.HitObjects; protected override IEnumerable EnumerateNestedHitObjects(HitObject hitObject) => hitObject.NestedHitObjects; From d0acb7f4f9e601f10b7650a217329cfb0b041158 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Mon, 4 Dec 2023 06:08:31 +0900 Subject: [PATCH 2/2] Improve commenting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartłomiej Dach --- osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs index 34b1787a71..a33eac83c2 100644 --- a/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs +++ b/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs @@ -17,7 +17,8 @@ namespace osu.Game.Rulesets.Mania.Scoring protected override double ComputeDrainRate() { - // Base call is run only to compute HP recovery. + // Base call is run only to compute HP recovery (namely, `HpMultiplierNormal`). + // This closely mirrors (broken) behaviour of stable and as such is preserved unchanged. base.ComputeDrainRate(); return 0;