From db80a33ded60ff8781a2ffd1c1a95ddff75779b6 Mon Sep 17 00:00:00 2001 From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com> Date: Fri, 6 Sep 2024 23:22:26 -0500 Subject: [PATCH] Track and display Warrior stacks; refactor action checks Added `InnerReleaseStacks` and `BerserkStacks` to `WarriorRotation` to track status stacks. Implemented `DisplayStatus` to show stack values using ImGui. Refactored `ActionCheck` logic for several actions to use `InnerReleaseStacks` instead of direct status checks, ensuring actions check stack counts. Removed direct `InnerRelease` status checks for `InnerBeastPvE` and `SteelCyclonePvE`, now only checking `BeastGauge`. --- .../Rotations/Basic/WarriorRotation.cs | 39 +++++++++++++++++-- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/RotationSolver.Basic/Rotations/Basic/WarriorRotation.cs b/RotationSolver.Basic/Rotations/Basic/WarriorRotation.cs index 9e63341ae..25de7b17b 100644 --- a/RotationSolver.Basic/Rotations/Basic/WarriorRotation.cs +++ b/RotationSolver.Basic/Rotations/Basic/WarriorRotation.cs @@ -11,6 +11,37 @@ partial class WarriorRotation /// public static byte BeastGauge => JobGauge.BeastGauge; + /// + /// Holds the remaining amount of InnerRelease stacks + /// + public static byte InnerReleaseStacks + { + get + { + byte stacks = Player.StatusStack(true, StatusID.InnerRelease); + return stacks == byte.MaxValue ? (byte)3 : stacks; + } + } + + /// + /// Holds the remaining amount of Berserk stacks + /// + public static byte BerserkStacks + { + get + { + byte stacks = Player.StatusStack(true, StatusID.Berserk); + return stacks == byte.MaxValue ? (byte)3 : stacks; + } + } + + /// + public override void DisplayStatus() + { + ImGui.Text("InnerReleaseStacks: " + InnerReleaseStacks.ToString()); + ImGui.Text("BerserkStacks: " + BerserkStacks.ToString()); + } + private sealed protected override IBaseAction TankStance => DefiancePvE; static partial void ModifyHeavySwingPvE(ref ActionSetting setting) @@ -71,7 +102,7 @@ static partial void ModifyThrillOfBattlePvE(ref ActionSetting setting) static partial void ModifyInnerBeastPvE(ref ActionSetting setting) { - setting.ActionCheck = () => BeastGauge >= 50 || Player.HasStatus(true, StatusID.InnerRelease); + setting.ActionCheck = () => BeastGauge >= 50; setting.UnlockedByQuestID = 66586; } @@ -101,7 +132,7 @@ static partial void ModifyHolmgangPvE(ref ActionSetting setting) static partial void ModifySteelCyclonePvE(ref ActionSetting setting) { - setting.ActionCheck = () => BeastGauge >= 50 || Player.HasStatus(true, StatusID.InnerRelease); + setting.ActionCheck = () => BeastGauge >= 50; setting.CreateConfig = () => new ActionConfig() { AoeCount = 2, @@ -132,7 +163,7 @@ static partial void ModifyInfuriatePvE(ref ActionSetting setting) static partial void ModifyFellCleavePvE(ref ActionSetting setting) { - setting.ActionCheck = () => BeastGauge >= 50 || Player.HasStatus(true, StatusID.InnerRelease); + setting.ActionCheck = () => BeastGauge >= 50 || InnerReleaseStacks > 0; setting.UnlockedByQuestID = 66124; setting.StatusProvide = [StatusID.BurgeoningFury]; } @@ -153,7 +184,7 @@ static partial void ModifyEquilibriumPvE(ref ActionSetting setting) static partial void ModifyDecimatePvE(ref ActionSetting setting) { - setting.ActionCheck = () => BeastGauge >= 50 || Player.HasStatus(true, StatusID.InnerRelease); + setting.ActionCheck = () => BeastGauge >= 50 || InnerReleaseStacks > 0; setting.UnlockedByQuestID = 66137; setting.CreateConfig = () => new ActionConfig() {