From e4be523e4fb8dc9013c3890a021ee36733f341ad Mon Sep 17 00:00:00 2001 From: Tykku Date: Thu, 2 May 2024 17:12:03 -0400 Subject: [PATCH] war bug fix with mch --- BasicRotations/Magical/BLM_Beta.cs | 378 ------------------ .../Magical/{SMN_Beta.cs => SMN_zBeta.cs} | 4 +- .../Melee/{DRG_Beta.cs => DRG_zBeta.cs} | 4 +- .../Melee/{NIN_Beta.cs => NIN_zBeta.cs} | 4 +- .../Melee/{SAM_Beta.cs => SAM_zBeta.cs} | 4 +- .../Ranged/{MCH_Beta.cs => MCH_zBeta.cs} | 8 +- .../Tank/{DRK_Beta.cs => DRK_zBeta.cs} | 4 +- .../Tank/{WAR_Beta.cs => WAR_zBeta.cs} | 6 +- 8 files changed, 17 insertions(+), 395 deletions(-) delete mode 100644 BasicRotations/Magical/BLM_Beta.cs rename BasicRotations/Magical/{SMN_Beta.cs => SMN_zBeta.cs} (98%) rename BasicRotations/Melee/{DRG_Beta.cs => DRG_zBeta.cs} (97%) rename BasicRotations/Melee/{NIN_Beta.cs => NIN_zBeta.cs} (99%) rename BasicRotations/Melee/{SAM_Beta.cs => SAM_zBeta.cs} (97%) rename BasicRotations/Ranged/{MCH_Beta.cs => MCH_zBeta.cs} (97%) rename BasicRotations/Tank/{DRK_Beta.cs => DRK_zBeta.cs} (98%) rename BasicRotations/Tank/{WAR_Beta.cs => WAR_zBeta.cs} (98%) diff --git a/BasicRotations/Magical/BLM_Beta.cs b/BasicRotations/Magical/BLM_Beta.cs deleted file mode 100644 index 81d7120..0000000 --- a/BasicRotations/Magical/BLM_Beta.cs +++ /dev/null @@ -1,378 +0,0 @@ -namespace DefaultRotations.Magical; - -[Rotation("Beta Rotations", CombatType.PvE, GameVersion = "6.58")] -[SourceCode(Path = "main/DefaultRotations/Magical/BLM_Beta.cs")] -[Api(1)] -public class BLM_Beta : BlackMageRotation -{ - #region Config Options - [RotationConfig(CombatType.PvE, Name = "Use Transpose to Astral Fire before Paradox")] - public bool UseTransposeForParadox { get; set; } = true; - - [RotationConfig(CombatType.PvE, Name = "Extend Astral Fire Time Safely")] - public bool ExtendTimeSafely { get; set; } = false; - - [RotationConfig(CombatType.PvE, Name = @"Use ""Double Paradox"" rotation [N15]")] - public bool UseN15 { get; set; } = false; - #endregion - - #region Countdown Logic - protected override IAction? CountDownAction(float remainTime) - { - IAction act; - if (remainTime < FireIiiPvE.Info.CastTime + CountDownAhead) - { - if (FireIiiPvE.CanUse(out act)) return act; - } - if (remainTime <= 12 && SharpcastPvE.CanUse(out act, usedUp: true)) return act; - return base.CountDownAction(remainTime); - } - #endregion - - #region oGCD Logic - protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) - { - //To Fire - if (CurrentMp >= 7200 && UmbralIceStacks == 2 && ParadoxPvE.EnoughLevel) - { - if ((HasFire || HasSwift) && TransposePvE.CanUse(out act, onLastAbility: true)) return true; - } - if (nextGCD.IsTheSameTo(false, FireIiiPvE) && HasFire) - { - if (TransposePvE.CanUse(out act)) return true; - } - - //Using Manafont - if (InAstralFire) - { - if (CurrentMp == 0 && ManafontPvE.CanUse(out act)) return true; - //To Ice - if (NeedToTransposeGoIce(true) && TransposePvE.CanUse(out act)) return true; - } - - return base.EmergencyAbility(nextGCD, out act); - } - - protected override bool AttackAbility(IAction nextGCD, out IAction? act) - { - if (IsBurst && UseBurstMedicine(out act)) return true; - if (InUmbralIce) - { - if (UmbralIceStacks == 2 && !HasFire - && !IsLastGCD(ActionID.ParadoxPvE)) - { - if (SwiftcastPvE.CanUse(out act)) return true; - if (TriplecastPvE.CanUse(out act, usedUp: true)) return true; - } - - if (UmbralIceStacks < 3 && LucidDreamingPvE.CanUse(out act)) return true; - if (SharpcastPvE.CanUse(out act, usedUp: true)) return true; - } - if (InAstralFire) - { - if (!CombatElapsedLess(6) && CombatElapsedLess(9) && LeyLinesPvE.CanUse(out act)) return true; - if (TriplecastPvE.CanUse(out act, gcdCountForAbility: 5)) return true; - } - if (AmplifierPvE.CanUse(out act)) return true; - return base.AttackAbility(nextGCD, out act); - } - #endregion - - #region GCD Logic - protected override bool GeneralGCD(out IAction? act) - { - if (InFireOrIce(out act, out var mustGo)) return true; - if (mustGo) return false; - //Triplecast for moving. - if (IsMoving && HasHostilesInRange && TriplecastPvE.CanUse(out act, usedUp: true, skipClippingCheck: true)) return true; - - if (AddElementBase(out act)) return true; - if (ScathePvE.CanUse(out act)) return true; - if (MaintainStatus(out act)) return true; - - return base.GeneralGCD(out act); - } - #endregion - - #region Ice Logic - private bool GoIce(out IAction? act) - { - act = null; - - if (!NeedToGoIce) return false; - - //Use Manafont or transpose. - if ((!ManafontPvE.Cooldown.IsCoolingDown || NeedToTransposeGoIce(false)) - && UseInstanceSpell(out act)) return true; - - //Go to Ice. - if (BlizzardIiPvE.CanUse(out act)) return true; - if (BlizzardIiiPvE.CanUse(out act)) return true; - if (TransposePvE.CanUse(out act)) return true; - if (BlizzardPvE.CanUse(out act)) return true; - return false; - } - - private bool MaintainIce(out IAction? act) - { - act = null; - if (UmbralIceStacks == 1) - { - if (BlizzardIiPvE.CanUse(out act)) return true; - - if (Player.Level == 90 && BlizzardPvE.CanUse(out act)) return true; - if (BlizzardIiiPvE.CanUse(out act)) return true; - } - if (UmbralIceStacks == 2 && Player.Level < 90) - { - if (BlizzardIiPvE.CanUse(out act)) return true; - if (BlizzardPvE.CanUse(out act)) return true; - } - return false; - } - - private bool DoIce(out IAction? act) - { - if (IsLastAction(ActionID.UmbralSoulPvE, ActionID.TransposePvE) - && IsParadoxActive && BlizzardPvE.CanUse(out act)) return true; - - if (UmbralIceStacks == 3 && UsePolyglot(out act)) return true; - - //Add Hearts - if (UmbralIceStacks == 3 && - BlizzardIvPvE.EnoughLevel && UmbralHearts < 3 && !IsLastGCD - (ActionID.BlizzardIvPvE, ActionID.FreezePvE)) - { - if (FreezePvE.CanUse(out act)) return true; - if (BlizzardIvPvE.CanUse(out act)) return true; - } - - if (AddThunder(out act, 5)) return true; - if (UmbralIceStacks == 2 && UsePolyglot(out act, 0)) return true; - - if (IsParadoxActive) - { - if (BlizzardPvE.CanUse(out act)) return true; - } - - if (BlizzardIiPvE.CanUse(out act)) return true; - if (BlizzardIvPvE.CanUse(out act)) return true; - if (BlizzardPvE.CanUse(out act)) return true; - return false; - } - #endregion - - #region Fire Logic - private bool GoFire(out IAction? act) - { - act = null; - - //Transpose line - if (UmbralIceStacks < 3) return false; - - //Need more MP - if (CurrentMp < 9600) return false; - - if (IsParadoxActive) - { - if (BlizzardPvE.CanUse(out act)) return true; - } - - //Go to Fire. - if (FireIiPvE.CanUse(out act)) return true; - if (FireIiiPvE.CanUse(out act)) return true; - if (TransposePvE.CanUse(out act)) return true; - if (FirePvE.CanUse(out act)) return true; - - return false; - } - - private bool MaintainFire(out IAction? act) - { - act = null; - switch (AstralFireStacks) - { - case 1: - if (FireIiPvE.CanUse(out act)) return true; - if (UseN15) - { - if (HasFire && FireIiiPvE.CanUse(out act)) return true; - if (IsParadoxActive && FirePvE.CanUse(out act)) return true; - } - if (FireIiiPvE.CanUse(out act)) return true; - break; - case 2: - if (FireIiPvE.CanUse(out act)) return true; - if (FirePvE.CanUse(out act)) return true; - break; - } - - if (ElementTimeEndAfterGCD(ExtendTimeSafely ? 3u : 2u)) - { - if (CurrentMp >= FirePvE.Info.MPNeed * 2 + 800 && FirePvE.CanUse(out act)) return true; - if (FlarePvE.CanUse(out act)) return true; - if (DespairPvE.CanUse(out act)) return true; - } - - return false; - } - - private bool DoFire(out IAction? act) - { - if (UsePolyglot(out act)) return true; - - // Add thunder only at combat start. - if (CombatElapsedLess(5)) - { - if (AddThunder(out act, 0)) return true; - } - - if (TriplecastPvE.CanUse(out act, skipClippingCheck: true)) return true; - - if (AddThunder(out act, 0) && Player.WillStatusEndGCD(1, 0, true, - StatusID.Thundercloud)) return true; - - if (UmbralHearts < 2 && FlarePvE.CanUse(out act)) return true; - if (FireIiPvE.CanUse(out act)) return true; - - if (CurrentMp >= FirePvE.Info.MPNeed + 800) - { - if (FireIvPvE.EnoughLevel) - { - if (FireIvPvE.CanUse(out act)) return true; - } - else if (HasFire) - { - if (FireIiiPvE.CanUse(out act)) return true; - } - if (FirePvE.CanUse(out act)) return true; - } - - if (DespairPvE.CanUse(out act)) return true; - - return false; - } - #endregion - - #region Extra Methods - private bool InFireOrIce(out IAction? act, out bool mustGo) - { - act = null; - mustGo = false; - if (InUmbralIce) - { - if (GoFire(out act)) return true; - if (MaintainIce(out act)) return true; - if (DoIce(out act)) return true; - } - if (InAstralFire) - { - if (GoIce(out act)) return true; - if (MaintainFire(out act)) return true; - if (DoFire(out act)) return true; - } - return false; - } - private bool UseInstanceSpell(out IAction? act) - { - if (UsePolyglot(out act)) return true; - if (HasThunder && AddThunder(out act, 1)) return true; - if (UsePolyglot(out act, 0)) return true; - return false; - } - - private bool AddThunder(out IAction? act, uint gcdCount = 3) - { - act = null; - //Return if just used. - if (IsLastGCD(ActionID.ThunderPvE, ActionID.ThunderIiPvE, ActionID.ThunderIiiPvE, ActionID.ThunderIvPvE)) return false; - - //So long for thunder. - if (ThunderPvE.CanUse(out _) && (!ThunderPvE.Target.Target?.WillStatusEndGCD(gcdCount, 0, true, - StatusID.Thunder, StatusID.ThunderIi, StatusID.ThunderIii, StatusID.ThunderIv) ?? false)) - return false; - - if (ThunderIiPvE.CanUse(out act)) return true; - if (ThunderPvE.CanUse(out act)) return true; - - return false; - } - - private bool AddElementBase(out IAction? act) - { - if (CurrentMp >= 7200) - { - if (FireIiPvE.CanUse(out act)) return true; - if (FireIiiPvE.CanUse(out act)) return true; - if (FirePvE.CanUse(out act)) return true; - } - else - { - if (BlizzardIiPvE.CanUse(out act)) return true; - if (BlizzardIiiPvE.CanUse(out act)) return true; - if (BlizzardPvE.CanUse(out act)) return true; - } - return false; - } - - private bool UsePolyglot(out IAction? act, uint gcdCount = 3) - { - act = null; - - if (gcdCount == 0 || IsPolyglotStacksMaxed && EnchinaEndAfterGCD(gcdCount)) - { - if (FoulPvE.CanUse(out act)) return true; - if (XenoglossyPvE.CanUse(out act)) return true; - } - return false; - } - - private bool MaintainStatus(out IAction? act) - { - act = null; - if (CombatElapsedLess(6)) return false; - if (UmbralSoulPvE.CanUse(out act)) return true; - if (InAstralFire && TransposePvE.CanUse(out act)) return true; - if (UseTransposeForParadox && - InUmbralIce && !IsParadoxActive && UmbralIceStacks == 3 - && TransposePvE.CanUse(out act)) return true; - - return false; - } - private bool NeedToGoIce - { - get - { - //Can use Despair. - if (DespairPvE.EnoughLevel && CurrentMp >= DespairPvE.Info.MPNeed) return false; - - //Can use Fire1 - if (FirePvE.EnoughLevel && CurrentMp >= FirePvE.Info.MPNeed) return false; - - return true; - } - } - - private bool NeedToTransposeGoIce(bool usedOne) - { - if (!NeedToGoIce) return false; - if (!ParadoxPvE.EnoughLevel) return false; - var compare = usedOne ? -1 : 0; - var count = PolyglotStacks; - if (count == compare++) return false; - if (count == compare++ && !EnchinaEndAfterGCD(2)) return false; - if (count >= compare && (HasFire || SwiftcastPvE.Cooldown.WillHaveOneChargeGCD(2) || TriplecastPvE.Cooldown.WillHaveOneChargeGCD(2))) return true; - if (!HasFire && !SwiftcastPvE.Cooldown.WillHaveOneChargeGCD(2) && !TriplecastPvE.CanUse(out _, gcdCountForAbility: 8)) return false; - return true; - } - - [RotationDesc(ActionID.BetweenTheLinesPvE, ActionID.LeyLinesPvE)] - protected override bool HealSingleAbility(IAction nextGCD, out IAction? act) - { - if (BetweenTheLinesPvE.CanUse(out act)) return true; - if (LeyLinesPvE.CanUse(out act)) return true; - - return base.HealSingleAbility(nextGCD, out act); - } - #endregion -} \ No newline at end of file diff --git a/BasicRotations/Magical/SMN_Beta.cs b/BasicRotations/Magical/SMN_zBeta.cs similarity index 98% rename from BasicRotations/Magical/SMN_Beta.cs rename to BasicRotations/Magical/SMN_zBeta.cs index 86bedc0..a74745e 100644 --- a/BasicRotations/Magical/SMN_Beta.cs +++ b/BasicRotations/Magical/SMN_zBeta.cs @@ -3,9 +3,9 @@ namespace DefaultRotations.Magical; [Rotation("Beta", CombatType.PvE, GameVersion = "6.58")] -[SourceCode(Path = "main/DefaultRotations/Magical/SMN_Beta.cs")] +[SourceCode(Path = "main/DefaultRotations/Magical/SMN_zBeta.cs")] [Api(1)] -public sealed class SMN_Beta : SummonerRotation +public sealed class SMN_zBeta : SummonerRotation { #region Config Options public enum SwiftType : byte diff --git a/BasicRotations/Melee/DRG_Beta.cs b/BasicRotations/Melee/DRG_zBeta.cs similarity index 97% rename from BasicRotations/Melee/DRG_Beta.cs rename to BasicRotations/Melee/DRG_zBeta.cs index b81ef75..1224f22 100644 --- a/BasicRotations/Melee/DRG_Beta.cs +++ b/BasicRotations/Melee/DRG_zBeta.cs @@ -1,10 +1,10 @@ namespace DefaultRotations.Melee; [Rotation("Beta", CombatType.PvE, GameVersion = "6.58")] -[SourceCode(Path = "main/DefaultRotations/Melee/DRG_Beta.cs")] +[SourceCode(Path = "main/DefaultRotations/Melee/DRG_zBeta.cs")] [Api(1)] -public sealed class DRG_Beta : DragoonRotation +public sealed class DRG_zBeta : DragoonRotation { #region Config Options [RotationDesc(ActionID.SpineshatterDivePvE, ActionID.DragonfireDivePvE)] diff --git a/BasicRotations/Melee/NIN_Beta.cs b/BasicRotations/Melee/NIN_zBeta.cs similarity index 99% rename from BasicRotations/Melee/NIN_Beta.cs rename to BasicRotations/Melee/NIN_zBeta.cs index 5f70ec5..cc18acb 100644 --- a/BasicRotations/Melee/NIN_Beta.cs +++ b/BasicRotations/Melee/NIN_zBeta.cs @@ -1,9 +1,9 @@ namespace DefaultRotations.Melee; [Rotation("NIN Beta Rotation", CombatType.PvE, GameVersion = "6.58")] -[SourceCode(Path = "main/DefaultRotations/Melee/NIN_Beta.cs")] +[SourceCode(Path = "main/DefaultRotations/Melee/NIN_zBeta.cs")] [Api(1)] -public sealed class NIN_Beta : NinjaRotation +public sealed class NIN_zBeta : NinjaRotation { #region Config Options // Configuration properties for rotation behavior. diff --git a/BasicRotations/Melee/SAM_Beta.cs b/BasicRotations/Melee/SAM_zBeta.cs similarity index 97% rename from BasicRotations/Melee/SAM_Beta.cs rename to BasicRotations/Melee/SAM_zBeta.cs index 21b2335..c46ce7a 100644 --- a/BasicRotations/Melee/SAM_Beta.cs +++ b/BasicRotations/Melee/SAM_zBeta.cs @@ -1,9 +1,9 @@ namespace DefaultRotations.Melee; [Rotation("Beta", CombatType.PvE, GameVersion = "6.58")] -[SourceCode(Path = "main/DefaultRotations/Melee/SAM_Beta.cs")] +[SourceCode(Path = "main/DefaultRotations/Melee/SAM_zBeta.cs")] [Api(1)] -public sealed class SAM_Beta : SamuraiRotation +public sealed class SAM_zBeta : SamuraiRotation { #region Config Options diff --git a/BasicRotations/Ranged/MCH_Beta.cs b/BasicRotations/Ranged/MCH_zBeta.cs similarity index 97% rename from BasicRotations/Ranged/MCH_Beta.cs rename to BasicRotations/Ranged/MCH_zBeta.cs index a86eb52..95a9619 100644 --- a/BasicRotations/Ranged/MCH_Beta.cs +++ b/BasicRotations/Ranged/MCH_zBeta.cs @@ -1,9 +1,9 @@ namespace DefaultRotations.Ranged; [Rotation("Beta", CombatType.PvE, GameVersion = "6.58", Description = "Additonal contributions to this rotation thanks to Toshi!")] -[SourceCode(Path = "main/DefaultRotations/Ranged/MCH_Beta.cs")] +[SourceCode(Path = "main/DefaultRotations/Ranged/MCH_zBeta.cs")] [Api(1)] -public sealed class MCH_Beta : MachinistRotation +public sealed class MCH_zBeta : MachinistRotation { #region Config Options [RotationConfig(CombatType.PvE, Name = "Uses Rook Autoturret/Automaton Queen immediately whenever you get 50 battery")] @@ -88,7 +88,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) // If Wildfire is active, use Hypercharge.....Period if (Player.HasStatus(true, StatusID.Wildfire_1946)) { - return HyperchargePvE.CanUse(out act, skipClippingCheck: true); + return HyperchargePvE.CanUse(out act, skipClippingCheck: true, skipComboCheck: true); } // Burst if (IsBurst) @@ -97,7 +97,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) { if ((IsLastAbility(false, HyperchargePvE) || Heat >= 50) && !CombatElapsedLess(10) && CanUseHyperchargePvE(out _) - && WildfirePvE.CanUse(out act, onLastAbility: true, skipComboCheck: true)) return true; + && !LowLevelHyperCheck && WildfirePvE.CanUse(out act, onLastAbility: true, skipComboCheck: true)) return true; } } // Use Hypercharge if at least 12 seconds of combat and (if wildfire will not be up in 30 seconds or if you hit 100 heat) diff --git a/BasicRotations/Tank/DRK_Beta.cs b/BasicRotations/Tank/DRK_zBeta.cs similarity index 98% rename from BasicRotations/Tank/DRK_Beta.cs rename to BasicRotations/Tank/DRK_zBeta.cs index 61014cc..62652f0 100644 --- a/BasicRotations/Tank/DRK_Beta.cs +++ b/BasicRotations/Tank/DRK_zBeta.cs @@ -1,9 +1,9 @@ namespace DefaultRotations.Tank; [Rotation("Beta", CombatType.PvE, GameVersion = "6.58")] -[SourceCode(Path = "main/DefaultRotations/Tank/DRK_Beta.cs")] +[SourceCode(Path = "main/DefaultRotations/Tank/DRK_zBeta.cs")] [Api(1)] -public sealed class DRK_Beta : DarkKnightRotation +public sealed class DRK_zBeta : DarkKnightRotation { #region Config Options [RotationConfig(CombatType.PvE, Name = "Keep at least 3000 MP")] diff --git a/BasicRotations/Tank/WAR_Beta.cs b/BasicRotations/Tank/WAR_zBeta.cs similarity index 98% rename from BasicRotations/Tank/WAR_Beta.cs rename to BasicRotations/Tank/WAR_zBeta.cs index c9afd8d..1e0d143 100644 --- a/BasicRotations/Tank/WAR_Beta.cs +++ b/BasicRotations/Tank/WAR_zBeta.cs @@ -1,9 +1,9 @@ namespace DefaultRotations.Tank; [Rotation("Beta", CombatType.PvE, GameVersion = "6.58")] -[SourceCode(Path = "main/DefaultRotations/Tank/WAR_Beta.cs")] +[SourceCode(Path = "main/DefaultRotations/Tank/WAR_zBeta.cs")] [Api(1)] -public sealed class WAR_Beta : WarriorRotation +public sealed class WAR_zBeta : WarriorRotation { #region Config Options [RotationConfig(CombatType.PvE, Name = "Only use Nascent Flash if Tank Stance is off")] @@ -137,7 +137,7 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act) #region GCD Logic protected override bool GeneralGCD(out IAction? act) { - if (IsLastAction(true, BerserkPvE)) + if (IsLastAction(false, InnerReleasePvE)) { if (FellCleavePvE.CanUse(out act, skipStatusProvideCheck: true)) return true; }