1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:07:25 +08:00

Account for legacyAccScore in score conversion

This commit is contained in:
Zyf 2023-11-24 23:07:27 +01:00
parent 27f9dfccc4
commit 71e5654b64
3 changed files with 9 additions and 7 deletions

View File

@ -74,6 +74,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty
simulateHit(obj, ref attributes);
attributes.BonusScoreRatio = legacyBonusScore == 0 ? 0 : (double)standardisedBonusScore / legacyBonusScore;
attributes.BonusScore = legacyBonusScore;
return attributes;
}

View File

@ -75,6 +75,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
simulateHit(obj, ref attributes);
attributes.BonusScoreRatio = legacyBonusScore == 0 ? 0 : (double)standardisedBonusScore / legacyBonusScore;
attributes.BonusScore = legacyBonusScore;
return attributes;
}

View File

@ -250,15 +250,14 @@ namespace osu.Game.Database
long maximumLegacyComboScore = (long)Math.Round(attributes.ComboScore * legacyModMultiplier);
double maximumLegacyBonusRatio = attributes.BonusScoreRatio;
long maximumLegacyBonusScore = attributes.BonusScore;
int maximumLegacyCombo = attributes.MaxCombo;
double legacyAccScore = maximumLegacyAccuracyScore * score.Accuracy;
// We can not separate the ComboScore from the BonusScore, so we keep the bonus in the ratio.
double comboProportion =
((double)score.LegacyTotalScore - legacyAccScore) / (maximumLegacyComboScore + maximumLegacyBonusScore);
// We assume the bonus proportion only makes up the rest of the score that exceeds maximumLegacyBaseScore.
long maximumLegacyBaseScore = maximumLegacyAccuracyScore + maximumLegacyComboScore;
long maximumLegacyTotalScore = maximumLegacyBaseScore + maximumLegacyBonusScore;
// The combo proportion is calculated as a proportion of maximumLegacyTotalScore.
double comboProportion = (double)score.LegacyTotalScore / maximumLegacyTotalScore;
// The bonus proportion makes up the rest of the score that exceeds maximumLegacyBaseScore.
double bonusProportion = Math.Max(0, ((long)score.LegacyTotalScore - maximumLegacyBaseScore) * maximumLegacyBonusRatio);
double modMultiplier = score.Mods.Select(m => m.ScoreMultiplier).Aggregate(1.0, (c, n) => c * n);
@ -288,6 +287,7 @@ namespace osu.Game.Database
// this can be roughly represented by summing / integrating f(combo) = combo.
// All mod- and beatmap-dependent multipliers and constants are not included here,
// as we will only be using the magnitude of this to compute ratios.
int maximumLegacyCombo = attributes.MaxCombo;
double maximumAchievableComboPortionInScoreV1 = Math.Pow(maximumLegacyCombo, 2);
// Similarly, estimate the maximum magnitude of the combo portion in standardised score.
// Roughly corresponds to integrating f(combo) = combo ^ COMBO_EXPONENT (omitting constants)