mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 02:02:55 +08:00
Merge pull request #15624 from Darius-Wattimena/fix-plate-clearing-missing-last-banana
Fix banana showers not clearing the plate when missing the last banana
This commit is contained in:
commit
c6c6b04f2b
@ -168,6 +168,28 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
checkHyperDash(false);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLastBananaShouldClearPlateOnMiss()
|
||||
{
|
||||
AddStep("catch fruit", () => attemptCatch(new Fruit()));
|
||||
checkPlate(1);
|
||||
AddStep("miss banana", () => attemptCatch(new Banana { X = 100 }));
|
||||
checkPlate(1);
|
||||
AddStep("miss last banana", () => attemptCatch(new Banana { LastInCombo = true, X = 100 }));
|
||||
checkPlate(0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLastBananaShouldClearPlateOnCatch()
|
||||
{
|
||||
AddStep("catch fruit", () => attemptCatch(new Fruit()));
|
||||
checkPlate(1);
|
||||
AddStep("catch banana", () => attemptCatch(new Banana()));
|
||||
checkPlate(2);
|
||||
AddStep("catch last banana", () => attemptCatch(new Banana { LastInCombo = true }));
|
||||
checkPlate(0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCatcherRandomStacking()
|
||||
{
|
||||
|
@ -210,6 +210,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
catchResult.CatcherAnimationState = CurrentState;
|
||||
catchResult.CatcherHyperDash = HyperDashing;
|
||||
|
||||
// Ignore JuiceStreams and BananaShowers
|
||||
if (!(drawableObject is DrawablePalpableCatchHitObject palpableObject)) return;
|
||||
|
||||
var hitObject = palpableObject.HitObject;
|
||||
@ -244,6 +245,14 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
CurrentState = hitObject.Kiai ? CatcherAnimationState.Kiai : CatcherAnimationState.Idle;
|
||||
else if (!(hitObject is Banana))
|
||||
CurrentState = CatcherAnimationState.Fail;
|
||||
|
||||
if (palpableObject.HitObject.LastInCombo)
|
||||
{
|
||||
if (result.Judgement is CatchJudgement catchJudgement && catchJudgement.ShouldExplodeFor(result))
|
||||
Explode();
|
||||
else
|
||||
Drop();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnRevertResult(DrawableCatchHitObject drawableObject, JudgementResult result)
|
||||
|
@ -6,11 +6,9 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Rulesets.Catch.Judgements;
|
||||
using osu.Game.Rulesets.Catch.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Catch.Replays;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osuTK;
|
||||
|
||||
@ -72,18 +70,6 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
public void OnNewResult(DrawableCatchHitObject hitObject, JudgementResult result)
|
||||
{
|
||||
Catcher.OnNewResult(hitObject, result);
|
||||
|
||||
if (!result.Type.IsScorable())
|
||||
return;
|
||||
|
||||
if (hitObject.HitObject.LastInCombo)
|
||||
{
|
||||
if (result.Judgement is CatchJudgement catchJudgement && catchJudgement.ShouldExplodeFor(result))
|
||||
Catcher.Explode();
|
||||
else
|
||||
Catcher.Drop();
|
||||
}
|
||||
|
||||
comboDisplay.OnNewResult(hitObject, result);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user