diff --git a/BasicRotations/Ranged/MCH_Default.cs b/BasicRotations/Ranged/MCH_Default.cs index 0c791a9..f795372 100644 --- a/BasicRotations/Ranged/MCH_Default.cs +++ b/BasicRotations/Ranged/MCH_Default.cs @@ -28,49 +28,49 @@ public sealed class MCH_Default : MachinistRotation #region oGCD Logic // Determines emergency actions to take based on the next planned GCD action. -protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) -{ - // Reassemble Logic - // Check next GCD action and conditions for Reassemble. - bool isReassembleUsable = - //Reassemble current # of charges and double proc protection - ReassemblePvE.Cooldown.CurrentCharges > 0 && !Player.HasStatus(true, StatusID.Reassembled) && - //Chainsaw Level Check and NextGCD Check - ((ChainSawPvE.EnoughLevel && nextGCD.IsTheSameTo(true, ChainSawPvE)) || - //AirAnchor Logic - (AirAnchorPvE.EnoughLevel && nextGCD.IsTheSameTo(true, AirAnchorPvE)) || - //Drill Logic - (DrillPvE.EnoughLevel && !ChainSawPvE.EnoughLevel && nextGCD.IsTheSameTo(true, DrillPvE)) || - //Cleanshot Logic - (!DrillPvE.EnoughLevel && CleanShotPvE.EnoughLevel && nextGCD.IsTheSameTo(true, CleanShotPvE)) || - //HotShot Logic - (!CleanShotPvE.EnoughLevel && nextGCD.IsTheSameTo(true, HotShotPvE))); - - // Keeps Ricochet and Gauss cannon Even - bool isRicochetMore = RicochetPvE.EnoughLevel && GaussRoundPvE.Cooldown.CurrentCharges <= RicochetPvE.Cooldown.CurrentCharges; - bool isGaussMore = !RicochetPvE.EnoughLevel || GaussRoundPvE.Cooldown.CurrentCharges > RicochetPvE.Cooldown.CurrentCharges; - - // Attempt to use Reassemble if it's ready - if (isReassembleUsable) - { - if (ReassemblePvE.CanUse(out act, onLastAbility: true, skipClippingCheck: true, skipComboCheck: true, usedUp: true)) return true; - } - - // Use Ricochet - if (isRicochetMore && ((!IsLastAction(true, new[] { GaussRoundPvE, RicochetPvE }) && IsLastGCD(true, HeatBlastPvE)) || !IsLastGCD(true, HeatBlastPvE))) - { - if (RicochetPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) - return true; - } - - // Use Gauss - if (isGaussMore && ((!IsLastAction(true, new[] { GaussRoundPvE, RicochetPvE }) && IsLastGCD(true, HeatBlastPvE)) || !IsLastGCD(true, HeatBlastPvE))) + protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) { - if (GaussRoundPvE.CanUse(out act, usedUp: true)) - return true; + // Reassemble Logic + // Check next GCD action and conditions for Reassemble. + bool isReassembleUsable = + //Reassemble current # of charges and double proc protection + ReassemblePvE.Cooldown.CurrentCharges > 0 && !Player.HasStatus(true, StatusID.Reassembled) && + //Chainsaw Level Check and NextGCD Check + ((ChainSawPvE.EnoughLevel && nextGCD.IsTheSameTo(true, ChainSawPvE)) || + //AirAnchor Logic + (AirAnchorPvE.EnoughLevel && nextGCD.IsTheSameTo(true, AirAnchorPvE)) || + //Drill Logic + (DrillPvE.EnoughLevel && !ChainSawPvE.EnoughLevel && nextGCD.IsTheSameTo(true, DrillPvE)) || + //Cleanshot Logic + (!DrillPvE.EnoughLevel && CleanShotPvE.EnoughLevel && nextGCD.IsTheSameTo(true, CleanShotPvE)) || + //HotShot Logic + (!CleanShotPvE.EnoughLevel && nextGCD.IsTheSameTo(true, HotShotPvE))); + + // Keeps Ricochet and Gauss cannon Even + bool isRicochetMore = RicochetPvE.EnoughLevel && GaussRoundPvE.Cooldown.CurrentCharges <= RicochetPvE.Cooldown.CurrentCharges; + bool isGaussMore = !RicochetPvE.EnoughLevel || GaussRoundPvE.Cooldown.CurrentCharges > RicochetPvE.Cooldown.CurrentCharges; + + // Attempt to use Reassemble if it's ready + if (isReassembleUsable) + { + if (ReassemblePvE.CanUse(out act, onLastAbility: true, skipClippingCheck: true, skipComboCheck: true, usedUp: true)) return true; + } + + // Use Ricochet + if (isRicochetMore && ((!IsLastAction(true, new[] { GaussRoundPvE, RicochetPvE }) && IsLastGCD(true, HeatBlastPvE)) || !IsLastGCD(true, HeatBlastPvE))) + { + if (RicochetPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) + return true; + } + + // Use Gauss + if (isGaussMore && ((!IsLastAction(true, new[] { GaussRoundPvE, RicochetPvE }) && IsLastGCD(true, HeatBlastPvE)) || !IsLastGCD(true, HeatBlastPvE))) + { + if (GaussRoundPvE.CanUse(out act, usedUp: true)) + return true; + } + return base.EmergencyAbility(nextGCD, out act); } - return base.EmergencyAbility(nextGCD, out act); -} // Logic for using attack abilities outside of GCD, focusing on burst windows and cooldown management. protected override bool AttackAbility(IAction nextGCD, out IAction? act)