From c921cc055317d4a5fc7bd4332ef9d1e810f220a3 Mon Sep 17 00:00:00 2001 From: Kage <95875972+Kagekazu@users.noreply.github.com> Date: Sun, 22 Dec 2024 22:58:46 +0100 Subject: [PATCH 1/5] Fix Flare mana check Add nullcheck localplayer --- WrathCombo/Combos/PvE/BLM/BLM.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WrathCombo/Combos/PvE/BLM/BLM.cs b/WrathCombo/Combos/PvE/BLM/BLM.cs index f63cbeeec..b2f7e4531 100644 --- a/WrathCombo/Combos/PvE/BLM/BLM.cs +++ b/WrathCombo/Combos/PvE/BLM/BLM.cs @@ -180,7 +180,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } if (curMp + nextMpGain >= 7500 && - (LocalPlayer.CastActionId == Blizzard || + (LocalPlayer?.CastActionId == Blizzard || WasLastSpell(Blizzard) || WasLastSpell(Blizzard4))) return LevelChecked(Fire3) @@ -409,7 +409,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } if (curMp + nextMpGain >= 7500 && - (LocalPlayer.CastActionId == Blizzard || + (LocalPlayer?.CastActionId == Blizzard || WasLastSpell(Blizzard) || WasLastSpell(Blizzard4))) return LevelChecked(Fire3) @@ -488,7 +488,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) return OriginalHook(Fire2); - if (Flare.LevelChecked() && curMp >= MP.FlareAoE) + if (Flare.LevelChecked() && curMp >= MP.AllMPSpells) { if (ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && CanSpellWeave(ActionWatching.LastSpell)) @@ -550,7 +550,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) return OriginalHook(Fire2); - if (curMp < LocalPlayer.MaxMp) + if (curMp < LocalPlayer?.MaxMp) return Freeze.LevelChecked() ? OriginalHook(Freeze) : OriginalHook(Blizzard2); @@ -636,7 +636,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(Fire2); if (IsEnabled(CustomComboPreset.BLM_AoE_Flare) && - Flare.LevelChecked() && curMp >= MP.FlareAoE) + Flare.LevelChecked() && curMp >= MP.AllMPSpells) { if (LevelChecked(Triplecast) && CanSpellWeave(ActionWatching.LastSpell) && GetBuffStacks(Buffs.Triplecast) == 0 && @@ -708,7 +708,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) return OriginalHook(Fire2); - if (curMp < LocalPlayer.MaxMp) + if (curMp < LocalPlayer?.MaxMp) return Freeze.LevelChecked() ? OriginalHook(Freeze) : OriginalHook(Blizzard2); From 3c274d523641f95151568e538d5c08b7861012c6 Mon Sep 17 00:00:00 2001 From: Kage <95875972+Kagekazu@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:05:10 +0100 Subject: [PATCH 2/5] Add Air Anchor to AoE --- WrathCombo/Combos/CustomComboPreset.cs | 4 ++ WrathCombo/Combos/PvE/MCH/MCH.cs | 57 ++++++++++++++++--------- WrathCombo/Combos/PvE/MCH/MCH_Config.cs | 32 ++++---------- 3 files changed, 51 insertions(+), 42 deletions(-) diff --git a/WrathCombo/Combos/CustomComboPreset.cs b/WrathCombo/Combos/CustomComboPreset.cs index 0b4ec3624..90453ef67 100644 --- a/WrathCombo/Combos/CustomComboPreset.cs +++ b/WrathCombo/Combos/CustomComboPreset.cs @@ -2665,6 +2665,10 @@ [Bozja] [CustomComboInfo("Lost Rampage Option", "Use Lost Rampage when available [CustomComboInfo("Full Metal Field Option", "Adds Full Metal Field to the rotation.", MCH.JobID)] MCH_AoE_Adv_Stabilizer_FullMetalField = 8308, + [ParentCombo(MCH_AoE_AdvancedMode)] + [CustomComboInfo("Air Anchor Option", "Adds Air Anchor to the the rotation.", MCH.JobID)] + MCH_AoE_Adv_AirAnchor = 8312, + [ParentCombo(MCH_AoE_AdvancedMode)] [CustomComboInfo("Chain Saw Option", "Adds Chain Saw to the the rotation.", MCH.JobID)] MCH_AoE_Adv_Chainsaw = 8309, diff --git a/WrathCombo/Combos/PvE/MCH/MCH.cs b/WrathCombo/Combos/PvE/MCH/MCH.cs index 5a17c2acd..68205e32a 100644 --- a/WrathCombo/Combos/PvE/MCH/MCH.cs +++ b/WrathCombo/Combos/PvE/MCH/MCH.cs @@ -419,6 +419,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ActionReady(Chainsaw))) return Chainsaw; + if (LevelChecked(AirAnchor) && + (GetCooldownRemainingTime(AirAnchor) <= GetCooldownRemainingTime(OriginalHook(Scattergun)) + 0.25 || + ActionReady(AirAnchor))) + return AirAnchor; + if (LevelChecked(AutoCrossbow) && Gauge.IsOverheated && !LevelChecked(CheckMate)) return AutoCrossbow; @@ -436,27 +441,35 @@ internal class MCH_AoE_AdvancedMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - bool reassembledScattergunAoE = IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && - Config.MCH_AoE_Reassembled[0] && HasEffect(Buffs.Reassembled); - - bool reassembledChainsawAoE = - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled[2] && - HasEffect(Buffs.Reassembled)) || - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled[2] && - !HasEffect(Buffs.Reassembled)) || - (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || - !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); - - bool reassembledExcavatorAoE = - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled[3] && - HasEffect(Buffs.Reassembled)) || - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled[3] && - !HasEffect(Buffs.Reassembled)) || - (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || - !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); - if (actionID is SpreadShot or Scattergun) { + bool reassembledScattergunAoE = IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && + Config.MCH_AoE_Reassembled [0] && HasEffect(Buffs.Reassembled); + + bool reassembledChainsawAoE = + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled [2] && + HasEffect(Buffs.Reassembled)) || + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled [2] && + !HasEffect(Buffs.Reassembled)) || + (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || + !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); + + bool reassembledExcavatorAoE = + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled [3] && + HasEffect(Buffs.Reassembled)) || + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled [3] && + !HasEffect(Buffs.Reassembled)) || + (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || + !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); + + bool reassembledAirAnchorAoE = + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled [4] && + HasEffect(Buffs.Reassembled)) || + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled [4] && + !HasEffect(Buffs.Reassembled)) || + (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || + !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); + if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= Config.MCH_VariantCure) @@ -571,6 +584,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (GetCooldownRemainingTime(Chainsaw) <= GCD + 0.25 || ActionReady(Chainsaw))) return Chainsaw; + if (IsEnabled(CustomComboPreset.MCH_AoE_Adv_AirAnchor) && + reassembledAirAnchorAoE && + LevelChecked(AirAnchor) && + (GetCooldownRemainingTime(AirAnchor) <= GCD + 0.25 || ActionReady(Chainsaw))) + return AirAnchor; + if (reassembledScattergunAoE) return OriginalHook(Scattergun); diff --git a/WrathCombo/Combos/PvE/MCH/MCH_Config.cs b/WrathCombo/Combos/PvE/MCH/MCH_Config.cs index e5c7ee53e..d38a23132 100644 --- a/WrathCombo/Combos/PvE/MCH/MCH_Config.cs +++ b/WrathCombo/Combos/PvE/MCH/MCH_Config.cs @@ -35,20 +35,11 @@ internal static void Draw(CustomComboPreset preset) DrawSliderInt(0, 1, MCH_ST_ReassemblePool, "Number of Charges to Save for Manual Use"); - DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(Excavator)}", - "", 5, 0); - - DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(Chainsaw)}", - "", 5, 1); - - DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(AirAnchor)}", - "", 5, 2); - - DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(Drill)}", "", - 5, 3); - - DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(CleanShot)}", - "", 5, 4); + DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(Excavator)}", "", 5, 0); + DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(Chainsaw)}", "", 5, 1); + DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(AirAnchor)}", "", 5, 2); + DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(Drill)}", "", 5, 3); + DrawHorizontalMultiChoice(MCH_ST_Reassembled, $"Use on {ActionWatching.GetActionName(CleanShot)}", "", 5, 4); break; @@ -56,15 +47,10 @@ internal static void Draw(CustomComboPreset preset) DrawSliderInt(0, 1, MCH_AoE_ReassemblePool, "Number of Charges to Save for Manual Use"); - DrawHorizontalMultiChoice(MCH_AoE_Reassembled, - $"Use on {ActionWatching.GetActionName(SpreadShot)}/{ActionWatching.GetActionName(Scattergun)}", - "", 4, 0); - - DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(Chainsaw)}", - "", 4, 2); - - DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(Excavator)}", - "", 4, 3); + DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(SpreadShot)}/{ActionWatching.GetActionName(Scattergun)}", "", 5, 0); + DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(AirAnchor)}", "", 5, 4); + DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(Chainsaw)}", "", 5, 2); + DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(Excavator)}", "", 5, 3); break; From e249085ec3c4945d41311ded101a461095dafd22 Mon Sep 17 00:00:00 2001 From: Kage <95875972+Kagekazu@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:19:56 +0100 Subject: [PATCH 3/5] Cleanup --- WrathCombo/Combos/CustomComboPreset.cs | 2 +- WrathCombo/Combos/PvE/BLM/BLM.cs | 1024 +++++++++++------------ WrathCombo/Combos/PvE/MCH/MCH.cs | 560 ++++++------- WrathCombo/Combos/PvE/MCH/MCH_Config.cs | 8 +- 4 files changed, 790 insertions(+), 804 deletions(-) diff --git a/WrathCombo/Combos/CustomComboPreset.cs b/WrathCombo/Combos/CustomComboPreset.cs index 90453ef67..ad460f1ae 100644 --- a/WrathCombo/Combos/CustomComboPreset.cs +++ b/WrathCombo/Combos/CustomComboPreset.cs @@ -2667,7 +2667,7 @@ [Bozja] [CustomComboInfo("Lost Rampage Option", "Use Lost Rampage when available [ParentCombo(MCH_AoE_AdvancedMode)] [CustomComboInfo("Air Anchor Option", "Adds Air Anchor to the the rotation.", MCH.JobID)] - MCH_AoE_Adv_AirAnchor = 8312, + MCH_AoE_Adv_AirAnchor = 8313, [ParentCombo(MCH_AoE_AdvancedMode)] [CustomComboInfo("Chain Saw Option", "Adds Chain Saw to the the rotation.", MCH.JobID)] diff --git a/WrathCombo/Combos/PvE/BLM/BLM.cs b/WrathCombo/Combos/PvE/BLM/BLM.cs index b2f7e4531..5de76dd7f 100644 --- a/WrathCombo/Combos/PvE/BLM/BLM.cs +++ b/WrathCombo/Combos/PvE/BLM/BLM.cs @@ -15,154 +15,176 @@ internal class BLM_ST_SimpleMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID is not Fire) - return actionID; - - if (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && - IsEnabled(Variant.VariantCure) && - PlayerHealthPercentageHp() <= Config.BLM_VariantCure) - return Variant.VariantCure; - - if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && - IsEnabled(Variant.VariantRampart) && - IsOffCooldown(Variant.VariantRampart) && - canWeave) - return Variant.VariantRampart; - - if (BLMOpener.DoFullOpener(ref actionID)) - return actionID; - - //Weaves - if (canWeave) + if (actionID is Fire) { - if (ActionReady(Amplifier) && remainingPolyglotCD >= 20000) - return Amplifier; + if (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && + IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= Config.BLM_VariantCure) + return Variant.VariantCure; - if (ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines)) - return LeyLines; - } + if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && + IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + canWeave) + return Variant.VariantRampart; - if (HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && LevelChecked(Thunder) && - GetTargetHPPercent() >= Config.BLM_ST_ThunderHP && - (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) - return OriginalHook(Thunder); + if (BLMOpener.DoFullOpener(ref actionID)) + return actionID; - if (IsMoving) - { - if (ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) - return Amplifier; + //Weaves + if (canWeave) + { + if (ActionReady(Amplifier) && remainingPolyglotCD >= 20000) + return Amplifier; - if (HasPolyglotStacks(Gauge)) - return LevelChecked(Xenoglossy) - ? Xenoglossy - : Foul; - } + if (ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines)) + return LeyLines; + } - if (Gauge.InAstralFire) - { - if (Gauge.IsParadoxActive && gcdsInTimer < 2 && curMp >= MP.FireI) - return Paradox; + if (HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && LevelChecked(Thunder) && + GetTargetHPPercent() >= Config.BLM_ST_ThunderHP && + (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) + return OriginalHook(Thunder); - if ((HasEffect(Buffs.Firestarter) && gcdsInTimer < 2 && - curMp >= MP.FireI) || (HasEffect(Buffs.Firestarter) && Gauge.AstralFireStacks < 3)) - return Fire3; + if (IsMoving) + { + if (ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) + return Amplifier; - if (curMp < MP.FireI && LevelChecked(Despair) && curMp >= MP.Despair) - return Despair; + if (HasPolyglotStacks(Gauge)) + return LevelChecked(Xenoglossy) + ? Xenoglossy + : Foul; + } - if (curMp == 0 && LevelChecked(FlareStar) && Gauge.AstralSoulStacks == 6) + if (Gauge.InAstralFire) { - if (canWeave && ActionReady(Triplecast) && - GetBuffStacks(Buffs.Triplecast) == 0 && - ActionReady(Triplecast)) - return Triplecast; + if (Gauge.IsParadoxActive && gcdsInTimer < 2 && curMp >= MP.FireI) + return Paradox; - if (canWeave && ActionReady(All.Swiftcast) && - GetBuffStacks(Buffs.Triplecast) == 0) - return All.Swiftcast; + if ((HasEffect(Buffs.Firestarter) && gcdsInTimer < 2 && + curMp >= MP.FireI) || (HasEffect(Buffs.Firestarter) && Gauge.AstralFireStacks < 3)) + return Fire3; - return FlareStar; - } + if (curMp < MP.FireI && LevelChecked(Despair) && curMp >= MP.Despair) + return Despair; - if (LevelChecked(Fire4)) - if (gcdsInTimer > 1 && curMp >= MP.FireI) + if (curMp == 0 && LevelChecked(FlareStar) && Gauge.AstralSoulStacks == 6) { if (canWeave && ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && ActionReady(Triplecast)) return Triplecast; - if (HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && + if (canWeave && ActionReady(All.Swiftcast) && + GetBuffStacks(Buffs.Triplecast) == 0) + return All.Swiftcast; + + return FlareStar; + } + + if (LevelChecked(Fire4)) + if (gcdsInTimer > 1 && curMp >= MP.FireI) + { + if (canWeave && ActionReady(Triplecast) && + GetBuffStacks(Buffs.Triplecast) == 0 && + ActionReady(Triplecast)) + return Triplecast; + + if (HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && + (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) + return OriginalHook(Thunder); + + if (HasPolyglotStacks(Gauge) && + canWeave && ActionReady(Triplecast) && + GetBuffStacks(Buffs.Triplecast) == 0 && + ActionReady(Triplecast)) + return Xenoglossy.LevelChecked() + ? Xenoglossy + : Foul; + + return Fire4; + } + + if (curMp >= MP.FireI) + return Fire; + + if (ActionReady(Manafont)) + return HasEffect(Buffs.Firestarter) + ? Fire3 + : Manafont; + + if (ActionReady(Blizzard3) && + (ActionReady(All.Swiftcast) || HasEffect(Buffs.Triplecast))) + { + if (canWeave && ActionReady(Transpose)) + return Transpose; + + if (HasEffect(Buffs.Thunderhead) && (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) return OriginalHook(Thunder); - if (HasPolyglotStacks(Gauge) && - canWeave && ActionReady(Triplecast) && - GetBuffStacks(Buffs.Triplecast) == 0 && - ActionReady(Triplecast)) - return Xenoglossy.LevelChecked() + if (HasPolyglotStacks(Gauge)) + return LevelChecked(Xenoglossy) ? Xenoglossy : Foul; - - return Fire4; } - if (curMp >= MP.FireI) - return Fire; - - if (ActionReady(Manafont)) - return HasEffect(Buffs.Firestarter) - ? Fire3 - : Manafont; + return LevelChecked(Blizzard3) + ? Blizzard3 + : Transpose; + } - if (ActionReady(Blizzard3) && - (ActionReady(All.Swiftcast) || HasEffect(Buffs.Triplecast))) + if (Gauge.InUmbralIce) { - if (canWeave && ActionReady(Transpose)) - return Transpose; + if (ActionReady(Blizzard3) && Gauge.UmbralIceStacks < 3 && TraitLevelChecked(Traits.UmbralHeart)) + { + if (HasEffect(All.Buffs.Swiftcast) || HasEffect(Buffs.Triplecast)) + return Blizzard3; - if (HasEffect(Buffs.Thunderhead) && - (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) - return OriginalHook(Thunder); + if (GetBuffStacks(Buffs.Triplecast) == 0 && IsOffCooldown(All.Swiftcast)) + return All.Swiftcast; - if (HasPolyglotStacks(Gauge)) - return LevelChecked(Xenoglossy) - ? Xenoglossy - : Foul; - } + if (GetBuffStacks(Buffs.Triplecast) == 0 && ActionReady(Triplecast)) + return Triplecast; + } - return LevelChecked(Blizzard3) - ? Blizzard3 - : Transpose; - } + if (LevelChecked(Blizzard4) && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) + return Blizzard4; - if (Gauge.InUmbralIce) - { - if (ActionReady(Blizzard3) && Gauge.UmbralIceStacks < 3 && TraitLevelChecked(Traits.UmbralHeart)) - { - if (HasEffect(All.Buffs.Swiftcast) || HasEffect(Buffs.Triplecast)) - return Blizzard3; + if (Gauge.IsParadoxActive) + return Paradox; - if (GetBuffStacks(Buffs.Triplecast) == 0 && IsOffCooldown(All.Swiftcast)) - return All.Swiftcast; + if (HasPolyglotStacks(Gauge)) + { + if (!HasEffect(Buffs.Firestarter) || + !(GetBuffRemainingTime(Buffs.Firestarter) <= 3)) + return LevelChecked(Xenoglossy) + ? Xenoglossy + : Foul; - if (GetBuffStacks(Buffs.Triplecast) == 0 && ActionReady(Triplecast)) - return Triplecast; - } + if (curMp + nextMpGain <= 10000 || curMp < 7500) + return Blizzard; - if (LevelChecked(Blizzard4) && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) - return Blizzard4; + if (ActionReady(Transpose) && canWeave && + curMp is MP.MaxMP && HasEffect(Buffs.Firestarter)) + return Transpose; - if (Gauge.IsParadoxActive) - return Paradox; + if (LevelChecked(Fire3)) + return Fire3; - if (HasPolyglotStacks(Gauge)) - { - if (!HasEffect(Buffs.Firestarter) || - !(GetBuffRemainingTime(Buffs.Firestarter) <= 3)) return LevelChecked(Xenoglossy) ? Xenoglossy : Foul; + } + + if (curMp + nextMpGain >= 7500 && + (LocalPlayer?.CastActionId == Blizzard || + WasLastSpell(Blizzard) || + WasLastSpell(Blizzard4))) + return LevelChecked(Fire3) + ? Fire3 + : Fire; if (curMp + nextMpGain <= 10000 || curMp < 7500) return Blizzard; @@ -171,37 +193,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim curMp is MP.MaxMP && HasEffect(Buffs.Firestarter)) return Transpose; - if (LevelChecked(Fire3)) - return Fire3; - - return LevelChecked(Xenoglossy) - ? Xenoglossy - : Foul; - } - - if (curMp + nextMpGain >= 7500 && - (LocalPlayer?.CastActionId == Blizzard || - WasLastSpell(Blizzard) || - WasLastSpell(Blizzard4))) return LevelChecked(Fire3) ? Fire3 - : Fire; - - if (curMp + nextMpGain <= 10000 || curMp < 7500) - return Blizzard; - - if (ActionReady(Transpose) && canWeave && - curMp is MP.MaxMP && HasEffect(Buffs.Firestarter)) - return Transpose; + : Transpose; + } - return LevelChecked(Fire3) - ? Fire3 - : Transpose; + if (Blizzard3.LevelChecked()) + return Blizzard3; } - - if (Blizzard3.LevelChecked()) - return Blizzard3; - return actionID; } } @@ -212,185 +211,208 @@ internal class BLM_ST_AdvancedMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - int PolyglotStacks = Gauge.PolyglotStacks; - float TriplecastChargetime = GetCooldownChargeRemainingTime(Triplecast); - - if (actionID is not Fire) - return actionID; + if (actionID is Fire) + { + int polyglotStacks = Gauge.PolyglotStacks; + float triplecastChargetime = GetCooldownChargeRemainingTime(Triplecast); - if (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && + if (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= Config.BLM_VariantCure) - return Variant.VariantCure; + return Variant.VariantCure; - if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && - IsEnabled(Variant.VariantRampart) && - IsOffCooldown(Variant.VariantRampart) && - canWeave) - return Variant.VariantRampart; + if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && + IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + canWeave) + return Variant.VariantRampart; - if (IsEnabled(CustomComboPreset.BLM_ST_Opener)) - if (BLMOpener.DoFullOpener(ref actionID)) - return actionID; - - //Weaves - if (canWeave) - { - if (IsEnabled(CustomComboPreset.BLM_ST_Amplifier) && - ActionReady(Amplifier) && remainingPolyglotCD >= 20000) - return Amplifier; + if (IsEnabled(CustomComboPreset.BLM_ST_Opener)) + if (BLMOpener.DoFullOpener(ref actionID)) + return actionID; - if (IsEnabled(CustomComboPreset.BLM_ST_LeyLines) && - ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines) && - GetRemainingCharges(LeyLines) > Config.BLM_ST_LeyLinesCharges) - return LeyLines; - } + //Weaves + if (canWeave) + { + if (IsEnabled(CustomComboPreset.BLM_ST_Amplifier) && + ActionReady(Amplifier) && remainingPolyglotCD >= 20000) + return Amplifier; + + if (IsEnabled(CustomComboPreset.BLM_ST_LeyLines) && + ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines) && + GetRemainingCharges(LeyLines) > Config.BLM_ST_LeyLinesCharges) + return LeyLines; + } - if (IsEnabled(CustomComboPreset.BLM_ST_Thunder) && - HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && LevelChecked(Thunder) && - GetTargetHPPercent() >= Config.BLM_ST_ThunderHP && - (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) - return OriginalHook(Thunder); + if (IsEnabled(CustomComboPreset.BLM_ST_Thunder) && + HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && LevelChecked(Thunder) && + GetTargetHPPercent() >= Config.BLM_ST_ThunderHP && + (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) + return OriginalHook(Thunder); - if (IsMoving) - { - if (IsEnabled(CustomComboPreset.BLM_ST_Amplifier) && - ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) - return Amplifier; + if (IsMoving) + { + if (IsEnabled(CustomComboPreset.BLM_ST_Amplifier) && + ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) + return Amplifier; - if (IsEnabled(CustomComboPreset.BLM_ST_UsePolyglotMoving) && - PolyglotStacks > Config.BLM_ST_UsePolyglotMoving_HoldCharges) - return LevelChecked(Xenoglossy) - ? Xenoglossy - : Foul; - } + if (IsEnabled(CustomComboPreset.BLM_ST_UsePolyglotMoving) && + polyglotStacks > Config.BLM_ST_UsePolyglotMoving_HoldCharges) + return LevelChecked(Xenoglossy) + ? Xenoglossy + : Foul; + } - if (Gauge.InAstralFire) - { - if (Gauge.IsParadoxActive && gcdsInTimer < 2 && curMp >= MP.FireI) - return Paradox; + if (Gauge.InAstralFire) + { + if (Gauge.IsParadoxActive && gcdsInTimer < 2 && curMp >= MP.FireI) + return Paradox; - if ((HasEffect(Buffs.Firestarter) && gcdsInTimer < 2 && - curMp >= MP.FireI) || (HasEffect(Buffs.Firestarter) && Gauge.AstralFireStacks < 3)) - return Fire3; + if ((HasEffect(Buffs.Firestarter) && gcdsInTimer < 2 && + curMp >= MP.FireI) || (HasEffect(Buffs.Firestarter) && Gauge.AstralFireStacks < 3)) + return Fire3; - if (IsEnabled(CustomComboPreset.BLM_ST_Despair) && - curMp < MP.FireI && LevelChecked(Despair) && curMp >= MP.Despair) - return Despair; + if (IsEnabled(CustomComboPreset.BLM_ST_Despair) && + curMp < MP.FireI && LevelChecked(Despair) && curMp >= MP.Despair) + return Despair; - if (IsEnabled(CustomComboPreset.BLM_ST_FlareStar) && - curMp == 0 && LevelChecked(FlareStar) && Gauge.AstralSoulStacks == 6) - { - if (IsEnabled(CustomComboPreset.BLM_ST_Triplecast) && - canWeave && ActionReady(Triplecast) && - GetBuffStacks(Buffs.Triplecast) == 0 && - (GetRemainingCharges(Triplecast) > Config.BLM_ST_Triplecast_HoldCharges || - TriplecastChargetime <= Config.BLM_ST_Triplecast_ChargeTime)) - return Triplecast; - - if (IsEnabled(CustomComboPreset.BLM_ST_Swiftcast) && - canWeave && ActionReady(All.Swiftcast) && - GetBuffStacks(Buffs.Triplecast) == 0) - return All.Swiftcast; - - return FlareStar; - } - - if (LevelChecked(Fire4)) - if (gcdsInTimer > 1 && curMp >= MP.FireI) + if (IsEnabled(CustomComboPreset.BLM_ST_FlareStar) && + curMp == 0 && LevelChecked(FlareStar) && Gauge.AstralSoulStacks == 6) { if (IsEnabled(CustomComboPreset.BLM_ST_Triplecast) && canWeave && ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && (GetRemainingCharges(Triplecast) > Config.BLM_ST_Triplecast_HoldCharges || - TriplecastChargetime <= Config.BLM_ST_Triplecast_ChargeTime)) + triplecastChargetime <= Config.BLM_ST_Triplecast_ChargeTime)) return Triplecast; + if (IsEnabled(CustomComboPreset.BLM_ST_Swiftcast) && + canWeave && ActionReady(All.Swiftcast) && + GetBuffStacks(Buffs.Triplecast) == 0) + return All.Swiftcast; + + return FlareStar; + } + + if (LevelChecked(Fire4)) + if (gcdsInTimer > 1 && curMp >= MP.FireI) + { + if (IsEnabled(CustomComboPreset.BLM_ST_Triplecast) && + canWeave && ActionReady(Triplecast) && + GetBuffStacks(Buffs.Triplecast) == 0 && + (GetRemainingCharges(Triplecast) > Config.BLM_ST_Triplecast_HoldCharges || + triplecastChargetime <= Config.BLM_ST_Triplecast_ChargeTime)) + return Triplecast; + + if (IsEnabled(CustomComboPreset.BLM_ST_Thunder) && + HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && + (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) + return OriginalHook(Thunder); + + if (IsEnabled(CustomComboPreset.BLM_ST_UsePolyglot) && + polyglotStacks > Config.BLM_ST_UsePolyglot_HoldCharges && + IsEnabled(CustomComboPreset.BLM_ST_Triplecast) && + canWeave && ActionReady(Triplecast) && + GetBuffStacks(Buffs.Triplecast) == 0 && + (GetRemainingCharges(Triplecast) > Config.BLM_ST_Triplecast_HoldCharges || + triplecastChargetime <= Config.BLM_ST_Triplecast_ChargeTime)) + return Xenoglossy.LevelChecked() + ? Xenoglossy + : Foul; + + return Fire4; + } + + if (curMp >= MP.FireI) + return Fire; + + if (IsEnabled(CustomComboPreset.BLM_ST_Manafont) && + ActionReady(Manafont)) + return HasEffect(Buffs.Firestarter) + ? Fire3 + : Manafont; + + if (ActionReady(Blizzard3) && + ((IsEnabled(CustomComboPreset.BLM_ST_Swiftcast) && ActionReady(All.Swiftcast)) || + HasEffect(Buffs.Triplecast))) + { + if (IsEnabled(CustomComboPreset.BLM_ST_Transpose) && + canWeave && ActionReady(Transpose)) + return Transpose; + if (IsEnabled(CustomComboPreset.BLM_ST_Thunder) && - HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && + HasEffect(Buffs.Thunderhead) && (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) return OriginalHook(Thunder); if (IsEnabled(CustomComboPreset.BLM_ST_UsePolyglot) && - PolyglotStacks > Config.BLM_ST_UsePolyglot_HoldCharges && - IsEnabled(CustomComboPreset.BLM_ST_Triplecast) && - canWeave && ActionReady(Triplecast) && - GetBuffStacks(Buffs.Triplecast) == 0 && - (GetRemainingCharges(Triplecast) > Config.BLM_ST_Triplecast_HoldCharges || - TriplecastChargetime <= Config.BLM_ST_Triplecast_ChargeTime)) - return Xenoglossy.LevelChecked() + polyglotStacks > Config.BLM_ST_UsePolyglot_HoldCharges) + return LevelChecked(Xenoglossy) ? Xenoglossy : Foul; - - return Fire4; } - if (curMp >= MP.FireI) - return Fire; - - if (IsEnabled(CustomComboPreset.BLM_ST_Manafont) && - ActionReady(Manafont)) - return HasEffect(Buffs.Firestarter) - ? Fire3 - : Manafont; + return LevelChecked(Blizzard3) + ? Blizzard3 + : Transpose; + } - if (ActionReady(Blizzard3) && - ((IsEnabled(CustomComboPreset.BLM_ST_Swiftcast) && ActionReady(All.Swiftcast)) || - HasEffect(Buffs.Triplecast))) + if (Gauge.InUmbralIce) { - if (IsEnabled(CustomComboPreset.BLM_ST_Transpose) && - canWeave && ActionReady(Transpose)) - return Transpose; + if (ActionReady(Blizzard3) && Gauge.UmbralIceStacks < 3 && TraitLevelChecked(Traits.UmbralHeart)) + { + if (HasEffect(All.Buffs.Swiftcast) || HasEffect(Buffs.Triplecast)) + return Blizzard3; - if (IsEnabled(CustomComboPreset.BLM_ST_Thunder) && - HasEffect(Buffs.Thunderhead) && - (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) - return OriginalHook(Thunder); + if (IsEnabled(CustomComboPreset.BLM_ST_Swiftcast) && + GetBuffStacks(Buffs.Triplecast) == 0 && IsOffCooldown(All.Swiftcast)) + return All.Swiftcast; - if (IsEnabled(CustomComboPreset.BLM_ST_UsePolyglot) && - PolyglotStacks > Config.BLM_ST_UsePolyglot_HoldCharges) - return LevelChecked(Xenoglossy) - ? Xenoglossy - : Foul; - } + if (IsEnabled(CustomComboPreset.BLM_ST_Triplecast) && + LevelChecked(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && + (GetRemainingCharges(Triplecast) > Config.BLM_ST_Triplecast_HoldCharges || + triplecastChargetime <= Config.BLM_ST_Triplecast_ChargeTime)) + return Triplecast; + } - return LevelChecked(Blizzard3) - ? Blizzard3 - : Transpose; - } + if (LevelChecked(Blizzard4) && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) + return Blizzard4; - if (Gauge.InUmbralIce) - { - if (ActionReady(Blizzard3) && Gauge.UmbralIceStacks < 3 && TraitLevelChecked(Traits.UmbralHeart)) - { - if (HasEffect(All.Buffs.Swiftcast) || HasEffect(Buffs.Triplecast)) - return Blizzard3; - - if (IsEnabled(CustomComboPreset.BLM_ST_Swiftcast) && - GetBuffStacks(Buffs.Triplecast) == 0 && IsOffCooldown(All.Swiftcast)) - return All.Swiftcast; - - if (IsEnabled(CustomComboPreset.BLM_ST_Triplecast) && - LevelChecked(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && - (GetRemainingCharges(Triplecast) > Config.BLM_ST_Triplecast_HoldCharges || - TriplecastChargetime <= Config.BLM_ST_Triplecast_ChargeTime)) - return Triplecast; - } + if (Gauge.IsParadoxActive) + return Paradox; - if (LevelChecked(Blizzard4) && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) - return Blizzard4; + if (IsEnabled(CustomComboPreset.BLM_ST_UsePolyglot) && + polyglotStacks > Config.BLM_ST_UsePolyglot_HoldCharges) + { + if (!HasEffect(Buffs.Firestarter) || + !(GetBuffRemainingTime(Buffs.Firestarter) <= 3)) + return LevelChecked(Xenoglossy) + ? Xenoglossy + : Foul; - if (Gauge.IsParadoxActive) - return Paradox; + if (curMp + nextMpGain <= 10000 || curMp < 7500) + return Blizzard; + + if (IsEnabled(CustomComboPreset.BLM_ST_Transpose) && + ActionReady(Transpose) && canWeave && + curMp is MP.MaxMP && HasEffect(Buffs.Firestarter)) + return Transpose; + + if (LevelChecked(Fire3)) + return Fire3; - if (IsEnabled(CustomComboPreset.BLM_ST_UsePolyglot) && - PolyglotStacks > Config.BLM_ST_UsePolyglot_HoldCharges) - { - if (!HasEffect(Buffs.Firestarter) || - !(GetBuffRemainingTime(Buffs.Firestarter) <= 3)) return LevelChecked(Xenoglossy) ? Xenoglossy : Foul; + } + + if (curMp + nextMpGain >= 7500 && + (LocalPlayer?.CastActionId == Blizzard || + WasLastSpell(Blizzard) || + WasLastSpell(Blizzard4))) + return LevelChecked(Fire3) + ? Fire3 + : Fire; if (curMp + nextMpGain <= 10000 || curMp < 7500) return Blizzard; @@ -400,38 +422,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim curMp is MP.MaxMP && HasEffect(Buffs.Firestarter)) return Transpose; - if (LevelChecked(Fire3)) - return Fire3; - - return LevelChecked(Xenoglossy) - ? Xenoglossy - : Foul; - } - - if (curMp + nextMpGain >= 7500 && - (LocalPlayer?.CastActionId == Blizzard || - WasLastSpell(Blizzard) || - WasLastSpell(Blizzard4))) return LevelChecked(Fire3) ? Fire3 - : Fire; - - if (curMp + nextMpGain <= 10000 || curMp < 7500) - return Blizzard; - - if (IsEnabled(CustomComboPreset.BLM_ST_Transpose) && - ActionReady(Transpose) && canWeave && - curMp is MP.MaxMP && HasEffect(Buffs.Firestarter)) - return Transpose; + : Transpose; + } - return LevelChecked(Fire3) - ? Fire3 - : Transpose; + if (Blizzard3.LevelChecked()) + return Blizzard3; } - - if (Blizzard3.LevelChecked()) - return Blizzard3; - return actionID; } } @@ -442,132 +440,131 @@ internal class BLM_AoE_SimpleMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID is not (Blizzard2 or HighBlizzard2)) - return actionID; - - if (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && - IsEnabled(Variant.VariantCure) && - PlayerHealthPercentageHp() <= Config.BLM_VariantCure) - return Variant.VariantCure; - - if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && - IsEnabled(Variant.VariantRampart) && - IsOffCooldown(Variant.VariantRampart) && - CanSpellWeave(ActionWatching.LastSpell)) - return Variant.VariantRampart; - - if (WasLastSpell(UmbralSoul)) - return OriginalHook(Fire2); - - if ((HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && Thunder2.LevelChecked() && - thunderDebuffAoE is null) || thunderDebuffAoE?.RemainingTime < 3) - return OriginalHook(Thunder2); + if (actionID is Blizzard2 or HighBlizzard2) + { + if (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && + IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= Config.BLM_VariantCure) + return Variant.VariantCure; + + if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && + IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + CanSpellWeave(ActionWatching.LastSpell)) + return Variant.VariantRampart; + + if (WasLastSpell(UmbralSoul)) + return OriginalHook(Fire2); - if (ActionReady(Amplifier) && remainingPolyglotCD >= 20000 && CanSpellWeave(ActionWatching.LastSpell)) - return Amplifier; + if ((HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && Thunder2.LevelChecked() && + thunderDebuffAoE is null) || thunderDebuffAoE?.RemainingTime < 3) + return OriginalHook(Thunder2); - if (IsMoving) - { - if (ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) + if (ActionReady(Amplifier) && remainingPolyglotCD >= 20000 && CanSpellWeave(ActionWatching.LastSpell)) return Amplifier; - if (HasPolyglotStacks(Gauge)) - return Foul; - } - - if (CanSpellWeave(ActionWatching.LastSpell) && - ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines)) - return LeyLines; + if (IsMoving) + { + if (ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) + return Amplifier; - if (Gauge.InAstralFire) - { - if (curMp == 0 && FlareStar.LevelChecked() && Gauge.AstralSoulStacks == 6) - return FlareStar; + if (HasPolyglotStacks(Gauge)) + return Foul; + } - if (!FlareStar.LevelChecked() && Fire2.LevelChecked() && curMp >= MP.FireAoE && - (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) - return OriginalHook(Fire2); + if (CanSpellWeave(ActionWatching.LastSpell) && + ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines)) + return LeyLines; - if (Flare.LevelChecked() && curMp >= MP.AllMPSpells) + if (Gauge.InAstralFire) { - if (ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && - CanSpellWeave(ActionWatching.LastSpell)) - return Triplecast; - - return Flare; - } + if (curMp == 0 && FlareStar.LevelChecked() && Gauge.AstralSoulStacks == 6) + return FlareStar; - if (Fire2.LevelChecked()) - if (gcdsInTimer > 1 && curMp >= MP.FireAoE) + if (!FlareStar.LevelChecked() && Fire2.LevelChecked() && curMp >= MP.FireAoE && + (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) return OriginalHook(Fire2); - if (ActionReady(Manafont)) - return Manafont; + if (Flare.LevelChecked() && curMp >= MP.AllMPSpells) + { + if (ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && + CanSpellWeave(ActionWatching.LastSpell)) + return Triplecast; - if (ActionReady(Transpose) && (!TraitLevelChecked(Traits.AspectMasteryIII) || canSwiftF)) - return Transpose; + return Flare; + } - if (ActionReady(Blizzard2) && TraitLevelChecked(Traits.AspectMasteryIII)) - return OriginalHook(Blizzard2); - } + if (Fire2.LevelChecked()) + if (gcdsInTimer > 1 && curMp >= MP.FireAoE) + return OriginalHook(Fire2); - if (Gauge.InUmbralIce) - { - if (HasPolyglotStacks(Gauge)) - return Foul; + if (ActionReady(Manafont)) + return Manafont; - if (ActionWatching.WhichOfTheseActionsWasLast(OriginalHook(Fire2), OriginalHook(Freeze), - OriginalHook(Flare), OriginalHook(FlareStar)) == OriginalHook(Freeze) && - FlareStar.LevelChecked()) - { - if (ActionReady(Transpose) && CanSpellWeave(ActionWatching.LastSpell)) + if (ActionReady(Transpose) && (!TraitLevelChecked(Traits.AspectMasteryIII) || canSwiftF)) return Transpose; - return OriginalHook(Fire2); + if (ActionReady(Blizzard2) && TraitLevelChecked(Traits.AspectMasteryIII)) + return OriginalHook(Blizzard2); } - if (ActionReady(OriginalHook(Blizzard2)) && Gauge.UmbralIceStacks < 3 && - TraitLevelChecked(Traits.AspectMasteryIII)) + if (Gauge.InUmbralIce) { - if (ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && - CanSpellWeave(ActionWatching.LastSpell)) - return Triplecast; + if (HasPolyglotStacks(Gauge)) + return Foul; - if (GetBuffStacks(Buffs.Triplecast) == 0 && IsOffCooldown(All.Swiftcast) && - CanSpellWeave(ActionWatching.LastSpell)) - return All.Swiftcast; + if (ActionWatching.WhichOfTheseActionsWasLast(OriginalHook(Fire2), OriginalHook(Freeze), + OriginalHook(Flare), OriginalHook(FlareStar)) == OriginalHook(Freeze) && + FlareStar.LevelChecked()) + { + if (ActionReady(Transpose) && CanSpellWeave(ActionWatching.LastSpell)) + return Transpose; - if (HasEffect(All.Buffs.Swiftcast) || GetBuffStacks(Buffs.Triplecast) > 0) - return OriginalHook(Blizzard2); - } + return OriginalHook(Fire2); + } - if (Gauge.UmbralIceStacks < 3 && ActionReady(OriginalHook(Blizzard2))) - return OriginalHook(Blizzard2); + if (ActionReady(OriginalHook(Blizzard2)) && Gauge.UmbralIceStacks < 3 && + TraitLevelChecked(Traits.AspectMasteryIII)) + { + if (ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && + CanSpellWeave(ActionWatching.LastSpell)) + return Triplecast; - if (Freeze.LevelChecked() && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) - return Freeze; + if (GetBuffStacks(Buffs.Triplecast) == 0 && IsOffCooldown(All.Swiftcast) && + CanSpellWeave(ActionWatching.LastSpell)) + return All.Swiftcast; - if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) - return OriginalHook(Fire2); + if (HasEffect(All.Buffs.Swiftcast) || GetBuffStacks(Buffs.Triplecast) > 0) + return OriginalHook(Blizzard2); + } - if (curMp < LocalPlayer?.MaxMp) - return Freeze.LevelChecked() - ? OriginalHook(Freeze) - : OriginalHook(Blizzard2); + if (Gauge.UmbralIceStacks < 3 && ActionReady(OriginalHook(Blizzard2))) + return OriginalHook(Blizzard2); - if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && - ActionReady(Transpose) && - ((CanSpellWeave(ActionWatching.LastSpell) && Flare.LevelChecked()) || - !TraitLevelChecked(Traits.AspectMasteryIII))) - return Transpose; + if (Freeze.LevelChecked() && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) + return Freeze; - if (Fire2.LevelChecked() && TraitLevelChecked(Traits.AspectMasteryIII)) - return OriginalHook(Fire2); - } + if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) + return OriginalHook(Fire2); + + if (curMp < LocalPlayer?.MaxMp) + return Freeze.LevelChecked() + ? OriginalHook(Freeze) + : OriginalHook(Blizzard2); + + if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && + ActionReady(Transpose) && + ((CanSpellWeave(ActionWatching.LastSpell) && Flare.LevelChecked()) || + !TraitLevelChecked(Traits.AspectMasteryIII))) + return Transpose; - if (Blizzard2.LevelChecked()) - return OriginalHook(Blizzard2); + if (Fire2.LevelChecked() && TraitLevelChecked(Traits.AspectMasteryIII)) + return OriginalHook(Fire2); + } + if (Blizzard2.LevelChecked()) + return OriginalHook(Blizzard2); + } return actionID; } } @@ -578,154 +575,153 @@ internal class BLM_AoE_AdvancedMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - int PolyglotStacks = Gauge.PolyglotStacks; - float TriplecastChargetime = GetCooldownChargeRemainingTime(Triplecast); - - if (actionID is not (Blizzard2 or HighBlizzard2)) - return actionID; - - if (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && - IsEnabled(Variant.VariantCure) && - PlayerHealthPercentageHp() <= Config.BLM_VariantCure) - return Variant.VariantCure; + if (actionID is Blizzard2 or HighBlizzard2) + { + int polyglotStacks = Gauge.PolyglotStacks; + float triplecastChargetime = GetCooldownChargeRemainingTime(Triplecast); - if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && - IsEnabled(Variant.VariantRampart) && - IsOffCooldown(Variant.VariantRampart) && - CanSpellWeave(ActionWatching.LastSpell)) - return Variant.VariantRampart; + if (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && + IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= Config.BLM_VariantCure) + return Variant.VariantCure; - if (WasLastSpell(UmbralSoul)) - return OriginalHook(Fire2); + if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && + IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + CanSpellWeave(ActionWatching.LastSpell)) + return Variant.VariantRampart; - if ((IsEnabled(CustomComboPreset.BLM_AoE_Thunder) && - HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && LevelChecked(Thunder2) && - GetTargetHPPercent() >= Config.BLM_AoE_ThunderHP && - thunderDebuffAoE is null) || thunderDebuffAoE?.RemainingTime < 3) - return OriginalHook(Thunder2); + if (WasLastSpell(UmbralSoul)) + return OriginalHook(Fire2); - if (IsEnabled(CustomComboPreset.BLM_AoE_Amplifier) && - ActionReady(Amplifier) && remainingPolyglotCD >= 20000 && CanSpellWeave(ActionWatching.LastSpell)) - return Amplifier; + if ((IsEnabled(CustomComboPreset.BLM_AoE_Thunder) && + HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && LevelChecked(Thunder2) && + GetTargetHPPercent() >= Config.BLM_AoE_ThunderHP && + thunderDebuffAoE is null) || thunderDebuffAoE?.RemainingTime < 3) + return OriginalHook(Thunder2); - if (IsMoving) - { if (IsEnabled(CustomComboPreset.BLM_AoE_Amplifier) && - ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) + ActionReady(Amplifier) && remainingPolyglotCD >= 20000 && CanSpellWeave(ActionWatching.LastSpell)) return Amplifier; - if (IsEnabled(CustomComboPreset.BLM_AoE_UsePolyglotMoving) && - PolyglotStacks > Config.BLM_AoE_UsePolyglotMoving_HoldCharges) - return Foul; - } - - if (IsEnabled(CustomComboPreset.BLM_AoE_LeyLines) && - CanSpellWeave(ActionWatching.LastSpell) && - ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines) && - GetRemainingCharges(LeyLines) > Config.BLM_AoE_LeyLinesCharges) - return LeyLines; + if (IsMoving) + { + if (IsEnabled(CustomComboPreset.BLM_AoE_Amplifier) && + ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) + return Amplifier; - if (Gauge.InAstralFire) - { - if (IsEnabled(CustomComboPreset.BLM_AoE_FlareStar) && - curMp == 0 && FlareStar.LevelChecked() && Gauge.AstralSoulStacks == 6) - return FlareStar; + if (IsEnabled(CustomComboPreset.BLM_AoE_UsePolyglotMoving) && + polyglotStacks > Config.BLM_AoE_UsePolyglotMoving_HoldCharges) + return Foul; + } - if (!FlareStar.LevelChecked() && Fire2.LevelChecked() && curMp >= MP.FireAoE && - (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) - return OriginalHook(Fire2); + if (IsEnabled(CustomComboPreset.BLM_AoE_LeyLines) && + CanSpellWeave(ActionWatching.LastSpell) && + ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines) && + GetRemainingCharges(LeyLines) > Config.BLM_AoE_LeyLinesCharges) + return LeyLines; - if (IsEnabled(CustomComboPreset.BLM_AoE_Flare) && - Flare.LevelChecked() && curMp >= MP.AllMPSpells) + if (Gauge.InAstralFire) { - if (LevelChecked(Triplecast) && CanSpellWeave(ActionWatching.LastSpell) && - GetBuffStacks(Buffs.Triplecast) == 0 && - (GetRemainingCharges(Triplecast) > Config.BLM_AoE_Triplecast_HoldCharges || - TriplecastChargetime <= Config.BLM_AoE_Triplecast_ChargeTime)) - return Triplecast; + if (IsEnabled(CustomComboPreset.BLM_AoE_FlareStar) && + curMp == 0 && FlareStar.LevelChecked() && Gauge.AstralSoulStacks == 6) + return FlareStar; - return Flare; - } - - if (Fire2.LevelChecked()) - if (gcdsInTimer > 1 && curMp >= MP.FireAoE) + if (!FlareStar.LevelChecked() && Fire2.LevelChecked() && curMp >= MP.FireAoE && + (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) return OriginalHook(Fire2); - if (IsEnabled(CustomComboPreset.BLM_AoE_Manafont) && - ActionReady(Manafont)) - return Manafont; + if (IsEnabled(CustomComboPreset.BLM_AoE_Flare) && + Flare.LevelChecked() && curMp >= MP.AllMPSpells) + { + if (LevelChecked(Triplecast) && CanSpellWeave(ActionWatching.LastSpell) && + GetBuffStacks(Buffs.Triplecast) == 0 && + (GetRemainingCharges(Triplecast) > Config.BLM_AoE_Triplecast_HoldCharges || + triplecastChargetime <= Config.BLM_AoE_Triplecast_ChargeTime)) + return Triplecast; - if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && - ActionReady(Transpose) && (!TraitLevelChecked(Traits.AspectMasteryIII) || canSwiftF)) - return Transpose; + return Flare; + } - if (ActionReady(Blizzard2) && TraitLevelChecked(Traits.AspectMasteryIII)) - return OriginalHook(Blizzard2); - } + if (Fire2.LevelChecked()) + if (gcdsInTimer > 1 && curMp >= MP.FireAoE) + return OriginalHook(Fire2); - if (Gauge.InUmbralIce) - { - if (IsEnabled(CustomComboPreset.BLM_AoE_UsePolyglot) && - PolyglotStacks > Config.BLM_AoE_UsePolyglot_HoldCharges) - return Foul; + if (IsEnabled(CustomComboPreset.BLM_AoE_Manafont) && + ActionReady(Manafont)) + return Manafont; - if (ActionWatching.WhichOfTheseActionsWasLast(OriginalHook(Fire2), OriginalHook(Freeze), - OriginalHook(Flare), OriginalHook(FlareStar)) == OriginalHook(Freeze) && - FlareStar.LevelChecked()) - { if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && - ActionReady(Transpose) && CanSpellWeave(ActionWatching.LastSpell)) + ActionReady(Transpose) && (!TraitLevelChecked(Traits.AspectMasteryIII) || canSwiftF)) return Transpose; - return OriginalHook(Fire2); + if (ActionReady(Blizzard2) && TraitLevelChecked(Traits.AspectMasteryIII)) + return OriginalHook(Blizzard2); } - if (ActionReady(OriginalHook(Blizzard2)) && Gauge.UmbralIceStacks < 3 && - TraitLevelChecked(Traits.AspectMasteryIII)) + if (Gauge.InUmbralIce) { - if (IsEnabled(CustomComboPreset.BLM_AoE_Triplecast) && - LevelChecked(Triplecast) && CanSpellWeave(ActionWatching.LastSpell) && - GetBuffStacks(Buffs.Triplecast) == 0 && - (GetRemainingCharges(Triplecast) > Config.BLM_AoE_Triplecast_HoldCharges || - TriplecastChargetime <= Config.BLM_AoE_Triplecast_ChargeTime)) - return Triplecast; - - if (IsEnabled(CustomComboPreset.BLM_AoE_Swiftcast) && - GetBuffStacks(Buffs.Triplecast) == 0 && IsOffCooldown(All.Swiftcast) && - CanSpellWeave(ActionWatching.LastSpell)) - return All.Swiftcast; - - if (HasEffect(All.Buffs.Swiftcast) || GetBuffStacks(Buffs.Triplecast) > 0) - return OriginalHook(Blizzard2); - } + if (IsEnabled(CustomComboPreset.BLM_AoE_UsePolyglot) && + polyglotStacks > Config.BLM_AoE_UsePolyglot_HoldCharges) + return Foul; - if (Gauge.UmbralIceStacks < 3 && ActionReady(OriginalHook(Blizzard2))) - return OriginalHook(Blizzard2); + if (ActionWatching.WhichOfTheseActionsWasLast(OriginalHook(Fire2), OriginalHook(Freeze), + OriginalHook(Flare), OriginalHook(FlareStar)) == OriginalHook(Freeze) && + FlareStar.LevelChecked()) + { + if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && + ActionReady(Transpose) && CanSpellWeave(ActionWatching.LastSpell)) + return Transpose; - if (Freeze.LevelChecked() && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) - return Freeze; + return OriginalHook(Fire2); + } - if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) - return OriginalHook(Fire2); + if (ActionReady(OriginalHook(Blizzard2)) && Gauge.UmbralIceStacks < 3 && + TraitLevelChecked(Traits.AspectMasteryIII)) + { + if (IsEnabled(CustomComboPreset.BLM_AoE_Triplecast) && + LevelChecked(Triplecast) && CanSpellWeave(ActionWatching.LastSpell) && + GetBuffStacks(Buffs.Triplecast) == 0 && + (GetRemainingCharges(Triplecast) > Config.BLM_AoE_Triplecast_HoldCharges || + triplecastChargetime <= Config.BLM_AoE_Triplecast_ChargeTime)) + return Triplecast; - if (curMp < LocalPlayer?.MaxMp) - return Freeze.LevelChecked() - ? OriginalHook(Freeze) - : OriginalHook(Blizzard2); + if (IsEnabled(CustomComboPreset.BLM_AoE_Swiftcast) && + GetBuffStacks(Buffs.Triplecast) == 0 && IsOffCooldown(All.Swiftcast) && + CanSpellWeave(ActionWatching.LastSpell)) + return All.Swiftcast; - if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && - ActionReady(Transpose) && - ((CanSpellWeave(ActionWatching.LastSpell) && Flare.LevelChecked()) || - !TraitLevelChecked(Traits.AspectMasteryIII))) - return Transpose; + if (HasEffect(All.Buffs.Swiftcast) || GetBuffStacks(Buffs.Triplecast) > 0) + return OriginalHook(Blizzard2); + } - if (Fire2.LevelChecked() && TraitLevelChecked(Traits.AspectMasteryIII)) - return OriginalHook(Fire2); - } + if (Gauge.UmbralIceStacks < 3 && ActionReady(OriginalHook(Blizzard2))) + return OriginalHook(Blizzard2); - if (Blizzard2.LevelChecked()) - return OriginalHook(Blizzard2); + if (Freeze.LevelChecked() && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) + return Freeze; + if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) + return OriginalHook(Fire2); + + if (curMp < LocalPlayer?.MaxMp) + return Freeze.LevelChecked() + ? OriginalHook(Freeze) + : OriginalHook(Blizzard2); + + if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && + ActionReady(Transpose) && + ((CanSpellWeave(ActionWatching.LastSpell) && Flare.LevelChecked()) || + !TraitLevelChecked(Traits.AspectMasteryIII))) + return Transpose; + + if (Fire2.LevelChecked() && TraitLevelChecked(Traits.AspectMasteryIII)) + return OriginalHook(Fire2); + } + + if (Blizzard2.LevelChecked()) + return OriginalHook(Blizzard2); + } return actionID; } } @@ -834,10 +830,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { switch (actionID) { - case Fire4 when (Gauge.InAstralFire && LevelChecked(Fire4)): + case Fire4 when Gauge.InAstralFire && LevelChecked(Fire4): return Fire4; - case Fire4 when (Gauge.InUmbralIce && LevelChecked(Blizzard4)): + case Fire4 when Gauge.InUmbralIce && LevelChecked(Blizzard4): return Blizzard4; default: diff --git a/WrathCombo/Combos/PvE/MCH/MCH.cs b/WrathCombo/Combos/PvE/MCH/MCH.cs index 68205e32a..4b984c666 100644 --- a/WrathCombo/Combos/PvE/MCH/MCH.cs +++ b/WrathCombo/Combos/PvE/MCH/MCH.cs @@ -18,140 +18,139 @@ internal class MCH_ST_SimpleMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { // Don't change anything if not basic skill - if (actionID is not (SplitShot or HeatedSplitShot)) - return actionID; - - if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && - IsEnabled(Variant.VariantCure) && - PlayerHealthPercentageHp() <= Config.MCH_VariantCure) - return Variant.VariantCure; - - if (IsEnabled(CustomComboPreset.MCH_Variant_Rampart) && - IsEnabled(Variant.VariantRampart) && - IsOffCooldown(Variant.VariantRampart) && - CanWeave(actionID)) - return Variant.VariantRampart; - - // Opener - if (TargetIsHostile()) - if (MCHOpener.DoFullOpener(ref actionID)) - return actionID; - - //Reassemble to start before combat - if (!HasEffect(Buffs.Reassembled) && ActionReady(Reassemble) && - !InCombat() && TargetIsHostile()) - return Reassemble; - - // Interrupt - if (interruptReady) - return All.HeadGraze; - - // All weaves - if (CanWeave(ActionWatching.LastWeaponskill)) + if (actionID is SplitShot or HeatedSplitShot) { - if (!ActionWatching.HasDoubleWeaved()) - { - // Wildfire - if (JustUsed(Hypercharge) && ActionReady(Wildfire)) - return Wildfire; + if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && + IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= Config.MCH_VariantCure) + return Variant.VariantCure; - if (!Gauge.IsOverheated) - { - // BarrelStabilizer - if (ActionReady(BarrelStabilizer)) - return BarrelStabilizer; + if (IsEnabled(CustomComboPreset.MCH_Variant_Rampart) && + IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + CanWeave(actionID)) + return Variant.VariantRampart; - // Hypercharge - if ((Gauge.Heat >= 50 || HasEffect(Buffs.Hypercharged)) && !MCHHelper.IsComboExpiring(6) && - LevelChecked(Hypercharge)) - { - // Ensures Hypercharge is double weaved with WF - if ((LevelChecked(FullMetalField) && JustUsed(FullMetalField) && - (GetCooldownRemainingTime(Wildfire) < GCD || ActionReady(Wildfire))) || - (!LevelChecked(FullMetalField) && ActionReady(Wildfire)) || - !LevelChecked(Wildfire)) - return Hypercharge; - - // Only Hypercharge when tools are on cooldown - if (drillCD && anchorCD && sawCD && - ((GetCooldownRemainingTime(Wildfire) > 40 && LevelChecked(Wildfire)) || - !LevelChecked(Wildfire))) - return Hypercharge; - } + // Opener + if (TargetIsHostile()) + if (MCHOpener.DoFullOpener(ref actionID)) + return actionID; - //Queen - if (MCHHelper.UseQueen(Gauge) && - (GetCooldownRemainingTime(Wildfire) > GCD || !LevelChecked(Wildfire))) - return OriginalHook(RookAutoturret); + //Reassemble to start before combat + if (!HasEffect(Buffs.Reassembled) && ActionReady(Reassemble) && + !InCombat() && TargetIsHostile()) + return Reassemble; - // Reassemble - if (MCHHelper.Reassembled(Gauge)) - return Reassemble; + // Interrupt + if (interruptReady) + return All.HeadGraze; - // Gauss Round and Ricochet outside HC - if (JustUsed(OriginalHook(AirAnchor), 2f) || - JustUsed(Chainsaw, 2f) || - JustUsed(Drill, 2f) || - JustUsed(Excavator, 2f)) - { - if (ActionReady(OriginalHook(GaussRound)) && - !JustUsed(OriginalHook(GaussRound), 2f)) - return OriginalHook(GaussRound); + // All weaves + if (CanWeave(ActionWatching.LastWeaponskill)) + { + if (!ActionWatching.HasDoubleWeaved()) + { + // Wildfire + if (JustUsed(Hypercharge) && ActionReady(Wildfire)) + return Wildfire; - if (ActionReady(OriginalHook(Ricochet)) && - !JustUsed(OriginalHook(Ricochet), 2f)) - return OriginalHook(Ricochet); + if (!Gauge.IsOverheated) + { + // BarrelStabilizer + if (ActionReady(BarrelStabilizer)) + return BarrelStabilizer; + + // Hypercharge + if ((Gauge.Heat >= 50 || HasEffect(Buffs.Hypercharged)) && !MCHHelper.IsComboExpiring(6) && + LevelChecked(Hypercharge)) + { + // Ensures Hypercharge is double weaved with WF + if ((LevelChecked(FullMetalField) && JustUsed(FullMetalField) && + (GetCooldownRemainingTime(Wildfire) < GCD || ActionReady(Wildfire))) || + (!LevelChecked(FullMetalField) && ActionReady(Wildfire)) || + !LevelChecked(Wildfire)) + return Hypercharge; + + // Only Hypercharge when tools are on cooldown + if (drillCD && anchorCD && sawCD && + ((GetCooldownRemainingTime(Wildfire) > 40 && LevelChecked(Wildfire)) || + !LevelChecked(Wildfire))) + return Hypercharge; + } + + //Queen + if (MCHHelper.UseQueen(Gauge) && + (GetCooldownRemainingTime(Wildfire) > GCD || !LevelChecked(Wildfire))) + return OriginalHook(RookAutoturret); + + // Reassemble + if (MCHHelper.Reassembled(Gauge)) + return Reassemble; + + // Gauss Round and Ricochet outside HC + if (JustUsed(OriginalHook(AirAnchor), 2f) || + JustUsed(Chainsaw, 2f) || + JustUsed(Drill, 2f) || + JustUsed(Excavator, 2f)) + { + if (ActionReady(OriginalHook(GaussRound)) && + !JustUsed(OriginalHook(GaussRound), 2f)) + return OriginalHook(GaussRound); + + if (ActionReady(OriginalHook(Ricochet)) && + !JustUsed(OriginalHook(Ricochet), 2f)) + return OriginalHook(Ricochet); + } + + // Healing + if (PlayerHealthPercentageHp() <= 25 && ActionReady(All.SecondWind)) + return All.SecondWind; } - - // Healing - if (PlayerHealthPercentageHp() <= 25 && ActionReady(All.SecondWind)) - return All.SecondWind; } - } - // Gauss Round and Ricochet during HC - if (JustUsed(OriginalHook(Heatblast), 1f) && HasNotWeaved) - { - if (ActionReady(OriginalHook(GaussRound)) && - GetRemainingCharges(OriginalHook(GaussRound)) >= - GetRemainingCharges(OriginalHook(Ricochet))) - return OriginalHook(GaussRound); + // Gauss Round and Ricochet during HC + if (JustUsed(OriginalHook(Heatblast), 1f) && HasNotWeaved) + { + if (ActionReady(OriginalHook(GaussRound)) && + GetRemainingCharges(OriginalHook(GaussRound)) >= + GetRemainingCharges(OriginalHook(Ricochet))) + return OriginalHook(GaussRound); - if (ActionReady(OriginalHook(Ricochet)) && - GetRemainingCharges(OriginalHook(Ricochet)) > GetRemainingCharges(OriginalHook(GaussRound))) - return OriginalHook(Ricochet); + if (ActionReady(OriginalHook(Ricochet)) && + GetRemainingCharges(OriginalHook(Ricochet)) > GetRemainingCharges(OriginalHook(GaussRound))) + return OriginalHook(Ricochet); + } } - } - // Full Metal Field - if (HasEffect(Buffs.FullMetalMachinist) && - (GetCooldownRemainingTime(Wildfire) <= GCD || ActionReady(Wildfire) || - GetBuffRemainingTime(Buffs.FullMetalMachinist) <= 6) && - LevelChecked(FullMetalField)) - return FullMetalField; + // Full Metal Field + if (HasEffect(Buffs.FullMetalMachinist) && + (GetCooldownRemainingTime(Wildfire) <= GCD || ActionReady(Wildfire) || + GetBuffRemainingTime(Buffs.FullMetalMachinist) <= 6) && + LevelChecked(FullMetalField)) + return FullMetalField; - // Heatblast - if (Gauge.IsOverheated && LevelChecked(OriginalHook(Heatblast))) - return OriginalHook(Heatblast); + // Heatblast + if (Gauge.IsOverheated && LevelChecked(OriginalHook(Heatblast))) + return OriginalHook(Heatblast); - //Tools - if (MCHHelper.Tools(ref actionID)) - return actionID; + //Tools + if (MCHHelper.Tools(ref actionID)) + return actionID; - // 1-2-3 Combo - if (comboTime > 0) - { - if (lastComboMove is SplitShot && LevelChecked(OriginalHook(SlugShot))) - return OriginalHook(SlugShot); + // 1-2-3 Combo + if (comboTime > 0) + { + if (lastComboMove is SplitShot && LevelChecked(OriginalHook(SlugShot))) + return OriginalHook(SlugShot); - if (lastComboMove == OriginalHook(SlugShot) && - !LevelChecked(Drill) && !HasEffect(Buffs.Reassembled) && ActionReady(Reassemble)) - return Reassemble; + if (lastComboMove == OriginalHook(SlugShot) && + !LevelChecked(Drill) && !HasEffect(Buffs.Reassembled) && ActionReady(Reassemble)) + return Reassemble; - if (lastComboMove is SlugShot && LevelChecked(OriginalHook(CleanShot))) - return OriginalHook(CleanShot); + if (lastComboMove is SlugShot && LevelChecked(OriginalHook(CleanShot))) + return OriginalHook(CleanShot); + } } - return actionID; } } @@ -163,164 +162,163 @@ internal class MCH_ST_AdvancedMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { // Don't change anything if not basic skill - if (actionID is not (SplitShot or HeatedSplitShot)) - return actionID; - - if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && - IsEnabled(Variant.VariantCure) && - PlayerHealthPercentageHp() <= Config.MCH_VariantCure) - return Variant.VariantCure; - - if (IsEnabled(CustomComboPreset.MCH_Variant_Rampart) && - IsEnabled(Variant.VariantRampart) && - IsOffCooldown(Variant.VariantRampart) && - CanWeave(actionID)) - return Variant.VariantRampart; - - // Opener - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Opener) && TargetIsHostile()) - if (MCHOpener.DoFullOpener(ref actionID)) - return actionID; + if (actionID is SplitShot or HeatedSplitShot) + { + if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && + IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= Config.MCH_VariantCure) + return Variant.VariantCure; - //Reassemble to start before combat - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassemble) && - !HasEffect(Buffs.Reassembled) && ActionReady(Reassemble) && - !InCombat() && TargetIsHostile()) - return Reassemble; + if (IsEnabled(CustomComboPreset.MCH_Variant_Rampart) && + IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + CanWeave(actionID)) + return Variant.VariantRampart; - // Interrupt - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Interrupt) && - interruptReady) - return All.HeadGraze; + // Opener + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Opener) && TargetIsHostile()) + if (MCHOpener.DoFullOpener(ref actionID)) + return actionID; - // All weaves - if (CanWeave(ActionWatching.LastWeaponskill)) - { - if (!ActionWatching.HasDoubleWeaved()) + //Reassemble to start before combat + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassemble) && + !HasEffect(Buffs.Reassembled) && ActionReady(Reassemble) && + !InCombat() && TargetIsHostile()) + return Reassemble; + + // Interrupt + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Interrupt) && + interruptReady) + return All.HeadGraze; + + // All weaves + if (CanWeave(ActionWatching.LastWeaponskill)) { - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_QueenOverdrive) && - Gauge.IsRobotActive && GetTargetHPPercent() <= Config.MCH_ST_QueenOverDrive && - ActionReady(OriginalHook(RookOverdrive))) - return OriginalHook(RookOverdrive); - - // Wildfire - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_WildFire) && - JustUsed(Hypercharge) && ActionReady(Wildfire) && - GetTargetHPPercent() >= Config.MCH_ST_WildfireHP) - return Wildfire; - - if (!Gauge.IsOverheated) + if (!ActionWatching.HasDoubleWeaved()) { - // BarrelStabilizer - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Stabilizer) && - ActionReady(BarrelStabilizer)) - return BarrelStabilizer; - - // Hypercharge - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Hypercharge) && - (Gauge.Heat >= 50 || HasEffect(Buffs.Hypercharged)) && - !MCHHelper.IsComboExpiring(6) && - LevelChecked(Hypercharge) && - GetTargetHPPercent() >= Config.MCH_ST_HyperchargeHP) + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_QueenOverdrive) && + Gauge.IsRobotActive && GetTargetHPPercent() <= Config.MCH_ST_QueenOverDrive && + ActionReady(OriginalHook(RookOverdrive))) + return OriginalHook(RookOverdrive); + + // Wildfire + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_WildFire) && + JustUsed(Hypercharge) && ActionReady(Wildfire) && + GetTargetHPPercent() >= Config.MCH_ST_WildfireHP) + return Wildfire; + + if (!Gauge.IsOverheated) { - // Ensures Hypercharge is double weaved with WF - if ((LevelChecked(FullMetalField) && JustUsed(FullMetalField) && - (GetCooldownRemainingTime(Wildfire) < GCD || ActionReady(Wildfire))) || - (!LevelChecked(FullMetalField) && ActionReady(Wildfire)) || - !LevelChecked(Wildfire)) - return Hypercharge; - - // Only Hypercharge when tools are on cooldown - if (drillCD && anchorCD && sawCD && - ((GetCooldownRemainingTime(Wildfire) > 40 && LevelChecked(Wildfire)) || - !LevelChecked(Wildfire))) - return Hypercharge; + // BarrelStabilizer + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Stabilizer) && + ActionReady(BarrelStabilizer)) + return BarrelStabilizer; + + // Hypercharge + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Hypercharge) && + (Gauge.Heat >= 50 || HasEffect(Buffs.Hypercharged)) && + !MCHHelper.IsComboExpiring(6) && + LevelChecked(Hypercharge) && + GetTargetHPPercent() >= Config.MCH_ST_HyperchargeHP) + { + // Ensures Hypercharge is double weaved with WF + if ((LevelChecked(FullMetalField) && JustUsed(FullMetalField) && + (GetCooldownRemainingTime(Wildfire) < GCD || ActionReady(Wildfire))) || + (!LevelChecked(FullMetalField) && ActionReady(Wildfire)) || + !LevelChecked(Wildfire)) + return Hypercharge; + + // Only Hypercharge when tools are on cooldown + if (drillCD && anchorCD && sawCD && + ((GetCooldownRemainingTime(Wildfire) > 40 && LevelChecked(Wildfire)) || + !LevelChecked(Wildfire))) + return Hypercharge; + } + + // Queen + if (IsEnabled(CustomComboPreset.MCH_Adv_TurretQueen) && + MCHHelper.UseQueen(Gauge) && + (GetCooldownRemainingTime(Wildfire) > GCD || !LevelChecked(Wildfire))) + return OriginalHook(RookAutoturret); + + // Reassemble + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassemble) && + GetRemainingCharges(Reassemble) > Config.MCH_ST_ReassemblePool && + MCHHelper.Reassembled(Gauge)) + return Reassemble; + + // Gauss Round and Ricochet outside HC + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_GaussRicochet) && + (JustUsed(OriginalHook(AirAnchor), 2f) || + JustUsed(Chainsaw, 2f) || + JustUsed(Drill, 2f) || + JustUsed(Excavator, 2f))) + { + if (ActionReady(OriginalHook(GaussRound)) && + !JustUsed(OriginalHook(GaussRound), 2f)) + return OriginalHook(GaussRound); + + if (ActionReady(OriginalHook(Ricochet)) && + !JustUsed(OriginalHook(Ricochet), 2f)) + return OriginalHook(Ricochet); + } + + // Healing + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_SecondWind) && + PlayerHealthPercentageHp() <= Config.MCH_ST_SecondWindThreshold && + ActionReady(All.SecondWind)) + return All.SecondWind; } + } - // Queen - if (IsEnabled(CustomComboPreset.MCH_Adv_TurretQueen) && - MCHHelper.UseQueen(Gauge) && - (GetCooldownRemainingTime(Wildfire) > GCD || !LevelChecked(Wildfire))) - return OriginalHook(RookAutoturret); - - // Reassemble - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassemble) && - GetRemainingCharges(Reassemble) > Config.MCH_ST_ReassemblePool && - MCHHelper.Reassembled(Gauge)) - return Reassemble; - - // Gauss Round and Ricochet outside HC - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_GaussRicochet) && - (JustUsed(OriginalHook(AirAnchor), 2f) || - JustUsed(Chainsaw, 2f) || - JustUsed(Drill, 2f) || - JustUsed(Excavator, 2f))) - { - if (ActionReady(OriginalHook(GaussRound)) && - !JustUsed(OriginalHook(GaussRound), 2f)) - return OriginalHook(GaussRound); - - if (ActionReady(OriginalHook(Ricochet)) && - !JustUsed(OriginalHook(Ricochet), 2f)) - return OriginalHook(Ricochet); - } + // Gauss Round and Ricochet during HC + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_GaussRicochet) && + JustUsed(OriginalHook(Heatblast), 1f) && HasNotWeaved) + { + if (ActionReady(OriginalHook(GaussRound)) && + GetRemainingCharges(OriginalHook(GaussRound)) >= + GetRemainingCharges(OriginalHook(Ricochet))) + return OriginalHook(GaussRound); - // Healing - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_SecondWind) && - PlayerHealthPercentageHp() <= Config.MCH_ST_SecondWindThreshold && - ActionReady(All.SecondWind)) - return All.SecondWind; + if (ActionReady(OriginalHook(Ricochet)) && + GetRemainingCharges(OriginalHook(Ricochet)) > + GetRemainingCharges(OriginalHook(GaussRound))) + return OriginalHook(Ricochet); } } - // Gauss Round and Ricochet during HC - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_GaussRicochet) && - JustUsed(OriginalHook(Heatblast), 1f) && HasNotWeaved) - { - if (ActionReady(OriginalHook(GaussRound)) && - GetRemainingCharges(OriginalHook(GaussRound)) >= - GetRemainingCharges(OriginalHook(Ricochet))) - return OriginalHook(GaussRound); + // Full Metal Field + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Stabilizer_FullMetalField) && + HasEffect(Buffs.FullMetalMachinist) && + (GetCooldownRemainingTime(Wildfire) <= GCD || ActionReady(Wildfire) || + GetBuffRemainingTime(Buffs.FullMetalMachinist) <= 6) && + LevelChecked(FullMetalField)) + return FullMetalField; - if (ActionReady(OriginalHook(Ricochet)) && - GetRemainingCharges(OriginalHook(Ricochet)) > - GetRemainingCharges(OriginalHook(GaussRound))) - return OriginalHook(Ricochet); - } - } + // Heatblast + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Heatblast) && + Gauge.IsOverheated && LevelChecked(OriginalHook(Heatblast))) + return OriginalHook(Heatblast); - // Full Metal Field - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Stabilizer_FullMetalField) && - HasEffect(Buffs.FullMetalMachinist) && - (GetCooldownRemainingTime(Wildfire) <= GCD || ActionReady(Wildfire) || - GetBuffRemainingTime(Buffs.FullMetalMachinist) <= 6) && - LevelChecked(FullMetalField)) - return FullMetalField; - - // Heatblast - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Heatblast) && - Gauge.IsOverheated && LevelChecked(OriginalHook(Heatblast))) - return OriginalHook(Heatblast); - - //Tools - if (MCHHelper.Tools(ref actionID)) - return actionID; - - // 1-2-3 Combo - if (comboTime > 0) - { - if (lastComboMove is SplitShot && LevelChecked(OriginalHook(SlugShot))) - return OriginalHook(SlugShot); + //Tools + if (MCHHelper.Tools(ref actionID)) + return actionID; - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassemble) && Config.MCH_ST_Reassembled[4] && - lastComboMove == OriginalHook(SlugShot) && - !LevelChecked(Drill) && !HasEffect(Buffs.Reassembled) && ActionReady(Reassemble)) - return Reassemble; + // 1-2-3 Combo + if (comboTime > 0) + { + if (lastComboMove is SplitShot && LevelChecked(OriginalHook(SlugShot))) + return OriginalHook(SlugShot); - if (lastComboMove is SlugShot && LevelChecked(OriginalHook(CleanShot))) - return OriginalHook(CleanShot); - } + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassemble) && Config.MCH_ST_Reassembled[4] && + lastComboMove == OriginalHook(SlugShot) && + !LevelChecked(Drill) && !HasEffect(Buffs.Reassembled) && ActionReady(Reassemble)) + return Reassemble; + if (lastComboMove is SlugShot && LevelChecked(OriginalHook(CleanShot))) + return OriginalHook(CleanShot); + } + } return actionID; } } @@ -444,31 +442,31 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is SpreadShot or Scattergun) { bool reassembledScattergunAoE = IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && - Config.MCH_AoE_Reassembled [0] && HasEffect(Buffs.Reassembled); + Config.MCH_AoE_Reassembled[0] && HasEffect(Buffs.Reassembled); bool reassembledChainsawAoE = - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled [2] && + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled[2] && HasEffect(Buffs.Reassembled)) || - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled [2] && + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled[2] && !HasEffect(Buffs.Reassembled)) || (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); bool reassembledExcavatorAoE = - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled [3] && + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled[3] && HasEffect(Buffs.Reassembled)) || - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled [3] && + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled[3] && !HasEffect(Buffs.Reassembled)) || (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); bool reassembledAirAnchorAoE = - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled [4] && - HasEffect(Buffs.Reassembled)) || - (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled [4] && - !HasEffect(Buffs.Reassembled)) || - (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || - !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && Config.MCH_AoE_Reassembled[4] && + HasEffect(Buffs.Reassembled)) || + (IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble) && !Config.MCH_AoE_Reassembled[4] && + !HasEffect(Buffs.Reassembled)) || + (!HasEffect(Buffs.Reassembled) && GetRemainingCharges(Reassemble) <= Config.MCH_AoE_ReassemblePool) || + !IsEnabled(CustomComboPreset.MCH_AoE_Adv_Reassemble); if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && IsEnabled(Variant.VariantCure) && @@ -586,8 +584,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.MCH_AoE_Adv_AirAnchor) && reassembledAirAnchorAoE && - LevelChecked(AirAnchor) && - (GetCooldownRemainingTime(AirAnchor) <= GCD + 0.25 || ActionReady(Chainsaw))) + LevelChecked(AirAnchor) && + (GetCooldownRemainingTime(AirAnchor) <= GCD + 0.25 || ActionReady(Chainsaw))) return AirAnchor; if (reassembledScattergunAoE) @@ -717,12 +715,10 @@ internal class MCH_Overdrive : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MCH_Overdrive; - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - return actionID is RookAutoturret or AutomatonQueen && Gauge.IsRobotActive + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => + actionID is RookAutoturret or AutomatonQueen && Gauge.IsRobotActive ? OriginalHook(QueenOverdrive) : actionID; - } } internal class MCH_HotShotDrillChainsawExcavator : CustomCombo @@ -730,9 +726,8 @@ internal class MCH_HotShotDrillChainsawExcavator : CustomCombo protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MCH_HotShotDrillChainsawExcavator; - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - return actionID is Drill or HotShot or AirAnchor or Chainsaw + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => + actionID is Drill or HotShot or AirAnchor or Chainsaw ? LevelChecked(Excavator) && HasEffect(Buffs.ExcavatorReady) ? CalcBestAction(actionID, Excavator, Chainsaw, AirAnchor, Drill) : LevelChecked(Chainsaw) @@ -743,34 +738,29 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ? CalcBestAction(actionID, Drill, HotShot) : HotShot : actionID; - } } internal class MCH_DismantleTactician : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MCH_DismantleTactician; - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - return actionID is Dismantle + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => + actionID is Dismantle && (IsOnCooldown(Dismantle) || !LevelChecked(Dismantle)) && ActionReady(Tactician) && !HasEffect(Buffs.Tactician) ? Tactician : actionID; - } } internal class All_PRanged_Dismantle : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.All_PRanged_Dismantle; - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - return actionID is Dismantle && TargetHasEffectAny(Debuffs.Dismantled) && IsOffCooldown(Dismantle) + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => + actionID is Dismantle && TargetHasEffectAny(Debuffs.Dismantled) && IsOffCooldown(Dismantle) ? OriginalHook(11) : actionID; - } } #region ID's diff --git a/WrathCombo/Combos/PvE/MCH/MCH_Config.cs b/WrathCombo/Combos/PvE/MCH/MCH_Config.cs index d38a23132..5656f96f3 100644 --- a/WrathCombo/Combos/PvE/MCH/MCH_Config.cs +++ b/WrathCombo/Combos/PvE/MCH/MCH_Config.cs @@ -47,10 +47,10 @@ internal static void Draw(CustomComboPreset preset) DrawSliderInt(0, 1, MCH_AoE_ReassemblePool, "Number of Charges to Save for Manual Use"); - DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(SpreadShot)}/{ActionWatching.GetActionName(Scattergun)}", "", 5, 0); - DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(AirAnchor)}", "", 5, 4); - DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(Chainsaw)}", "", 5, 2); - DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(Excavator)}", "", 5, 3); + DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(SpreadShot)}/{ActionWatching.GetActionName(Scattergun)}", "", 4, 0); + DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(AirAnchor)}", "", 4, 1); + DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(Chainsaw)}", "", 4, 2); + DrawHorizontalMultiChoice(MCH_AoE_Reassembled, $"Use on {ActionWatching.GetActionName(Excavator)}", "", 4, 3); break; From f760057c4480f2ed79075ac38efd9bf82a40df02 Mon Sep 17 00:00:00 2001 From: Kage <95875972+Kagekazu@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:22:10 +0100 Subject: [PATCH 4/5] update Aoe simplemode usage --- WrathCombo/Combos/PvE/MCH/MCH.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WrathCombo/Combos/PvE/MCH/MCH.cs b/WrathCombo/Combos/PvE/MCH/MCH.cs index 4b984c666..1869b3216 100644 --- a/WrathCombo/Combos/PvE/MCH/MCH.cs +++ b/WrathCombo/Combos/PvE/MCH/MCH.cs @@ -373,10 +373,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!HasEffect(Buffs.Wildfire) && !HasEffect(Buffs.Reassembled) && HasCharges(Reassemble) && !JustUsed(Flamethrower, 10f) && - (Scattergun.LevelChecked() || - (Gauge.IsOverheated && AutoCrossbow.LevelChecked()) || + ((HasEffect(Buffs.ExcavatorReady) && Excavator.LevelChecked()) || (GetCooldownRemainingTime(Chainsaw) < 1 && Chainsaw.LevelChecked()) || - (GetCooldownRemainingTime(OriginalHook(Chainsaw)) < 1 && Excavator.LevelChecked()))) + (GetCooldownRemainingTime(AirAnchor) < 1 && AirAnchor.LevelChecked()) || + Scattergun.LevelChecked())) return Reassemble; if (PlayerHealthPercentageHp() <= 25 && ActionReady(All.SecondWind)) From ff53f3b6c2645c80b1125d6f96d8be0bb6fa274b Mon Sep 17 00:00:00 2001 From: Kage <95875972+Kagekazu@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:42:37 +0100 Subject: [PATCH 5/5] some extra cleanup --- WrathCombo/Combos/CustomComboPreset.cs | 4 +++- WrathCombo/Combos/PvE/MCH/MCH.cs | 9 +-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/WrathCombo/Combos/CustomComboPreset.cs b/WrathCombo/Combos/CustomComboPreset.cs index ad460f1ae..8f91348b3 100644 --- a/WrathCombo/Combos/CustomComboPreset.cs +++ b/WrathCombo/Combos/CustomComboPreset.cs @@ -2763,7 +2763,9 @@ [Bozja] [CustomComboInfo("Lost Rampage Option", "Use Lost Rampage when available MCH.JobID)] MCH_DismantleTactician = 8058, - // Last value = 8058 + // Last value ST = 8116 + // Last value AoE = 8313 + // Last value Misc = 8058 #endregion diff --git a/WrathCombo/Combos/PvE/MCH/MCH.cs b/WrathCombo/Combos/PvE/MCH/MCH.cs index 1869b3216..4806700f4 100644 --- a/WrathCombo/Combos/PvE/MCH/MCH.cs +++ b/WrathCombo/Combos/PvE/MCH/MCH.cs @@ -1,12 +1,8 @@ -#region - using WrathCombo.Combos.PvE.Content; using WrathCombo.CustomComboNS; using WrathCombo.Data; using WrathCombo.Extensions; -#endregion - namespace WrathCombo.Combos.PvE; internal static partial class MCH @@ -17,7 +13,6 @@ internal class MCH_ST_SimpleMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - // Don't change anything if not basic skill if (actionID is SplitShot or HeatedSplitShot) { if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && @@ -161,7 +156,6 @@ internal class MCH_ST_AdvancedMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - // Don't change anything if not basic skill if (actionID is SplitShot or HeatedSplitShot) { if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && @@ -723,8 +717,7 @@ actionID is RookAutoturret or AutomatonQueen && Gauge.IsRobotActive internal class MCH_HotShotDrillChainsawExcavator : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = - CustomComboPreset.MCH_HotShotDrillChainsawExcavator; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MCH_HotShotDrillChainsawExcavator; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => actionID is Drill or HotShot or AirAnchor or Chainsaw