From 33e1273df8095a1afb0a64950d82d13e79a55475 Mon Sep 17 00:00:00 2001 From: MBmasher Date: Wed, 15 Sep 2021 19:03:42 +1000 Subject: [PATCH 1/3] Include Flashlight in total SR calculation --- .../Difficulty/OsuDifficultyCalculator.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs index da879cb02e..5087da6153 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs @@ -37,7 +37,15 @@ namespace osu.Game.Rulesets.Osu.Difficulty double baseAimPerformance = Math.Pow(5 * Math.Max(1, aimRating / 0.0675) - 4, 3) / 100000; double baseSpeedPerformance = Math.Pow(5 * Math.Max(1, speedRating / 0.0675) - 4, 3) / 100000; - double basePerformance = Math.Pow(Math.Pow(baseAimPerformance, 1.1) + Math.Pow(baseSpeedPerformance, 1.1), 1 / 1.1); + double baseFlashlightPerformance = 0.0; + if (mods.Any(h => h is OsuModFlashlight)) + baseFlashlightPerformance = Math.Pow(flashlightRating, 2.0) * 25.0; + double basePerformance = + Math.Pow( + Math.Pow(baseAimPerformance, 1.1) + + Math.Pow(baseSpeedPerformance, 1.1) + + Math.Pow(baseFlashlightPerformance, 1.1), 1.0 / 1.1 + ); double starRating = basePerformance > 0.00001 ? Math.Cbrt(1.12) * 0.027 * (Math.Cbrt(100000 / Math.Pow(2, 1 / 1.1) * basePerformance) + 4) : 0; HitWindows hitWindows = new OsuHitWindows(); @@ -95,6 +103,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty new OsuModHalfTime(), new OsuModEasy(), new OsuModHardRock(), + new OsuModFlashlight(), }; } -} +} \ No newline at end of file From a8539bc75b6e88589fa16619b729a13c73611fcf Mon Sep 17 00:00:00 2001 From: MBmasher Date: Wed, 15 Sep 2021 19:04:36 +1000 Subject: [PATCH 2/3] Add newline to end of file --- osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs index 5087da6153..411140c756 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs @@ -106,4 +106,4 @@ namespace osu.Game.Rulesets.Osu.Difficulty new OsuModFlashlight(), }; } -} \ No newline at end of file +} From b9c91111d2a855e6935b443a5871c6b2d990885e Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 21 Sep 2021 12:43:29 +0900 Subject: [PATCH 3/3] Add some whitespace --- osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs index 529f8b9672..cb3338126c 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs @@ -39,14 +39,17 @@ namespace osu.Game.Rulesets.Osu.Difficulty double baseAimPerformance = Math.Pow(5 * Math.Max(1, aimRating / 0.0675) - 4, 3) / 100000; double baseSpeedPerformance = Math.Pow(5 * Math.Max(1, speedRating / 0.0675) - 4, 3) / 100000; double baseFlashlightPerformance = 0.0; + if (mods.Any(h => h is OsuModFlashlight)) baseFlashlightPerformance = Math.Pow(flashlightRating, 2.0) * 25.0; + double basePerformance = Math.Pow( Math.Pow(baseAimPerformance, 1.1) + Math.Pow(baseSpeedPerformance, 1.1) + Math.Pow(baseFlashlightPerformance, 1.1), 1.0 / 1.1 ); + double starRating = basePerformance > 0.00001 ? Math.Cbrt(1.12) * 0.027 * (Math.Cbrt(100000 / Math.Pow(2, 1 / 1.1) * basePerformance) + 4) : 0; HitWindows hitWindows = new OsuHitWindows();