mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Make hp work + cleanup
This commit is contained in:
@ -206,9 +206,6 @@ namespace osu.Game.Rulesets.Scoring
|
||||
private double baseScore;
|
||||
private double bonusScore;
|
||||
|
||||
private double rollingHp;
|
||||
private double rollingMaxHp;
|
||||
|
||||
protected ScoreProcessor()
|
||||
{
|
||||
}
|
||||
@ -304,6 +301,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
result.ComboAtJudgement = Combo.Value;
|
||||
result.HighestComboAtJudgement = HighestCombo.Value;
|
||||
result.HealthAtJudgement = Health.Value;
|
||||
|
||||
JudgedHits++;
|
||||
|
||||
@ -336,8 +334,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
rollingMaxBaseScore += result.Judgement.MaxNumericResult;
|
||||
}
|
||||
|
||||
rollingHp += HpFactorFor(result.Judgement, result.Type) * result.Judgement.HealthIncreaseFor(result);
|
||||
rollingMaxHp += HpFactorFor(result.Judgement, result.Judgement.MaxResult) * result.Judgement.MaxHealthIncrease;
|
||||
Health.Value += HpFactorFor(result) * result.Judgement.HealthIncreaseFor(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -349,6 +346,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
Combo.Value = result.ComboAtJudgement;
|
||||
HighestCombo.Value = result.HighestComboAtJudgement;
|
||||
Health.Value = result.HealthAtJudgement;
|
||||
|
||||
JudgedHits--;
|
||||
|
||||
@ -362,12 +360,9 @@ namespace osu.Game.Rulesets.Scoring
|
||||
baseScore -= result.Judgement.NumericResultFor(result);
|
||||
rollingMaxBaseScore -= result.Judgement.MaxNumericResult;
|
||||
}
|
||||
|
||||
rollingHp -= HpFactorFor(result.Judgement, result.Type) * result.Judgement.HealthIncreaseFor(result);
|
||||
rollingMaxHp -= HpFactorFor(result.Judgement, result.Judgement.MaxResult) * result.Judgement.MaxHealthIncrease;
|
||||
}
|
||||
|
||||
protected virtual double HpFactorFor(Judgement judgement, HitResult result) => 1;
|
||||
protected virtual double HpFactorFor(JudgementResult result) => 1;
|
||||
|
||||
private void updateScore()
|
||||
{
|
||||
|
Reference in New Issue
Block a user