1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 23:22:55 +08:00

Merge branch 'pp-dev' into remove-angle-bonus-rhythm-restriction

This commit is contained in:
James Wilson 2025-01-09 12:59:45 +00:00 committed by GitHub
commit 2302f6cc7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 27 additions and 14 deletions

View File

@ -15,22 +15,22 @@ namespace osu.Game.Rulesets.Osu.Tests
{
protected override string ResourceAssembly => "osu.Game.Rulesets.Osu.Tests";
[TestCase(6.7153612142198682d, 239, "diffcalc-test")]
[TestCase(1.4484916289194889d, 54, "zero-length-sliders")]
[TestCase(0.42912495021837549d, 4, "very-fast-slider")]
[TestCase(6.6860329680488437d, 239, "diffcalc-test")]
[TestCase(1.4485740324170036d, 54, "zero-length-sliders")]
[TestCase(0.43052813047866129d, 4, "very-fast-slider")]
[TestCase(0.14143808967817237d, 2, "nan-slider")]
public void Test(double expectedStarRating, int expectedMaxCombo, string name)
=> base.Test(expectedStarRating, expectedMaxCombo, name);
[TestCase(9.6358837846598835d, 239, "diffcalc-test")]
[TestCase(1.754888327422514d, 54, "zero-length-sliders")]
[TestCase(0.55601568006454294d, 4, "very-fast-slider")]
[TestCase(9.6300773538770041d, 239, "diffcalc-test")]
[TestCase(1.7550155729445993d, 54, "zero-length-sliders")]
[TestCase(0.55785578988249407d, 4, "very-fast-slider")]
public void TestClockRateAdjusted(double expectedStarRating, int expectedMaxCombo, string name)
=> Test(expectedStarRating, expectedMaxCombo, name, new OsuModDoubleTime());
[TestCase(6.7153612142198682d, 239, "diffcalc-test")]
[TestCase(1.4484916289194889d, 54, "zero-length-sliders")]
[TestCase(0.42912495021837549d, 4, "very-fast-slider")]
[TestCase(6.6860329680488437d, 239, "diffcalc-test")]
[TestCase(1.4485740324170036d, 54, "zero-length-sliders")]
[TestCase(0.43052813047866129d, 4, "very-fast-slider")]
public void TestClassicMod(double expectedStarRating, int expectedMaxCombo, string name)
=> Test(expectedStarRating, expectedMaxCombo, name, new OsuModClassic());

View File

@ -12,7 +12,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
public static class AimEvaluator
{
private const double wide_angle_multiplier = 1.5;
private const double acute_angle_multiplier = 2.7;
private const double acute_angle_multiplier = 2.6;
private const double slider_multiplier = 1.35;
private const double velocity_change_multiplier = 0.75;
private const double wiggle_multiplier = 1.02;
@ -82,7 +82,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
acuteAngleBonus = calcAcuteAngleBonus(currAngle);
// Penalize angle repetition.
acuteAngleBonus *= 0.03 + 0.97 * (1 - Math.Min(acuteAngleBonus, Math.Pow(calcAcuteAngleBonus(lastAngle), 3)));
acuteAngleBonus *= 0.1 + 0.9 * (1 - Math.Min(acuteAngleBonus, Math.Pow(calcAcuteAngleBonus(lastAngle), 3)));
// Apply acute angle bonus for BPM above 300 1/2 and distance more than one diameter
acuteAngleBonus *= angleBonus *
@ -145,8 +145,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
return aimStrain;
}
private static double calcWideAngleBonus(double angle) => Math.Pow(Math.Sin(3.0 / 4 * (Math.Min(5.0 / 6 * Math.PI, Math.Max(Math.PI / 6, angle)) - Math.PI / 6)), 2);
private static double calcWideAngleBonus(double angle) => DifficultyCalculationUtils.Smoothstep(angle, double.DegreesToRadians(40), double.DegreesToRadians(140));
private static double calcAcuteAngleBonus(double angle) => 1 - calcWideAngleBonus(angle);
private static double calcAcuteAngleBonus(double angle) => DifficultyCalculationUtils.Smoothstep(angle, double.DegreesToRadians(140), double.DegreesToRadians(40));
}
}

View File

@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
/// </summary>
public class Speed : OsuStrainSkill
{
private double skillMultiplier => 1.45;
private double skillMultiplier => 1.46;
private double strainDecayBase => 0.3;
private double currentStrain;

View File

@ -66,6 +66,19 @@ namespace osu.Game.Rulesets.Difficulty.Utils
/// <returns>The output of the bell curve function of <paramref name="x"/></returns>
public static double BellCurve(double x, double mean, double width, double multiplier = 1.0) => multiplier * Math.Exp(Math.E * -(Math.Pow(x - mean, 2) / Math.Pow(width, 2)));
/// <summary>
/// Smoothstep function (https://en.wikipedia.org/wiki/Smoothstep)
/// </summary>
/// <param name="x">Value to calculate the function for</param>
/// <param name="start">Value at which function returns 0</param>
/// <param name="end">Value at which function returns 1</param>
public static double Smoothstep(double x, double start, double end)
{
x = Math.Clamp((x - start) / (end - start), 0.0, 1.0);
return x * x * (3.0 - 2.0 * x);
}
/// <summary>
/// Smootherstep function (https://en.wikipedia.org/wiki/Smoothstep#Variations)
/// </summary>