Skip to content
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

Pp Refactoring: Removing DEFAULT_DIFFICULTY_MULTIPLIER from OsuStrainSkill #29291

Merged
merged 4 commits into from
Sep 13, 2024
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
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Osu/Difficulty/Skills/Aim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public Aim(Mod[] mods, bool withSliders)

private double currentStrain;

private double skillMultiplier => 23.55;
private double skillMultiplier => 24.963;
private double strainDecayBase => 0.15;

private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000);
Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Osu/Difficulty/Skills/Flashlight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public Flashlight(Mod[] mods)
hasHiddenMod = mods.Any(m => m is OsuModHidden);
}

private double skillMultiplier => 0.052;
private double skillMultiplier => 0.05512;
private double strainDecayBase => 0.15;

private double currentStrain;
Expand All @@ -41,7 +41,7 @@ protected override double StrainValueAt(DifficultyHitObject current)
return currentStrain;
}

public override double DifficultyValue() => GetCurrentStrainPeaks().Sum() * OsuStrainSkill.DEFAULT_DIFFICULTY_MULTIPLIER;
public override double DifficultyValue() => GetCurrentStrainPeaks().Sum();

public static double DifficultyToPerformance(double difficulty) => 25 * Math.Pow(difficulty, 2);
}
Expand Down
13 changes: 1 addition & 12 deletions osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
{
public abstract class OsuStrainSkill : StrainSkill
{
/// <summary>
/// The default multiplier applied by <see cref="OsuStrainSkill"/> to the final difficulty value after all other calculations.
/// May be overridden via <see cref="DifficultyMultiplier"/>.
/// </summary>
public const double DEFAULT_DIFFICULTY_MULTIPLIER = 1.06;

/// <summary>
/// The number of sections with the highest strains, which the peak strain reductions will apply to.
/// This is done in order to decrease their impact on the overall difficulty of the map for this skill.
Expand All @@ -29,11 +23,6 @@ public abstract class OsuStrainSkill : StrainSkill
/// </summary>
protected virtual double ReducedStrainBaseline => 0.75;

/// <summary>
/// The final multiplier to be applied to <see cref="DifficultyValue"/> after all other calculations.
/// </summary>
protected virtual double DifficultyMultiplier => DEFAULT_DIFFICULTY_MULTIPLIER;

protected OsuStrainSkill(Mod[] mods)
: base(mods)
{
Expand Down Expand Up @@ -65,7 +54,7 @@ public override double DifficultyValue()
weight *= DecayWeight;
}

return difficulty * DifficultyMultiplier;
return difficulty;
}

public static double DifficultyToPerformance(double difficulty) => Math.Pow(5.0 * Math.Max(1.0, difficulty / 0.0675) - 4.0, 3.0) / 100000.0;
Expand Down
3 changes: 1 addition & 2 deletions osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
/// </summary>
public class Speed : OsuStrainSkill
{
private double skillMultiplier => 1.375;
private double skillMultiplier => 1.430;
private double strainDecayBase => 0.3;

private double currentStrain;
private double currentRhythm;

protected override int ReducedSectionCount => 5;
protected override double DifficultyMultiplier => 1.04;

private readonly List<double> objectStrains = new List<double>();

Expand Down
Loading