1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-23 20:52:55 +08:00

Scoring : Adds fields to Catch/Mania/Taiko Simulators too

This commit is contained in:
Zyf 2023-07-15 23:30:59 +02:00
parent b672b49e02
commit a97915180f
3 changed files with 17 additions and 6 deletions
osu.Game.Rulesets.Catch/Difficulty
osu.Game.Rulesets.Mania/Difficulty
osu.Game.Rulesets.Taiko/Difficulty

View File

@ -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

View File

@ -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<Mod> 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();
}
}
}

View File

@ -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