Skip to content

Commit c4ef081

Browse files
kwotaqstanriders
andauthored
Refactor Reading strain to match the rest of the skills (ppy#37010)
This doesn't affect values as per the original refactor. Co-authored-by: StanR <8269193+stanriders@users.noreply.github.com>
1 parent e082550 commit c4ef081

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

osu.Game.Rulesets.Osu/Difficulty/Evaluators/ReadingEvaluator.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current, bool hidd
4848

4949
double difficulty = DifficultyCalculationUtils.Norm(1.5, preemptDifficulty, hiddenDifficulty, noteDensityDifficulty);
5050

51+
// Having less time to process information is harder
52+
difficulty *= highBpmBonus(currObj.AdjustedDeltaTime);
53+
5154
return difficulty;
5255
}
5356

@@ -263,5 +266,7 @@ private static double getTimeNerfFactor(double deltaTime)
263266
{
264267
return Math.Clamp(2 - deltaTime / (reading_window_size / 2), 0, 1);
265268
}
269+
270+
private static double highBpmBonus(double ms) => 1 / (1 - Math.Pow(0.8, ms / 1000));
266271
}
267272
}

osu.Game.Rulesets.Osu/Difficulty/Skills/Reading.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ protected override double ObjectDifficultyOf(DifficultyHitObject current)
3737
{
3838
objectList.Add(current);
3939

40-
currentDifficulty *= strainDecay(current.DeltaTime);
40+
double decay = strainDecay(current.DeltaTime);
4141

42-
currentDifficulty += ReadingEvaluator.EvaluateDifficultyOf(current, hasHiddenMod) * skillMultiplier;
42+
currentDifficulty *= decay;
43+
44+
currentDifficulty += ReadingEvaluator.EvaluateDifficultyOf(current, hasHiddenMod) * (1 - decay) * skillMultiplier;
4345

4446
return currentDifficulty;
4547
}

0 commit comments

Comments
 (0)