mirror of https://github.com/ppy/osu
Make the Easy mod's extra life count customizable (#7331)
Make the Easy mod's extra life count customizable
This commit is contained in:
commit
1b1c255394
|
@ -5,6 +5,7 @@
|
|||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Scoring;
|
||||
|
@ -21,7 +22,14 @@ public abstract class ModEasy : Mod, IApplicableToDifficulty, IApplicableFailOve
|
|||
public override bool Ranked => true;
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModHardRock), typeof(ModDifficultyAdjust) };
|
||||
|
||||
private int retries = 2;
|
||||
[SettingSource("Extra Lives", "Number of extra lives")]
|
||||
public Bindable<int> Retries { get; } = new BindableInt(2)
|
||||
{
|
||||
MinValue = 0,
|
||||
MaxValue = 10
|
||||
};
|
||||
|
||||
private int retries;
|
||||
|
||||
private BindableNumber<double> health;
|
||||
|
||||
|
@ -32,6 +40,8 @@ public void ApplyToDifficulty(BeatmapDifficulty difficulty)
|
|||
difficulty.ApproachRate *= ratio;
|
||||
difficulty.DrainRate *= ratio;
|
||||
difficulty.OverallDifficulty *= ratio;
|
||||
|
||||
retries = Retries.Value;
|
||||
}
|
||||
|
||||
public bool AllowFail
|
||||
|
|
Loading…
Reference in New Issue