Skip to content

osu!taiko stamina balancing #31337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public class TaikoDifficultyCalculatorTest : DifficultyCalculatorTest
{
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());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ private static double speedBonus(double interval)
// Interval is capped at a very small value to prevent infinite values.
interval = Math.Max(interval, 1);

return 30 / interval;
return 20 / interval;
}

/// <summary>
Expand Down Expand Up @@ -59,16 +59,15 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current)
// 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;
}
}
Expand Down
7 changes: 5 additions & 2 deletions osu.Game.Rulesets.Taiko/Difficulty/Skills/Stamina.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -44,10 +45,12 @@ protected override double StrainValueAt(DifficultyHitObject current)
var currentObject = current as TaikoDifficultyHitObject;
int index = currentObject?.Colour.MonoStreak?.HitObjects.IndexOf(currentObject) ?? 0;

double monolengthBonus = 1 + Math.Min(Math.Max((index - 5) / 50.0, 0), 0.30);

if (singleColourStamina)
return currentStrain / (1 + Math.Exp(-(index - 10) / 2.0));
return DifficultyCalculationUtils.Logistic(-(index - 10) / 2.0, currentStrain);

return currentStrain;
return currentStrain * monolengthBonus;
}

protected override double CalculateInitialStrain(double time, DifficultyHitObject current) => singleColourStamina ? 0 : currentStrain * strainDecay(time - current.Previous(0).StartTime);
Expand Down
Loading