1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Fix another difficulty-specific value

This commit is contained in:
Dan Balasescu 2023-09-08 21:08:09 +09:00
parent 4198e025fa
commit 628517569b
2 changed files with 10 additions and 10 deletions

View File

@ -20,12 +20,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty
private int combo; private int combo;
private double scoreMultiplier; private double scoreMultiplier;
private IBeatmap playableBeatmap = null!;
public LegacyScoreAttributes Simulate(IWorkingBeatmap workingBeatmap, IBeatmap playableBeatmap) public LegacyScoreAttributes Simulate(IWorkingBeatmap workingBeatmap, IBeatmap playableBeatmap)
{ {
this.playableBeatmap = playableBeatmap;
IBeatmap baseBeatmap = workingBeatmap.Beatmap; IBeatmap baseBeatmap = workingBeatmap.Beatmap;
int countNormal = 0; int countNormal = 0;
@ -132,13 +129,16 @@ namespace osu.Game.Rulesets.Osu.Difficulty
// The spinner object applies a lenience because gameplay mechanics differ from osu-stable. // The spinner object applies a lenience because gameplay mechanics differ from osu-stable.
// We'll redo the calculations to match osu-stable here... // We'll redo the calculations to match osu-stable here...
const double maximum_rotations_per_second = 477.0 / 60; const double maximum_rotations_per_second = 477.0 / 60;
double minimumRotationsPerSecond = IBeatmapDifficultyInfo.DifficultyRange(playableBeatmap.Difficulty.OverallDifficulty, 3, 5, 7.5);
// Normally, this value depends on the final overall difficulty. For simplicity, we'll only consider the worst case that maximises rotations.
const double minimum_rotations_per_second = 7.5;
double secondsDuration = spinner.Duration / 1000; double secondsDuration = spinner.Duration / 1000;
// The total amount of half spins possible for the entire spinner. // The total amount of half spins possible for the entire spinner.
int totalHalfSpinsPossible = (int)(secondsDuration * maximum_rotations_per_second * 2); int totalHalfSpinsPossible = (int)(secondsDuration * maximum_rotations_per_second * 2);
// The amount of half spins that are required to successfully complete the spinner (i.e. get a 300). // The amount of half spins that are required to successfully complete the spinner (i.e. get a 300).
int halfSpinsRequiredForCompletion = (int)(secondsDuration * minimumRotationsPerSecond); int halfSpinsRequiredForCompletion = (int)(secondsDuration * minimum_rotations_per_second);
// To be able to receive bonus points, the spinner must be rotated another 1.5 times. // To be able to receive bonus points, the spinner must be rotated another 1.5 times.
int halfSpinsRequiredBeforeBonus = halfSpinsRequiredForCompletion + 3; int halfSpinsRequiredBeforeBonus = halfSpinsRequiredForCompletion + 3;

View File

@ -103,16 +103,16 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
case Swell swell: case Swell swell:
// The taiko swell generally does not match the osu-stable implementation in any way. // The taiko swell generally does not match the osu-stable implementation in any way.
// We'll redo the calculations to match osu-stable here... // We'll redo the calculations to match osu-stable here...
double minimumRotationsPerSecond = IBeatmapDifficultyInfo.DifficultyRange(playableBeatmap.Difficulty.OverallDifficulty, 3, 5, 7.5);
double secondsDuration = swell.Duration / 1000; // Normally, this value depends on the final overall difficulty. For simplicity, we'll only consider the worst case that maximises rotations.
const double minimum_rotations_per_second = 7.5;
// The amount of half spins that are required to successfully complete the spinner (i.e. get a 300). // The amount of half spins that are required to successfully complete the spinner (i.e. get a 300).
int halfSpinsRequiredForCompletion = (int)(secondsDuration * minimumRotationsPerSecond); int halfSpinsRequiredForCompletion = (int)(swell.Duration / 1000 * minimum_rotations_per_second);
halfSpinsRequiredForCompletion = (int)Math.Max(1, halfSpinsRequiredForCompletion * 1.65f); halfSpinsRequiredForCompletion = (int)Math.Max(1, halfSpinsRequiredForCompletion * 1.65f);
// //
// Normally, this multiplier depends on the active mods (DT = 0.75, HT = 1.5). For simplicity, however, we'll only consider the worst case. // Normally, this multiplier depends on the active mods (DT = 0.75, HT = 1.5). For simplicity, we'll only consider the worst case that maximises rotations.
// This way, scores remain beatable at the cost of the conversion being slightly inaccurate. // This way, scores remain beatable at the cost of the conversion being slightly inaccurate.
// - A perfect DT/NM score will have less than 1M total score (excluding bonus). // - A perfect DT/NM score will have less than 1M total score (excluding bonus).
// - A perfect HT score will have 1M total score (excluding bonus). // - A perfect HT score will have 1M total score (excluding bonus).