mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Merge branch 'master' into sh-xh-grading-2
This commit is contained in:
@ -318,6 +318,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
result.ComboAtJudgement = Combo.Value;
|
||||
result.HighestComboAtJudgement = HighestCombo.Value;
|
||||
result.HealthAtJudgement = Health.Value;
|
||||
|
||||
JudgedHits++;
|
||||
|
||||
@ -349,6 +350,8 @@ namespace osu.Game.Rulesets.Scoring
|
||||
baseScore += result.Judgement.NumericResultFor(result);
|
||||
rollingMaxBaseScore += result.Judgement.MaxNumericResult;
|
||||
}
|
||||
|
||||
Health.Value += HealthAdjustmentFactorFor(result) * result.Judgement.HealthIncreaseFor(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -360,6 +363,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
Combo.Value = result.ComboAtJudgement;
|
||||
HighestCombo.Value = result.HighestComboAtJudgement;
|
||||
Health.Value = result.HealthAtJudgement;
|
||||
|
||||
JudgedHits--;
|
||||
|
||||
@ -375,6 +379,13 @@ namespace osu.Game.Rulesets.Scoring
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An adjustment factor which is multiplied into the health increase provided by a <see cref="JudgementResult"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="JudgementResult"/> for which the adjustment should apply.</param>
|
||||
/// <returns>The adjustment factor.</returns>
|
||||
protected virtual double HealthAdjustmentFactorFor(JudgementResult result) => 1;
|
||||
|
||||
private void updateScore()
|
||||
{
|
||||
if (rollingMaxBaseScore != 0)
|
||||
|
Reference in New Issue
Block a user