Make bananas explode even on miss

This commit is contained in:
Dean Herbert
2018-06-29 16:49:01 +09:00
parent f7fbf61306
commit f1a35f77d2
6 changed files with 12 additions and 30 deletions

View File

@ -10,6 +10,8 @@ namespace osu.Game.Rulesets.Catch.Judgements
public override bool AffectsCombo => false;
public override bool IsBonus => true;
public override bool ShouldExplode => true;
protected override int NumericResultFor(HitResult result)
{
switch (result)

View File

@ -1,21 +0,0 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Judgements
{
public class CatchBananaShowerJudgement : CatchJudgement
{
public override bool AffectsCombo => false;
public override bool IsBonus => true;
public CatchBananaShowerJudgement()
{
Result = HitResult.Perfect;
}
protected override int NumericResultFor(HitResult result) => 0;
protected override float HealthIncreaseFor(HitResult result) => 0;
}
}

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Judgements
@ -31,6 +32,12 @@ namespace osu.Game.Rulesets.Catch.Judgements
/// </summary>
public float HealthIncrease => HealthIncreaseFor(Result);
/// <summary>
/// Whether fruit on the platter should explode or drop.
/// Note that this is only checked if the owning object is also <see cref="IHasComboInformation.LastInCombo" />
/// </summary>
public virtual bool ShouldExplode => IsHit;
/// <summary>
/// Convert a <see cref="HitResult"/> to a base health increase.
/// </summary>