2019-01-24 17:43:03 +09:00
|
|
|
// 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.
|
2018-04-13 18:19:50 +09:00
|
|
|
|
2022-06-17 16:37:17 +09:00
|
|
|
#nullable disable
|
|
|
|
|
2017-04-21 17:33:20 +09:00
|
|
|
using System;
|
2021-02-24 14:32:50 +09:00
|
|
|
using System.Linq;
|
2019-03-27 19:29:27 +09:00
|
|
|
using osu.Framework.Graphics.Sprites;
|
2017-04-21 17:33:20 +09:00
|
|
|
using osu.Game.Graphics;
|
2019-06-21 14:29:16 +09:00
|
|
|
using osu.Game.Rulesets.Judgements;
|
2017-11-20 02:15:29 -05:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
2017-04-21 17:33:20 +09:00
|
|
|
namespace osu.Game.Rulesets.Mods
|
|
|
|
{
|
2021-02-24 14:32:50 +09:00
|
|
|
public abstract class ModSuddenDeath : ModFailCondition
|
2017-04-21 17:33:20 +09:00
|
|
|
{
|
|
|
|
public override string Name => "Sudden Death";
|
2018-11-30 17:16:00 +09:00
|
|
|
public override string Acronym => "SD";
|
2021-12-09 21:15:00 -08:00
|
|
|
public override IconUsage? Icon => OsuIcon.ModSuddenDeath;
|
2017-05-02 21:36:55 +03:00
|
|
|
public override ModType Type => ModType.DifficultyIncrease;
|
2018-03-13 20:07:03 -07:00
|
|
|
public override string Description => "Miss and fail.";
|
2017-04-21 17:33:20 +09:00
|
|
|
public override double ScoreMultiplier => 1;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
2021-02-24 14:32:50 +09:00
|
|
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModPerfect)).ToArray();
|
2020-05-12 20:08:35 +09:00
|
|
|
|
2021-02-24 14:32:50 +09:00
|
|
|
protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result)
|
2020-09-29 15:26:42 +09:00
|
|
|
=> result.Type.AffectsCombo()
|
|
|
|
&& !result.IsHit;
|
2017-04-21 17:33:20 +09:00
|
|
|
}
|
2017-11-20 02:15:29 -05:00
|
|
|
}
|