mirror of
https://github.com/ppy/osu.git
synced 2025-03-24 19:17:20 +08:00
some updates
This commit is contained in:
parent
82cde30c27
commit
aefd4df8e7
@ -106,7 +106,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
double mechanicalPerformance = Math.Pow(Math.Pow(baseAimPerformance, SUM_POWER) + Math.Pow(baseSpeedPerformance, SUM_POWER), 1.0 / SUM_POWER);
|
||||
|
||||
// Limit cognition by full memorisation difficulty, what is assumed to be mechanicalPerformance + flashlightPerformance
|
||||
double perfectFlashlightPerformance = OsuPerformanceCalculator.ComputePerfectFlashlightValue(flashlightRating, hitCirclesCount + sliderCount);
|
||||
double perfectFlashlightPerformance = Flashlight.DifficultyToPerformance(flashlightRating);
|
||||
cognitionPerformance = OsuPerformanceCalculator.AdjustCognitionPerformance(cognitionPerformance, mechanicalPerformance, perfectFlashlightPerformance);
|
||||
|
||||
double basePerformance = mechanicalPerformance + cognitionPerformance;
|
||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
double speedValue = computeSpeedValue(score, osuAttributes);
|
||||
double mechanicalValue = Math.Pow(Math.Pow(aimValue, power) + Math.Pow(speedValue, power), 1.0 / power);
|
||||
|
||||
mechanicalValue *= calculateMechanicalBalancingMultiplier(osuAttributes);
|
||||
//mechanicalValue *= calculateMechanicalBalancingMultiplier(osuAttributes);
|
||||
|
||||
// Cognition
|
||||
|
||||
@ -275,16 +275,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
return flashlightValue;
|
||||
}
|
||||
|
||||
public static double ComputePerfectFlashlightValue(double flashlightDifficulty, int objectsCount)
|
||||
{
|
||||
double flashlightValue = Flashlight.DifficultyToPerformance(flashlightDifficulty);
|
||||
|
||||
flashlightValue *= 0.7 + 0.1 * Math.Min(1.0, objectsCount / 200.0) +
|
||||
(objectsCount > 200 ? 0.2 * Math.Min(1.0, (objectsCount - 200) / 200.0) : 0.0);
|
||||
|
||||
return flashlightValue;
|
||||
}
|
||||
|
||||
private double computeReadingLowARValue(ScoreInfo score, OsuDifficultyAttributes attributes)
|
||||
{
|
||||
double readingValue = ReadingLowAR.DifficultyToPerformance(attributes.ReadingDifficultyLowAR);
|
||||
@ -401,6 +391,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
|
||||
private double calculateMechanicalBalancingMultiplier(OsuDifficultyAttributes attributes)
|
||||
{
|
||||
// Mechanics
|
||||
double aimValue = OsuStrainSkill.DifficultyToPerformance(attributes.AimDifficulty);
|
||||
double speedValue = OsuStrainSkill.DifficultyToPerformance(attributes.SpeedDifficulty);
|
||||
|
||||
@ -409,9 +400,28 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
speedValue *= lengthBonus;
|
||||
|
||||
double power = OsuDifficultyCalculator.SUM_POWER;
|
||||
double summedValue = Math.Pow(Math.Pow(aimValue, power) + Math.Pow(speedValue, power), 1.0 / power);
|
||||
double mechanicalValue = Math.Pow(Math.Pow(aimValue, power) + Math.Pow(speedValue, power), 1.0 / power);
|
||||
|
||||
const double threshold = 800;
|
||||
// Reading
|
||||
double lowARValue = ReadingLowAR.DifficultyToPerformance(attributes.ReadingDifficultyLowAR);
|
||||
double highARValue = OsuStrainSkill.DifficultyToPerformance(attributes.ReadingDifficultyHighAR);
|
||||
|
||||
double readingARValue = Math.Pow(Math.Pow(lowARValue, power) + Math.Pow(highARValue, power), 1.0 / power);
|
||||
|
||||
double readingHDValue = ReadingHidden.DifficultyToPerformance(attributes.HiddenDifficulty);
|
||||
readingHDValue *= lengthBonus;
|
||||
|
||||
double cognitionValue = readingARValue + readingHDValue;
|
||||
|
||||
// Adjusting
|
||||
double flashlightValue = Flashlight.DifficultyToPerformance(attributes.FlashlightDifficulty);;
|
||||
flashlightValue *= 0.7 + 0.1 * Math.Min(1.0, totalHits / 200.0) +
|
||||
(totalHits > 200 ? 0.2 * Math.Min(1.0, (totalHits - 200) / 200.0) : 0.0);
|
||||
|
||||
cognitionValue = AdjustCognitionPerformance(cognitionValue, mechanicalValue, flashlightValue);
|
||||
double summedValue = mechanicalValue + cognitionValue;
|
||||
|
||||
const double threshold = 1000;
|
||||
if (summedValue < threshold)
|
||||
return 1;
|
||||
|
||||
|
@ -166,17 +166,22 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
|
||||
CurrentSectionPeak = Math.Max(mergedDifficulty, CurrentSectionPeak);
|
||||
}
|
||||
|
||||
// Coefs for curve similar to difficulty to performance curve
|
||||
private static double power => 3.0369;
|
||||
private static double multiplier => 3.69656;
|
||||
|
||||
public static double DifficultyToPerformance(double difficulty) => Math.Pow(difficulty, power) * multiplier;
|
||||
private static double performanceToDifficulty(double performance) => Math.Pow(performance / multiplier, 1.0 / power);
|
||||
|
||||
public override double DifficultyValue()
|
||||
{
|
||||
// Coefs for curve similar to difficulty to performance curve
|
||||
const double power = 3.0369, multiplier = 3.69656;
|
||||
|
||||
// Simulating summing to get the most correct value possible
|
||||
double aimValue = Math.Sqrt(aimComponent.DifficultyValue()) * OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER;
|
||||
double speedValue = Math.Sqrt(speedComponent.DifficultyValue()) * OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER;
|
||||
|
||||
double aimPerformance = Math.Pow(aimValue, power) * multiplier;
|
||||
double speedPerformance = Math.Pow(speedValue, power) * multiplier;
|
||||
double aimPerformance = DifficultyToPerformance(aimValue);
|
||||
double speedPerformance = DifficultyToPerformance(speedValue);
|
||||
|
||||
double sumPower = OsuDifficultyCalculator.SUM_POWER;
|
||||
double totalPerformance = Math.Pow(Math.Pow(aimPerformance, sumPower) + Math.Pow(speedPerformance, sumPower), 1.0 / sumPower);
|
||||
@ -197,7 +202,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
|
||||
totalPerformance *= Math.Pow(lengthBonus, lengthBonusPower);
|
||||
|
||||
double adjustedDifficulty = Math.Pow(totalPerformance / multiplier, 1.0 / power);
|
||||
double adjustedDifficulty = performanceToDifficulty(totalPerformance);
|
||||
double difficultyValue = Math.Pow(adjustedDifficulty / OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER, 2.0);
|
||||
|
||||
// Sqrt value to make difficulty depend less on mechanical difficulty
|
||||
|
Loading…
x
Reference in New Issue
Block a user