1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-28 10:17:19 +08:00

Use isTick.

This commit is contained in:
smoogipooo 2017-03-24 11:24:07 +09:00
parent 4ae45ea866
commit a1f5bc04aa

View File

@ -187,10 +187,10 @@ namespace osu.Game.Modes.Taiko.Scoring
protected override void UpdateCalculations(TaikoJudgement newJudgement) protected override void UpdateCalculations(TaikoJudgement newJudgement)
{ {
var tickJudgement = newJudgement as TaikoDrumRollTickJudgement; bool isTick = newJudgement is TaikoDrumRollTickJudgement;
// Don't consider ticks as a type of hit that counts towards map completion // Don't consider ticks as a type of hit that counts towards map completion
if (tickJudgement == null) if (!isTick)
totalHits++; totalHits++;
// Apply score changes // Apply score changes
@ -203,7 +203,7 @@ namespace osu.Game.Modes.Taiko.Scoring
baseValue += baseValue * finisherScoreScale; baseValue += baseValue * finisherScoreScale;
// Add score to portions // Add score to portions
if (tickJudgement != null) if (isTick)
bonusScore += baseValue; bonusScore += baseValue;
else else
{ {
@ -222,7 +222,7 @@ namespace osu.Game.Modes.Taiko.Scoring
{ {
case HitResult.Miss: case HitResult.Miss:
// Missing ticks shouldn't drop HP // Missing ticks shouldn't drop HP
if (tickJudgement == null) if (!isTick)
Health.Value += hpIncreaseMiss; Health.Value += hpIncreaseMiss;
break; break;
case HitResult.Hit: case HitResult.Hit:
@ -232,8 +232,7 @@ namespace osu.Game.Modes.Taiko.Scoring
Health.Value += hpIncreaseGood; Health.Value += hpIncreaseGood;
break; break;
case TaikoHitResult.Great: case TaikoHitResult.Great:
// Ticks only give out a different portion of HP because they're more spammable if (isTick)
if (tickJudgement != null)
Health.Value += hpIncreaseTick; Health.Value += hpIncreaseTick;
else else
Health.Value += hpIncreaseGreat; Health.Value += hpIncreaseGreat;