From 97e2dc338485896f90c51b8ab45b2d8ced11b96f Mon Sep 17 00:00:00 2001 From: HT32 Date: Sun, 13 Oct 2024 18:19:28 -0700 Subject: [PATCH] Add configuration to control usage of the last thin air charge --- BasicRotations/Healer/WHM_Default.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/BasicRotations/Healer/WHM_Default.cs b/BasicRotations/Healer/WHM_Default.cs index f9a09fb..5527ff4 100644 --- a/BasicRotations/Healer/WHM_Default.cs +++ b/BasicRotations/Healer/WHM_Default.cs @@ -1,3 +1,5 @@ +using System.ComponentModel; + namespace DefaultRotations.Healer; [Rotation("Default", CombatType.PvE, GameVersion = "7.05")] @@ -39,6 +41,21 @@ public sealed class WHM_Default : WhiteMageRotation [RotationConfig(CombatType.PvE, Name = "Casting cost requirement for Thin Air to be used")] public float ThinAirNeed { get; set; } = 1000; + + [RotationConfig(CombatType.PvE, Name = "How to manage the last thin air charge")] + public ThinAirUsageStrategy ThinAirLastChargeUsage { get; set; } = ThinAirUsageStrategy.ReserveLastChargeForRaise; + + public enum ThinAirUsageStrategy : byte + { + [Description("Use all thin air charges on expensive spells")] + UseAllCharges, + + [Description("Reserve the last charge for raise")] + ReserveLastChargeForRaise, + + [Description("Reserve the last charge")] + ReserveLastCharge, + } #endregion #region Countdown Logic @@ -61,8 +78,9 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) { if (Player.WillStatusEndGCD(0, 3, true, StatusID.DivineGrace) && DivineCaressPvE.CanUse(out act)) return true; + bool useLastThinAirCharge = ThinAirLastChargeUsage == ThinAirUsageStrategy.UseAllCharges || (ThinAirLastChargeUsage == ThinAirUsageStrategy.ReserveLastChargeForRaise && nextGCD == RaisePvE); if (nextGCD is IBaseAction action && action.Info.MPNeed >= ThinAirNeed && - ThinAirPvE.CanUse(out act)) return true; + ThinAirPvE.CanUse(out act, usedUp: useLastThinAirCharge)) return true; if (nextGCD.IsTheSameTo(true, AfflatusRapturePvE, MedicaPvE, MedicaIiPvE, CureIiiPvE) && (MergedStatus.HasFlag(AutoStatus.HealAreaSpell) || MergedStatus.HasFlag(AutoStatus.HealSingleSpell)))