1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-15 14:13:01 +08:00
Files
osu-lazer/osu.Game/Rulesets/Mods/ModHidden.cs
T
Bartłomiej Dach 05496111d6 Disallow selected mods from being valid for freestyle as required mods due to them not being consistently compatible with other mods across rulesets
Closes https://github.com/ppy/osu/issues/33444.

The issue here is that for a set of required mods to make sense in the
context of a freestyle playlist item, it must be consistently either
valid or invalid *as a combination* across all four default rulesets,
because freestyle also permits changing ruleset. There are two
pertinent cases here:

- Flashlight and Hidden are compatible in osu!, taiko, and catch, but
  not compatible in mania. In this case I've disallowed both mods
  because of symmetry, basically - I don't see one "better mod" to
  disallow here.

- Accuracy Challenge and Easy are incompatible in osu!, catch, and mania
  (because the mod gives extra lives) there, but *compatible* in taiko,
  where it does not. In this case I've disallowed Accuracy Challenge
  only, because I find its value in being forced on a freestyle room
  to be much smaller than Easy's.

In the large scale of things I don't see this being very important
because my view is that 99% of the use case of required mods in
freestyle is going to be changing the track speed. So I don't think
anyone is going to care about this going away - but we can reassess if
I'm proven wrong.
2025-06-05 15:00:54 +02:00

39 lines
1.1 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
namespace osu.Game.Rulesets.Mods
{
public abstract class ModHidden : ModWithVisibilityAdjustment, IApplicableToScoreProcessor
{
public override string Name => "Hidden";
public override string Acronym => "HD";
public override IconUsage? Icon => OsuIcon.ModHidden;
public override ModType Type => ModType.DifficultyIncrease;
public override bool Ranked => UsesDefaultConfiguration;
public virtual void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
{
}
public virtual ScoreRank AdjustRank(ScoreRank rank, double accuracy)
{
switch (rank)
{
case ScoreRank.X:
return ScoreRank.XH;
case ScoreRank.S:
return ScoreRank.SH;
default:
return rank;
}
}
}
}