mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Tidy up GetRateAdjustedDisplayDifficulty
implemetations
This commit is contained in:
parent
9433180ffe
commit
9a982a9564
@ -240,10 +240,13 @@ namespace osu.Game.Rulesets.Catch
|
||||
{
|
||||
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(difficulty);
|
||||
|
||||
double preempt = adjustedDifficulty.ApproachRate < 6 ? (1200.0 + 600.0 * (5 - adjustedDifficulty.ApproachRate) / 5) : (1200.0 - 750.0 * (adjustedDifficulty.ApproachRate - 5) / 5);
|
||||
double preempt = adjustedDifficulty.ApproachRate < 6
|
||||
? 1200.0 + 600.0 * (5 - adjustedDifficulty.ApproachRate) / 5
|
||||
: 1200.0 - 750.0 * (adjustedDifficulty.ApproachRate - 5) / 5;
|
||||
|
||||
preempt /= rate;
|
||||
adjustedDifficulty.ApproachRate = (float)(preempt > 1200 ? ((1800 - preempt) / 120) : ((1200 - preempt) / 150 + 5));
|
||||
|
||||
adjustedDifficulty.ApproachRate = (float)(preempt > 1200 ? (1800 - preempt) / 120 : (1200 - preempt) / 150 + 5);
|
||||
|
||||
return adjustedDifficulty;
|
||||
}
|
||||
|
@ -336,12 +336,18 @@ namespace osu.Game.Rulesets.Osu
|
||||
{
|
||||
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(difficulty);
|
||||
|
||||
double preempt = adjustedDifficulty.ApproachRate < 5 ? (1200.0 + 600.0 * (5 - adjustedDifficulty.ApproachRate) / 5) : (1200.0 - 750.0 * (adjustedDifficulty.ApproachRate - 5) / 5);
|
||||
double preempt = adjustedDifficulty.ApproachRate < 5
|
||||
? 1200.0 + 600.0 * (5 - adjustedDifficulty.ApproachRate) / 5
|
||||
: 1200.0 - 750.0 * (adjustedDifficulty.ApproachRate - 5) / 5;
|
||||
|
||||
preempt /= rate;
|
||||
adjustedDifficulty.ApproachRate = (float)(preempt > 1200 ? ((1800 - preempt) / 120) : ((1200 - preempt) / 150 + 5));
|
||||
|
||||
adjustedDifficulty.ApproachRate = (float)(preempt > 1200 ? (1800 - preempt) / 120 : (1200 - preempt) / 150 + 5);
|
||||
|
||||
double hitwindow = 80.0 - 6 * adjustedDifficulty.OverallDifficulty;
|
||||
|
||||
hitwindow /= rate;
|
||||
|
||||
adjustedDifficulty.OverallDifficulty = (float)(80.0 - hitwindow) / 6;
|
||||
|
||||
return adjustedDifficulty;
|
||||
|
@ -269,9 +269,11 @@ namespace osu.Game.Rulesets.Taiko
|
||||
{
|
||||
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(difficulty);
|
||||
|
||||
double hitwindow = 35.0 - 15.0 * (adjustedDifficulty.OverallDifficulty - 5) / 5;
|
||||
hitwindow /= rate;
|
||||
adjustedDifficulty.OverallDifficulty = (float)(5 * (35 - hitwindow) / 15 + 5);
|
||||
double hitWindow = 35.0 - 15.0 * (adjustedDifficulty.OverallDifficulty - 5) / 5;
|
||||
|
||||
hitWindow /= rate;
|
||||
|
||||
adjustedDifficulty.OverallDifficulty = (float)(5 * (35 - hitWindow) / 15 + 5);
|
||||
|
||||
return adjustedDifficulty;
|
||||
}
|
||||
|
@ -380,6 +380,7 @@ namespace osu.Game.Rulesets
|
||||
/// <summary>
|
||||
/// Applies changes to difficulty attributes for presenting to a user a rough estimate of how rate adjust mods affect difficulty.
|
||||
/// Importantly, this should NOT BE USED FOR ANY CALCULATIONS.
|
||||
///
|
||||
/// It is also not always correct, and arguably is never correct depending on your frame of mind.
|
||||
/// </summary>
|
||||
/// <param name="difficulty">>The <see cref="IBeatmapDifficultyInfo"/> that will be adjusted.</param>
|
||||
|
Loading…
Reference in New Issue
Block a user