1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-31 02:43:18 +08:00

fix DI (again)

This commit is contained in:
Givikap120 2024-12-18 19:43:34 +02:00
parent afce62be73
commit e13cc461d4
3 changed files with 8 additions and 10 deletions

View File

@ -43,7 +43,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double speedNotes = skills.OfType<Speed>().First().RelevantNoteCount();
double flashlightRating = Math.Sqrt(skills.OfType<Flashlight>().First().DifficultyValue()) * difficulty_multiplier;
double readingLowARRating = Math.Sqrt(skills.OfType<ReadingLowAr>().First().DifficultyValue()) * difficulty_multiplier;
double readingLowArRating = Math.Sqrt(skills.OfType<ReadingLowAr>().First().DifficultyValue()) * difficulty_multiplier;
double sliderFactor = aimRating > 0 ? aimRatingNoSliders / aimRating : 1;
@ -55,7 +55,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
{
aimRating = Math.Pow(aimRating, 0.8);
flashlightRating = Math.Pow(flashlightRating, 0.8);
readingLowARRating = Math.Pow(readingLowARRating, 0.9);
readingLowArRating = Math.Pow(readingLowArRating, 0.9);
}
if (mods.Any(h => h is OsuModRelax))
@ -63,14 +63,14 @@ namespace osu.Game.Rulesets.Osu.Difficulty
aimRating *= 0.9;
speedRating = 0.0;
flashlightRating *= 0.7;
readingLowARRating *= 0.95;
readingLowArRating *= 0.95;
}
double aimPerformance = OsuStrainSkill.DifficultyToPerformance(aimRating);
double speedPerformance = OsuStrainSkill.DifficultyToPerformance(speedRating);
// Cognition
double readingLowArPerformance = ReadingLowAr.DifficultyToPerformance(readingLowARRating);
double readingLowArPerformance = ReadingLowAr.DifficultyToPerformance(readingLowArRating);
double readingArPerformance = readingLowArPerformance;
double potentialFlashlightPerformance = Flashlight.DifficultyToPerformance(flashlightRating);
@ -109,7 +109,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
AimDifficulty = aimRating,
SpeedDifficulty = speedRating,
SpeedNoteCount = speedNotes,
ReadingDifficultyLowAr = readingLowARRating,
ReadingDifficultyLowAr = readingLowArRating,
FlashlightDifficulty = flashlightRating,
SliderFactor = sliderFactor,
AimDifficultStrainCount = aimDifficultyStrainCount,

View File

@ -294,10 +294,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double visualBonus = 0.1 * DifficultyCalculationUtils.Logistic(attributes.ApproachRate - 8.0);
// Buff if OD is way lower than AR
double ArOdDelta = Math.Max(0, attributes.OverallDifficulty - attributes.ApproachRate);
double arOdDelta = Math.Max(0, attributes.OverallDifficulty - attributes.ApproachRate);
// This one is goes from 0.0 on delta=0 to 1.0 somewhere around delta=3.4
double deltaBonus = (1 - Math.Pow(0.95, Math.Pow(ArOdDelta, 4)));
double deltaBonus = (1 - Math.Pow(0.95, Math.Pow(arOdDelta, 4)));
// Nerf delta bonus on OD lower than 10 and 9
if (attributes.OverallDifficulty < 10)

View File

@ -188,8 +188,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
double angle = (double)prevObject.Angle;
// Overlapness between current and prev to make streams have 0 buff
double instantOverlapness = 0;
prevObject.OverlapValues.TryGetValue(loopObj.Index, out instantOverlapness);
prevObject.OverlapValues.TryGetValue(loopObj.Index, out double instantOverlapness);
// Nerf overlaps on wide angles
double angleFactor = 1;
@ -321,7 +320,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
private static List<OsuDifficultyHitObject> retrieveCurrentVisibleObjects(OsuDifficultyHitObject current)
{
var visibleObjects = new List<OsuDifficultyHitObject>();
for (int i = 0; i < current.Index; i++)