From 9f933187e9cc071d5ad269287ecebc5467b37b36 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 17 Jul 2018 16:33:08 +0900 Subject: [PATCH] Apply review feedback --- .../Difficulty/CatchDifficultyCalculator.cs | 4 ++-- osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs | 4 ++-- osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs b/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs index 978b71576e..a763989750 100644 --- a/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs @@ -49,8 +49,8 @@ namespace osu.Game.Rulesets.Catch.Difficulty switch (hitObject) { // We want to only consider fruits that contribute to the combo. Droplets are addressed as accuracy and spinners are not relevant for "skill" calculations. - case Fruit _: - difficultyHitObjects.Add(new CatchDifficultyHitObject((CatchHitObject)hitObject, halfCatchWidth)); + case Fruit fruit: + difficultyHitObjects.Add(new CatchDifficultyHitObject(fruit, halfCatchWidth)); break; case JuiceStream _: difficultyHitObjects.AddRange(hitObject.NestedHitObjects.OfType().Where(o => !(o is TinyDroplet)).Select(o => new CatchDifficultyHitObject(o, halfCatchWidth))); diff --git a/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs b/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs index 6347cf9da2..cea59c3fea 100644 --- a/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs +++ b/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs @@ -87,8 +87,8 @@ namespace osu.Game.Rulesets.Taiko.Scoring if (obj.IsStrong) AddJudgement(new TaikoStrongHitJudgement()); break; - case DrumRoll _: - for (int i = 0; i < ((DrumRoll)obj).NestedHitObjects.OfType().Count(); i++) + case DrumRoll drumRoll: + for (int i = 0; i < drumRoll.NestedHitObjects.OfType().Count(); i++) { AddJudgement(new TaikoDrumRollTickJudgement { Result = HitResult.Great }); diff --git a/osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs b/osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs index 0c9e03cedd..0de0a620e3 100644 --- a/osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs +++ b/osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs @@ -71,11 +71,11 @@ namespace osu.Game.Rulesets.Difficulty case 1: yield return currentSet.Single(); break; + default: + yield return new MultiMod(currentSet.ToArray()); + break; } - if (currentSetCount > 1) - yield return new MultiMod(currentSet.ToArray()); - // Apply mods in the adjustment set recursively. Using the entire adjustment set would result in duplicate multi-mod mod // combinations in further recursions, so a moving subset is used to eliminate this effect for (int i = adjustmentSetStart; i < adjustmentSet.Length; i++)