From cb9b28073ffaf02f13e8e6d717eac6273077eea2 Mon Sep 17 00:00:00 2001 From: MaxOhn Date: Fri, 16 Feb 2024 18:29:00 +0100 Subject: [PATCH] Fix maxFruits count --- PerformanceCalculator/Simulate/CatchSimulateCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PerformanceCalculator/Simulate/CatchSimulateCommand.cs b/PerformanceCalculator/Simulate/CatchSimulateCommand.cs index 7aee158554..b18958f49c 100644 --- a/PerformanceCalculator/Simulate/CatchSimulateCommand.cs +++ b/PerformanceCalculator/Simulate/CatchSimulateCommand.cs @@ -58,7 +58,7 @@ protected override Dictionary GenerateHitResults(double accuracy var maxCombo = GetMaxCombo(beatmap); int maxTinyDroplets = beatmap.HitObjects.OfType().Sum(s => s.NestedHitObjects.OfType().Count()); int maxDroplets = beatmap.HitObjects.OfType().Sum(s => s.NestedHitObjects.OfType().Count()) - maxTinyDroplets; - int maxFruits = beatmap.HitObjects.OfType().Count() + 2 * beatmap.HitObjects.OfType().Count() + beatmap.HitObjects.OfType().Sum(s => s.RepeatCount); + int maxFruits = beatmap.HitObjects.Sum(h => h is Fruit ? 1 : (h as JuiceStream)?.NestedHitObjects.Count(n => n is Fruit) ?? 0); // Either given or max value minus misses int countDroplets = countGood ?? Math.Max(0, maxDroplets - countMiss);