From c75457486500173a538e92598cc01eef6b7f70ce Mon Sep 17 00:00:00 2001 From: Jay Lawton Date: Tue, 12 Nov 2024 20:06:50 +1000 Subject: [PATCH 1/4] isRelax bool --- .../Difficulty/TaikoDifficultyCalculator.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs b/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs index 7f2558c406f5..b3efb7f46dc6 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs @@ -77,6 +77,8 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat if (beatmap.HitObjects.Count == 0) return new TaikoDifficultyAttributes { Mods = mods }; + bool isRelax = mods.Any(h => h is TaikoModRelax); + Colour colour = (Colour)skills.First(x => x is Colour); Rhythm rhythm = (Rhythm)skills.First(x => x is Rhythm); Stamina stamina = (Stamina)skills.First(x => x is Stamina); @@ -88,15 +90,18 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat double monoStaminaRating = singleColourStamina.DifficultyValue() * stamina_skill_multiplier; double monoStaminaFactor = staminaRating == 0 ? 1 : Math.Pow(monoStaminaRating / staminaRating, 5); - double combinedRating = combinedDifficultyValue(rhythm, colour, stamina); + double combinedRating = combinedDifficultyValue(rhythm, colour, stamina, isRelax); double starRating = rescale(combinedRating * 1.4); // TODO: This is temporary measure as we don't detect abuse of multiple-input playstyles of converts within the current system. if (beatmap.BeatmapInfo.Ruleset.OnlineID == 0) { starRating *= 0.925; - // For maps with low colour variance and high stamina requirement, multiple inputs are more likely to be abused. - if (colourRating < 2 && staminaRating > 8) + + // For maps with either relax or low colour variance and high stamina requirement, multiple inputs are more likely to be abused. + if (isRelax) + starRating *= 0.60; + else if (colourRating < 2 && staminaRating > 8) starRating *= 0.80; } @@ -138,7 +143,7 @@ private double rescale(double sr) /// For each section, the peak strains of all separate skills are combined into a single peak strain for the section. /// The resulting partial rating of the beatmap is a weighted sum of the combined peaks (higher peaks are weighted more). /// - private double combinedDifficultyValue(Rhythm rhythm, Colour colour, Stamina stamina) + private double combinedDifficultyValue(Rhythm rhythm, Colour colour, Stamina stamina, bool isRelax) { List peaks = new List(); @@ -152,6 +157,12 @@ private double combinedDifficultyValue(Rhythm rhythm, Colour colour, Stamina sta double rhythmPeak = rhythmPeaks[i] * rhythm_skill_multiplier; double staminaPeak = staminaPeaks[i] * stamina_skill_multiplier; + if (isRelax) + { + colourPeak = 0; // There is no colour difficulty in relax. + staminaPeak /= 1.5; // Stamina difficulty is decreased with an increased available finger count. + } + double peak = norm(1.5, colourPeak, staminaPeak); peak = norm(2, peak, rhythmPeak); From 955a2dbe9194aabf5674c623227fc4c515b971b2 Mon Sep 17 00:00:00 2001 From: Jay Lawton Date: Tue, 12 Nov 2024 20:06:41 +1000 Subject: [PATCH 2/4] make Relax incompatible with Swap and Random --- osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs index ed09a85ebb59..c5db4e87663e 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs @@ -14,7 +14,8 @@ public class TaikoModRelax : ModRelax, IApplicableToDrawableHitObject { public override LocalisableString Description => @"No need to remember which key is correct anymore!"; - public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(TaikoModSingleTap) }).ToArray(); + public override Type[] IncompatibleMods => + base.IncompatibleMods.Concat(new[] { typeof(TaikoModSingleTap), typeof(TaikoModRandom), typeof(TaikoModSwap) }).ToArray(); public void ApplyToDrawableHitObject(DrawableHitObject drawable) { From 116244873600c9b76b1f7a67eae6bb108c233440 Mon Sep 17 00:00:00 2001 From: Jay Lawton Date: Tue, 12 Nov 2024 21:33:32 +1000 Subject: [PATCH 3/4] Fix missing entries in IncompatibleMods --- osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs | 2 +- osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs index c0be0290e624..ed3beec5d1d4 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs @@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Mods public class TaikoModRandom : ModRandom, IApplicableToBeatmap { public override LocalisableString Description => @"Shuffle around the colours!"; - public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(TaikoModSwap)).ToArray(); + public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(TaikoModSwap)).Append(typeof(ModRelax)).ToArray(); public void ApplyToBeatmap(IBeatmap beatmap) { diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs index fc3913f56d3d..af778fd827b7 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs @@ -18,7 +18,7 @@ public class TaikoModSwap : Mod, IApplicableToBeatmap public override LocalisableString Description => @"Dons become kats, kats become dons"; public override ModType Type => ModType.Conversion; public override double ScoreMultiplier => 1; - public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModRandom)).ToArray(); + public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModRandom)).Append(typeof(ModRelax)).ToArray(); public void ApplyToBeatmap(IBeatmap beatmap) { From 9ac0f025f50f5e6d2d3624b97a26c8edd83b341e Mon Sep 17 00:00:00 2001 From: Jay Lawton Date: Wed, 13 Nov 2024 16:16:20 +1000 Subject: [PATCH 4/4] revert incompat changes --- osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs | 2 +- osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs | 3 +-- osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs index ed3beec5d1d4..c0be0290e624 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs @@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Mods public class TaikoModRandom : ModRandom, IApplicableToBeatmap { public override LocalisableString Description => @"Shuffle around the colours!"; - public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(TaikoModSwap)).Append(typeof(ModRelax)).ToArray(); + public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(TaikoModSwap)).ToArray(); public void ApplyToBeatmap(IBeatmap beatmap) { diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs index c5db4e87663e..ed09a85ebb59 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs @@ -14,8 +14,7 @@ public class TaikoModRelax : ModRelax, IApplicableToDrawableHitObject { public override LocalisableString Description => @"No need to remember which key is correct anymore!"; - public override Type[] IncompatibleMods => - base.IncompatibleMods.Concat(new[] { typeof(TaikoModSingleTap), typeof(TaikoModRandom), typeof(TaikoModSwap) }).ToArray(); + public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(TaikoModSingleTap) }).ToArray(); public void ApplyToDrawableHitObject(DrawableHitObject drawable) { diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs index af778fd827b7..fc3913f56d3d 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs @@ -18,7 +18,7 @@ public class TaikoModSwap : Mod, IApplicableToBeatmap public override LocalisableString Description => @"Dons become kats, kats become dons"; public override ModType Type => ModType.Conversion; public override double ScoreMultiplier => 1; - public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModRandom)).Append(typeof(ModRelax)).ToArray(); + public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModRandom)).ToArray(); public void ApplyToBeatmap(IBeatmap beatmap) {