mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 20:52:54 +08:00
Removed unnecessary JudgementResult casts
This commit is contained in:
parent
407f9d2e78
commit
394c038c33
@ -40,8 +40,7 @@ namespace osu.Game.Rulesets.Catch.Scoring
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.Judgement is CatchJudgement catchJudgement)
|
Health.Value += Math.Max(result.Judgement.HealthIncreaseFor(result) - hpDrainRate, 0) * harshness;
|
||||||
Health.Value += Math.Max(catchJudgement.HealthIncreaseFor(result) - hpDrainRate, 0) * harshness;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,9 +43,7 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
|||||||
{
|
{
|
||||||
base.ApplyResult(result);
|
base.ApplyResult(result);
|
||||||
|
|
||||||
if (result.Judgement is TaikoJudgement taikoJudgement)
|
double hpIncrease = result.Judgement.HealthIncreaseFor(result);
|
||||||
{
|
|
||||||
double hpIncrease = taikoJudgement.HealthIncreaseFor(result);
|
|
||||||
|
|
||||||
if (result.Type == HitResult.Miss)
|
if (result.Type == HitResult.Miss)
|
||||||
hpIncrease *= hpMissMultiplier;
|
hpIncrease *= hpMissMultiplier;
|
||||||
@ -54,7 +52,6 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
|||||||
|
|
||||||
Health.Value += hpIncrease;
|
Health.Value += hpIncrease;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Reset(bool storeResults)
|
protected override void Reset(bool storeResults)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user