From b8e2ae2c5cb2fe123931a24136f29d6d49b32341 Mon Sep 17 00:00:00 2001 From: Karaha-Baruha Date: Wed, 25 Sep 2024 17:51:02 -0500 Subject: [PATCH 1/7] correct conditions to fallback to normal queen logic after hardcoded time is over --- BasicRotations/Ranged/zMCH_Beta.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BasicRotations/Ranged/zMCH_Beta.cs b/BasicRotations/Ranged/zMCH_Beta.cs index 81a2587..cce0221 100644 --- a/BasicRotations/Ranged/zMCH_Beta.cs +++ b/BasicRotations/Ranged/zMCH_Beta.cs @@ -196,9 +196,8 @@ private bool CanUseQueenMeow(out IAction? act, IAction nextGCD) bool QueenFifteen = Battery >= 100 && !CombatElapsedLess(590f) && CombatElapsedLess(610f); if ( - (NewQueenLogic && - (!CombatElapsedLess(610f) - || WildfirePvE.Cooldown.WillHaveOneChargeGCD(4) + ((!CombatElapsedLess(610f) || NewQueenLogic) && + (WildfirePvE.Cooldown.WillHaveOneChargeGCD(4) || !WildfirePvE.Cooldown.ElapsedAfter(10) || (nextGCD.IsTheSameTo(true, CleanShotPvE) && Battery == 100) || (nextGCD.IsTheSameTo(true, HotShotPvE, AirAnchorPvE, ChainSawPvE, ExcavatorPvE) && (Battery == 90 || Battery == 100))) From 4285e1a8f15fdbfb1b8a4027cb4e9ec33913869d Mon Sep 17 00:00:00 2001 From: Karaha-Baruha Date: Thu, 26 Sep 2024 19:04:20 -0500 Subject: [PATCH 2/7] add tincture logic to mch betas, fix conditional on holding hypercharge for combo, remove hardcoded queen timing --- BasicRotations/Ranged/zMCH_Beta.cs | 56 ++++++++++++---------------- BasicRotations/Ranged/zMCH_Beta_2.cs | 16 +++++++- 2 files changed, 39 insertions(+), 33 deletions(-) diff --git a/BasicRotations/Ranged/zMCH_Beta.cs b/BasicRotations/Ranged/zMCH_Beta.cs index cce0221..718f0f5 100644 --- a/BasicRotations/Ranged/zMCH_Beta.cs +++ b/BasicRotations/Ranged/zMCH_Beta.cs @@ -6,9 +6,6 @@ namespace DefaultRotations.Ranged; public sealed class zMCH_Beta : MachinistRotation { #region Config Options - [RotationConfig(CombatType.PvE, Name = "Use new beta Queen logic (attempt to align with burst and otherwise avoid overcap). \nUnchecking this will use the 'experimental' hardcoded timings from the default rotation.")] - private bool NewQueenLogic { get; set; } = true; - [RotationConfig(CombatType.PvE, Name = "Prioritize Barrel Stabilizer use")] private bool BSPrio { get; set; } = true; @@ -17,6 +14,12 @@ public sealed class zMCH_Beta : MachinistRotation [RotationConfig(CombatType.PvE, Name = "Delay Hypercharge for combo GCD if about to break combo")] private bool HoldHCForCombo { get; set; } = true; + + [RotationConfig(CombatType.PvE, Name = "Use burst medicine in countdown (requires auto burst option on)")] + private bool OpenerBurstMeds { get; set; } = false; + + [RotationConfig(CombatType.PvE, Name = "Use burst medicine when available for midfight burst phase (requires auto burst option on)")] + private bool MidfightBurstMeds { get; set; } = false; #endregion #region Countdown logic @@ -26,7 +29,7 @@ public sealed class zMCH_Beta : MachinistRotation // ReassemblePvE's duration is 5s, need to fire the first GCD before it ends if (remainTime < 5 && ReassemblePvE.CanUse(out var act)) return act; // tincture needs to be used on -2s exactly - if (remainTime <= 2 && UseBurstMedicine(out act)) return act; + if (IsBurst && OpenerBurstMeds && remainTime <= 2 && UseBurstMedicine(out act)) return act; return base.CountDownAction(remainTime); } #endregion @@ -35,6 +38,8 @@ public sealed class zMCH_Beta : MachinistRotation // Determines emergency actions to take based on the next planned GCD action. protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) { + if (IsBurst && MidfightBurstMeds && !CombatElapsedLessGCD(10) && TimeForBurstMeds(out act, nextGCD)) return true; + // Reassemble Logic // Check next GCD action and conditions for Reassemble. bool isReassembleUsable = @@ -68,11 +73,11 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) // Check for not burning Hypercharge below level 52 on AOE bool LowLevelHyperCheck = !AutoCrossbowPvE.EnoughLevel && SpreadShotPvE.CanUse(out _); + if (IsBurst && BSPrio && BarrelStabilizerPvE.CanUse(out act)) return true; + // Rook Autoturret/Queen Logic if (CanUseQueenMeow(out act, nextGCD)) return true; - if (IsBurst && BSPrio && BarrelStabilizerPvE.CanUse(out act)) return true; - // Burst if (IsBurst) { @@ -81,10 +86,10 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) // Use Hypercharge if wildfire will not be up in 30 seconds or if you hit 100 heat if (!LowLevelHyperCheck && !Player.HasStatus(true, StatusID.Reassembled) && (!WildfirePvE.Cooldown.WillHaveOneCharge(30) || (Heat == 100))) { - if (!HoldHCForCombo || !(LiveComboTime <= 8f && LiveComboTime > 0f) && ToolChargeSoon(out act)) return true; + if ((!HoldHCForCombo || !(LiveComboTime <= 8f && LiveComboTime > 0f)) && ToolChargeSoon(out act)) return true; } - // Use Ricochet and Gauss if have pooled charges or is burst window + // Use Ricochet and Gauss if (isRicochetMore && RicochetPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; if (GaussRoundPvE.CanUse(out act, usedUp: true, skipAoeCheck: true)) return true; @@ -176,32 +181,19 @@ private bool ToolChargeSoon(out IAction? act) } } + private bool TimeForBurstMeds(out IAction? act, IAction nextGCD) + { + if (AirAnchorPvE.Cooldown.WillHaveOneChargeGCD(2) && BarrelStabilizerPvE.Cooldown.WillHaveOneChargeGCD(6) && WildfirePvE.Cooldown.WillHaveOneChargeGCD(6)) return UseBurstMedicine(out act); + act = null; + return false; + } + private bool CanUseQueenMeow(out IAction? act, IAction nextGCD) { - // Define conditions under which the Rook Autoturret/Queen can be used. - bool QueenOne = Battery >= 60 && CombatElapsedLess(25f); - bool QueenTwo = Battery >= 90 && !CombatElapsedLess(58f) && CombatElapsedLess(78f); - bool QueenThree = Battery >= 100 && !CombatElapsedLess(111f) && CombatElapsedLess(131f); - bool QueenFour = Battery >= 50 && !CombatElapsedLess(148f) && CombatElapsedLess(168f); - bool QueenFive = Battery >= 60 && !CombatElapsedLess(178f) && CombatElapsedLess(198f); - bool QueenSix = Battery >= 100 && !CombatElapsedLess(230f) && CombatElapsedLess(250f); - bool QueenSeven = Battery >= 50 && !CombatElapsedLess(268f) && CombatElapsedLess(288f); - bool QueenEight = Battery >= 70 && !CombatElapsedLess(296f) && CombatElapsedLess(316f); - bool QueenNine = Battery >= 100 && !CombatElapsedLess(350f) && CombatElapsedLess(370f); - bool QueenTen = Battery >= 50 && !CombatElapsedLess(388f) && CombatElapsedLess(408f); - bool QueenEleven = Battery >= 80 && !CombatElapsedLess(416f) && CombatElapsedLess(436f); - bool QueenTwelve = Battery >= 100 && !CombatElapsedLess(470f) && CombatElapsedLess(490f); - bool QueenThirteen = Battery >= 50 && !CombatElapsedLess(505f) && CombatElapsedLess(525f); - bool QueenFourteen = Battery >= 60 && !CombatElapsedLess(538f) && CombatElapsedLess(558f); - bool QueenFifteen = Battery >= 100 && !CombatElapsedLess(590f) && CombatElapsedLess(610f); - - if ( - ((!CombatElapsedLess(610f) || NewQueenLogic) && - (WildfirePvE.Cooldown.WillHaveOneChargeGCD(4) - || !WildfirePvE.Cooldown.ElapsedAfter(10) - || (nextGCD.IsTheSameTo(true, CleanShotPvE) && Battery == 100) - || (nextGCD.IsTheSameTo(true, HotShotPvE, AirAnchorPvE, ChainSawPvE, ExcavatorPvE) && (Battery == 90 || Battery == 100))) - || !NewQueenLogic && (QueenOne || QueenTwo || QueenThree || QueenFour || QueenFive || QueenSix || QueenSeven || QueenEight || QueenNine || QueenTen || QueenEleven || QueenTwelve || QueenThirteen || QueenFourteen || QueenFifteen))) + if (WildfirePvE.Cooldown.WillHaveOneChargeGCD(4) + || !WildfirePvE.Cooldown.ElapsedAfter(10) + || (nextGCD.IsTheSameTo(true, CleanShotPvE) && Battery == 100) + || (nextGCD.IsTheSameTo(true, HotShotPvE, AirAnchorPvE, ChainSawPvE, ExcavatorPvE) && (Battery == 90 || Battery == 100))) { if (RookAutoturretPvE.CanUse(out act)) return true; } diff --git a/BasicRotations/Ranged/zMCH_Beta_2.cs b/BasicRotations/Ranged/zMCH_Beta_2.cs index 0ab3d0b..9976270 100644 --- a/BasicRotations/Ranged/zMCH_Beta_2.cs +++ b/BasicRotations/Ranged/zMCH_Beta_2.cs @@ -8,6 +8,12 @@ public sealed class zMCH_Beta_2 : MachinistRotation #region Config Options [RotationConfig(CombatType.PvE, Name = "Use hardcoded Queen timings\nSlight DPS gain if uninterrupted but possibly loses more from drift or death.")] private bool UseBalanceQueenTimings { get; set; } + + [RotationConfig(CombatType.PvE, Name = "Use burst medicine in countdown")] + private bool OpenerBurstMeds { get; set; } = false; + + [RotationConfig(CombatType.PvE, Name = "Use burst medicine when available for midfight burst phase")] + private bool MidfightBurstMeds { get; set; } = false; #endregion private const float HYPERCHARGE_DURATION = 8f; @@ -19,7 +25,7 @@ public sealed class zMCH_Beta_2 : MachinistRotation // ReassemblePvE's duration is 5s, need to fire the first GCD before it ends if (remainTime < 5 && ReassemblePvE.CanUse(out var act)) return act; // tincture needs to be used on -2s exactly - if (remainTime <= 2 && UseBurstMedicine(out act)) return act; + if (OpenerBurstMeds && remainTime <= 2 && UseBurstMedicine(out act)) return act; return base.CountDownAction(remainTime); } #endregion @@ -28,6 +34,7 @@ public sealed class zMCH_Beta_2 : MachinistRotation // Determines emergency actions to take based on the next planned GCD action. protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) { + if (IsBurst && MidfightBurstMeds && !CombatElapsedLessGCD(10) && TimeForBurstMeds(out act, nextGCD)) return true; if (IsBurst) { @@ -241,6 +248,13 @@ private bool CanUseQueenMeow(out IAction? act, IAction nextGCD) // Check for not burning Hypercharge below level 52 on AOE private bool LowLevelHyperCheck => !AutoCrossbowPvE.EnoughLevel && SpreadShotPvE.CanUse(out _); + private bool TimeForBurstMeds(out IAction? act, IAction nextGCD) + { + if (AirAnchorPvE.Cooldown.WillHaveOneChargeGCD(2) && BarrelStabilizerPvE.Cooldown.WillHaveOneChargeGCD(6) && WildfirePvE.Cooldown.WillHaveOneChargeGCD(6)) return UseBurstMedicine(out act); + act = null; + return false; + } + // Keeps Ricochet and Gauss Cannon Even private bool IsRicochetMore => RicochetPvE.EnoughLevel && GaussRoundPvE.Cooldown.RecastTimeElapsed <= RicochetPvE.Cooldown.RecastTimeElapsed; #endregion From fb80846b2db1ec9dd1482e33340e007666516dc1 Mon Sep 17 00:00:00 2001 From: Karaha-Baruha Date: Thu, 26 Sep 2024 19:48:08 -0500 Subject: [PATCH 3/7] keep wildfire ogcd spot open and use in last half of gcd --- BasicRotations/Ranged/zMCH_Beta.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BasicRotations/Ranged/zMCH_Beta.cs b/BasicRotations/Ranged/zMCH_Beta.cs index 718f0f5..4543adf 100644 --- a/BasicRotations/Ranged/zMCH_Beta.cs +++ b/BasicRotations/Ranged/zMCH_Beta.cs @@ -81,7 +81,12 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) // Burst if (IsBurst) { - if ((IsLastAbility(false, HyperchargePvE) || Heat >= 50 || Player.HasStatus(true, StatusID.Hypercharged)) && ToolChargeSoon(out _) && !LowLevelHyperCheck && WildfirePvE.CanUse(out act)) return true; + if ((IsLastAbility(false, HyperchargePvE) || Heat >= 50 || Player.HasStatus(true, StatusID.Hypercharged)) && ToolChargeSoon(out _) && !LowLevelHyperCheck) + { + if (WeaponRemain < 1.25f && WildfirePvE.CanUse(out act)) return true; + } + act = null; + return false; } // Use Hypercharge if wildfire will not be up in 30 seconds or if you hit 100 heat if (!LowLevelHyperCheck && !Player.HasStatus(true, StatusID.Reassembled) && (!WildfirePvE.Cooldown.WillHaveOneCharge(30) || (Heat == 100))) From d87f73bb8a4db312d70963f276e9b87f0dbdfaed Mon Sep 17 00:00:00 2001 From: Karaha-Baruha Date: Thu, 26 Sep 2024 20:03:27 -0500 Subject: [PATCH 4/7] derp --- BasicRotations/Ranged/zMCH_Beta.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BasicRotations/Ranged/zMCH_Beta.cs b/BasicRotations/Ranged/zMCH_Beta.cs index 4543adf..5f11661 100644 --- a/BasicRotations/Ranged/zMCH_Beta.cs +++ b/BasicRotations/Ranged/zMCH_Beta.cs @@ -84,9 +84,10 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) if ((IsLastAbility(false, HyperchargePvE) || Heat >= 50 || Player.HasStatus(true, StatusID.Hypercharged)) && ToolChargeSoon(out _) && !LowLevelHyperCheck) { if (WeaponRemain < 1.25f && WildfirePvE.CanUse(out act)) return true; + act = null; + return false; } - act = null; - return false; + } // Use Hypercharge if wildfire will not be up in 30 seconds or if you hit 100 heat if (!LowLevelHyperCheck && !Player.HasStatus(true, StatusID.Reassembled) && (!WildfirePvE.Cooldown.WillHaveOneCharge(30) || (Heat == 100))) From 14b334e9e14dd1fd08466e60a069023be1c2111c Mon Sep 17 00:00:00 2001 From: Karaha-Baruha Date: Thu, 26 Sep 2024 20:06:59 -0500 Subject: [PATCH 5/7] HC/WF over queen --- BasicRotations/Ranged/zMCH_Beta.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BasicRotations/Ranged/zMCH_Beta.cs b/BasicRotations/Ranged/zMCH_Beta.cs index 5f11661..43e86d0 100644 --- a/BasicRotations/Ranged/zMCH_Beta.cs +++ b/BasicRotations/Ranged/zMCH_Beta.cs @@ -75,9 +75,6 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) if (IsBurst && BSPrio && BarrelStabilizerPvE.CanUse(out act)) return true; - // Rook Autoturret/Queen Logic - if (CanUseQueenMeow(out act, nextGCD)) return true; - // Burst if (IsBurst) { @@ -95,6 +92,9 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) if ((!HoldHCForCombo || !(LiveComboTime <= 8f && LiveComboTime > 0f)) && ToolChargeSoon(out act)) return true; } + // Rook Autoturret/Queen Logic + if (CanUseQueenMeow(out act, nextGCD)) return true; + // Use Ricochet and Gauss if (isRicochetMore && RicochetPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; if (GaussRoundPvE.CanUse(out act, usedUp: true, skipAoeCheck: true)) return true; From 339cdd89add351041c9c2869f41934b48c213ab5 Mon Sep 17 00:00:00 2001 From: Karaha-Baruha Date: Thu, 26 Sep 2024 22:04:21 -0500 Subject: [PATCH 6/7] once more with feeling --- BasicRotations/Ranged/zMCH_Beta.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/BasicRotations/Ranged/zMCH_Beta.cs b/BasicRotations/Ranged/zMCH_Beta.cs index 43e86d0..b4b58a2 100644 --- a/BasicRotations/Ranged/zMCH_Beta.cs +++ b/BasicRotations/Ranged/zMCH_Beta.cs @@ -28,8 +28,7 @@ public sealed class zMCH_Beta : MachinistRotation { // ReassemblePvE's duration is 5s, need to fire the first GCD before it ends if (remainTime < 5 && ReassemblePvE.CanUse(out var act)) return act; - // tincture needs to be used on -2s exactly - if (IsBurst && OpenerBurstMeds && remainTime <= 2 && UseBurstMedicine(out act)) return act; + if (IsBurst && OpenerBurstMeds && remainTime <= 1f && UseBurstMedicine(out act)) return act; return base.CountDownAction(remainTime); } #endregion @@ -78,7 +77,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) // Burst if (IsBurst) { - if ((IsLastAbility(false, HyperchargePvE) || Heat >= 50 || Player.HasStatus(true, StatusID.Hypercharged)) && ToolChargeSoon(out _) && !LowLevelHyperCheck) + if (WildfirePvE.Cooldown.WillHaveOneChargeGCD(1) && (IsLastAbility(false, HyperchargePvE) || Heat >= 50 || Player.HasStatus(true, StatusID.Hypercharged)) && ToolChargeSoon(out _) && !LowLevelHyperCheck) { if (WeaponRemain < 1.25f && WildfirePvE.CanUse(out act)) return true; act = null; @@ -189,7 +188,7 @@ private bool ToolChargeSoon(out IAction? act) private bool TimeForBurstMeds(out IAction? act, IAction nextGCD) { - if (AirAnchorPvE.Cooldown.WillHaveOneChargeGCD(2) && BarrelStabilizerPvE.Cooldown.WillHaveOneChargeGCD(6) && WildfirePvE.Cooldown.WillHaveOneChargeGCD(6)) return UseBurstMedicine(out act); + if (AirAnchorPvE.Cooldown.WillHaveOneCharge(2) && BarrelStabilizerPvE.Cooldown.WillHaveOneChargeGCD(6) && WildfirePvE.Cooldown.WillHaveOneChargeGCD(6)) return UseBurstMedicine(out act); act = null; return false; } From f6262fd3af7380e94d6c34e5fba58a7eb1a5eee4 Mon Sep 17 00:00:00 2001 From: Karaha-Baruha Date: Thu, 26 Sep 2024 22:04:21 -0500 Subject: [PATCH 7/7] once more with feeling --- BasicRotations/Ranged/zMCH_Beta.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/BasicRotations/Ranged/zMCH_Beta.cs b/BasicRotations/Ranged/zMCH_Beta.cs index 43e86d0..7af6b88 100644 --- a/BasicRotations/Ranged/zMCH_Beta.cs +++ b/BasicRotations/Ranged/zMCH_Beta.cs @@ -28,8 +28,7 @@ public sealed class zMCH_Beta : MachinistRotation { // ReassemblePvE's duration is 5s, need to fire the first GCD before it ends if (remainTime < 5 && ReassemblePvE.CanUse(out var act)) return act; - // tincture needs to be used on -2s exactly - if (IsBurst && OpenerBurstMeds && remainTime <= 2 && UseBurstMedicine(out act)) return act; + if (IsBurst && OpenerBurstMeds && remainTime <= 1f && UseBurstMedicine(out act)) return act; return base.CountDownAction(remainTime); } #endregion @@ -78,7 +77,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) // Burst if (IsBurst) { - if ((IsLastAbility(false, HyperchargePvE) || Heat >= 50 || Player.HasStatus(true, StatusID.Hypercharged)) && ToolChargeSoon(out _) && !LowLevelHyperCheck) + if (WildfirePvE.Cooldown.WillHaveOneChargeGCD(1) && (IsLastAbility(false, HyperchargePvE) || Heat >= 50 || Player.HasStatus(true, StatusID.Hypercharged)) && ToolChargeSoon(out _) && !LowLevelHyperCheck) { if (WeaponRemain < 1.25f && WildfirePvE.CanUse(out act)) return true; act = null; @@ -189,7 +188,7 @@ private bool ToolChargeSoon(out IAction? act) private bool TimeForBurstMeds(out IAction? act, IAction nextGCD) { - if (AirAnchorPvE.Cooldown.WillHaveOneChargeGCD(2) && BarrelStabilizerPvE.Cooldown.WillHaveOneChargeGCD(6) && WildfirePvE.Cooldown.WillHaveOneChargeGCD(6)) return UseBurstMedicine(out act); + if (AirAnchorPvE.Cooldown.WillHaveOneChargeGCD(1) && BarrelStabilizerPvE.Cooldown.WillHaveOneChargeGCD(6) && WildfirePvE.Cooldown.WillHaveOneChargeGCD(6)) return UseBurstMedicine(out act); act = null; return false; }