From e3753ae29fb88c1aec22896abf4bdcd54df6ded6 Mon Sep 17 00:00:00 2001 From: Lucas A Date: Mon, 23 Dec 2019 11:23:03 +0100 Subject: [PATCH] Make the easy mod's extra life count customizable --- osu.Game/Rulesets/Mods/ModEasy.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Mods/ModEasy.cs b/osu.Game/Rulesets/Mods/ModEasy.cs index a55ebc51d6..7f52cccbc5 100644 --- a/osu.Game/Rulesets/Mods/ModEasy.cs +++ b/osu.Game/Rulesets/Mods/ModEasy.cs @@ -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) }; - private int retries = 2; + [SettingSource("Extra Lives", "Number of extra lives")] + public Bindable Retries { get; } = new BindableInt(2) + { + MinValue = 0, + MaxValue = 10 + }; + + private int retries; private BindableNumber 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