diff --git a/WrathCombo/Combos/CustomComboPreset.cs b/WrathCombo/Combos/CustomComboPreset.cs index 3e2ef9087..02e45211e 100644 --- a/WrathCombo/Combos/CustomComboPreset.cs +++ b/WrathCombo/Combos/CustomComboPreset.cs @@ -2718,6 +2718,10 @@ public enum CustomComboPreset [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 = 8313, + [ParentCombo(MCH_AoE_AdvancedMode)] [CustomComboInfo("Chain Saw Option", "Adds Chain Saw to the the rotation.", MCH.JobID)] MCH_AoE_Adv_Chainsaw = 8309, @@ -2812,7 +2816,9 @@ public enum CustomComboPreset 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/BLM/BLM.cs b/WrathCombo/Combos/PvE/BLM/BLM.cs index 9e2b3c449..42e866a77 100644 --- a/WrathCombo/Combos/PvE/BLM/BLM.cs +++ b/WrathCombo/Combos/PvE/BLM/BLM.cs @@ -15,19 +15,18 @@ 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 (actionID is Fire) + { + 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 (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && + IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + canWeave) + return Variant.VariantRampart; //Weaves if (canWeave) @@ -35,131 +34,154 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (ActionReady(Amplifier) && remainingPolyglotCD >= 20000) return Amplifier; - if (ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines)) - return LeyLines; - } + if (ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines)) + return LeyLines; + } - 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.Thunderhead) && gcdsInTimer > 1 && LevelChecked(Thunder) && + GetTargetHPPercent() >= Config.BLM_ST_ThunderHP && + (thunderDebuffST is null || thunderDebuffST.RemainingTime < 3)) + return OriginalHook(Thunder); if (IsMoving()) { if (ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) return Amplifier; - if (HasPolyglotStacks(Gauge)) - return LevelChecked(Xenoglossy) - ? Xenoglossy - : Foul; - } - - 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 (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; @@ -168,37 +190,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; } } @@ -209,45 +208,44 @@ 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 (Opener().FullOpener(ref actionID)) return actionID; - //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; - } + //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()) { @@ -255,139 +253,163 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim 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 (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 (IsEnabled(CustomComboPreset.BLM_ST_Despair) && - curMp < MP.FireI && LevelChecked(Despair) && curMp >= MP.Despair) - return Despair; + if (IsEnabled(CustomComboPreset.BLM_ST_UsePolyglotMoving) && + polyglotStacks > Config.BLM_ST_UsePolyglotMoving_HoldCharges) + return LevelChecked(Xenoglossy) + ? Xenoglossy + : Foul; + } - if (IsEnabled(CustomComboPreset.BLM_ST_FlareStar) && - curMp == 0 && LevelChecked(FlareStar) && Gauge.AstralSoulStacks == 6) + if (Gauge.InAstralFire) { - 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 (Gauge.IsParadoxActive && gcdsInTimer < 2 && curMp >= MP.FireI) + return Paradox; - if (IsEnabled(CustomComboPreset.BLM_ST_Swiftcast) && - 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 (IsEnabled(CustomComboPreset.BLM_ST_Despair) && + curMp < MP.FireI && LevelChecked(Despair) && curMp >= MP.Despair) + return Despair; - 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 (Gauge.IsParadoxActive) + return Paradox; - 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) + { + if (!HasEffect(Buffs.Firestarter) || + !(GetBuffRemainingTime(Buffs.Firestarter) <= 3)) + 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; - } + if (curMp + nextMpGain <= 10000 || curMp < 7500) + return Blizzard; - if (LevelChecked(Blizzard4) && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) - return Blizzard4; + if (IsEnabled(CustomComboPreset.BLM_ST_Transpose) && + ActionReady(Transpose) && canWeave && + curMp is MP.MaxMP && HasEffect(Buffs.Firestarter)) + return Transpose; - if (Gauge.IsParadoxActive) - return Paradox; + 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; @@ -397,38 +419,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; } } @@ -439,13 +437,12 @@ 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 (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) && @@ -453,12 +450,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim CanSpellWeave()) return Variant.VariantRampart; - if (WasLastSpell(UmbralSoul)) - return OriginalHook(Fire2); + if (WasLastSpell(UmbralSoul)) + return OriginalHook(Fire2); - if ((HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && Thunder2.LevelChecked() && - thunderDebuffAoE is null) || thunderDebuffAoE?.RemainingTime < 3) - return OriginalHook(Thunder2); + if ((HasEffect(Buffs.Thunderhead) && gcdsInTimer > 1 && Thunder2.LevelChecked() && + thunderDebuffAoE is null) || thunderDebuffAoE?.RemainingTime < 3) + return OriginalHook(Thunder2); if (ActionReady(Amplifier) && remainingPolyglotCD >= 20000 && CanSpellWeave()) return Amplifier; @@ -468,50 +465,55 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) return Amplifier; - if (HasPolyglotStacks(Gauge)) - return Foul; - } + if (HasPolyglotStacks(Gauge)) + return Foul; + } if (CanSpellWeave() && ActionReady(LeyLines) && !HasEffect(Buffs.LeyLines)) return LeyLines; - if (Gauge.InAstralFire) - { - if (curMp == 0 && FlareStar.LevelChecked() && Gauge.AstralSoulStacks == 6) - return FlareStar; + if (Gauge.InAstralFire) + { + if (curMp == 0 && FlareStar.LevelChecked() && Gauge.AstralSoulStacks == 6) + return FlareStar; - if (!FlareStar.LevelChecked() && Fire2.LevelChecked() && curMp >= MP.FireAoE && - (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) - return OriginalHook(Fire2); + if (!FlareStar.LevelChecked() && Fire2.LevelChecked() && curMp >= MP.FireAoE && + (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) + return OriginalHook(Fire2); + if (Flare.LevelChecked() && curMp >= MP.AllMPSpells) + { + if (ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && + CanSpellWeave(ActionWatching.LastSpell)) + return Triplecast; if (Flare.LevelChecked() && curMp >= MP.FlareAoE) { if (ActionReady(Triplecast) && GetBuffStacks(Buffs.Triplecast) == 0 && CanSpellWeave()) return Triplecast; - return Flare; - } + return Flare; + } - if (Fire2.LevelChecked()) - if (gcdsInTimer > 1 && curMp >= MP.FireAoE) - return OriginalHook(Fire2); + if (Fire2.LevelChecked()) + if (gcdsInTimer > 1 && curMp >= MP.FireAoE) + return OriginalHook(Fire2); - if (ActionReady(Manafont)) - return Manafont; + if (ActionReady(Manafont)) + return Manafont; - if (ActionReady(Transpose) && (!TraitLevelChecked(Traits.AspectMasteryIII) || canSwiftF)) - return Transpose; + if (ActionReady(Transpose) && (!TraitLevelChecked(Traits.AspectMasteryIII) || canSwiftF)) + return Transpose; - if (ActionReady(Blizzard2) && TraitLevelChecked(Traits.AspectMasteryIII)) - return OriginalHook(Blizzard2); - } + if (ActionReady(Blizzard2) && TraitLevelChecked(Traits.AspectMasteryIII)) + return OriginalHook(Blizzard2); + } - if (Gauge.InUmbralIce) - { - if (HasPolyglotStacks(Gauge)) - return Foul; + if (Gauge.InUmbralIce) + { + if (HasPolyglotStacks(Gauge)) + return Foul; if (ActionWatching.WhichOfTheseActionsWasLast(OriginalHook(Fire2), OriginalHook(Freeze), OriginalHook(Flare), OriginalHook(FlareStar)) == OriginalHook(Freeze) && @@ -520,8 +522,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (ActionReady(Transpose) && CanSpellWeave()) return Transpose; - return OriginalHook(Fire2); - } + return OriginalHook(Fire2); + } if (ActionReady(OriginalHook(Blizzard2)) && Gauge.UmbralIceStacks < 3 && TraitLevelChecked(Traits.AspectMasteryIII)) @@ -534,23 +536,23 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim CanSpellWeave()) return All.Swiftcast; - if (HasEffect(All.Buffs.Swiftcast) || GetBuffStacks(Buffs.Triplecast) > 0) - return OriginalHook(Blizzard2); - } + if (HasEffect(All.Buffs.Swiftcast) || GetBuffStacks(Buffs.Triplecast) > 0) + return OriginalHook(Blizzard2); + } - if (Gauge.UmbralIceStacks < 3 && ActionReady(OriginalHook(Blizzard2))) - return OriginalHook(Blizzard2); + if (Gauge.UmbralIceStacks < 3 && ActionReady(OriginalHook(Blizzard2))) + return OriginalHook(Blizzard2); - if (Freeze.LevelChecked() && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) - return Freeze; + if (Freeze.LevelChecked() && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) + return Freeze; - if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) - return OriginalHook(Fire2); + if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) + return OriginalHook(Fire2); - if (curMp < LocalPlayer.MaxMp) - return Freeze.LevelChecked() - ? OriginalHook(Freeze) - : OriginalHook(Blizzard2); + if (curMp < LocalPlayer?.MaxMp) + return Freeze.LevelChecked() + ? OriginalHook(Freeze) + : OriginalHook(Blizzard2); if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && ActionReady(Transpose) && @@ -558,13 +560,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim !TraitLevelChecked(Traits.AspectMasteryIII))) return Transpose; - if (Fire2.LevelChecked() && TraitLevelChecked(Traits.AspectMasteryIII)) - return OriginalHook(Fire2); - } - - if (Blizzard2.LevelChecked()) - return OriginalHook(Blizzard2); + if (Fire2.LevelChecked() && TraitLevelChecked(Traits.AspectMasteryIII)) + return OriginalHook(Fire2); + } + if (Blizzard2.LevelChecked()) + return OriginalHook(Blizzard2); + } return actionID; } } @@ -575,16 +577,15 @@ 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 Blizzard2 or HighBlizzard2) + { + 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 (IsEnabled(CustomComboPreset.BLM_Variant_Cure) && + IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= Config.BLM_VariantCure) + return Variant.VariantCure; if (IsEnabled(CustomComboPreset.BLM_Variant_Rampart) && IsEnabled(Variant.VariantRampart) && @@ -592,14 +593,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim CanSpellWeave()) return Variant.VariantRampart; - if (WasLastSpell(UmbralSoul)) - return OriginalHook(Fire2); + if (WasLastSpell(UmbralSoul)) + return OriginalHook(Fire2); - 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 ((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 (IsEnabled(CustomComboPreset.BLM_AoE_Amplifier) && ActionReady(Amplifier) && remainingPolyglotCD >= 20000 && CanSpellWeave()) @@ -611,10 +612,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ActionReady(Amplifier) && Gauge.PolyglotStacks < maxPolyglot) return Amplifier; - if (IsEnabled(CustomComboPreset.BLM_AoE_UsePolyglotMoving) && - PolyglotStacks > Config.BLM_AoE_UsePolyglotMoving_HoldCharges) - return Foul; - } + if (IsEnabled(CustomComboPreset.BLM_AoE_UsePolyglotMoving) && + polyglotStacks > Config.BLM_AoE_UsePolyglotMoving_HoldCharges) + return Foul; + } if (IsEnabled(CustomComboPreset.BLM_AoE_LeyLines) && CanSpellWeave() && @@ -622,15 +623,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim GetRemainingCharges(LeyLines) > Config.BLM_AoE_LeyLinesCharges) return LeyLines; - if (Gauge.InAstralFire) - { - if (IsEnabled(CustomComboPreset.BLM_AoE_FlareStar) && - curMp == 0 && FlareStar.LevelChecked() && Gauge.AstralSoulStacks == 6) - return FlareStar; + if (Gauge.InAstralFire) + { + if (IsEnabled(CustomComboPreset.BLM_AoE_FlareStar) && + curMp == 0 && FlareStar.LevelChecked() && Gauge.AstralSoulStacks == 6) + return FlareStar; - if (!FlareStar.LevelChecked() && Fire2.LevelChecked() && curMp >= MP.FireAoE && - (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) - return OriginalHook(Fire2); + if (!FlareStar.LevelChecked() && Fire2.LevelChecked() && curMp >= MP.FireAoE && + (Gauge.UmbralHearts > 1 || !TraitLevelChecked(Traits.UmbralHeart))) + return OriginalHook(Fire2); if (IsEnabled(CustomComboPreset.BLM_AoE_Flare) && Flare.LevelChecked() && curMp >= MP.FlareAoE) @@ -641,30 +642,30 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim TriplecastChargetime <= Config.BLM_AoE_Triplecast_ChargeTime)) return Triplecast; - return Flare; - } + return Flare; + } - if (Fire2.LevelChecked()) - if (gcdsInTimer > 1 && curMp >= MP.FireAoE) - return OriginalHook(Fire2); + if (Fire2.LevelChecked()) + if (gcdsInTimer > 1 && curMp >= MP.FireAoE) + return OriginalHook(Fire2); - if (IsEnabled(CustomComboPreset.BLM_AoE_Manafont) && - ActionReady(Manafont)) - return Manafont; + if (IsEnabled(CustomComboPreset.BLM_AoE_Manafont) && + ActionReady(Manafont)) + return Manafont; - if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && - ActionReady(Transpose) && (!TraitLevelChecked(Traits.AspectMasteryIII) || canSwiftF)) - return Transpose; + if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && + ActionReady(Transpose) && (!TraitLevelChecked(Traits.AspectMasteryIII) || canSwiftF)) + return Transpose; - if (ActionReady(Blizzard2) && TraitLevelChecked(Traits.AspectMasteryIII)) - return OriginalHook(Blizzard2); - } + if (ActionReady(Blizzard2) && TraitLevelChecked(Traits.AspectMasteryIII)) + return OriginalHook(Blizzard2); + } - if (Gauge.InUmbralIce) - { - if (IsEnabled(CustomComboPreset.BLM_AoE_UsePolyglot) && - PolyglotStacks > Config.BLM_AoE_UsePolyglot_HoldCharges) - return Foul; + if (Gauge.InUmbralIce) + { + if (IsEnabled(CustomComboPreset.BLM_AoE_UsePolyglot) && + polyglotStacks > Config.BLM_AoE_UsePolyglot_HoldCharges) + return Foul; if (ActionWatching.WhichOfTheseActionsWasLast(OriginalHook(Fire2), OriginalHook(Freeze), OriginalHook(Flare), OriginalHook(FlareStar)) == OriginalHook(Freeze) && @@ -674,8 +675,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ActionReady(Transpose) && CanSpellWeave()) return Transpose; - return OriginalHook(Fire2); - } + return OriginalHook(Fire2); + } if (ActionReady(OriginalHook(Blizzard2)) && Gauge.UmbralIceStacks < 3 && TraitLevelChecked(Traits.AspectMasteryIII)) @@ -692,23 +693,23 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim CanSpellWeave()) return All.Swiftcast; - if (HasEffect(All.Buffs.Swiftcast) || GetBuffStacks(Buffs.Triplecast) > 0) - return OriginalHook(Blizzard2); - } + if (HasEffect(All.Buffs.Swiftcast) || GetBuffStacks(Buffs.Triplecast) > 0) + return OriginalHook(Blizzard2); + } - if (Gauge.UmbralIceStacks < 3 && ActionReady(OriginalHook(Blizzard2))) - return OriginalHook(Blizzard2); + if (Gauge.UmbralIceStacks < 3 && ActionReady(OriginalHook(Blizzard2))) + return OriginalHook(Blizzard2); - if (Freeze.LevelChecked() && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) - return Freeze; + if (Freeze.LevelChecked() && Gauge.UmbralHearts < 3 && TraitLevelChecked(Traits.UmbralHeart)) + return Freeze; - if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) - return OriginalHook(Fire2); + if (BLMHelper.DoubleBlizz() && Fire2.LevelChecked()) + return OriginalHook(Fire2); - if (curMp < LocalPlayer.MaxMp) - return Freeze.LevelChecked() - ? OriginalHook(Freeze) - : OriginalHook(Blizzard2); + if (curMp < LocalPlayer?.MaxMp) + return Freeze.LevelChecked() + ? OriginalHook(Freeze) + : OriginalHook(Blizzard2); if (IsEnabled(CustomComboPreset.BLM_AoE_Transpose) && ActionReady(Transpose) && @@ -716,13 +717,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim !TraitLevelChecked(Traits.AspectMasteryIII))) return Transpose; - if (Fire2.LevelChecked() && TraitLevelChecked(Traits.AspectMasteryIII)) - return OriginalHook(Fire2); - } - - if (Blizzard2.LevelChecked()) - return OriginalHook(Blizzard2); + if (Fire2.LevelChecked() && TraitLevelChecked(Traits.AspectMasteryIII)) + return OriginalHook(Fire2); + } + if (Blizzard2.LevelChecked()) + return OriginalHook(Blizzard2); + } return actionID; } } @@ -831,10 +832,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 de843e300..97032644b 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,14 +13,12 @@ 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 (actionID is SplitShot or HeatedSplitShot) + { + 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) && @@ -37,14 +31,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (Opener().FullOpener(ref actionID)) return actionID; - //Reassemble to start before combat - if (!HasEffect(Buffs.Reassembled) && ActionReady(Reassemble) && - !InCombat() && TargetIsHostile()) - return Reassemble; + //Reassemble to start before combat + if (!HasEffect(Buffs.Reassembled) && ActionReady(Reassemble) && + !InCombat() && TargetIsHostile()) + return Reassemble; - // Interrupt - if (interruptReady) - return All.HeadGraze; + // Interrupt + if (interruptReady) + return All.HeadGraze; // All weaves if (CanWeave()) @@ -55,103 +49,103 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (JustUsed(Hypercharge) && ActionReady(Wildfire)) return Wildfire; - if (!Gauge.IsOverheated) - { - // BarrelStabilizer - if (ActionReady(BarrelStabilizer)) - return BarrelStabilizer; - - // Hypercharge - if ((Gauge.Heat >= 50 || HasEffect(Buffs.Hypercharged)) && !MCHHelper.IsComboExpiring(6) && - LevelChecked(Hypercharge)) + 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 (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; } - - //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; } - } - // 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; } } @@ -162,14 +156,12 @@ 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 (actionID is SplitShot or HeatedSplitShot) + { + 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) && @@ -182,16 +174,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (Opener().FullOpener(ref actionID)) return actionID; - //Reassemble to start before combat - if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassemble) && - !HasEffect(Buffs.Reassembled) && ActionReady(Reassemble) && - !InCombat() && TargetIsHostile()) - return Reassemble; + //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; + // Interrupt + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Interrupt) && + interruptReady) + return All.HeadGraze; // All weaves if (CanWeave()) @@ -203,124 +195,124 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim 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; + // Wildfire + if (IsEnabled(CustomComboPreset.MCH_ST_Adv_WildFire) && + JustUsed(Hypercharge) && ActionReady(Wildfire) && + GetTargetHPPercent() >= Config.MCH_ST_WildfireHP) + return Wildfire; - if (!Gauge.IsOverheated) - { - // 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 (!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; } } @@ -375,10 +367,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)) @@ -419,6 +411,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 +433,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) && + 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 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 (actionID is SpreadShot or Scattergun) - { if (IsEnabled(CustomComboPreset.MCH_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= Config.MCH_VariantCure) @@ -571,6 +576,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); @@ -698,22 +709,18 @@ 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 { - 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) - { - 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) @@ -724,34 +731,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 bf02a0f10..893f05747 100644 --- a/WrathCombo/Combos/PvE/MCH/MCH_Config.cs +++ b/WrathCombo/Combos/PvE/MCH/MCH_Config.cs @@ -40,20 +40,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; @@ -61,15 +52,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)}", "", 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;