From e12177487c7b7b4d4d0bf54b6bdf321d2ed8fe9f Mon Sep 17 00:00:00 2001 From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com> Date: Tue, 17 Dec 2024 19:03:15 -0600 Subject: [PATCH] Added PLD option to prevent actions if you are currently using passage of arms --- BasicRotations/Tank/PLD_Default.cs | 42 ++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/BasicRotations/Tank/PLD_Default.cs b/BasicRotations/Tank/PLD_Default.cs index 7bc4830d9..659903a2e 100644 --- a/BasicRotations/Tank/PLD_Default.cs +++ b/BasicRotations/Tank/PLD_Default.cs @@ -1,12 +1,15 @@ namespace DefaultRotations.Tank; -[Rotation("Default", CombatType.PvE, GameVersion = "7.05")] +[Rotation("Default", CombatType.PvE, GameVersion = "7.15")] [SourceCode(Path = "main/BasicRotations/Tank/PLD_Default.cs")] [Api(4)] public class PLD_Default : PaladinRotation { #region Config Options + [RotationConfig(CombatType.PvE, Name = "Prevent actions while you have Passage of Prms up")] + public bool PassageProtec { get; set; } = false; + [RotationConfig(CombatType.PvE, Name = "Use Hallowed Ground with Cover")] private bool HallowedWithCover { get; set; } = true; @@ -80,25 +83,29 @@ private bool HolySpiritFirst(out IAction? act) #region oGCD Logic protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) { - { - if (Player.HasStatus(true, StatusID.Cover) && HallowedWithCover && HallowedGroundPvE.CanUse(out act)) return true; + act = null; + if (PassageProtec && Player.HasStatus(true, StatusID.PassageOfArms)) return false; - if (HallowedGroundPvE.CanUse(out act) - && Player.GetHealthRatio() <= HealthForDyingTanks) return true; + if (Player.HasStatus(true, StatusID.Cover) && HallowedWithCover && HallowedGroundPvE.CanUse(out act)) return true; - if ((Player.HasStatus(true, StatusID.Rampart) || Player.HasStatus(true, StatusID.Sentinel)) && - InterventionPvE.CanUse(out act) && - InterventionPvE.Target.Target?.GetHealthRatio() < 0.6) return true; + if (HallowedGroundPvE.CanUse(out act) + && Player.GetHealthRatio() <= HealthForDyingTanks) return true; + + if ((Player.HasStatus(true, StatusID.Rampart) || Player.HasStatus(true, StatusID.Sentinel)) && + InterventionPvE.CanUse(out act) && + InterventionPvE.Target.Target?.GetHealthRatio() < 0.6) return true; + + if (CoverPvE.CanUse(out act) && CoverPvE.Target.Target?.DistanceToPlayer() < 10 && + CoverPvE.Target.Target?.GetHealthRatio() < CoverRatio) return true; - if (CoverPvE.CanUse(out act) && CoverPvE.Target.Target?.DistanceToPlayer() < 10 && - CoverPvE.Target.Target?.GetHealthRatio() < CoverRatio) return true; - } return base.EmergencyAbility(nextGCD, out act); } [RotationDesc(ActionID.IntervenePvE)] protected override bool MoveForwardAbility(IAction nextGCD, out IAction? act) { + act = null; + if (PassageProtec && Player.HasStatus(true, StatusID.PassageOfArms)) return false; if (IntervenePvE.CanUse(out act)) return true; return base.MoveForwardAbility(nextGCD, out act); } @@ -106,6 +113,8 @@ protected override bool MoveForwardAbility(IAction nextGCD, out IAction? act) [RotationDesc(ActionID.SentinelPvE, ActionID.RampartPvE, ActionID.BulwarkPvE, ActionID.SheltronPvE, ActionID.ReprisalPvE)] protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act) { + act = null; + if (PassageProtec && Player.HasStatus(true, StatusID.PassageOfArms)) return false; // If the player has the Hallowed Ground status, don't use any abilities. if (!Player.HasStatus(true, StatusID.HallowedGround)) @@ -132,6 +141,9 @@ protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act) [RotationDesc(ActionID.DivineVeilPvE, ActionID.PassageOfArmsPvE)] protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act) { + act = null; + if (PassageProtec && Player.HasStatus(true, StatusID.PassageOfArms)) return false; + if (DivineVeilPvE.CanUse(out act)) return true; if (PassageOfArmsPvE.CanUse(out act)) return true; @@ -141,6 +153,9 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act) protected override bool AttackAbility(IAction nextGCD, out IAction? act) { + act = null; + if (PassageProtec && Player.HasStatus(true, StatusID.PassageOfArms)) return false; + if (WeaponRemain > 0.42f) { act = null; @@ -173,6 +188,9 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) #region GCD Logic protected override bool GeneralGCD(out IAction? act) { + act = null; + if (PassageProtec && Player.HasStatus(true, StatusID.PassageOfArms)) return false; + //Minimizes Accidents in EX and Savage Hopefully if (IsInHighEndDuty && !InCombat) { act = null; return false; } @@ -232,6 +250,8 @@ protected override bool GeneralGCD(out IAction? act) [RotationDesc(ActionID.ClemencyPvE)] protected override bool HealSingleGCD(out IAction? act) { + act = null; + if (PassageProtec && Player.HasStatus(true, StatusID.PassageOfArms)) return false; if (ClemencyPvE.CanUse(out act)) return true; return base.HealSingleGCD(out act); }