mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Fix draining processor failing gameplay on bonus misses and ignore hits
This commit is contained in:
parent
d07ea8f5b1
commit
16d893d40c
@ -142,6 +142,11 @@ namespace osu.Game.Rulesets.Scoring
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool CanFailOn(JudgementResult result)
|
||||
{
|
||||
return !result.Judgement.MaxResult.IsBonus() && result.Type != HitResult.IgnoreHit;
|
||||
}
|
||||
|
||||
protected override void Reset(bool storeResults)
|
||||
{
|
||||
base.Reset(storeResults);
|
||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
Health.Value += GetHealthIncreaseFor(result);
|
||||
|
||||
if (meetsAnyFailCondition(result))
|
||||
if (CanFailOn(result) && meetsAnyFailCondition(result))
|
||||
TriggerFailure();
|
||||
}
|
||||
|
||||
@ -68,6 +68,13 @@ namespace osu.Game.Rulesets.Scoring
|
||||
/// <returns>The health increase.</returns>
|
||||
protected virtual double GetHealthIncreaseFor(JudgementResult result) => result.HealthIncrease;
|
||||
|
||||
/// <summary>
|
||||
/// Whether a failure can occur on a given <paramref name="result"/>.
|
||||
/// If the return value of this method is <see langword="false"/>, neither <see cref="DefaultFailCondition"/> nor <see cref="FailConditions"/> will be checked
|
||||
/// after this <paramref name="result"/>.
|
||||
/// </summary>
|
||||
protected virtual bool CanFailOn(JudgementResult result) => true;
|
||||
|
||||
/// <summary>
|
||||
/// The default conditions for failing.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user