From a97915180f37a87ac5716acdb0bfcafffe9e6452 Mon Sep 17 00:00:00 2001 From: Zyf Date: Sat, 15 Jul 2023 23:30:59 +0200 Subject: [PATCH] Scoring : Adds fields to Catch/Mania/Taiko Simulators too --- .../Difficulty/CatchLegacyScoreSimulator.cs | 10 +++++++--- .../Difficulty/ManiaLegacyScoreSimulator.cs | 3 +++ .../Difficulty/TaikoLegacyScoreSimulator.cs | 10 +++++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Catch/Difficulty/CatchLegacyScoreSimulator.cs b/osu.Game.Rulesets.Catch/Difficulty/CatchLegacyScoreSimulator.cs index c79fd36d96..284fd23aea 100644 --- a/osu.Game.Rulesets.Catch/Difficulty/CatchLegacyScoreSimulator.cs +++ b/osu.Game.Rulesets.Catch/Difficulty/CatchLegacyScoreSimulator.cs @@ -20,9 +20,12 @@ namespace osu.Game.Rulesets.Catch.Difficulty public int ComboScore { get; private set; } - public double BonusScoreRatio => legacyBonusScore == 0 ? 0 : (double)modernBonusScore / legacyBonusScore; + public int LegacyBonusScore { get; private set; } + + public int MaxCombo { get; private set; } + + public double BonusScoreRatio => LegacyBonusScore == 0 ? 0 : (double)modernBonusScore / LegacyBonusScore; - private int legacyBonusScore; private int modernBonusScore; private int combo; @@ -74,6 +77,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty foreach (var obj in playableBeatmap.HitObjects) simulateHit(obj); + MaxCombo = combo; } private void simulateHit(HitObject hitObject) @@ -129,7 +133,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty if (isBonus) { - legacyBonusScore += scoreIncrease; + LegacyBonusScore += scoreIncrease; modernBonusScore += Judgement.ToNumericResult(bonusResult); } else diff --git a/osu.Game.Rulesets.Mania/Difficulty/ManiaLegacyScoreSimulator.cs b/osu.Game.Rulesets.Mania/Difficulty/ManiaLegacyScoreSimulator.cs index e544428979..f09c911b98 100644 --- a/osu.Game.Rulesets.Mania/Difficulty/ManiaLegacyScoreSimulator.cs +++ b/osu.Game.Rulesets.Mania/Difficulty/ManiaLegacyScoreSimulator.cs @@ -14,6 +14,8 @@ namespace osu.Game.Rulesets.Mania.Difficulty { public int AccuracyScore => 0; public int ComboScore { get; private set; } + public int LegacyBonusScore => 0; + public int MaxCombo { get; private set; } public double BonusScoreRatio => 0; public void Simulate(IWorkingBeatmap workingBeatmap, IBeatmap playableBeatmap, IReadOnlyList mods) @@ -23,6 +25,7 @@ namespace osu.Game.Rulesets.Mania.Difficulty .Aggregate(1.0, (c, n) => c * n); ComboScore = (int)(1000000 * multiplier); + MaxCombo = playableBeatmap.GetMaxCombo(); } } } diff --git a/osu.Game.Rulesets.Taiko/Difficulty/TaikoLegacyScoreSimulator.cs b/osu.Game.Rulesets.Taiko/Difficulty/TaikoLegacyScoreSimulator.cs index e77327d622..239ec5765c 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/TaikoLegacyScoreSimulator.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/TaikoLegacyScoreSimulator.cs @@ -20,9 +20,12 @@ namespace osu.Game.Rulesets.Taiko.Difficulty public int ComboScore { get; private set; } - public double BonusScoreRatio => legacyBonusScore == 0 ? 0 : (double)modernBonusScore / legacyBonusScore; + public int LegacyBonusScore { get; private set; } + + public int MaxCombo { get; private set; } + + public double BonusScoreRatio => LegacyBonusScore == 0 ? 0 : (double)modernBonusScore / LegacyBonusScore; - private int legacyBonusScore; private int modernBonusScore; private int combo; @@ -80,6 +83,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty foreach (var obj in playableBeatmap.HitObjects) simulateHit(obj); + MaxCombo = combo; } private void simulateHit(HitObject hitObject) @@ -189,7 +193,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty if (isBonus) { - legacyBonusScore += scoreIncrease; + LegacyBonusScore += scoreIncrease; modernBonusScore += Judgement.ToNumericResult(bonusResult); } else