1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 06:22:56 +08:00

osu!taiko stamina balancing (#31337)

* stamina considerations

* remove consecutive note count

* adjust multiplier

* add back comment

* adjust tests

* adjusts tests post merge

* use diffcalcutils

---------

Co-authored-by: StanR <hi@stanr.info>
This commit is contained in:
Jay Lawton 2025-01-16 20:30:02 +10:00 committed by GitHub
parent 974fa76987
commit 9da8dcd815
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 16 deletions

View File

@ -14,13 +14,13 @@ namespace osu.Game.Rulesets.Taiko.Tests
{
protected override string ResourceAssembly => "osu.Game.Rulesets.Taiko";
[TestCase(2.837609165845338d, 200, "diffcalc-test")]
[TestCase(2.837609165845338d, 200, "diffcalc-test-strong")]
[TestCase(2.912326627861987d, 200, "diffcalc-test")]
[TestCase(2.912326627861987d, 200, "diffcalc-test-strong")]
public void Test(double expectedStarRating, int expectedMaxCombo, string name)
=> base.Test(expectedStarRating, expectedMaxCombo, name);
[TestCase(3.8005218640444949, 200, "diffcalc-test")]
[TestCase(3.8005218640444949, 200, "diffcalc-test-strong")]
[TestCase(3.9339069955362014d, 200, "diffcalc-test")]
[TestCase(3.9339069955362014d, 200, "diffcalc-test-strong")]
public void TestClockRateAdjusted(double expectedStarRating, int expectedMaxCombo, string name)
=> Test(expectedStarRating, expectedMaxCombo, name, new TaikoModDoubleTime());

View File

@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
// Interval is capped at a very small value to prevent infinite values.
interval = Math.Max(interval, 1);
return 30 / interval;
return 20 / interval;
}
/// <summary>
@ -59,16 +59,15 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
// Find the previous hit object hit by the current finger, which is n notes prior, n being the number of
// available fingers.
TaikoDifficultyHitObject taikoCurrent = (TaikoDifficultyHitObject)current;
TaikoDifficultyHitObject? keyPrevious = taikoCurrent.PreviousMono(availableFingersFor(taikoCurrent) - 1);
if (keyPrevious == null)
{
// There is no previous hit object hit by the current finger
return 0.0;
}
TaikoDifficultyHitObject? taikoPrevious = current.Previous(1) as TaikoDifficultyHitObject;
TaikoDifficultyHitObject? previousMono = taikoCurrent.PreviousMono(availableFingersFor(taikoCurrent) - 1);
double objectStrain = 0.5; // Add a base strain to all objects
objectStrain += speedBonus(taikoCurrent.StartTime - keyPrevious.StartTime);
if (taikoPrevious == null) return objectStrain;
if (previousMono != null)
objectStrain += speedBonus(taikoCurrent.StartTime - previousMono.StartTime) + 0.5 * speedBonus(taikoCurrent.StartTime - taikoPrevious.StartTime);
return objectStrain;
}
}

View File

@ -4,6 +4,7 @@
using System;
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Difficulty.Skills;
using osu.Game.Rulesets.Difficulty.Utils;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Taiko.Difficulty.Evaluators;
using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing;
@ -44,10 +45,12 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
var currentObject = current as TaikoDifficultyHitObject;
int index = currentObject?.Colour.MonoStreak?.HitObjects.IndexOf(currentObject) ?? 0;
if (singleColourStamina)
return currentStrain / (1 + Math.Exp(-(index - 10) / 2.0));
double monolengthBonus = 1 + Math.Min(Math.Max((index - 5) / 50.0, 0), 0.30);
return currentStrain;
if (singleColourStamina)
return DifficultyCalculationUtils.Logistic(-(index - 10) / 2.0, currentStrain);
return currentStrain * monolengthBonus;
}
protected override double CalculateInitialStrain(double time, DifficultyHitObject current) => singleColourStamina ? 0 : currentStrain * strainDecay(time - current.Previous(0).StartTime);