mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 04:53:21 +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);
|
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]
|
[Test]
|
||||||
public void TestCatcherRandomStacking()
|
public void TestCatcherRandomStacking()
|
||||||
{
|
{
|
||||||
|
@ -210,6 +210,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
catchResult.CatcherAnimationState = CurrentState;
|
catchResult.CatcherAnimationState = CurrentState;
|
||||||
catchResult.CatcherHyperDash = HyperDashing;
|
catchResult.CatcherHyperDash = HyperDashing;
|
||||||
|
|
||||||
|
// Ignore JuiceStreams and BananaShowers
|
||||||
if (!(drawableObject is DrawablePalpableCatchHitObject palpableObject)) return;
|
if (!(drawableObject is DrawablePalpableCatchHitObject palpableObject)) return;
|
||||||
|
|
||||||
var hitObject = palpableObject.HitObject;
|
var hitObject = palpableObject.HitObject;
|
||||||
@ -244,6 +245,14 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
CurrentState = hitObject.Kiai ? CatcherAnimationState.Kiai : CatcherAnimationState.Idle;
|
CurrentState = hitObject.Kiai ? CatcherAnimationState.Kiai : CatcherAnimationState.Idle;
|
||||||
else if (!(hitObject is Banana))
|
else if (!(hitObject is Banana))
|
||||||
CurrentState = CatcherAnimationState.Fail;
|
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)
|
public void OnRevertResult(DrawableCatchHitObject drawableObject, JudgementResult result)
|
||||||
|
@ -6,11 +6,9 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Rulesets.Catch.Judgements;
|
|
||||||
using osu.Game.Rulesets.Catch.Objects.Drawables;
|
using osu.Game.Rulesets.Catch.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Catch.Replays;
|
using osu.Game.Rulesets.Catch.Replays;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Scoring;
|
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -72,18 +70,6 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
public void OnNewResult(DrawableCatchHitObject hitObject, JudgementResult result)
|
public void OnNewResult(DrawableCatchHitObject hitObject, JudgementResult result)
|
||||||
{
|
{
|
||||||
Catcher.OnNewResult(hitObject, 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);
|
comboDisplay.OnNewResult(hitObject, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user