Skip to content

Commit

Permalink
added worst-case for 50s
Browse files Browse the repository at this point in the history
  • Loading branch information
Givikap120 committed Sep 22, 2024
1 parent b1374a7 commit ce8cac0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static double calculateNormalisedHitError(double od, int objectCount, in
{
int relevant300Count = count300 - (objectCount - accuracyObjectCount);
if (relevant300Count <= 0)
return double.NaN;
return 200 - od * 10;

// Probability of landing a 300 where the player has a 20% chance of getting at least the given amount of 300s.
double probability = Beta.InvCDF(relevant300Count, 1 + accuracyObjectCount - relevant300Count, 0.2);
Expand All @@ -108,7 +108,7 @@ private static double calculateNormalisedHitError(double od, int objectCount, in

private static double calculateAimWeight(double normalizedHitError, int combo, int maxCombo, int objectCount, Mod[] visualMods)
{
double accuracyWeight = double.IsNaN(normalizedHitError) ? 0 : Math.Pow(0.995, normalizedHitError) * 1.04;
double accuracyWeight = Math.Pow(0.995, normalizedHitError) * 1.04;
double comboWeight = Math.Pow(combo, 0.8) / Math.Pow(maxCombo, 0.8);
double flashlightLengthWeight = visualMods.Any(m => m is OsuModFlashlight) ? 1 + comboWeight * Math.Atan(objectCount / 2000.0) : 1;

Expand All @@ -117,7 +117,7 @@ private static double calculateAimWeight(double normalizedHitError, int combo, i

private static double calculateSpeedWeight(double normalizedHitError, int combo, int maxCombo)
{
double accuracyWeight = double.IsNaN(normalizedHitError) ? 0 : Math.Pow(0.985, normalizedHitError) * 1.12;
double accuracyWeight = Math.Pow(0.985, normalizedHitError) * 1.12;
double comboWeight = Math.Pow(combo, 0.4) / Math.Pow(maxCombo, 0.4);

return accuracyWeight * (enable_csr ? 1 : comboWeight);
Expand All @@ -136,6 +136,6 @@ private static double calculateAccuracyWeight(int accuracyObjectCount, Mod[] vis
return lengthWeight * modWeight;
}

private static double calculateAccuracyValue(double normalizedHitError) => double.IsNaN(normalizedHitError) ? 0 : 560 * Math.Pow(0.85, normalizedHitError);
private static double calculateAccuracyValue(double normalizedHitError) => 560 * Math.Pow(0.85, normalizedHitError);
}
}

0 comments on commit ce8cac0

Please sign in to comment.