From 6402f23f0245ecac17f82f1a9e5f06b9bd7898b2 Mon Sep 17 00:00:00 2001 From: Givikap120 Date: Mon, 12 Feb 2024 21:00:15 +0200 Subject: [PATCH] Added Traceable support for pp --- .../Difficulty/OsuPerformanceCalculator.cs | 12 ++++++++++++ osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs | 1 + 2 files changed, 13 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index b31f4ff519..4771bce280 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -116,6 +116,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty // We want to give more reward for lower AR when it comes to aim and HD. This nerfs high AR and buffs lower AR. aimValue *= 1.0 + 0.04 * (12.0 - attributes.ApproachRate); } + else if (score.Mods.Any(h => h is OsuModTraceable)) + { + // Default 2% increase and another is scaled by AR + aimValue *= 1.02 + 0.02 * (12.0 - attributes.ApproachRate); + } // We assume 15% of sliders in a map are difficult since there's no way to tell from the performance calculator. double estimateDifficultSliders = attributes.SliderCount * 0.15; @@ -167,6 +172,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty // We want to give more reward for lower AR when it comes to aim and HD. This nerfs high AR and buffs lower AR. speedValue *= 1.0 + 0.04 * (12.0 - attributes.ApproachRate); } + else if (score.Mods.Any(h => h is OsuModTraceable)) + { + // More reward for speed because speed on Traceable is annoying + speedValue *= 1.04 + 0.06 * (12.0 - attributes.ApproachRate); + } // Calculate accuracy assuming the worst case scenario double relevantTotalDiff = totalHits - attributes.SpeedNoteCount; @@ -214,6 +224,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty accuracyValue *= 1.14; else if (score.Mods.Any(m => m is OsuModHidden)) accuracyValue *= 1.08; + else if (score.Mods.Any(m => m is OsuModTraceable)) + accuracyValue *= 1.02 + 0.01 * (12.0 - attributes.ApproachRate); if (score.Mods.Any(m => m is OsuModFlashlight)) accuracyValue *= 1.02; diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs b/osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs index 9671f53bea..320c0a7040 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs @@ -19,6 +19,7 @@ namespace osu.Game.Rulesets.Osu.Mods public override ModType Type => ModType.Fun; public override LocalisableString Description => "Put your faith in the approach circles..."; public override double ScoreMultiplier => 1; + public override bool Ranked => UsesDefaultConfiguration; public override Type[] IncompatibleMods => new[] { typeof(IHidesApproachCircles), typeof(OsuModDepth) };