mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:23:20 +08:00
Split AffectsCombo into IsBonus
This commit is contained in:
parent
808118e4d4
commit
fbc0cd6f5f
@ -9,6 +9,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
public class CatchBananaJudgement : CatchJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
public override bool IsBonus => true;
|
||||
|
||||
protected override int NumericResultFor(HitResult result)
|
||||
{
|
||||
|
@ -9,6 +9,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
public class CatchBananaShowerJudgement : CatchJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
public override bool IsBonus => true;
|
||||
|
||||
public CatchBananaShowerJudgement()
|
||||
{
|
||||
|
@ -8,6 +8,8 @@ namespace osu.Game.Rulesets.Mania.Judgements
|
||||
public class HoldNoteJudgement : ManiaJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
public override bool IsBonus => true;
|
||||
|
||||
protected override int NumericResultFor(HitResult result) => 0;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ namespace osu.Game.Rulesets.Mania.Judgements
|
||||
public class HoldNoteTickJudgement : ManiaJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
public override bool IsBonus => true;
|
||||
|
||||
protected override int NumericResultFor(HitResult result) => 20;
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ namespace osu.Game.Rulesets.Osu.Judgements
|
||||
public class OsuSliderTailJudgement : OsuJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
public override bool IsBonus => true;
|
||||
|
||||
protected override int NumericResultFor(HitResult result) => 0;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
public class TaikoDrumRollTickJudgement : TaikoJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
public override bool IsBonus => true;
|
||||
|
||||
protected override int NumericResultFor(HitResult result)
|
||||
{
|
||||
|
@ -6,6 +6,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
public class TaikoStrongHitJudgement : TaikoJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
public override bool IsBonus => true;
|
||||
|
||||
public TaikoStrongHitJudgement()
|
||||
{
|
||||
|
@ -46,10 +46,14 @@ namespace osu.Game.Rulesets.Judgements
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="Result"/> should affect the combo portion of the score.
|
||||
/// If false, the <see cref="Result"/> will be considered for the bonus portion of the score.
|
||||
/// </summary>
|
||||
public virtual bool AffectsCombo => true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="Result"/> should be counted as base or bonus score.
|
||||
/// </summary>
|
||||
public virtual bool IsBonus => false;
|
||||
|
||||
/// <summary>
|
||||
/// The numeric representation for the result achieved.
|
||||
/// </summary>
|
||||
|
@ -256,13 +256,19 @@ namespace osu.Game.Rulesets.Scoring
|
||||
break;
|
||||
}
|
||||
|
||||
baseScore += judgement.NumericResult;
|
||||
rollingMaxBaseScore += judgement.MaxNumericResult;
|
||||
|
||||
JudgedHits++;
|
||||
}
|
||||
else if (judgement.IsHit)
|
||||
bonusScore += judgement.NumericResult;
|
||||
|
||||
if (judgement.IsBonus)
|
||||
{
|
||||
if (judgement.IsHit)
|
||||
bonusScore += judgement.NumericResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
baseScore += judgement.NumericResult;
|
||||
rollingMaxBaseScore += judgement.MaxNumericResult;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -275,14 +281,18 @@ namespace osu.Game.Rulesets.Scoring
|
||||
HighestCombo.Value = judgement.HighestComboAtJudgement;
|
||||
|
||||
if (judgement.AffectsCombo)
|
||||
JudgedHits--;
|
||||
|
||||
if (judgement.IsBonus)
|
||||
{
|
||||
if (judgement.IsHit)
|
||||
bonusScore -= judgement.NumericResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
baseScore -= judgement.NumericResult;
|
||||
rollingMaxBaseScore -= judgement.MaxNumericResult;
|
||||
|
||||
JudgedHits--;
|
||||
}
|
||||
else if (judgement.IsHit)
|
||||
bonusScore -= judgement.NumericResult;
|
||||
}
|
||||
|
||||
private void updateScore()
|
||||
|
Loading…
Reference in New Issue
Block a user