1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 06:27:19 +08:00

Penalise reading difficulty of high velocity notes at high densities

This commit is contained in:
Eloise 2025-01-14 14:24:46 +00:00
parent c53188cf45
commit a7f2c51050

View File

@ -31,13 +31,28 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
/// <returns>The reading difficulty value for the given hit object.</returns>
public static double EvaluateDifficultyOf(TaikoDifficultyHitObject noteObject)
{
double effectiveBPM = noteObject.EffectiveBPM;
double effectiveBPM = Math.Max(1.0, noteObject.EffectiveBPM);
// Expected deltatime is the deltatime this note would need
// to be spaced equally to a base SV 1/4 note
double expectedDeltaTime = 21000.0 / effectiveBPM;
var midVelocity = new VelocityRange(360, 480);
var highVelocity = new VelocityRange(480, 640);
var midVelocity = new VelocityRange(360, 480);
double midVelDifficulty = 0.5 * DifficultyCalculationUtils.Logistic(effectiveBPM, midVelocity.Center, 1.0 / (midVelocity.Range / 10));
return 1.0 * DifficultyCalculationUtils.Logistic(effectiveBPM, highVelocity.Center, 1.0 / (highVelocity.Range / 10))
+ 0.5 * DifficultyCalculationUtils.Logistic(effectiveBPM, midVelocity.Center, 1.0 / (midVelocity.Range / 10));
// Density refers to an object's deltatime relative to its expected deltatime
double density = expectedDeltaTime / Math.Max(1.0, noteObject.DeltaTime);
// Dense notes are penalised at high velocities
// https://www.desmos.com/calculator/u63f3ntdsi
double densityPenalty = DifficultyCalculationUtils.Logistic(density, 0.925, 15);
double midpointOffset = highVelocity.Center + 8 * densityPenalty;
double multiplier = (1.0 + 0.5 * densityPenalty) / (highVelocity.Range / 10);
double highVelDifficulty = (1.0 - 0.33 * densityPenalty) * DifficultyCalculationUtils.Logistic(effectiveBPM, midpointOffset, multiplier);
return midVelDifficulty + highVelDifficulty;
}
}
}