mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Fix mod failure checks executing actual game logic
This commit is contained in:
@ -11,10 +11,11 @@ namespace osu.Game.Rulesets.Mods
|
||||
/// <summary>
|
||||
/// Whether we should allow failing at the current point in time.
|
||||
/// </summary>
|
||||
bool AllowFail { get; }
|
||||
/// <returns>Whether the fail should be allowed to proceed. Return false to block.</returns>
|
||||
bool PerformFail();
|
||||
|
||||
/// <summary>
|
||||
/// Whether we want to restart on fail. Only used if <see cref="AllowFail"/> is true.
|
||||
/// Whether we want to restart on fail. Only used if <see cref="PerformFail"/> returns true.
|
||||
/// </summary>
|
||||
bool RestartOnFail { get; }
|
||||
}
|
||||
|
@ -27,7 +27,8 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override string Description => "Watch a perfect automated play through the song.";
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
public bool AllowFail => false;
|
||||
public bool PerformFail() => false;
|
||||
|
||||
public bool RestartOnFail => false;
|
||||
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail) };
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
/// <summary>
|
||||
/// We never fail, 'yo.
|
||||
/// </summary>
|
||||
public bool AllowFail => false;
|
||||
public bool PerformFail() => false;
|
||||
|
||||
public bool RestartOnFail => false;
|
||||
|
||||
|
@ -48,17 +48,14 @@ namespace osu.Game.Rulesets.Mods
|
||||
retries = Retries.Value;
|
||||
}
|
||||
|
||||
public bool AllowFail
|
||||
public bool PerformFail()
|
||||
{
|
||||
get
|
||||
{
|
||||
if (retries == 0) return true;
|
||||
if (retries == 0) return true;
|
||||
|
||||
health.Value = health.MaxValue;
|
||||
retries--;
|
||||
health.Value = health.MaxValue;
|
||||
retries--;
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool RestartOnFail => false;
|
||||
|
@ -20,7 +20,8 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override bool Ranked => true;
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModNoFail), typeof(ModRelax), typeof(ModAutoplay) };
|
||||
|
||||
public bool AllowFail => true;
|
||||
public bool PerformFail() => true;
|
||||
|
||||
public bool RestartOnFail => true;
|
||||
|
||||
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
|
||||
|
Reference in New Issue
Block a user