Merge branch 'master' into sh-xh-grading-2

This commit is contained in:
iiSaLMaN
2019-04-22 19:39:20 +03:00
committed by GitHub
17 changed files with 105 additions and 127 deletions

View File

@ -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)