Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #272 from hte32/main
Browse files Browse the repository at this point in the history
Add configuration to control usage of the last thin air charge
  • Loading branch information
LTS-FFXIV authored Oct 15, 2024
2 parents d18bbfb + 97e2dc3 commit 1e13b7f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion BasicRotations/Healer/WHM_Default.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.ComponentModel;

namespace DefaultRotations.Healer;

[Rotation("Default", CombatType.PvE, GameVersion = "7.05")]
Expand Down Expand Up @@ -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
Expand All @@ -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)))
Expand Down

0 comments on commit 1e13b7f

Please sign in to comment.