From 722b5ac75dc49404d5cbbfc6d17fb912ca98f7b8 Mon Sep 17 00:00:00 2001 From: Kage Date: Sun, 17 Nov 2024 17:38:44 +0100 Subject: [PATCH] various little fixes --- ECommons | 2 +- XIVSlothCombo/Combos/JobHelpers/BLM.cs | 29 ++++++++++++++------------ XIVSlothCombo/Combos/JobHelpers/DRG.cs | 6 +++--- XIVSlothCombo/Combos/JobHelpers/MCH.cs | 11 +++++++--- XIVSlothCombo/Combos/JobHelpers/RPR.cs | 6 +++--- XIVSlothCombo/Combos/JobHelpers/SGE.cs | 10 ++------- XIVSlothCombo/Combos/JobHelpers/VPR.cs | 6 +++--- 7 files changed, 36 insertions(+), 34 deletions(-) diff --git a/ECommons b/ECommons index 71ee09f7c..d77c9db19 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 71ee09f7cc2230a73503b945422760da1368405c +Subproject commit d77c9db195056fca9e855c7d142bc6cd8566258f diff --git a/XIVSlothCombo/Combos/JobHelpers/BLM.cs b/XIVSlothCombo/Combos/JobHelpers/BLM.cs index 5dd5166d6..61b64bb0b 100644 --- a/XIVSlothCombo/Combos/JobHelpers/BLM.cs +++ b/XIVSlothCombo/Combos/JobHelpers/BLM.cs @@ -16,29 +16,32 @@ internal class BLM { // BLM Gauge & Extensions public static BLMGauge Gauge = GetJobGauge(); - public static int Fire4Count = ActionWatching.CombatActions.Count(x => x == Fire4); - public static int maxPolyglot = TraitLevelChecked(Traits.EnhancedPolyglotII) ? 3 : + public static bool canWeave = CanSpellWeave(ActionWatching.LastSpell); + + public static uint curMp = LocalPlayer.CurrentMp; + public static BLMOpenerLogic BLMOpener = new(); + + public static int maxPolyglot => TraitLevelChecked(Traits.EnhancedPolyglotII) ? 3 : TraitLevelChecked(Traits.EnhancedPolyglot) ? 2 : 1; - public static bool canWeave = CanSpellWeave(ActionWatching.LastSpell); - public static float elementTimer = Gauge.ElementTimeRemaining / 1000f; - public static double gcdsInTimer = Math.Floor(elementTimer / GetActionCastTime(ActionWatching.LastSpell)); + public static int Fire4Count => ActionWatching.CombatActions.Count(x => x == Fire4); - public static int remainingPolyglotCD = Math.Max(0, + public static float elementTimer => Gauge.ElementTimeRemaining / 1000f; + + public static double gcdsInTimer => Math.Floor(elementTimer / GetActionCastTime(ActionWatching.LastSpell)); + + public static int remainingPolyglotCD => Math.Max(0, (maxPolyglot - Gauge.PolyglotStacks) * 30000 + (Gauge.EnochianTimer - 30000)); - public static Status? thunderDebuffST = + public static Status? thunderDebuffST => FindEffect(ThunderList[OriginalHook(Thunder)], CurrentTarget, LocalPlayer.GameObjectId); - public static Status? thunderDebuffAoE = + public static Status? thunderDebuffAoE => FindEffect(ThunderList[OriginalHook(Thunder2)], CurrentTarget, LocalPlayer.GameObjectId); - public static bool canSwiftF = TraitLevelChecked(Traits.AspectMasteryIII) && - IsOffCooldown(All.Swiftcast); - - public static uint curMp = LocalPlayer.CurrentMp; - public static BLMOpenerLogic BLMOpener = new(); + public static bool canSwiftF => TraitLevelChecked(Traits.AspectMasteryIII) && + IsOffCooldown(All.Swiftcast); public static bool HasPolyglotStacks(BLMGauge gauge) => gauge.PolyglotStacks > 0; diff --git a/XIVSlothCombo/Combos/JobHelpers/DRG.cs b/XIVSlothCombo/Combos/JobHelpers/DRG.cs index bfa0fcbea..21cc869e9 100644 --- a/XIVSlothCombo/Combos/JobHelpers/DRG.cs +++ b/XIVSlothCombo/Combos/JobHelpers/DRG.cs @@ -18,12 +18,12 @@ internal class DRG public static DRGGauge Gauge = GetJobGauge(); public static DRGOpenerLogic DRGOpener = new(); - public static Status? ChaosDoTDebuff = FindTargetEffect(LevelChecked(ChaoticSpring) + public static Status? ChaosDoTDebuff => FindTargetEffect(LevelChecked(ChaoticSpring) ? Debuffs.ChaoticSpring : Debuffs.ChaosThrust); - public static bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && - !HasEffect(All.Buffs.TrueNorth); + public static bool trueNorthReady => TargetNeedsPositionals() && ActionReady(All.TrueNorth) && + !HasEffect(All.Buffs.TrueNorth); internal class DRGOpenerLogic { diff --git a/XIVSlothCombo/Combos/JobHelpers/MCH.cs b/XIVSlothCombo/Combos/JobHelpers/MCH.cs index 72c21e1ac..3a4f28851 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MCH.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MCH.cs @@ -17,18 +17,23 @@ internal class MCH public static float GCD = GetCooldown(OriginalHook(SplitShot)).CooldownTotal; public static float heatblastRC = GetCooldown(Heatblast).CooldownTotal; + public static MCHGauge Gauge = GetJobGauge(); + public static bool drillCD = !LevelChecked(Drill) || (!TraitLevelChecked(Traits.EnhancedMultiWeapon) && GetCooldownRemainingTime(Drill) > heatblastRC * 6) || (TraitLevelChecked(Traits.EnhancedMultiWeapon) && GetRemainingCharges(Drill) < GetMaxCharges(Drill) && GetCooldownRemainingTime(Drill) > heatblastRC * 6); + public static bool anchorCD = !LevelChecked(AirAnchor) || (LevelChecked(AirAnchor) && GetCooldownRemainingTime(AirAnchor) > heatblastRC * 6); + public static bool sawCD = !LevelChecked(Chainsaw) || (LevelChecked(Chainsaw) && GetCooldownRemainingTime(Chainsaw) > heatblastRC * 6); - public static bool interruptReady = ActionReady(All.HeadGraze) && CanInterruptEnemy() && - CanDelayedWeave(ActionWatching.LastWeaponskill); - public static MCHGauge Gauge = GetJobGauge(); + + public static bool interruptReady => ActionReady(All.HeadGraze) && CanInterruptEnemy() && + CanDelayedWeave(ActionWatching.LastWeaponskill); + public static int BSUsed => ActionWatching.CombatActions.Count(x => x == BarrelStabilizer); internal class MCHOpenerLogic diff --git a/XIVSlothCombo/Combos/JobHelpers/RPR.cs b/XIVSlothCombo/Combos/JobHelpers/RPR.cs index 74f4b55c1..525faaf72 100644 --- a/XIVSlothCombo/Combos/JobHelpers/RPR.cs +++ b/XIVSlothCombo/Combos/JobHelpers/RPR.cs @@ -14,12 +14,12 @@ internal class RPR // RPR Gauge & Extensions public static float GCD = GetCooldown(Slice).CooldownTotal; - public static bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && - !HasEffect(All.Buffs.TrueNorth); - public static RPROpenerLogic RPROpener = new(); public static RPRGauge Gauge = GetJobGauge(); + public static bool trueNorthReady => TargetNeedsPositionals() && ActionReady(All.TrueNorth) && + !HasEffect(All.Buffs.TrueNorth); + internal class RPROpenerLogic { private OpenerState currentState = OpenerState.PrePull; diff --git a/XIVSlothCombo/Combos/JobHelpers/SGE.cs b/XIVSlothCombo/Combos/JobHelpers/SGE.cs index de8fa6e6e..0a15b56cf 100644 --- a/XIVSlothCombo/Combos/JobHelpers/SGE.cs +++ b/XIVSlothCombo/Combos/JobHelpers/SGE.cs @@ -16,15 +16,9 @@ internal class SGE public static int Dosis3Count => ActionWatching.CombatActions.Count(x => x == Dosis3); - public static bool HasAddersgall(SGEGauge gauge) - { - return gauge.Addersgall > 0; - } + public static bool HasAddersgall(SGEGauge gauge) => gauge.Addersgall > 0; - public static bool HasAddersting(SGEGauge gauge) - { - return gauge.Addersting > 0; - } + public static bool HasAddersting(SGEGauge gauge) => gauge.Addersting > 0; internal class SGEOpenerLogic { diff --git a/XIVSlothCombo/Combos/JobHelpers/VPR.cs b/XIVSlothCombo/Combos/JobHelpers/VPR.cs index 7b58605f3..c3af51cc7 100644 --- a/XIVSlothCombo/Combos/JobHelpers/VPR.cs +++ b/XIVSlothCombo/Combos/JobHelpers/VPR.cs @@ -17,12 +17,12 @@ internal class VPR public static float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; public static float ireCD = GetCooldownRemainingTime(SerpentsIre); - public static bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && - !HasEffect(All.Buffs.TrueNorth); - public static VPROpenerLogic VPROpener = new(); public static VPRGauge gauge = GetJobGauge(); + public static bool trueNorthReady => TargetNeedsPositionals() && ActionReady(All.TrueNorth) && + !HasEffect(All.Buffs.TrueNorth); + public static bool VicewinderReady => gauge.DreadCombo == DreadCombo.Dreadwinder; public static bool HuntersCoilReady => gauge.DreadCombo == DreadCombo.HuntersCoil;