1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 16:07:24 +08:00

Merge pull request #27677 from smoogipoo/fix-catch-banana-fail

Fix catch banana shower judgement causing fail when at 0 HP
This commit is contained in:
Bartłomiej Dach 2024-03-21 11:23:51 +01:00 committed by GitHub
commit 983385bafc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,7 @@ namespace osu.Game.Rulesets.Catch.Tests
[new Droplet(), 0.01, true],
[new TinyDroplet(), 0, false],
[new Banana(), 0, false],
[new BananaShower(), 0, false]
];
[TestCaseSource(nameof(test_cases))]

View File

@ -32,6 +32,10 @@ namespace osu.Game.Rulesets.Catch.Scoring
if (result.Type == HitResult.SmallTickMiss)
return false;
// on stable, banana showers don't exist as concrete objects themselves, so they can't cause a fail.
if (result.HitObject is BananaShower)
return false;
return base.CheckDefaultFailCondition(result);
}

View File

@ -108,6 +108,9 @@ namespace osu.Game.Rulesets.Scoring
increaseHp(h);
}
if (topLevelObjectCount == 0)
return testDrop;
if (!fail && currentHp < lowestHpEnd)
{
fail = true;