mirror of https://github.com/ppy/osu
Removed unnecessary JudgementResult casts
This commit is contained in:
parent
407f9d2e78
commit
394c038c33
|
@ -40,8 +40,7 @@ protected override void ApplyResult(JudgementResult result)
|
|||
return;
|
||||
}
|
||||
|
||||
if (result.Judgement is CatchJudgement catchJudgement)
|
||||
Health.Value += Math.Max(catchJudgement.HealthIncreaseFor(result) - hpDrainRate, 0) * harshness;
|
||||
Health.Value += Math.Max(result.Judgement.HealthIncreaseFor(result) - hpDrainRate, 0) * harshness;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,17 +43,14 @@ protected override void ApplyResult(JudgementResult result)
|
|||
{
|
||||
base.ApplyResult(result);
|
||||
|
||||
if (result.Judgement is TaikoJudgement taikoJudgement)
|
||||
{
|
||||
double hpIncrease = taikoJudgement.HealthIncreaseFor(result);
|
||||
double hpIncrease = result.Judgement.HealthIncreaseFor(result);
|
||||
|
||||
if (result.Type == HitResult.Miss)
|
||||
hpIncrease *= hpMissMultiplier;
|
||||
else
|
||||
hpIncrease *= hpMultiplier;
|
||||
if (result.Type == HitResult.Miss)
|
||||
hpIncrease *= hpMissMultiplier;
|
||||
else
|
||||
hpIncrease *= hpMultiplier;
|
||||
|
||||
Health.Value += hpIncrease;
|
||||
}
|
||||
Health.Value += hpIncrease;
|
||||
}
|
||||
|
||||
protected override void Reset(bool storeResults)
|
||||
|
|
Loading…
Reference in New Issue