From e98ef0ce57b60edefd5fa039fc89059320f3c718 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Sun, 25 Aug 2024 18:15:02 +0100 Subject: [PATCH] Fix low level MNK combo issues --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 7 +- XIVSlothCombo/Combos/PvE/MNK.cs | 117 ++++++++++++------------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index 93bbe544d..564013dd3 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -5,6 +5,7 @@ using XIVSlothCombo.Combos.PvE; using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Data; +using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.JobHelpers { @@ -15,7 +16,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable { if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm) || CustomComboFunctions.HasEffect(Buffs.FormlessFist)) { - if (Gauge.OpoOpoFury == 0) + if (Gauge.OpoOpoFury == 0 && DragonKick.LevelChecked()) { if (CustomComboFunctions.LevelChecked(DragonKick)) return DragonKick; @@ -28,7 +29,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable if (CustomComboFunctions.HasEffect(Buffs.RaptorForm)) { - if (Gauge.RaptorFury == 0) + if (Gauge.RaptorFury == 0 && TwinSnakes.LevelChecked()) { if (CustomComboFunctions.LevelChecked(TwinSnakes)) return TwinSnakes; @@ -42,7 +43,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable if (CustomComboFunctions.HasEffect(Buffs.CoeurlForm)) { - if (Gauge.CoeurlFury == 0) + if (Gauge.CoeurlFury == 0 && Demolish.LevelChecked()) { if (!CustomComboFunctions.OnTargetsRear() && CustomComboFunctions.TargetNeedsPositionals() diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index cba7252be..97fe1fcc3 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -111,7 +111,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } // OGCDs - if (inCombat && canWeave) + if (canWeave) { if (IsEnabled(Variant.VariantRampart) && IsOffCooldown(Variant.VariantRampart)) @@ -157,80 +157,79 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } // GCDs - if (inCombat) + + // Ensure usage if buff is almost depleted. + if (HasEffect(Buffs.FiresRumination) && GetBuffRemainingTime(Buffs.FiresRumination) < 4) { - // Ensure usage if buff is almost depleted. - if (HasEffect(Buffs.FiresRumination) && GetBuffRemainingTime(Buffs.FiresRumination) < 4) - { - return FiresReply; - } + return FiresReply; + } - if (HasEffect(Buffs.WindsRumination) && GetBuffRemainingTime(Buffs.WindsRumination) < 4) - { - return WindsReply; - } + if (HasEffect(Buffs.WindsRumination) && GetBuffRemainingTime(Buffs.WindsRumination) < 4) + { + return WindsReply; + } - if (HasEffect(Buffs.FormlessFist)) - { - return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); - } + if (HasEffect(Buffs.FormlessFist)) + { + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + } - // Masterful Blitz - if (MasterfulBlitz.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && !IsOriginal(MasterfulBlitz)) - { - return OriginalHook(MasterfulBlitz); - } + // Masterful Blitz + if (MasterfulBlitz.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && !IsOriginal(MasterfulBlitz)) + { + return OriginalHook(MasterfulBlitz); + } - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) - { - bool solarNadi = Gauge.Nadi == Nadi.SOLAR; - bool lunarNadi = Gauge.Nadi == Nadi.LUNAR; - int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); - int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); - int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) + { + bool solarNadi = Gauge.Nadi == Nadi.SOLAR; + bool lunarNadi = Gauge.Nadi == Nadi.LUNAR; + int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); + int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); + int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); - #region Open Solar - if (!solarNadi && !bothNadisOpen) + #region Open Solar + if (!solarNadi && !bothNadisOpen) + { + if (coeurlChakra == 0) { - if (coeurlChakra == 0) - { - return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); - } - else if (raptorChakra == 0) - { - return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); - } - else if (opoOpoChakra == 0) - { - return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); - } + return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); } - #endregion - #region Open Lunar - if (solarNadi || lunarNadi || bothNadisOpen) + else if (raptorChakra == 0) + { + return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); + } + else if (opoOpoChakra == 0) { return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } - #endregion } - - if (HasEffect(Buffs.WindsRumination)) + #endregion + #region Open Lunar + if (solarNadi || lunarNadi || bothNadisOpen) { - return WindsReply; + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } + #endregion + } - if (HasEffect(Buffs.FiresRumination) - && !HasEffect(Buffs.PerfectBalance) - && !HasEffect(Buffs.FormlessFist) - && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) - { - return FiresReply; - } + if (HasEffect(Buffs.WindsRumination)) + { + return WindsReply; + } - // Standard Beast Chakras - return MNKHelper.DetermineCoreAbility(actionID); + if (HasEffect(Buffs.FiresRumination) + && !HasEffect(Buffs.PerfectBalance) + && !HasEffect(Buffs.FormlessFist) + && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) + { + return FiresReply; } + + // Standard Beast Chakras + return MNKHelper.DetermineCoreAbility(actionID); + } return actionID; @@ -468,7 +467,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // 3. During Brotherhood. // 4. During Riddle of Fire. // 5. Prepare Masterful Blitz for the Riddle of Fire & Brotherhood window. - if (HasCharges(PerfectBalance) && + if (HasCharges(PerfectBalance) && (GetRemainingCharges(PerfectBalance) == GetMaxCharges(PerfectBalance)) || (GetCooldownRemainingTime(PerfectBalance) <= 4) || (HasEffect(Buffs.Brotherhood)) ||