mirror of
https://github.com/ppy/osu.git
synced 2024-12-17 18:23:00 +08:00
Merge pull request #29291 from Givikap120/pp_refactoring_osustrainskill
Pp Refactoring: Removing `DEFAULT_DIFFICULTY_MULTIPLIER` from `OsuStrainSkill`
This commit is contained in:
commit
6f143091d1
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
|
|
||||||
private double currentStrain;
|
private double currentStrain;
|
||||||
|
|
||||||
private double skillMultiplier => 23.55;
|
private double skillMultiplier => 24.963;
|
||||||
private double strainDecayBase => 0.15;
|
private double strainDecayBase => 0.15;
|
||||||
|
|
||||||
private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000);
|
private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000);
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
hasHiddenMod = mods.Any(m => m is OsuModHidden);
|
hasHiddenMod = mods.Any(m => m is OsuModHidden);
|
||||||
}
|
}
|
||||||
|
|
||||||
private double skillMultiplier => 0.052;
|
private double skillMultiplier => 0.05512;
|
||||||
private double strainDecayBase => 0.15;
|
private double strainDecayBase => 0.15;
|
||||||
|
|
||||||
private double currentStrain;
|
private double currentStrain;
|
||||||
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
return currentStrain;
|
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);
|
public static double DifficultyToPerformance(double difficulty) => 25 * Math.Pow(difficulty, 2);
|
||||||
}
|
}
|
||||||
|
@ -12,12 +12,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
{
|
{
|
||||||
public abstract class OsuStrainSkill : StrainSkill
|
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>
|
/// <summary>
|
||||||
/// The number of sections with the highest strains, which the peak strain reductions will apply to.
|
/// 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.
|
/// This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
||||||
@ -29,11 +23,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual double ReducedStrainBaseline => 0.75;
|
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)
|
protected OsuStrainSkill(Mod[] mods)
|
||||||
: base(mods)
|
: base(mods)
|
||||||
{
|
{
|
||||||
@ -65,7 +54,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
weight *= DecayWeight;
|
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;
|
public static double DifficultyToPerformance(double difficulty) => Math.Pow(5.0 * Math.Max(1.0, difficulty / 0.0675) - 4.0, 3.0) / 100000.0;
|
||||||
|
@ -16,14 +16,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Speed : OsuStrainSkill
|
public class Speed : OsuStrainSkill
|
||||||
{
|
{
|
||||||
private double skillMultiplier => 1.375;
|
private double skillMultiplier => 1.430;
|
||||||
private double strainDecayBase => 0.3;
|
private double strainDecayBase => 0.3;
|
||||||
|
|
||||||
private double currentStrain;
|
private double currentStrain;
|
||||||
private double currentRhythm;
|
private double currentRhythm;
|
||||||
|
|
||||||
protected override int ReducedSectionCount => 5;
|
protected override int ReducedSectionCount => 5;
|
||||||
protected override double DifficultyMultiplier => 1.04;
|
|
||||||
|
|
||||||
private readonly List<double> objectStrains = new List<double>();
|
private readonly List<double> objectStrains = new List<double>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user