1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 01:23:21 +08:00

reverted universal HDFL attribute adding

this means that now full memory maps are worth less without HD
this is true for both Low AR and High AR
This commit is contained in:
Givikap120 2024-09-10 16:02:40 +03:00
parent 657ec261c1
commit 3069cdd118
3 changed files with 11 additions and 36 deletions

View File

@ -56,12 +56,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty
[JsonProperty("flashlight_difficulty")]
public double FlashlightDifficulty { get; set; }
/// <summary>
/// The difficulty corresponding to the flashlight skill with HD (used in capping cognition performance).
/// </summary>
[JsonProperty("hidden_flashlight_difficulty")]
public double HiddenFlashlightDifficulty { get; set; }
/// <summary>
/// Describes how much of <see cref="AimDifficulty"/> is contributed to by hitcircles or sliders.
/// A value closer to 1.0 indicates most of <see cref="AimDifficulty"/> is contributed by hitcircles.
@ -118,10 +112,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
yield return (ATTRIB_ID_OVERALL_DIFFICULTY, OverallDifficulty);
yield return (ATTRIB_ID_APPROACH_RATE, ApproachRate);
yield return (ATTRIB_ID_DIFFICULTY, StarRating);
if (ShouldSerializeFlashlightDifficulty())
yield return (ATTRIB_ID_FLASHLIGHT, FlashlightDifficulty);
yield return (ATTRIB_ID_FLASHLIGHT, FlashlightDifficulty);
yield return (ATTRIB_ID_SLIDER_FACTOR, SliderFactor);
yield return (ATTRIB_ID_SPEED_NOTE_COUNT, SpeedNoteCount);
}

View File

@ -42,30 +42,24 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double speedRating = Math.Sqrt(skills[2].DifficultyValue()) * DIFFICULTY_MULTIPLIER;
double speedNotes = ((Speed)skills[2]).RelevantNoteCount();
double hiddenFlashlightRating = Math.Sqrt(skills[3].DifficultyValue()) * DIFFICULTY_MULTIPLIER;
double flashlightRating = Math.Sqrt(skills[3].DifficultyValue()) * DIFFICULTY_MULTIPLIER;
double readingLowARRating = Math.Sqrt(skills[4].DifficultyValue()) * DIFFICULTY_MULTIPLIER;
double readingHighARRating = Math.Sqrt(skills[5].DifficultyValue()) * DIFFICULTY_MULTIPLIER;
double hiddenRating = 0;
double flashlightRating = 0;
double sliderFactor = aimRating > 0 ? aimRatingNoSliders / aimRating : 1;
int index = 6;
double baseReadingHiddenPerformance = 0;
if (mods.Any(h => h is OsuModHidden))
{
hiddenRating = Math.Sqrt(skills[6].DifficultyValue()) * DIFFICULTY_MULTIPLIER;
baseReadingHiddenPerformance = ReadingHidden.DifficultyToPerformance(hiddenRating);
index++;
}
double baseFlashlightPerformance = 0.0;
if (mods.Any(h => h is OsuModFlashlight))
{
flashlightRating = Math.Sqrt(skills[index].DifficultyValue()) * DIFFICULTY_MULTIPLIER;
baseFlashlightPerformance = Flashlight.DifficultyToPerformance(flashlightRating);
}
@ -110,9 +104,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double cognitionPerformance = baseFlashlightARPerformance + baseReadingHiddenPerformance;
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 + hiddenFlashlightPerformance
double hiddenFlashlightPerformance = OsuPerformanceCalculator.ComputePerfectFlashlightValue(hiddenFlashlightRating, hitCirclesCount + sliderCount);
cognitionPerformance = OsuPerformanceCalculator.AdjustCognitionPerformance(cognitionPerformance, mechanicalPerformance, hiddenFlashlightPerformance);
// Limit cognition by full memorisation difficulty, what is assumed to be mechanicalPerformance + flashlightPerformance
double perfectFlashlightPerformance = OsuPerformanceCalculator.ComputePerfectFlashlightValue(flashlightRating, hitCirclesCount + sliderCount);
cognitionPerformance = OsuPerformanceCalculator.AdjustCognitionPerformance(cognitionPerformance, mechanicalPerformance, perfectFlashlightPerformance);
double basePerformance = mechanicalPerformance + cognitionPerformance;
@ -136,7 +130,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty
ReadingDifficultyHighAR = readingHighARRating,
HiddenDifficulty = hiddenRating,
FlashlightDifficulty = flashlightRating,
HiddenFlashlightDifficulty = hiddenFlashlightRating,
SliderFactor = sliderFactor,
ApproachRate = IBeatmapDifficultyInfo.InverseDifficultyRange(preempt, 1800, 1200, 450),
OverallDifficulty = (80 - hitWindowGreat) / 6,
@ -172,7 +165,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
new Aim(mods, true),
new Aim(mods, false),
new Speed(mods),
new HiddenFlashlight(mods),
new Flashlight(mods),
new ReadingLowAR(mods),
new ReadingHighAR(mods),
};
@ -180,9 +173,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty
if (mods.Any(h => h is OsuModHidden))
skills.Add(new ReadingHidden(mods));
if (mods.Any(h => h is OsuModFlashlight))
skills.Add(new Flashlight(mods));
return skills.ToArray();
}

View File

@ -69,18 +69,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
// Cognition
// Get HDFL value for capping reading performance
// In the future consider separating "all notes all invisible" and "full-memory but notes are visible" case
double potentialHiddenFlashlightValue = computeFlashlightValue(score, osuAttributes, true);
double lowARValue = computeReadingLowARValue(score, osuAttributes);
double highARValue = computeReadingHighARValue(score, osuAttributes);
double readingARValue = Math.Pow(Math.Pow(lowARValue, power) + Math.Pow(highARValue, power), 1.0 / power);
double flashlightValue = 0;
if (score.Mods.Any(h => h is OsuModFlashlight))
flashlightValue = computeFlashlightValue(score, osuAttributes);
double flashlightValue = computeFlashlightValue(score, osuAttributes);
double readingHDValue = 0;
if (score.Mods.Any(h => h is OsuModHidden))
@ -91,7 +85,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double flashlightARValue = Math.Pow(Math.Pow(flashlightValue, flPower) + Math.Pow(readingARValue, flPower), 1.0 / flPower);
double cognitionValue = flashlightARValue + readingHDValue;
cognitionValue = AdjustCognitionPerformance(cognitionValue, mechanicalValue, potentialHiddenFlashlightValue);
cognitionValue = AdjustCognitionPerformance(cognitionValue, mechanicalValue, flashlightValue);
double accuracyValue = computeAccuracyValue(score, osuAttributes);
@ -108,7 +102,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double visualFlashlightValue = cognitionValue * flashlightARPortion * flashlightPortion;
// Calculate reading difficulty as there was no FL in the first place
double visualCognitionValue = AdjustCognitionPerformance(readingARValue + readingHDValue, mechanicalValue, potentialHiddenFlashlightValue);
double visualCognitionValue = AdjustCognitionPerformance(readingARValue + readingHDValue, mechanicalValue, flashlightValue);
return new OsuPerformanceAttributes
{
@ -259,9 +253,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty
return accuracyValue;
}
private double computeFlashlightValue(ScoreInfo score, OsuDifficultyAttributes attributes, bool alwaysUseHD = false)
private double computeFlashlightValue(ScoreInfo score, OsuDifficultyAttributes attributes)
{
double flashlightValue = Flashlight.DifficultyToPerformance(alwaysUseHD ? attributes.HiddenFlashlightDifficulty : attributes.FlashlightDifficulty);
double flashlightValue = Flashlight.DifficultyToPerformance(attributes.FlashlightDifficulty);
// Penalize misses by assessing # of misses relative to the total # of objects. Default a 3% reduction for any # of misses.
if (effectiveMissCount > 0)