From 4c4ae2d5d6ce2350eafec84e5ff8bbc71d7c2f7e Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 31 Jul 2024 19:28:09 +0100 Subject: [PATCH 001/142] rebase --- XIVSlothCombo/Combos/CustomComboPreset.cs | 126 +--- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 274 +++++++++ XIVSlothCombo/Combos/PvE/MNK.cs | 591 +++---------------- XIVSlothCombo/Window/Functions/UserConfig.cs | 19 - XIVSlothCombo/XIVSlothCombo.cs | 2 +- 5 files changed, 355 insertions(+), 657 deletions(-) create mode 100644 XIVSlothCombo/Combos/JobHelpers/MNK.cs diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index ede613fdc..fc33a4eb6 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1834,133 +1834,13 @@ public enum CustomComboPreset #region MONK - [ReplaceSkill(MNK.ArmOfTheDestroyer)] - [CustomComboInfo("Arm of the Destroyer Combo", "Replaces Arm Of The Destroyer with its combo chain.", MNK.JobID)] - MNK_AoE_SimpleMode = 9000, - - [ReplaceSkill(MNK.DragonKick)] - [CustomComboInfo("Dragon Kick --> Bootshine Feature", "Replaces Dragon Kick with Bootshine if both a form and Leaden Fist are up.", MNK.JobID)] - MNK_DragonKick_Bootshine = 9001, - - [ReplaceSkill(MNK.TrueStrike)] - [CustomComboInfo("Twin Snakes Feature", "Replaces True Strike with Twin Snakes if Disciplined Fist is not applied or is less than 6 seconds from falling off.", MNK.JobID)] - MNK_TwinSnakes = 9011, - [ReplaceSkill(MNK.Bootshine)] - [ConflictingCombos(MNK_ST_SimpleMode)] [CustomComboInfo("Basic Rotation", "Basic Monk Combo on one button", MNK.JobID)] MNK_BasicCombo = 9002, - [ReplaceSkill(MNK.PerfectBalance)] - [CustomComboInfo("Perfect Balance Feature", "Perfect Balance becomes Masterful Blitz while you have 3 Beast Chakra.", MNK.JobID)] - MNK_PerfectBalance = 9003, - - [ReplaceSkill(MNK.DragonKick)] - [CustomComboInfo("Bootshine Balance Feature", "Replaces Dragon Kick with Masterful Blitz if you have 3 Beast Chakra.", MNK.JobID)] - MNK_BootshineBalance = 9004, - - [ReplaceSkill(MNK.HowlingFist, MNK.Enlightenment)] - [CustomComboInfo("Howling Fist/Meditation Feature", "Replaces Howling Fist/Enlightenment with Meditation when the Fifth Chakra is not open.", MNK.JobID)] - MNK_HowlingFistMeditation = 9005, - - [ReplaceSkill(MNK.Bootshine)] - [ConflictingCombos(MNK_BasicCombo)] - [CustomComboInfo("Bootshine Combo", "Replace Bootshine with its combo chain. \nIf all sub options are selected will turn into a full one button rotation (Simple Monk). Slider values can be used to control Disciplined Fist + Demolish uptime.", MNK.JobID, -2, "", "")] - MNK_ST_SimpleMode = 9006, - - [ReplaceSkill(MNK.MasterfulBlitz)] - [CustomComboInfo("Perfect Balance Feature Plus", "All of the (optimal?) Blitz combos on Masterful Blitz when Perfect Balance is active", MNK.JobID)] - MNK_PerfectBalance_Plus = 9007, - - [ParentCombo(MNK_ST_SimpleMode)] - [CustomComboInfo("Masterful Blitz on Main Combo", "Adds Masterful Blitz to the main combo", MNK.JobID)] - MNK_ST_Simple_MasterfulBlitz = 9008, - - [ParentCombo(MNK_AoE_SimpleMode)] - [CustomComboInfo("Masterful Blitz to AoE Combo", "Adds Masterful Blitz to the AoE combo.", MNK.JobID)] - MNK_AoE_Simple_MasterfulBlitz = 9009, - - [ReplaceSkill(MNK.RiddleOfFire)] - [CustomComboInfo("Riddle of Fire/Brotherhood Feature", "Replaces Riddle of Fire with Brotherhood when Riddle of Fire is on cooldown.", MNK.JobID)] - MNK_Riddle_Brotherhood = 9012, - - [ParentCombo(MNK_ST_SimpleMode)] - [CustomComboInfo("CDs on Main Combo", "Adds various CDs to the main combo when under Riddle of Fire or when Riddle of Fire is on cooldown.", MNK.JobID)] - MNK_ST_Simple_CDs = 9013, - - [ParentCombo(MNK_ST_Simple_CDs)] - [CustomComboInfo("Riddle of Wind on Main Combo", "Adds Riddle of Wind to the main combo.", MNK.JobID)] - MNK_ST_Simple_CDs_RiddleOfWind = 9014, - - [ParentCombo(MNK_ST_Simple_CDs)] - [CustomComboInfo("Perfect Balance on Main Combo", "Adds Perfect Balance to the main combo.", MNK.JobID)] - MNK_ST_Simple_CDs_PerfectBalance = 9015, - - [ParentCombo(MNK_ST_Simple_CDs)] - [CustomComboInfo("Brotherhood on Main Combo", "Adds Brotherhood to the main combo.", MNK.JobID)] - MNK_ST_Simple_CDs_Brotherhood = 9016, - - [ParentCombo(MNK_ST_SimpleMode)] - [CustomComboInfo("Meditation on Main Combo", "Adds Meditation spender to the main combo.", MNK.JobID)] - MNK_ST_Simple_Meditation = 9017, - - [ParentCombo(MNK_ST_SimpleMode)] - [CustomComboInfo("Lunar Solar Opener", "Start with the Lunar Solar Opener on the main combo. Requires level 68 for Riddle of Fire.\nA 1.93/1.94 GCD is highly recommended.", MNK.JobID)] - MNK_ST_Simple_LunarSolarOpener = 9018, - - [ParentCombo(MNK_AoE_SimpleMode)] - [CustomComboInfo("CDs on AoE Combo", "Adds various CDs to the AoE combo when under Riddle of Fire or when Riddle of Fire is on cooldown.", MNK.JobID)] - MNK_AoE_Simple_CDs = 9019, - - [ParentCombo(MNK_AoE_Simple_CDs)] - [CustomComboInfo("Riddle of Wind on AoE Combo", "Adds Riddle of Wind to the AoE combo.", MNK.JobID)] - MNK_AoE_Simple_CDs_RiddleOfWind = 9020, - - [ParentCombo(MNK_AoE_Simple_CDs)] - [CustomComboInfo("Perfect Balance on AoE Combo", "Adds Perfect Balance to the AoE combo.", MNK.JobID)] - MNK_AoE_Simple_CDs_PerfectBalance = 9021, - - [ParentCombo(MNK_AoE_Simple_CDs)] - [CustomComboInfo("Brotherhood on AoE Combo", "Adds Brotherhood to the AoE combo.", MNK.JobID)] - MNK_AoE_Simple_CDs_Brotherhood = 9022, - - [ParentCombo(MNK_AoE_SimpleMode)] - [CustomComboInfo("Meditation on AoE Combo", "Adds Meditation to the AoE combo.", MNK.JobID)] - MNK_AoE_Simple_Meditation = 9023, - - [ParentCombo(MNK_AoE_SimpleMode)] - [CustomComboInfo("Thunderclap on AoE Combo", "Adds Thunderclap when out of combat to the AoE combo.", MNK.JobID)] - MNK_AoE_Simple_Thunderclap = 9024, - - [ParentCombo(MNK_ST_SimpleMode)] - [CustomComboInfo("Thunderclap on Main Combo", "Adds Thunderclap when out of combat to the main combo.", MNK.JobID)] - MNK_ST_Simple_Thunderclap = 9025, - - [ParentCombo(MNK_ST_SimpleMode)] - [CustomComboInfo("Combo Heals Option", "Adds Bloodbath and Second Wind to the combo, using them when below the HP Percentage threshold.", MNK.JobID)] - MNK_ST_ComboHeals = 9026, - - [ParentCombo(MNK_AoE_SimpleMode)] - [CustomComboInfo("Combo Heals Option", "Adds Bloodbath and Second Wind to the combo, using them when below the HP Percentage threshold.", MNK.JobID)] - MNK_AoE_ComboHeals = 9027, - - [ParentCombo(MNK_ST_Simple_Meditation)] - [CustomComboInfo("Mediation Uptime Feature", "Replaces Main Combo with Mediation when you are out of range and out of opener/burst.", MNK.JobID)] - MNK_ST_Meditation_Uptime = 9028, - - [ParentCombo(MNK_ST_SimpleMode)] - [CustomComboInfo("Dynamic True North Option", "Adds True North to the main combo right before positionals if you aren't in the correct position for their bonuses.", MNK.JobID)] - MNK_TrueNorthDynamic = 9029, - - [Variant] - [VariantParent(MNK_ST_SimpleMode, MNK_AoE_SimpleMode)] - [CustomComboInfo("Cure Option", "Use Variant Cure when HP is below set threshold.", MNK.JobID)] - MNK_Variant_Cure = 9030, - - [Variant] - [VariantParent(MNK_ST_SimpleMode, MNK_AoE_SimpleMode)] - [CustomComboInfo("Rampart Option", "Use Variant Rampart on cooldown.", MNK.JobID)] - MNK_Variant_Rampart = 9031, + [ReplaceSkill(MNK.ArmOfTheDestroyer)] + [CustomComboInfo("Basic AOE Rotation", "Basic Monk AOE Combo on one button", MNK.JobID)] + MNK_BasicAOECombo = 9003, // Last value = 9031 diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs new file mode 100644 index 000000000..f7a6e44e5 --- /dev/null +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -0,0 +1,274 @@ +using Dalamud.Game.ClientState.JobGauge.Types; +using ECommons.DalamudServices; +using System.Linq; +using XIVSlothCombo.Combos.JobHelpers.Enums; +using XIVSlothCombo.Combos.PvE; +using XIVSlothCombo.CustomComboNS.Functions; +using XIVSlothCombo.Data; + +namespace XIVSlothCombo.Combos.JobHelpers +{ + //internal class MNKOpenerLogic : MNK + //{ + // private static bool HasCooldowns() + // { + // if (CustomComboFunctions.GetRemainingCharges(CheckMate) < 3) + // return false; + + // if (CustomComboFunctions.GetRemainingCharges(DoubleCheck) < 3) + // return false; + + // if (!CustomComboFunctions.ActionReady(Chainsaw)) + // return false; + + // if (!CustomComboFunctions.ActionReady(Wildfire)) + // return false; + + // if (!CustomComboFunctions.ActionReady(BarrelStabilizer)) + // return false; + + // if (!CustomComboFunctions.ActionReady(Excavator)) + // return false; + + // if (!CustomComboFunctions.ActionReady(FullMetalField)) + // return false; + + // return true; + // } + + // private static uint OpenerLevel => 100; + + // public uint PrePullStep = 0; + + // public uint OpenerStep = 0; + + // public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + + // private static bool CanOpener => HasCooldowns() && LevelChecked; + + // private OpenerState currentState = OpenerState.PrePull; + + // public OpenerState CurrentState + // { + // get + // { + // return currentState; + // } + // set + // { + // if (value != currentState) + // { + // if (value == OpenerState.PrePull) + // { + // Svc.Log.Debug($"Entered PrePull Opener"); + // } + // if (value == OpenerState.InOpener) OpenerStep = 1; + // if (value == OpenerState.OpenerFinished || value == OpenerState.FailedOpener) + // { + // if (value == OpenerState.FailedOpener) + // Svc.Log.Information($"Opener Failed at step {OpenerStep}"); + + // ResetOpener(); + // } + // if (value == OpenerState.OpenerFinished) Svc.Log.Information("Opener Finished"); + + // currentState = value; + // } + // } + // } + + // private bool DoPrePullSteps(ref uint actionID) + // { + // if (!LevelChecked) + // return false; + + // if (CanOpener && PrePullStep == 0) + // { + // PrePullStep = 1; + // } + + // if (!HasCooldowns()) + // { + // PrePullStep = 0; + // } + + // if (CurrentState == OpenerState.PrePull && PrePullStep > 0) + // { + // if (CustomComboFunctions.HasEffect(Buffs.Reassembled) && PrePullStep == 1) CurrentState = OpenerState.InOpener; + // else if (PrePullStep == 1) actionID = Reassemble; + + // if (ActionWatching.CombatActions.Count > 2 && CustomComboFunctions.InCombat()) + // CurrentState = OpenerState.FailedOpener; + + // return true; + // } + // PrePullStep = 0; + // return false; + // } + + // private bool DoOpener(ref uint actionID) + // { + // if (!LevelChecked) + // return false; + + // if (currentState == OpenerState.InOpener) + // { + // if (CustomComboFunctions.WasLastAction(AirAnchor) && OpenerStep == 1) OpenerStep++; + // else if (OpenerStep == 1) actionID = AirAnchor; + + // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 2) OpenerStep++; + // else if (OpenerStep == 2) actionID = CheckMate; + + // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 3) OpenerStep++; + // else if (OpenerStep == 3) actionID = DoubleCheck; + + // if (CustomComboFunctions.WasLastAction(Drill) && OpenerStep == 4) OpenerStep++; + // else if (OpenerStep == 4) actionID = Drill; + + // if (CustomComboFunctions.WasLastAction(BarrelStabilizer) && OpenerStep == 5) OpenerStep++; + // else if (OpenerStep == 5) actionID = BarrelStabilizer; + + // if (CustomComboFunctions.WasLastAction(Chainsaw) && OpenerStep == 6) OpenerStep++; + // else if (OpenerStep == 6) actionID = Chainsaw; + + // if (CustomComboFunctions.WasLastAction(Excavator) && OpenerStep == 7) OpenerStep++; + // else if (OpenerStep == 7) actionID = Excavator; + + // if (CustomComboFunctions.WasLastAction(AutomatonQueen) && OpenerStep == 8) OpenerStep++; + // else if (OpenerStep == 8) actionID = AutomatonQueen; + + // if (CustomComboFunctions.WasLastAction(Reassemble) && OpenerStep == 9) OpenerStep++; + // else if (OpenerStep == 9) actionID = Reassemble; + + // if (CustomComboFunctions.WasLastAction(Drill) && OpenerStep == 10) OpenerStep++; + // else if (OpenerStep == 10) actionID = Drill; + + // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 11) OpenerStep++; + // else if (OpenerStep == 11) actionID = CheckMate; + + // if (CustomComboFunctions.WasLastAction(Wildfire) && OpenerStep == 12) OpenerStep++; + // else if (OpenerStep == 12) actionID = Wildfire; + + // if (CustomComboFunctions.WasLastAction(FullMetalField) && OpenerStep == 13) OpenerStep++; + // else if (OpenerStep == 13) actionID = FullMetalField; + + // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 14) OpenerStep++; + // else if (OpenerStep == 14) actionID = DoubleCheck; + + // if (CustomComboFunctions.WasLastAction(Hypercharge) && OpenerStep == 15) OpenerStep++; + // else if (OpenerStep == 15) actionID = Hypercharge; + + // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 16) OpenerStep++; + // else if (OpenerStep == 16) actionID = BlazingShot; + + // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 17) OpenerStep++; + // else if (OpenerStep == 17) actionID = CheckMate; + + // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 18) OpenerStep++; + // else if (OpenerStep == 18) actionID = BlazingShot; + + // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 19) OpenerStep++; + // else if (OpenerStep == 19) actionID = DoubleCheck; + + // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 20) OpenerStep++; + // else if (OpenerStep == 20) actionID = BlazingShot; + + // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 21) OpenerStep++; + // else if (OpenerStep == 21) actionID = CheckMate; + + // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 22) OpenerStep++; + // else if (OpenerStep == 22) actionID = BlazingShot; + + // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 23) OpenerStep++; + // else if (OpenerStep == 23) actionID = DoubleCheck; + + // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 24) OpenerStep++; + // else if (OpenerStep == 24) actionID = BlazingShot; + + // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 25) OpenerStep++; + // else if (OpenerStep == 25) actionID = CheckMate; + + // if (CustomComboFunctions.WasLastAction(Drill) && OpenerStep == 26) OpenerStep++; + // else if (OpenerStep == 26) actionID = Drill; + + // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 27) OpenerStep++; + // else if (OpenerStep == 27) actionID = DoubleCheck; + + // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 28) OpenerStep++; + // else if (OpenerStep == 28) actionID = CheckMate; + + // if (CustomComboFunctions.WasLastAction(HeatedSplitShot) && OpenerStep == 29) OpenerStep++; + // else if (OpenerStep == 29) actionID = HeatedSplitShot; + + // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 30) OpenerStep++; + // else if (OpenerStep == 30) actionID = DoubleCheck; + + // if (CustomComboFunctions.WasLastAction(HeatedSlugShot) && OpenerStep == 31) OpenerStep++; + // else if (OpenerStep == 31) actionID = HeatedSlugShot; + + // if (CustomComboFunctions.WasLastAction(HeatedCleanShot) && OpenerStep == 32) CurrentState = OpenerState.OpenerFinished; + // else if (OpenerStep == 32) actionID = HeatedCleanShot; + + // if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) + // CurrentState = OpenerState.FailedOpener; + + // if (((actionID == CheckMate && CustomComboFunctions.GetRemainingCharges(CheckMate) < 3) || + // (actionID == Chainsaw && CustomComboFunctions.IsOnCooldown(Chainsaw)) || + // (actionID == Wildfire && CustomComboFunctions.IsOnCooldown(Wildfire)) || + // (actionID == BarrelStabilizer && CustomComboFunctions.IsOnCooldown(BarrelStabilizer)) || + // (actionID == BarrelStabilizer && CustomComboFunctions.IsOnCooldown(Excavator)) || + // (actionID == BarrelStabilizer && CustomComboFunctions.IsOnCooldown(FullMetalField)) || + // (actionID == DoubleCheck && CustomComboFunctions.GetRemainingCharges(DoubleCheck) < 3)) && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) + // { + // CurrentState = OpenerState.FailedOpener; + // return false; + // } + // return true; + // } + // return false; + // } + + // private void ResetOpener() + // { + // PrePullStep = 0; + // OpenerStep = 0; + // } + + // public bool DoFullOpener(ref uint actionID) + // { + // if (!LevelChecked) + // return false; + + // if (CurrentState == OpenerState.PrePull) + // if (DoPrePullSteps(ref actionID)) + // return true; + + // if (CurrentState == OpenerState.InOpener) + // { + // if (DoOpener(ref actionID)) + // return true; + // } + + // if (!CustomComboFunctions.InCombat()) + // { + // ResetOpener(); + // CurrentState = OpenerState.PrePull; + // } + // return false; + // } + //} + //internal static class MCHExtensions + //{ + // private static uint lastBattery = 0; + // internal static uint LastSummonBattery(this MCHGauge gauge) + // { + // if (!CustomComboFunctions.InCombat() || ActionWatching.CombatActions.Count(x => x == CustomComboFunctions.OriginalHook(MCH.RookAutoturret)) == 0) + // lastBattery = 0; + + // if (ActionWatching.CombatActions.Count(x => x == CustomComboFunctions.OriginalHook(MCH.RookAutoturret)) > 0) + // lastBattery = gauge.LastSummonBatteryPower; + + // return lastBattery; + // } + //} +} \ No newline at end of file diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 4fe8e62f2..25dc83e02 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -1,10 +1,9 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; -using System; -using System.Linq; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; +using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.PvE @@ -15,30 +14,35 @@ internal static class MNK public const byte JobID = 20; public const uint - Bootshine = 53, - DragonKick = 74, - SnapPunch = 56, + Bootshine = 36945, + TrueStrike = 36946, + SnapPunch = 36947, + Meditation = 36942, + SteelPeak = 3547, TwinSnakes = 61, + ArmOfTheDestroyer = 25767, Demolish = 66, - ArmOfTheDestroyer = 62, + Mantra = 65, + DragonKick = 74, Rockbreaker = 70, + Thunderclap = 25762, + HowlingFist = 16474, FourPointFury = 16473, PerfectBalance = 69, - TrueStrike = 54, - Meditation = 3546, - HowlingFist = 25763, - Enlightenment = 16474, + FormShift = 4262, + TheForbiddenChakra = 3547, MasterfulBlitz = 25764, - ElixirField = 3545, - FlintStrike = 25882, - RisingPhoenix = 25768, - ShadowOfTheDestroyer = 25767, + RiddleOfEarth = 7394, + EarthsReply = 36944, RiddleOfFire = 7395, - RiddleOfWind = 25766, Brotherhood = 7396, - ForbiddenChakra = 3546, - FormShift = 4262, - Thunderclap = 25762; + RiddleOfWind = 25766, + EnlightenedMeditation = 36943, + Enlightenment = 16474, + SixSidedStar = 16476, + ShadowOfTheDestroyer = 25767, + WindsReply = 36949, + FiresReply = 36950; public static class Buffs { @@ -55,12 +59,6 @@ public const ushort Brotherhood = 1185; } - public static class Debuffs - { - public const ushort - Demolish = 246; - } - public static class Levels { public const byte @@ -81,14 +79,15 @@ public const byte Enlightenment = 70, Brotherhood = 70, RiddleOfWind = 72, + TheForbiddenChakra = 54, ShadowOfTheDestroyer = 82; } + public static MNKGauge Gauge => CustomComboFunctions.GetJobGauge(); + public static class Config { public const string - MNK_Demolish_Apply = "MnkDemolishApply", - MNK_DisciplinedFist_Apply = "MnkDisciplinedFistApply", MNK_STSecondWindThreshold = "MNK_STSecondWindThreshold", MNK_STBloodbathThreshold = "MNK_STBloodbathThreshold", MNK_AoESecondWindThreshold = "MNK_AoESecondWindThreshold", @@ -98,7 +97,7 @@ public const string internal class MNK_AoE_SimpleMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_AoE_SimpleMode; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicAOECombo; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -124,78 +123,69 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return FormShift; } - if (IsEnabled(CustomComboPreset.MNK_AoE_Simple_Thunderclap) && !InMeleeRange() && gauge.Chakra == 5 && (!LevelChecked(FormShift) || HasEffect(Buffs.FormlessFist))) + if (!InMeleeRange() && gauge.Chakra == 5 && (!LevelChecked(FormShift) || HasEffect(Buffs.FormlessFist))) { return Thunderclap; } } - if (IsEnabled(CustomComboPreset.MNK_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.MNK_VariantCure)) + if (IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.MNK_VariantCure)) return Variant.VariantCure; // Buffs if (inCombat && canWeave) { - if (IsEnabled(CustomComboPreset.MNK_Variant_Rampart) && - IsEnabled(Variant.VariantRampart) && + if (IsEnabled(Variant.VariantRampart) && IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; - if (IsEnabled(CustomComboPreset.MNK_AoE_Simple_CDs)) + if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) { - if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) - { - return RiddleOfFire; - } + return RiddleOfFire; + } - if (IsEnabled(CustomComboPreset.MNK_AoE_Simple_CDs_PerfectBalance) && level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) + { + // Use Perfect Balance if: + // 1. It's after Bootshine/Dragon Kick. + // 2. At max stacks / before overcap. + // 3. During Brotherhood. + // 4. During Riddle of Fire. + // 5. Prepare Masterful Blitz for the Riddle of Fire & Brotherhood window. + if ((GetRemainingCharges(PerfectBalance) == 2) || + (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) { - // Use Perfect Balance if: - // 1. It's after Bootshine/Dragon Kick. - // 2. At max stacks / before overcap. - // 3. During Brotherhood. - // 4. During Riddle of Fire. - // 5. Prepare Masterful Blitz for the Riddle of Fire & Brotherhood window. - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) - { - return PerfectBalance; - } + return PerfectBalance; } + } - if (IsEnabled(CustomComboPreset.MNK_AoE_Simple_CDs_Brotherhood) && level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) - { - return Brotherhood; - } + if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } - if (IsEnabled(CustomComboPreset.MNK_AoE_Simple_CDs_RiddleOfWind) && level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) - { - return RiddleOfWind; - } + if (level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) + { + return RiddleOfWind; } - if (IsEnabled(CustomComboPreset.MNK_AoE_Simple_Meditation) && level >= Levels.Meditation && gauge.Chakra == 5 && (HasEffect(Buffs.DisciplinedFist) || + if (level >= Levels.Meditation && gauge.Chakra == 5 && (HasEffect(Buffs.DisciplinedFist) || level < Levels.TwinSnakes) && canWeaveChakra) { return level >= Levels.Enlightenment ? OriginalHook(Enlightenment) : OriginalHook(Meditation); } - // healing - please move if not appropriate this high priority - if (IsEnabled(CustomComboPreset.MNK_ST_ComboHeals)) - { - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoESecondWindThreshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) - return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoEBloodbathThreshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) - return All.Bloodbath; - } + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoESecondWindThreshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + return All.SecondWind; + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoEBloodbathThreshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + return All.Bloodbath; } // Masterful Blitz - if (IsEnabled(CustomComboPreset.MNK_AoE_Simple_MasterfulBlitz) && - level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) { return OriginalHook(MasterfulBlitz); } @@ -248,87 +238,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class MNK_DragonKick_Bootshine : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_DragonKick_Bootshine; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == DragonKick) - { - if (IsEnabled(CustomComboPreset.MNK_BootshineBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) - return OriginalHook(MasterfulBlitz); - - if (HasEffect(Buffs.LeadenFist) && - (HasEffect(Buffs.FormlessFist) || - HasEffect(Buffs.PerfectBalance) || - HasEffect(Buffs.OpoOpoForm))) - return Bootshine; - - if (level < Levels.DragonKick) - return Bootshine; - } - - return actionID; - } - } - - internal class MNK_TwinSnakes : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_TwinSnakes; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == TrueStrike) - { - var disciplinedFistBuff = HasEffect(Buffs.DisciplinedFist); - var disciplinedFistDuration = GetBuffRemainingTime(Buffs.DisciplinedFist); - - if (level >= Levels.TrueStrike) - { - if ((!disciplinedFistBuff && level >= Levels.TwinSnakes) || (disciplinedFistDuration < 6 && level >= Levels.TwinSnakes)) - return TwinSnakes; - return TrueStrike; - } - } - return actionID; - } - } - - internal class MNK_BasicCombo : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicCombo; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == Bootshine) - { - if (HasEffect(Buffs.RaptorForm) && level >= Levels.TrueStrike) - { - if (!HasEffect(Buffs.DisciplinedFist) && level >= Levels.TwinSnakes) - return TwinSnakes; - return TrueStrike; - } - - if (HasEffect(Buffs.CoerlForm) && level >= Levels.SnapPunch) - { - if (!TargetHasEffect(Debuffs.Demolish) && level >= Levels.Demolish) - return Demolish; - return SnapPunch; - } - - if (!HasEffect(Buffs.LeadenFist) && HasEffect(Buffs.OpoOpoForm) && level >= Levels.DragonKick) - return DragonKick; - return Bootshine; - } - - return actionID; - } - } - internal class MNK_PerfectBalance : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_PerfectBalance; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicCombo; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -344,403 +256,54 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim internal class MNK_ST_SimpleMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_SimpleMode; - - internal static bool inOpener = false; - internal static bool openerFinished = false; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicCombo; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { if (actionID == Bootshine) { var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); - var gauge = GetJobGauge(); var canWeave = CanWeave(actionID, 0.5); var canDelayedWeave = CanWeave(actionID, 0.0) && GetCooldown(actionID).CooldownRemaining < 0.7; - var twinsnakeDuration = GetBuffRemainingTime(Buffs.DisciplinedFist); - var demolishDuration = GetDebuffRemainingTime(Debuffs.Demolish); var pbStacks = FindEffectAny(Buffs.PerfectBalance); - var lunarNadi = gauge.Nadi == Nadi.LUNAR; - var solarNadi = gauge.Nadi == Nadi.SOLAR; - - if (IsEnabled(CustomComboPreset.MNK_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.MNK_VariantCure)) - return Variant.VariantCure; - - // Opener for MNK - if (IsEnabled(CustomComboPreset.MNK_ST_Simple_LunarSolarOpener)) - { - // Re-enter opener when Brotherhood is used - if (lastComboMove == Brotherhood) - { - inOpener = true; - openerFinished = false; - } + var lunarNadi = Gauge.Nadi == Nadi.LUNAR; + var solarNadi = Gauge.Nadi == Nadi.SOLAR; - if (!inCombat) - { - if (inOpener || openerFinished) - { - inOpener = false; - openerFinished = false; - } - } - - else - { - if (!inOpener && !openerFinished) - { - inOpener = true; - } - } - - if (inCombat && inOpener && !openerFinished) - { - if (level >= Levels.RiddleOfFire) - { - // Early exit out of opener - if (IsOnCooldown(RiddleOfFire) && GetCooldownRemainingTime(RiddleOfFire) <= 40) - { - inOpener = false; - openerFinished = true; - } - - // Delayed weave for Riddle of Fire specifically - if (canDelayedWeave) - { - if ((HasEffect(Buffs.CoerlForm) || lastComboMove == TwinSnakes) && !IsOnCooldown(RiddleOfFire)) - { - return RiddleOfFire; - } - } - - if (canWeave) - { - if (IsOnCooldown(RiddleOfFire) && GetCooldownRemainingTime(RiddleOfFire) <= 59) - { - if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood) && IsOnCooldown(RiddleOfFire) && - (lastComboMove == Bootshine || lastComboMove == DragonKick)) - { - return Brotherhood; - } - - if (GetRemainingCharges(PerfectBalance) > 0 && !HasEffect(Buffs.PerfectBalance) && !HasEffect(Buffs.FormlessFist) && - (lastComboMove == Bootshine || lastComboMove == DragonKick) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) - { - return PerfectBalance; - } - - if (level >= Levels.RiddleOfWind && HasEffect(Buffs.PerfectBalance) && !IsOnCooldown(RiddleOfWind)) - { - return RiddleOfWind; - } - - if (gauge.Chakra == 5) - { - return OriginalHook(Meditation); - } - } - - // healing - please move if not appropriate this high priority - if (IsEnabled(CustomComboPreset.MNK_ST_ComboHeals)) - { - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_STSecondWindThreshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) - return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_STBloodbathThreshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) - return All.Bloodbath; - } - } - } - - else - { - // Automatically exit opener if we don't have Riddle of Fire - inOpener = false; - openerFinished = true; - } - } - } - - // Out of combat preparation + // Buffs if (!inCombat) { - if (!inOpener && gauge.Chakra < 5 && level >= Levels.Meditation) + if (Gauge.Chakra < 5 && level >= Levels.Meditation) { return Meditation; } - - if (!inOpener && level >= Levels.FormShift && !HasEffect(Buffs.FormlessFist) && comboTime <= 0) - { - return FormShift; - } - - if (IsEnabled(CustomComboPreset.MNK_ST_Simple_Thunderclap) && !InMeleeRange() && gauge.Chakra == 5 && (!LevelChecked(FormShift) || HasEffect(Buffs.FormlessFist))) - { - return Thunderclap; - } } - // Buffs - if (inCombat && !inOpener) + if (inCombat) { - if (IsEnabled(CustomComboPreset.MNK_Variant_Rampart) && - IsEnabled(Variant.VariantRampart) && - IsOffCooldown(Variant.VariantRampart) && - canWeave) - return Variant.VariantRampart; - - if (IsEnabled(CustomComboPreset.MNK_ST_Simple_CDs)) + if (Gauge.Chakra == 5 && level >= Levels.TheForbiddenChakra) { - if (canWeave) - { - - if (IsEnabled(CustomComboPreset.MNK_ST_Simple_CDs_PerfectBalance) && !HasEffect(Buffs.FormlessFist) && - level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.DisciplinedFist) && - OriginalHook(MasterfulBlitz) == MasterfulBlitz) - { - // Use Perfect Balance if: - // 1. It's after Bootshine/Dragon Kick. - // 2. At max stacks / before overcap. - // 3. During Brotherhood. - // 4. During Riddle of Fire after Demolish has been applied. - // 5. Prepare Masterful Blitz for the Riddle of Fire & Brotherhood window. - if ((lastComboMove == Bootshine || lastComboMove == DragonKick) && - ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 3 && GetCooldownRemainingTime(Brotherhood) > 40) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 6) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 3 && GetCooldownRemainingTime(Brotherhood) < 10))) - { - return PerfectBalance; - } - } - } - - if (canDelayedWeave) - { - if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire) && HasEffect(Buffs.DisciplinedFist)) - { - return RiddleOfFire; - } - - if (TargetNeedsPositionals() && IsEnabled(CustomComboPreset.MNK_TrueNorthDynamic) && LevelChecked(All.TrueNorth) && GetRemainingCharges(All.TrueNorth) > 0 && !HasEffect(All.Buffs.TrueNorth) && LevelChecked(Demolish) && HasEffect(Buffs.CoerlForm)) - { - if (!TargetHasEffect(Debuffs.Demolish) || demolishDuration <= PluginConfiguration.GetCustomFloatValue(Config.MNK_Demolish_Apply)) - { - if (!OnTargetsRear()) - return All.TrueNorth; - } - else if (!OnTargetsFlank()) - return All.TrueNorth; - } - } - - if (canWeave) - { - if (IsEnabled(CustomComboPreset.MNK_ST_Simple_CDs_Brotherhood) && level >= Levels.Brotherhood && - !IsOnCooldown(Brotherhood) && IsOnCooldown(RiddleOfFire)) - { - return Brotherhood; - } - - if (IsEnabled(CustomComboPreset.MNK_ST_Simple_CDs_RiddleOfWind) && level >= Levels.RiddleOfWind && - !IsOnCooldown(RiddleOfWind) && IsOnCooldown(RiddleOfFire) && IsOnCooldown(Brotherhood)) - { - return RiddleOfWind; - } - - // healing - please move if not appropriate this high priority - if (IsEnabled(CustomComboPreset.MNK_ST_ComboHeals)) - { - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_STSecondWindThreshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) - return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_STBloodbathThreshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) - return All.Bloodbath; - } - } + return TheForbiddenChakra; } - if (canWeave) - { - if (IsEnabled(CustomComboPreset.MNK_ST_Simple_Meditation) && level >= Levels.Meditation && gauge.Chakra == 5 && (HasEffect(Buffs.DisciplinedFist) || level < Levels.TwinSnakes)) - { - if (level < Levels.RiddleOfFire || !IsEnabled(CustomComboPreset.MNK_ST_Simple_CDs) || (GetCooldownRemainingTime(RiddleOfFire) >= 1.5 && IsOnCooldown(RiddleOfFire) && lastComboMove != RiddleOfFire)) - { - return OriginalHook(Meditation); - } - } - } - } - - // Masterful Blitz - if (IsEnabled(CustomComboPreset.MNK_ST_Simple_MasterfulBlitz) && level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) - { - return OriginalHook(MasterfulBlitz); - } - - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) - { - bool opoopoChakra = Array.Exists(gauge.BeastChakra, e => e == BeastChakra.OPOOPO); - bool coeurlChakra = Array.Exists(gauge.BeastChakra, e => e == BeastChakra.COEURL); - bool raptorChakra = Array.Exists(gauge.BeastChakra, e => e == BeastChakra.RAPTOR); - bool canSolar = gauge.BeastChakra.Where(e => e == BeastChakra.OPOOPO).Count() != 2; - if (opoopoChakra) + if (HasEffect(Buffs.OpoOpoForm)) { - if (coeurlChakra) - { - return TwinSnakes; - } - if (raptorChakra) - { - return Demolish; - } - if (lunarNadi && !solarNadi) - { - bool demolishFirst = !TargetHasEffect(Debuffs.Demolish); - if (!demolishFirst && HasEffect(Buffs.DisciplinedFist)) - { - demolishFirst = twinsnakeDuration >= demolishDuration; - } - return demolishFirst ? Demolish : TwinSnakes; - } + return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; } - if (canSolar && (lunarNadi || !solarNadi)) - { - if (!raptorChakra && (!HasEffect(Buffs.DisciplinedFist) || twinsnakeDuration <= 2.5)) - { - return TwinSnakes; - } - if (!coeurlChakra && (!TargetHasEffect(Debuffs.Demolish) || demolishDuration <= 2.5)) - { - return Demolish; - } - } - return HasEffect(Buffs.LeadenFist) ? Bootshine : DragonKick; - } - // Monk Rotation - if (IsEnabled(CustomComboPreset.MNK_ST_Meditation_Uptime) && !InMeleeRange() && gauge.Chakra < 5 && LevelChecked(Meditation)) - { - return Meditation; - } - - if (!HasEffect(Buffs.PerfectBalance)) - { - if (HasEffect(Buffs.FormlessFist) || HasEffect(Buffs.OpoOpoForm)) + if (HasEffect(Buffs.RaptorForm)) { - return !LevelChecked(DragonKick) || HasEffect(Buffs.LeadenFist) - ? Bootshine - : DragonKick; + return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; } - } - if (!HasEffect(Buffs.FormlessFist) && HasEffect(Buffs.RaptorForm)) - { - if (!LevelChecked(TrueStrike)) + if (HasEffect(Buffs.CoerlForm)) { - return Bootshine; + // Can we warn about the positional here? + return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; } - - return !LevelChecked(TwinSnakes) || (twinsnakeDuration >= PluginConfiguration.GetCustomFloatValue(Config.MNK_DisciplinedFist_Apply)) - ? TrueStrike - : TwinSnakes; - } - if (!HasEffect(Buffs.FormlessFist) && HasEffect(Buffs.CoerlForm)) - { - return !LevelChecked(SnapPunch) - ? Bootshine - : !LevelChecked(Demolish) || (demolishDuration >= PluginConfiguration.GetCustomFloatValue(Config.MNK_Demolish_Apply)) - ? SnapPunch - : Demolish; - } - } - return actionID; - } - } - - internal class MNK_PerfectBalance_Plus : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_PerfectBalance_Plus; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == MasterfulBlitz) - { - var gauge = GetJobGauge(); - var pbStacks = FindEffectAny(Buffs.PerfectBalance); - var lunarNadi = gauge.Nadi == Nadi.LUNAR; - var nadiNONE = gauge.Nadi == Nadi.NONE; - if (!nadiNONE && !lunarNadi) - { - if (pbStacks?.StackCount == 3) - return DragonKick; - - if (pbStacks?.StackCount == 2) - return Bootshine; - - if (pbStacks?.StackCount == 1) - return DragonKick; - } - - if (nadiNONE) - { - if (pbStacks?.StackCount == 3) - return DragonKick; - - if (pbStacks?.StackCount == 2) - return Bootshine; - - if (pbStacks?.StackCount == 1) - return DragonKick; - } - - if (lunarNadi) - { - if (pbStacks?.StackCount == 3) - return TwinSnakes; - - if (pbStacks?.StackCount == 2) - return DragonKick; - - if (pbStacks?.StackCount == 1) - return Demolish; - } - - } - return actionID; - } - } - - internal class MNK_Riddle_Brotherhood : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_Riddle_Brotherhood; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID is RiddleOfFire && level >= Levels.Brotherhood && IsOnCooldown(RiddleOfFire) && IsOffCooldown(Brotherhood)) - return Brotherhood; - else return actionID; - } - } - - internal class MNK_HowlingFistMeditation : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_HowlingFistMeditation; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == HowlingFist || actionID == Enlightenment) - { - var gauge = GetJobGauge(); - - if (gauge.Chakra < 5) - { - return Meditation; } } return actionID; } } } -} +} \ No newline at end of file diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index 17d851fa5..594090962 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1615,26 +1615,7 @@ internal static void Draw(CustomComboPreset preset, bool enabled) // ==================================================================================== #region MONK - if (preset == CustomComboPreset.MNK_ST_SimpleMode) - UserConfig.DrawRoundedSliderFloat(5.0f, 10.0f, MNK.Config.MNK_Demolish_Apply, "Seconds remaining before refreshing Demolish."); - if (preset == CustomComboPreset.MNK_ST_SimpleMode) - UserConfig.DrawRoundedSliderFloat(5.0f, 10.0f, MNK.Config.MNK_DisciplinedFist_Apply, "Seconds remaining before refreshing Disciplined Fist."); - - if (preset == CustomComboPreset.MNK_ST_ComboHeals) - { - UserConfig.DrawSliderInt(0, 100, MNK.Config.MNK_STSecondWindThreshold, "Second Wind HP percentage threshold (0 = Disabled)", 150, SliderIncrements.Ones); - UserConfig.DrawSliderInt(0, 100, MNK.Config.MNK_STBloodbathThreshold, "Bloodbath HP percentage threshold (0 = Disabled)", 150, SliderIncrements.Ones); - } - - if (preset == CustomComboPreset.MNK_AoE_ComboHeals) - { - UserConfig.DrawSliderInt(0, 100, MNK.Config.MNK_AoESecondWindThreshold, "Second Wind HP percentage threshold (0 = Disabled)", 150, SliderIncrements.Ones); - UserConfig.DrawSliderInt(0, 100, MNK.Config.MNK_AoEBloodbathThreshold, "Bloodbath HP percentage threshold (0 = Disabled)", 150, SliderIncrements.Ones); - } - - if (preset == CustomComboPreset.MNK_Variant_Cure) - UserConfig.DrawSliderInt(1, 100, MNK.Config.MNK_VariantCure, "HP% to be at or under", 200); #endregion // ==================================================================================== diff --git a/XIVSlothCombo/XIVSlothCombo.cs b/XIVSlothCombo/XIVSlothCombo.cs index 8089b4de7..cea491b00 100644 --- a/XIVSlothCombo/XIVSlothCombo.cs +++ b/XIVSlothCombo/XIVSlothCombo.cs @@ -56,7 +56,7 @@ public sealed partial class XIVSlothCombo : IDalamudPlugin //DRK.JobID, //GNB.JobID, //MCH.JobID, - MNK.JobID, + //MNK.JobID, NIN.JobID, //PCT.JobID, //PLD.JobID, From 424411c0b1e6b266936e3dd64efa9d0ed0c62562 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Fri, 19 Jul 2024 16:51:11 +0100 Subject: [PATCH 002/142] Combat buffs & masterful blitz/PB --- XIVSlothCombo/Combos/PvE/MNK.cs | 128 +++++++++++++++++++++++++------- 1 file changed, 101 insertions(+), 27 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 25dc83e02..48e6b64c6 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -1,5 +1,7 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; +using System; +using System.Linq; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; @@ -238,22 +240,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class MNK_PerfectBalance : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicCombo; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == PerfectBalance) - { - if (OriginalHook(MasterfulBlitz) != MasterfulBlitz && level >= Levels.MasterfulBlitz) - return OriginalHook(MasterfulBlitz); - } - - return actionID; - } - } - internal class MNK_ST_SimpleMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicCombo; @@ -266,8 +252,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var canWeave = CanWeave(actionID, 0.5); var canDelayedWeave = CanWeave(actionID, 0.0) && GetCooldown(actionID).CooldownRemaining < 0.7; var pbStacks = FindEffectAny(Buffs.PerfectBalance); - var lunarNadi = Gauge.Nadi == Nadi.LUNAR; - var solarNadi = Gauge.Nadi == Nadi.SOLAR; // Buffs if (!inCombat) @@ -280,30 +264,120 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (inCombat) { - if (Gauge.Chakra == 5 && level >= Levels.TheForbiddenChakra) + // Masterful Blitz + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) { - return TheForbiddenChakra; + return OriginalHook(MasterfulBlitz); + } + + // Perfect Balance + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + { + if ((GetRemainingCharges(PerfectBalance) == 2) || + (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + { + return PerfectBalance; + } + } + + if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } + + if (level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) + { + return RiddleOfWind; } - if (HasEffect(Buffs.OpoOpoForm)) + if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) { - return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; + return RiddleOfFire; } - if (HasEffect(Buffs.RaptorForm)) + if (Gauge.Chakra == 5 && level >= Levels.TheForbiddenChakra) { - return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + return TheForbiddenChakra; } - if (HasEffect(Buffs.CoerlForm)) + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) { - // Can we warn about the positional here? - return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + return DeterminePBAbility(actionID); } + + return DetermineCoreAbility(actionID); } } return actionID; } + + private uint DeterminePBAbility(uint baseActionID) + { + /* + * Celestial Revolution - ST - Lunar - 2/1 Chakra Mix + * Rising Phoenix - AOE/ST - Solar - 3 Unique Chakra + * Phantom Rush - AOE/ST - Both - Both Nadis + */ + + var lunarNadi = Gauge.Nadi == Nadi.LUNAR; + var solarNadi = Gauge.Nadi == Nadi.SOLAR; + + bool opoopoChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.OPOOPO); + bool coeurlChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.COEURL); + bool raptorChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.RAPTOR); + bool canSolar = Gauge.BeastChakra.Where(e => e == BeastChakra.OPOOPO).Count() != 2; + + if (opoopoChakra) + { + if (coeurlChakra) + { + return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + } + if (raptorChakra) + { + return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + } + } + + if (canSolar && (lunarNadi || !solarNadi)) + { + if (!raptorChakra) + { + return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + } + if (!coeurlChakra) + { + return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + } + } + + return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; + } + + private uint DetermineCoreAbility(uint baseActionID) + { + if (HasEffect(Buffs.OpoOpoForm)) + { + return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; + } + + if (HasEffect(Buffs.RaptorForm)) + { + return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + } + + if (HasEffect(Buffs.CoerlForm)) + { + // Can we warn about the positional here? + return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + } + + return baseActionID; + } } } } \ No newline at end of file From 87c62e16dfcb74cd51acceb077dd23af10bbdbb1 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Fri, 19 Jul 2024 18:12:37 +0100 Subject: [PATCH 003/142] Start implementing custom rotation --- XIVSlothCombo/Combos/CustomComboPreset.cs | 54 +++++- XIVSlothCombo/Combos/PvE/MNK.cs | 225 +++++++++++++++++++--- 2 files changed, 248 insertions(+), 31 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index fc33a4eb6..3f9bd52d1 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1834,14 +1834,60 @@ public enum CustomComboPreset #region MONK - [ReplaceSkill(MNK.Bootshine)] - [CustomComboInfo("Basic Rotation", "Basic Monk Combo on one button", MNK.JobID)] + [ReplaceSkill([MNK.Bootshine])] + [CustomComboInfo("Basic ST Rotation", "Basic Monk Combo on one button", MNK.JobID)] + [ConflictingCombos(MNK_CustomCombo)] MNK_BasicCombo = 9002, - [ReplaceSkill(MNK.ArmOfTheDestroyer)] - [CustomComboInfo("Basic AOE Rotation", "Basic Monk AOE Combo on one button", MNK.JobID)] + [ReplaceSkill([MNK.ArmOfTheDestroyer])] + [CustomComboInfo("AOE Rotation", "Basic Monk AOE Combo on one button", MNK.JobID)] MNK_BasicAOECombo = 9003, + [ParentCombo(MNK_BasicAOECombo)] + [CustomComboInfo("Use Cooldowns Option", "Use large cooldowns during AOE rotation", MNK.JobID)] + MNK_BasicAOECombo_UseCooldowns = 9004, + + [ReplaceSkill([MNK.Bootshine])] + [CustomComboInfo("Custom ST Rotation", "Advanced Monk Combo on one button", MNK.JobID)] + [ConflictingCombos(MNK_BasicCombo)] + MNK_CustomCombo = 9005, + + [ParentCombo(MNK_CustomCombo)] + [CustomComboInfo("Use Lunar/Solar Opener", "Uses Lunar/Solar opener", MNK.JobID)] + MNK_STUseLSOpener = 9006, + + [ParentCombo(MNK_CustomCombo)] + [CustomComboInfo("Use Meditation", "Uses Meditation when out of combat/range", MNK.JobID)] + MNK_STUseMeditation = 9007, + + [ParentCombo(MNK_CustomCombo)] + [CustomComboInfo("Buffs", "Use Buffs on cooldown", MNK.JobID)] + MNK_STUseBuffs = 9008, + + [ParentCombo(MNK_STUseBuffs)] + [CustomComboInfo("Use Brotherhood", "Use Brotherhood", MNK.JobID)] + MNK_STUseBrotherhood = 9009, + + [ParentCombo(MNK_STUseBuffs)] + [CustomComboInfo("Use Riddle of Wind", "Use Riddle of Wind", MNK.JobID)] + MNK_STUseROW = 9010, + + [ParentCombo(MNK_STUseBuffs)] + [CustomComboInfo("Use Riddle of Fire", "Use Riddle of Fire", MNK.JobID)] + MNK_STUseROF = 9011, + + [ParentCombo(MNK_CustomCombo)] + [CustomComboInfo("Use The Forbidden Chakra", "Use The Forbidden Chakra", MNK.JobID)] + MNK_STUseTheForbiddenChakra = 9012, + + [ParentCombo(MNK_CustomCombo)] + [CustomComboInfo("Use Perfect Balance", "Use Perfect Balance and Masterful Blitz", MNK.JobID)] + MNK_STUsePerfectBalance = 9013, + + [ParentCombo(MNK_CustomCombo)] + [CustomComboInfo("Use True North", "Use True North dynamically when not in positional", MNK.JobID)] + MNK_STUseTrueNorth = 9014, + // Last value = 9031 #endregion diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 48e6b64c6..f0a949737 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -44,6 +44,10 @@ public const uint SixSidedStar = 16476, ShadowOfTheDestroyer = 25767, WindsReply = 36949, + LeapingOpo = 36945, + RisingRaptor = 36946, + PouncingCoeurl = 36947, + TrueNorth = 7546, FiresReply = 36950; public static class Buffs @@ -58,6 +62,7 @@ public const ushort LeadenFist = 1861, FormlessFist = 2513, DisciplinedFist = 3001, + TrueNorth = 1250, Brotherhood = 1185; } @@ -75,6 +80,7 @@ public const byte HowlingFist = 40, DragonKick = 50, PerfectBalance = 50, + TrueNorth = 50, FormShift = 52, MasterfulBlitz = 60, RiddleOfFire = 68, @@ -240,13 +246,184 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + internal class MNK_ST_CustomMode : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_CustomCombo; + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + if (actionID == Bootshine || actionID == LeapingOpo) + { + var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + + if (IsEnabled(CustomComboPreset.MNK_STUseMeditation) + && (!inCombat || !InMeleeRange()) + && Gauge.Chakra < 5 + && LevelChecked(Meditation)) + { + return Meditation; + } + + if (inCombat) + { + if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) + { + if (IsEnabled(CustomComboPreset.MNK_STUseBrotherhood) + && level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } + + if (IsEnabled(CustomComboPreset.MNK_STUseROW) + && level >= Levels.RiddleOfWind + && !IsOnCooldown(RiddleOfWind)) + { + return RiddleOfWind; + } + + if (IsEnabled(CustomComboPreset.MNK_STUseROF) + && level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire)) + { + return RiddleOfFire; + } + } + + if (IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) + && Gauge.Chakra == 5 + && level >= Levels.TheForbiddenChakra) + { + return TheForbiddenChakra; + } + + if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) + { + // Masterful Blitz + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + { + return OriginalHook(MasterfulBlitz); + } + + // Perfect Balance + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + { + if ((GetRemainingCharges(PerfectBalance) == 2) || + (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + { + return PerfectBalance; + } + } + + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) + { + return DeterminePBAbility(actionID); + } + } + } + + return DetermineCoreAbility(actionID); + } + + return actionID; + } + + private uint DeterminePBAbility(uint baseActionID) + { + var lunarNadi = Gauge.Nadi == Nadi.LUNAR; + var solarNadi = Gauge.Nadi == Nadi.SOLAR; + + bool opoopoChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.OPOOPO); + bool coeurlChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.COEURL); + bool raptorChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.RAPTOR); + bool canSolar = Gauge.BeastChakra.Where(e => e == BeastChakra.OPOOPO).Count() != 2; + + if (opoopoChakra) + { + if (coeurlChakra) + { + return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + } + if (raptorChakra) + { + return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + } + } + + if (canSolar && (lunarNadi || !solarNadi)) + { + if (!raptorChakra) + { + return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + } + if (!coeurlChakra) + { + return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + } + } + + return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; + } + + private uint DetermineCoreAbility(uint baseActionID) + { + if (HasEffect(Buffs.OpoOpoForm)) + { + return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; + } + + if (HasEffect(Buffs.RaptorForm)) + { + return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + } + + if (HasEffect(Buffs.CoerlForm)) + { + // Can we warn about the positional here? + if (Gauge.CoeurlFury == 0) + { + if (!OnTargetsRear() + && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && !HasEffect(Buffs.TrueNorth) + && LevelChecked(Levels.TrueNorth) + && HasCharges(TrueNorth)) + { + return TrueNorth; + } + else + { + return Demolish; + } + } + + if (!OnTargetsFlank() + && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && !HasEffect(Buffs.TrueNorth) + && LevelChecked(Levels.TrueNorth) + && HasCharges(TrueNorth)) + { + return TrueNorth; + } + else + { + return SnapPunch; + } + } + + return baseActionID; + } + } + internal class MNK_ST_SimpleMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicCombo; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID == Bootshine) + if (actionID == Bootshine || actionID == LeapingOpo) { var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); var canWeave = CanWeave(actionID, 0.5); @@ -264,25 +441,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (inCombat) { - // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) - { - return OriginalHook(MasterfulBlitz); - } - - // Perfect Balance - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) - { - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) - { - return PerfectBalance; - } - } - if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) { return Brotherhood; @@ -303,6 +461,25 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return TheForbiddenChakra; } + // Masterful Blitz + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + { + return OriginalHook(MasterfulBlitz); + } + + // Perfect Balance + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + { + if ((GetRemainingCharges(PerfectBalance) == 2) || + (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + { + return PerfectBalance; + } + } + // Perfect Balance if (HasEffect(Buffs.PerfectBalance)) { @@ -317,12 +494,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private uint DeterminePBAbility(uint baseActionID) { - /* - * Celestial Revolution - ST - Lunar - 2/1 Chakra Mix - * Rising Phoenix - AOE/ST - Solar - 3 Unique Chakra - * Phantom Rush - AOE/ST - Both - Both Nadis - */ - var lunarNadi = Gauge.Nadi == Nadi.LUNAR; var solarNadi = Gauge.Nadi == Nadi.SOLAR; @@ -330,7 +501,7 @@ private uint DeterminePBAbility(uint baseActionID) bool coeurlChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.COEURL); bool raptorChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.RAPTOR); bool canSolar = Gauge.BeastChakra.Where(e => e == BeastChakra.OPOOPO).Count() != 2; - + if (opoopoChakra) { if (coeurlChakra) From f759b8a10e2797ea89cf3140c71099ed2f2168f8 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Fri, 19 Jul 2024 20:03:22 +0100 Subject: [PATCH 004/142] More bits working --- XIVSlothCombo/Combos/PvE/MNK.cs | 88 ++++++++++++++++----------------- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index f0a949737..3583ed172 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -16,9 +16,9 @@ internal static class MNK public const byte JobID = 20; public const uint - Bootshine = 36945, - TrueStrike = 36946, - SnapPunch = 36947, + Bootshine = 53, + TrueStrike = 54, + SnapPunch = 56, Meditation = 36942, SteelPeak = 3547, TwinSnakes = 61, @@ -72,6 +72,7 @@ public const byte TrueStrike = 4, SnapPunch = 6, Meditation = 15, + SteelPeak = 15, TwinSnakes = 18, ArmOfTheDestroyer = 26, Rockbreaker = 30, @@ -130,11 +131,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { return FormShift; } - - if (!InMeleeRange() && gauge.Chakra == 5 && (!LevelChecked(FormShift) || HasEffect(Buffs.FormlessFist))) - { - return Thunderclap; - } } if (IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.MNK_VariantCure)) @@ -147,12 +143,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; - if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) { return RiddleOfFire; } - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) { // Use Perfect Balance if: // 1. It's after Bootshine/Dragon Kick. @@ -170,20 +166,20 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) { return Brotherhood; } - if (level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) { return RiddleOfWind; } - if (level >= Levels.Meditation && gauge.Chakra == 5 && (HasEffect(Buffs.DisciplinedFist) || - level < Levels.TwinSnakes) && canWeaveChakra) + if (Gauge.Chakra == 5 + && level >= Levels.HowlingFist) { - return level >= Levels.Enlightenment ? OriginalHook(Enlightenment) : OriginalHook(Meditation); + return OriginalHook(EnlightenedMeditation); } if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoESecondWindThreshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) @@ -253,6 +249,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (actionID == Bootshine || actionID == LeapingOpo) { + var canWeave = CanWeave(actionID, 0.5); + var canWeaveChakra = CanWeave(actionID); var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); if (IsEnabled(CustomComboPreset.MNK_STUseMeditation) @@ -260,10 +258,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb && Gauge.Chakra < 5 && LevelChecked(Meditation)) { - return Meditation; + return OriginalHook(Meditation); } - if (inCombat) + if (inCombat && canWeave) { if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) { @@ -293,35 +291,35 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb && Gauge.Chakra == 5 && level >= Levels.TheForbiddenChakra) { - return TheForbiddenChakra; + return OriginalHook(Meditation); } + } - if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) + if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) + { + // Masterful Blitz + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) { - // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) - { - return OriginalHook(MasterfulBlitz); - } + return OriginalHook(MasterfulBlitz); + } - // Perfect Balance - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + // Perfect Balance + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + { + if ((GetRemainingCharges(PerfectBalance) == 2) || + (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) { - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) - { - return PerfectBalance; - } + return PerfectBalance; } + } - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) - { - return DeterminePBAbility(actionID); - } + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) + { + return DeterminePBAbility(actionID); } } @@ -435,7 +433,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (Gauge.Chakra < 5 && level >= Levels.Meditation) { - return Meditation; + return OriginalHook(Meditation); } } @@ -456,9 +454,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return RiddleOfFire; } - if (Gauge.Chakra == 5 && level >= Levels.TheForbiddenChakra) + if (Gauge.Chakra == 5 && level >= Levels.SteelPeak) { - return TheForbiddenChakra; + return OriginalHook(TheForbiddenChakra); } // Masterful Blitz @@ -533,18 +531,18 @@ private uint DetermineCoreAbility(uint baseActionID) { if (HasEffect(Buffs.OpoOpoForm)) { - return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; + return Gauge.OpoOpoFury == 0 ? DragonKick : OriginalHook(Bootshine); } if (HasEffect(Buffs.RaptorForm)) { - return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + return Gauge.RaptorFury == 0 ? TwinSnakes : OriginalHook(TrueStrike); } if (HasEffect(Buffs.CoerlForm)) { // Can we warn about the positional here? - return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + return Gauge.CoeurlFury == 0 ? Demolish : OriginalHook(SnapPunch); } return baseActionID; From 1d998b30846b3c04ee4efbdd64a41de126b43b3a Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Fri, 19 Jul 2024 23:06:21 +0100 Subject: [PATCH 005/142] add fire and winds reply --- XIVSlothCombo/Combos/CustomComboPreset.cs | 8 +++++ XIVSlothCombo/Combos/PvE/MNK.cs | 41 ++++++++++++++++++----- 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 3f9bd52d1..61da467b6 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1888,6 +1888,14 @@ public enum CustomComboPreset [CustomComboInfo("Use True North", "Use True North dynamically when not in positional", MNK.JobID)] MNK_STUseTrueNorth = 9014, + [ParentCombo(MNK_STUseROW)] + [CustomComboInfo("Use Wind's Reply", "Use Wind's Reply", MNK.JobID)] + MNK_STUseWindsReply = 9015, + + [ParentCombo(MNK_STUseROF)] + [CustomComboInfo("Use Fire's Reply", "Use Fire's Reply", MNK.JobID)] + MNK_STUseFiresReply = 9016, + // Last value = 9031 #endregion diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 3583ed172..676588991 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -19,7 +19,7 @@ public const uint Bootshine = 53, TrueStrike = 54, SnapPunch = 56, - Meditation = 36942, + Meditation = 36940, SteelPeak = 3547, TwinSnakes = 61, ArmOfTheDestroyer = 25767, @@ -63,6 +63,8 @@ public const ushort FormlessFist = 2513, DisciplinedFist = 3001, TrueNorth = 1250, + WindsRumination = 3842, + FiresRumination = 3843, Brotherhood = 1185; } @@ -89,7 +91,9 @@ public const byte Brotherhood = 70, RiddleOfWind = 72, TheForbiddenChakra = 54, - ShadowOfTheDestroyer = 82; + ShadowOfTheDestroyer = 82, + WindsReply = 96, + FiresReply = 100; } public static MNKGauge Gauge => CustomComboFunctions.GetJobGauge(); @@ -124,12 +128,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (gauge.Chakra < 5 && level >= Levels.Meditation) { - return Meditation; - } - - if (level >= Levels.FormShift && !HasEffect(Buffs.FormlessFist) && comboTime <= 0) - { - return FormShift; + return OriginalHook(Meditation); ; } } @@ -176,6 +175,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return RiddleOfWind; } + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply && !IsOnCooldown(WindsReply)) + { + return WindsReply; + } + + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply && !IsOnCooldown(FiresReply)) + { + return FiresReply; + } + if (Gauge.Chakra == 5 && level >= Levels.HowlingFist) { @@ -272,6 +281,22 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return Brotherhood; } + if (IsEnabled(CustomComboPreset.MNK_STUseWindsReply) + && HasEffect(Buffs.WindsRumination) + && level >= Levels.WindsReply + && !IsOnCooldown(WindsReply)) + { + return WindsReply; + } + + if (IsEnabled(CustomComboPreset.MNK_STUseFiresReply) + && HasEffect(Buffs.FiresRumination) + && level >= Levels.FiresReply + && !IsOnCooldown(FiresReply)) + { + return FiresReply; + } + if (IsEnabled(CustomComboPreset.MNK_STUseROW) && level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) From b0ce0e25d8cfce93ce3584611c5cfe3597326496 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 20 Jul 2024 00:01:31 +0100 Subject: [PATCH 006/142] Few hook changes --- XIVSlothCombo/Combos/PvE/MNK.cs | 60 ++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 676588991..934115e36 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -44,7 +44,7 @@ public const uint SixSidedStar = 16476, ShadowOfTheDestroyer = 25767, WindsReply = 36949, - LeapingOpo = 36945, + LeapingOpo = 36942, RisingRaptor = 36946, PouncingCoeurl = 36947, TrueNorth = 7546, @@ -177,16 +177,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply && !IsOnCooldown(WindsReply)) { - return WindsReply; + return OriginalHook(RiddleOfWind); } if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply && !IsOnCooldown(FiresReply)) { - return FiresReply; + return OriginalHook(RiddleOfFire); } if (Gauge.Chakra == 5 - && level >= Levels.HowlingFist) + && level >= Levels.HowlingFist + && HasBattleTarget()) { return OriginalHook(EnlightenedMeditation); } @@ -320,35 +321,38 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) + if (inCombat) { - // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { - return OriginalHook(MasterfulBlitz); - } + // Masterful Blitz + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + { + return OriginalHook(MasterfulBlitz); + } - // Perfect Balance - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) - { - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + // Perfect Balance + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) { - return PerfectBalance; + if ((GetRemainingCharges(PerfectBalance) == 2) || + (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + { + return PerfectBalance; + } } - } - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) - { - return DeterminePBAbility(actionID); + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) + { + return DeterminePBAbility(actionID); + } } - } - return DetermineCoreAbility(actionID); + return DetermineCoreAbility(actionID); + } } return actionID; @@ -395,12 +399,12 @@ private uint DetermineCoreAbility(uint baseActionID) { if (HasEffect(Buffs.OpoOpoForm)) { - return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; + return Gauge.OpoOpoFury == 0 ? DragonKick : OriginalHook(Bootshine); } if (HasEffect(Buffs.RaptorForm)) { - return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + return Gauge.RaptorFury == 0 ? TwinSnakes : OriginalHook(TrueStrike); } if (HasEffect(Buffs.CoerlForm)) @@ -432,7 +436,7 @@ private uint DetermineCoreAbility(uint baseActionID) } else { - return SnapPunch; + return OriginalHook(SnapPunch); } } From 9910ed7622054d14d82a25eec57cec3ae24b9e04 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 20 Jul 2024 00:56:24 +0100 Subject: [PATCH 007/142] Fixes --- XIVSlothCombo/Combos/PvE/MNK.cs | 38 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 934115e36..05df5de46 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -175,14 +175,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return RiddleOfWind; } - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply && !IsOnCooldown(WindsReply)) + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply) { - return OriginalHook(RiddleOfWind); + return WindsReply; } - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply && !IsOnCooldown(FiresReply)) + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply) { - return OriginalHook(RiddleOfFire); + return FiresReply; } if (Gauge.Chakra == 5 @@ -282,22 +282,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return Brotherhood; } - if (IsEnabled(CustomComboPreset.MNK_STUseWindsReply) - && HasEffect(Buffs.WindsRumination) - && level >= Levels.WindsReply - && !IsOnCooldown(WindsReply)) - { - return WindsReply; - } - - if (IsEnabled(CustomComboPreset.MNK_STUseFiresReply) - && HasEffect(Buffs.FiresRumination) - && level >= Levels.FiresReply - && !IsOnCooldown(FiresReply)) - { - return FiresReply; - } - if (IsEnabled(CustomComboPreset.MNK_STUseROW) && level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) @@ -323,6 +307,20 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (inCombat) { + if (IsEnabled(CustomComboPreset.MNK_STUseWindsReply) + && HasEffect(Buffs.WindsRumination) + && level >= Levels.WindsReply) + { + return WindsReply; + } + + if (IsEnabled(CustomComboPreset.MNK_STUseFiresReply) + && HasEffect(Buffs.FiresRumination) + && level >= Levels.FiresReply) + { + return FiresReply; + } + if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { // Masterful Blitz From cca9d876650daa97825177851ca6906830f62243 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 20 Jul 2024 11:50:57 +0100 Subject: [PATCH 008/142] FR/WR in AOE now don't weave --- XIVSlothCombo/Combos/PvE/MNK.cs | 95 +++++++++++++++++---------------- 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 05df5de46..14709e8c3 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -175,16 +175,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return RiddleOfWind; } - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply) - { - return WindsReply; - } - - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply) - { - return FiresReply; - } - if (Gauge.Chakra == 5 && level >= Levels.HowlingFist && HasBattleTarget()) @@ -198,54 +188,67 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return All.Bloodbath; } - // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + if (inCombat) { - return OriginalHook(MasterfulBlitz); - } + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply) + { + return WindsReply; + } - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) - { - if (nadiNONE || !lunarNadi) + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply) { - if (pbStacks?.StackCount > 0) - { - return level >= Levels.ShadowOfTheDestroyer ? ShadowOfTheDestroyer : Rockbreaker; - } + return FiresReply; + } + + // Masterful Blitz + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + { + return OriginalHook(MasterfulBlitz); } - if (lunarNadi) + + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) { - switch (pbStacks?.StackCount) + if (nadiNONE || !lunarNadi) { - case 3: - return OriginalHook(ArmOfTheDestroyer); - case 2: - return FourPointFury; - case 1: - return Rockbreaker; + if (pbStacks?.StackCount > 0) + { + return level >= Levels.ShadowOfTheDestroyer ? ShadowOfTheDestroyer : Rockbreaker; + } + } + if (lunarNadi) + { + switch (pbStacks?.StackCount) + { + case 3: + return OriginalHook(ArmOfTheDestroyer); + case 2: + return FourPointFury; + case 1: + return Rockbreaker; + } } } - } - // Monk Rotation - if (HasEffect(Buffs.OpoOpoForm)) - { - return OriginalHook(ArmOfTheDestroyer); - } + // Monk Rotation + if (HasEffect(Buffs.OpoOpoForm)) + { + return OriginalHook(ArmOfTheDestroyer); + } - if (HasEffect(Buffs.RaptorForm)) - { - if (FourPointFury.LevelChecked()) - return FourPointFury; + if (HasEffect(Buffs.RaptorForm)) + { + if (FourPointFury.LevelChecked()) + return FourPointFury; - if (TwinSnakes.LevelChecked()) - return TwinSnakes; - } + if (TwinSnakes.LevelChecked()) + return TwinSnakes; + } - if (HasEffect(Buffs.CoerlForm) && level >= Levels.Rockbreaker) - { - return Rockbreaker; + if (HasEffect(Buffs.CoerlForm) && level >= Levels.Rockbreaker) + { + return Rockbreaker; + } } } return actionID; From e602d6badac94be86723f17e5a66c699e0ed4294 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 20 Jul 2024 11:51:54 +0100 Subject: [PATCH 009/142] Don't use true north when enemy doesn't need positionals --- XIVSlothCombo/Combos/PvE/MNK.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 14709e8c3..4e4a7b098 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -415,6 +415,7 @@ private uint DetermineCoreAbility(uint baseActionID) { if (!OnTargetsRear() && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && TargetNeedsPositionals() && !HasEffect(Buffs.TrueNorth) && LevelChecked(Levels.TrueNorth) && HasCharges(TrueNorth)) @@ -429,6 +430,7 @@ private uint DetermineCoreAbility(uint baseActionID) if (!OnTargetsFlank() && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && TargetNeedsPositionals() && !HasEffect(Buffs.TrueNorth) && LevelChecked(Levels.TrueNorth) && HasCharges(TrueNorth)) From 535d9ba9ad8f60e62763744df2e9ea81cc4026b0 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 20 Jul 2024 20:19:05 +0100 Subject: [PATCH 010/142] Opener fixes and level checks --- XIVSlothCombo/Combos/CustomComboPreset.cs | 4 +- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 447 ++++++++++------------ XIVSlothCombo/Combos/PvE/MNK.cs | 46 ++- 3 files changed, 243 insertions(+), 254 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 61da467b6..93c848ba2 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1853,8 +1853,8 @@ public enum CustomComboPreset MNK_CustomCombo = 9005, [ParentCombo(MNK_CustomCombo)] - [CustomComboInfo("Use Lunar/Solar Opener", "Uses Lunar/Solar opener", MNK.JobID)] - MNK_STUseLSOpener = 9006, + [CustomComboInfo("Use Double Lunar Opener", "Uses Double Lunar opener", MNK.JobID)] + MNK_STUseLLOpener = 9006, [ParentCombo(MNK_CustomCombo)] [CustomComboInfo("Use Meditation", "Uses Meditation when out of combat/range", MNK.JobID)] diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index f7a6e44e5..392dacde7 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -8,267 +8,224 @@ namespace XIVSlothCombo.Combos.JobHelpers { - //internal class MNKOpenerLogic : MNK - //{ - // private static bool HasCooldowns() - // { - // if (CustomComboFunctions.GetRemainingCharges(CheckMate) < 3) - // return false; - - // if (CustomComboFunctions.GetRemainingCharges(DoubleCheck) < 3) - // return false; - - // if (!CustomComboFunctions.ActionReady(Chainsaw)) - // return false; - - // if (!CustomComboFunctions.ActionReady(Wildfire)) - // return false; - - // if (!CustomComboFunctions.ActionReady(BarrelStabilizer)) - // return false; - - // if (!CustomComboFunctions.ActionReady(Excavator)) - // return false; - - // if (!CustomComboFunctions.ActionReady(FullMetalField)) - // return false; - - // return true; - // } - - // private static uint OpenerLevel => 100; + internal class MNKOpenerLogic : MNK + { + private static bool HasCooldowns() + { + if (CustomComboFunctions.GetRemainingCharges(PerfectBalance) < 2) + return false; + + if (!CustomComboFunctions.ActionReady(Brotherhood)) + return false; + + if (!CustomComboFunctions.ActionReady(RiddleOfFire)) + return false; + + if (!CustomComboFunctions.ActionReady(RiddleOfWind)) + return false; + + if (!CustomComboFunctions.ActionReady(Meditation) && Gauge.Chakra < 5) + return false; + + return true; + } + + private static uint OpenerLevel => 100; + + public uint PrePullStep = 0; + + public uint OpenerStep = 0; + + public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + + private static bool CanOpener => HasCooldowns() && LevelChecked; + + private OpenerState currentState = OpenerState.PrePull; - // public uint PrePullStep = 0; + public OpenerState CurrentState + { + get + { + return currentState; + } + set + { + if (value != currentState) + { + if (value == OpenerState.PrePull) + { + Svc.Log.Debug($"Entered PrePull Opener"); + } + if (value == OpenerState.InOpener) OpenerStep = 1; + if (value == OpenerState.OpenerFinished || value == OpenerState.FailedOpener) + { + if (value == OpenerState.FailedOpener) + Svc.Log.Information($"Opener Failed at step {OpenerStep}"); - // public uint OpenerStep = 0; + ResetOpener(); + } + if (value == OpenerState.OpenerFinished) Svc.Log.Information("Opener Finished"); - // public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + currentState = value; + } + } + } - // private static bool CanOpener => HasCooldowns() && LevelChecked; + private bool DoPrePullSteps(ref uint actionID) + { + if (!LevelChecked) + return false; - // private OpenerState currentState = OpenerState.PrePull; + if (CanOpener && PrePullStep == 0) + { + PrePullStep = 1; + } - // public OpenerState CurrentState - // { - // get - // { - // return currentState; - // } - // set - // { - // if (value != currentState) - // { - // if (value == OpenerState.PrePull) - // { - // Svc.Log.Debug($"Entered PrePull Opener"); - // } - // if (value == OpenerState.InOpener) OpenerStep = 1; - // if (value == OpenerState.OpenerFinished || value == OpenerState.FailedOpener) - // { - // if (value == OpenerState.FailedOpener) - // Svc.Log.Information($"Opener Failed at step {OpenerStep}"); + if (!HasCooldowns()) + { + PrePullStep = 0; + } - // ResetOpener(); - // } - // if (value == OpenerState.OpenerFinished) Svc.Log.Information("Opener Finished"); + if (CurrentState == OpenerState.PrePull && PrePullStep > 0) + { + if (Gauge.Chakra < 5 && PrePullStep == 1) + { + actionID = ForbiddenMeditation; + return true; + } - // currentState = value; - // } - // } - // } + if (CustomComboFunctions.WasLastAction(DragonKick) && PrePullStep == 1) CurrentState = OpenerState.InOpener; + else if (PrePullStep == 1) actionID = DragonKick; - // private bool DoPrePullSteps(ref uint actionID) - // { - // if (!LevelChecked) - // return false; + if (ActionWatching.CombatActions.Count > 2 && CustomComboFunctions.InCombat()) + CurrentState = OpenerState.FailedOpener; - // if (CanOpener && PrePullStep == 0) - // { - // PrePullStep = 1; - // } + return true; + } + PrePullStep = 0; + return false; + } - // if (!HasCooldowns()) - // { - // PrePullStep = 0; - // } + private bool DoOpener(ref uint actionID) + { + if (!LevelChecked) + return false; - // if (CurrentState == OpenerState.PrePull && PrePullStep > 0) - // { - // if (CustomComboFunctions.HasEffect(Buffs.Reassembled) && PrePullStep == 1) CurrentState = OpenerState.InOpener; - // else if (PrePullStep == 1) actionID = Reassemble; + if (currentState == OpenerState.InOpener) + { + if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 1) OpenerStep++; + else if (OpenerStep == 1) actionID = PerfectBalance; - // if (ActionWatching.CombatActions.Count > 2 && CustomComboFunctions.InCombat()) - // CurrentState = OpenerState.FailedOpener; + if (CustomComboFunctions.WasLastAction(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = TheForbiddenChakra; + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 3) OpenerStep++; + else if (OpenerStep == 3) actionID = LeapingOpo; + + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 4) OpenerStep++; + else if (OpenerStep == 4) actionID = DragonKick; + + // Pot + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 5) OpenerStep++; + else if (OpenerStep == 5) actionID = LeapingOpo; + + if (CustomComboFunctions.WasLastAction(Brotherhood) && OpenerStep == 6) OpenerStep++; + else if (OpenerStep == 6) actionID = Brotherhood; + + if (CustomComboFunctions.WasLastAction(RiddleOfFire) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = RiddleOfFire; + + if (CustomComboFunctions.WasLastAction(ElixirField) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = ElixirField; + + if (CustomComboFunctions.WasLastAction(RiddleOfWind) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) actionID = RiddleOfWind; + + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 10) OpenerStep++; + else if (OpenerStep == 10) actionID = DragonKick; + + if (CustomComboFunctions.WasLastAction(FiresReply) && OpenerStep == 11) OpenerStep++; + else if (OpenerStep == 11) actionID = FiresReply; + + if (CustomComboFunctions.WasLastAction(WindsReply) && OpenerStep == 12) OpenerStep++; + else if (OpenerStep == 12) actionID = WindsReply; + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 13) OpenerStep++; + else if (OpenerStep == 13) actionID = LeapingOpo; + + if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 14) OpenerStep++; + else if (OpenerStep == 14) actionID = PerfectBalance; + + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 15) OpenerStep++; + else if (OpenerStep == 15) actionID = DragonKick; + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 16) OpenerStep++; + else if (OpenerStep == 16) actionID = LeapingOpo; + + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 17) OpenerStep++; + else if (OpenerStep == 17) actionID = DragonKick; + + if (CustomComboFunctions.WasLastAction(ElixirField) && OpenerStep == 18) OpenerStep++; + else if (OpenerStep == 18) actionID = ElixirField; + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 19) OpenerStep++; + else if (OpenerStep == 19) actionID = LeapingOpo; + + if (CustomComboFunctions.WasLastAction(TwinSnakes) && OpenerStep == 20) OpenerStep++; + else if (OpenerStep == 20) actionID = TwinSnakes; + + if (CustomComboFunctions.WasLastAction(Demolish) && OpenerStep == 21) OpenerStep++; + else if (OpenerStep == 21) actionID = Demolish; + + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 22) OpenerStep++; + else if (OpenerStep == 22) actionID = DragonKick; + + if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) + CurrentState = OpenerState.FailedOpener; + + if (((actionID == PerfectBalance && CustomComboFunctions.GetRemainingCharges(PerfectBalance) < 1) || + (actionID == RiddleOfFire && CustomComboFunctions.IsOnCooldown(RiddleOfFire)) || + (actionID == RiddleOfWind && CustomComboFunctions.IsOnCooldown(RiddleOfWind)) || + (actionID == Brotherhood && CustomComboFunctions.IsOnCooldown(Brotherhood)) + && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3)) + { + Svc.Log.Debug($"Failed at {actionID}"); + CurrentState = OpenerState.FailedOpener; + return false; + } + return true; + } + return false; + } - // return true; - // } - // PrePullStep = 0; - // return false; - // } + private void ResetOpener() + { + PrePullStep = 0; + OpenerStep = 0; + } - // private bool DoOpener(ref uint actionID) - // { - // if (!LevelChecked) - // return false; + public bool DoFullOpener(ref uint actionID) + { + if (!LevelChecked) + return false; - // if (currentState == OpenerState.InOpener) - // { - // if (CustomComboFunctions.WasLastAction(AirAnchor) && OpenerStep == 1) OpenerStep++; - // else if (OpenerStep == 1) actionID = AirAnchor; + if (CurrentState == OpenerState.PrePull) + if (DoPrePullSteps(ref actionID)) + return true; - // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 2) OpenerStep++; - // else if (OpenerStep == 2) actionID = CheckMate; + if (CurrentState == OpenerState.InOpener) + { + if (DoOpener(ref actionID)) + return true; + } - // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 3) OpenerStep++; - // else if (OpenerStep == 3) actionID = DoubleCheck; - - // if (CustomComboFunctions.WasLastAction(Drill) && OpenerStep == 4) OpenerStep++; - // else if (OpenerStep == 4) actionID = Drill; - - // if (CustomComboFunctions.WasLastAction(BarrelStabilizer) && OpenerStep == 5) OpenerStep++; - // else if (OpenerStep == 5) actionID = BarrelStabilizer; - - // if (CustomComboFunctions.WasLastAction(Chainsaw) && OpenerStep == 6) OpenerStep++; - // else if (OpenerStep == 6) actionID = Chainsaw; - - // if (CustomComboFunctions.WasLastAction(Excavator) && OpenerStep == 7) OpenerStep++; - // else if (OpenerStep == 7) actionID = Excavator; - - // if (CustomComboFunctions.WasLastAction(AutomatonQueen) && OpenerStep == 8) OpenerStep++; - // else if (OpenerStep == 8) actionID = AutomatonQueen; - - // if (CustomComboFunctions.WasLastAction(Reassemble) && OpenerStep == 9) OpenerStep++; - // else if (OpenerStep == 9) actionID = Reassemble; - - // if (CustomComboFunctions.WasLastAction(Drill) && OpenerStep == 10) OpenerStep++; - // else if (OpenerStep == 10) actionID = Drill; - - // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 11) OpenerStep++; - // else if (OpenerStep == 11) actionID = CheckMate; - - // if (CustomComboFunctions.WasLastAction(Wildfire) && OpenerStep == 12) OpenerStep++; - // else if (OpenerStep == 12) actionID = Wildfire; - - // if (CustomComboFunctions.WasLastAction(FullMetalField) && OpenerStep == 13) OpenerStep++; - // else if (OpenerStep == 13) actionID = FullMetalField; - - // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 14) OpenerStep++; - // else if (OpenerStep == 14) actionID = DoubleCheck; - - // if (CustomComboFunctions.WasLastAction(Hypercharge) && OpenerStep == 15) OpenerStep++; - // else if (OpenerStep == 15) actionID = Hypercharge; - - // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 16) OpenerStep++; - // else if (OpenerStep == 16) actionID = BlazingShot; - - // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 17) OpenerStep++; - // else if (OpenerStep == 17) actionID = CheckMate; - - // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 18) OpenerStep++; - // else if (OpenerStep == 18) actionID = BlazingShot; - - // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 19) OpenerStep++; - // else if (OpenerStep == 19) actionID = DoubleCheck; - - // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 20) OpenerStep++; - // else if (OpenerStep == 20) actionID = BlazingShot; - - // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 21) OpenerStep++; - // else if (OpenerStep == 21) actionID = CheckMate; - - // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 22) OpenerStep++; - // else if (OpenerStep == 22) actionID = BlazingShot; - - // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 23) OpenerStep++; - // else if (OpenerStep == 23) actionID = DoubleCheck; - - // if (CustomComboFunctions.WasLastAction(BlazingShot) && OpenerStep == 24) OpenerStep++; - // else if (OpenerStep == 24) actionID = BlazingShot; - - // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 25) OpenerStep++; - // else if (OpenerStep == 25) actionID = CheckMate; - - // if (CustomComboFunctions.WasLastAction(Drill) && OpenerStep == 26) OpenerStep++; - // else if (OpenerStep == 26) actionID = Drill; - - // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 27) OpenerStep++; - // else if (OpenerStep == 27) actionID = DoubleCheck; - - // if (CustomComboFunctions.WasLastAction(CheckMate) && OpenerStep == 28) OpenerStep++; - // else if (OpenerStep == 28) actionID = CheckMate; - - // if (CustomComboFunctions.WasLastAction(HeatedSplitShot) && OpenerStep == 29) OpenerStep++; - // else if (OpenerStep == 29) actionID = HeatedSplitShot; - - // if (CustomComboFunctions.WasLastAction(DoubleCheck) && OpenerStep == 30) OpenerStep++; - // else if (OpenerStep == 30) actionID = DoubleCheck; - - // if (CustomComboFunctions.WasLastAction(HeatedSlugShot) && OpenerStep == 31) OpenerStep++; - // else if (OpenerStep == 31) actionID = HeatedSlugShot; - - // if (CustomComboFunctions.WasLastAction(HeatedCleanShot) && OpenerStep == 32) CurrentState = OpenerState.OpenerFinished; - // else if (OpenerStep == 32) actionID = HeatedCleanShot; - - // if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) - // CurrentState = OpenerState.FailedOpener; - - // if (((actionID == CheckMate && CustomComboFunctions.GetRemainingCharges(CheckMate) < 3) || - // (actionID == Chainsaw && CustomComboFunctions.IsOnCooldown(Chainsaw)) || - // (actionID == Wildfire && CustomComboFunctions.IsOnCooldown(Wildfire)) || - // (actionID == BarrelStabilizer && CustomComboFunctions.IsOnCooldown(BarrelStabilizer)) || - // (actionID == BarrelStabilizer && CustomComboFunctions.IsOnCooldown(Excavator)) || - // (actionID == BarrelStabilizer && CustomComboFunctions.IsOnCooldown(FullMetalField)) || - // (actionID == DoubleCheck && CustomComboFunctions.GetRemainingCharges(DoubleCheck) < 3)) && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) - // { - // CurrentState = OpenerState.FailedOpener; - // return false; - // } - // return true; - // } - // return false; - // } - - // private void ResetOpener() - // { - // PrePullStep = 0; - // OpenerStep = 0; - // } - - // public bool DoFullOpener(ref uint actionID) - // { - // if (!LevelChecked) - // return false; - - // if (CurrentState == OpenerState.PrePull) - // if (DoPrePullSteps(ref actionID)) - // return true; - - // if (CurrentState == OpenerState.InOpener) - // { - // if (DoOpener(ref actionID)) - // return true; - // } - - // if (!CustomComboFunctions.InCombat()) - // { - // ResetOpener(); - // CurrentState = OpenerState.PrePull; - // } - // return false; - // } - //} - //internal static class MCHExtensions - //{ - // private static uint lastBattery = 0; - // internal static uint LastSummonBattery(this MCHGauge gauge) - // { - // if (!CustomComboFunctions.InCombat() || ActionWatching.CombatActions.Count(x => x == CustomComboFunctions.OriginalHook(MCH.RookAutoturret)) == 0) - // lastBattery = 0; - - // if (ActionWatching.CombatActions.Count(x => x == CustomComboFunctions.OriginalHook(MCH.RookAutoturret)) > 0) - // lastBattery = gauge.LastSummonBatteryPower; - - // return lastBattery; - // } - //} + if (!CustomComboFunctions.InCombat()) + { + ResetOpener(); + CurrentState = OpenerState.PrePull; + } + return false; + } + } } \ No newline at end of file diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 4e4a7b098..fe6330e11 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -2,6 +2,7 @@ using Dalamud.Game.ClientState.JobGauge.Types; using System; using System.Linq; +using XIVSlothCombo.Combos.JobHelpers; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; @@ -10,7 +11,7 @@ namespace XIVSlothCombo.Combos.PvE { - internal static class MNK + internal class MNK { public const byte ClassID = 2; public const byte JobID = 20; @@ -22,7 +23,7 @@ public const uint Meditation = 36940, SteelPeak = 3547, TwinSnakes = 61, - ArmOfTheDestroyer = 25767, + ArmOfTheDestroyer = 62, Demolish = 66, Mantra = 65, DragonKick = 74, @@ -44,12 +45,17 @@ public const uint SixSidedStar = 16476, ShadowOfTheDestroyer = 25767, WindsReply = 36949, - LeapingOpo = 36942, + ForbiddenMeditation = 36942, + LeapingOpo = 36945, RisingRaptor = 36946, PouncingCoeurl = 36947, TrueNorth = 7546, FiresReply = 36950; + // MB Abilities for Opener + public const uint + ElixirField = 36948; + public static class Buffs { public const ushort @@ -258,6 +264,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim internal class MNK_ST_CustomMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_CustomCombo; + internal static MNKOpenerLogic MNKOpener = new(); protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { if (actionID == Bootshine || actionID == LeapingOpo) @@ -266,6 +273,12 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb var canWeaveChakra = CanWeave(actionID); var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + if (IsEnabled(CustomComboPreset.MNK_STUseLLOpener)) + { + if (MNKOpener.DoFullOpener(ref actionID)) + return actionID; + } + if (IsEnabled(CustomComboPreset.MNK_STUseMeditation) && (!inCombat || !InMeleeRange()) && Gauge.Chakra < 5 @@ -400,12 +413,29 @@ private uint DetermineCoreAbility(uint baseActionID) { if (HasEffect(Buffs.OpoOpoForm)) { - return Gauge.OpoOpoFury == 0 ? DragonKick : OriginalHook(Bootshine); + if (Gauge.OpoOpoFury == 0) + { + if (LevelChecked(Levels.DragonKick)) + return DragonKick; + } + else + { + OriginalHook(Bootshine); + } } if (HasEffect(Buffs.RaptorForm)) { - return Gauge.RaptorFury == 0 ? TwinSnakes : OriginalHook(TrueStrike); + if (Gauge.RaptorFury == 0) + { + if (LevelChecked(Levels.TwinSnakes)) + return TwinSnakes; + } + else + { + if (LevelChecked(Levels.TrueStrike)) + return OriginalHook(TrueStrike); + } } if (HasEffect(Buffs.CoerlForm)) @@ -424,7 +454,8 @@ private uint DetermineCoreAbility(uint baseActionID) } else { - return Demolish; + if (LevelChecked(Levels.Demolish)) + return Demolish; } } @@ -439,7 +470,8 @@ private uint DetermineCoreAbility(uint baseActionID) } else { - return OriginalHook(SnapPunch); + if (LevelChecked(Levels.SnapPunch)) + return OriginalHook(SnapPunch); } } From d7d77a948953453b0b729295550dea809713ac0d Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 20 Jul 2024 23:47:00 +0100 Subject: [PATCH 011/142] Mooooore fixes --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 23 +++--- XIVSlothCombo/Combos/PvE/MNK.cs | 100 ++++++++++++++++++++++--- 2 files changed, 102 insertions(+), 21 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index 392dacde7..81b6e511b 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -113,6 +113,9 @@ private bool DoOpener(ref uint actionID) if (currentState == OpenerState.InOpener) { + Svc.Log.Debug($"Opener Step: {OpenerStep}"); + Svc.Log.Debug($"Last Action: {ActionWatching.LastAction}"); + if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; @@ -136,8 +139,8 @@ private bool DoOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(RiddleOfFire) && OpenerStep == 7) OpenerStep++; else if (OpenerStep == 7) actionID = RiddleOfFire; - if (CustomComboFunctions.WasLastAction(ElixirField) && OpenerStep == 8) OpenerStep++; - else if (OpenerStep == 8) actionID = ElixirField; + if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = ElixirBurst; if (CustomComboFunctions.WasLastAction(RiddleOfWind) && OpenerStep == 9) OpenerStep++; else if (OpenerStep == 9) actionID = RiddleOfWind; @@ -166,8 +169,8 @@ private bool DoOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 17) OpenerStep++; else if (OpenerStep == 17) actionID = DragonKick; - if (CustomComboFunctions.WasLastAction(ElixirField) && OpenerStep == 18) OpenerStep++; - else if (OpenerStep == 18) actionID = ElixirField; + if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 18) OpenerStep++; + else if (OpenerStep == 18) actionID = ElixirBurst; if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 19) OpenerStep++; else if (OpenerStep == 19) actionID = LeapingOpo; @@ -178,17 +181,17 @@ private bool DoOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(Demolish) && OpenerStep == 21) OpenerStep++; else if (OpenerStep == 21) actionID = Demolish; - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 22) OpenerStep++; + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 22) CurrentState = OpenerState.OpenerFinished; else if (OpenerStep == 22) actionID = DragonKick; if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) CurrentState = OpenerState.FailedOpener; - if (((actionID == PerfectBalance && CustomComboFunctions.GetRemainingCharges(PerfectBalance) < 1) || - (actionID == RiddleOfFire && CustomComboFunctions.IsOnCooldown(RiddleOfFire)) || - (actionID == RiddleOfWind && CustomComboFunctions.IsOnCooldown(RiddleOfWind)) || - (actionID == Brotherhood && CustomComboFunctions.IsOnCooldown(Brotherhood)) - && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3)) + if (((actionID == PerfectBalance && CustomComboFunctions.GetRemainingCharges(PerfectBalance) == 0) && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) || + (OpenerStep is 7 && CustomComboFunctions.HasEffect(Buffs.RiddleOfFire)) || + (OpenerStep is 9 && CustomComboFunctions.HasEffect(Buffs.RiddleOfWind)) || + (OpenerStep is 6 && CustomComboFunctions.HasEffect(Buffs.Brotherhood)) + && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) { Svc.Log.Debug($"Failed at {actionID}"); CurrentState = OpenerState.FailedOpener; diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index fe6330e11..d75cb79a4 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -50,12 +50,9 @@ public const uint RisingRaptor = 36946, PouncingCoeurl = 36947, TrueNorth = 7546, + ElixirBurst = 36948, FiresReply = 36950; - // MB Abilities for Opener - public const uint - ElixirField = 36948; - public static class Buffs { public const ushort @@ -65,6 +62,7 @@ public const ushort CoerlForm = 109, PerfectBalance = 110, RiddleOfFire = 1181, + RiddleOfWind = 2687, LeadenFist = 1861, FormlessFist = 2513, DisciplinedFist = 3001, @@ -315,7 +313,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) && Gauge.Chakra == 5 - && level >= Levels.TheForbiddenChakra) + && level >= Levels.SteelPeak) { return OriginalHook(Meditation); } @@ -386,11 +384,48 @@ private uint DeterminePBAbility(uint baseActionID) { if (coeurlChakra) { - return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + if (Gauge.RaptorFury == 0) + { + if (LevelChecked(Levels.TwinSnakes)) + return TwinSnakes; + } + else + { + if (LevelChecked(Levels.TrueStrike)) + return OriginalHook(TrueStrike); + } } if (raptorChakra) { - return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + if (!OnTargetsRear() + && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && TargetNeedsPositionals() + && !HasEffect(Buffs.TrueNorth) + && LevelChecked(Levels.TrueNorth) + && HasCharges(TrueNorth)) + { + return TrueNorth; + } + else + { + if (LevelChecked(Levels.Demolish)) + return Demolish; + } + } + + if (!OnTargetsFlank() + && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && TargetNeedsPositionals() + && !HasEffect(Buffs.TrueNorth) + && LevelChecked(Levels.TrueNorth) + && HasCharges(TrueNorth)) + { + return TrueNorth; + } + else + { + if (LevelChecked(Levels.SnapPunch)) + return OriginalHook(SnapPunch); } } @@ -398,15 +433,58 @@ private uint DeterminePBAbility(uint baseActionID) { if (!raptorChakra) { - return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; + if (Gauge.RaptorFury == 0) + { + if (LevelChecked(Levels.TwinSnakes)) + return TwinSnakes; + } + else + { + if (LevelChecked(Levels.TrueStrike)) + return OriginalHook(TrueStrike); + } } if (!coeurlChakra) { - return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; + if (!OnTargetsRear() + && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && TargetNeedsPositionals() + && !HasEffect(Buffs.TrueNorth) + && LevelChecked(Levels.TrueNorth) + && HasCharges(TrueNorth)) + { + return TrueNorth; + } + else + { + if (LevelChecked(Levels.Demolish)) + return Demolish; + } + } + + if (!OnTargetsFlank() + && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && TargetNeedsPositionals() + && !HasEffect(Buffs.TrueNorth) + && LevelChecked(Levels.TrueNorth) + && HasCharges(TrueNorth)) + { + return TrueNorth; + } + else + { + if (LevelChecked(Levels.SnapPunch)) + return OriginalHook(SnapPunch); } } - return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; + if (Gauge.OpoOpoFury == 0) + { + if (LevelChecked(Levels.DragonKick)) + return DragonKick; + } + + return OriginalHook(Bootshine); } private uint DetermineCoreAbility(uint baseActionID) @@ -420,7 +498,7 @@ private uint DetermineCoreAbility(uint baseActionID) } else { - OriginalHook(Bootshine); + return OriginalHook(Bootshine); } } From f09cfed63939d57607bc105d329a5bf11b678517 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sun, 21 Jul 2024 01:36:21 +0100 Subject: [PATCH 012/142] No longer require exactly 5 chakra for TFC usage --- XIVSlothCombo/Combos/PvE/MNK.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index d75cb79a4..c81c05e69 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -312,7 +312,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } if (IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) - && Gauge.Chakra == 5 + && Gauge.Chakra >= 5 && level >= Levels.SteelPeak) { return OriginalHook(Meditation); From 85b803f776491c156bdd93ac25c331d59d33bd11 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Mon, 22 Jul 2024 19:48:39 +0100 Subject: [PATCH 013/142] Make PB logic just use LO --- XIVSlothCombo/Combos/PvE/MNK.cs | 163 +++++++++++--------------------- 1 file changed, 55 insertions(+), 108 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index c81c05e69..d175d3780 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -47,8 +47,6 @@ public const uint WindsReply = 36949, ForbiddenMeditation = 36942, LeapingOpo = 36945, - RisingRaptor = 36946, - PouncingCoeurl = 36947, TrueNorth = 7546, ElixirBurst = 36948, FiresReply = 36950; @@ -265,7 +263,7 @@ internal class MNK_ST_CustomMode : CustomCombo internal static MNKOpenerLogic MNKOpener = new(); protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - if (actionID == Bootshine || actionID == LeapingOpo) + if (actionID == 53 || actionID == 36945) { var canWeave = CanWeave(actionID, 0.5); var canWeaveChakra = CanWeave(actionID); @@ -378,112 +376,61 @@ private uint DeterminePBAbility(uint baseActionID) bool opoopoChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.OPOOPO); bool coeurlChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.COEURL); bool raptorChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.RAPTOR); - bool canSolar = Gauge.BeastChakra.Where(e => e == BeastChakra.OPOOPO).Count() != 2; - - if (opoopoChakra) - { - if (coeurlChakra) - { - if (Gauge.RaptorFury == 0) - { - if (LevelChecked(Levels.TwinSnakes)) - return TwinSnakes; - } - else - { - if (LevelChecked(Levels.TrueStrike)) - return OriginalHook(TrueStrike); - } - } - if (raptorChakra) - { - if (!OnTargetsRear() - && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - && TargetNeedsPositionals() - && !HasEffect(Buffs.TrueNorth) - && LevelChecked(Levels.TrueNorth) - && HasCharges(TrueNorth)) - { - return TrueNorth; - } - else - { - if (LevelChecked(Levels.Demolish)) - return Demolish; - } - } - - if (!OnTargetsFlank() - && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - && TargetNeedsPositionals() - && !HasEffect(Buffs.TrueNorth) - && LevelChecked(Levels.TrueNorth) - && HasCharges(TrueNorth)) - { - return TrueNorth; - } - else - { - if (LevelChecked(Levels.SnapPunch)) - return OriginalHook(SnapPunch); - } - } - - if (canSolar && (lunarNadi || !solarNadi)) - { - if (!raptorChakra) - { - if (Gauge.RaptorFury == 0) - { - if (LevelChecked(Levels.TwinSnakes)) - return TwinSnakes; - } - else - { - if (LevelChecked(Levels.TrueStrike)) - return OriginalHook(TrueStrike); - } - } - if (!coeurlChakra) - { - if (!OnTargetsRear() - && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - && TargetNeedsPositionals() - && !HasEffect(Buffs.TrueNorth) - && LevelChecked(Levels.TrueNorth) - && HasCharges(TrueNorth)) - { - return TrueNorth; - } - else - { - if (LevelChecked(Levels.Demolish)) - return Demolish; - } - } - - if (!OnTargetsFlank() - && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - && TargetNeedsPositionals() - && !HasEffect(Buffs.TrueNorth) - && LevelChecked(Levels.TrueNorth) - && HasCharges(TrueNorth)) - { - return TrueNorth; - } - else - { - if (LevelChecked(Levels.SnapPunch)) - return OriginalHook(SnapPunch); - } - } - - if (Gauge.OpoOpoFury == 0) - { - if (LevelChecked(Levels.DragonKick)) - return DragonKick; - } + //if (Gauge.OpoOpoFury != 0 && LevelChecked(Levels.FormShift) && !HasEffect(Buffs.FormlessFist)) + //{ + // return OriginalHook(FormShift); + //} + + //// Doesn't have Raptor + //if (!raptorChakra) + //{ + // if (Gauge.RaptorFury == 0) + // { + // if (LevelChecked(Levels.TwinSnakes)) + // return TwinSnakes; + // } + // else + // { + // if (LevelChecked(Levels.TrueStrike)) + // return OriginalHook(TrueStrike); + // } + //} + + //// Has Raptor, but not Coeurl + //if (!coeurlChakra) + //{ + // if (!OnTargetsRear() + // && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + // && TargetNeedsPositionals() + // && !HasEffect(Buffs.TrueNorth) + // && LevelChecked(Levels.TrueNorth) + // && HasCharges(TrueNorth)) + // { + // return TrueNorth; + // } + // else + // { + // if (LevelChecked(Levels.Demolish)) + // return Demolish; + // } + //} + //if (!OnTargetsFlank() + // && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + // && TargetNeedsPositionals() + // && !HasEffect(Buffs.TrueNorth) + // && LevelChecked(Levels.TrueNorth) + // && HasCharges(TrueNorth)) + //{ + // return TrueNorth; + //} + //else + //{ + // if (LevelChecked(Levels.SnapPunch)) + // return OriginalHook(SnapPunch); + //} + + // Has Raptor and Coeurl at this point, get an opo-opo return OriginalHook(Bootshine); } From 9775ca36fd5d694c3026d95711077aeb78d75b53 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 31 Jul 2024 19:29:57 +0100 Subject: [PATCH 014/142] rebase --- XIVSlothCombo/Combos/CustomComboPreset.cs | 38 +- XIVSlothCombo/Combos/PvE/MNK.cs | 700 +++++++++---------- XIVSlothCombo/Window/Functions/UserConfig.cs | 6 +- 3 files changed, 369 insertions(+), 375 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 93c848ba2..af21467ed 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1836,31 +1836,32 @@ public enum CustomComboPreset [ReplaceSkill([MNK.Bootshine])] [CustomComboInfo("Basic ST Rotation", "Basic Monk Combo on one button", MNK.JobID)] - [ConflictingCombos(MNK_CustomCombo)] - MNK_BasicCombo = 9002, - + [ConflictingCombos(MNK_ST_AdvancedMode)] + MNK_ST_BasicMode = 9002, + [ReplaceSkill([MNK.ArmOfTheDestroyer])] [CustomComboInfo("AOE Rotation", "Basic Monk AOE Combo on one button", MNK.JobID)] - MNK_BasicAOECombo = 9003, + MNK_AOE_BasicMode = 9003, - [ParentCombo(MNK_BasicAOECombo)] + [ParentCombo(MNK_AOE_BasicMode)] [CustomComboInfo("Use Cooldowns Option", "Use large cooldowns during AOE rotation", MNK.JobID)] MNK_BasicAOECombo_UseCooldowns = 9004, + #region Monk Advanced ST [ReplaceSkill([MNK.Bootshine])] [CustomComboInfo("Custom ST Rotation", "Advanced Monk Combo on one button", MNK.JobID)] - [ConflictingCombos(MNK_BasicCombo)] - MNK_CustomCombo = 9005, + [ConflictingCombos(MNK_ST_BasicMode)] + MNK_ST_AdvancedMode = 9005, - [ParentCombo(MNK_CustomCombo)] + [ParentCombo(MNK_ST_AdvancedMode)] [CustomComboInfo("Use Double Lunar Opener", "Uses Double Lunar opener", MNK.JobID)] MNK_STUseLLOpener = 9006, - [ParentCombo(MNK_CustomCombo)] + [ParentCombo(MNK_ST_AdvancedMode)] [CustomComboInfo("Use Meditation", "Uses Meditation when out of combat/range", MNK.JobID)] MNK_STUseMeditation = 9007, - [ParentCombo(MNK_CustomCombo)] + [ParentCombo(MNK_ST_AdvancedMode)] [CustomComboInfo("Buffs", "Use Buffs on cooldown", MNK.JobID)] MNK_STUseBuffs = 9008, @@ -1876,15 +1877,15 @@ public enum CustomComboPreset [CustomComboInfo("Use Riddle of Fire", "Use Riddle of Fire", MNK.JobID)] MNK_STUseROF = 9011, - [ParentCombo(MNK_CustomCombo)] + [ParentCombo(MNK_ST_AdvancedMode)] [CustomComboInfo("Use The Forbidden Chakra", "Use The Forbidden Chakra", MNK.JobID)] MNK_STUseTheForbiddenChakra = 9012, - [ParentCombo(MNK_CustomCombo)] + [ParentCombo(MNK_ST_AdvancedMode)] [CustomComboInfo("Use Perfect Balance", "Use Perfect Balance and Masterful Blitz", MNK.JobID)] MNK_STUsePerfectBalance = 9013, - [ParentCombo(MNK_CustomCombo)] + [ParentCombo(MNK_ST_AdvancedMode)] [CustomComboInfo("Use True North", "Use True North dynamically when not in positional", MNK.JobID)] MNK_STUseTrueNorth = 9014, @@ -1896,10 +1897,21 @@ public enum CustomComboPreset [CustomComboInfo("Use Fire's Reply", "Use Fire's Reply", MNK.JobID)] MNK_STUseFiresReply = 9016, + [ParentCombo(MNK_ST_AdvancedMode)] + [CustomComboInfo("Use Form Shift", "Uses Form Shift", MNK.JobID)] + MNK_STUseFormShift = 9017, + + [ParentCombo(MNK_ST_AdvancedMode)] + [CustomComboInfo("Combo Heals Option", "Adds Bloodbath and Second Wind to the rotation.", MNK.JobID)] + MNK_ST_ComboHeals = 9018, + // Last value = 9031 #endregion + // End Monk + #endregion + #region NINJA [ReplaceSkill(NIN.SpinningEdge)] diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index d175d3780..7fde42c3f 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -1,5 +1,6 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; +using ECommons.DalamudServices; using System; using System.Linq; using XIVSlothCombo.Combos.JobHelpers; @@ -61,9 +62,7 @@ public const ushort PerfectBalance = 110, RiddleOfFire = 1181, RiddleOfWind = 2687, - LeadenFist = 1861, FormlessFist = 2513, - DisciplinedFist = 3001, TrueNorth = 1250, WindsRumination = 3842, FiresRumination = 3843, @@ -102,173 +101,24 @@ public const byte public static class Config { - public const string - MNK_STSecondWindThreshold = "MNK_STSecondWindThreshold", - MNK_STBloodbathThreshold = "MNK_STBloodbathThreshold", - MNK_AoESecondWindThreshold = "MNK_AoESecondWindThreshold", - MNK_AoEBloodbathThreshold = "MNK_AoEBloodbathThreshold", - MNK_VariantCure = "MNK_VariantCure"; + public static UserInt + MNK_ST_SecondWind_Threshold = new("MNK_ST_SecondWindThreshold", 25), + MNK_ST_Bloodbath_Threshold = new("MNK_ST_BloodbathThreshold", 40), + MNK_AoE_SecondWind_Threshold = new("MNK_AoE_SecondWindThreshold", 25), + MNK_AoE_Bloodbath_Threshold = new("MNK_AoE_BloodbathThreshold", 40); } - internal class MNK_AoE_SimpleMode : CustomCombo + internal class MNK_ST_AdvancedMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicAOECombo; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == ArmOfTheDestroyer || actionID == ShadowOfTheDestroyer) - { - var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); - var gauge = GetJobGauge(); - var canWeave = CanWeave(actionID, 0.5); - var canWeaveChakra = CanWeave(actionID); - var pbStacks = FindEffectAny(Buffs.PerfectBalance); - var lunarNadi = gauge.Nadi == Nadi.LUNAR; - var nadiNONE = gauge.Nadi == Nadi.NONE; - - if (!inCombat) - { - if (gauge.Chakra < 5 && level >= Levels.Meditation) - { - return OriginalHook(Meditation); ; - } - } - - if (IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.MNK_VariantCure)) - return Variant.VariantCure; - - // Buffs - if (inCombat && canWeave) - { - if (IsEnabled(Variant.VariantRampart) && - IsOffCooldown(Variant.VariantRampart)) - return Variant.VariantRampart; - - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) - { - return RiddleOfFire; - } - - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) - { - // Use Perfect Balance if: - // 1. It's after Bootshine/Dragon Kick. - // 2. At max stacks / before overcap. - // 3. During Brotherhood. - // 4. During Riddle of Fire. - // 5. Prepare Masterful Blitz for the Riddle of Fire & Brotherhood window. - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) - { - return PerfectBalance; - } - } - - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) - { - return Brotherhood; - } - - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) - { - return RiddleOfWind; - } - - if (Gauge.Chakra == 5 - && level >= Levels.HowlingFist - && HasBattleTarget()) - { - return OriginalHook(EnlightenedMeditation); - } - - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoESecondWindThreshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) - return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoEBloodbathThreshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) - return All.Bloodbath; - } - - if (inCombat) - { - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply) - { - return WindsReply; - } - - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply) - { - return FiresReply; - } - - // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) - { - return OriginalHook(MasterfulBlitz); - } - - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) - { - if (nadiNONE || !lunarNadi) - { - if (pbStacks?.StackCount > 0) - { - return level >= Levels.ShadowOfTheDestroyer ? ShadowOfTheDestroyer : Rockbreaker; - } - } - if (lunarNadi) - { - switch (pbStacks?.StackCount) - { - case 3: - return OriginalHook(ArmOfTheDestroyer); - case 2: - return FourPointFury; - case 1: - return Rockbreaker; - } - } - } - - // Monk Rotation - if (HasEffect(Buffs.OpoOpoForm)) - { - return OriginalHook(ArmOfTheDestroyer); - } - - if (HasEffect(Buffs.RaptorForm)) - { - if (FourPointFury.LevelChecked()) - return FourPointFury; - - if (TwinSnakes.LevelChecked()) - return TwinSnakes; - } - - if (HasEffect(Buffs.CoerlForm) && level >= Levels.Rockbreaker) - { - return Rockbreaker; - } - } - } - return actionID; - } - } - - internal class MNK_ST_CustomMode : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_CustomCombo; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_AdvancedMode; internal static MNKOpenerLogic MNKOpener = new(); protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { + var canWeave = CanWeave(actionID, 0.5); + var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + if (actionID == 53 || actionID == 36945) { - var canWeave = CanWeave(actionID, 0.5); - var canWeaveChakra = CanWeave(actionID); - var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); - if (IsEnabled(CustomComboPreset.MNK_STUseLLOpener)) { if (MNKOpener.DoFullOpener(ref actionID)) @@ -283,6 +133,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(Meditation); } + // OGCDs if (inCombat && canWeave) { if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) @@ -294,19 +145,19 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return Brotherhood; } - if (IsEnabled(CustomComboPreset.MNK_STUseROW) - && level >= Levels.RiddleOfWind - && !IsOnCooldown(RiddleOfWind)) - { - return RiddleOfWind; - } - if (IsEnabled(CustomComboPreset.MNK_STUseROF) && level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) { return RiddleOfFire; } + + if (IsEnabled(CustomComboPreset.MNK_STUseROW) + && level >= Levels.RiddleOfWind + && !IsOnCooldown(RiddleOfWind)) + { + return RiddleOfWind; + } } if (IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) @@ -315,24 +166,16 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { return OriginalHook(Meditation); } + + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + return All.SecondWind; + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + return All.Bloodbath; } + // GCDs if (inCombat) { - if (IsEnabled(CustomComboPreset.MNK_STUseWindsReply) - && HasEffect(Buffs.WindsRumination) - && level >= Levels.WindsReply) - { - return WindsReply; - } - - if (IsEnabled(CustomComboPreset.MNK_STUseFiresReply) - && HasEffect(Buffs.FiresRumination) - && level >= Levels.FiresReply) - { - return FiresReply; - } - if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { // Masterful Blitz @@ -344,11 +187,11 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // Perfect Balance if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) { - if ((GetRemainingCharges(PerfectBalance) == 2) || + if (((GetRemainingCharges(PerfectBalance) == 2) || (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f && WasLastWeaponskill(LeapingOpo)))) { return PerfectBalance; } @@ -357,195 +200,295 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // Perfect Balance if (HasEffect(Buffs.PerfectBalance)) { - return DeterminePBAbility(actionID); + var solarNadi = Gauge.Nadi == Nadi.SOLAR; + var lunarNadi = Gauge.Nadi == Nadi.LUNAR; + var opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); + var raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); + var coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); + + #region Open Solar + if (!solarNadi) + { + if (opoOpoChakra == 0) + { + if (Gauge.OpoOpoFury == 0) + return OriginalHook(DragonKick); + return OriginalHook(Bootshine); + } + else if (raptorChakra == 0) + { + if (Gauge.RaptorFury == 0) + return OriginalHook(TwinSnakes); + return OriginalHook(TrueStrike); + } + else if (coeurlChakra == 0) + { + if (Gauge.CoeurlFury == 0) + return OriginalHook(Demolish); + return OriginalHook(SnapPunch); + } + } + #endregion + #region Open Lunar + if (solarNadi || lunarNadi) + { + if (Gauge.OpoOpoFury == 0) + return OriginalHook(DragonKick); + + return OriginalHook(Bootshine); + } + #endregion } } + if (IsEnabled(CustomComboPreset.MNK_STUseWindsReply) + && HasEffect(Buffs.WindsRumination) + && level >= Levels.WindsReply) + { + return WindsReply; + } + + if (IsEnabled(CustomComboPreset.MNK_STUseFiresReply) + && HasEffect(Buffs.FiresRumination) + && level >= Levels.FiresReply) + { + return FiresReply; + } + + // Standard Balls return DetermineCoreAbility(actionID); } } return actionID; } + } - private uint DeterminePBAbility(uint baseActionID) + internal class MNK_ST_SimpleMode : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_BasicMode; + internal static MNKOpenerLogic MNKOpener = new(); + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - var lunarNadi = Gauge.Nadi == Nadi.LUNAR; - var solarNadi = Gauge.Nadi == Nadi.SOLAR; - - bool opoopoChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.OPOOPO); - bool coeurlChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.COEURL); - bool raptorChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.RAPTOR); - - //if (Gauge.OpoOpoFury != 0 && LevelChecked(Levels.FormShift) && !HasEffect(Buffs.FormlessFist)) - //{ - // return OriginalHook(FormShift); - //} - - //// Doesn't have Raptor - //if (!raptorChakra) - //{ - // if (Gauge.RaptorFury == 0) - // { - // if (LevelChecked(Levels.TwinSnakes)) - // return TwinSnakes; - // } - // else - // { - // if (LevelChecked(Levels.TrueStrike)) - // return OriginalHook(TrueStrike); - // } - //} - - //// Has Raptor, but not Coeurl - //if (!coeurlChakra) - //{ - // if (!OnTargetsRear() - // && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - // && TargetNeedsPositionals() - // && !HasEffect(Buffs.TrueNorth) - // && LevelChecked(Levels.TrueNorth) - // && HasCharges(TrueNorth)) - // { - // return TrueNorth; - // } - // else - // { - // if (LevelChecked(Levels.Demolish)) - // return Demolish; - // } - //} - //if (!OnTargetsFlank() - // && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - // && TargetNeedsPositionals() - // && !HasEffect(Buffs.TrueNorth) - // && LevelChecked(Levels.TrueNorth) - // && HasCharges(TrueNorth)) - //{ - // return TrueNorth; - //} - //else - //{ - // if (LevelChecked(Levels.SnapPunch)) - // return OriginalHook(SnapPunch); - //} - - // Has Raptor and Coeurl at this point, get an opo-opo - return OriginalHook(Bootshine); - } + var canWeave = CanWeave(actionID, 0.5); + var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); - private uint DetermineCoreAbility(uint baseActionID) - { - if (HasEffect(Buffs.OpoOpoForm)) + if (actionID == 53 || actionID == 36945) { - if (Gauge.OpoOpoFury == 0) - { - if (LevelChecked(Levels.DragonKick)) - return DragonKick; - } - else - { - return OriginalHook(Bootshine); - } - } + if (MNKOpener.DoFullOpener(ref actionID)) + return actionID; - if (HasEffect(Buffs.RaptorForm)) - { - if (Gauge.RaptorFury == 0) + if ((!inCombat || !InMeleeRange()) + && Gauge.Chakra < 5 + && LevelChecked(Meditation)) { - if (LevelChecked(Levels.TwinSnakes)) - return TwinSnakes; + return OriginalHook(Meditation); } - else + + // OGCDs + if (inCombat && canWeave) { - if (LevelChecked(Levels.TrueStrike)) - return OriginalHook(TrueStrike); + if (level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } + + if (level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire)) + { + return RiddleOfFire; + } + + if (level >= Levels.RiddleOfWind + && !IsOnCooldown(RiddleOfWind)) + { + return RiddleOfWind; + } + + if (Gauge.Chakra >= 5 + && level >= Levels.SteelPeak) + { + return OriginalHook(Meditation); + } + + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + return All.SecondWind; + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + return All.Bloodbath; } - } - if (HasEffect(Buffs.CoerlForm)) - { - // Can we warn about the positional here? - if (Gauge.CoeurlFury == 0) + // GCDs + if (inCombat) { - if (!OnTargetsRear() - && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - && TargetNeedsPositionals() - && !HasEffect(Buffs.TrueNorth) - && LevelChecked(Levels.TrueNorth) - && HasCharges(TrueNorth)) + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) { - return TrueNorth; + return OriginalHook(MasterfulBlitz); } - else + + // Perfect Balance + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) { - if (LevelChecked(Levels.Demolish)) - return Demolish; + if (((GetRemainingCharges(PerfectBalance) == 2) || + (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f && WasLastWeaponskill(LeapingOpo)))) + { + return PerfectBalance; + } + } + + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) + { + var solarNadi = Gauge.Nadi == Nadi.SOLAR; + var lunarNadi = Gauge.Nadi == Nadi.LUNAR; + var opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); + var raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); + var coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); + + #region Open Solar + if (!solarNadi) + { + if (opoOpoChakra == 0) + { + if (Gauge.OpoOpoFury == 0) + return OriginalHook(DragonKick); + return OriginalHook(Bootshine); + } + else if (raptorChakra == 0) + { + if (Gauge.RaptorFury == 0) + return OriginalHook(TwinSnakes); + return OriginalHook(TrueStrike); + } + else if (coeurlChakra == 0) + { + if (Gauge.CoeurlFury == 0) + return OriginalHook(Demolish); + return OriginalHook(SnapPunch); + } + } + #endregion + #region Open Lunar + if (solarNadi || lunarNadi) + { + if (Gauge.OpoOpoFury == 0) + return OriginalHook(DragonKick); + + return OriginalHook(Bootshine); + } + #endregion } } - if (!OnTargetsFlank() - && IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - && TargetNeedsPositionals() - && !HasEffect(Buffs.TrueNorth) - && LevelChecked(Levels.TrueNorth) - && HasCharges(TrueNorth)) + if (HasEffect(Buffs.WindsRumination) + && level >= Levels.WindsReply) { - return TrueNorth; + return WindsReply; } - else + + if (HasEffect(Buffs.FiresRumination) + && level >= Levels.FiresReply) { - if (LevelChecked(Levels.SnapPunch)) - return OriginalHook(SnapPunch); + return FiresReply; } + } - return baseActionID; + // Standard Balls + return DetermineCoreAbility(actionID); } } - internal class MNK_ST_SimpleMode : CustomCombo + internal class MNK_AoE_SimpleMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_BasicCombo; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_AOE_BasicMode; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID == Bootshine || actionID == LeapingOpo) + if (actionID == ArmOfTheDestroyer || actionID == ShadowOfTheDestroyer) { var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + var gauge = GetJobGauge(); var canWeave = CanWeave(actionID, 0.5); - var canDelayedWeave = CanWeave(actionID, 0.0) && GetCooldown(actionID).CooldownRemaining < 0.7; + var canWeaveChakra = CanWeave(actionID); var pbStacks = FindEffectAny(Buffs.PerfectBalance); + var lunarNadi = gauge.Nadi == Nadi.LUNAR; + var nadiNONE = gauge.Nadi == Nadi.NONE; - // Buffs if (!inCombat) { - if (Gauge.Chakra < 5 && level >= Levels.Meditation) + if (gauge.Chakra < 5 && level >= Levels.Meditation) { - return OriginalHook(Meditation); + return OriginalHook(Meditation); ; } } - if (inCombat) + // Buffs + if (inCombat && canWeave) { - if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) + if (IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart)) + return Variant.VariantRampart; + + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) + { + return RiddleOfFire; + } + + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) + { + // Use Perfect Balance if: + // 1. It's after Bootshine/Dragon Kick. + // 2. At max stacks / before overcap. + // 3. During Brotherhood. + // 4. During Riddle of Fire. + // 5. Prepare Masterful Blitz for the Riddle of Fire & Brotherhood window. + if ((GetRemainingCharges(PerfectBalance) == 2) || + (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || + (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + { + return PerfectBalance; + } + } + + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) { return Brotherhood; } - if (level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) { return RiddleOfWind; } - if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) + if (Gauge.Chakra == 5 + && level >= Levels.HowlingFist + && HasBattleTarget()) { - return RiddleOfFire; + return OriginalHook(EnlightenedMeditation); } - if (Gauge.Chakra == 5 && level >= Levels.SteelPeak) + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoE_SecondWind_Threshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + return All.SecondWind; + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoE_Bloodbath_Threshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + return All.Bloodbath; + } + + if (inCombat) + { + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply) { - return OriginalHook(TheForbiddenChakra); + return WindsReply; + } + + if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply) + { + return FiresReply; } // Masterful Blitz @@ -555,87 +498,122 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } // Perfect Balance - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + if (HasEffect(Buffs.PerfectBalance)) { - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + if (nadiNONE || !lunarNadi) { - return PerfectBalance; + if (pbStacks?.StackCount > 0) + { + return level >= Levels.ShadowOfTheDestroyer ? ShadowOfTheDestroyer : Rockbreaker; + } + } + if (lunarNadi) + { + switch (pbStacks?.StackCount) + { + case 3: + return OriginalHook(ArmOfTheDestroyer); + case 2: + return FourPointFury; + case 1: + return Rockbreaker; + } } } - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) + // Monk Rotation + if (HasEffect(Buffs.OpoOpoForm)) { - return DeterminePBAbility(actionID); + return OriginalHook(ArmOfTheDestroyer); } - return DetermineCoreAbility(actionID); + if (HasEffect(Buffs.RaptorForm)) + { + if (FourPointFury.LevelChecked()) + return FourPointFury; + + if (TwinSnakes.LevelChecked()) + return TwinSnakes; + } + + if (HasEffect(Buffs.CoerlForm) && level >= Levels.Rockbreaker) + { + return Rockbreaker; + } } } return actionID; } + } - private uint DeterminePBAbility(uint baseActionID) + public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnabled = true) + { + if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm)) { - var lunarNadi = Gauge.Nadi == Nadi.LUNAR; - var solarNadi = Gauge.Nadi == Nadi.SOLAR; - - bool opoopoChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.OPOOPO); - bool coeurlChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.COEURL); - bool raptorChakra = Array.Exists(Gauge.BeastChakra, e => e == BeastChakra.RAPTOR); - bool canSolar = Gauge.BeastChakra.Where(e => e == BeastChakra.OPOOPO).Count() != 2; - - if (opoopoChakra) + if (Gauge.OpoOpoFury == 0) { - if (coeurlChakra) - { - return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; - } - if (raptorChakra) - { - return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; - } + if (CustomComboFunctions.LevelChecked(Levels.DragonKick)) + return DragonKick; } - - if (canSolar && (lunarNadi || !solarNadi)) + else { - if (!raptorChakra) - { - return Gauge.RaptorFury == 0 ? TwinSnakes : TrueStrike; - } - if (!coeurlChakra) - { - return Gauge.CoeurlFury == 0 ? Demolish : SnapPunch; - } + return CustomComboFunctions.OriginalHook(Bootshine); } - - return Gauge.OpoOpoFury == 0 ? DragonKick : Bootshine; } - private uint DetermineCoreAbility(uint baseActionID) + if (CustomComboFunctions.HasEffect(Buffs.RaptorForm)) { - if (HasEffect(Buffs.OpoOpoForm)) + if (Gauge.RaptorFury == 0) { - return Gauge.OpoOpoFury == 0 ? DragonKick : OriginalHook(Bootshine); + if (CustomComboFunctions.LevelChecked(Levels.TwinSnakes)) + return TwinSnakes; } - - if (HasEffect(Buffs.RaptorForm)) + else { - return Gauge.RaptorFury == 0 ? TwinSnakes : OriginalHook(TrueStrike); + if (CustomComboFunctions.LevelChecked(Levels.TrueStrike)) + return CustomComboFunctions.OriginalHook(TrueStrike); } + } - if (HasEffect(Buffs.CoerlForm)) + if (CustomComboFunctions.HasEffect(Buffs.CoerlForm)) + { + if (Gauge.CoeurlFury == 0) { - // Can we warn about the positional here? - return Gauge.CoeurlFury == 0 ? Demolish : OriginalHook(SnapPunch); + if (!CustomComboFunctions.OnTargetsRear() + && CustomComboFunctions.IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && CustomComboFunctions.TargetNeedsPositionals() + && !CustomComboFunctions.HasEffect(Buffs.TrueNorth) + && CustomComboFunctions.LevelChecked(Levels.TrueNorth) + && CustomComboFunctions.HasCharges(TrueNorth) + && useTrueNorthIfEnabled) + { + return TrueNorth; + } + else + { + if (CustomComboFunctions.LevelChecked(Levels.Demolish)) + return Demolish; + } } - return baseActionID; + if (!CustomComboFunctions.OnTargetsFlank() + && CustomComboFunctions.IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) + && CustomComboFunctions.TargetNeedsPositionals() + && !CustomComboFunctions.HasEffect(Buffs.TrueNorth) + && CustomComboFunctions.LevelChecked(Levels.TrueNorth) + && CustomComboFunctions.HasCharges(TrueNorth) + && useTrueNorthIfEnabled) + { + return TrueNorth; + } + else + { + if (CustomComboFunctions.LevelChecked(Levels.SnapPunch)) + return CustomComboFunctions.OriginalHook(SnapPunch); + } } + + return actionId; } } } \ No newline at end of file diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index 594090962..c16d0cfdc 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1615,7 +1615,11 @@ internal static void Draw(CustomComboPreset preset, bool enabled) // ==================================================================================== #region MONK - + if (preset == CustomComboPreset.MNK_ST_ComboHeals) + { + UserConfig.DrawSliderInt(0, 100, MNK.Config.MNK_ST_SecondWind_Threshold, "Second Wind HP percentage threshold (0 = Disabled)", 150, SliderIncrements.Ones); + UserConfig.DrawSliderInt(0, 100, MNK.Config.MNK_ST_Bloodbath_Threshold, "Bloodbath HP percentage threshold (0 = Disabled)", 150, SliderIncrements.Ones); + } #endregion // ==================================================================================== From e6527ccf2bab7315a07169566a15476b5522de45 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Tue, 23 Jul 2024 12:50:05 +0100 Subject: [PATCH 015/142] Add SL Opener & update to newly released openers --- XIVSlothCombo/Combos/CustomComboPreset.cs | 4 +- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 140 +++++++++++++++---- XIVSlothCombo/Combos/PvE/MNK.cs | 10 +- XIVSlothCombo/Window/Functions/UserConfig.cs | 6 + 4 files changed, 124 insertions(+), 36 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index af21467ed..0b39659b6 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1854,8 +1854,8 @@ public enum CustomComboPreset MNK_ST_AdvancedMode = 9005, [ParentCombo(MNK_ST_AdvancedMode)] - [CustomComboInfo("Use Double Lunar Opener", "Uses Double Lunar opener", MNK.JobID)] - MNK_STUseLLOpener = 9006, + [CustomComboInfo("Use Opener", "Uses selected opener", MNK.JobID)] + MNK_STUseOpener = 9006, [ParentCombo(MNK_ST_AdvancedMode)] [CustomComboInfo("Use Meditation", "Uses Meditation when out of combat/range", MNK.JobID)] diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index 81b6e511b..911c45f0b 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -106,16 +106,97 @@ private bool DoPrePullSteps(ref uint actionID) return false; } - private bool DoOpener(ref uint actionID) + private bool DoSLOpener(ref uint actionID) { if (!LevelChecked) return false; if (currentState == OpenerState.InOpener) { - Svc.Log.Debug($"Opener Step: {OpenerStep}"); - Svc.Log.Debug($"Last Action: {ActionWatching.LastAction}"); + if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 1) OpenerStep++; + else if (OpenerStep == 1) actionID = PerfectBalance; + + if (CustomComboFunctions.WasLastAction(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = TheForbiddenChakra; + + if (CustomComboFunctions.WasLastAction(TwinSnakes) && OpenerStep == 3) OpenerStep++; + else if (OpenerStep == 3) actionID = TwinSnakes; + + if (CustomComboFunctions.WasLastAction(Demolish) && OpenerStep == 4) OpenerStep++; + else if (OpenerStep == 4) actionID = Demolish; + + if (CustomComboFunctions.WasLastAction(Brotherhood) && OpenerStep == 5) OpenerStep++; + else if (OpenerStep == 5) actionID = Brotherhood; + + if (CustomComboFunctions.WasLastAction(RiddleOfFire) && OpenerStep == 6) OpenerStep++; + else if (OpenerStep == 6) actionID = RiddleOfFire; + + // Pot + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = LeapingOpo; + + if (CustomComboFunctions.WasLastAction(RiddleOfWind) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = RiddleOfWind; + + if (CustomComboFunctions.WasLastAction(RisingPhoenix) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) actionID = RisingPhoenix; + + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 10) OpenerStep++; + else if (OpenerStep == 10) actionID = DragonKick; + + if (CustomComboFunctions.WasLastAction(FiresReply) && OpenerStep == 11) OpenerStep++; + else if (OpenerStep == 11) actionID = FiresReply; + + if (CustomComboFunctions.WasLastAction(WindsReply) && OpenerStep == 12) OpenerStep++; + else if (OpenerStep == 12) actionID = WindsReply; + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 13) OpenerStep++; + else if (OpenerStep == 13) actionID = LeapingOpo; + + if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 14) OpenerStep++; + else if (OpenerStep == 14) actionID = PerfectBalance; + + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 15) OpenerStep++; + else if (OpenerStep == 15) actionID = DragonKick; + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 16) OpenerStep++; + else if (OpenerStep == 16) actionID = LeapingOpo; + + if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 17) OpenerStep++; + else if (OpenerStep == 17) actionID = DragonKick; + + if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 18) OpenerStep++; + else if (OpenerStep == 18) actionID = ElixirBurst; + + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == 19) actionID = LeapingOpo; + if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) + CurrentState = OpenerState.FailedOpener; + + if (((actionID == PerfectBalance && CustomComboFunctions.GetRemainingCharges(PerfectBalance) == 0) && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) || + (OpenerStep is 6 && CustomComboFunctions.HasEffect(Buffs.RiddleOfFire)) || + (OpenerStep is 8 && CustomComboFunctions.HasEffect(Buffs.RiddleOfWind)) || + (OpenerStep is 5 && CustomComboFunctions.HasEffect(Buffs.Brotherhood)) + && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) + { + Svc.Log.Debug($"Failed at {actionID}"); + CurrentState = OpenerState.FailedOpener; + return false; + } + return true; + } + return false; + } + + private bool DoLLOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (currentState == OpenerState.InOpener) + { if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; @@ -128,22 +209,22 @@ private bool DoOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 4) OpenerStep++; else if (OpenerStep == 4) actionID = DragonKick; - // Pot + if (CustomComboFunctions.WasLastAction(Brotherhood) && OpenerStep == 5) OpenerStep++; + else if (OpenerStep == 5) actionID = Brotherhood; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 5) OpenerStep++; - else if (OpenerStep == 5) actionID = LeapingOpo; + if (CustomComboFunctions.WasLastAction(RiddleOfFire) && OpenerStep == 6) OpenerStep++; + else if (OpenerStep == 6) actionID = RiddleOfFire; - if (CustomComboFunctions.WasLastAction(Brotherhood) && OpenerStep == 6) OpenerStep++; - else if (OpenerStep == 6) actionID = Brotherhood; + // Pot - if (CustomComboFunctions.WasLastAction(RiddleOfFire) && OpenerStep == 7) OpenerStep++; - else if (OpenerStep == 7) actionID = RiddleOfFire; + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 8) OpenerStep++; - else if (OpenerStep == 8) actionID = ElixirBurst; + if (CustomComboFunctions.WasLastAction(RiddleOfWind) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = RiddleOfWind; - if (CustomComboFunctions.WasLastAction(RiddleOfWind) && OpenerStep == 9) OpenerStep++; - else if (OpenerStep == 9) actionID = RiddleOfWind; + if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) actionID = ElixirBurst; if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 10) OpenerStep++; else if (OpenerStep == 10) actionID = DragonKick; @@ -172,25 +253,16 @@ private bool DoOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 18) OpenerStep++; else if (OpenerStep == 18) actionID = ElixirBurst; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 19) OpenerStep++; + if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; else if (OpenerStep == 19) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(TwinSnakes) && OpenerStep == 20) OpenerStep++; - else if (OpenerStep == 20) actionID = TwinSnakes; - - if (CustomComboFunctions.WasLastAction(Demolish) && OpenerStep == 21) OpenerStep++; - else if (OpenerStep == 21) actionID = Demolish; - - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 22) CurrentState = OpenerState.OpenerFinished; - else if (OpenerStep == 22) actionID = DragonKick; - if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) CurrentState = OpenerState.FailedOpener; if (((actionID == PerfectBalance && CustomComboFunctions.GetRemainingCharges(PerfectBalance) == 0) && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) || - (OpenerStep is 7 && CustomComboFunctions.HasEffect(Buffs.RiddleOfFire)) || - (OpenerStep is 9 && CustomComboFunctions.HasEffect(Buffs.RiddleOfWind)) || - (OpenerStep is 6 && CustomComboFunctions.HasEffect(Buffs.Brotherhood)) + (OpenerStep is 6 && CustomComboFunctions.HasEffect(Buffs.RiddleOfFire)) || + (OpenerStep is 8 && CustomComboFunctions.HasEffect(Buffs.RiddleOfWind)) || + (OpenerStep is 5 && CustomComboFunctions.HasEffect(Buffs.Brotherhood)) && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) { Svc.Log.Debug($"Failed at {actionID}"); @@ -208,7 +280,7 @@ private void ResetOpener() OpenerStep = 0; } - public bool DoFullOpener(ref uint actionID) + public bool DoFullOpener(ref uint actionID, int selectedOpener) { if (!LevelChecked) return false; @@ -219,8 +291,16 @@ public bool DoFullOpener(ref uint actionID) if (CurrentState == OpenerState.InOpener) { - if (DoOpener(ref actionID)) - return true; + if (selectedOpener == 1) + { + if (DoLLOpener(ref actionID)) + return true; + } + else if (selectedOpener == 2) + { + if (DoSLOpener(ref actionID)) + return true; + } } if (!CustomComboFunctions.InCombat()) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 7fde42c3f..63f2d9322 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -45,6 +45,7 @@ public const uint Enlightenment = 16474, SixSidedStar = 16476, ShadowOfTheDestroyer = 25767, + RisingPhoenix = 25768, WindsReply = 36949, ForbiddenMeditation = 36942, LeapingOpo = 36945, @@ -105,7 +106,8 @@ public static UserInt MNK_ST_SecondWind_Threshold = new("MNK_ST_SecondWindThreshold", 25), MNK_ST_Bloodbath_Threshold = new("MNK_ST_BloodbathThreshold", 40), MNK_AoE_SecondWind_Threshold = new("MNK_AoE_SecondWindThreshold", 25), - MNK_AoE_Bloodbath_Threshold = new("MNK_AoE_BloodbathThreshold", 40); + MNK_AoE_Bloodbath_Threshold = new("MNK_AoE_BloodbathThreshold", 40), + MNK_SelectedOpener = new("MNK_SelectedOpener"); } internal class MNK_ST_AdvancedMode : CustomCombo @@ -119,9 +121,9 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (actionID == 53 || actionID == 36945) { - if (IsEnabled(CustomComboPreset.MNK_STUseLLOpener)) + if (IsEnabled(CustomComboPreset.MNK_STUseOpener)) { - if (MNKOpener.DoFullOpener(ref actionID)) + if (MNKOpener.DoFullOpener(ref actionID, Config.MNK_SelectedOpener)) return actionID; } @@ -275,7 +277,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (actionID == 53 || actionID == 36945) { - if (MNKOpener.DoFullOpener(ref actionID)) + if (MNKOpener.DoFullOpener(ref actionID, 1)) return actionID; if ((!inCombat || !InMeleeRange()) diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index c16d0cfdc..8768e8cd7 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1621,6 +1621,12 @@ internal static void Draw(CustomComboPreset preset, bool enabled) UserConfig.DrawSliderInt(0, 100, MNK.Config.MNK_ST_Bloodbath_Threshold, "Bloodbath HP percentage threshold (0 = Disabled)", 150, SliderIncrements.Ones); } + if (preset == CustomComboPreset.MNK_STUseOpener && enabled) + { + UserConfig.DrawHorizontalRadioButton(MNK.Config.MNK_SelectedOpener, "Double Lunar", "Uses Lunar/Lunar opener", 1); + UserConfig.DrawHorizontalRadioButton(MNK.Config.MNK_SelectedOpener, "Solar Lunar", "Uses Solar/Lunar opener", 2); + } + #endregion // ==================================================================================== #region NINJA From 0e04caa952d16b528c97452740507660d6b32a29 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Tue, 23 Jul 2024 16:20:30 +0100 Subject: [PATCH 016/142] Dump TFC and only use PB after an Opo --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 16 ++++++++++++++++ XIVSlothCombo/Combos/PvE/MNK.cs | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index 911c45f0b..abe5425c3 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -113,6 +113,14 @@ private bool DoSLOpener(ref uint actionID) if (currentState == OpenerState.InOpener) { + if (CustomComboFunctions.IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) + && Gauge.Chakra >= 5 + && OpenerStep > 2) + { + actionID = TheForbiddenChakra; + return true; + } + if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; @@ -197,6 +205,14 @@ private bool DoLLOpener(ref uint actionID) if (currentState == OpenerState.InOpener) { + if (CustomComboFunctions.IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) + && Gauge.Chakra >= 5 + && OpenerStep > 2) + { + actionID = TheForbiddenChakra; + return true; + } + if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 63f2d9322..8de9b9c7d 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -193,7 +193,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f && WasLastWeaponskill(LeapingOpo)))) + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f) && WasLastWeaponskill(LeapingOpo))) { return PerfectBalance; } From cdc6e77046f53aa24f5ceaf171727de969a1edc8 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 24 Jul 2024 09:25:29 +0100 Subject: [PATCH 017/142] Add ball handler single options, more opener checks and pre-pull formless fist --- XIVSlothCombo/Combos/CustomComboPreset.cs | 23 +++++- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 13 ++++ XIVSlothCombo/Combos/PvE/MNK.cs | 88 ++++++++++++++++++++++- 3 files changed, 120 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 0b39659b6..9655d0f53 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1905,9 +1905,30 @@ public enum CustomComboPreset [CustomComboInfo("Combo Heals Option", "Adds Bloodbath and Second Wind to the rotation.", MNK.JobID)] MNK_ST_ComboHeals = 9018, - // Last value = 9031 + #endregion + // Last value = 9018 + + [ConflictingCombos(MNK_ST_AdvancedMode, MNK_ST_BasicMode)] + [CustomComboInfo("Ball Handlers", "Replace core rotation skills with single button, depending on current balls.", MNK.JobID)] + MNK_ST_BallHandlers = 9019, + + [ReplaceSkill(MNK.Bootshine)] + [CustomComboInfo("Opo-opo", "Replace Bootshine/Leaping Opo with Dragon Kick.", MNK.JobID)] + [ParentCombo(MNK_ST_BallHandlers)] + MNK_BALLS_OPOOPO = 9020, + + [ReplaceSkill(MNK.TrueStrike)] + [CustomComboInfo("Raptor", "Replace True Strike/Rising Raptor with Twin Snakes.", MNK.JobID)] + [ParentCombo(MNK_ST_BallHandlers)] + MNK_BALLS_RAPTOR = 9021, + + [ReplaceSkill(MNK.SnapPunch)] + [CustomComboInfo("Coeurl", "Replace Snap Punch/Pouncing Coeurl with Demolish.", MNK.JobID)] + [ParentCombo(MNK_ST_BallHandlers)] + MNK_BALLS_COEURL = 9022, + // End Monk #endregion diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index abe5425c3..c13471dc0 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -27,6 +27,13 @@ private static bool HasCooldowns() if (!CustomComboFunctions.ActionReady(Meditation) && Gauge.Chakra < 5) return false; + if (Gauge.Nadi != Dalamud.Game.ClientState.JobGauge.Enums.Nadi.NONE) + return false; + + if (Gauge.OpoOpoFury != 0) return false; + if (Gauge.RaptorFury != 0) return false; + if (Gauge.CoeurlFury != 0) return false; + return true; } @@ -94,6 +101,12 @@ private bool DoPrePullSteps(ref uint actionID) return true; } + if (!CustomComboFunctions.HasEffect(Buffs.FormlessFist) && PrePullStep == 1) + { + actionID = FormShift; + return true; + } + if (CustomComboFunctions.WasLastAction(DragonKick) && PrePullStep == 1) CurrentState = OpenerState.InOpener; else if (PrePullStep == 1) actionID = DragonKick; diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 8de9b9c7d..483737ad6 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -49,6 +49,8 @@ public const uint WindsReply = 36949, ForbiddenMeditation = 36942, LeapingOpo = 36945, + RisingRaptor = 36946, + PouncingCoeurl = 36947, TrueNorth = 7546, ElixirBurst = 36948, FiresReply = 36950; @@ -59,7 +61,7 @@ public const ushort TwinSnakes = 101, OpoOpoForm = 107, RaptorForm = 108, - CoerlForm = 109, + CoeurlForm = 109, PerfectBalance = 110, RiddleOfFire = 1181, RiddleOfWind = 2687, @@ -538,7 +540,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return TwinSnakes; } - if (HasEffect(Buffs.CoerlForm) && level >= Levels.Rockbreaker) + if (HasEffect(Buffs.CoeurlForm) && level >= Levels.Rockbreaker) { return Rockbreaker; } @@ -548,6 +550,86 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + #region Ball Handlers + internal class MNK_BallHandler_OpoOpo : CustomCombo + { + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_BALLS_OPOOPO; + + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + if (actionID == Bootshine || actionID == LeapingOpo) + { + if (HasEffect(Buffs.OpoOpoForm) || HasEffect(Buffs.FormlessFist)) + { + if (Gauge.OpoOpoFury == 0) + { + if (LevelChecked(Levels.DragonKick)) + return DragonKick; + } + else + { + return OriginalHook(Bootshine); + } + } + } + + return actionID; + } + } + + internal class MNK_BallHandler_Raptor : CustomCombo + { + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_BALLS_RAPTOR; + + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + if (actionID == TrueStrike || actionID == RisingRaptor) + { + if (HasEffect(Buffs.RaptorForm)) + { + if (Gauge.RaptorFury == 0) + { + if (LevelChecked(Levels.TwinSnakes)) + return TwinSnakes; + } + else + { + return OriginalHook(TrueStrike); + } + } + } + + return actionID; + } + } + + internal class MNK_BallHandler_Coeurl : CustomCombo + { + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_BALLS_COEURL; + + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + if (actionID == SnapPunch || actionID == PouncingCoeurl) + { + if (HasEffect(Buffs.CoeurlForm)) + { + if (Gauge.CoeurlFury == 0) + { + if (LevelChecked(Levels.Demolish)) + return Demolish; + } + else + { + return OriginalHook(SnapPunch); + } + } + } + + return actionID; + } + } + #endregion + public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnabled = true) { if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm)) @@ -577,7 +659,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable } } - if (CustomComboFunctions.HasEffect(Buffs.CoerlForm)) + if (CustomComboFunctions.HasEffect(Buffs.CoeurlForm)) { if (Gauge.CoeurlFury == 0) { From c1ca55de310770ba18079243703fc707d4fcb2e2 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 24 Jul 2024 09:38:22 +0100 Subject: [PATCH 018/142] Add PB/ROF -> BH toggles from pre-dt --- XIVSlothCombo/Combos/CustomComboPreset.cs | 11 +++++++-- XIVSlothCombo/Combos/PvE/MNK.cs | 28 +++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 9655d0f53..2150248bd 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1836,7 +1836,7 @@ public enum CustomComboPreset [ReplaceSkill([MNK.Bootshine])] [CustomComboInfo("Basic ST Rotation", "Basic Monk Combo on one button", MNK.JobID)] - [ConflictingCombos(MNK_ST_AdvancedMode)] + [ConflictingCombos(MNK_ST_AdvancedMode, MNK_ST_BallHandlers)] MNK_ST_BasicMode = 9002, [ReplaceSkill([MNK.ArmOfTheDestroyer])] @@ -1850,7 +1850,7 @@ public enum CustomComboPreset #region Monk Advanced ST [ReplaceSkill([MNK.Bootshine])] [CustomComboInfo("Custom ST Rotation", "Advanced Monk Combo on one button", MNK.JobID)] - [ConflictingCombos(MNK_ST_BasicMode)] + [ConflictingCombos(MNK_ST_BasicMode, MNK_ST_BallHandlers)] MNK_ST_AdvancedMode = 9005, [ParentCombo(MNK_ST_AdvancedMode)] @@ -1929,6 +1929,13 @@ public enum CustomComboPreset [ParentCombo(MNK_ST_BallHandlers)] MNK_BALLS_COEURL = 9022, + [ReplaceSkill(MNK.PerfectBalance)] + [CustomComboInfo("Perfect Balance Feature", "Perfect Balance becomes Masterful Blitz while you have 3 Beast Chakra.", MNK.JobID)] + MNK_PerfectBalance = 9023, + + [ReplaceSkill(MNK.RiddleOfFire)] + [CustomComboInfo("Riddle of Fire/Brotherhood Feature", "Replaces Riddle of Fire with Brotherhood when Riddle of Fire is on cooldown.", MNK.JobID)] + MNK_Riddle_Brotherhood = 9024, // End Monk #endregion diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 483737ad6..c7702c30f 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -630,6 +630,34 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } #endregion + internal class MNK_PerfectBalance : CustomCombo + { + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_PerfectBalance; + + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + if (actionID == PerfectBalance) + { + if (OriginalHook(MasterfulBlitz) != MasterfulBlitz && level >= Levels.MasterfulBlitz) + return OriginalHook(MasterfulBlitz); + } + + return actionID; + } + } + + internal class MNK_Riddle_Brotherhood : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_Riddle_Brotherhood; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (actionID is RiddleOfFire && level >= Levels.Brotherhood && IsOnCooldown(RiddleOfFire) && IsOffCooldown(Brotherhood)) + return Brotherhood; + else return actionID; + } + } + public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnabled = true) { if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm)) From b3dfe3ce06badb57129d5fd56b7a16aa78d310ee Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 24 Jul 2024 13:47:44 +0100 Subject: [PATCH 019/142] Fix openers --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 3 +- XIVSlothCombo/Combos/PvE/MNK.cs | 73 +++++++++++++++----------- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index c13471dc0..bb085aa14 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -30,7 +30,6 @@ private static bool HasCooldowns() if (Gauge.Nadi != Dalamud.Game.ClientState.JobGauge.Enums.Nadi.NONE) return false; - if (Gauge.OpoOpoFury != 0) return false; if (Gauge.RaptorFury != 0) return false; if (Gauge.CoeurlFury != 0) return false; @@ -101,7 +100,7 @@ private bool DoPrePullSteps(ref uint actionID) return true; } - if (!CustomComboFunctions.HasEffect(Buffs.FormlessFist) && PrePullStep == 1) + if (!CustomComboFunctions.HasEffect(Buffs.FormlessFist) && !CustomComboFunctions.HasEffect(Buffs.RaptorForm) && PrePullStep == 1) { actionID = FormShift; return true; diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index c7702c30f..0f1c162cb 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -171,9 +171,9 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(Meditation); } - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) return All.Bloodbath; } @@ -553,22 +553,25 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim #region Ball Handlers internal class MNK_BallHandler_OpoOpo : CustomCombo { - protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_BALLS_OPOOPO; + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BallHandlers; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - if (actionID == Bootshine || actionID == LeapingOpo) + if (IsEnabled(CustomComboPreset.MNK_BALLS_OPOOPO)) { - if (HasEffect(Buffs.OpoOpoForm) || HasEffect(Buffs.FormlessFist)) + if (actionID == Bootshine || actionID == LeapingOpo) { - if (Gauge.OpoOpoFury == 0) - { - if (LevelChecked(Levels.DragonKick)) - return DragonKick; - } - else + if (HasEffect(Buffs.OpoOpoForm) || HasEffect(Buffs.FormlessFist)) { - return OriginalHook(Bootshine); + if (Gauge.OpoOpoFury == 0) + { + if (LevelChecked(Levels.DragonKick)) + return DragonKick; + } + else + { + return OriginalHook(Bootshine); + } } } } @@ -579,22 +582,25 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb internal class MNK_BallHandler_Raptor : CustomCombo { - protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_BALLS_RAPTOR; + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BallHandlers; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - if (actionID == TrueStrike || actionID == RisingRaptor) + if (IsEnabled(CustomComboPreset.MNK_BALLS_RAPTOR)) { - if (HasEffect(Buffs.RaptorForm)) + if (actionID == TrueStrike || actionID == RisingRaptor) { - if (Gauge.RaptorFury == 0) - { - if (LevelChecked(Levels.TwinSnakes)) - return TwinSnakes; - } - else + if (HasEffect(Buffs.RaptorForm)) { - return OriginalHook(TrueStrike); + if (Gauge.RaptorFury == 0) + { + if (LevelChecked(Levels.TwinSnakes)) + return TwinSnakes; + } + else + { + return OriginalHook(TrueStrike); + } } } } @@ -605,22 +611,25 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb internal class MNK_BallHandler_Coeurl : CustomCombo { - protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_BALLS_COEURL; + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BallHandlers; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - if (actionID == SnapPunch || actionID == PouncingCoeurl) + if (IsEnabled(CustomComboPreset.MNK_BALLS_COEURL)) { - if (HasEffect(Buffs.CoeurlForm)) + if (actionID == SnapPunch || actionID == PouncingCoeurl) { - if (Gauge.CoeurlFury == 0) + if (HasEffect(Buffs.CoeurlForm)) { - if (LevelChecked(Levels.Demolish)) - return Demolish; - } - else - { - return OriginalHook(SnapPunch); + if (Gauge.CoeurlFury == 0) + { + if (LevelChecked(Levels.Demolish)) + return Demolish; + } + else + { + return OriginalHook(SnapPunch); + } } } } From 171b8ab30405b863eab629cd5b9ef2590cb21213 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Fri, 26 Jul 2024 19:37:18 +0100 Subject: [PATCH 020/142] VS Code cleanup --- XIVSlothCombo/Combos/PvE/MNK.cs | 124 +++++++++++++++----------------- 1 file changed, 56 insertions(+), 68 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 0f1c162cb..630af24f9 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -1,6 +1,5 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; -using ECommons.DalamudServices; using System; using System.Linq; using XIVSlothCombo.Combos.JobHelpers; @@ -116,12 +115,13 @@ internal class MNK_ST_AdvancedMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_AdvancedMode; internal static MNKOpenerLogic MNKOpener = new(); + internal int RiddleOfFireCount = 0; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - var canWeave = CanWeave(actionID, 0.5); - var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + bool canWeave = CanWeave(actionID); + bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); - if (actionID == 53 || actionID == 36945) + if (actionID is 53 or 36945) { if (IsEnabled(CustomComboPreset.MNK_STUseOpener)) { @@ -149,13 +149,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return Brotherhood; } - if (IsEnabled(CustomComboPreset.MNK_STUseROF) - && level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire)) - { - return RiddleOfFire; - } - if (IsEnabled(CustomComboPreset.MNK_STUseROW) && level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) @@ -175,6 +168,17 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return All.SecondWind; if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) return All.Bloodbath; + + if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) + { + if (IsEnabled(CustomComboPreset.MNK_STUseROF) + && level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire)) + { + RiddleOfFireCount++; + return RiddleOfFire; + } + } } // GCDs @@ -191,11 +195,11 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // Perfect Balance if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) { - if (((GetRemainingCharges(PerfectBalance) == 2) || + if ((GetRemainingCharges(PerfectBalance) == 2) || (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f) && WasLastWeaponskill(LeapingOpo))) + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f && WasLastWeaponskill(LeapingOpo))) { return PerfectBalance; } @@ -204,42 +208,33 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // Perfect Balance if (HasEffect(Buffs.PerfectBalance)) { - var solarNadi = Gauge.Nadi == Nadi.SOLAR; - var lunarNadi = Gauge.Nadi == Nadi.LUNAR; - var opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); - var raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); - var coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); + bool solarNadi = Gauge.Nadi == Nadi.SOLAR; + bool lunarNadi = Gauge.Nadi == Nadi.LUNAR; + int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); + int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); + int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); #region Open Solar if (!solarNadi) { if (opoOpoChakra == 0) { - if (Gauge.OpoOpoFury == 0) - return OriginalHook(DragonKick); - return OriginalHook(Bootshine); + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } else if (raptorChakra == 0) { - if (Gauge.RaptorFury == 0) - return OriginalHook(TwinSnakes); - return OriginalHook(TrueStrike); + return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); } else if (coeurlChakra == 0) { - if (Gauge.CoeurlFury == 0) - return OriginalHook(Demolish); - return OriginalHook(SnapPunch); + return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); } } #endregion #region Open Lunar if (solarNadi || lunarNadi) { - if (Gauge.OpoOpoFury == 0) - return OriginalHook(DragonKick); - - return OriginalHook(Bootshine); + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } #endregion } @@ -254,6 +249,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseFiresReply) && HasEffect(Buffs.FiresRumination) + && !HasEffect(Buffs.PerfectBalance) + && !HasEffect(Buffs.FormlessFist) && level >= Levels.FiresReply) { return FiresReply; @@ -274,10 +271,10 @@ internal class MNK_ST_SimpleMode : CustomCombo internal static MNKOpenerLogic MNKOpener = new(); protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - var canWeave = CanWeave(actionID, 0.5); - var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + bool canWeave = CanWeave(actionID); + bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); - if (actionID == 53 || actionID == 36945) + if (actionID is 53 or 36945) { if (MNKOpener.DoFullOpener(ref actionID, 1)) return actionID; @@ -333,11 +330,11 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // Perfect Balance if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) { - if (((GetRemainingCharges(PerfectBalance) == 2) || + if ((GetRemainingCharges(PerfectBalance) == 2) || (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f && WasLastWeaponskill(LeapingOpo)))) + (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f && WasLastWeaponskill(LeapingOpo))) { return PerfectBalance; } @@ -346,42 +343,33 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // Perfect Balance if (HasEffect(Buffs.PerfectBalance)) { - var solarNadi = Gauge.Nadi == Nadi.SOLAR; - var lunarNadi = Gauge.Nadi == Nadi.LUNAR; - var opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); - var raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); - var coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); + bool solarNadi = Gauge.Nadi == Nadi.SOLAR; + bool lunarNadi = Gauge.Nadi == Nadi.LUNAR; + int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); + int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); + int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); #region Open Solar if (!solarNadi) { if (opoOpoChakra == 0) { - if (Gauge.OpoOpoFury == 0) - return OriginalHook(DragonKick); - return OriginalHook(Bootshine); + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } else if (raptorChakra == 0) { - if (Gauge.RaptorFury == 0) - return OriginalHook(TwinSnakes); - return OriginalHook(TrueStrike); + return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); } else if (coeurlChakra == 0) { - if (Gauge.CoeurlFury == 0) - return OriginalHook(Demolish); - return OriginalHook(SnapPunch); + return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); } } #endregion #region Open Lunar if (solarNadi || lunarNadi) { - if (Gauge.OpoOpoFury == 0) - return OriginalHook(DragonKick); - - return OriginalHook(Bootshine); + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } #endregion } @@ -412,15 +400,15 @@ internal class MNK_AoE_SimpleMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID == ArmOfTheDestroyer || actionID == ShadowOfTheDestroyer) + if (actionID is ArmOfTheDestroyer or ShadowOfTheDestroyer) { - var inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); - var gauge = GetJobGauge(); - var canWeave = CanWeave(actionID, 0.5); - var canWeaveChakra = CanWeave(actionID); - var pbStacks = FindEffectAny(Buffs.PerfectBalance); - var lunarNadi = gauge.Nadi == Nadi.LUNAR; - var nadiNONE = gauge.Nadi == Nadi.NONE; + bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + MNKGauge gauge = GetJobGauge(); + bool canWeave = CanWeave(actionID, 0.5); + _ = CanWeave(actionID); + Dalamud.Game.ClientState.Statuses.Status? pbStacks = FindEffectAny(Buffs.PerfectBalance); + bool lunarNadi = gauge.Nadi == Nadi.LUNAR; + bool nadiNONE = gauge.Nadi == Nadi.NONE; if (!inCombat) { @@ -559,7 +547,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (IsEnabled(CustomComboPreset.MNK_BALLS_OPOOPO)) { - if (actionID == Bootshine || actionID == LeapingOpo) + if (actionID is Bootshine or LeapingOpo) { if (HasEffect(Buffs.OpoOpoForm) || HasEffect(Buffs.FormlessFist)) { @@ -588,7 +576,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (IsEnabled(CustomComboPreset.MNK_BALLS_RAPTOR)) { - if (actionID == TrueStrike || actionID == RisingRaptor) + if (actionID is TrueStrike or RisingRaptor) { if (HasEffect(Buffs.RaptorForm)) { @@ -617,7 +605,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (IsEnabled(CustomComboPreset.MNK_BALLS_COEURL)) { - if (actionID == SnapPunch || actionID == PouncingCoeurl) + if (actionID is SnapPunch or PouncingCoeurl) { if (HasEffect(Buffs.CoeurlForm)) { @@ -661,9 +649,9 @@ internal class MNK_Riddle_Brotherhood : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID is RiddleOfFire && level >= Levels.Brotherhood && IsOnCooldown(RiddleOfFire) && IsOffCooldown(Brotherhood)) - return Brotherhood; - else return actionID; + return actionID is RiddleOfFire && level >= Levels.Brotherhood && IsOnCooldown(RiddleOfFire) && IsOffCooldown(Brotherhood) + ? Brotherhood + : actionID; } } From 0c9871112e3092982848f482181c8d8957e05da8 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 27 Jul 2024 18:22:41 +0100 Subject: [PATCH 021/142] Burst windows should line up better now --- XIVSlothCombo/Combos/PvE/MNK.cs | 77 +++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 28 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 630af24f9..d00161674 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -118,8 +118,14 @@ internal class MNK_ST_AdvancedMode : CustomCombo internal int RiddleOfFireCount = 0; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - bool canWeave = CanWeave(actionID); + bool canWeave = CanWeave(actionID, 0.55); bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + bool bothNadisOpen = Gauge.Nadi.ToString() == "LUNAR, SOLAR"; + + if (!InCombat()) + { + RiddleOfFireCount = 0; + } if (actionID is 53 or 36945) { @@ -142,12 +148,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) { - if (IsEnabled(CustomComboPreset.MNK_STUseBrotherhood) - && level >= Levels.Brotherhood - && !IsOnCooldown(Brotherhood)) - { - return Brotherhood; - } if (IsEnabled(CustomComboPreset.MNK_STUseROW) && level >= Levels.RiddleOfWind @@ -169,14 +169,38 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) return All.Bloodbath; + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + { + if (!bothNadisOpen || (bothNadisOpen && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8)) + { + if ((GetRemainingCharges(PerfectBalance) == 2 + || (GetRemainingCharges(PerfectBalance) == 1 + && GetCooldownChargeRemainingTime(PerfectBalance) < 4) + || HasEffect(Buffs.RiddleOfFire)) + && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) + { + return PerfectBalance; + } + } + } + if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) { if (IsEnabled(CustomComboPreset.MNK_STUseROF) - && level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire)) + && level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire) + && ((!bothNadisOpen) + || (bothNadisOpen && Gauge.OpoOpoFury != 0)) + ) + { + return RiddleOfFire; + } + + if (IsEnabled(CustomComboPreset.MNK_STUseBrotherhood) + && level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) { - RiddleOfFireCount++; - return RiddleOfFire; + return Brotherhood; } } } @@ -184,6 +208,16 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // GCDs if (inCombat) { + if (WasLastAction(MasterfulBlitz)) + { + return FormShift; + } + + if (HasEffect(Buffs.FormlessFist)) + { + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + } + if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { // Masterful Blitz @@ -192,19 +226,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(MasterfulBlitz); } - // Perfect Balance - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) - { - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f && WasLastWeaponskill(LeapingOpo))) - { - return PerfectBalance; - } - } - // Perfect Balance if (HasEffect(Buffs.PerfectBalance)) { @@ -217,17 +238,17 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb #region Open Solar if (!solarNadi) { - if (opoOpoChakra == 0) + if (coeurlChakra == 0) { - return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); } else if (raptorChakra == 0) { return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); } - else if (coeurlChakra == 0) + else if (opoOpoChakra == 0) { - return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } } #endregion From 6d4767aee34a73e8c05665e17f86e6c0b8e627cd Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 27 Jul 2024 20:01:38 +0100 Subject: [PATCH 022/142] Update simple mode and add pb enabled check --- XIVSlothCombo/Combos/PvE/MNK.cs | 133 +++++++++++++++++++------------- 1 file changed, 80 insertions(+), 53 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index d00161674..303118900 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -169,12 +169,12 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) return All.Bloodbath; - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { if (!bothNadisOpen || (bothNadisOpen && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8)) { - if ((GetRemainingCharges(PerfectBalance) == 2 - || (GetRemainingCharges(PerfectBalance) == 1 + if ((GetRemainingCharges(PerfectBalance) == 2 + || (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || HasEffect(Buffs.RiddleOfFire)) && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) @@ -189,11 +189,11 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseROF) && level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire) - && ((!bothNadisOpen) + && ((!bothNadisOpen) || (bothNadisOpen && Gauge.OpoOpoFury != 0)) ) - { - return RiddleOfFire; + { + return RiddleOfFire; } if (IsEnabled(CustomComboPreset.MNK_STUseBrotherhood) @@ -288,12 +288,19 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb internal class MNK_ST_SimpleMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_BasicMode; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_AdvancedMode; internal static MNKOpenerLogic MNKOpener = new(); + internal int RiddleOfFireCount = 0; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - bool canWeave = CanWeave(actionID); + bool canWeave = CanWeave(actionID, 0.55); bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + bool bothNadisOpen = Gauge.Nadi.ToString() == "LUNAR, SOLAR"; + + if (!InCombat()) + { + RiddleOfFireCount = 0; + } if (actionID is 53 or 36945) { @@ -310,20 +317,9 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // OGCDs if (inCombat && canWeave) { - if (level >= Levels.Brotherhood - && !IsOnCooldown(Brotherhood)) - { - return Brotherhood; - } - - if (level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire)) - { - return RiddleOfFire; - } - - if (level >= Levels.RiddleOfWind - && !IsOnCooldown(RiddleOfWind)) + if (IsEnabled(CustomComboPreset.MNK_STUseROW) + && level >= Levels.RiddleOfWind + && !IsOnCooldown(RiddleOfWind)) { return RiddleOfWind; } @@ -334,31 +330,59 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(Meditation); } - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + if (PlayerHealthPercentageHp() <= 25 && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + if (PlayerHealthPercentageHp() <= 40 && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) return All.Bloodbath; + + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + { + if (!bothNadisOpen || (bothNadisOpen && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8)) + { + if ((GetRemainingCharges(PerfectBalance) == 2 + || (GetRemainingCharges(PerfectBalance) == 1 + && GetCooldownChargeRemainingTime(PerfectBalance) < 4) + || HasEffect(Buffs.RiddleOfFire)) + && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) + { + return PerfectBalance; + } + } + } + + if (level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire) + && ((!bothNadisOpen) + || (bothNadisOpen && Gauge.OpoOpoFury != 0)) + ) + { + return RiddleOfFire; + } + + if (level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } } // GCDs if (inCombat) { - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + if (WasLastAction(MasterfulBlitz)) { - return OriginalHook(MasterfulBlitz); + return FormShift; } - // Perfect Balance - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + if (HasEffect(Buffs.FormlessFist)) { - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 7.3f && WasLastWeaponskill(LeapingOpo))) - { - return PerfectBalance; - } + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + } + + // Masterful Blitz + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + { + return OriginalHook(MasterfulBlitz); } // Perfect Balance @@ -373,17 +397,17 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb #region Open Solar if (!solarNadi) { - if (opoOpoChakra == 0) + if (coeurlChakra == 0) { - return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); } else if (raptorChakra == 0) { return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); } - else if (coeurlChakra == 0) + else if (opoOpoChakra == 0) { - return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } } #endregion @@ -394,24 +418,27 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } #endregion } - } - if (HasEffect(Buffs.WindsRumination) - && level >= Levels.WindsReply) - { - return WindsReply; - } + if (HasEffect(Buffs.WindsRumination) + && level >= Levels.WindsReply) + { + return WindsReply; + } - if (HasEffect(Buffs.FiresRumination) - && level >= Levels.FiresReply) - { - return FiresReply; - } + if (HasEffect(Buffs.FiresRumination) + && !HasEffect(Buffs.PerfectBalance) + && !HasEffect(Buffs.FormlessFist) + && level >= Levels.FiresReply) + { + return FiresReply; + } + // Standard Balls + return DetermineCoreAbility(actionID); + } } - // Standard Balls - return DetermineCoreAbility(actionID); + return actionID; } } From af76f1f81e919760e06cb59fe1e6685dbe52f7da Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 27 Jul 2024 22:28:25 +0100 Subject: [PATCH 023/142] Make AOE support chakra higher than 5 --- XIVSlothCombo/Combos/PvE/MNK.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 303118900..ca4f43649 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -506,7 +506,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return RiddleOfWind; } - if (Gauge.Chakra == 5 + if (Gauge.Chakra >= 5 && level >= Levels.HowlingFist && HasBattleTarget()) { From 1833de9a84f870b9237341788a8f7eab956ac4d7 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sun, 28 Jul 2024 15:39:14 +0100 Subject: [PATCH 024/142] Fix ball handler issues --- XIVSlothCombo/Combos/PvE/MNK.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index ca4f43649..7d21809e1 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -597,7 +597,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (actionID is Bootshine or LeapingOpo) { - if (HasEffect(Buffs.OpoOpoForm) || HasEffect(Buffs.FormlessFist)) + if (HasEffect(Buffs.OpoOpoForm) || HasEffect(Buffs.FormlessFist) || HasEffect(Buffs.PerfectBalance)) { if (Gauge.OpoOpoFury == 0) { @@ -626,7 +626,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (actionID is TrueStrike or RisingRaptor) { - if (HasEffect(Buffs.RaptorForm)) + if (HasEffect(Buffs.RaptorForm) || HasEffect(Buffs.FormlessFist) || HasEffect(Buffs.PerfectBalance)) { if (Gauge.RaptorFury == 0) { @@ -655,7 +655,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (actionID is SnapPunch or PouncingCoeurl) { - if (HasEffect(Buffs.CoeurlForm)) + if (HasEffect(Buffs.CoeurlForm) || HasEffect(Buffs.FormlessFist) || HasEffect(Buffs.PerfectBalance)) { if (Gauge.CoeurlFury == 0) { From 2f92b96cae3d39bb8379c29115de51688ad0e3ba Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sun, 28 Jul 2024 15:58:22 +0100 Subject: [PATCH 025/142] Slight buff order changes --- XIVSlothCombo/Combos/PvE/MNK.cs | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 7d21809e1..ea6ec1d84 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -302,7 +302,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb RiddleOfFireCount = 0; } - if (actionID is 53 or 36945) + if (actionID is Bootshine or LeapingOpo) { if (MNKOpener.DoFullOpener(ref actionID, 1)) return actionID; @@ -335,35 +335,31 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (PlayerHealthPercentageHp() <= 40 && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) return All.Bloodbath; - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance)) + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && IsOffCooldown(PerfectBalance)) { - if (!bothNadisOpen || (bothNadisOpen && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8)) + if (OriginalHook(MasterfulBlitz) == MasterfulBlitz) { - if ((GetRemainingCharges(PerfectBalance) == 2 - || (GetRemainingCharges(PerfectBalance) == 1 - && GetCooldownChargeRemainingTime(PerfectBalance) < 4) - || HasEffect(Buffs.RiddleOfFire)) - && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) + if (!bothNadisOpen || (bothNadisOpen && ((HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8)) || IsOffCooldown(RiddleOfFire))) { - return PerfectBalance; + if (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) + { + return PerfectBalance; + } } } } - if (level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire) - && ((!bothNadisOpen) - || (bothNadisOpen && Gauge.OpoOpoFury != 0)) - ) - { - return RiddleOfFire; - } - if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) { return Brotherhood; } + + if (level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire)) + { + return RiddleOfFire; + } } // GCDs From dd24d18c55f8d6591dfabd974b80b0596c3e83e0 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sun, 28 Jul 2024 16:22:05 +0100 Subject: [PATCH 026/142] Small opener fix and change to PB/ROF/BH logic --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 4 +-- XIVSlothCombo/Combos/PvE/MNK.cs | 34 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index bb085aa14..c85d2b965 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -174,7 +174,7 @@ private bool DoSLOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 13) OpenerStep++; else if (OpenerStep == 13) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 14) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; else if (OpenerStep == 14) actionID = PerfectBalance; if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 15) OpenerStep++; @@ -266,7 +266,7 @@ private bool DoLLOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 13) OpenerStep++; else if (OpenerStep == 13) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 14) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; else if (OpenerStep == 14) actionID = PerfectBalance; if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 15) OpenerStep++; diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index ea6ec1d84..bbc41a4b7 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -330,35 +330,35 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(Meditation); } - if (PlayerHealthPercentageHp() <= 25 && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + if (PlayerHealthPercentageHp() <= 25 && LevelChecked(All.SecondWind) && !IsOnCooldown(All.SecondWind)) return All.SecondWind; - if (PlayerHealthPercentageHp() <= 40 && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + if (PlayerHealthPercentageHp() <= 40 && LevelChecked(All.Bloodbath) && !IsOnCooldown(All.Bloodbath)) return All.Bloodbath; - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && IsOffCooldown(PerfectBalance)) + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && !IsOnCooldown(PerfectBalance)) { - if (OriginalHook(MasterfulBlitz) == MasterfulBlitz) + if (!IsOnCooldown(RiddleOfFire) || HasEffect(Buffs.RiddleOfFire)) { - if (!bothNadisOpen || (bothNadisOpen && ((HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8)) || IsOffCooldown(RiddleOfFire))) + if (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) { - if (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) - { - return PerfectBalance; - } + return PerfectBalance; } } } - if (level >= Levels.Brotherhood - && !IsOnCooldown(Brotherhood)) + if (HasEffect(Buffs.PerfectBalance) && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) { - return Brotherhood; - } + if (level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } - if (level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire)) - { - return RiddleOfFire; + if (level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire)) + { + return RiddleOfFire; + } } } From acf0909b5789c7188bdd7422c9e21ed7cc74fdd6 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sun, 28 Jul 2024 19:50:27 +0100 Subject: [PATCH 027/142] More fixes, currently slightly broken --- XIVSlothCombo/Combos/PvE/MNK.cs | 84 ++++++++++++++++----------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index bbc41a4b7..681b86f0b 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -1,5 +1,6 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; +using ECommons.DalamudServices; using System; using System.Linq; using XIVSlothCombo.Combos.JobHelpers; @@ -115,19 +116,14 @@ internal class MNK_ST_AdvancedMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_AdvancedMode; internal static MNKOpenerLogic MNKOpener = new(); - internal int RiddleOfFireCount = 0; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { bool canWeave = CanWeave(actionID, 0.55); bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); bool bothNadisOpen = Gauge.Nadi.ToString() == "LUNAR, SOLAR"; + bool isEvenWindow = GetCooldownChargeRemainingTime(Brotherhood) > 60; - if (!InCombat()) - { - RiddleOfFireCount = 0; - } - - if (actionID is 53 or 36945) + if (actionID is Bootshine or LeapingOpo) { if (IsEnabled(CustomComboPreset.MNK_STUseOpener)) { @@ -169,15 +165,24 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) return All.Bloodbath; - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) + + + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { - if (!bothNadisOpen || (bothNadisOpen && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8)) + Svc.Log.Debug($"Even Window: {isEvenWindow}"); + Svc.Log.Debug($"Last Weaponskill: {WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)}"); + Svc.Log.Debug($"Cooldown Check: {GetCooldownRemainingTime(RiddleOfFire) < 7}"); + if (isEvenWindow) + { + if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) + && GetCooldownRemainingTime(RiddleOfFire) < 7) + { + return PerfectBalance; + } + } + else { - if ((GetRemainingCharges(PerfectBalance) == 2 - || (GetRemainingCharges(PerfectBalance) == 1 - && GetCooldownChargeRemainingTime(PerfectBalance) < 4) - || HasEffect(Buffs.RiddleOfFire)) - && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) + if (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick) && HasEffect(Buffs.RiddleOfFire)) { return PerfectBalance; } @@ -186,21 +191,19 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) { - if (IsEnabled(CustomComboPreset.MNK_STUseROF) - && level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire) - && ((!bothNadisOpen) - || (bothNadisOpen && Gauge.OpoOpoFury != 0)) - ) + if (!isEvenWindow || HasEffect(Buffs.PerfectBalance)) { - return RiddleOfFire; - } + if (level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire)) + { + return RiddleOfFire; + } - if (IsEnabled(CustomComboPreset.MNK_STUseBrotherhood) - && level >= Levels.Brotherhood - && !IsOnCooldown(Brotherhood)) - { - return Brotherhood; + if (level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } } } } @@ -272,6 +275,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb && HasEffect(Buffs.FiresRumination) && !HasEffect(Buffs.PerfectBalance) && !HasEffect(Buffs.FormlessFist) + && (isEvenWindow || !isEvenWindow && WasLastAction(LeapingOpo)) && level >= Levels.FiresReply) { return FiresReply; @@ -290,18 +294,13 @@ internal class MNK_ST_SimpleMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_AdvancedMode; internal static MNKOpenerLogic MNKOpener = new(); - internal int RiddleOfFireCount = 0; + internal bool isEvenWindow = GetCooldownChargeRemainingTime(Brotherhood) > 60; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { bool canWeave = CanWeave(actionID, 0.55); bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); bool bothNadisOpen = Gauge.Nadi.ToString() == "LUNAR, SOLAR"; - if (!InCombat()) - { - RiddleOfFireCount = 0; - } - if (actionID is Bootshine or LeapingOpo) { if (MNKOpener.DoFullOpener(ref actionID, 1)) @@ -337,7 +336,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && !IsOnCooldown(PerfectBalance)) { - if (!IsOnCooldown(RiddleOfFire) || HasEffect(Buffs.RiddleOfFire)) + if (!IsOnCooldown(RiddleOfFire) || HasEffect(Buffs.RiddleOfFire) || GetCooldownRemainingTime(RiddleOfFire) > 6) { if (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) { @@ -346,19 +345,19 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - if (HasEffect(Buffs.PerfectBalance) && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) + if ((!isEvenWindow || HasEffect(Buffs.PerfectBalance)) && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) { - if (level >= Levels.Brotherhood - && !IsOnCooldown(Brotherhood)) - { - return Brotherhood; - } - if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) { return RiddleOfFire; } + + if (level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } } } @@ -424,6 +423,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (HasEffect(Buffs.FiresRumination) && !HasEffect(Buffs.PerfectBalance) && !HasEffect(Buffs.FormlessFist) + && (isEvenWindow || !isEvenWindow && WasLastAction(LeapingOpo)) && level >= Levels.FiresReply) { return FiresReply; @@ -701,7 +701,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnabled = true) { - if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm)) + if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm) || CustomComboFunctions.HasEffect(Buffs.FormlessFist)) { if (Gauge.OpoOpoFury == 0) { From ea7a6eff909f15ec3f2d8d7c6f05ca199fc80039 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Mon, 29 Jul 2024 13:16:36 +0100 Subject: [PATCH 028/142] Double PB usage protection in opener --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index c85d2b965..499892301 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -133,7 +133,7 @@ private bool DoSLOpener(ref uint actionID) return true; } - if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 1) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; if (CustomComboFunctions.WasLastAction(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; @@ -225,7 +225,7 @@ private bool DoLLOpener(ref uint actionID) return true; } - if (CustomComboFunctions.WasLastAction(PerfectBalance) && OpenerStep == 1) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; if (CustomComboFunctions.WasLastAction(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; From eb1e84143258595798194393b126e876dcbd2ff0 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Mon, 29 Jul 2024 13:16:52 +0100 Subject: [PATCH 029/142] Remove basic combo --- XIVSlothCombo/Combos/CustomComboPreset.cs | 12 +- XIVSlothCombo/Combos/PvE/MNK.cs | 148 ---------------------- 2 files changed, 2 insertions(+), 158 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 2150248bd..c4137ca2f 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1834,11 +1834,6 @@ public enum CustomComboPreset #region MONK - [ReplaceSkill([MNK.Bootshine])] - [CustomComboInfo("Basic ST Rotation", "Basic Monk Combo on one button", MNK.JobID)] - [ConflictingCombos(MNK_ST_AdvancedMode, MNK_ST_BallHandlers)] - MNK_ST_BasicMode = 9002, - [ReplaceSkill([MNK.ArmOfTheDestroyer])] [CustomComboInfo("AOE Rotation", "Basic Monk AOE Combo on one button", MNK.JobID)] MNK_AOE_BasicMode = 9003, @@ -1850,7 +1845,7 @@ public enum CustomComboPreset #region Monk Advanced ST [ReplaceSkill([MNK.Bootshine])] [CustomComboInfo("Custom ST Rotation", "Advanced Monk Combo on one button", MNK.JobID)] - [ConflictingCombos(MNK_ST_BasicMode, MNK_ST_BallHandlers)] + [ConflictingCombos(MNK_ST_BallHandlers)] MNK_ST_AdvancedMode = 9005, [ParentCombo(MNK_ST_AdvancedMode)] @@ -1905,12 +1900,9 @@ public enum CustomComboPreset [CustomComboInfo("Combo Heals Option", "Adds Bloodbath and Second Wind to the rotation.", MNK.JobID)] MNK_ST_ComboHeals = 9018, - - #endregion - // Last value = 9018 - [ConflictingCombos(MNK_ST_AdvancedMode, MNK_ST_BasicMode)] + [ConflictingCombos(MNK_ST_AdvancedMode)] [CustomComboInfo("Ball Handlers", "Replace core rotation skills with single button, depending on current balls.", MNK.JobID)] MNK_ST_BallHandlers = 9019, diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 681b86f0b..a6800520f 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -290,154 +290,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - internal class MNK_ST_SimpleMode : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_AdvancedMode; - internal static MNKOpenerLogic MNKOpener = new(); - internal bool isEvenWindow = GetCooldownChargeRemainingTime(Brotherhood) > 60; - protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) - { - bool canWeave = CanWeave(actionID, 0.55); - bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); - bool bothNadisOpen = Gauge.Nadi.ToString() == "LUNAR, SOLAR"; - - if (actionID is Bootshine or LeapingOpo) - { - if (MNKOpener.DoFullOpener(ref actionID, 1)) - return actionID; - - if ((!inCombat || !InMeleeRange()) - && Gauge.Chakra < 5 - && LevelChecked(Meditation)) - { - return OriginalHook(Meditation); - } - - // OGCDs - if (inCombat && canWeave) - { - if (IsEnabled(CustomComboPreset.MNK_STUseROW) - && level >= Levels.RiddleOfWind - && !IsOnCooldown(RiddleOfWind)) - { - return RiddleOfWind; - } - - if (Gauge.Chakra >= 5 - && level >= Levels.SteelPeak) - { - return OriginalHook(Meditation); - } - - if (PlayerHealthPercentageHp() <= 25 && LevelChecked(All.SecondWind) && !IsOnCooldown(All.SecondWind)) - return All.SecondWind; - if (PlayerHealthPercentageHp() <= 40 && LevelChecked(All.Bloodbath) && !IsOnCooldown(All.Bloodbath)) - return All.Bloodbath; - - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && !IsOnCooldown(PerfectBalance)) - { - if (!IsOnCooldown(RiddleOfFire) || HasEffect(Buffs.RiddleOfFire) || GetCooldownRemainingTime(RiddleOfFire) > 6) - { - if (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) - { - return PerfectBalance; - } - } - } - - if ((!isEvenWindow || HasEffect(Buffs.PerfectBalance)) && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) - { - if (level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire)) - { - return RiddleOfFire; - } - - if (level >= Levels.Brotherhood - && !IsOnCooldown(Brotherhood)) - { - return Brotherhood; - } - } - } - - // GCDs - if (inCombat) - { - if (WasLastAction(MasterfulBlitz)) - { - return FormShift; - } - - if (HasEffect(Buffs.FormlessFist)) - { - return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); - } - - // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) - { - return OriginalHook(MasterfulBlitz); - } - - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) - { - bool solarNadi = Gauge.Nadi == Nadi.SOLAR; - bool lunarNadi = Gauge.Nadi == Nadi.LUNAR; - int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); - int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); - int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); - - #region Open Solar - if (!solarNadi) - { - if (coeurlChakra == 0) - { - return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); - } - else if (raptorChakra == 0) - { - return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); - } - else if (opoOpoChakra == 0) - { - return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); - } - } - #endregion - #region Open Lunar - if (solarNadi || lunarNadi) - { - return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); - } - #endregion - } - - if (HasEffect(Buffs.WindsRumination) - && level >= Levels.WindsReply) - { - return WindsReply; - } - - if (HasEffect(Buffs.FiresRumination) - && !HasEffect(Buffs.PerfectBalance) - && !HasEffect(Buffs.FormlessFist) - && (isEvenWindow || !isEvenWindow && WasLastAction(LeapingOpo)) - && level >= Levels.FiresReply) - { - return FiresReply; - } - - // Standard Balls - return DetermineCoreAbility(actionID); - } - } - - return actionID; - } - } - internal class MNK_AoE_SimpleMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_AOE_BasicMode; From c53c0f6d779b67f862bb3ca777777a0f09b74646 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Mon, 29 Jul 2024 14:49:42 +0100 Subject: [PATCH 030/142] Back into a good place :) --- XIVSlothCombo/Combos/PvE/MNK.cs | 91 +++++++++++++-------------------- 1 file changed, 36 insertions(+), 55 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index a6800520f..2a1404864 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -8,6 +8,7 @@ using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; +using XIVSlothCombo.Data; using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.PvE @@ -118,10 +119,9 @@ internal class MNK_ST_AdvancedMode : CustomCombo internal static MNKOpenerLogic MNKOpener = new(); protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - bool canWeave = CanWeave(actionID, 0.55); + bool canWeave = CanWeave(actionID, 0.5); bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); bool bothNadisOpen = Gauge.Nadi.ToString() == "LUNAR, SOLAR"; - bool isEvenWindow = GetCooldownChargeRemainingTime(Brotherhood) > 60; if (actionID is Bootshine or LeapingOpo) { @@ -142,47 +142,17 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // OGCDs if (inCombat && canWeave) { - if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) - { - - if (IsEnabled(CustomComboPreset.MNK_STUseROW) - && level >= Levels.RiddleOfWind - && !IsOnCooldown(RiddleOfWind)) - { - return RiddleOfWind; - } - } - - if (IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) - && Gauge.Chakra >= 5 - && level >= Levels.SteelPeak) - { - return OriginalHook(Meditation); - } - - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) - return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) - return All.Bloodbath; - - - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { - Svc.Log.Debug($"Even Window: {isEvenWindow}"); - Svc.Log.Debug($"Last Weaponskill: {WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)}"); - Svc.Log.Debug($"Cooldown Check: {GetCooldownRemainingTime(RiddleOfFire) < 7}"); - if (isEvenWindow) + if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) + && GetCooldownRemainingTime(RiddleOfFire) < 7 + && GetCooldownRemainingTime(Brotherhood) < 7) { - if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) - && GetCooldownRemainingTime(RiddleOfFire) < 7) - { - return PerfectBalance; - } + return PerfectBalance; } else { - if (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick) && HasEffect(Buffs.RiddleOfFire)) + if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8) { return PerfectBalance; } @@ -191,31 +161,42 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) { - if (!isEvenWindow || HasEffect(Buffs.PerfectBalance)) + if (level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) { - if (level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire)) - { - return RiddleOfFire; - } + return Brotherhood; + } - if (level >= Levels.Brotherhood - && !IsOnCooldown(Brotherhood)) - { - return Brotherhood; - } + if (level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire)) + { + return RiddleOfFire; + } + + if (IsEnabled(CustomComboPreset.MNK_STUseROW) + && level >= Levels.RiddleOfWind + && !IsOnCooldown(RiddleOfWind)) + { + return RiddleOfWind; } } + + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + return All.SecondWind; + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && IsEnabled(CustomComboPreset.MNK_ST_ComboHeals) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + return All.Bloodbath; + + if (IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) + && Gauge.Chakra >= 5 + && level >= Levels.SteelPeak) + { + return OriginalHook(Meditation); + } } // GCDs if (inCombat) { - if (WasLastAction(MasterfulBlitz)) - { - return FormShift; - } - if (HasEffect(Buffs.FormlessFist)) { return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); @@ -224,7 +205,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) { return OriginalHook(MasterfulBlitz); } @@ -275,7 +256,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb && HasEffect(Buffs.FiresRumination) && !HasEffect(Buffs.PerfectBalance) && !HasEffect(Buffs.FormlessFist) - && (isEvenWindow || !isEvenWindow && WasLastAction(LeapingOpo)) + && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) && level >= Levels.FiresReply) { return FiresReply; From d499701801e165784f6b920bb83fbf771ef363a7 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Tue, 30 Jul 2024 08:27:32 +0100 Subject: [PATCH 031/142] Small tweak to ensure FR and WR don't drop off - also don't use Meditation while under ROF as per XIVAnalysis --- XIVSlothCombo/Combos/PvE/MNK.cs | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 2a1404864..9a72052ca 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -134,6 +134,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseMeditation) && (!inCombat || !InMeleeRange()) && Gauge.Chakra < 5 + && !HasEffect(Buffs.RiddleOfFire) && LevelChecked(Meditation)) { return OriginalHook(Meditation); @@ -150,12 +151,12 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { return PerfectBalance; } - else + else if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) + && HasEffect(Buffs.RiddleOfFire) + && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8 + && !HasEffect(Buffs.FiresRumination)) { - if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8) - { - return PerfectBalance; - } + return PerfectBalance; } } @@ -197,6 +198,21 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // GCDs if (inCombat) { + // Ensure usage if buff is almost depleted. + if (IsEnabled(CustomComboPreset.MNK_STUseFiresReply) + && HasEffect(Buffs.FiresRumination) + && GetBuffRemainingTime(Buffs.FiresRumination) < 4) + { + return FiresReply; + } + + if (IsEnabled(CustomComboPreset.MNK_STUseWindsReply) + && HasEffect(Buffs.WindsRumination) + && GetBuffRemainingTime(Buffs.WindsRumination) < 4) + { + return WindsReply; + } + if (HasEffect(Buffs.FormlessFist)) { return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); From bd5147717996c4a08c8c741db09ad3524913a22f Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 31 Jul 2024 19:33:09 +0100 Subject: [PATCH 032/142] Quick fix to opener --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index 499892301..9f6084cac 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -165,10 +165,10 @@ private bool DoSLOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 10) OpenerStep++; else if (OpenerStep == 10) actionID = DragonKick; - if (CustomComboFunctions.WasLastAction(FiresReply) && OpenerStep == 11) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; else if (OpenerStep == 11) actionID = FiresReply; - if (CustomComboFunctions.WasLastAction(WindsReply) && OpenerStep == 12) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; else if (OpenerStep == 12) actionID = WindsReply; if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 13) OpenerStep++; @@ -257,10 +257,10 @@ private bool DoLLOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 10) OpenerStep++; else if (OpenerStep == 10) actionID = DragonKick; - if (CustomComboFunctions.WasLastAction(FiresReply) && OpenerStep == 11) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; else if (OpenerStep == 11) actionID = FiresReply; - if (CustomComboFunctions.WasLastAction(WindsReply) && OpenerStep == 12) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; else if (OpenerStep == 12) actionID = WindsReply; if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 13) OpenerStep++; From 6d33b8276b8e7bc446b422f238f437426bc56944 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 31 Jul 2024 20:52:22 +0100 Subject: [PATCH 033/142] MOAR Opener fixes --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 87 +++++++++++++++----------- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index 9f6084cac..d9642aaef 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -48,6 +48,8 @@ private static bool HasCooldowns() private OpenerState currentState = OpenerState.PrePull; + private uint ActionBeforeTFC = 0; + public OpenerState CurrentState { get @@ -118,6 +120,11 @@ private bool DoPrePullSteps(ref uint actionID) return false; } + private bool WasLastActionNoTFC(uint actionID) + { + return CustomComboFunctions.WasLastAction(actionID) || CustomComboFunctions.WasLastAction(ActionBeforeTFC); + } + private bool DoSLOpener(ref uint actionID) { if (!LevelChecked) @@ -133,63 +140,63 @@ private bool DoSLOpener(ref uint actionID) return true; } - if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; + if ((WasLastActionNoTFC(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; - if (CustomComboFunctions.WasLastAction(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; + if (WasLastActionNoTFC(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; else if (OpenerStep == 2) actionID = TheForbiddenChakra; - if (CustomComboFunctions.WasLastAction(TwinSnakes) && OpenerStep == 3) OpenerStep++; + if (WasLastActionNoTFC(TwinSnakes) && OpenerStep == 3) OpenerStep++; else if (OpenerStep == 3) actionID = TwinSnakes; - if (CustomComboFunctions.WasLastAction(Demolish) && OpenerStep == 4) OpenerStep++; + if (WasLastActionNoTFC(Demolish) && OpenerStep == 4) OpenerStep++; else if (OpenerStep == 4) actionID = Demolish; - if (CustomComboFunctions.WasLastAction(Brotherhood) && OpenerStep == 5) OpenerStep++; + if (WasLastActionNoTFC(Brotherhood) && OpenerStep == 5) OpenerStep++; else if (OpenerStep == 5) actionID = Brotherhood; - if (CustomComboFunctions.WasLastAction(RiddleOfFire) && OpenerStep == 6) OpenerStep++; + if (WasLastActionNoTFC(RiddleOfFire) && OpenerStep == 6) OpenerStep++; else if (OpenerStep == 6) actionID = RiddleOfFire; // Pot - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 7) OpenerStep++; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 7) OpenerStep++; else if (OpenerStep == 7) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(RiddleOfWind) && OpenerStep == 8) OpenerStep++; + if (WasLastActionNoTFC(RiddleOfWind) && OpenerStep == 8) OpenerStep++; else if (OpenerStep == 8) actionID = RiddleOfWind; - if (CustomComboFunctions.WasLastAction(RisingPhoenix) && OpenerStep == 9) OpenerStep++; + if (WasLastActionNoTFC(RisingPhoenix) && OpenerStep == 9) OpenerStep++; else if (OpenerStep == 9) actionID = RisingPhoenix; - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 10) OpenerStep++; + if (WasLastActionNoTFC(DragonKick) && OpenerStep == 10) OpenerStep++; else if (OpenerStep == 10) actionID = DragonKick; - if ((CustomComboFunctions.WasLastAction(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; + if ((WasLastActionNoTFC(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; else if (OpenerStep == 11) actionID = FiresReply; - if ((CustomComboFunctions.WasLastAction(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; + if ((WasLastActionNoTFC(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; else if (OpenerStep == 12) actionID = WindsReply; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 13) OpenerStep++; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 13) OpenerStep++; else if (OpenerStep == 13) actionID = LeapingOpo; - if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; + if ((WasLastActionNoTFC(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; else if (OpenerStep == 14) actionID = PerfectBalance; - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 15) OpenerStep++; + if (WasLastActionNoTFC(DragonKick) && OpenerStep == 15) OpenerStep++; else if (OpenerStep == 15) actionID = DragonKick; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 16) OpenerStep++; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 16) OpenerStep++; else if (OpenerStep == 16) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 17) OpenerStep++; + if (WasLastActionNoTFC(DragonKick) && OpenerStep == 17) OpenerStep++; else if (OpenerStep == 17) actionID = DragonKick; - if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 18) OpenerStep++; + if (WasLastActionNoTFC(ElixirBurst) && OpenerStep == 18) OpenerStep++; else if (OpenerStep == 18) actionID = ElixirBurst; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; else if (OpenerStep == 19) actionID = LeapingOpo; if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) @@ -205,6 +212,8 @@ private bool DoSLOpener(ref uint actionID) CurrentState = OpenerState.FailedOpener; return false; } + + ActionBeforeTFC = actionID; return true; } return false; @@ -225,63 +234,63 @@ private bool DoLLOpener(ref uint actionID) return true; } - if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; + if ((WasLastActionNoTFC(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; - if (CustomComboFunctions.WasLastAction(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; + if (WasLastActionNoTFC(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; else if (OpenerStep == 2) actionID = TheForbiddenChakra; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 3) OpenerStep++; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 3) OpenerStep++; else if (OpenerStep == 3) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 4) OpenerStep++; + if (WasLastActionNoTFC(DragonKick) && OpenerStep == 4) OpenerStep++; else if (OpenerStep == 4) actionID = DragonKick; - if (CustomComboFunctions.WasLastAction(Brotherhood) && OpenerStep == 5) OpenerStep++; + if (WasLastActionNoTFC(Brotherhood) && OpenerStep == 5) OpenerStep++; else if (OpenerStep == 5) actionID = Brotherhood; - if (CustomComboFunctions.WasLastAction(RiddleOfFire) && OpenerStep == 6) OpenerStep++; + if (WasLastActionNoTFC(RiddleOfFire) && OpenerStep == 6) OpenerStep++; else if (OpenerStep == 6) actionID = RiddleOfFire; // Pot - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 7) OpenerStep++; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 7) OpenerStep++; else if (OpenerStep == 7) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(RiddleOfWind) && OpenerStep == 8) OpenerStep++; + if (WasLastActionNoTFC(RiddleOfWind) && OpenerStep == 8) OpenerStep++; else if (OpenerStep == 8) actionID = RiddleOfWind; - if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 9) OpenerStep++; + if (WasLastActionNoTFC(ElixirBurst) && OpenerStep == 9) OpenerStep++; else if (OpenerStep == 9) actionID = ElixirBurst; - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 10) OpenerStep++; + if (WasLastActionNoTFC(DragonKick) && OpenerStep == 10) OpenerStep++; else if (OpenerStep == 10) actionID = DragonKick; - if ((CustomComboFunctions.WasLastAction(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; + if ((WasLastActionNoTFC(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; else if (OpenerStep == 11) actionID = FiresReply; - if ((CustomComboFunctions.WasLastAction(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; + if ((WasLastActionNoTFC(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; else if (OpenerStep == 12) actionID = WindsReply; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 13) OpenerStep++; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 13) OpenerStep++; else if (OpenerStep == 13) actionID = LeapingOpo; - if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; + if ((WasLastActionNoTFC(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; else if (OpenerStep == 14) actionID = PerfectBalance; - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 15) OpenerStep++; + if (WasLastActionNoTFC(DragonKick) && OpenerStep == 15) OpenerStep++; else if (OpenerStep == 15) actionID = DragonKick; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 16) OpenerStep++; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 16) OpenerStep++; else if (OpenerStep == 16) actionID = LeapingOpo; - if (CustomComboFunctions.WasLastAction(DragonKick) && OpenerStep == 17) OpenerStep++; + if (WasLastActionNoTFC(DragonKick) && OpenerStep == 17) OpenerStep++; else if (OpenerStep == 17) actionID = DragonKick; - if (CustomComboFunctions.WasLastAction(ElixirBurst) && OpenerStep == 18) OpenerStep++; + if (WasLastActionNoTFC(ElixirBurst) && OpenerStep == 18) OpenerStep++; else if (OpenerStep == 18) actionID = ElixirBurst; - if (CustomComboFunctions.WasLastAction(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; + if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; else if (OpenerStep == 19) actionID = LeapingOpo; if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) @@ -297,6 +306,8 @@ private bool DoLLOpener(ref uint actionID) CurrentState = OpenerState.FailedOpener; return false; } + + ActionBeforeTFC = actionID; return true; } return false; From 1d59a85be420aa7aa31ac4ab55a19ce96ca021c8 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 31 Jul 2024 21:04:11 +0100 Subject: [PATCH 034/142] whoopsie --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index d9642aaef..18634d199 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -122,7 +122,7 @@ private bool DoPrePullSteps(ref uint actionID) private bool WasLastActionNoTFC(uint actionID) { - return CustomComboFunctions.WasLastAction(actionID) || CustomComboFunctions.WasLastAction(ActionBeforeTFC); + return CustomComboFunctions.WasLastAction(TheForbiddenChakra) || CustomComboFunctions.WasLastAction(ActionBeforeTFC); } private bool DoSLOpener(ref uint actionID) From f41d4ffd30cc46f9808ec1f046e150e1bb5ee524 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Wed, 31 Jul 2024 21:28:21 +0100 Subject: [PATCH 035/142] Opener modifications for TFC breaking --- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 87 +++++++++++--------------- 1 file changed, 38 insertions(+), 49 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index 18634d199..6debc2bfc 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -48,8 +48,6 @@ private static bool HasCooldowns() private OpenerState currentState = OpenerState.PrePull; - private uint ActionBeforeTFC = 0; - public OpenerState CurrentState { get @@ -120,11 +118,6 @@ private bool DoPrePullSteps(ref uint actionID) return false; } - private bool WasLastActionNoTFC(uint actionID) - { - return CustomComboFunctions.WasLastAction(TheForbiddenChakra) || CustomComboFunctions.WasLastAction(ActionBeforeTFC); - } - private bool DoSLOpener(ref uint actionID) { if (!LevelChecked) @@ -140,63 +133,63 @@ private bool DoSLOpener(ref uint actionID) return true; } - if ((WasLastActionNoTFC(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; - if (WasLastActionNoTFC(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; + if (CustomComboFunctions.WasLastAction(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; else if (OpenerStep == 2) actionID = TheForbiddenChakra; - if (WasLastActionNoTFC(TwinSnakes) && OpenerStep == 3) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(TwinSnakes) && OpenerStep == 3) OpenerStep++; else if (OpenerStep == 3) actionID = TwinSnakes; - if (WasLastActionNoTFC(Demolish) && OpenerStep == 4) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(Demolish) && OpenerStep == 4) OpenerStep++; else if (OpenerStep == 4) actionID = Demolish; - if (WasLastActionNoTFC(Brotherhood) && OpenerStep == 5) OpenerStep++; + if (CustomComboFunctions.WasLastAbility(Brotherhood) && CustomComboFunctions.HasEffect(Buffs.Brotherhood) && OpenerStep == 5) OpenerStep++; else if (OpenerStep == 5) actionID = Brotherhood; - if (WasLastActionNoTFC(RiddleOfFire) && OpenerStep == 6) OpenerStep++; + if (CustomComboFunctions.WasLastAction(RiddleOfFire) && CustomComboFunctions.HasEffect(Buffs.RiddleOfFire) && OpenerStep == 6) OpenerStep++; else if (OpenerStep == 6) actionID = RiddleOfFire; // Pot - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 7) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 7) OpenerStep++; else if (OpenerStep == 7) actionID = LeapingOpo; - if (WasLastActionNoTFC(RiddleOfWind) && OpenerStep == 8) OpenerStep++; + if (CustomComboFunctions.WasLastAction(RiddleOfWind) && CustomComboFunctions.HasEffect(Buffs.RiddleOfWind) && OpenerStep == 8) OpenerStep++; else if (OpenerStep == 8) actionID = RiddleOfWind; - if (WasLastActionNoTFC(RisingPhoenix) && OpenerStep == 9) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(RisingPhoenix) && OpenerStep == 9) OpenerStep++; else if (OpenerStep == 9) actionID = RisingPhoenix; - if (WasLastActionNoTFC(DragonKick) && OpenerStep == 10) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(DragonKick) && OpenerStep == 10) OpenerStep++; else if (OpenerStep == 10) actionID = DragonKick; - if ((WasLastActionNoTFC(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; + if ((CustomComboFunctions.WasLastWeaponskill(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; else if (OpenerStep == 11) actionID = FiresReply; - if ((WasLastActionNoTFC(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; + if ((CustomComboFunctions.WasLastWeaponskill(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; else if (OpenerStep == 12) actionID = WindsReply; - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 13) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 13) OpenerStep++; else if (OpenerStep == 13) actionID = LeapingOpo; - if ((WasLastActionNoTFC(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; else if (OpenerStep == 14) actionID = PerfectBalance; - if (WasLastActionNoTFC(DragonKick) && OpenerStep == 15) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(DragonKick) && OpenerStep == 15) OpenerStep++; else if (OpenerStep == 15) actionID = DragonKick; - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 16) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 16) OpenerStep++; else if (OpenerStep == 16) actionID = LeapingOpo; - if (WasLastActionNoTFC(DragonKick) && OpenerStep == 17) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(DragonKick) && OpenerStep == 17) OpenerStep++; else if (OpenerStep == 17) actionID = DragonKick; - if (WasLastActionNoTFC(ElixirBurst) && OpenerStep == 18) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(ElixirBurst) && OpenerStep == 18) OpenerStep++; else if (OpenerStep == 18) actionID = ElixirBurst; - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; else if (OpenerStep == 19) actionID = LeapingOpo; if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) @@ -212,8 +205,6 @@ private bool DoSLOpener(ref uint actionID) CurrentState = OpenerState.FailedOpener; return false; } - - ActionBeforeTFC = actionID; return true; } return false; @@ -234,63 +225,63 @@ private bool DoLLOpener(ref uint actionID) return true; } - if ((WasLastActionNoTFC(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = PerfectBalance; - if (WasLastActionNoTFC(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; + if (CustomComboFunctions.WasLastAction(TheForbiddenChakra) && OpenerStep == 2) OpenerStep++; else if (OpenerStep == 2) actionID = TheForbiddenChakra; - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 3) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 3) OpenerStep++; else if (OpenerStep == 3) actionID = LeapingOpo; - if (WasLastActionNoTFC(DragonKick) && OpenerStep == 4) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(DragonKick) && OpenerStep == 4) OpenerStep++; else if (OpenerStep == 4) actionID = DragonKick; - if (WasLastActionNoTFC(Brotherhood) && OpenerStep == 5) OpenerStep++; + if (CustomComboFunctions.WasLastAbility(Brotherhood) && CustomComboFunctions.HasEffect(Buffs.Brotherhood) && OpenerStep == 5) OpenerStep++; else if (OpenerStep == 5) actionID = Brotherhood; - if (WasLastActionNoTFC(RiddleOfFire) && OpenerStep == 6) OpenerStep++; + if (CustomComboFunctions.WasLastAction(RiddleOfFire) && CustomComboFunctions.HasEffect(Buffs.RiddleOfFire) && OpenerStep == 6) OpenerStep++; else if (OpenerStep == 6) actionID = RiddleOfFire; // Pot - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 7) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 7) OpenerStep++; else if (OpenerStep == 7) actionID = LeapingOpo; - if (WasLastActionNoTFC(RiddleOfWind) && OpenerStep == 8) OpenerStep++; + if (CustomComboFunctions.WasLastAction(RiddleOfWind) && CustomComboFunctions.HasEffect(Buffs.RiddleOfWind) && OpenerStep == 8) OpenerStep++; else if (OpenerStep == 8) actionID = RiddleOfWind; - if (WasLastActionNoTFC(ElixirBurst) && OpenerStep == 9) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(ElixirBurst) && OpenerStep == 9) OpenerStep++; else if (OpenerStep == 9) actionID = ElixirBurst; - if (WasLastActionNoTFC(DragonKick) && OpenerStep == 10) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(DragonKick) && OpenerStep == 10) OpenerStep++; else if (OpenerStep == 10) actionID = DragonKick; - if ((WasLastActionNoTFC(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; + if ((CustomComboFunctions.WasLastWeaponskill(FiresReply) || !CustomComboFunctions.HasEffect(Buffs.FiresRumination)) && OpenerStep == 11) OpenerStep++; else if (OpenerStep == 11) actionID = FiresReply; - if ((WasLastActionNoTFC(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; + if ((CustomComboFunctions.WasLastWeaponskill(WindsReply) || !CustomComboFunctions.HasEffect(Buffs.WindsRumination)) && OpenerStep == 12) OpenerStep++; else if (OpenerStep == 12) actionID = WindsReply; - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 13) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 13) OpenerStep++; else if (OpenerStep == 13) actionID = LeapingOpo; - if ((WasLastActionNoTFC(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; + if ((CustomComboFunctions.WasLastAction(PerfectBalance) || CustomComboFunctions.HasEffect(Buffs.PerfectBalance)) && OpenerStep == 14) OpenerStep++; else if (OpenerStep == 14) actionID = PerfectBalance; - if (WasLastActionNoTFC(DragonKick) && OpenerStep == 15) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(DragonKick) && OpenerStep == 15) OpenerStep++; else if (OpenerStep == 15) actionID = DragonKick; - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 16) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 16) OpenerStep++; else if (OpenerStep == 16) actionID = LeapingOpo; - if (WasLastActionNoTFC(DragonKick) && OpenerStep == 17) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(DragonKick) && OpenerStep == 17) OpenerStep++; else if (OpenerStep == 17) actionID = DragonKick; - if (WasLastActionNoTFC(ElixirBurst) && OpenerStep == 18) OpenerStep++; + if (CustomComboFunctions.WasLastWeaponskill(ElixirBurst) && OpenerStep == 18) OpenerStep++; else if (OpenerStep == 18) actionID = ElixirBurst; - if (WasLastActionNoTFC(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; + if (CustomComboFunctions.WasLastWeaponskill(LeapingOpo) && OpenerStep == 19) CurrentState = OpenerState.OpenerFinished; else if (OpenerStep == 19) actionID = LeapingOpo; if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) @@ -306,8 +297,6 @@ private bool DoLLOpener(ref uint actionID) CurrentState = OpenerState.FailedOpener; return false; } - - ActionBeforeTFC = actionID; return true; } return false; From 07ef7e73e28d11ced9b50ecc51149c8e1534b0e0 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Thu, 1 Aug 2024 15:17:50 +0100 Subject: [PATCH 036/142] fixed level checks --- XIVSlothCombo/Combos/PvE/MNK.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 9a72052ca..be358c627 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -446,7 +446,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (Gauge.OpoOpoFury == 0) { - if (LevelChecked(Levels.DragonKick)) + if (LevelChecked(DragonKick)) return DragonKick; } else @@ -475,7 +475,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (Gauge.RaptorFury == 0) { - if (LevelChecked(Levels.TwinSnakes)) + if (LevelChecked(TwinSnakes)) return TwinSnakes; } else @@ -504,7 +504,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (Gauge.CoeurlFury == 0) { - if (LevelChecked(Levels.Demolish)) + if (LevelChecked(Demolish)) return Demolish; } else @@ -554,7 +554,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable { if (Gauge.OpoOpoFury == 0) { - if (CustomComboFunctions.LevelChecked(Levels.DragonKick)) + if (CustomComboFunctions.LevelChecked(DragonKick)) return DragonKick; } else @@ -567,12 +567,12 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable { if (Gauge.RaptorFury == 0) { - if (CustomComboFunctions.LevelChecked(Levels.TwinSnakes)) + if (CustomComboFunctions.LevelChecked(TwinSnakes)) return TwinSnakes; } else { - if (CustomComboFunctions.LevelChecked(Levels.TrueStrike)) + if (CustomComboFunctions.LevelChecked(TrueStrike)) return CustomComboFunctions.OriginalHook(TrueStrike); } } @@ -585,7 +585,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable && CustomComboFunctions.IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) && CustomComboFunctions.TargetNeedsPositionals() && !CustomComboFunctions.HasEffect(Buffs.TrueNorth) - && CustomComboFunctions.LevelChecked(Levels.TrueNorth) + && CustomComboFunctions.LevelChecked(TrueNorth) && CustomComboFunctions.HasCharges(TrueNorth) && useTrueNorthIfEnabled) { @@ -593,7 +593,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable } else { - if (CustomComboFunctions.LevelChecked(Levels.Demolish)) + if (CustomComboFunctions.LevelChecked(Demolish)) return Demolish; } } @@ -602,7 +602,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable && CustomComboFunctions.IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) && CustomComboFunctions.TargetNeedsPositionals() && !CustomComboFunctions.HasEffect(Buffs.TrueNorth) - && CustomComboFunctions.LevelChecked(Levels.TrueNorth) + && CustomComboFunctions.LevelChecked(TrueNorth) && CustomComboFunctions.HasCharges(TrueNorth) && useTrueNorthIfEnabled) { @@ -610,7 +610,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable } else { - if (CustomComboFunctions.LevelChecked(Levels.SnapPunch)) + if (CustomComboFunctions.LevelChecked(SnapPunch)) return CustomComboFunctions.OriginalHook(SnapPunch); } } From 89011ad93b4bc8216c12a525fd3689421d674085 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Thu, 1 Aug 2024 22:07:08 +0100 Subject: [PATCH 037/142] Use opo to prep PR --- XIVSlothCombo/Combos/PvE/MNK.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index be358c627..4a385e3bd 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -236,7 +236,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); #region Open Solar - if (!solarNadi) + if (!solarNadi && !bothNadisOpen) { if (coeurlChakra == 0) { @@ -253,7 +253,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } #endregion #region Open Lunar - if (solarNadi || lunarNadi) + if (solarNadi || lunarNadi || bothNadisOpen) { return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } From 33e7a7a71262123869374b278c26f3323e19562f Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 10 Aug 2024 10:27:37 +0100 Subject: [PATCH 038/142] Make recommended changes --- XIVSlothCombo/Combos/CustomComboPreset.cs | 63 +++---- XIVSlothCombo/Combos/PvE/MNK.cs | 192 ++++++++++++++++++++-- 2 files changed, 207 insertions(+), 48 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index c4137ca2f..86832ae11 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1835,65 +1835,66 @@ public enum CustomComboPreset #region MONK [ReplaceSkill([MNK.ArmOfTheDestroyer])] - [CustomComboInfo("AOE Rotation", "Basic Monk AOE Combo on one button", MNK.JobID)] - MNK_AOE_BasicMode = 9003, + [CustomComboInfo("Simple Mode - AoE", "Replaces Arm of the Destroyer with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", MNK.JobID)] + MNK_AOE_SimpleMode = 9003, - [ParentCombo(MNK_AOE_BasicMode)] - [CustomComboInfo("Use Cooldowns Option", "Use large cooldowns during AOE rotation", MNK.JobID)] - MNK_BasicAOECombo_UseCooldowns = 9004, + [ReplaceSkill([MNK.Bootshine])] + [CustomComboInfo("Simple Mode - Single Target", "Replaces Bootshine with a one - button full single target rotation.\nThis is ideal for newcomers to the job.", MNK.JobID)] + [ConflictingCombos(MNK_ST_BeastChakras, MNK_ST_AdvancedMode)] + MNK_ST_SimpleMode = 9004, #region Monk Advanced ST [ReplaceSkill([MNK.Bootshine])] - [CustomComboInfo("Custom ST Rotation", "Advanced Monk Combo on one button", MNK.JobID)] - [ConflictingCombos(MNK_ST_BallHandlers)] + [CustomComboInfo("Advanced Mode - Single Target", "Replaces Bootshine with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", MNK.JobID)] + [ConflictingCombos(MNK_ST_BeastChakras, MNK_ST_SimpleMode)] MNK_ST_AdvancedMode = 9005, [ParentCombo(MNK_ST_AdvancedMode)] - [CustomComboInfo("Use Opener", "Uses selected opener", MNK.JobID)] + [CustomComboInfo("Opener Option", "Uses selected opener", MNK.JobID)] MNK_STUseOpener = 9006, [ParentCombo(MNK_ST_AdvancedMode)] - [CustomComboInfo("Use Meditation", "Uses Meditation when out of combat/range", MNK.JobID)] + [CustomComboInfo("Meditation Option", "Adds Meditation to the rotation", MNK.JobID)] MNK_STUseMeditation = 9007, [ParentCombo(MNK_ST_AdvancedMode)] - [CustomComboInfo("Buffs", "Use Buffs on cooldown", MNK.JobID)] + [CustomComboInfo("Buffs Option", "Adds selected buffs to the rotation", MNK.JobID)] MNK_STUseBuffs = 9008, [ParentCombo(MNK_STUseBuffs)] - [CustomComboInfo("Use Brotherhood", "Use Brotherhood", MNK.JobID)] + [CustomComboInfo("Brotherhood Option", "Adds Brotherhood to the rotation", MNK.JobID)] MNK_STUseBrotherhood = 9009, [ParentCombo(MNK_STUseBuffs)] - [CustomComboInfo("Use Riddle of Wind", "Use Riddle of Wind", MNK.JobID)] + [CustomComboInfo("Riddle of Wind Option", "Adds Riddle of Wind to the rotation", MNK.JobID)] MNK_STUseROW = 9010, [ParentCombo(MNK_STUseBuffs)] - [CustomComboInfo("Use Riddle of Fire", "Use Riddle of Fire", MNK.JobID)] + [CustomComboInfo("Riddle of Fire Option", "Adds Riddle of Fire to the rotation", MNK.JobID)] MNK_STUseROF = 9011, [ParentCombo(MNK_ST_AdvancedMode)] - [CustomComboInfo("Use The Forbidden Chakra", "Use The Forbidden Chakra", MNK.JobID)] + [CustomComboInfo("The Forbidden Chakra Option", "Adds The Forbidden Chakra to the rotation", MNK.JobID)] MNK_STUseTheForbiddenChakra = 9012, [ParentCombo(MNK_ST_AdvancedMode)] - [CustomComboInfo("Use Perfect Balance", "Use Perfect Balance and Masterful Blitz", MNK.JobID)] + [CustomComboInfo("Perfect Balance Option", "Adds Perfect Balance and Masterful Blitz to the rotation", MNK.JobID)] MNK_STUsePerfectBalance = 9013, [ParentCombo(MNK_ST_AdvancedMode)] - [CustomComboInfo("Use True North", "Use True North dynamically when not in positional", MNK.JobID)] + [CustomComboInfo("True North Option", "Adds True North dynamically, when not in positional, to the rotation", MNK.JobID)] MNK_STUseTrueNorth = 9014, [ParentCombo(MNK_STUseROW)] - [CustomComboInfo("Use Wind's Reply", "Use Wind's Reply", MNK.JobID)] + [CustomComboInfo("Wind's Reply Option", "Adds Wind's Reply to the rotation", MNK.JobID)] MNK_STUseWindsReply = 9015, [ParentCombo(MNK_STUseROF)] - [CustomComboInfo("Use Fire's Reply", "Use Fire's Reply", MNK.JobID)] + [CustomComboInfo("Fire's Reply Option", "Adds Fire's Reply to the rotation", MNK.JobID)] MNK_STUseFiresReply = 9016, [ParentCombo(MNK_ST_AdvancedMode)] - [CustomComboInfo("Use Form Shift", "Uses Form Shift", MNK.JobID)] + [CustomComboInfo("Form Shift Option", "Adds Form Shift to the rotation", MNK.JobID)] MNK_STUseFormShift = 9017, [ParentCombo(MNK_ST_AdvancedMode)] @@ -1902,24 +1903,24 @@ public enum CustomComboPreset #endregion - [ConflictingCombos(MNK_ST_AdvancedMode)] - [CustomComboInfo("Ball Handlers", "Replace core rotation skills with single button, depending on current balls.", MNK.JobID)] - MNK_ST_BallHandlers = 9019, + [ConflictingCombos(MNK_ST_AdvancedMode, MNK_ST_SimpleMode)] + [CustomComboInfo("Beast Chakra Handlers", "Replace core rotation skills with single button, depending on current chakras.", MNK.JobID)] + MNK_ST_BeastChakras = 9019, [ReplaceSkill(MNK.Bootshine)] - [CustomComboInfo("Opo-opo", "Replace Bootshine/Leaping Opo with Dragon Kick.", MNK.JobID)] - [ParentCombo(MNK_ST_BallHandlers)] - MNK_BALLS_OPOOPO = 9020, + [CustomComboInfo("Opo-opo Option", "Replace Bootshine/Leaping Opo with Dragon Kick.", MNK.JobID)] + [ParentCombo(MNK_ST_BeastChakras)] + MNK_BC_OPOOPO = 9020, [ReplaceSkill(MNK.TrueStrike)] - [CustomComboInfo("Raptor", "Replace True Strike/Rising Raptor with Twin Snakes.", MNK.JobID)] - [ParentCombo(MNK_ST_BallHandlers)] - MNK_BALLS_RAPTOR = 9021, + [CustomComboInfo("Raptor Option", "Replace True Strike/Rising Raptor with Twin Snakes.", MNK.JobID)] + [ParentCombo(MNK_ST_BeastChakras)] + MNK_BC_RAPTOR = 9021, [ReplaceSkill(MNK.SnapPunch)] - [CustomComboInfo("Coeurl", "Replace Snap Punch/Pouncing Coeurl with Demolish.", MNK.JobID)] - [ParentCombo(MNK_ST_BallHandlers)] - MNK_BALLS_COEURL = 9022, + [CustomComboInfo("Coeurl Option", "Replace Snap Punch/Pouncing Coeurl with Demolish.", MNK.JobID)] + [ParentCombo(MNK_ST_BeastChakras)] + MNK_BC_COEURL = 9022, [ReplaceSkill(MNK.PerfectBalance)] [CustomComboInfo("Perfect Balance Feature", "Perfect Balance becomes Masterful Blitz while you have 3 Beast Chakra.", MNK.JobID)] diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 4a385e3bd..bdac95d33 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -113,6 +113,164 @@ public static UserInt MNK_SelectedOpener = new("MNK_SelectedOpener"); } + internal class MNK_ST_SimpleMode : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_SimpleMode; + internal static MNKOpenerLogic MNKOpener = new(); + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + bool canWeave = CanWeave(actionID, 0.5); + bool inCombat = HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat); + bool bothNadisOpen = Gauge.Nadi.ToString() == "LUNAR, SOLAR"; + + if (actionID is Bootshine or LeapingOpo) + { + if (MNKOpener.DoFullOpener(ref actionID, Config.MNK_SelectedOpener)) + return actionID; + + if ((!inCombat || !InMeleeRange()) + && Gauge.Chakra < 5 + && !HasEffect(Buffs.RiddleOfFire) + && LevelChecked(Meditation)) + { + return OriginalHook(Meditation); + } + + // OGCDs + if (inCombat && canWeave) + { + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance)) + { + if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) + && GetCooldownRemainingTime(RiddleOfFire) < 7 + && GetCooldownRemainingTime(Brotherhood) < 7) + { + return PerfectBalance; + } + else if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) + && HasEffect(Buffs.RiddleOfFire) + && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8 + && !HasEffect(Buffs.FiresRumination)) + { + return PerfectBalance; + } + } + + if (level >= Levels.Brotherhood + && !IsOnCooldown(Brotherhood)) + { + return Brotherhood; + } + + if (level >= Levels.RiddleOfFire + && !IsOnCooldown(RiddleOfFire)) + { + return RiddleOfFire; + } + + if (level >= Levels.RiddleOfWind + && !IsOnCooldown(RiddleOfWind)) + { + return RiddleOfWind; + } + + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + return All.SecondWind; + if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + return All.Bloodbath; + + if (Gauge.Chakra >= 5 + && level >= Levels.SteelPeak) + { + return OriginalHook(Meditation); + } + } + + // GCDs + if (inCombat) + { + // Ensure usage if buff is almost depleted. + if (HasEffect(Buffs.FiresRumination) + && GetBuffRemainingTime(Buffs.FiresRumination) < 4) + { + return FiresReply; + } + + if (HasEffect(Buffs.WindsRumination) + && GetBuffRemainingTime(Buffs.WindsRumination) < 4) + { + return WindsReply; + } + + if (HasEffect(Buffs.FormlessFist)) + { + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + } + + // Masterful Blitz + if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + { + return OriginalHook(MasterfulBlitz); + } + + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) + { + bool solarNadi = Gauge.Nadi == Nadi.SOLAR; + bool lunarNadi = Gauge.Nadi == Nadi.LUNAR; + int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); + int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); + int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); + + #region Open Solar + if (!solarNadi && !bothNadisOpen) + { + if (coeurlChakra == 0) + { + return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); + } + else if (raptorChakra == 0) + { + return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); + } + else if (opoOpoChakra == 0) + { + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + } + } + #endregion + #region Open Lunar + if (solarNadi || lunarNadi || bothNadisOpen) + { + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + } + #endregion + } + + if (HasEffect(Buffs.WindsRumination) + && level >= Levels.WindsReply) + { + return WindsReply; + } + + if (HasEffect(Buffs.FiresRumination) + && !HasEffect(Buffs.PerfectBalance) + && !HasEffect(Buffs.FormlessFist) + && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) + && level >= Levels.FiresReply) + { + return FiresReply; + } + + // Standard Balls + return DetermineCoreAbility(actionID); + } + } + + return actionID; + } + } + internal class MNK_ST_AdvancedMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_ST_AdvancedMode; @@ -289,7 +447,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb internal class MNK_AoE_SimpleMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_AOE_BasicMode; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.MNK_AOE_SimpleMode; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -318,12 +476,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) + if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) { return RiddleOfFire; } - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) { // Use Perfect Balance if: // 1. It's after Bootshine/Dragon Kick. @@ -341,12 +499,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) + if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) { return Brotherhood; } - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) + if (level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) { return RiddleOfWind; } @@ -366,12 +524,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (inCombat) { - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply) + if (HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply) { return WindsReply; } - if (IsEnabled(CustomComboPreset.MNK_BasicAOECombo_UseCooldowns) && HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply) + if (HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply) { return FiresReply; } @@ -431,14 +589,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - #region Ball Handlers - internal class MNK_BallHandler_OpoOpo : CustomCombo + #region Beast Chakras + internal class MNK_BeastChakra_OpoOpo : CustomCombo { - protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BallHandlers; + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BeastChakras; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - if (IsEnabled(CustomComboPreset.MNK_BALLS_OPOOPO)) + if (IsEnabled(CustomComboPreset.MNK_BC_OPOOPO)) { if (actionID is Bootshine or LeapingOpo) { @@ -461,13 +619,13 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - internal class MNK_BallHandler_Raptor : CustomCombo + internal class MNK_BeastChakra_Raptor : CustomCombo { - protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BallHandlers; + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BeastChakras; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - if (IsEnabled(CustomComboPreset.MNK_BALLS_RAPTOR)) + if (IsEnabled(CustomComboPreset.MNK_BC_RAPTOR)) { if (actionID is TrueStrike or RisingRaptor) { @@ -490,13 +648,13 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - internal class MNK_BallHandler_Coeurl : CustomCombo + internal class MNK_BeastChakra_Coeurl : CustomCombo { - protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BallHandlers; + protected internal override CustomComboPreset Preset => CustomComboPreset.MNK_ST_BeastChakras; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - if (IsEnabled(CustomComboPreset.MNK_BALLS_COEURL)) + if (IsEnabled(CustomComboPreset.MNK_BC_COEURL)) { if (actionID is SnapPunch or PouncingCoeurl) { From 44919a5f1a9055528199dc89ae70410bada61ebb Mon Sep 17 00:00:00 2001 From: edewen Date: Sat, 10 Aug 2024 09:48:01 -0400 Subject: [PATCH 039/142] Fixed rain of death level checking the wrong skill. also removed the unneeded broken opener code. It breaks things if you don't use buffs on trash. --- XIVSlothCombo/Combos/PvE/BRD.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index 73ab522e0..b6d7774bb 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -481,7 +481,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } - if (LevelChecked(Bloodletter) && (empyrealCD > 1 || !LevelChecked(EmpyrealArrow)) && ((!openerFinished && IsOnCooldown(RagingStrikes)) || openerFinished)) + if (LevelChecked(RainOfDeath) && (empyrealCD > 1 || !LevelChecked(EmpyrealArrow))) { uint rainOfDeathCharges = GetRemainingCharges(RainOfDeath); @@ -790,7 +790,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } - if (LevelChecked(Bloodletter) && (empyrealCD > 1 || !LevelChecked(EmpyrealArrow)) && ((!openerFinished && IsOnCooldown(RagingStrikes)) || openerFinished)) + if (LevelChecked(Bloodletter) && (empyrealCD > 1 || !LevelChecked(EmpyrealArrow))) { uint bloodletterCharges = GetRemainingCharges(Bloodletter); From 245d373ba675f98c2d5ee15c8794d8fc6566be86 Mon Sep 17 00:00:00 2001 From: edewen Date: Sat, 10 Aug 2024 10:06:36 -0400 Subject: [PATCH 040/142] Pitch perfect fix/ Sidewinder Pitch perfect was requiring buffs to be running or on cd, was breaking with manual buff users who wouldn't buff during trash. removed similar logic from Sidewinder as part of cleanup. Left it as part of the pooling option. Added its mention to pooling option text, it always did it, just adding the calrification. --- XIVSlothCombo/Combos/CustomComboPreset.cs | 2 +- XIVSlothCombo/Combos/PvE/BRD.cs | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..4e5715e3b 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -715,7 +715,7 @@ public enum CustomComboPreset //BardSimpleOpener = 3022, [ParentCombo(BRD_ST_SimpleMode)] - [CustomComboInfo("Simple Pooling Option", "Pools Bloodletter charges to allow for optimum burst phases.", BRD.JobID)] + [CustomComboInfo("Simple Pooling Option", "Pools Bloodletter charges to allow for optimum burst phases, will also keep sidewinder in the buff window during wanderers.", BRD.JobID)] BRD_Simple_Pooling = 3023, [ConflictingCombos(BRD_ST_SimpleMode)] diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index b6d7774bb..b4bcb421b 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -459,11 +459,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return EmpyrealArrow; if (LevelChecked(PitchPerfect) && songWanderer && - (gauge.Repertoire == 3 || (gauge.Repertoire == 2 && empyrealCD < 2)) && - ((!openerFinished && IsOnCooldown(RagingStrikes)) || (openerFinished && battleVoiceCD >= 3.5))) + (gauge.Repertoire == 3 || (gauge.Repertoire == 2 && empyrealCD < 2))) return OriginalHook(PitchPerfect); - if (sidewinderReady && ((!openerFinished && IsOnCooldown(RagingStrikes)) || (openerFinished && battleVoiceCD >= 3.5) || !IsEnabled(CustomComboPreset.BRD_AoE_Simple_Songs))) + if (sidewinderReady) { if (IsEnabled(CustomComboPreset.BRD_Simple_Pooling)) { @@ -768,11 +767,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return EmpyrealArrow; if (LevelChecked(PitchPerfect) && songWanderer && - (gauge.Repertoire == 3 || (gauge.Repertoire == 2 && empyrealCD < 2)) && - ((!openerFinished && IsOnCooldown(RagingStrikes)) || (openerFinished && battleVoiceCD >= 3.5))) + (gauge.Repertoire == 3 || (gauge.Repertoire == 2 && empyrealCD < 2))) return OriginalHook(PitchPerfect); - if (sidewinderReady && ((!openerFinished && IsOnCooldown(RagingStrikes)) || (openerFinished && battleVoiceCD >= 3.5) || !IsEnabled(CustomComboPreset.BRD_Simple_Buffs))) + if (sidewinderReady) { if (IsEnabled(CustomComboPreset.BRD_Simple_Pooling)) { From c3a79d1f0b5f8c49d28c5e6803c35922b30cb0d1 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Sat, 10 Aug 2024 15:55:48 +0100 Subject: [PATCH 041/142] Beast Chakra Handlers description change --- XIVSlothCombo/Combos/CustomComboPreset.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 86832ae11..c4c55c000 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1904,7 +1904,7 @@ public enum CustomComboPreset #endregion [ConflictingCombos(MNK_ST_AdvancedMode, MNK_ST_SimpleMode)] - [CustomComboInfo("Beast Chakra Handlers", "Replace core rotation skills with single button, depending on current chakras.", MNK.JobID)] + [CustomComboInfo("Beast Chakra Handlers", "Merge single target GCDs which share the same beast chakra", MNK.JobID)] MNK_ST_BeastChakras = 9019, [ReplaceSkill(MNK.Bootshine)] From 99b95e05fd9e8a89603484bf4a66edac7aff8644 Mon Sep 17 00:00:00 2001 From: edewen Date: Sat, 10 Aug 2024 10:58:51 -0400 Subject: [PATCH 042/142] Bard cleanup actionreadys simplified up empyreal arrow logic removing the unneeded opener stuff. removed nowaste defining opener closed. it has nothing to do with opener. went through the whole thing removing unneeded bools of level check and cd check, changing to actionready for sidewinder, bloodletter, rain of arrows, and empyreal --- XIVSlothCombo/Combos/PvE/BRD.cs | 59 ++++++++++++--------------------- 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index b4bcb421b..c1d310acb 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -301,18 +301,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is RainOfDeath) { BRDGauge? gauge = GetJobGauge(); - bool songWanderer = gauge.Song == Song.WANDERER; - bool empyrealReady = LevelChecked(EmpyrealArrow) && IsOffCooldown(EmpyrealArrow); - bool bloodletterReady = LevelChecked(Bloodletter) && IsOffCooldown(Bloodletter); - bool sidewinderReady = LevelChecked(Sidewinder) && IsOffCooldown(Sidewinder); + bool songWanderer = gauge.Song == Song.WANDERER; if (LevelChecked(WanderersMinuet) && songWanderer && gauge.Repertoire == 3) return OriginalHook(WanderersMinuet); - if (empyrealReady) + if (ActionReady(EmpyrealArrow)) return EmpyrealArrow; - if (bloodletterReady) + if (ActionReady(RainOfDeath)) return RainOfDeath; - if (sidewinderReady) + if (ActionReady(Sidewinder)) return Sidewinder; } @@ -360,8 +357,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { bool minuetReady = IsOffCooldown(WanderersMinuet); bool balladReady = IsOffCooldown(MagesBallad); - bool paeonReady = IsOffCooldown(ArmysPaeon); - bool empyrealReady = LevelChecked(EmpyrealArrow) && IsOffCooldown(EmpyrealArrow); + bool paeonReady = IsOffCooldown(ArmysPaeon); if (canWeave) { @@ -391,7 +387,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (songTimerInSeconds <= 3 && paeonReady) { // Special case for Empyreal Arrow: it must be cast before you change to it to avoid drift! - if (empyrealReady) + if (ActionReady(EmpyrealArrow)) return EmpyrealArrow; return ArmysPaeon; } @@ -448,21 +444,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (canWeave) { - bool empyrealReady = LevelChecked(EmpyrealArrow) && IsOffCooldown(EmpyrealArrow); - bool sidewinderReady = LevelChecked(Sidewinder) && IsOffCooldown(Sidewinder); float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); float empyrealCD = GetCooldownRemainingTime(EmpyrealArrow); float ragingCD = GetCooldownRemainingTime(RagingStrikes); float radiantCD = GetCooldownRemainingTime(RadiantFinale); - if (empyrealReady && ((!openerFinished && IsOnCooldown(RagingStrikes) || (!openerFinished && JustUsed(WanderersMinuet)) || (openerFinished && battleVoiceCD >= 3.5) || !IsEnabled(CustomComboPreset.BRD_Simple_Buffs)))) + if (ActionReady(EmpyrealArrow)) return EmpyrealArrow; if (LevelChecked(PitchPerfect) && songWanderer && (gauge.Repertoire == 3 || (gauge.Repertoire == 2 && empyrealCD < 2))) return OriginalHook(PitchPerfect); - if (sidewinderReady) + if (ActionReady(Sidewinder)) { if (IsEnabled(CustomComboPreset.BRD_Simple_Pooling)) { @@ -553,11 +547,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool songWanderer = gauge.Song == Song.WANDERER; bool minuetReady = LevelChecked(WanderersMinuet) && IsOffCooldown(WanderersMinuet); bool balladReady = LevelChecked(MagesBallad) && IsOffCooldown(MagesBallad); - bool paeonReady = LevelChecked(ArmysPaeon) && IsOffCooldown(ArmysPaeon); - bool empyrealReady = LevelChecked(EmpyrealArrow) && IsOffCooldown(EmpyrealArrow); - bool bloodletterReady = LevelChecked(Bloodletter) && IsOffCooldown(Bloodletter); - bool sidewinderReady = LevelChecked(Sidewinder) && IsOffCooldown(Sidewinder); - + bool paeonReady = LevelChecked(ArmysPaeon) && IsOffCooldown(ArmysPaeon); + if (IsEnabled(CustomComboPreset.BRD_oGCDSongs) && (gauge.SongTimer < 1 || songArmy)) { @@ -570,12 +561,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } if (songWanderer && gauge.Repertoire == 3) - return OriginalHook(WanderersMinuet); - if (empyrealReady) + return OriginalHook(PitchPerfect); + if (ActionReady(EmpyrealArrow)) return EmpyrealArrow; - if (bloodletterReady) + if (ActionReady(Bloodletter)) return OriginalHook(Bloodletter); - if (sidewinderReady) + if (ActionReady(Sidewinder)) return Sidewinder; } @@ -641,10 +632,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { openerFinished = false; } - - if (!IsEnabled(CustomComboPreset.BRD_Simple_NoWaste)) - openerFinished = true; - + if (IsEnabled(CustomComboPreset.BRD_Simple_Interrupt) && canInterrupt) return All.HeadGraze; @@ -668,9 +656,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool minuetReady = IsOffCooldown(WanderersMinuet); bool balladReady = IsOffCooldown(MagesBallad); bool paeonReady = IsOffCooldown(ArmysPaeon); - bool empyrealReady = LevelChecked(EmpyrealArrow) && IsOffCooldown(EmpyrealArrow); - - if (empyrealReady && !openerFinished && JustUsed(WanderersMinuet)) + + if (ActionReady(EmpyrealArrow) && JustUsed(WanderersMinuet)) return EmpyrealArrow; if (canWeave) @@ -701,7 +688,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (songTimerInSeconds <= 3 && paeonReady) { // Special case for Empyreal Arrow: it must be cast before you change to it to avoid drift! - if (empyrealReady) + if (ActionReady(EmpyrealArrow)) return EmpyrealArrow; return ArmysPaeon; } @@ -756,21 +743,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (canWeave) { - bool empyrealReady = LevelChecked(EmpyrealArrow) && IsOffCooldown(EmpyrealArrow); - bool sidewinderReady = LevelChecked(Sidewinder) && IsOffCooldown(Sidewinder); float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); float empyrealCD = GetCooldownRemainingTime(EmpyrealArrow); float ragingCD = GetCooldownRemainingTime(RagingStrikes); float radiantCD = GetCooldownRemainingTime(RadiantFinale); - if (empyrealReady && ((!openerFinished && IsOnCooldown(RagingStrikes) || (!openerFinished && JustUsed(WanderersMinuet)) || (openerFinished && battleVoiceCD >= 3.5) || !IsEnabled(CustomComboPreset.BRD_Simple_Buffs)))) + if (ActionReady(EmpyrealArrow)) return EmpyrealArrow; if (LevelChecked(PitchPerfect) && songWanderer && (gauge.Repertoire == 3 || (gauge.Repertoire == 2 && empyrealCD < 2))) return OriginalHook(PitchPerfect); - if (sidewinderReady) + if (ActionReady(Sidewinder)) { if (IsEnabled(CustomComboPreset.BRD_Simple_Pooling)) { @@ -788,7 +773,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } - if (LevelChecked(Bloodletter) && (empyrealCD > 1 || !LevelChecked(EmpyrealArrow))) + if (ActionReady(Bloodletter) && (empyrealCD > 1 || !LevelChecked(EmpyrealArrow))) { uint bloodletterCharges = GetRemainingCharges(Bloodletter); @@ -985,7 +970,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return ArmysPaeon; } - + return actionID; } } From 20adf5483cc5abb1d30c96c185d03d3b73c5b276 Mon Sep 17 00:00:00 2001 From: Tartarga <109563717+Tartarga@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:29:49 -0500 Subject: [PATCH 043/142] RDM Tweaks - RDM Helper Cleanup - Removed Prefulgence from oGCDs to Finisher - VerRaise features (RDM & All) include throwing in a VerCure --- XIVSlothCombo/Combos/CustomComboPreset.cs | 6 +- XIVSlothCombo/Combos/JobHelpers/RDM.cs | 170 +++++++++---------- XIVSlothCombo/Combos/PvE/ALL.cs | 2 + XIVSlothCombo/Combos/PvE/RDM.cs | 18 +- XIVSlothCombo/Window/Functions/UserConfig.cs | 2 - 5 files changed, 102 insertions(+), 96 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..157918f84 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -126,7 +126,7 @@ public enum CustomComboPreset [ReplaceSkill(RDM.Verraise, SMN.Resurrection, BLU.AngelWhisper)] [ConflictingCombos(SMN_Raise, RDM_Raise)] [ParentCombo(ALL_Caster_Menu)] - [CustomComboInfo("Magical Ranged DPS: Raise Feature", "Changes the class' Raise Ability into Swiftcast or Dualcast in the case of RDM.", ADV.JobID)] + [CustomComboInfo("Magical Ranged DPS: Raise Feature", "Changes the class' Raise Ability into Swiftcast. Red Mage will also show VerCure if Swiftcast is on cooldown.", ADV.JobID)] ALL_Caster_Raise = 100021, #endregion @@ -2916,6 +2916,10 @@ The three digets after RDM.JobID can be used to reorder items in the list [ConflictingCombos(ALL_Caster_Raise)] [CustomComboInfo("Verraise Feature", "Changes Swiftcast to Verraise when under the effect of Swiftcast or Dualcast.", RDM.JobID, 620)] RDM_Raise = 13620, + + [ParentCombo(RDM_Raise)] + [CustomComboInfo("Vercure Option", "If Swiftcast is on cooldown, change to Vercure to proc Dualcast.", RDM.JobID, 621)] + RDM_Raise_Vercure = 13621, #endregion #region Sections 8 to 9 - Miscellaneous diff --git a/XIVSlothCombo/Combos/JobHelpers/RDM.cs b/XIVSlothCombo/Combos/JobHelpers/RDM.cs index 337022c89..81a1a219e 100644 --- a/XIVSlothCombo/Combos/JobHelpers/RDM.cs +++ b/XIVSlothCombo/Combos/JobHelpers/RDM.cs @@ -1,31 +1,19 @@ using Dalamud.Game.ClientState.JobGauge.Types; using ECommons.DalamudServices; using System; -using System.Net.Quic; using XIVSlothCombo.Combos.JobHelpers.Enums; using XIVSlothCombo.Combos.PvE; -using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Data; +using static XIVSlothCombo.Combos.PvE.RDM; +using static XIVSlothCombo.CustomComboNS.Functions.CustomComboFunctions; namespace XIVSlothCombo.Combos.JobHelpers { - internal class RDMHelper : RDM + internal class RDMHelper { - static bool HasEffect(ushort id) => CustomComboFunctions.HasEffect(id); - static float GetBuffRemainingTime(ushort effectid) => CustomComboFunctions.GetBuffRemainingTime(effectid); - static bool LevelChecked(uint id) => CustomComboFunctions.LevelChecked(id); - static float GetActionCastTime(uint actionID) => CustomComboFunctions.GetActionCastTime(actionID); - static uint GetRemainingCharges(uint actionID) => CustomComboFunctions.GetRemainingCharges(actionID); - static float GetCooldownRemainingTime(uint actionID) => CustomComboFunctions.GetCooldownRemainingTime(actionID); - static bool ActionReady(uint id) => CustomComboFunctions.ActionReady(id); - static bool CanSpellWeave(uint id) => CustomComboFunctions.CanSpellWeave(id); - static bool HasCharges(uint id) => CustomComboFunctions.HasCharges(id); - static bool TraitLevelChecked(uint id) => CustomComboFunctions.TraitLevelChecked(id); - static byte GetBuffStacks(ushort id) => CustomComboFunctions.GetBuffStacks(id); - internal class RDMMana { - private static RDMGauge Gauge => CustomComboFunctions.GetJobGauge(); + private static RDMGauge Gauge => GetJobGauge(); internal static int ManaStacks => Gauge.ManaStacks; internal static int Black => AdjustMana(Gauge.BlackMana); internal static int White => AdjustMana(Gauge.WhiteMana); @@ -164,6 +152,15 @@ internal static bool CanUse(in uint lastComboMove, out uint actionID) return true; } + if (lastComboMove is Resolution + && TraitLevelChecked(Traits.EnhancedManaficationIII) + && HasEffect(Buffs.PrefulugenceReady)) + { + actionID = Prefulgence; + return true; + } + + actionID = 0; return false; } @@ -173,7 +170,7 @@ internal class OGCDHelper { internal static bool CanUse(in uint actionID, in bool SingleTarget, out uint newActionID) { - var distance = CustomComboFunctions.GetTargetDistance(); + var distance = GetTargetDistance(); uint placeOGCD = 0; @@ -181,7 +178,6 @@ internal static bool CanUse(in uint actionID, in bool SingleTarget, out uint new bool contra = SingleTarget ? Config.RDM_ST_oGCD_ContraSixte : Config.RDM_AoE_oGCD_ContraSixte; bool engagement = SingleTarget ? Config.RDM_ST_oGCD_Engagement : Config.RDM_AoE_oGCD_Engagement; bool vice = SingleTarget ? Config.RDM_ST_oGCD_ViceOfThorns : Config.RDM_AoE_oGCD_ViceOfThorns; - bool prefulg = SingleTarget ? Config.RDM_ST_oGCD_Prefulgence : Config.RDM_AoE_oGCD_Prefulgence; int engagementPool = (SingleTarget && Config.RDM_ST_oGCD_Engagement_Pooling) || (!SingleTarget && Config.RDM_AoE_oGCD_Engagement_Pooling) ? 1 : 0; bool corpacorps = SingleTarget ? Config.RDM_ST_oGCD_CorpACorps : Config.RDM_AoE_oGCD_CorpACorps; @@ -190,13 +186,17 @@ internal static bool CanUse(in uint actionID, in bool SingleTarget, out uint new //Grabs an oGCD to return based on radio options - if (engagement + + if (placeOGCD == 0 + && engagement && (GetRemainingCharges(Engagement) > engagementPool || (GetRemainingCharges(Engagement) == 1 && GetCooldownRemainingTime(Engagement) < 3)) && LevelChecked(Engagement) && distance <= 3) placeOGCD = Engagement; - if (corpacorps + + if (placeOGCD == 0 + && corpacorps && (GetRemainingCharges(Corpsacorps) > corpsacorpsPool || (GetRemainingCharges(Corpsacorps) == 1 && GetCooldownRemainingTime(Corpsacorps) < 3)) && ((GetRemainingCharges(Corpsacorps) >= GetRemainingCharges(Engagement)) || !LevelChecked(Engagement)) // Try to alternate between Corps-a-corps and Engagement @@ -204,22 +204,22 @@ internal static bool CanUse(in uint actionID, in bool SingleTarget, out uint new && distance <= corpacorpsRange) placeOGCD = Corpsacorps; - if (contra + if (placeOGCD == 0 + && contra && ActionReady(ContreSixte)) placeOGCD = ContreSixte; - if (fleche && ActionReady(Fleche)) + + if (placeOGCD == 0 + && fleche + && ActionReady(Fleche)) placeOGCD = Fleche; - if (vice && - TraitLevelChecked(Traits.EnhancedEmbolden) && - HasEffect(Buffs.ThornedFlourish)) + if (placeOGCD == 0 + && vice + && TraitLevelChecked(Traits.EnhancedEmbolden) + && HasEffect(Buffs.ThornedFlourish)) placeOGCD = ViceOfThorns; - if (prefulg && - TraitLevelChecked(Traits.EnhancedManaficationIII) && - HasEffect(Buffs.PrefulugenceReady)) - placeOGCD = Prefulgence; - if (CanSpellWeave(actionID) && placeOGCD != 0) { newActionID = placeOGCD; @@ -274,28 +274,28 @@ internal class RDMOpenerLogic { private static bool HasCooldowns() { - if (CustomComboFunctions.GetRemainingCharges(Acceleration) < 2) + if (GetRemainingCharges(Acceleration) < 2) return false; - if (CustomComboFunctions.GetRemainingCharges(Corpsacorps) < 2) + if (GetRemainingCharges(Corpsacorps) < 2) return false; - if (CustomComboFunctions.GetRemainingCharges(Engagement) < 2) + if (GetRemainingCharges(Engagement) < 2) return false; - if (!CustomComboFunctions.ActionReady(Embolden)) + if (!ActionReady(Embolden)) return false; - if (!CustomComboFunctions.ActionReady(Manafication)) + if (!ActionReady(Manafication)) return false; - if (!CustomComboFunctions.ActionReady(Fleche)) + if (!ActionReady(Fleche)) return false; - if (!CustomComboFunctions.ActionReady(ContreSixte)) + if (!ActionReady(ContreSixte)) return false; - if (!CustomComboFunctions.ActionReady(All.Swiftcast)) + if (!ActionReady(All.Swiftcast)) return false; return true; @@ -307,7 +307,7 @@ private static bool HasCooldowns() public uint OpenerStep = 0; - public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + public static bool LevelChecked => LocalPlayer.Level >= OpenerLevel; private static bool CanOpener => HasCooldowns() && LevelChecked; @@ -359,10 +359,10 @@ private bool DoPrePullSteps(ref uint actionID) if (CurrentState == OpenerState.PrePull && PrePullStep > 0) { - if (CustomComboFunctions.LocalPlayer.CastActionId == Veraero3 && PrePullStep == 1) CurrentState = OpenerState.InOpener; + if (LocalPlayer.CastActionId == Veraero3 && PrePullStep == 1) CurrentState = OpenerState.InOpener; else if (PrePullStep == 1) actionID = Veraero3; - if (ActionWatching.CombatActions.Count > 2 && CustomComboFunctions.InCombat()) + if (ActionWatching.CombatActions.Count > 2 && InCombat()) CurrentState = OpenerState.FailedOpener; return true; @@ -378,122 +378,122 @@ private bool DoOpener(ref uint actionID) if (currentState == OpenerState.InOpener) { - if (CustomComboFunctions.WasLastAction(Verthunder3) && OpenerStep == 1) OpenerStep++; + if (WasLastAction(Verthunder3) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = Verthunder3; - if (CustomComboFunctions.WasLastAction(All.Swiftcast) && OpenerStep == 2) OpenerStep++; + if (WasLastAction(All.Swiftcast) && OpenerStep == 2) OpenerStep++; else if (OpenerStep == 2) actionID = All.Swiftcast; - if (CustomComboFunctions.WasLastAction(Verthunder3) && OpenerStep == 3) OpenerStep++; + if (WasLastAction(Verthunder3) && OpenerStep == 3) OpenerStep++; else if (OpenerStep == 3) actionID = Verthunder3; - if (CustomComboFunctions.WasLastAction(Fleche) && OpenerStep == 4) OpenerStep++; + if (WasLastAction(Fleche) && OpenerStep == 4) OpenerStep++; else if (OpenerStep == 4) actionID = Fleche; - if (CustomComboFunctions.WasLastAction(Acceleration) && OpenerStep == 5) OpenerStep++; + if (WasLastAction(Acceleration) && OpenerStep == 5) OpenerStep++; else if (OpenerStep == 5) actionID = Acceleration; - if (CustomComboFunctions.WasLastAction(Verthunder3) && OpenerStep == 6) OpenerStep++; + if (WasLastAction(Verthunder3) && OpenerStep == 6) OpenerStep++; else if (OpenerStep == 6) actionID = Verthunder3; - if (CustomComboFunctions.WasLastAction(Embolden) && OpenerStep == 7) OpenerStep++; + if (WasLastAction(Embolden) && OpenerStep == 7) OpenerStep++; else if (OpenerStep == 7) actionID = Embolden; - if (CustomComboFunctions.WasLastAction(Manafication) && OpenerStep == 8) OpenerStep++; + if (WasLastAction(Manafication) && OpenerStep == 8) OpenerStep++; else if (OpenerStep == 8) actionID = Manafication; - if (CustomComboFunctions.WasLastAction(EnchantedRiposte) && OpenerStep == 9) OpenerStep++; + if (WasLastAction(EnchantedRiposte) && OpenerStep == 9) OpenerStep++; else if (OpenerStep == 9) actionID = EnchantedRiposte; - if (CustomComboFunctions.WasLastAction(ContreSixte) && OpenerStep == 10) OpenerStep++; + if (WasLastAction(ContreSixte) && OpenerStep == 10) OpenerStep++; else if (OpenerStep == 10) actionID = ContreSixte; - if (CustomComboFunctions.WasLastAction(EnchantedZwerchhau) && OpenerStep == 11) OpenerStep++; + if (WasLastAction(EnchantedZwerchhau) && OpenerStep == 11) OpenerStep++; else if (OpenerStep == 11) actionID = EnchantedZwerchhau; - if (CustomComboFunctions.WasLastAction(Engagement) && OpenerStep == 12) OpenerStep++; + if (WasLastAction(Engagement) && OpenerStep == 12) OpenerStep++; else if (OpenerStep == 12) actionID = Engagement; - if (CustomComboFunctions.WasLastAction(EnchantedRedoublement) && OpenerStep == 13) OpenerStep++; + if (WasLastAction(EnchantedRedoublement) && OpenerStep == 13) OpenerStep++; else if (OpenerStep == 13) actionID = EnchantedRedoublement; - if (CustomComboFunctions.WasLastAction(Corpsacorps) && OpenerStep == 14) OpenerStep++; + if (WasLastAction(Corpsacorps) && OpenerStep == 14) OpenerStep++; else if (OpenerStep == 14) actionID = Corpsacorps; - if (CustomComboFunctions.WasLastAction(Verholy) && OpenerStep == 15) OpenerStep++; + if (WasLastAction(Verholy) && OpenerStep == 15) OpenerStep++; else if (OpenerStep == 15) actionID = Verholy; - if (CustomComboFunctions.WasLastAction(ViceOfThorns) && OpenerStep == 16) OpenerStep++; + if (WasLastAction(ViceOfThorns) && OpenerStep == 16) OpenerStep++; else if (OpenerStep == 16) actionID = ViceOfThorns; - if (CustomComboFunctions.WasLastAction(Scorch) && OpenerStep == 17) OpenerStep++; + if (WasLastAction(Scorch) && OpenerStep == 17) OpenerStep++; else if (OpenerStep == 17) actionID = Scorch; - if (CustomComboFunctions.WasLastAction(Engagement) && OpenerStep == 18) OpenerStep++; + if (WasLastAction(Engagement) && OpenerStep == 18) OpenerStep++; else if (OpenerStep == 18) actionID = Engagement; - if (CustomComboFunctions.WasLastAction(Corpsacorps) && OpenerStep == 19) OpenerStep++; + if (WasLastAction(Corpsacorps) && OpenerStep == 19) OpenerStep++; else if (OpenerStep == 19) actionID = Corpsacorps; - if (CustomComboFunctions.WasLastAction(Resolution) && OpenerStep == 20) OpenerStep++; + if (WasLastAction(Resolution) && OpenerStep == 20) OpenerStep++; else if (OpenerStep == 20) actionID = Resolution; - if (CustomComboFunctions.WasLastAction(Prefulgence) && OpenerStep == 21) OpenerStep++; + if (WasLastAction(Prefulgence) && OpenerStep == 21) OpenerStep++; else if (OpenerStep == 21) actionID = Prefulgence; - if (CustomComboFunctions.WasLastAction(GrandImpact) && OpenerStep == 22) OpenerStep++; + if (WasLastAction(GrandImpact) && OpenerStep == 22) OpenerStep++; else if (OpenerStep == 22) actionID = GrandImpact; - if (CustomComboFunctions.WasLastAction(Acceleration) && OpenerStep == 23) OpenerStep++; + if (WasLastAction(Acceleration) && OpenerStep == 23) OpenerStep++; else if (OpenerStep == 23) actionID = Acceleration; - if (CustomComboFunctions.WasLastAction(Verfire) && OpenerStep == 24) OpenerStep++; + if (WasLastAction(Verfire) && OpenerStep == 24) OpenerStep++; else if (OpenerStep == 24) actionID = Verfire; - if (CustomComboFunctions.WasLastAction(GrandImpact) && OpenerStep == 25) OpenerStep++; + if (WasLastAction(GrandImpact) && OpenerStep == 25) OpenerStep++; else if (OpenerStep == 25) actionID = GrandImpact; - if (CustomComboFunctions.WasLastAction(Verthunder3) && OpenerStep == 26) OpenerStep++; + if (WasLastAction(Verthunder3) && OpenerStep == 26) OpenerStep++; else if (OpenerStep == 26) actionID = Verthunder3; - if (CustomComboFunctions.WasLastAction(Fleche) && OpenerStep == 27) OpenerStep++; + if (WasLastAction(Fleche) && OpenerStep == 27) OpenerStep++; else if (OpenerStep == 27) actionID = Fleche; - if (CustomComboFunctions.WasLastAction(Veraero3) && OpenerStep == 28) OpenerStep++; + if (WasLastAction(Veraero3) && OpenerStep == 28) OpenerStep++; else if (OpenerStep == 28) actionID = Veraero3; - if (CustomComboFunctions.WasLastAction(Verfire) && OpenerStep == 29) OpenerStep++; + if (WasLastAction(Verfire) && OpenerStep == 29) OpenerStep++; else if (OpenerStep == 29) actionID = Verfire; - if (CustomComboFunctions.WasLastAction(Verthunder3) && OpenerStep == 30) OpenerStep++; + if (WasLastAction(Verthunder3) && OpenerStep == 30) OpenerStep++; else if (OpenerStep == 30) actionID = Verthunder3; - if (CustomComboFunctions.WasLastAction(Verstone) && OpenerStep == 31) OpenerStep++; + if (WasLastAction(Verstone) && OpenerStep == 31) OpenerStep++; else if (OpenerStep == 31) actionID = Verstone; - if (CustomComboFunctions.WasLastAction(Veraero3) && OpenerStep == 32) OpenerStep++; + if (WasLastAction(Veraero3) && OpenerStep == 32) OpenerStep++; else if (OpenerStep == 32) actionID = Veraero3; - if (CustomComboFunctions.WasLastAction(All.Swiftcast) && OpenerStep == 33) OpenerStep++; + if (WasLastAction(All.Swiftcast) && OpenerStep == 33) OpenerStep++; else if (OpenerStep == 33) actionID = All.Swiftcast; - if (CustomComboFunctions.WasLastAction(Veraero3) && OpenerStep == 34) OpenerStep++; + if (WasLastAction(Veraero3) && OpenerStep == 34) OpenerStep++; else if (OpenerStep == 34) actionID = Veraero3; - if (CustomComboFunctions.WasLastAction(ContreSixte) && OpenerStep == 35) CurrentState = OpenerState.OpenerFinished; + if (WasLastAction(ContreSixte) && OpenerStep == 35) CurrentState = OpenerState.OpenerFinished; else if (OpenerStep == 35) actionID = ContreSixte; if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5) CurrentState = OpenerState.FailedOpener; - if (((actionID == Embolden && CustomComboFunctions.IsOnCooldown(Embolden)) || - (actionID == Manafication && CustomComboFunctions.IsOnCooldown(Manafication)) || - (actionID == Fleche && CustomComboFunctions.IsOnCooldown(Fleche)) || - (actionID == ContreSixte && CustomComboFunctions.IsOnCooldown(ContreSixte)) || - (actionID == All.Swiftcast && CustomComboFunctions.IsOnCooldown(All.Swiftcast)) || - (actionID == Acceleration && CustomComboFunctions.GetRemainingCharges(Acceleration) < 2) || - (actionID == Corpsacorps && CustomComboFunctions.GetRemainingCharges(Corpsacorps) < 2) || - (actionID == Engagement && CustomComboFunctions.GetRemainingCharges(Engagement) < 2)) && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) + if (((actionID == Embolden && IsOnCooldown(Embolden)) || + (actionID == Manafication && IsOnCooldown(Manafication)) || + (actionID == Fleche && IsOnCooldown(Fleche)) || + (actionID == ContreSixte && IsOnCooldown(ContreSixte)) || + (actionID == All.Swiftcast && IsOnCooldown(All.Swiftcast)) || + (actionID == Acceleration && GetRemainingCharges(Acceleration) < 2) || + (actionID == Corpsacorps && GetRemainingCharges(Corpsacorps) < 2) || + (actionID == Engagement && GetRemainingCharges(Engagement) < 2)) && ActionWatching.TimeSinceLastAction.TotalSeconds >= 3) { CurrentState = OpenerState.FailedOpener; return false; @@ -524,7 +524,7 @@ public bool DoFullOpener(ref uint actionID) return true; } - if (!CustomComboFunctions.InCombat()) + if (!InCombat()) { ResetOpener(); CurrentState = OpenerState.PrePull; diff --git a/XIVSlothCombo/Combos/PvE/ALL.cs b/XIVSlothCombo/Combos/PvE/ALL.cs index 9946cfcc7..2f2ade77a 100644 --- a/XIVSlothCombo/Combos/PvE/ALL.cs +++ b/XIVSlothCombo/Combos/PvE/ALL.cs @@ -179,6 +179,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; if (IsOffCooldown(Swiftcast)) return Swiftcast; + if (LocalPlayer.ClassJob.Id is RDM.JobID) + return RDM.Vercure; } return actionID; diff --git a/XIVSlothCombo/Combos/PvE/RDM.cs b/XIVSlothCombo/Combos/PvE/RDM.cs index e15e496fa..1bb541f6c 100644 --- a/XIVSlothCombo/Combos/PvE/RDM.cs +++ b/XIVSlothCombo/Combos/PvE/RDM.cs @@ -82,8 +82,6 @@ public static class Debuffs // public const short placeholder = 0; } - - public static class Traits { public const uint @@ -110,7 +108,6 @@ public static UserBool RDM_ST_oGCD_CorpACorps_Melee = new("RDM_ST_oGCD_CorpACorps_Melee"), RDM_ST_oGCD_CorpACorps_Pooling = new("RDM_ST_oGCD_CorpACorps_Pooling"), RDM_ST_oGCD_ViceOfThorns = new("RDM_ST_oGCD_ViceOfThorns"), - RDM_ST_oGCD_Prefulgence = new("RDM_ST_oGCD_Prefulgence"), RDM_ST_MeleeCombo_Adv = new("RDM_ST_MeleeCombo_Adv"), RDM_ST_MeleeFinisher_Adv = new("RDM_ST_MeleeFinisher_Adv"), RDM_ST_MeleeEnforced = new("RDM_ST_MeleeEnforced"), @@ -124,7 +121,6 @@ public static UserBool RDM_AoE_oGCD_CorpACorps_Melee = new("RDM_AoE_oGCD_CorpACorps_Melee"), RDM_AoE_oGCD_CorpACorps_Pooling = new("RDM_AoE_oGCD_CorpACorps_Pooling"), RDM_AoE_oGCD_ViceOfThorns = new("RDM_AoE_oGCD_ViceOfThorns"), - RDM_AoE_oGCD_Prefulgence = new("RDM_AoE_oGCD_Prefulgence"), RDM_AoE_MeleeCombo_Adv = new("RDM_AoE_MeleeCombo_Adv"), RDM_AoE_MeleeFinisher_Adv = new("RDM_AoE_MeleeFinisher_Adv"); public static UserBoolArray @@ -667,10 +663,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(All.Buffs.Swiftcast) && IsEnabled(CustomComboPreset.SMN_Variant_Raise) && IsEnabled(Variant.VariantRaise)) return Variant.VariantRaise; - if (LevelChecked(Verraise) && - (GetCooldownRemainingTime(All.Swiftcast) > 0 || // Condition 1: Swiftcast is on cooldown - HasEffect(Buffs.Dualcast))) // Condition 2: Swiftcast is available, but we have Dualcast) - return Verraise; + if (LevelChecked(Verraise)) + { + bool schwifty = HasEffect(All.Buffs.Swiftcast); + if (schwifty || HasEffect(Buffs.Dualcast)) return Verraise; + if (IsEnabled(CustomComboPreset.RDM_Raise_Vercure) && + !schwifty && + IsOnCooldown(All.Swiftcast)) + return Vercure; + } + } // Else we just exit normally and return Swiftcast diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index d33a2869e..af90ce7cc 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1927,7 +1927,6 @@ internal static void Draw(CustomComboPreset preset, bool enabled) ImGui.Unindent(); } UserConfig.DrawAdditionalBoolChoice(RDM.Config.RDM_ST_oGCD_ViceOfThorns, "Vice of Thorns", ""); - UserConfig.DrawAdditionalBoolChoice(RDM.Config.RDM_ST_oGCD_Prefulgence, "Prefulgence", ""); } if (preset is CustomComboPreset.RDM_ST_MeleeCombo) @@ -1979,7 +1978,6 @@ internal static void Draw(CustomComboPreset preset, bool enabled) ImGui.Unindent(); } UserConfig.DrawAdditionalBoolChoice(RDM.Config.RDM_AoE_oGCD_ViceOfThorns, "Vice of Thorns", ""); - UserConfig.DrawAdditionalBoolChoice(RDM.Config.RDM_AoE_oGCD_Prefulgence, "Prefulgence", ""); } if (preset is CustomComboPreset.RDM_AoE_MeleeCombo) From 9bd8c00ab3e9ec0e3d7cb08c8ce1fd87663382c0 Mon Sep 17 00:00:00 2001 From: ace Date: Sat, 10 Aug 2024 08:52:40 -0700 Subject: [PATCH 044/142] fixes --- XIVSlothCombo/Combos/CustomComboPreset.cs | 33 ++++++++++++++++------- XIVSlothCombo/Combos/PvE/GNB.cs | 27 +++++++++---------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..9fa199143 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1595,28 +1595,41 @@ public enum CustomComboPreset GNB_GF_Continuation = 7300, [ParentCombo(GNB_GF_Continuation)] - [CustomComboInfo("Cooldowns on Gnashing Fang Option", "Adds Bloodfest/Bow Shock/Blasting Zone on Gnashing Fang, order dependent on No Mercy buff.", GNB.JobID)] + [CustomComboInfo("Cooldowns Option", "Adds Bloodfest/Bow Shock/Blasting Zone on Gnashing Fang, order dependent on No Mercy buff.", GNB.JobID)] GNB_GF_Cooldowns = 7301, [ParentCombo(GNB_GF_Continuation)] - [CustomComboInfo("No Mercy on Gnashing Fang Option", "Adds No Mercy to Gnashing Fang when available.", GNB.JobID)] + [CustomComboInfo("No Mercy Option", "Adds No Mercy to Gnashing Fang when available.", GNB.JobID)] GNB_GF_NoMercy = 7302, [ParentCombo(GNB_GF_Continuation)] - [CustomComboInfo("Double Down on Gnashing Fang Option", "Adds Double Down to Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] - GNB_GF_DoubleDown = 7303, + [CustomComboInfo("Danger/Blasting Zone Option", "Adds Danger/Blasting Zone to Gnashing Fang when available.", GNB.JobID)] + GNB_GF_Zone = 7303, [ParentCombo(GNB_GF_Continuation)] - [CustomComboInfo("Sonic Break on Gnashing Fang Option", "Adds Sonic Break on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] - GNB_GF_SonicBreak = 7304, + [CustomComboInfo("Bow Shock Option", "Adds Bow Shock to Gnashing Fang when available.", GNB.JobID)] + GNB_GF_BowShock = 7304, [ParentCombo(GNB_GF_Continuation)] - [CustomComboInfo("Burst Strike on Gnashing Fang Option", "Adds Burst Strike on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] - GNB_GF_BurstStrike = 7305, + [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to Gnashing Fang when available.", GNB.JobID)] + GNB_GF_Bloodfest = 7305, [ParentCombo(GNB_GF_Continuation)] - [CustomComboInfo("Reign combo on Gnashing Fang Option", "Adds Reign combo on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] - GNB_GF_Reign = 7306, + [CustomComboInfo("Sonic Break Option", "Adds Sonic Break on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] + GNB_GF_SonicBreak = 7306, + + [ParentCombo(GNB_GF_Continuation)] + [CustomComboInfo("Double Down Option", "Adds Double Down to Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] + GNB_GF_DoubleDown = 7307, + + [ParentCombo(GNB_GF_Continuation)] + [CustomComboInfo("Reign combo Option", "Adds Reign combo on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] + GNB_GF_Reign = 7308, + + [ParentCombo(GNB_GF_Continuation)] + [CustomComboInfo("Burst Strike Option", "Adds Burst Strike on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] + GNB_GF_BurstStrike = 7309, + #endregion #region Burst Strike diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 43c142676..08b0a25e8 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -127,11 +127,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.GNB_ST_MainCombo_CooldownsGroup)) { // Bloodfest - if (IsEnabled(CustomComboPreset.GNB_ST_Bloodfest) && ActionReady(Bloodfest) && gauge.Ammo is 0 && HasEffect(Buffs.NoMercy)) - { - if (IsOnCooldown(NoMercy)) + if (IsEnabled(CustomComboPreset.GNB_ST_Bloodfest) && ActionReady(Bloodfest) && gauge.Ammo is 0 && (JustUsed(NoMercy, 20f))) return Bloodfest; - } // Zone if (IsEnabled(CustomComboPreset.GNB_ST_BlastingZone) && ActionReady(DangerZone) && !JustUsed(NoMercy)) @@ -364,7 +361,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy // No Mercy - if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv100 Opener/Reopener (0cart) + if (IsEnabled(CustomComboPreset.GNB_GF_NoMercy) && ActionReady(NoMercy) && + (LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv100 Opener/Reopener (0cart) || (LevelChecked(ReignOfBeasts) && gauge.Ammo >= 2 && IsOffCooldown(NoMercy)) // Lv100 on CD use (2 or 3 cart, never 1) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv90 Opener/Reopener (0cart) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 3) // Lv90 2min 3cart force @@ -374,18 +372,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return NoMercy; // oGCDs - if (CanWeave(actionID)) + if (CanWeave(SavageClaw)) { if (IsEnabled(CustomComboPreset.GNB_GF_Cooldowns)) { // Bloodfest - if (ActionReady(Bloodfest) && gauge.Ammo is 0 && HasEffect(Buffs.NoMercy)) - { - if (IsOnCooldown(NoMercy)) + if (IsEnabled(CustomComboPreset.GNB_GF_Bloodfest) && ActionReady(Bloodfest) && + gauge.Ammo is 0 && JustUsed(NoMercy, 20f)) return Bloodfest; - } - if (ActionReady(DangerZone) && !JustUsed(NoMercy)) + // Zone + if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone) && !JustUsed(NoMercy)) { // Lv90 if (!LevelChecked(ReignOfBeasts) && !HasEffect(Buffs.NoMercy) && ((IsOnCooldown(GnashingFang) && GetCooldownRemainingTime(NoMercy) > 17) || // >=Lv60 @@ -408,17 +405,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) { // >=Lv90 - if (ActionReady(BowShock) && LevelChecked(BowShock)) + if (IsEnabled(CustomComboPreset.GNB_GF_BowShock) && ActionReady(BowShock) && LevelChecked(BowShock)) return BowShock; - if (ActionReady(DangerZone)) + if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone)) return OriginalHook(DangerZone); // Date: Sat, 10 Aug 2024 09:20:47 -0700 Subject: [PATCH 045/142] Sonic Break buff fix --- XIVSlothCombo/Combos/PvE/GNB.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 08b0a25e8..5f220fbb6 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -227,7 +227,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } // Sonic Break - if (HasEffect(Buffs.NoMercy) && HasEffect(Buffs.ReadyToBreak)) + if (JustUsed(NoMercy, 20f) || (HasEffect(Buffs.NoMercy) && HasEffect(Buffs.ReadyToBreak))) { // Lv100 if (LevelChecked(ReignOfBeasts)) @@ -471,7 +471,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } // Sonic Break - if (IsEnabled(CustomComboPreset.GNB_GF_SonicBreak) && HasEffect(Buffs.NoMercy) && HasEffect(Buffs.ReadyToBreak)) + if (IsEnabled(CustomComboPreset.GNB_GF_SonicBreak) && (JustUsed(NoMercy) || (HasEffect(Buffs.NoMercy) && HasEffect(Buffs.ReadyToBreak)))) { // Lv100 if (LevelChecked(ReignOfBeasts)) From c08a4f56bd6e20777711271f490ee602e4fc1678 Mon Sep 17 00:00:00 2001 From: ace Date: Sat, 10 Aug 2024 09:32:24 -0700 Subject: [PATCH 046/142] Primal Rend oopy --- XIVSlothCombo/Combos/PvE/WAR.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/WAR.cs b/XIVSlothCombo/Combos/PvE/WAR.cs index 428ceaa2d..f8b8783c5 100644 --- a/XIVSlothCombo/Combos/PvE/WAR.cs +++ b/XIVSlothCombo/Combos/PvE/WAR.cs @@ -139,8 +139,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsNotEnabled(CustomComboPreset.WAR_ST_StormsPath_PrimalRend_Late) && ((!IsMoving && GetTargetDistance() <= 1) || GetBuffRemainingTime(Buffs.PrimalRendReady) <= GCD)) return PrimalRend; } - if (IsNotEnabled(CustomComboPreset.WAR_ST_StormsPath_PrimalRend) && HasEffect(Buffs.PrimalRendReady) && GetBuffRemainingTime(Buffs.PrimalRendReady) <= GCD) - return PrimalRend; if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && LevelChecked(PrimalRuination) && WasLastWeaponskill(PrimalRend)) return PrimalRuination; From f06ba6c9923ef891df6ca156b3aadd5c6fbdfd53 Mon Sep 17 00:00:00 2001 From: ace Date: Sat, 10 Aug 2024 10:07:54 -0700 Subject: [PATCH 047/142] Simple Modes implementation --- XIVSlothCombo/Combos/CustomComboPreset.cs | 90 +++--- XIVSlothCombo/Combos/PvE/GNB.cs | 319 +++++++++++++++++++++- 2 files changed, 363 insertions(+), 46 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 9fa199143..7e4c6736c 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1494,97 +1494,111 @@ public enum CustomComboPreset #region GUNBREAKER - #region ST + #region Simple ST + [ReplaceSkill(GNB.KeenEdge)] + [CustomComboInfo("Simple Mode - Single Target", "Replace Keen Edge with its combo chain.\n This is the ideal selection for newcomers to the job.", GNB.JobID)] + GNB_ST_Simple = 7001, + #endregion + + #region Simple AOE + [ReplaceSkill(GNB.KeenEdge)] + [CustomComboInfo("Simple Mode - AoE", "Replace Demon Slice with its combo chain.\n This is the ideal selection for newcomers to the job.", GNB.JobID)] + GNB_AoE_Simple = 7002, + #endregion + + #region Advanced ST [ReplaceSkill(GNB.KeenEdge)] [CustomComboInfo("Advanced Mode - Single Target", "Replace Keen Edge with its combo chain.\n Uses Burst Strike when you have 3 cartridges & your last combo action was Brutal Shell.", GNB.JobID)] - GNB_ST_MainCombo = 7001, + GNB_ST_Advanced = 7003, #region Lightning Shot - [ParentCombo(GNB_ST_MainCombo)] + [ParentCombo(GNB_ST_Advanced)] [CustomComboInfo("Lightning Shot Uptime Option", "Adds Lightning Shot to the main combo when you are out of range.", GNB.JobID)] - GNB_ST_RangedUptime = 7002, + GNB_ST_RangedUptime = 7004, #endregion #region Gnashing Fang - [ParentCombo(GNB_ST_MainCombo)] + [ParentCombo(GNB_ST_Advanced)] [CustomComboInfo("Gnashing Fang & Continuation Option", "Adds Gnashing Fang to the main combo.\n Gnashing Fang Starter option must be enabled or started manually and Sloth will finish it off.", GNB.JobID)] - GNB_ST_Gnashing = 7003, + GNB_ST_Gnashing = 7005, [ParentCombo(GNB_ST_Gnashing)] [CustomComboInfo("Gnashing Fang Starter Option", "Begins Gnashing Fang for you on the main combo.", GNB.JobID)] - GNB_ST_GnashingFang_Starter = 7004, + GNB_ST_GnashingFang_Starter = 7006, #endregion #region Cooldowns - [ParentCombo(GNB_ST_MainCombo)] + [ParentCombo(GNB_ST_Advanced)] [CustomComboInfo("Cooldowns Option", "Adds various cooldowns to the main combo when under No Mercy or when No Mercy is on cooldown.", GNB.JobID)] - GNB_ST_MainCombo_CooldownsGroup = 7005, + GNB_ST_Advanced_CooldownsGroup = 7007, [ConflictingCombos(GNB_NoMercy_Cooldowns)] - [ParentCombo(GNB_ST_MainCombo_CooldownsGroup)] + [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("No Mercy Option", "Adds No Mercy to the main combo when at full ammo.", GNB.JobID)] - GNB_ST_NoMercy = 7006, + GNB_ST_NoMercy = 7008, - [ParentCombo(GNB_ST_MainCombo_CooldownsGroup)] + [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("Danger/Blasting Zone Option", "Adds Danger/Blasting Zone to the main combo.", GNB.JobID)] - GNB_ST_BlastingZone = 7007, + GNB_ST_BlastingZone = 7009, - [ParentCombo(GNB_ST_MainCombo_CooldownsGroup)] + [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("Bow Shock Option", "Adds Bow Shock to the main combo.", GNB.JobID)] - GNB_ST_BowShock = 7008, + GNB_ST_BowShock = 7010, - [ParentCombo(GNB_ST_MainCombo_CooldownsGroup)] + [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to the main combo when ammo is 0.", GNB.JobID)] - GNB_ST_Bloodfest = 7009, + GNB_ST_Bloodfest = 7011, - [ParentCombo(GNB_ST_MainCombo_CooldownsGroup)] + [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("Sonic Break Option", "Adds Sonic Break to the main combo.", GNB.JobID)] - GNB_ST_SonicBreak = 7010, + GNB_ST_SonicBreak = 7012, - [ParentCombo(GNB_ST_MainCombo_CooldownsGroup)] + [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("Double Down Option", "Adds Double Down to the main combo when under No Mercy buff.", GNB.JobID)] - GNB_ST_DoubleDown = 7011, + GNB_ST_DoubleDown = 7013, - [ParentCombo(GNB_ST_MainCombo_CooldownsGroup)] + [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("Reign combo Option", "Adds Reign/Noble/Lionheart to the main combo.", GNB.JobID)] - GNB_ST_Reign = 7012, + GNB_ST_Reign = 7014, - [ParentCombo(GNB_ST_MainCombo_CooldownsGroup)] + [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("Burst Strike Option", "Adds Burst Strike and Hypervelocity (when available) to the main combo when under No Mercy and Gnashing Fang is over.", GNB.JobID)] - GNB_ST_BurstStrike = 7013, + GNB_ST_BurstStrike = 7015, #endregion - #region AoE + #endregion + + #region Advanced AoE [ReplaceSkill(GNB.DemonSlice)] [CustomComboInfo("Advanced Mode - AoE", "Replace Demon Slice with its combo chain.", GNB.JobID)] - GNB_AoE_MainCombo = 7200, + GNB_AoE_Advanced = 7200, [ConflictingCombos(GNB_NoMercy_Cooldowns)] - [ParentCombo(GNB_AoE_MainCombo)] + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("No Mercy Option", "Adds No Mercy to the AoE combo when it's available.", GNB.JobID)] GNB_AoE_NoMercy = 7201, - [ParentCombo(GNB_AoE_MainCombo)] + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Danger/Blasting Zone Option", "Adds Danger/Blasting Zone to the AoE combo when it's available.", GNB.JobID)] GNB_AOE_DangerZone = 7202, - [ParentCombo(GNB_AoE_MainCombo)] + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Bow Shock Option", "Adds Bow Shock onto the AoE combo when it's available.", GNB.JobID)] GNB_AoE_BowShock = 7203, - [ParentCombo(GNB_AoE_MainCombo)] + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Bloodfest AoE Option", "Adds Bloodfest to the AoE combo when it's available.\n Will spend cartridges through Fated Circle to prepare for Bloodfest usage.", GNB.JobID)] GNB_AoE_Bloodfest = 7204, - [ParentCombo(GNB_AoE_MainCombo)] + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Sonic Break Option", "Adds Sonic Break to the AoE combo when it's available.", GNB.JobID)] GNB_AOE_SonicBreak = 7205, - [ParentCombo(GNB_AoE_MainCombo)] + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Double Down AoE Option", "Adds Double Down to the AoE combo when it's available and you have 2 or more cartrdiges.", GNB.JobID)] GNB_AoE_DoubleDown = 7206, - [ParentCombo(GNB_AoE_MainCombo)] + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Ammo Overcap Option", "Adds Fated Circle to the AoE combo when about to overcap.", GNB.JobID)] GNB_AOE_Overcap = 7207, #endregion @@ -1691,23 +1705,21 @@ public enum CustomComboPreset GNB_AuroraProtection = 7700, [Variant] - [VariantParent(GNB_ST_MainCombo, GNB_AoE_MainCombo)] + [VariantParent(GNB_ST_Advanced, GNB_AoE_Advanced)] [CustomComboInfo("Spirit Dart Option", "Use Variant Spirit Dart whenever the debuff is not present or less than 3s.", GNB.JobID)] GNB_Variant_SpiritDart = 7033, [Variant] - [VariantParent(GNB_ST_MainCombo, GNB_AoE_MainCombo)] + [VariantParent(GNB_ST_Advanced, GNB_AoE_Advanced)] [CustomComboInfo("Cure Option", "Use Variant Cure when HP is below set threshold.", GNB.JobID)] GNB_Variant_Cure = 7034, [Variant] - [VariantParent(GNB_ST_MainCombo, GNB_AoE_MainCombo)] + [VariantParent(GNB_ST_Advanced, GNB_AoE_Advanced)] [CustomComboInfo("Ultimatum Option", "Use Variant Ultimatum on cooldown.", GNB.JobID)] GNB_Variant_Ultimatum = 7035, #endregion - #endregion - #region MACHINIST #region Simple ST diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 5f220fbb6..534d3f27c 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -69,9 +69,266 @@ public const string GNB_VariantCure = "GNB_VariantCure"; } - internal class GNB_ST_MainCombo : CustomCombo + internal class GNB_ST_SimpleMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_ST_MainCombo; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_ST_Simple; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (actionID is KeenEdge) + { + var gauge = GetJobGauge(); + var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; + float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy + + // Ranged Uptime + if (!InMeleeRange() && LevelChecked(LightningShot) && HasBattleTarget()) + return LightningShot; + + // No Mercy + if (ActionReady(NoMercy)) + { + if (CanWeave(actionID)) + { + if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv100 Opener/Reopener (0cart) + || (LevelChecked(ReignOfBeasts) && gauge.Ammo >= 2 && IsOffCooldown(NoMercy)) // Lv100 on CD use (2 or 3 cart, never 1) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv90 Opener/Reopener (0cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 3) // Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2) // Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && IsOffCooldown(Bloodfest) && gauge.Ammo == 1 && quarterWeave) // <=Lv80 Opener/Reopener (1cart) + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 2) && quarterWeave)) // <=Lv80 lateweave use + return NoMercy; + } + } + + // 17) || // >=Lv60 + !LevelChecked(GnashingFang))) // 17)) + return OriginalHook(DangerZone); + } + + // Hypervelocity + if (WasLastWeaponskill(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast)) + return Hypervelocity; + + // Continuation + if (LevelChecked(Continuation) && + (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + return OriginalHook(Continuation); + + // 60s weaves + if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) + { + // >=Lv90 + if (ActionReady(BowShock) && LevelChecked(BowShock)) + return BowShock; + if (ActionReady(DangerZone)) + return OriginalHook(DangerZone); + + // GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && gauge.Ammo == 0 && + !HasEffect(Buffs.ReadyToRip) && GetBuffRemainingTime(Buffs.NoMercy) < GCD * 5 && + (WasLastWeaponskill(GnashingFang) || WasLastAbility(SavageClaw))) + return SonicBreak; + + // sks 9th GCD + if (GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && !HasEffect(Buffs.ReadyToReign) && gauge.Ammo == 2 && + !HasEffect(Buffs.ReadyToRip) && GetBuffRemainingTime(Buffs.NoMercy) < GCD) + return SonicBreak; + } + } + + // Double Down + if ((HasEffect(Buffs.NoMercy) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && gauge.Ammo >= 2) + { + // Lv100 + if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) + { + if ((WasLastWeaponskill(SonicBreak) && gauge.Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 4 || IsOffCooldown(Bloodfest)) // 2min + || (!HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SonicBreak) && gauge.Ammo == 3) // 1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SolidBarrel) && gauge.Ammo == 3 && (GetBuffRemainingTime(Buffs.NoMercy) < 17))) // 1min NM 2 carts + return DoubleDown; + } + + // Lv90 + if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) + { + if ((gauge.Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || IsOffCooldown(Bloodfest))) // 2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && gauge.Ammo == 3 && WasLastWeaponskill(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) // 1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && gauge.Ammo == 3 && WasLastWeaponskill(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) // 1min NM 2 carts + return DoubleDown; + } + + // = GCD * 4) && !HasEffect(Buffs.ReadyToRip) && IsOnCooldown(GnashingFang)) + return SonicBreak; + if (ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) // subLv54 + return OriginalHook(DangerZone); + } + } + + // Sonic Break + if (JustUsed(NoMercy, 20f) || (HasEffect(Buffs.NoMercy) && HasEffect(Buffs.ReadyToBreak))) + { + // Lv100 + if (LevelChecked(ReignOfBeasts)) + { + if ((!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 2 && (GetBuffRemainingTime(Buffs.NoMercy) > GCD * 7) && + WasLastWeaponskill(BurstStrike) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min + || (!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && (GetBuffRemainingTime(Buffs.NoMercy) < GCD) && + (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min 3 carts + || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo == 3 && + GetCooldownRemainingTime(NoMercy) > GCD && + (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts + return SonicBreak; + } + + // Lv90 + if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) + { + if ((!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && + GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) // 2min + || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2 && GetBuffRemainingTime(Buffs.NoMercy) > GCD * 7 && + (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts + return SonicBreak; + } + + // 0) + { + if (!HasEffect(Buffs.ReadyToBlast) && gauge.AmmoComboStep == 0 + && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && WasLastWeaponskill(DoubleDown)) // Lv100 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && WasLastWeaponskill(DoubleDown)) // Lv90 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && WasLastWeaponskill(DoubleDown)) // Lv90 odd minute scuffed windows + || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && IsOffCooldown(Bloodfest)) // Opener/Reopener Conditions + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) // = GCD * 24 && IsOffCooldown(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) // 30s use + return GnashingFang; + } + + // Reign combo + if (LevelChecked(ReignOfBeasts)) + { + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && gauge.AmmoComboStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + { + if (WasLastWeaponskill(WickedTalon) || (WasLastAbility(EyeGouge))) + return OriginalHook(ReignOfBeasts); + } + + if (WasLastWeaponskill(ReignOfBeasts) || WasLastWeaponskill(NobleBlood)) + { + return OriginalHook(ReignOfBeasts); + } + } + + // Burst Strike + if (LevelChecked(BurstStrike)) + { + if (HasEffect(Buffs.NoMercy)) + { + // Lv100 use + if ((LevelChecked(ReignOfBeasts) + && gauge.Ammo >= 1 && gauge.AmmoComboStep == 0 + && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 + && !HasEffect(Buffs.ReadyToReign)) + // subLv90 use + || (!LevelChecked(ReignOfBeasts) + && gauge.Ammo >= 1 && gauge.AmmoComboStep == 0 + && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak) + && IsOnCooldown(DoubleDown) && IsOnCooldown(GnashingFang))) + return BurstStrike; + } + } + + // Lv100 2cart 2min starter + if (LevelChecked(ReignOfBeasts) + && GetCooldownRemainingTime(NoMercy) <= GCD + && gauge.Ammo is 3 + && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) + return BurstStrike; + + // GF combo + if (gauge.AmmoComboStep is 1 or 2) // GF + return OriginalHook(GnashingFang); + + // 123 (overcap included) + if (comboTime > 0) + { + if (lastComboMove == KeenEdge && LevelChecked(BrutalShell)) + return BrutalShell; + if (lastComboMove == BrutalShell && LevelChecked(SolidBarrel)) + { + if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast)) + return Hypervelocity; + if (LevelChecked(BurstStrike) && gauge.Ammo == MaxCartridges(level)) + return BurstStrike; + return SolidBarrel; + } + if (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && gauge.AmmoComboStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell) && gauge.Ammo == 2) + return SolidBarrel; + if (!LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && gauge.AmmoComboStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell || WasLastWeaponskill(BurstStrike)) && gauge.Ammo == 2) + return SolidBarrel; + } + + return KeenEdge; + } + + return actionID; + } + } + + internal class GNB_ST_Advanced : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_ST_Advanced; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -90,7 +347,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return LightningShot; // No Mercy - if (IsEnabled(CustomComboPreset.GNB_ST_MainCombo_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_NoMercy)) + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_NoMercy)) { if (ActionReady(NoMercy)) { @@ -124,7 +381,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.GNB_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && IsOffCooldown(Variant.VariantUltimatum)) return Variant.VariantUltimatum; - if (IsEnabled(CustomComboPreset.GNB_ST_MainCombo_CooldownsGroup)) + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup)) { // Bloodfest if (IsEnabled(CustomComboPreset.GNB_ST_Bloodfest) && ActionReady(Bloodfest) && gauge.Ammo is 0 && (JustUsed(NoMercy, 20f))) @@ -196,7 +453,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } // Double Down - if (IsEnabled(CustomComboPreset.GNB_ST_MainCombo_CooldownsGroup) && (HasEffect(Buffs.NoMercy) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && gauge.Ammo >= 2) + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && (HasEffect(Buffs.NoMercy) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && gauge.Ammo >= 2) { // Lv100 if (LevelChecked(ReignOfBeasts) && (IsEnabled(CustomComboPreset.GNB_ST_DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f)) @@ -576,9 +833,57 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class GNB_AoE_MainCombo : CustomCombo + internal class GNB_AoE_SimpleMode : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_AoE_Simple; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + + if (actionID == DemonSlice) + { + var gauge = GetJobGauge(); + float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy + + if (InCombat()) + { + if (CanWeave(actionID)) + { + if (ActionReady(NoMercy)) + return NoMercy; + if (ActionReady(BowShock) && LevelChecked(BowShock) && HasEffect(Buffs.NoMercy)) + return BowShock; + if (ActionReady(DangerZone) && (HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(GnashingFang) <= GCD * 7)) + return OriginalHook(DangerZone); + if (gauge.Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) + return Bloodfest; + if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && WasLastWeaponskill(FatedCircle) && LevelChecked(FatedBrand)) + return FatedBrand; + } + + if (HasEffect(Buffs.ReadyToBreak) && !HasEffect(Buffs.ReadyToRaze) && HasEffect(Buffs.NoMercy)) + return SonicBreak; + if (gauge.Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) + return DoubleDown; + if (gauge.Ammo != 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)) + return FatedCircle; + } + + if (comboTime > 0 && lastComboMove == DemonSlice && LevelChecked(DemonSlaughter)) + { + return (LevelChecked(FatedCircle) && gauge.Ammo == MaxCartridges(level)) ? FatedCircle : DemonSlaughter; + } + + return DemonSlice; + } + + return actionID; + } + } + + internal class GNB_AoE_Advanced : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_AoE_MainCombo; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_AoE_Advanced; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { From d82889e53562793406a348b1c2018e80c2894049 Mon Sep 17 00:00:00 2001 From: ace Date: Sat, 10 Aug 2024 10:22:13 -0700 Subject: [PATCH 048/142] more description cleanup --- XIVSlothCombo/Combos/CustomComboPreset.cs | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 7e4c6736c..ee7b2c1df 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1495,18 +1495,21 @@ public enum CustomComboPreset #region GUNBREAKER #region Simple ST + [ConflictingCombos(GNB_ST_Advanced, GNB_NoMercy_Cooldowns)] [ReplaceSkill(GNB.KeenEdge)] [CustomComboInfo("Simple Mode - Single Target", "Replace Keen Edge with its combo chain.\n This is the ideal selection for newcomers to the job.", GNB.JobID)] GNB_ST_Simple = 7001, #endregion #region Simple AOE - [ReplaceSkill(GNB.KeenEdge)] + [ConflictingCombos(GNB_AoE_Advanced, GNB_NoMercy_Cooldowns)] + [ReplaceSkill(GNB.DemonSlice)] [CustomComboInfo("Simple Mode - AoE", "Replace Demon Slice with its combo chain.\n This is the ideal selection for newcomers to the job.", GNB.JobID)] GNB_AoE_Simple = 7002, #endregion #region Advanced ST + [ConflictingCombos(GNB_ST_Simple)] [ReplaceSkill(GNB.KeenEdge)] [CustomComboInfo("Advanced Mode - Single Target", "Replace Keen Edge with its combo chain.\n Uses Burst Strike when you have 3 cartridges & your last combo action was Brutal Shell.", GNB.JobID)] GNB_ST_Advanced = 7003, @@ -1569,6 +1572,7 @@ public enum CustomComboPreset #endregion #region Advanced AoE + [ConflictingCombos(GNB_AoE_Simple)] [ReplaceSkill(GNB.DemonSlice)] [CustomComboInfo("Advanced Mode - AoE", "Replace Demon Slice with its combo chain.", GNB.JobID)] GNB_AoE_Advanced = 7200, @@ -1595,7 +1599,7 @@ public enum CustomComboPreset GNB_AOE_SonicBreak = 7205, [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("Double Down AoE Option", "Adds Double Down to the AoE combo when it's available and you have 2 or more cartrdiges.", GNB.JobID)] + [CustomComboInfo("Double Down AoE Option", "Adds Double Down to the AoE combo when it's available and you have 2 or more cartridges.", GNB.JobID)] GNB_AoE_DoubleDown = 7206, [ParentCombo(GNB_AoE_Advanced)] @@ -1652,24 +1656,24 @@ public enum CustomComboPreset GNB_BS = 7400, [ParentCombo(GNB_BS)] - [CustomComboInfo("Burst Strike Continuation Feature", "Adds Hypervelocity on Burst Strike.", GNB.JobID)] + [CustomComboInfo("Hypervelocity Option", "Adds Continuation (Hypervelocity) to Burst Strike.", GNB.JobID)] GNB_BS_Continuation = 7401, [ParentCombo(GNB_BS)] - [CustomComboInfo("Burst Strike to Bloodfest Feature", "Replace Burst Strike with Bloodfest if you have no powder gauge.", GNB.JobID)] + [CustomComboInfo("Bloodfest Option", "Replace Burst Strike with Bloodfest if under No Mercy & you have 0 cartridges.", GNB.JobID)] GNB_BS_Bloodfest = 7402, [ParentCombo(GNB_BS)] - [CustomComboInfo("Double Down on Burst Strike Feature", "Adds Double Down to Burst Strike when under No Mercy and ammo is above 2.", GNB.JobID)] + [CustomComboInfo("Double Down Option", "Adds Double Down to Burst Strike when under No Mercy and ammo is above 2.", GNB.JobID)] GNB_BS_DoubleDown = 7403, [ParentCombo(GNB_BS)] - [CustomComboInfo("Reign combo on Burst Strike Feature", "Adds Reign/Noble/Lionheart to Burst Strike when under No Mercy and when Double Down & Gnashing Fang are on cooldown.", GNB.JobID)] + [CustomComboInfo("Reign Combo Option", "Adds Reign/Noble/Lionheart to Burst Strike when under No Mercy and when Double Down & Gnashing Fang are on cooldown.", GNB.JobID)] GNB_BS_Reign = 7404, #endregion #region No Mercy - [ConflictingCombos(GNB_ST_NoMercy, GNB_AoE_NoMercy)] + [ConflictingCombos(GNB_ST_NoMercy, GNB_AoE_NoMercy, GNB_ST_Simple, GNB_AoE_Simple)] [ReplaceSkill(GNB.NoMercy)] [CustomComboInfo("No Mercy Features", "Collection of No Mercy related features.", GNB.JobID)] GNB_NoMercy_Cooldowns = 7500, @@ -1689,15 +1693,15 @@ public enum CustomComboPreset GNB_FC = 7600, [ParentCombo(GNB_FC)] - [CustomComboInfo("Fated Circle Continuation Feature", "Adds Continuation on Fated Circle.", GNB.JobID)] + [CustomComboInfo("Fated Brand Option", "Adds Continuation (Fated Brand) on Fated Circle.", GNB.JobID)] GNB_FC_Continuation = 7601, [ParentCombo(GNB_FC)] - [CustomComboInfo("Fated Circle to Bloodfest Feature", "Replace Fated Circle with Bloodfest if you have no powder gauge.", GNB.JobID)] + [CustomComboInfo("Bloodfest Option", "Replace Fated Circle with Bloodfest when under No Mercy & you have 0 cartridges.", GNB.JobID)] GNB_FC_Bloodfest = 7602, [ParentCombo(GNB_FC)] - [CustomComboInfo("Double Down on Fated Circle Feature", "Adds Double Down to Fated Circle when under No Mercy and ammo is above 2.", GNB.JobID)] + [CustomComboInfo("Double Down Option", "Adds Double Down to Fated Circle when under No Mercy and ammo is above 2.", GNB.JobID)] GNB_FC_DoubleDown = 7603, #endregion From c7aeb310d9b5a8c514c90c50c08444900a48f795 Mon Sep 17 00:00:00 2001 From: edewen Date: Sun, 11 Aug 2024 00:18:30 -0400 Subject: [PATCH 049/142] Buffs and dots Changed the buffs to be tied together to fix them drifting separately. Now they drift together like a family. as minimal as i could. Dot section rebuilt. Made far less confusing and more organized separating the normal ironjaws from ragingjaws coding. --- XIVSlothCombo/Combos/PvE/BRD.cs | 105 +++++++++++++++----------------- 1 file changed, 48 insertions(+), 57 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index c1d310acb..b86ad922f 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -419,16 +419,20 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool ragingReady = LevelChecked(RagingStrikes) && IsOffCooldown(RagingStrikes); bool battleVoiceReady = LevelChecked(BattleVoice) && IsOffCooldown(BattleVoice); bool barrageReady = LevelChecked(Barrage) && IsOffCooldown(Barrage); - //Raging and BV before Finale to minimize drift - if (canWeaveBuffs && ragingReady) - return RagingStrikes; - if (canWeaveBuffs && battleVoiceReady) - return BattleVoice; - if (canWeaveBuffs && IsEnabled(CustomComboPreset.BRD_Simple_BuffsRadiant) && radiantReady && + float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); + float ragingCD = GetCooldownRemainingTime(RagingStrikes); + + if (canWeaveDelayed && IsEnabled(CustomComboPreset.BRD_Simple_BuffsRadiant) && radiantReady && (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) - && HasEffect(Buffs.BattleVoice)) + && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) return RadiantFinale; - //removed requirement to not have hawks eye, it is better to maybe lose 60 potency than allow it to drift a 1000 potency gain out of the window + + if (canWeaveBuffs && battleVoiceReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + return BattleVoice; + + if (canWeaveBuffs && ragingReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + return RagingStrikes; + if (canWeaveBuffs && barrageReady && HasEffect(Buffs.RagingStrikes)) { if (LevelChecked(RadiantFinale) && HasEffect(Buffs.RadiantFinale)) @@ -720,15 +724,20 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool ragingReady = LevelChecked(RagingStrikes) && IsOffCooldown(RagingStrikes); bool battleVoiceReady = LevelChecked(BattleVoice) && IsOffCooldown(BattleVoice); bool barrageReady = LevelChecked(Barrage) && IsOffCooldown(Barrage); - //Raging and BV before Finale to minimize drift - if (canWeaveBuffs && ragingReady) - return RagingStrikes; - if (canWeaveBuffs && battleVoiceReady) - return BattleVoice; - if (canWeaveBuffs && IsEnabled(CustomComboPreset.BRD_Simple_BuffsRadiant) && radiantReady && + float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); + float ragingCD = GetCooldownRemainingTime(RagingStrikes); + + if (canWeaveDelayed && IsEnabled(CustomComboPreset.BRD_Simple_BuffsRadiant) && radiantReady && (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) - && HasEffect(Buffs.BattleVoice)) + && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) return RadiantFinale; + + if (canWeaveBuffs && battleVoiceReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + return BattleVoice; + + if (canWeaveBuffs && ragingReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + return RagingStrikes; + //removed requirement to not have hawks eye, it is better to maybe lose 60 potency than allow it to drift a 1000 potency gain out of the window if (canWeaveBuffs && barrageReady && HasEffect(Buffs.RagingStrikes)) { @@ -740,7 +749,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Barrage; } } - + if (canWeave) { float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); @@ -822,6 +831,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim float windRemaining = GetDebuffRemainingTime(Debuffs.Windbite); float causticRemaining = GetDebuffRemainingTime(Debuffs.CausticBite); float stormRemaining = GetDebuffRemainingTime(Debuffs.Stormbite); + float ragingStrikesDuration = GetBuffRemainingTime(Buffs.RagingStrikes); + float radiantFinaleDuration = GetBuffRemainingTime(Buffs.RadiantFinale); + int ragingJawsRenewTime = PluginConfiguration.GetCustomIntValue(Config.BRD_RagingJawsRenewTime); DotRecast poisonRecast = delegate (int duration) { @@ -831,27 +843,31 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim DotRecast windRecast = delegate (int duration) { return (windbite && windRemaining < duration) || (stormbite && stormRemaining < duration); - }; - - float ragingStrikesDuration = GetBuffRemainingTime(Buffs.RagingStrikes); - float radiantFinaleDuration = GetBuffRemainingTime(Buffs.RadiantFinale); - int ragingJawsRenewTime = PluginConfiguration.GetCustomIntValue(Config.BRD_RagingJawsRenewTime); - bool useIronJaws = (LevelChecked(IronJaws) && poisonRecast(4)) || - (LevelChecked(IronJaws) && windRecast(4)) || - ((LevelChecked(IronJaws) && IsEnabled(CustomComboPreset.BRD_Simple_RagingJaws) || - HasEffect(Buffs.RagingStrikes) && ragingStrikesDuration < ragingJawsRenewTime) && - HasEffect(Buffs.RadiantFinale) && radiantFinaleDuration < 4 && - poisonRecast(40) && windRecast(40)); + }; + + if (IsEnabled(CustomComboPreset.BRD_Simple_DoT)) + { + if (ActionReady(IronJaws) && IsEnabled(CustomComboPreset.BRD_Simple_RagingJaws) && HasEffect(Buffs.RagingStrikes) && + !WasLastAction(IronJaws) && ragingStrikesDuration < ragingJawsRenewTime && poisonRecast(40) && windRecast(40)) + { + openerFinished = true; + return IronJaws; + } + if (LevelChecked(Stormbite) && !stormbite) + return Stormbite; + if (LevelChecked(CausticBite) && !caustic) + return CausticBite; + if (LevelChecked(Windbite) && !windbite && !LevelChecked(Stormbite)) + return Windbite; + if (LevelChecked(VenomousBite) && !venomous && !LevelChecked(CausticBite)) + return VenomousBite; - if (!LevelChecked(Stormbite)) - { - if (useIronJaws) + if (ActionReady(IronJaws) && poisonRecast(4) && windRecast(4)) { openerFinished = true; return IronJaws; } - if (!LevelChecked(IronJaws)) { if (windbite && windRemaining < 4) @@ -865,32 +881,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim openerFinished = true; return VenomousBite; } - } - - if (IsEnabled(CustomComboPreset.BRD_Simple_DoT)) - { - if (LevelChecked(Windbite) && !windbite) - return Windbite; - if (LevelChecked(VenomousBite) && !venomous) - return VenomousBite; - } - } - - else - { - if (useIronJaws) - { - openerFinished = true; - return IronJaws; - } - - if (IsEnabled(CustomComboPreset.BRD_Simple_DoT)) - { - if (LevelChecked(Stormbite) && !stormbite) - return Stormbite; - if (LevelChecked(CausticBite) && !caustic) - return CausticBite; - } + } } } From a712cc17a00584487488cdcdd5b1fc8747e87ad5 Mon Sep 17 00:00:00 2001 From: ace Date: Sat, 10 Aug 2024 22:32:19 -0700 Subject: [PATCH 050/142] more fixes --- XIVSlothCombo/Combos/PvE/GNB.cs | 186 +++++++++++++------------------- 1 file changed, 72 insertions(+), 114 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 534d3f27c..f2bbd19fc 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -91,7 +91,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (CanWeave(actionID)) { if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && gauge.Ammo >= 2 && IsOffCooldown(NoMercy)) // Lv100 on CD use (2 or 3 cart, never 1) + || (LevelChecked(ReignOfBeasts) && (gauge.Ammo == 2 || (gauge.Ammo == 3 && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) && IsOffCooldown(NoMercy)) // Lv100 on CD use (2/3 for 1min, 2 cart only for 2min even if slight delay) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv90 Opener/Reopener (0cart) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 3) // Lv90 2min 3cart force || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2) // Lv90 1min 2 or 3cart @@ -120,12 +120,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim !LevelChecked(GnashingFang))) // 17)) + if (LevelChecked(ReignOfBeasts) && (JustUsed(DoubleDown, 3f) || GetCooldownRemainingTime(NoMercy) > 17)) return OriginalHook(DangerZone); } // Hypervelocity - if (WasLastWeaponskill(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast)) + if (WasLastWeaponskill(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) return Hypervelocity; // Continuation @@ -158,33 +158,46 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); - // Sonic Break special conditions - if (GetBuffRemainingTime(Buffs.NoMercy) < GCD * 6 && HasEffect(Buffs.ReadyToBreak)) + // Sonic Break + if (JustUsed(NoMercy, 20f)) { - if (LevelChecked(ReignOfBeasts) || !LevelChecked(ReignOfBeasts)) + // Lv100 + if (LevelChecked(ReignOfBeasts)) { - // 1min 2cart - if (GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && gauge.Ammo == 0 && - !HasEffect(Buffs.ReadyToRip) && GetBuffRemainingTime(Buffs.NoMercy) < GCD * 5 && - (WasLastWeaponskill(GnashingFang) || WasLastAbility(SavageClaw))) + if ((gauge.Ammo == 2 && JustUsed(NoMercy, GCD) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min + || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && gauge.Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) // 1min 2cart + || (gauge.Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) // 1min 3cart + || (JustUsed(Bloodfest, 2f) && WasLastWeaponskill(BrutalShell)))) // opener return SonicBreak; + } - // sks 9th GCD - if (GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && !HasEffect(Buffs.ReadyToReign) && gauge.Ammo == 2 && - !HasEffect(Buffs.ReadyToRip) && GetBuffRemainingTime(Buffs.NoMercy) < GCD) + // Lv90 + if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) + { + if ((!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && + GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) // 2min + || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2 && + (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts + return SonicBreak; + } + + // = GCD * 4) && gauge.Ammo >= 2) + if ((GetCooldownRemainingTime(NoMercy) >= 40 || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && gauge.Ammo >= 2) { // Lv100 if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((WasLastWeaponskill(SonicBreak) && gauge.Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 4 || IsOffCooldown(Bloodfest)) // 2min - || (!HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SonicBreak) && gauge.Ammo == 3) // 1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SolidBarrel) && gauge.Ammo == 3 && (GetBuffRemainingTime(Buffs.NoMercy) < 17))) // 1min NM 2 carts + if ((WasLastWeaponskill(SonicBreak) && !HasEffect(Buffs.ReadyToBreak) && (gauge.Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || IsOffCooldown(Bloodfest)) // 2min + || (WasLastWeaponskill(SonicBreak) && gauge.Ammo == 3)) // 1min NM 3 carts + || (WasLastWeaponskill(SolidBarrel) && gauge.Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) // 1min NM 2 carts return DoubleDown; } @@ -207,40 +220,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - // Sonic Break - if (JustUsed(NoMercy, 20f) || (HasEffect(Buffs.NoMercy) && HasEffect(Buffs.ReadyToBreak))) - { - // Lv100 - if (LevelChecked(ReignOfBeasts)) - { - if ((!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 2 && (GetBuffRemainingTime(Buffs.NoMercy) > GCD * 7) && - WasLastWeaponskill(BurstStrike) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min - || (!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && (GetBuffRemainingTime(Buffs.NoMercy) < GCD) && - (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min 3 carts - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo == 3 && - GetCooldownRemainingTime(NoMercy) > GCD && - (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts - return SonicBreak; - } - - // Lv90 - if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) - { - if ((!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && - GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) // 2min - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2 && GetBuffRemainingTime(Buffs.NoMercy) > GCD * 7 && - (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts - return SonicBreak; - } - - // 0) { @@ -291,7 +270,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Lv100 2cart 2min starter if (LevelChecked(ReignOfBeasts) - && GetCooldownRemainingTime(NoMercy) <= GCD + && (GetCooldownRemainingTime(NoMercy) <= GCD || IsOffCooldown(NoMercy)) && gauge.Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) return BurstStrike; @@ -307,7 +286,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BrutalShell; if (lastComboMove == BrutalShell && LevelChecked(SolidBarrel)) { - if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast)) + if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) return Hypervelocity; if (LevelChecked(BurstStrike) && gauge.Ammo == MaxCartridges(level)) return BurstStrike; @@ -326,7 +305,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class GNB_ST_Advanced : CustomCombo + internal class GNB_ST_AdvancedMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_ST_Advanced; @@ -354,7 +333,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (CanWeave(actionID)) { if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && gauge.Ammo >= 2 && IsOffCooldown(NoMercy)) // Lv100 on CD use (2 or 3 cart, never 1) + || (LevelChecked(ReignOfBeasts) && (gauge.Ammo == 2 || (gauge.Ammo == 3 && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) && IsOffCooldown(NoMercy)) // Lv100 on CD use (2/3 for 1min, 2 cart only for 2min even if slight delay) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv90 Opener/Reopener (0cart) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 3) // Lv90 2min 3cart force || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2) // Lv90 1min 2 or 3cart @@ -395,12 +374,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim !LevelChecked(GnashingFang))) // 17)) + if (LevelChecked(ReignOfBeasts) && (JustUsed(DoubleDown, 3f) || GetCooldownRemainingTime(NoMercy) > 17)) return OriginalHook(DangerZone); } // Hypervelocity - if (WasLastWeaponskill(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast)) + if (WasLastWeaponskill(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) return Hypervelocity; // Continuation @@ -434,33 +413,49 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); - // Sonic Break special conditions - if (IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && GetBuffRemainingTime(Buffs.NoMercy) < GCD * 6 && HasEffect(Buffs.ReadyToBreak)) + // Sonic Break + if (JustUsed(NoMercy, 20f)) { - if (LevelChecked(ReignOfBeasts) || !LevelChecked(ReignOfBeasts)) + // Lv100 + if (LevelChecked(ReignOfBeasts)) { - // 1min 2cart - if (GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && gauge.Ammo == 0 && - !HasEffect(Buffs.ReadyToRip) && GetBuffRemainingTime(Buffs.NoMercy) < GCD * 5 && - (WasLastWeaponskill(GnashingFang) || WasLastAbility(SavageClaw))) + if (IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && + (gauge.Ammo == 2 && JustUsed(NoMercy, GCD) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min + || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && gauge.Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) // 1min 2cart + || (gauge.Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) // 1min 3cart + || (JustUsed(Bloodfest, 2f) && WasLastWeaponskill(BrutalShell)))) // opener return SonicBreak; + } - // sks 9th GCD - if (GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && !HasEffect(Buffs.ReadyToReign) && gauge.Ammo == 2 && - !HasEffect(Buffs.ReadyToRip) && GetBuffRemainingTime(Buffs.NoMercy) < GCD) + // Lv90 + if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) + { + if (IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && + (!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && + GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) // 2min + || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2 && + (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts + return SonicBreak; + } + + // = GCD * 4) && gauge.Ammo >= 2) + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && (GetCooldownRemainingTime(NoMercy) >= 40 || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && gauge.Ammo >= 2) { // Lv100 if (LevelChecked(ReignOfBeasts) && (IsEnabled(CustomComboPreset.GNB_ST_DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f)) { - if ((WasLastWeaponskill(SonicBreak) && gauge.Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 4 || IsOffCooldown(Bloodfest)) // 2min - || (!HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SonicBreak) && gauge.Ammo == 3) // 1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SolidBarrel) && gauge.Ammo == 3 && (GetBuffRemainingTime(Buffs.NoMercy) < 17))) // 1min NM 2 carts + if ((WasLastWeaponskill(SonicBreak) && !HasEffect(Buffs.ReadyToBreak) && (gauge.Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || IsOffCooldown(Bloodfest)) // 2min + || (WasLastWeaponskill(SonicBreak) && gauge.Ammo == 3)) // 1min NM 3 carts + || (WasLastWeaponskill(SolidBarrel) && gauge.Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) // 1min NM 2 carts return DoubleDown; } @@ -483,47 +478,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - // Sonic Break - if (JustUsed(NoMercy, 20f) || (HasEffect(Buffs.NoMercy) && HasEffect(Buffs.ReadyToBreak))) - { - // Lv100 - if (LevelChecked(ReignOfBeasts)) - { - if (IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && - (!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 2 && (GetBuffRemainingTime(Buffs.NoMercy) > GCD * 7) && - WasLastWeaponskill(BurstStrike) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min - || (!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && (GetBuffRemainingTime(Buffs.NoMercy) < GCD) && - (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min 3 carts - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo == 3 && - GetCooldownRemainingTime(NoMercy) > GCD && - (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts - return SonicBreak; - } - - // Lv90 - if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) - { - if (IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && - (!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && - GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) // 2min - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2 && GetBuffRemainingTime(Buffs.NoMercy) > GCD * 7 && - (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts - return SonicBreak; - } - - // 0) + if (IsEnabled(CustomComboPreset.GNB_ST_GnashingFang_Starter) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && gauge.Ammo > 0) { - if (IsEnabled(CustomComboPreset.GNB_ST_GnashingFang_Starter) && !HasEffect(Buffs.ReadyToBlast) && gauge.AmmoComboStep == 0 + if (!HasEffect(Buffs.ReadyToBlast) && gauge.AmmoComboStep == 0 && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && WasLastWeaponskill(DoubleDown)) // Lv100 odd/even minute use || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && WasLastWeaponskill(DoubleDown)) // Lv90 odd/even minute use || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && WasLastWeaponskill(DoubleDown)) // Lv90 odd minute scuffed windows @@ -570,13 +528,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Lv100 2cart 2min starter if (LevelChecked(ReignOfBeasts) - && GetCooldownRemainingTime(NoMercy) <= GCD + && (GetCooldownRemainingTime(NoMercy) <= GCD || IsOffCooldown(NoMercy)) && gauge.Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) return BurstStrike; // GF combo - if (gauge.AmmoComboStep is 1 or 2) // GF + if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && gauge.AmmoComboStep is 1 or 2) // GF return OriginalHook(GnashingFang); // 123 (overcap included) @@ -586,7 +544,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BrutalShell; if (lastComboMove == BrutalShell && LevelChecked(SolidBarrel)) { - if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast)) + if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) return Hypervelocity; if (LevelChecked(BurstStrike) && gauge.Ammo == MaxCartridges(level)) return BurstStrike; @@ -881,7 +839,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class GNB_AoE_Advanced : CustomCombo + internal class GNB_AoE_AdvancedMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_AoE_Advanced; From 21fdab0f9f741018d211184bbe1fa67e9f9e3494 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Sun, 11 Aug 2024 08:53:03 +0100 Subject: [PATCH 051/142] Adjust SAM standalone combos, move Simple/Advanced to Hakaze --- XIVSlothCombo/Combos/CustomComboPreset.cs | 16 ++-- XIVSlothCombo/Combos/PvE/SAM.cs | 81 ++++++++++++++------ XIVSlothCombo/Window/Functions/UserConfig.cs | 21 +++++ 3 files changed, 86 insertions(+), 32 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..ff0bb6941 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -3201,33 +3201,35 @@ The three digets after RDM.JobID can be used to reorder items in the list #region SAMURAI - #region Yukikaze/Kasha Combos + #region Yukikaze/Kasha/Gekko Combos [ReplaceSkill(SAM.Yukikaze)] - [ConflictingCombos(SAM_ST_Yukikaze)] [CustomComboInfo("Yukikaze Combo", "Replace Yukikaze with its combo chain.", SAM.JobID)] SAM_ST_YukikazeCombo = 15000, [ReplaceSkill(SAM.Kasha)] - [ConflictingCombos(SAM_ST_Kasha)] [CustomComboInfo("Kasha Combo", "Replace Kasha with its combo chain.", SAM.JobID)] SAM_ST_KashaCombo = 15001, + + [ReplaceSkill(SAM.Gekko)] + [CustomComboInfo("Gekko Combo", "Replace Gekko with its combo chain.", SAM.JobID)] + SAM_ST_GekkoCombo = 15010, #endregion #region Simple ST - [ReplaceSkill(SAM.Gekko)] + [ReplaceSkill(SAM.Hakaze, SAM.Gyofu)] [ConflictingCombos(SAM_ST_AdvancedMode)] - [CustomComboInfo("Simple Mode - Single Target", "Replaces Gekko with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", SAM.JobID)] + [CustomComboInfo("Simple Mode - Single Target", "Replaces Hakaze/Gyofu with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", SAM.JobID)] SAM_ST_SimpleMode = 15002, #endregion #region Advanced ST - [ReplaceSkill(SAM.Gekko)] + [ReplaceSkill(SAM.Hakaze, SAM.Gyofu)] [ConflictingCombos(SAM_ST_SimpleMode)] - [CustomComboInfo("Advanced Mode - Single Target", "Replaces Gekko with a full one-button single target rotation.\nThese features are ideal if you want to customize the rotation.", SAM.JobID)] + [CustomComboInfo("Advanced Mode - Single Target", "Replaces Hakaze/Gyofu with a full one-button single target rotation.\nThese features are ideal if you want to customize the rotation.", SAM.JobID)] SAM_ST_AdvancedMode = 15003, [ParentCombo(SAM_ST_AdvancedMode)] diff --git a/XIVSlothCombo/Combos/PvE/SAM.cs b/XIVSlothCombo/Combos/PvE/SAM.cs index bca1bb91c..66031f25a 100644 --- a/XIVSlothCombo/Combos/PvE/SAM.cs +++ b/XIVSlothCombo/Combos/PvE/SAM.cs @@ -97,13 +97,21 @@ public static UserInt SAM_STBloodbathThreshold = new("SAM_STBloodbathThreshold", 40), SAM_AoESecondWindThreshold = new("SAM_AoESecondWindThreshold", 25), SAM_AoEBloodbathThreshold = new("SAM_AoEBloodbathThreshold", 40), + SAM_Kasha_KenkiOvercapAmount = new(nameof(SAM_Kasha_KenkiOvercapAmount), 50), + SAM_Yukaze_KenkiOvercapAmount = new(nameof(SAM_Yukaze_KenkiOvercapAmount), 50), + SAM_Gekko_KenkiOvercapAmount = new(nameof(SAM_Gekko_KenkiOvercapAmount), 50), + SAM_ST_KenkiOvercapAmount = new(nameof(SAM_ST_KenkiOvercapAmount), 50), + SAM_AoE_KenkiOvercapAmount = new(nameof(SAM_AoE_KenkiOvercapAmount), 50), SAM_VariantCure = new("SAM_VariantCure"); public static UserFloat SAM_ST_Higanbana_Threshold = new("SAM_ST_Higanbana_Threshold", 1), - SAM_ST_KenkiOvercapAmount = new("SamKenkiOvercapAmount", 50), - SAM_AoE_KenkiOvercapAmount = new("SamAOEKenkiOvercapAmount", 50), SAM_ST_ExecuteThreshold = new("SAM_ST_ExecuteThreshold", 1); + + public static UserBool + SAM_Kasha_KenkiOvercap = new(nameof(SAM_Kasha_KenkiOvercap)), + SAM_Yukaze_KenkiOvercap = new(nameof(SAM_Yukaze_KenkiOvercap)), + SAM_Gekko_KenkiOvercap = new(nameof(SAM_Gekko_KenkiOvercap)); } internal class SAM_ST_YukikazeCombo : CustomCombo { @@ -112,25 +120,21 @@ internal class SAM_ST_YukikazeCombo : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { SAMGauge? gauge = GetJobGauge(); - float SamKenkiOvercapAmount = Config.SAM_ST_KenkiOvercapAmount; if (actionID is Yukikaze) { - if (CanWeave(actionID)) - { - if (gauge.Kenki >= SamKenkiOvercapAmount && LevelChecked(Shinten)) - return Shinten; - } + if (Config.SAM_Yukaze_KenkiOvercap && CanWeave(actionID) && gauge.Kenki >= Config.SAM_Yukaze_KenkiOvercapAmount && LevelChecked(Shinten)) + return OriginalHook(Shinten); if (HasEffect(Buffs.MeikyoShisui) && LevelChecked(Yukikaze)) - return Yukikaze; + return OriginalHook(Yukikaze); if (comboTime > 0) { - if (lastComboMove is Hakaze && LevelChecked(Yukikaze)) - return Yukikaze; + if (lastComboMove == OriginalHook(Hakaze) && LevelChecked(Yukikaze)) + return OriginalHook(Yukikaze); } - return Hakaze; + return OriginalHook(Hakaze); } return actionID; } @@ -143,27 +147,54 @@ internal class SAM_ST_KashaCombo : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte levels) { SAMGauge? gauge = GetJobGauge(); - float SamKenkiOvercapAmount = Config.SAM_ST_KenkiOvercapAmount; if (actionID is Kasha) { - if (CanWeave(actionID)) + if (Config.SAM_Kasha_KenkiOvercap && CanWeave(actionID) && gauge.Kenki >= Config.SAM_Kasha_KenkiOvercapAmount && LevelChecked(Shinten)) + return OriginalHook(Shinten); + + if (HasEffect(Buffs.MeikyoShisui)) + return OriginalHook(Kasha); + + if (comboTime > 0) { - if (gauge.Kenki >= SamKenkiOvercapAmount && LevelChecked(Shinten)) - return Shinten; + if (lastComboMove == OriginalHook(Hakaze) && LevelChecked(Shifu)) + return OriginalHook(Shifu); + + if (lastComboMove is Shifu && LevelChecked(Kasha)) + return OriginalHook(Kasha); } + return OriginalHook(Hakaze); + } + return actionID; + } + } + + internal class SAM_ST_GeckoCombo : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.SAM_ST_GekkoCombo; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte levels) + { + SAMGauge? gauge = GetJobGauge(); + + if (actionID is Gekko) + { + if (Config.SAM_Gekko_KenkiOvercap && CanWeave(actionID) && gauge.Kenki >= Config.SAM_Gekko_KenkiOvercapAmount && LevelChecked(Shinten)) + return OriginalHook(Shinten); + if (HasEffect(Buffs.MeikyoShisui)) - return Kasha; + return OriginalHook(Gekko); if (comboTime > 0) { - if (lastComboMove is Hakaze && LevelChecked(Shifu)) - return Shifu; + if (lastComboMove == OriginalHook(Hakaze) && LevelChecked(Jinpu)) + return OriginalHook(Jinpu); - if (lastComboMove is Shifu && LevelChecked(Kasha)) - return Kasha; + if (lastComboMove is Jinpu && LevelChecked(Gekko)) + return OriginalHook(Gekko); } - return Hakaze; + return OriginalHook(Hakaze); } return actionID; } @@ -184,7 +215,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); float meikyostacks = GetBuffStacks(Buffs.MeikyoShisui); - if (actionID is Gekko) + if (actionID is Hakaze or Gyofu) { if (IsEnabled(CustomComboPreset.SAM_Variant_Cure) && IsEnabled(Variant.VariantCure) && @@ -371,12 +402,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool threeSeal = OriginalHook(Iaijutsu) is MidareSetsugekka or TendoSetsugekka; float enemyHP = GetTargetHPPercent(); bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); - float kenkiOvercap = Config.SAM_ST_KenkiOvercapAmount; + int kenkiOvercap = Config.SAM_ST_KenkiOvercapAmount; float shintenTreshhold = Config.SAM_ST_ExecuteThreshold; float HiganbanaThreshold = Config.SAM_ST_Higanbana_Threshold; float meikyostacks = GetBuffStacks(Buffs.MeikyoShisui); - if (actionID is Gekko) + if (actionID is Hakaze or Gyofu) { if (IsEnabled(CustomComboPreset.SAM_Variant_Cure) && IsEnabled(Variant.VariantCure) && diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index d33a2869e..f7ae1c45f 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -2206,6 +2206,27 @@ internal static void Draw(CustomComboPreset preset, bool enabled) if (preset == CustomComboPreset.SAMPvP_KashaFeatures_GapCloser && enabled) UserConfig.DrawSliderInt(0, 100, SAMPvP.Config.SAMPvP_SotenHP, "Use Soten on enemies below selected HP."); + if (preset == CustomComboPreset.SAM_ST_KashaCombo) + { + UserConfig.DrawAdditionalBoolChoice(SAM.Config.SAM_Kasha_KenkiOvercap, "Kenki Overcap Protection", "Spends Kenki when at the set value or above."); + if (SAM.Config.SAM_Kasha_KenkiOvercap) + UserConfig.DrawSliderInt(50, 100, SAM.Config.SAM_Kasha_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); + } + + if (preset == CustomComboPreset.SAM_ST_YukikazeCombo) + { + UserConfig.DrawAdditionalBoolChoice(SAM.Config.SAM_Yukaze_KenkiOvercap, "Kenki Overcap Protection", "Spends Kenki when at the set value or above."); + if (SAM.Config.SAM_Yukaze_KenkiOvercap) + UserConfig.DrawSliderInt(50, 100, SAM.Config.SAM_Yukaze_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); + } + + if (preset == CustomComboPreset.SAM_ST_GekkoCombo) + { + UserConfig.DrawAdditionalBoolChoice(SAM.Config.SAM_Gekko_KenkiOvercap, "Kenki Overcap Protection", "Spends Kenki when at the set value or above."); + if (SAM.Config.SAM_Gekko_KenkiOvercap) + UserConfig.DrawSliderInt(50, 100, SAM.Config.SAM_Gekko_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); + } + #endregion // ==================================================================================== #region SCHOLAR From 7d47782f7bcddc4d0656140fe4d4277848281186 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Sun, 11 Aug 2024 09:37:24 +0100 Subject: [PATCH 052/142] SAM AoE now in parity with ST --- XIVSlothCombo/Combos/CustomComboPreset.cs | 22 ++---- XIVSlothCombo/Combos/PvE/SAM.cs | 82 ++++++++------------ XIVSlothCombo/Window/Functions/UserConfig.cs | 20 ++++- 3 files changed, 56 insertions(+), 68 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index ff0bb6941..384b811c5 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -3233,17 +3233,14 @@ The three digets after RDM.JobID can be used to reorder items in the list SAM_ST_AdvancedMode = 15003, [ParentCombo(SAM_ST_AdvancedMode)] - [ConflictingCombos(SAM_ST_YukikazeCombo)] [CustomComboInfo("Yukikaze Combo", "Adds Yukikaze combo to the rotation.", SAM.JobID)] SAM_ST_Yukikaze = 15004, [ParentCombo(SAM_ST_AdvancedMode)] - [ConflictingCombos(SAM_ST_KashaCombo)] [CustomComboInfo("Kasha Combo", "Adds Kasha combo to the rotation.", SAM.JobID)] SAM_ST_Kasha = 15005, [ParentCombo(SAM_ST_AdvancedMode)] - [ConflictingCombos(SAM_GyotenYaten)] [CustomComboInfo("Level 100 Opener", "Adds the Balance opener to the rotation.", SAM.JobID)] SAM_ST_Opener = 15006, @@ -3290,7 +3287,6 @@ The three digets after RDM.JobID can be used to reorder items in the list SAM_ST_CDs_Shoha = 15019, [ParentCombo(SAM_ST_CDs)] - [ConflictingCombos(SAM_Shinten_Shoha_Senei)] [CustomComboInfo("Senei Option", "Adds Senei to the rotation.", SAM.JobID)] SAM_ST_CDs_Senei = 15020, @@ -3317,10 +3313,13 @@ The three digets after RDM.JobID can be used to reorder items in the list [CustomComboInfo("Oka Combo", "Replace Oka with its combo chain.", SAM.JobID)] SAM_AoE_OkaCombo = 15100, - [ParentCombo(SAM_AoE_OkaCombo)] - [ConflictingCombos(SAM_AoE_Oka)] - [CustomComboInfo("Oka Two Target Rotation Feature", "Adds the Yukikaze combo, Mangetsu combo, Senei, Shinten, and Shoha to Oka combo.\nUsed for two targets only and when Lv86 and above.", SAM.JobID)] - SAM_AoE_OkaCombo_TwoTarget = 15101, + //[ParentCombo(SAM_AoE_OkaCombo)] + //[CustomComboInfo("Oka Two Target Rotation Feature", "Adds the Yukikaze combo, Mangetsu combo, Senei, Shinten, and Shoha to Oka combo.\nUsed for two targets only and when Lv86 and above.", SAM.JobID)] + //SAM_AoE_OkaCombo_TwoTarget = 15101, + + [ReplaceSkill(SAM.Mangetsu)] + [CustomComboInfo("Mangetsu Combo", "Replace Mangetsu with its combo chain.", SAM.JobID)] + SAM_AoE_MangetsuCombo = 15101, #endregion @@ -3328,7 +3327,7 @@ The three digets after RDM.JobID can be used to reorder items in the list [ReplaceSkill(SAM.Fuga, SAM.Fuko)] [ConflictingCombos(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Simple Mode - AoE", "Replaces Fugo/Fuko with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", SAM.JobID)] + [CustomComboInfo("Simple Mode - AoE", "Replaces Fuga/Fuko with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", SAM.JobID)] SAM_AoE_SimpleMode = 15102, #endregion @@ -3341,7 +3340,6 @@ The three digets after RDM.JobID can be used to reorder items in the list SAM_AoE_AdvancedMode = 15103, [ParentCombo(SAM_AoE_AdvancedMode)] - [ConflictingCombos(SAM_AoE_OkaCombo_TwoTarget)] [CustomComboInfo("Oka Combo", "Adds Oka combo to the rotation.", SAM.JobID)] SAM_AoE_Oka = 15104, @@ -3369,7 +3367,6 @@ The three digets after RDM.JobID can be used to reorder items in the list [CustomComboInfo("Shoha", "Adds Shoha when you have 3 meditation stacks.", SAM.JobID)] SAM_AoE_Shoha = 15111, - [ConflictingCombos(SAM_Kyuten_Shoha_Guren)] [ParentCombo(SAM_AoE_AdvancedMode)] [CustomComboInfo("Guren", "Adds Guren to the rotation.", SAM.JobID)] SAM_AoE_Guren = 15112, @@ -3423,7 +3420,6 @@ The three digets after RDM.JobID can be used to reorder items in the list [CustomComboInfo("Shinten to Shoha", "Replace Hissatsu: Shinten with Shoha when Meditation is full.", SAM.JobID)] SAM_Shinten_Shoha = 15205, - [ConflictingCombos(SAM_ST_CDs_Senei)] [ParentCombo(SAM_Shinten_Shoha)] [CustomComboInfo("Shinten to Senei", "Replace Hissatsu: Shinten with Senei when its cooldown is up.", SAM.JobID)] SAM_Shinten_Shoha_Senei = 15206, @@ -3436,7 +3432,6 @@ The three digets after RDM.JobID can be used to reorder items in the list [CustomComboInfo("Kyuten to Shoha", "Replace Hissatsu: Kyuten with Shoha when Meditation is full.", SAM.JobID)] SAM_Kyuten_Shoha = 15207, - [ConflictingCombos(SAM_AoE_Guren)] [ParentCombo(SAM_Kyuten_Shoha)] [CustomComboInfo("Kyuten to Guren", "Replace Hissatsu: Kyuten with Guren when its cooldown is up.", SAM.JobID)] SAM_Kyuten_Shoha_Guren = 15208, @@ -3445,7 +3440,6 @@ The three digets after RDM.JobID can be used to reorder items in the list #region Other - [ConflictingCombos(SAM_ST_Opener)] [ReplaceSkill(SAM.Gyoten)] [CustomComboInfo("Gyoten Feature", "Hissatsu: Gyoten becomes Yaten/Gyoten depending on the distance from your target.", SAM.JobID)] SAM_GyotenYaten = 15209, diff --git a/XIVSlothCombo/Combos/PvE/SAM.cs b/XIVSlothCombo/Combos/PvE/SAM.cs index 66031f25a..bf0b4ea31 100644 --- a/XIVSlothCombo/Combos/PvE/SAM.cs +++ b/XIVSlothCombo/Combos/PvE/SAM.cs @@ -100,6 +100,8 @@ public static UserInt SAM_Kasha_KenkiOvercapAmount = new(nameof(SAM_Kasha_KenkiOvercapAmount), 50), SAM_Yukaze_KenkiOvercapAmount = new(nameof(SAM_Yukaze_KenkiOvercapAmount), 50), SAM_Gekko_KenkiOvercapAmount = new(nameof(SAM_Gekko_KenkiOvercapAmount), 50), + SAM_Oka_KenkiOvercapAmount = new(nameof(SAM_Oka_KenkiOvercapAmount), 50), + SAM_Mangetsu_KenkiOvercapAmount = new(nameof(SAM_Mangetsu_KenkiOvercapAmount), 50), SAM_ST_KenkiOvercapAmount = new(nameof(SAM_ST_KenkiOvercapAmount), 50), SAM_AoE_KenkiOvercapAmount = new(nameof(SAM_AoE_KenkiOvercapAmount), 50), SAM_VariantCure = new("SAM_VariantCure"); @@ -111,7 +113,9 @@ public static UserFloat public static UserBool SAM_Kasha_KenkiOvercap = new(nameof(SAM_Kasha_KenkiOvercap)), SAM_Yukaze_KenkiOvercap = new(nameof(SAM_Yukaze_KenkiOvercap)), - SAM_Gekko_KenkiOvercap = new(nameof(SAM_Gekko_KenkiOvercap)); + SAM_Gekko_KenkiOvercap = new(nameof(SAM_Gekko_KenkiOvercap)), + SAM_Oka_KenkiOvercap = new(nameof(SAM_Oka_KenkiOvercap)), + SAM_Mangetsu_KenkiOvercap = new(nameof(SAM_Mangetsu_KenkiOvercap)); } internal class SAM_ST_YukikazeCombo : CustomCombo { @@ -620,67 +624,43 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is Oka) { - if (IsNotEnabled(CustomComboPreset.SAM_AoE_OkaCombo_TwoTarget) && - gauge.Kenki >= Config.SAM_AoE_KenkiOvercapAmount && LevelChecked(Kyuten) && CanWeave(actionID)) + if (Config.SAM_Oka_KenkiOvercap && gauge.Kenki >= Config.SAM_Oka_KenkiOvercapAmount && LevelChecked(Kyuten) && CanWeave(actionID)) return Kyuten; - if (IsNotEnabled(CustomComboPreset.SAM_AoE_OkaCombo_TwoTarget) && - HasEffect(Buffs.MeikyoShisui)) + if (HasEffect(Buffs.MeikyoShisui)) return Oka; - //Two Target Rotation - if (IsEnabled(CustomComboPreset.SAM_AoE_OkaCombo_TwoTarget)) + if (comboTime > 0 && LevelChecked(Oka)) { - if (CanWeave(actionID)) - { - if (!HasEffect(Buffs.MeikyoShisui) && ActionReady(MeikyoShisui)) - return MeikyoShisui; - - if (ActionReady(Senei) && gauge.Kenki >= 25) - return Senei; - - if (LevelChecked(Shinten) && gauge.Kenki >= 25) - return Shinten; - - if (LevelChecked(Shoha) && gauge.MeditationStacks is 3) - return Shoha; - } - - if (HasEffect(Buffs.MeikyoShisui)) - { - if (!gauge.Sen.HasFlag(Sen.SETSU) && Yukikaze.LevelChecked()) - return Yukikaze; - - if (!gauge.Sen.HasFlag(Sen.GETSU) && Gekko.LevelChecked()) - return Gekko; - - if (!gauge.Sen.HasFlag(Sen.KA) && Kasha.LevelChecked()) - return Kasha; - } - - if (ActionReady(TsubameGaeshi) && gauge.Kaeshi is Kaeshi.SETSUGEKKA) - return OriginalHook(TsubameGaeshi); + if (lastComboMove == OriginalHook(Fuko)) + return Oka; + } + return OriginalHook(Fuko); + } + return actionID; + } + } - if (LevelChecked(MidareSetsugekka) && OriginalHook(Iaijutsu) is MidareSetsugekka) - return OriginalHook(Iaijutsu); + internal class SAM_AoE_MangetsuCombo : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.SAM_AoE_MangetsuCombo; - if (comboTime > 1f) - { - if (lastComboMove is Hakaze && LevelChecked(Yukikaze)) - return Yukikaze; + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + SAMGauge? gauge = GetJobGauge(); - if (lastComboMove is Fuko or Fuga && !gauge.Sen.HasFlag(Sen.GETSU) && LevelChecked(Mangetsu)) - return Mangetsu; - } + if (actionID is Mangetsu) + { + if (Config.SAM_Mangetsu_KenkiOvercap && gauge.Kenki >= Config.SAM_Mangetsu_KenkiOvercapAmount && LevelChecked(Kyuten) && CanWeave(actionID)) + return Kyuten; - if (!gauge.Sen.HasFlag(Sen.SETSU)) - return Hakaze; - } + if (HasEffect(Buffs.MeikyoShisui)) + return Mangetsu; - if (comboTime > 0 && LevelChecked(Oka)) + if (comboTime > 0 && LevelChecked(Mangetsu)) { - if (lastComboMove is Fuko || lastComboMove is Fuga) - return Oka; + if (lastComboMove == OriginalHook(Fuko)) + return Mangetsu; } return OriginalHook(Fuko); } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index f7ae1c45f..8c94a8142 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -2210,21 +2210,35 @@ internal static void Draw(CustomComboPreset preset, bool enabled) { UserConfig.DrawAdditionalBoolChoice(SAM.Config.SAM_Kasha_KenkiOvercap, "Kenki Overcap Protection", "Spends Kenki when at the set value or above."); if (SAM.Config.SAM_Kasha_KenkiOvercap) - UserConfig.DrawSliderInt(50, 100, SAM.Config.SAM_Kasha_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); + UserConfig.DrawSliderInt(25, 100, SAM.Config.SAM_Kasha_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); } if (preset == CustomComboPreset.SAM_ST_YukikazeCombo) { UserConfig.DrawAdditionalBoolChoice(SAM.Config.SAM_Yukaze_KenkiOvercap, "Kenki Overcap Protection", "Spends Kenki when at the set value or above."); if (SAM.Config.SAM_Yukaze_KenkiOvercap) - UserConfig.DrawSliderInt(50, 100, SAM.Config.SAM_Yukaze_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); + UserConfig.DrawSliderInt(25, 100, SAM.Config.SAM_Yukaze_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); } if (preset == CustomComboPreset.SAM_ST_GekkoCombo) { UserConfig.DrawAdditionalBoolChoice(SAM.Config.SAM_Gekko_KenkiOvercap, "Kenki Overcap Protection", "Spends Kenki when at the set value or above."); if (SAM.Config.SAM_Gekko_KenkiOvercap) - UserConfig.DrawSliderInt(50, 100, SAM.Config.SAM_Gekko_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); + UserConfig.DrawSliderInt(25, 100, SAM.Config.SAM_Gekko_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); + } + + if (preset == CustomComboPreset.SAM_AoE_OkaCombo) + { + UserConfig.DrawAdditionalBoolChoice(SAM.Config.SAM_Oka_KenkiOvercap, "Kenki Overcap Protection", "Spends Kenki when at the set value or above."); + if (SAM.Config.SAM_Oka_KenkiOvercap) + UserConfig.DrawSliderInt(25, 100, SAM.Config.SAM_Oka_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); + } + + if (preset == CustomComboPreset.SAM_AoE_MangetsuCombo) + { + UserConfig.DrawAdditionalBoolChoice(SAM.Config.SAM_Mangetsu_KenkiOvercap, "Kenki Overcap Protection", "Spends Kenki when at the set value or above."); + if (SAM.Config.SAM_Mangetsu_KenkiOvercap) + UserConfig.DrawSliderInt(25, 100, SAM.Config.SAM_Mangetsu_KenkiOvercapAmount, "Kenki Amount", sliderIncrement: SliderIncrements.Fives); } #endregion From 5aa45130efbe51e0688842b79ac1518fbc9b46cc Mon Sep 17 00:00:00 2001 From: edewen Date: Sun, 11 Aug 2024 09:22:09 -0400 Subject: [PATCH 053/142] Apex arrow small feature fix Split the setting trying to replace burst shot and quick nock with apex arrow because it wasn't working for burst shot Original setting became just aoe. Added new setting under parent combo of straight shot upgrade for st. removed the code for turning it off with the turn off apex setting because that is for the one button mode not the small features. --- XIVSlothCombo/Combos/CustomComboPreset.cs | 11 ++++++++--- XIVSlothCombo/Combos/PvE/BRD.cs | 10 ++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 4e5715e3b..5f0b2b40f 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -628,6 +628,11 @@ public enum CustomComboPreset [CustomComboInfo("DoT Maintenance Option", "Enabling this option will make Heavy Shot into Straight Shot refresh your DoTs on your current.", BRD.JobID)] BRD_DoTMaintainance = 3002, + [ConflictingCombos(BRD_ST_SimpleMode)] + [ParentCombo(BRD_StraightShotUpgrade)] + [CustomComboInfo("Apex Arrow Feature", "Replaces Burst Shot with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] + BRD_ApexST = 3034, + [ReplaceSkill(BRD.IronJaws)] [ConflictingCombos(BRD_IronJaws_Alternate)] [CustomComboInfo("Iron Jaws Feature", "Iron Jaws is replaced with Caustic Bite/Stormbite if one or both are not up.\nAlternates between the two if Iron Jaws isn't available.", BRD.JobID)] @@ -638,9 +643,9 @@ public enum CustomComboPreset [CustomComboInfo("Iron Jaws Alternate Feature", "Iron Jaws is replaced with Caustic Bite/Stormbite if one or both are not up.\nIron Jaws will only show up when debuffs are about to expire.", BRD.JobID)] BRD_IronJaws_Alternate = 3004, - [ReplaceSkill(BRD.BurstShot, BRD.QuickNock)] + [ReplaceSkill(BRD.Ladonsbite, BRD.QuickNock)] [ConflictingCombos(BRD_ST_SimpleMode)] - [CustomComboInfo("Burst Shot/Quick Nock to Apex Arrow Feature", "Replaces Burst Shot and Quick Nock with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] + [CustomComboInfo("Ladonsbite/Quick Nock to Apex Arrow Feature", "Replaces Ladonsbite and Quick Nock with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] BRD_Apex = 3005, [ReplaceSkill(BRD.Bloodletter)] @@ -756,7 +761,7 @@ public enum CustomComboPreset [ParentCombo(BRD_AoE_SimpleMode)] [CustomComboInfo("Simple AoE No Waste Option", "Adds enemy health checking on targetted mob for songs.\nThey will not be reapplied if less than specified.", BRD.JobID)] BRD_AoE_Simple_NoWaste = 3033, - // Last value = 3033 + // Last value = 3034 #endregion diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index b86ad922f..ea25aaeb6 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -90,7 +90,7 @@ public const string internal static bool SongIsWandererMinuet(Song value) => value == Song.WANDERER; #endregion - // Replace HS/BS with SS/RA when procced. + // Replace HS/BS with SS/RA when procced, Apex feature added. internal class BRD_StraightShotUpgrade : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.BRD_StraightShotUpgrade; @@ -99,11 +99,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is HeavyShot or BurstShot) { - if (IsEnabled(CustomComboPreset.BRD_Apex)) + if (IsEnabled(CustomComboPreset.BRD_ApexST)) { BRDGauge? gauge = GetJobGauge(); - if (!IsEnabled(CustomComboPreset.BRD_RemoveApexArrow) && gauge.SoulVoice == 100) + if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100) return ApexArrow; if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) return BlastArrow; @@ -284,8 +284,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { BRDGauge? gauge = GetJobGauge(); - if (!IsEnabled(CustomComboPreset.BRD_RemoveApexArrow) && LevelChecked(ApexArrow) && gauge.SoulVoice == 100) + if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100) return ApexArrow; + if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) + return BlastArrow; } return actionID; From 2b58a4f75d3092001923e7730682835a8ddb1692 Mon Sep 17 00:00:00 2001 From: edewen Date: Sun, 11 Aug 2024 12:19:15 -0400 Subject: [PATCH 054/142] Brd ogcd, more apex Added heartbreakshot to ogcd feature for st so it works again Moved the brd apex feature into the AOE combo feature just like with ST. It was redundant and doing it in both places. removed unneeded bools in one button songs and buffs, using action ready Cleared up conflicting combos throughout, moved not so simple modes to the top, we will be getting a real simple mode soon. --- XIVSlothCombo/Combos/CustomComboPreset.cs | 36 ++++++++-------- XIVSlothCombo/Combos/PvE/BRD.cs | 51 ++++++----------------- 2 files changed, 30 insertions(+), 57 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 5f0b2b40f..1da8234b5 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -618,17 +618,25 @@ public enum CustomComboPreset #region BARD + [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] + [ConflictingCombos(BRD_StraightShotUpgrade, BRD_DoTMaintainance, BRD_ST_oGCD, BRD_IronJawsApex)] + [CustomComboInfo("Simple Bard Feature", "Adds every single target ability to one button,\nIf there are DoTs on target, Simple Bard will try to maintain their uptime.", BRD.JobID)] + BRD_ST_SimpleMode = 3009, + + [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD)] + [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] + [CustomComboInfo("Simple AoE Bard Feature", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] + BRD_AoE_SimpleMode = 3015, + [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] [ConflictingCombos(BRD_ST_SimpleMode)] [CustomComboInfo("Heavy Shot into Straight Shot Feature", "Replaces Heavy Shot/Burst Shot with Straight Shot/Refulgent Arrow when procced.", BRD.JobID)] BRD_StraightShotUpgrade = 3001, - - [ConflictingCombos(BRD_ST_SimpleMode)] + [ParentCombo(BRD_StraightShotUpgrade)] [CustomComboInfo("DoT Maintenance Option", "Enabling this option will make Heavy Shot into Straight Shot refresh your DoTs on your current.", BRD.JobID)] BRD_DoTMaintainance = 3002, - [ConflictingCombos(BRD_ST_SimpleMode)] [ParentCombo(BRD_StraightShotUpgrade)] [CustomComboInfo("Apex Arrow Feature", "Replaces Burst Shot with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] BRD_ApexST = 3034, @@ -643,18 +651,17 @@ public enum CustomComboPreset [CustomComboInfo("Iron Jaws Alternate Feature", "Iron Jaws is replaced with Caustic Bite/Stormbite if one or both are not up.\nIron Jaws will only show up when debuffs are about to expire.", BRD.JobID)] BRD_IronJaws_Alternate = 3004, - [ReplaceSkill(BRD.Ladonsbite, BRD.QuickNock)] - [ConflictingCombos(BRD_ST_SimpleMode)] + [ParentCombo(BRD_AoE_Combo)] [CustomComboInfo("Ladonsbite/Quick Nock to Apex Arrow Feature", "Replaces Ladonsbite and Quick Nock with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] BRD_Apex = 3005, [ReplaceSkill(BRD.Bloodletter)] [ConflictingCombos(BRD_ST_SimpleMode)] - [CustomComboInfo("Single Target oGCD Feature", "All oGCD's on Bloodletter (+ Songs rotation) depending on their CD.", BRD.JobID)] + [CustomComboInfo("Single Target oGCD Feature", "All oGCD's on Bloodletter/Heartbreakshot (+ Songs rotation) depending on their CD.", BRD.JobID)] BRD_ST_oGCD = 3006, [ReplaceSkill(BRD.RainOfDeath)] - [ConflictingCombos(BRD_AoE_Combo)] + [ConflictingCombos(BRD_AoE_SimpleMode)] [CustomComboInfo("AoE oGCD Feature", "All AoE oGCD's on Rain of Death depending on their CD.", BRD.JobID)] BRD_AoE_oGCD = 3007, @@ -662,12 +669,7 @@ public enum CustomComboPreset [ConflictingCombos(BRD_AoE_SimpleMode)] [CustomComboInfo("AoE Combo Feature", "Replaces Quick Nock/Ladonsbite with Shadowbite when ready.", BRD.JobID)] BRD_AoE_Combo = 3008, - - [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] - [ConflictingCombos(BRD_StraightShotUpgrade, BRD_DoTMaintainance, BRD_Apex, BRD_ST_oGCD, BRD_IronJawsApex)] - [CustomComboInfo("Simple Bard Feature", "Adds every single target ability to one button,\nIf there are DoTs on target, Simple Bard will try to maintain their uptime.", BRD.JobID)] - BRD_ST_SimpleMode = 3009, - + [ParentCombo(BRD_ST_SimpleMode)] [CustomComboInfo("Simple Bard DoTs Option", "This option will make Simple Bard apply DoTs if none are present on the target.", BRD.JobID)] BRD_Simple_DoT = 3010, @@ -680,17 +682,14 @@ public enum CustomComboPreset [CustomComboInfo("Songs Feature", "Adds Songs onto AoE oGCD Feature.", BRD.JobID)] BRD_oGCDSongs = 3012, + [ReplaceSkill(BRD.Barrage)] [CustomComboInfo("Bard Buffs Feature", "Adds Raging Strikes and Battle Voice onto Barrage.", BRD.JobID)] BRD_Buffs = 3013, [ReplaceSkill(BRD.WanderersMinuet)] [CustomComboInfo("One Button Songs Feature", "Add Mage's Ballad and Army's Paeon to Wanderer's Minuet depending on cooldowns.", BRD.JobID)] BRD_OneButtonSongs = 3014, - - [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] - [CustomComboInfo("Simple AoE Bard Feature", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] - BRD_AoE_SimpleMode = 3015, - + [ParentCombo(BRD_AoE_SimpleMode)] [CustomComboInfo("Simple AoE Bard Song Option", "Weave Songs on the Simple AoE.", BRD.JobID)] BRD_AoE_Simple_Songs = 3016, @@ -723,7 +722,6 @@ public enum CustomComboPreset [CustomComboInfo("Simple Pooling Option", "Pools Bloodletter charges to allow for optimum burst phases, will also keep sidewinder in the buff window during wanderers.", BRD.JobID)] BRD_Simple_Pooling = 3023, - [ConflictingCombos(BRD_ST_SimpleMode)] [ParentCombo(BRD_IronJaws)] [CustomComboInfo("Iron Jaws Apex Option", "Adds Apex and Blast Arrow to Iron Jaws when available.", BRD.JobID)] BRD_IronJawsApex = 3024, diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index ea25aaeb6..18c667bbc 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -43,6 +43,7 @@ public const uint BlastArrow = 25784, RadiantFinale = 25785, WideVolley = 36974, + HeartbreakShot = 36975, ResonantArrow = 36976, RadiantEncore = 36977; @@ -272,27 +273,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } - } - - internal class BRD_Apex : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.BRD_Apex; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID is QuickNock) - { - BRDGauge? gauge = GetJobGauge(); - - if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100) - return ApexArrow; - if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) - return BlastArrow; - } - - return actionID; - } - } + } internal class BRD_AoE_oGCD : CustomCombo { @@ -546,7 +527,7 @@ internal class BRD_ST_oGCD : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID is Bloodletter) + if (actionID is Bloodletter or HeartbreakShot) { BRDGauge? gauge = GetJobGauge(); bool songArmy = gauge.Song == Song.ARMY; @@ -555,8 +536,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool balladReady = LevelChecked(MagesBallad) && IsOffCooldown(MagesBallad); bool paeonReady = LevelChecked(ArmysPaeon) && IsOffCooldown(ArmysPaeon); - if (IsEnabled(CustomComboPreset.BRD_oGCDSongs) && - (gauge.SongTimer < 1 || songArmy)) + if (gauge.SongTimer < 1 || songArmy) { if (minuetReady) return WanderersMinuet; @@ -570,10 +550,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(PitchPerfect); if (ActionReady(EmpyrealArrow)) return EmpyrealArrow; - if (ActionReady(Bloodletter)) - return OriginalHook(Bloodletter); if (ActionReady(Sidewinder)) return Sidewinder; + if (ActionReady(Bloodletter)) + return OriginalHook(Bloodletter); + } return actionID; @@ -926,12 +907,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is Barrage) { - bool ragingReady = LevelChecked(RagingStrikes) && IsOffCooldown(RagingStrikes); - bool battleVoiceReady = LevelChecked(BattleVoice) && IsOffCooldown(BattleVoice); - - if (ragingReady) + if (ActionReady(RagingStrikes)) return RagingStrikes; - if (battleVoiceReady) + if (ActionReady(BattleVoice)) return BattleVoice; } @@ -948,18 +926,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { // Doesn't display the lowest cooldown song if they have been used out of order and are all on cooldown. BRDGauge? gauge = GetJobGauge(); - int songTimerInSeconds = gauge.SongTimer / 1000; - bool wanderersMinuetReady = LevelChecked(WanderersMinuet) && IsOffCooldown(WanderersMinuet); - bool magesBalladReady = LevelChecked(MagesBallad) && IsOffCooldown(MagesBallad); - bool armysPaeonReady = LevelChecked(ArmysPaeon) && IsOffCooldown(ArmysPaeon); + int songTimerInSeconds = gauge.SongTimer / 1000; - if (wanderersMinuetReady || (gauge.Song == Song.WANDERER && songTimerInSeconds > 11)) + if (ActionReady(WanderersMinuet) || (gauge.Song == Song.WANDERER && songTimerInSeconds > 11)) return WanderersMinuet; - if (magesBalladReady || (gauge.Song == Song.MAGE && songTimerInSeconds > 2)) + if (ActionReady(MagesBallad) || (gauge.Song == Song.MAGE && songTimerInSeconds > 2)) return MagesBallad; - if (armysPaeonReady || (gauge.Song == Song.ARMY && songTimerInSeconds > 2)) + if (ActionReady(ArmysPaeon) || (gauge.Song == Song.ARMY && songTimerInSeconds > 2)) return ArmysPaeon; } From 5373fdd99a52457b49ecbacf8f379f48c2ac93c0 Mon Sep 17 00:00:00 2001 From: edewen Date: Sun, 11 Aug 2024 13:40:36 -0400 Subject: [PATCH 055/142] Addition of advance mode Cleaned unneeded bools out of aoe section using actionreadys Turned aoe simple into aoe advanced. Created a real aoe simple mode at the top of config --- XIVSlothCombo/Combos/CustomComboPreset.cs | 39 +-- XIVSlothCombo/Combos/PvE/BRD.cs | 272 ++++++++++++++++--- XIVSlothCombo/Window/Functions/UserConfig.cs | 2 +- 3 files changed, 253 insertions(+), 60 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 1da8234b5..5dd231ebb 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -618,15 +618,20 @@ public enum CustomComboPreset #region BARD + [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD, BRD_AoE_AdvMode)] + [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] + [CustomComboInfo("Simple AoE Bard Feature", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] + BRD_AoE_SimpleMode = 3035, + [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] [ConflictingCombos(BRD_StraightShotUpgrade, BRD_DoTMaintainance, BRD_ST_oGCD, BRD_IronJawsApex)] [CustomComboInfo("Simple Bard Feature", "Adds every single target ability to one button,\nIf there are DoTs on target, Simple Bard will try to maintain their uptime.", BRD.JobID)] BRD_ST_SimpleMode = 3009, - [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD)] + [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD, BRD_AoE_SimpleMode)] [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] - [CustomComboInfo("Simple AoE Bard Feature", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] - BRD_AoE_SimpleMode = 3015, + [CustomComboInfo("Advanced AoE Bard Feature", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] + BRD_AoE_AdvMode = 3015, [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] [ConflictingCombos(BRD_ST_SimpleMode)] @@ -661,12 +666,12 @@ public enum CustomComboPreset BRD_ST_oGCD = 3006, [ReplaceSkill(BRD.RainOfDeath)] - [ConflictingCombos(BRD_AoE_SimpleMode)] + [ConflictingCombos(BRD_AoE_AdvMode, BRD_AoE_SimpleMode)] [CustomComboInfo("AoE oGCD Feature", "All AoE oGCD's on Rain of Death depending on their CD.", BRD.JobID)] BRD_AoE_oGCD = 3007, [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] - [ConflictingCombos(BRD_AoE_SimpleMode)] + [ConflictingCombos(BRD_AoE_AdvMode, BRD_AoE_SimpleMode)] [CustomComboInfo("AoE Combo Feature", "Replaces Quick Nock/Ladonsbite with Shadowbite when ready.", BRD.JobID)] BRD_AoE_Combo = 3008, @@ -690,9 +695,9 @@ public enum CustomComboPreset [CustomComboInfo("One Button Songs Feature", "Add Mage's Ballad and Army's Paeon to Wanderer's Minuet depending on cooldowns.", BRD.JobID)] BRD_OneButtonSongs = 3014, - [ParentCombo(BRD_AoE_SimpleMode)] - [CustomComboInfo("Simple AoE Bard Song Option", "Weave Songs on the Simple AoE.", BRD.JobID)] - BRD_AoE_Simple_Songs = 3016, + [ParentCombo(BRD_AoE_AdvMode)] + [CustomComboInfo("AoE Bard Song Option", "Weave Songs on the Advanced AoE.", BRD.JobID)] + BRD_AoE_Adv_Songs = 3016, [ParentCombo(BRD_ST_SimpleMode)] [CustomComboInfo("Simple Buffs Option", "Adds buffs onto the Simple Bard feature.", BRD.JobID)] @@ -738,27 +743,27 @@ public enum CustomComboPreset [CustomComboInfo("Second Wind Option", "Uses Second Wind when below set HP percentage.", BRD.JobID)] BRD_ST_SecondWind = 3028, - [ParentCombo(BRD_AoE_SimpleMode)] + [ParentCombo(BRD_AoE_AdvMode)] [CustomComboInfo("Second Wind Option", "Uses Second Wind when below set HP percentage.", BRD.JobID)] BRD_AoE_SecondWind = 3029, [Variant] - [VariantParent(BRD_ST_SimpleMode, BRD_AoE_SimpleMode)] + [VariantParent(BRD_ST_SimpleMode, BRD_AoE_AdvMode)] [CustomComboInfo("Rampart Option", "Use Variant Rampart on cooldown.", BRD.JobID)] BRD_Variant_Rampart = 3030, [Variant] - [VariantParent(BRD_ST_SimpleMode, BRD_AoE_SimpleMode)] + [VariantParent(BRD_ST_SimpleMode, BRD_AoE_AdvMode)] [CustomComboInfo("Cure Option", "Use Variant Cure when HP is below set threshold.", BRD.JobID)] BRD_Variant_Cure = 3031, - [ParentCombo(BRD_AoE_Simple_Songs)] - [CustomComboInfo("Simple AoE Buffs Option", "Adds buffs onto the Simple AoE Bard feature.", BRD.JobID)] - BRD_AoE_Simple_Buffs = 3032, + [ParentCombo(BRD_AoE_Adv_Songs)] + [CustomComboInfo("AoE Buffs Option", "Adds buffs onto the Advance AoE Bard feature.", BRD.JobID)] + BRD_AoE_Adv_Buffs = 3032, - [ParentCombo(BRD_AoE_SimpleMode)] - [CustomComboInfo("Simple AoE No Waste Option", "Adds enemy health checking on targetted mob for songs.\nThey will not be reapplied if less than specified.", BRD.JobID)] - BRD_AoE_Simple_NoWaste = 3033, + [ParentCombo(BRD_AoE_AdvMode)] + [CustomComboInfo("AoE No Waste Option", "Adds enemy health checking on targetted mob for songs.\nThey will not be reapplied if less than specified.", BRD.JobID)] + BRD_AoE_Adv_NoWaste = 3033, // Last value = 3034 #endregion diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index 1e0b441ae..ab3674b10 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -300,12 +300,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class BRD_AoE_SimpleMode : CustomCombo + internal class BRD_AoE_AdvMode : CustomCombo { internal static bool inOpener = false; internal static bool openerFinished = false; - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.BRD_AoE_SimpleMode; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.BRD_AoE_AdvMode; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -321,7 +321,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool songMage = gauge.Song == Song.MAGE; bool songArmy = gauge.Song == Song.ARMY; int targetHPThreshold = PluginConfiguration.GetCustomIntValue(Config.BRD_AoENoWasteHPPercentage); - bool isEnemyHealthHigh = !IsEnabled(CustomComboPreset.BRD_AoE_Simple_NoWaste) || GetTargetHPPercent() > targetHPThreshold; + bool isEnemyHealthHigh = !IsEnabled(CustomComboPreset.BRD_AoE_Adv_NoWaste) || GetTargetHPPercent() > targetHPThreshold; if (IsEnabled(CustomComboPreset.BRD_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.BRD_VariantCure)) return Variant.VariantCure; @@ -332,26 +332,22 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim canWeave) return Variant.VariantRampart; - if (IsEnabled(CustomComboPreset.BRD_AoE_Simple_Songs) && canWeave) + if (IsEnabled(CustomComboPreset.BRD_AoE_Adv_Songs) && canWeave) { // Limit optimisation to when you are high enough level to benefit from it. if (LevelChecked(WanderersMinuet)) - { - bool minuetReady = IsOffCooldown(WanderersMinuet); - bool balladReady = IsOffCooldown(MagesBallad); - bool paeonReady = IsOffCooldown(ArmysPaeon); - + { if (canWeave) { if (songNone) { // Logic to determine first song - if (minuetReady && !(JustUsed(MagesBallad) || JustUsed(ArmysPaeon))) + if (ActionReady(WanderersMinuet) && !(JustUsed(MagesBallad) || JustUsed(ArmysPaeon))) return WanderersMinuet; - if (balladReady && !(JustUsed(WanderersMinuet) || JustUsed(ArmysPaeon))) + if (ActionReady(MagesBallad) && !(JustUsed(WanderersMinuet) || JustUsed(ArmysPaeon))) return MagesBallad; - if (paeonReady && !(JustUsed(MagesBallad) || JustUsed(WanderersMinuet))) + if (ActionReady(ArmysPaeon) && !(JustUsed(MagesBallad) || JustUsed(WanderersMinuet))) return ArmysPaeon; } @@ -359,7 +355,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (songTimerInSeconds <= 3 && gauge.Repertoire > 0) // Spend any repertoire before switching to next song return OriginalHook(PitchPerfect); - if (songTimerInSeconds <= 3 && balladReady) // Move to Mage's Ballad if <= 3 seconds left on song + if (songTimerInSeconds <= 3 && ActionReady(MagesBallad)) // Move to Mage's Ballad if <= 3 seconds left on song return MagesBallad; } @@ -367,7 +363,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { // Move to Army's Paeon if < 3 seconds left on song - if (songTimerInSeconds <= 3 && paeonReady) + if (songTimerInSeconds <= 3 && ActionReady(ArmysPaeon)) { // Special case for Empyreal Arrow: it must be cast before you change to it to avoid drift! if (ActionReady(EmpyrealArrow)) @@ -380,43 +376,36 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (songArmy && canWeaveDelayed) { // Move to Wanderer's Minuet if <= 12 seconds left on song or WM off CD and have 4 repertoires of AP - if (songTimerInSeconds <= 12 || (minuetReady && gauge.Repertoire == 4)) + if (songTimerInSeconds <= 12 || (ActionReady(WanderersMinuet) && gauge.Repertoire == 4)) return WanderersMinuet; } } else if (songTimerInSeconds <= 3 && canWeave) { - bool balladReady = LevelChecked(MagesBallad) && IsOffCooldown(MagesBallad); - bool paeonReady = LevelChecked(ArmysPaeon) && IsOffCooldown(ArmysPaeon); - - if (balladReady) + if (ActionReady(MagesBallad)) return MagesBallad; - if (paeonReady) + if (ActionReady(ArmysPaeon)) return ArmysPaeon; } } - if (IsEnabled(CustomComboPreset.BRD_AoE_Simple_Buffs) && (!songNone || !LevelChecked(MagesBallad)) && isEnemyHealthHigh) + if (IsEnabled(CustomComboPreset.BRD_AoE_Adv_Buffs) && (!songNone || !LevelChecked(MagesBallad)) && isEnemyHealthHigh) { - bool radiantReady = LevelChecked(RadiantFinale) && IsOffCooldown(RadiantFinale); - bool ragingReady = LevelChecked(RagingStrikes) && IsOffCooldown(RagingStrikes); - bool battleVoiceReady = LevelChecked(BattleVoice) && IsOffCooldown(BattleVoice); - bool barrageReady = LevelChecked(Barrage) && IsOffCooldown(Barrage); float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); float ragingCD = GetCooldownRemainingTime(RagingStrikes); - if (canWeaveDelayed && IsEnabled(CustomComboPreset.BRD_Simple_BuffsRadiant) && radiantReady && + if (canWeaveDelayed && ActionReady(RadiantFinale) && (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) return RadiantFinale; - if (canWeaveBuffs && battleVoiceReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + if (canWeaveBuffs && ActionReady(BattleVoice) && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) return BattleVoice; - if (canWeaveBuffs && ragingReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + if (canWeaveBuffs && ActionReady(RagingStrikes) && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) return RagingStrikes; - if (canWeaveBuffs && barrageReady && HasEffect(Buffs.RagingStrikes)) + if (canWeaveBuffs && ActionReady(Barrage) && HasEffect(Buffs.RagingStrikes)) { if (LevelChecked(RadiantFinale) && HasEffect(Buffs.RadiantFinale)) return Barrage; @@ -444,20 +433,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(PitchPerfect); if (ActionReady(Sidewinder)) - { - if (IsEnabled(CustomComboPreset.BRD_Simple_Pooling)) + { + if (songWanderer) { - if (songWanderer) - { - if ((HasEffect(Buffs.RagingStrikes) || ragingCD > 10) && - (HasEffect(Buffs.BattleVoice) || battleVoiceCD > 10) && - (HasEffect(Buffs.RadiantFinale) || radiantCD > 10 || - !LevelChecked(RadiantFinale))) - return Sidewinder; - } - else return Sidewinder; + if ((HasEffect(Buffs.RagingStrikes) || ragingCD > 10) && + (HasEffect(Buffs.BattleVoice) || battleVoiceCD > 10) && + (HasEffect(Buffs.RadiantFinale) || radiantCD > 10 || + !LevelChecked(RadiantFinale))) + return Sidewinder; } else return Sidewinder; + } @@ -465,7 +451,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { uint rainOfDeathCharges = LevelChecked(RainOfDeath) ? GetRemainingCharges(RainOfDeath) : 0; - if (IsEnabled(CustomComboPreset.BRD_Simple_Pooling) && LevelChecked(WanderersMinuet)) + if (LevelChecked(WanderersMinuet)) { if (songWanderer) { @@ -493,7 +479,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(RadiantEncore); // healing - please move if not appropriate priority - if (IsEnabled(CustomComboPreset.BRD_ST_SecondWind)) + if (IsEnabled(CustomComboPreset.BRD_AoE_SecondWind)) { if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.BRD_AoESecondWindThreshold) && ActionReady(All.SecondWind)) return All.SecondWind; @@ -939,6 +925,208 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } + return actionID; + } + } + internal class BRD_AoE_SimpleMode : CustomCombo + { + internal static bool inOpener = false; + internal static bool openerFinished = false; + + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.BRD_AoE_SimpleMode; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (actionID is Ladonsbite or QuickNock) + { + BRDGauge? gauge = GetJobGauge(); + bool canWeave = CanWeave(actionID); + bool canWeaveBuffs = CanWeave(actionID, 0.6); + bool canWeaveDelayed = CanDelayedWeave(actionID, 0.9); + int songTimerInSeconds = gauge.SongTimer / 1000; + bool songNone = gauge.Song == Song.NONE; + bool songWanderer = gauge.Song == Song.WANDERER; + bool songMage = gauge.Song == Song.MAGE; + bool songArmy = gauge.Song == Song.ARMY; + int targetHPThreshold = PluginConfiguration.GetCustomIntValue(Config.BRD_AoENoWasteHPPercentage); + bool isEnemyHealthHigh = GetTargetHPPercent() > 5; + + if (IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= 50) + return Variant.VariantCure; + + if (IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + canWeave) + return Variant.VariantRampart; + + if (canWeave) + { + // Limit optimisation to when you are high enough level to benefit from it. + if (LevelChecked(WanderersMinuet)) + { + if (canWeave) + { + if (songNone) + { + // Logic to determine first song + if (ActionReady(WanderersMinuet) && !(JustUsed(MagesBallad) || JustUsed(ArmysPaeon))) + return WanderersMinuet; + if (ActionReady(MagesBallad) && !(JustUsed(WanderersMinuet) || JustUsed(ArmysPaeon))) + return MagesBallad; + if (ActionReady(ArmysPaeon) && !(JustUsed(MagesBallad) || JustUsed(WanderersMinuet))) + return ArmysPaeon; + } + + if (songWanderer) + { + if (songTimerInSeconds <= 3 && gauge.Repertoire > 0) // Spend any repertoire before switching to next song + return OriginalHook(PitchPerfect); + if (songTimerInSeconds <= 3 && ActionReady(MagesBallad)) // Move to Mage's Ballad if <= 3 seconds left on song + return MagesBallad; + } + + if (songMage) + { + + // Move to Army's Paeon if < 3 seconds left on song + if (songTimerInSeconds <= 3 && ActionReady(ArmysPaeon)) + { + // Special case for Empyreal Arrow: it must be cast before you change to it to avoid drift! + if (ActionReady(EmpyrealArrow)) + return EmpyrealArrow; + return ArmysPaeon; + } + } + } + + if (songArmy && canWeaveDelayed) + { + // Move to Wanderer's Minuet if <= 12 seconds left on song or WM off CD and have 4 repertoires of AP + if (songTimerInSeconds <= 12 || (ActionReady(WanderersMinuet) && gauge.Repertoire == 4)) + return WanderersMinuet; + } + } + else if (songTimerInSeconds <= 3 && canWeave) + { + if (ActionReady(MagesBallad)) + return MagesBallad; + if (ActionReady(ArmysPaeon)) + return ArmysPaeon; + } + } + + if ((!songNone || !LevelChecked(MagesBallad)) && isEnemyHealthHigh) + { + float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); + float ragingCD = GetCooldownRemainingTime(RagingStrikes); + + if (canWeaveDelayed && ActionReady(RadiantFinale) && + (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) + && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) + return RadiantFinale; + + if (canWeaveBuffs && ActionReady(BattleVoice) && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + return BattleVoice; + + if (canWeaveBuffs && ActionReady(RagingStrikes) && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + return RagingStrikes; + + if (canWeaveBuffs && ActionReady(Barrage) && HasEffect(Buffs.RagingStrikes)) + { + if (LevelChecked(RadiantFinale) && HasEffect(Buffs.RadiantFinale)) + return Barrage; + else if (LevelChecked(BattleVoice) && HasEffect(Buffs.BattleVoice)) + return Barrage; + else if (!LevelChecked(BattleVoice) && HasEffect(Buffs.RagingStrikes)) + return Barrage; + + } + } + + + if (canWeave) + { + float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); + float empyrealCD = GetCooldownRemainingTime(EmpyrealArrow); + float ragingCD = GetCooldownRemainingTime(RagingStrikes); + float radiantCD = GetCooldownRemainingTime(RadiantFinale); + + if (ActionReady(EmpyrealArrow)) + return EmpyrealArrow; + + if (LevelChecked(PitchPerfect) && songWanderer && + (gauge.Repertoire == 3 || (gauge.Repertoire == 2 && empyrealCD < 2))) + return OriginalHook(PitchPerfect); + + if (ActionReady(Sidewinder)) + { + if (songWanderer) + { + if ((HasEffect(Buffs.RagingStrikes) || ragingCD > 10) && + (HasEffect(Buffs.BattleVoice) || battleVoiceCD > 10) && + (HasEffect(Buffs.RadiantFinale) || radiantCD > 10 || + !LevelChecked(RadiantFinale))) + return Sidewinder; + + } + else return Sidewinder; + } + + if (LevelChecked(RainOfDeath) && (empyrealCD > 1 || !LevelChecked(EmpyrealArrow))) + { + uint rainOfDeathCharges = LevelChecked(RainOfDeath) ? GetRemainingCharges(RainOfDeath) : 0; + + if (LevelChecked(WanderersMinuet)) + { + if (songWanderer) + { + if (((HasEffect(Buffs.RagingStrikes) || ragingCD > 10) && + (HasEffect(Buffs.BattleVoice) || battleVoiceCD > 10 || + !LevelChecked(BattleVoice)) && + (HasEffect(Buffs.RadiantFinale) || radiantCD > 10 || + !LevelChecked(RadiantFinale)) && + rainOfDeathCharges > 0) || rainOfDeathCharges > 2) + return OriginalHook(RainOfDeath); + } + + if (songArmy && (rainOfDeathCharges == 3 || ((gauge.SongTimer / 1000) > 30 && rainOfDeathCharges > 0))) + return OriginalHook(RainOfDeath); + if (songMage && rainOfDeathCharges > 0) + return OriginalHook(RainOfDeath); + if (songNone && rainOfDeathCharges == 3) + return OriginalHook(RainOfDeath); + } + else if (rainOfDeathCharges > 0) + return OriginalHook(RainOfDeath); + } + //Moved Below ogcds as it was preventing them from happening. + if (HasEffect(Buffs.RadiantEncoreReady) && !JustUsed(RadiantFinale) && GetCooldownElapsed(BattleVoice) >= 4.2f) + return OriginalHook(RadiantEncore); + + // healing - please move if not appropriate priority + + if (PlayerHealthPercentageHp() <= 40 && ActionReady(All.SecondWind)) + return All.SecondWind; + + } + + bool wideVolleyReady = LevelChecked(WideVolley) && HasEffect(Buffs.HawksEye); + bool blastArrowReady = LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady); + bool resonantArrowReady = LevelChecked(ResonantArrow) && HasEffect(Buffs.ResonantArrowReady); + + if (wideVolleyReady) + return OriginalHook(WideVolley); + if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100) + return ApexArrow; + if (blastArrowReady) + return BlastArrow; + if (resonantArrowReady) + return ResonantArrow; + if (HasEffect(Buffs.RadiantEncoreReady)) + return OriginalHook(RadiantEncore); + + } + return actionID; } } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index d33a2869e..83838f432 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1429,7 +1429,7 @@ internal static void Draw(CustomComboPreset preset, bool enabled) if (preset == CustomComboPreset.BRD_Simple_NoWaste) UserConfig.DrawSliderInt(1, 10, BRD.Config.BRD_NoWasteHPPercentage, "Remaining target HP percentage"); - if (preset == CustomComboPreset.BRD_AoE_Simple_NoWaste) + if (preset == CustomComboPreset.BRD_AoE_Adv_NoWaste) UserConfig.DrawSliderInt(1, 10, BRD.Config.BRD_AoENoWasteHPPercentage, "Remaining target HP percentage"); if (preset == CustomComboPreset.BRD_ST_SecondWind) From e34cfe70cfb4d78a43639b5a49912a958552e751 Mon Sep 17 00:00:00 2001 From: edewen Date: Sun, 11 Aug 2024 14:25:00 -0400 Subject: [PATCH 056/142] St advance mode and simple mode Changed the existing simple mode into advance, added a real simple mode. Cleaned corresponding conflicting combos --- XIVSlothCombo/Combos/CustomComboPreset.cs | 78 ++--- XIVSlothCombo/Combos/PvE/BRD.cs | 319 ++++++++++++++++++- XIVSlothCombo/Window/Functions/UserConfig.cs | 4 +- 3 files changed, 352 insertions(+), 49 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 5dd231ebb..d595dbcf5 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1,6 +1,7 @@ using XIVSlothCombo.Attributes; using XIVSlothCombo.Combos.PvE; using XIVSlothCombo.Combos.PvP; +using static XIVSlothCombo.Combos.PvE.BRD; namespace XIVSlothCombo.Combos { @@ -618,15 +619,20 @@ public enum CustomComboPreset #region BARD + [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] + [ConflictingCombos(BRD_StraightShotUpgrade, BRD_ST_oGCD, BRD_IronJaws, BRD_IronJaws_Alternate, BRD_ST_AdvMode)] + [CustomComboInfo("Simple Bard Feature", "Adds every single target ability to one button,\nIf there are DoTs on target, will try to maintain their uptime.", BRD.JobID)] + BRD_ST_SimpleMode = 3036, + [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD, BRD_AoE_AdvMode)] [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] [CustomComboInfo("Simple AoE Bard Feature", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] BRD_AoE_SimpleMode = 3035, [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] - [ConflictingCombos(BRD_StraightShotUpgrade, BRD_DoTMaintainance, BRD_ST_oGCD, BRD_IronJawsApex)] - [CustomComboInfo("Simple Bard Feature", "Adds every single target ability to one button,\nIf there are DoTs on target, Simple Bard will try to maintain their uptime.", BRD.JobID)] - BRD_ST_SimpleMode = 3009, + [ConflictingCombos(BRD_StraightShotUpgrade, BRD_ST_oGCD, BRD_IronJaws, BRD_IronJaws_Alternate, BRD_ST_SimpleMode)] + [CustomComboInfo("Advanced Bard Feature", "Adds every single target ability to one button,\nIf there are DoTs on target, will try to maintain their uptime.", BRD.JobID)] + BRD_ST_AdvMode = 3009, [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD, BRD_AoE_SimpleMode)] [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] @@ -634,7 +640,7 @@ public enum CustomComboPreset BRD_AoE_AdvMode = 3015, [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] - [ConflictingCombos(BRD_ST_SimpleMode)] + [ConflictingCombos(BRD_ST_AdvMode, BRD_ST_SimpleMode)] [CustomComboInfo("Heavy Shot into Straight Shot Feature", "Replaces Heavy Shot/Burst Shot with Straight Shot/Refulgent Arrow when procced.", BRD.JobID)] BRD_StraightShotUpgrade = 3001, @@ -647,12 +653,12 @@ public enum CustomComboPreset BRD_ApexST = 3034, [ReplaceSkill(BRD.IronJaws)] - [ConflictingCombos(BRD_IronJaws_Alternate)] + [ConflictingCombos(BRD_IronJaws_Alternate, BRD_ST_AdvMode, BRD_ST_SimpleMode)] [CustomComboInfo("Iron Jaws Feature", "Iron Jaws is replaced with Caustic Bite/Stormbite if one or both are not up.\nAlternates between the two if Iron Jaws isn't available.", BRD.JobID)] BRD_IronJaws = 3003, [ReplaceSkill(BRD.IronJaws)] - [ConflictingCombos(BRD_IronJaws)] + [ConflictingCombos(BRD_IronJaws, BRD_ST_AdvMode, BRD_ST_SimpleMode)] [CustomComboInfo("Iron Jaws Alternate Feature", "Iron Jaws is replaced with Caustic Bite/Stormbite if one or both are not up.\nIron Jaws will only show up when debuffs are about to expire.", BRD.JobID)] BRD_IronJaws_Alternate = 3004, @@ -661,7 +667,7 @@ public enum CustomComboPreset BRD_Apex = 3005, [ReplaceSkill(BRD.Bloodletter)] - [ConflictingCombos(BRD_ST_SimpleMode)] + [ConflictingCombos(BRD_ST_AdvMode, BRD_ST_SimpleMode)] [CustomComboInfo("Single Target oGCD Feature", "All oGCD's on Bloodletter/Heartbreakshot (+ Songs rotation) depending on their CD.", BRD.JobID)] BRD_ST_oGCD = 3006, @@ -675,13 +681,13 @@ public enum CustomComboPreset [CustomComboInfo("AoE Combo Feature", "Replaces Quick Nock/Ladonsbite with Shadowbite when ready.", BRD.JobID)] BRD_AoE_Combo = 3008, - [ParentCombo(BRD_ST_SimpleMode)] - [CustomComboInfo("Simple Bard DoTs Option", "This option will make Simple Bard apply DoTs if none are present on the target.", BRD.JobID)] - BRD_Simple_DoT = 3010, + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("Bard DoTs Option", "This option will make Bard apply DoTs if none are present on the target.", BRD.JobID)] + BRD_Adv_DoT = 3010, - [ParentCombo(BRD_ST_SimpleMode)] - [CustomComboInfo("Simple Bard Songs Option", "This option adds the Bard's Songs to the Simple Bard Feature.", BRD.JobID)] - BRD_Simple_Song = 3011, + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("Bard Songs Option", "This option adds the Bard's Songs to the Advanced Bard Feature.", BRD.JobID)] + BRD_Adv_Song = 3011, [ParentCombo(BRD_AoE_oGCD)] [CustomComboInfo("Songs Feature", "Adds Songs onto AoE oGCD Feature.", BRD.JobID)] @@ -699,23 +705,23 @@ public enum CustomComboPreset [CustomComboInfo("AoE Bard Song Option", "Weave Songs on the Advanced AoE.", BRD.JobID)] BRD_AoE_Adv_Songs = 3016, - [ParentCombo(BRD_ST_SimpleMode)] - [CustomComboInfo("Simple Buffs Option", "Adds buffs onto the Simple Bard feature.", BRD.JobID)] - BRD_Simple_Buffs = 3017, + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("Buffs Option", "Adds buffs onto the Advanced Bard feature.", BRD.JobID)] + BRD_Adv_Buffs = 3017, - [ParentCombo(BRD_Simple_Buffs)] - [CustomComboInfo("Simple Buffs - Radiant Option", "Adds Radiant Finale to the Simple Buffs feature.", BRD.JobID)] - BRD_Simple_BuffsRadiant = 3018, + [ParentCombo(BRD_Adv_Buffs)] + [CustomComboInfo("Buffs - Radiant Option", "Adds Radiant Finale to theBuffs feature.", BRD.JobID)] + BRD_Adv_BuffsRadiant = 3018, - [ParentCombo(BRD_ST_SimpleMode)] - [CustomComboInfo("Simple No Waste Option", "Adds enemy health checking on mobs for buffs, DoTs and Songs.\nThey will not be reapplied if less than specified.", BRD.JobID)] - BRD_Simple_NoWaste = 3019, + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("No Waste Option", "Adds enemy health checking on mobs for buffs, DoTs and Songs.\nThey will not be reapplied if less than specified.", BRD.JobID)] + BRD_Adv_NoWaste = 3019, - [ParentCombo(BRD_ST_SimpleMode)] - [CustomComboInfo("Simple Interrupt Option", "Uses interrupt during the rotation if applicable.", BRD.JobID)] - BRD_Simple_Interrupt = 3020, + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("Interrupt Option", "Uses interrupt during the rotation if applicable.", BRD.JobID)] + BRD_Adv_Interrupt = 3020, - [CustomComboInfo("Disable Apex Arrow Feature", "Removes Apex Arrow from Simple Bard and AoE Feature.", BRD.JobID)] + [CustomComboInfo("Disable Apex Arrow Feature", "Removes Apex Arrow from Adv Bard and AoE Feature.", BRD.JobID)] BRD_RemoveApexArrow = 3021, //[ConflictingCombos(BardoGCDSingleTargetFeature)] @@ -723,23 +729,23 @@ public enum CustomComboPreset //[CustomComboInfo("Simple Opener", "Adds the optimum opener to simple bard.\nThis conflicts with pretty much everything outside of simple bard options due to the nature of the opener.", BRD.JobID)] //BardSimpleOpener = 3022, - [ParentCombo(BRD_ST_SimpleMode)] - [CustomComboInfo("Simple Pooling Option", "Pools Bloodletter charges to allow for optimum burst phases, will also keep sidewinder in the buff window during wanderers.", BRD.JobID)] - BRD_Simple_Pooling = 3023, + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("Pooling Option", "Pools Bloodletter charges to allow for optimum burst phases, will also keep sidewinder in the buff window during wanderers.", BRD.JobID)] + BRD_Adv_Pooling = 3023, [ParentCombo(BRD_IronJaws)] [CustomComboInfo("Iron Jaws Apex Option", "Adds Apex and Blast Arrow to Iron Jaws when available.", BRD.JobID)] BRD_IronJawsApex = 3024, - [ParentCombo(BRD_ST_SimpleMode)] - [CustomComboInfo("Simple Raging Jaws Option", "Enable the snapshotting of DoTs, within the remaining time of Raging Strikes below:", BRD.JobID)] - BRD_Simple_RagingJaws = 3025, + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("Raging Jaws Option", "Enable the snapshotting of DoTs, within the remaining time of Raging Strikes below:", BRD.JobID)] + BRD_Adv_RagingJaws = 3025, //[ParentCombo(BRD_AoE_Simple_Songs)] //[CustomComboInfo("Exclude Wanderer's Minuet Option", "Dont use Wanderer's Minuet.", BRD.JobID)] //BRD_AoE_Simple_SongsExcludeWM = 3027, - [ParentCombo(BRD_ST_SimpleMode)] + [ParentCombo(BRD_ST_AdvMode)] [CustomComboInfo("Second Wind Option", "Uses Second Wind when below set HP percentage.", BRD.JobID)] BRD_ST_SecondWind = 3028, @@ -748,12 +754,12 @@ public enum CustomComboPreset BRD_AoE_SecondWind = 3029, [Variant] - [VariantParent(BRD_ST_SimpleMode, BRD_AoE_AdvMode)] + [VariantParent(BRD_ST_AdvMode, BRD_AoE_AdvMode)] [CustomComboInfo("Rampart Option", "Use Variant Rampart on cooldown.", BRD.JobID)] BRD_Variant_Rampart = 3030, [Variant] - [VariantParent(BRD_ST_SimpleMode, BRD_AoE_AdvMode)] + [VariantParent(BRD_ST_AdvMode, BRD_AoE_AdvMode)] [CustomComboInfo("Cure Option", "Use Variant Cure when HP is below set threshold.", BRD.JobID)] BRD_Variant_Cure = 3031, @@ -764,7 +770,7 @@ public enum CustomComboPreset [ParentCombo(BRD_AoE_AdvMode)] [CustomComboInfo("AoE No Waste Option", "Adds enemy health checking on targetted mob for songs.\nThey will not be reapplied if less than specified.", BRD.JobID)] BRD_AoE_Adv_NoWaste = 3033, - // Last value = 3034 + // Last value = 3036 #endregion diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index ab3674b10..be2e94811 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -574,9 +574,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } } - internal class BRD_ST_SimpleMode : CustomCombo + internal class BRD_ST_AdvMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.BRD_ST_SimpleMode; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.BRD_ST_AdvMode; internal static bool inOpener = false; internal static bool openerFinished = false; internal static byte step = 0; @@ -599,14 +599,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool songArmy = gauge.Song == Song.ARMY; bool canInterrupt = CanInterruptEnemy() && IsOffCooldown(All.HeadGraze); int targetHPThreshold = PluginConfiguration.GetCustomIntValue(Config.BRD_NoWasteHPPercentage); - bool isEnemyHealthHigh = !IsEnabled(CustomComboPreset.BRD_Simple_NoWaste) || GetTargetHPPercent() > targetHPThreshold; + bool isEnemyHealthHigh = !IsEnabled(CustomComboPreset.BRD_Adv_NoWaste) || GetTargetHPPercent() > targetHPThreshold; if (!InCombat() && (inOpener || openerFinished)) { openerFinished = false; } - if (IsEnabled(CustomComboPreset.BRD_Simple_Interrupt) && canInterrupt) + if (IsEnabled(CustomComboPreset.BRD_Adv_Interrupt) && canInterrupt) return All.HeadGraze; if (IsEnabled(CustomComboPreset.BRD_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.BRD_VariantCure)) @@ -618,7 +618,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim canWeave) return Variant.VariantRampart; - if (IsEnabled(CustomComboPreset.BRD_Simple_Song) && isEnemyHealthHigh) + if (IsEnabled(CustomComboPreset.BRD_Adv_Song) && isEnemyHealthHigh) { int songTimerInSeconds = gauge.SongTimer / 1000; @@ -687,7 +687,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - if (IsEnabled(CustomComboPreset.BRD_Simple_Buffs) && (!songNone || !LevelChecked(MagesBallad)) && isEnemyHealthHigh) + if (IsEnabled(CustomComboPreset.BRD_Adv_Buffs) && (!songNone || !LevelChecked(MagesBallad)) && isEnemyHealthHigh) { bool radiantReady = LevelChecked(RadiantFinale) && IsOffCooldown(RadiantFinale); bool ragingReady = LevelChecked(RagingStrikes) && IsOffCooldown(RagingStrikes); @@ -696,7 +696,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); float ragingCD = GetCooldownRemainingTime(RagingStrikes); - if (canWeaveDelayed && IsEnabled(CustomComboPreset.BRD_Simple_BuffsRadiant) && radiantReady && + if (canWeaveDelayed && IsEnabled(CustomComboPreset.BRD_Adv_BuffsRadiant) && radiantReady && (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) return RadiantFinale; @@ -735,7 +735,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (ActionReady(Sidewinder)) { - if (IsEnabled(CustomComboPreset.BRD_Simple_Pooling)) + if (IsEnabled(CustomComboPreset.BRD_Adv_Pooling)) { if (songWanderer) { @@ -755,7 +755,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { uint bloodletterCharges = GetRemainingCharges(Bloodletter); - if (IsEnabled(CustomComboPreset.BRD_Simple_Pooling) && LevelChecked(WanderersMinuet)) + if (IsEnabled(CustomComboPreset.BRD_Adv_Pooling) && LevelChecked(WanderersMinuet)) { if (songWanderer) { @@ -814,9 +814,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return (windbite && windRemaining < duration) || (stormbite && stormRemaining < duration); }; - if (IsEnabled(CustomComboPreset.BRD_Simple_DoT)) + if (IsEnabled(CustomComboPreset.BRD_Adv_DoT)) { - if (ActionReady(IronJaws) && IsEnabled(CustomComboPreset.BRD_Simple_RagingJaws) && HasEffect(Buffs.RagingStrikes) && + if (ActionReady(IronJaws) && IsEnabled(CustomComboPreset.BRD_Adv_RagingJaws) && HasEffect(Buffs.RagingStrikes) && !WasLastAction(IronJaws) && ragingStrikesDuration < ragingJawsRenewTime && poisonRecast(40) && windRecast(40)) { openerFinished = true; @@ -1130,5 +1130,302 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } } + internal class BRD_ST_SimpleMode : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.BRD_ST_SimpleMode; + internal static bool inOpener = false; + internal static bool openerFinished = false; + internal static byte step = 0; + internal static byte subStep = 0; + internal static bool usedStraightShotReady = false; + internal static bool usedPitchPerfect = false; + internal delegate bool DotRecast(int value); + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (actionID is HeavyShot or BurstShot) + { + BRDGauge? gauge = GetJobGauge(); + bool canWeave = CanWeave(actionID); + bool canWeaveBuffs = CanWeave(actionID, 0.6); + bool canWeaveDelayed = CanDelayedWeave(actionID, 0.9); + bool songNone = gauge.Song == Song.NONE; + bool songWanderer = gauge.Song == Song.WANDERER; + bool songMage = gauge.Song == Song.MAGE; + bool songArmy = gauge.Song == Song.ARMY; + bool canInterrupt = CanInterruptEnemy() && IsOffCooldown(All.HeadGraze); + bool isEnemyHealthHigh = GetTargetHPPercent() > 5; + + if (!InCombat() && (inOpener || openerFinished)) + { + openerFinished = false; + } + + if (canInterrupt) + return All.HeadGraze; + + if (IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= 50) + return Variant.VariantCure; + + if (IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart) && + canWeave) + return Variant.VariantRampart; + + if (isEnemyHealthHigh) + { + int songTimerInSeconds = gauge.SongTimer / 1000; + + // Limit optimisation to when you are high enough level to benefit from it. + if (LevelChecked(WanderersMinuet)) + { + // 43s of Wanderer's Minute, ~36s of Mage's Ballad, and ~43s of Army's Paeon + bool minuetReady = IsOffCooldown(WanderersMinuet); + bool balladReady = IsOffCooldown(MagesBallad); + bool paeonReady = IsOffCooldown(ArmysPaeon); + + if (ActionReady(EmpyrealArrow) && JustUsed(WanderersMinuet)) + return EmpyrealArrow; + + if (canWeave) + { + if (songNone) + { + // Logic to determine first song + if (minuetReady && !(JustUsed(MagesBallad) || JustUsed(ArmysPaeon))) + return WanderersMinuet; + if (balladReady && !(JustUsed(WanderersMinuet) || JustUsed(ArmysPaeon))) + return MagesBallad; + if (paeonReady && !(JustUsed(MagesBallad) || JustUsed(WanderersMinuet))) + return ArmysPaeon; + } + + if (songWanderer) + { + if (songTimerInSeconds <= 3 && gauge.Repertoire > 0) // Spend any repertoire before switching to next song + return OriginalHook(PitchPerfect); + if (songTimerInSeconds <= 3 && balladReady) // Move to Mage's Ballad if <= 3 seconds left on song + return MagesBallad; + } + + if (songMage) + { + + // Move to Army's Paeon if <= 3 seconds left on song + if (songTimerInSeconds <= 3 && paeonReady) + { + // Special case for Empyreal Arrow: it must be cast before you change to it to avoid drift! + if (ActionReady(EmpyrealArrow)) + return EmpyrealArrow; + return ArmysPaeon; + } + } + } + + if (songArmy && canWeaveDelayed) + { + // Move to Wanderer's Minuet if <= 12 seconds left on song or WM off CD and have 4 repertoires of AP + if (songTimerInSeconds <= 12 || (minuetReady && gauge.Repertoire == 4)) + return WanderersMinuet; + } + } + else if (songTimerInSeconds <= 3 && canWeave) + { + bool balladReady = LevelChecked(MagesBallad) && IsOffCooldown(MagesBallad); + bool paeonReady = LevelChecked(ArmysPaeon) && IsOffCooldown(ArmysPaeon); + + if (balladReady) + return MagesBallad; + if (paeonReady) + return ArmysPaeon; + } + } + + if ((!songNone || !LevelChecked(MagesBallad)) && isEnemyHealthHigh) + { + bool radiantReady = LevelChecked(RadiantFinale) && IsOffCooldown(RadiantFinale); + bool ragingReady = LevelChecked(RagingStrikes) && IsOffCooldown(RagingStrikes); + bool battleVoiceReady = LevelChecked(BattleVoice) && IsOffCooldown(BattleVoice); + bool barrageReady = LevelChecked(Barrage) && IsOffCooldown(Barrage); + float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); + float ragingCD = GetCooldownRemainingTime(RagingStrikes); + + if (canWeaveDelayed && radiantReady && + (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) + && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) + return RadiantFinale; + + if (canWeaveBuffs && battleVoiceReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + return BattleVoice; + + if (canWeaveBuffs && ragingReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) + return RagingStrikes; + + //removed requirement to not have hawks eye, it is better to maybe lose 60 potency than allow it to drift a 1000 potency gain out of the window + if (canWeaveBuffs && barrageReady && HasEffect(Buffs.RagingStrikes)) + { + if (LevelChecked(RadiantFinale) && HasEffect(Buffs.RadiantFinale)) + return Barrage; + else if (LevelChecked(BattleVoice) && HasEffect(Buffs.BattleVoice)) + return Barrage; + else if (!LevelChecked(BattleVoice) && HasEffect(Buffs.RagingStrikes)) + return Barrage; + } + } + + if (canWeave) + { + float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); + float empyrealCD = GetCooldownRemainingTime(EmpyrealArrow); + float ragingCD = GetCooldownRemainingTime(RagingStrikes); + float radiantCD = GetCooldownRemainingTime(RadiantFinale); + + if (ActionReady(EmpyrealArrow)) + return EmpyrealArrow; + + if (LevelChecked(PitchPerfect) && songWanderer && + (gauge.Repertoire == 3 || (gauge.Repertoire == 2 && empyrealCD < 2))) + return OriginalHook(PitchPerfect); + + if (ActionReady(Sidewinder)) + { + if (songWanderer) + { + if ((HasEffect(Buffs.RagingStrikes) || ragingCD > 10) && + (HasEffect(Buffs.BattleVoice) || battleVoiceCD > 10) && + (HasEffect(Buffs.RadiantFinale) || radiantCD > 10 || + !LevelChecked(RadiantFinale))) + return Sidewinder; + } + else return Sidewinder; + } + + + if (ActionReady(Bloodletter) && (empyrealCD > 1 || !LevelChecked(EmpyrealArrow))) + { + uint bloodletterCharges = GetRemainingCharges(Bloodletter); + + if (LevelChecked(WanderersMinuet)) + { + if (songWanderer) + { + if (((HasEffect(Buffs.RagingStrikes) || ragingCD > 10) && + (HasEffect(Buffs.BattleVoice) || battleVoiceCD > 10 || + !LevelChecked(BattleVoice)) && + (HasEffect(Buffs.RadiantFinale) || radiantCD > 10 || + !LevelChecked(RadiantFinale)) && + bloodletterCharges > 0) || bloodletterCharges > 2) + return OriginalHook(Bloodletter); + } + + if (songArmy && (bloodletterCharges == 3 || ((gauge.SongTimer / 1000) > 30 && bloodletterCharges > 0))) + return OriginalHook(Bloodletter); + if (songMage && bloodletterCharges > 0) + return OriginalHook(Bloodletter); + if (songNone && bloodletterCharges == 3) + return OriginalHook(Bloodletter); + } + else if (bloodletterCharges > 0) + return OriginalHook(Bloodletter); + } + + // healing - please move if not appropriate priority + + if (PlayerHealthPercentageHp() <= 40 && ActionReady(All.SecondWind)) + return All.SecondWind; + + } + + //Moved below weaves bc roobert says it is blocking his weaves from happening + if (HasEffect(Buffs.RadiantEncoreReady) && !JustUsed(RadiantFinale) && GetCooldownElapsed(BattleVoice) >= 4.2f) + return OriginalHook(RadiantEncore); + + if (isEnemyHealthHigh) + { + bool venomous = TargetHasEffect(Debuffs.VenomousBite); + bool windbite = TargetHasEffect(Debuffs.Windbite); + bool caustic = TargetHasEffect(Debuffs.CausticBite); + bool stormbite = TargetHasEffect(Debuffs.Stormbite); + float venomRemaining = GetDebuffRemainingTime(Debuffs.VenomousBite); + float windRemaining = GetDebuffRemainingTime(Debuffs.Windbite); + float causticRemaining = GetDebuffRemainingTime(Debuffs.CausticBite); + float stormRemaining = GetDebuffRemainingTime(Debuffs.Stormbite); + float ragingStrikesDuration = GetBuffRemainingTime(Buffs.RagingStrikes); + float radiantFinaleDuration = GetBuffRemainingTime(Buffs.RadiantFinale); + int ragingJawsRenewTime = 5; + + DotRecast poisonRecast = delegate (int duration) + { + return (venomous && venomRemaining < duration) || (caustic && causticRemaining < duration); + }; + + DotRecast windRecast = delegate (int duration) + { + return (windbite && windRemaining < duration) || (stormbite && stormRemaining < duration); + }; + + if (ActionReady(IronJaws) && HasEffect(Buffs.RagingStrikes) && + !WasLastAction(IronJaws) && ragingStrikesDuration < ragingJawsRenewTime && poisonRecast(40) && windRecast(40)) + { + openerFinished = true; + return IronJaws; + } + + if (LevelChecked(Stormbite) && !stormbite) + return Stormbite; + if (LevelChecked(CausticBite) && !caustic) + return CausticBite; + if (LevelChecked(Windbite) && !windbite && !LevelChecked(Stormbite)) + return Windbite; + if (LevelChecked(VenomousBite) && !venomous && !LevelChecked(CausticBite)) + return VenomousBite; + + if (ActionReady(IronJaws) && poisonRecast(4) && windRecast(4)) + { + openerFinished = true; + return IronJaws; + } + if (!LevelChecked(IronJaws)) + { + if (windbite && windRemaining < 4) + { + openerFinished = true; + return Windbite; + } + + if (venomous && venomRemaining < 4) + { + openerFinished = true; + return VenomousBite; + } + } + + } + + if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) + return BlastArrow; + + if (LevelChecked(ApexArrow)) + { + int songTimerInSeconds = gauge.SongTimer / 1000; + + if (songMage && gauge.SoulVoice == 100) + return ApexArrow; + if (songMage && gauge.SoulVoice >= 80 && + songTimerInSeconds > 18 && songTimerInSeconds < 22) + return ApexArrow; + if (songWanderer && HasEffect(Buffs.RagingStrikes) && HasEffect(Buffs.BattleVoice) && + (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale)) && gauge.SoulVoice >= 80) + return ApexArrow; + } + if (HasEffect(Buffs.HawksEye) || HasEffect(Buffs.Barrage)) + return OriginalHook(StraightShot); + + if (HasEffect(Buffs.ResonantArrowReady)) + return ResonantArrow; + } + return actionID; + } + } } } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index 83838f432..b36fb1f7e 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1423,10 +1423,10 @@ internal static void Draw(CustomComboPreset preset, bool enabled) // ==================================================================================== #region BARD - if (preset == CustomComboPreset.BRD_Simple_RagingJaws) + if (preset == CustomComboPreset.BRD_Adv_RagingJaws) UserConfig.DrawSliderInt(3, 5, BRD.Config.BRD_RagingJawsRenewTime, "Remaining time (In seconds)"); - if (preset == CustomComboPreset.BRD_Simple_NoWaste) + if (preset == CustomComboPreset.BRD_Adv_NoWaste) UserConfig.DrawSliderInt(1, 10, BRD.Config.BRD_NoWasteHPPercentage, "Remaining target HP percentage"); if (preset == CustomComboPreset.BRD_AoE_Adv_NoWaste) From 54125f9da589a9958bbdc00492e4956d6715d733 Mon Sep 17 00:00:00 2001 From: edewen Date: Sun, 11 Aug 2024 15:33:38 -0400 Subject: [PATCH 057/142] Drift reduction Added a second to radiant going before the other buffs to reduce overall drift. 14 seconds in 12 mins, to 9 seconds in 12 mins. --- XIVSlothCombo/Combos/PvE/BRD.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index be2e94811..a4841b2cf 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -396,7 +396,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (canWeaveDelayed && ActionReady(RadiantFinale) && (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) - && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) + && (battleVoiceCD < 3 || ActionReady(BattleVoice)) && (ragingCD < 3 || ActionReady(RagingStrikes))) return RadiantFinale; if (canWeaveBuffs && ActionReady(BattleVoice) && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) @@ -698,7 +698,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (canWeaveDelayed && IsEnabled(CustomComboPreset.BRD_Adv_BuffsRadiant) && radiantReady && (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) - && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) + && (battleVoiceCD < 3 || ActionReady(BattleVoice)) && (ragingCD < 3 || ActionReady(RagingStrikes))) return RadiantFinale; if (canWeaveBuffs && battleVoiceReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) @@ -1022,7 +1022,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (canWeaveDelayed && ActionReady(RadiantFinale) && (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) - && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) + && (battleVoiceCD < 3 || ActionReady(BattleVoice)) && (ragingCD < 3 || ActionReady(RagingStrikes))) return RadiantFinale; if (canWeaveBuffs && ActionReady(BattleVoice) && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) @@ -1252,7 +1252,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (canWeaveDelayed && radiantReady && (Array.TrueForAll(gauge.Coda, SongIsNotNone) || Array.Exists(gauge.Coda, SongIsWandererMinuet)) - && (battleVoiceCD < 2 || ActionReady(BattleVoice)) && (ragingCD < 2 || ActionReady(RagingStrikes))) + && (battleVoiceCD < 3 || ActionReady(BattleVoice)) && (ragingCD < 3 || ActionReady(RagingStrikes))) return RadiantFinale; if (canWeaveBuffs && battleVoiceReady && (HasEffect(Buffs.RadiantFinale) || !LevelChecked(RadiantFinale))) From 72071cd96b5957274381a4883e3a7158a90b1ce0 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Mon, 12 Aug 2024 09:03:34 +0100 Subject: [PATCH 058/142] Re-added variant cure/rampart --- XIVSlothCombo/Combos/CustomComboPreset.cs | 18 ++++++++++++++ XIVSlothCombo/Combos/PvE/MNK.cs | 25 +++++++++++++++++++- XIVSlothCombo/Window/Functions/UserConfig.cs | 3 +++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index c4c55c000..599e8a0f9 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1903,6 +1903,8 @@ public enum CustomComboPreset #endregion + #region Monk Beast Chakras + [ConflictingCombos(MNK_ST_AdvancedMode, MNK_ST_SimpleMode)] [CustomComboInfo("Beast Chakra Handlers", "Merge single target GCDs which share the same beast chakra", MNK.JobID)] MNK_ST_BeastChakras = 9019, @@ -1922,6 +1924,8 @@ public enum CustomComboPreset [ParentCombo(MNK_ST_BeastChakras)] MNK_BC_COEURL = 9022, + #endregion + [ReplaceSkill(MNK.PerfectBalance)] [CustomComboInfo("Perfect Balance Feature", "Perfect Balance becomes Masterful Blitz while you have 3 Beast Chakra.", MNK.JobID)] MNK_PerfectBalance = 9023, @@ -1930,6 +1934,20 @@ public enum CustomComboPreset [CustomComboInfo("Riddle of Fire/Brotherhood Feature", "Replaces Riddle of Fire with Brotherhood when Riddle of Fire is on cooldown.", MNK.JobID)] MNK_Riddle_Brotherhood = 9024, + #region Variant + + [Variant] + [VariantParent(MNK_ST_AdvancedMode, MNK_AOE_SimpleMode)] + [CustomComboInfo("Rampart Option", "Use Variant Rampart on cooldown.", MNK.JobID)] + MNK_Variant_Rampart = 9025, + + [Variant] + [VariantParent(MNK_ST_AdvancedMode, MNK_AOE_SimpleMode)] + [CustomComboInfo("Cure Option", "Use Variant Cure when HP is below set threshold.", MNK.JobID)] + MNK_Variant_Cure = 9026, + + #endregion + // End Monk #endregion diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index bdac95d33..f0e9b1c05 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -110,7 +110,8 @@ public static UserInt MNK_ST_Bloodbath_Threshold = new("MNK_ST_BloodbathThreshold", 40), MNK_AoE_SecondWind_Threshold = new("MNK_AoE_SecondWindThreshold", 25), MNK_AoE_Bloodbath_Threshold = new("MNK_AoE_BloodbathThreshold", 40), - MNK_SelectedOpener = new("MNK_SelectedOpener"); + MNK_SelectedOpener = new("MNK_SelectedOpener"), + MNK_VariantCure = new("MNK_Variant_Cure"); } internal class MNK_ST_SimpleMode : CustomCombo @@ -128,6 +129,11 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (MNKOpener.DoFullOpener(ref actionID, Config.MNK_SelectedOpener)) return actionID; + + if (IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= Config.MNK_VariantCure) + return Variant.VariantCure; + if ((!inCombat || !InMeleeRange()) && Gauge.Chakra < 5 && !HasEffect(Buffs.RiddleOfFire) @@ -139,6 +145,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // OGCDs if (inCombat && canWeave) { + if (IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart)) + return Variant.VariantRampart; + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance)) { if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) @@ -298,9 +308,17 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(Meditation); } + if (IsEnabled(CustomComboPreset.MNK_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.MNK_VariantCure)) + return Variant.VariantCure; + // OGCDs if (inCombat && canWeave) { + if (IsEnabled(CustomComboPreset.MNK_Variant_Rampart) && + IsEnabled(Variant.VariantRampart) && + IsOffCooldown(Variant.VariantRampart)) + return Variant.VariantRampart; + if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) @@ -469,9 +487,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + + if (IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.MNK_VariantCure)) + return Variant.VariantCure; + // Buffs if (inCombat && canWeave) { + if (IsEnabled(Variant.VariantRampart) && IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index 7eda34f72..cb0eef217 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1627,6 +1627,9 @@ internal static void Draw(CustomComboPreset preset, bool enabled) UserConfig.DrawHorizontalRadioButton(MNK.Config.MNK_SelectedOpener, "Solar Lunar", "Uses Solar/Lunar opener", 2); } + if (preset == CustomComboPreset.MNK_Variant_Cure) + UserConfig.DrawSliderInt(1, 100, MNK.Config.MNK_VariantCure, "HP% to be at or under", 200); + #endregion // ==================================================================================== #region NINJA From e4af48bcd3c8e2cfe3e451f77adcc078a47e279d Mon Sep 17 00:00:00 2001 From: nik potokar Date: Mon, 12 Aug 2024 18:41:36 +0200 Subject: [PATCH 059/142] PCT --- XIVSlothCombo/Combos/CustomComboPreset.cs | 244 ++++++++++++- XIVSlothCombo/Combos/JobHelpers/PCT.cs | 228 +++++++++++++ XIVSlothCombo/Combos/PvE/PCT.cs | 340 ++++++++++++++++++- XIVSlothCombo/Window/Functions/UserConfig.cs | 9 + 4 files changed, 814 insertions(+), 7 deletions(-) create mode 100644 XIVSlothCombo/Combos/JobHelpers/PCT.cs diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..e28bd0993 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2332,29 +2332,263 @@ public enum CustomComboPreset #endregion #region PICTOMANCER + + #region Single Target [ReplaceSkill(PCT.FireInRed)] [ConflictingCombos(CombinedAetherhues)] - [CustomComboInfo("Simple Mode - Single Target", $"Replaces Fire in Red with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", PCT.JobID)] + [CustomComboInfo("Simple Mode - Single Target", "Consolidates the single target rotation into one button, ideal for newcomers.", PCT.JobID)] PCT_ST_SimpleMode = 20000, [ReplaceSkill(PCT.FireIIinRed)] [ConflictingCombos(CombinedAetherhues)] - [CustomComboInfo("Simple Mode - AoE", $"Replaces Fire II in Red with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", PCT.JobID)] + [CustomComboInfo("Simple Mode - AoE", "Consolidates the AoE rotation into one button, ideal for newcomers.", PCT.JobID)] PCT_AoE_SimpleMode = 20001, [ReplaceSkill(PCT.FireInRed, PCT.FireIIinRed)] [ConflictingCombos(PCT_ST_SimpleMode, PCT_AoE_SimpleMode)] - [CustomComboInfo("Combined Aetherhues Feature", "Combines aetherhue actions onto one button for their respective target types.", PCT.JobID)] + [CustomComboInfo("Combined Aetherhues Feature", "Merges aetherhue actions for specific target types into a single button.", PCT.JobID)] CombinedAetherhues = 20002, [ReplaceSkill(PCT.CreatureMotif, PCT.WeaponMotif, PCT.LandscapeMotif)] - [CustomComboInfo("One Button Motifs", "Combine Motifs and Muses into one button.", PCT.JobID)] + [CustomComboInfo("One Button Motifs", "Merges Motifs and Muses into a single button.", PCT.JobID)] CombinedMotifs = 20003, [ReplaceSkill(PCT.HolyInWhite)] - [CustomComboInfo("One Button Paint", "Combines paint consuming actions into one button.", PCT.JobID)] + [CustomComboInfo("One Button Paint", "Consolidates paint-consuming actions into one button.", PCT.JobID)] CombinedPaint = 20004, + [ReplaceSkill(PCT.FireInRed)] + [ConflictingCombos(CombinedAetherhues, PCT_ST_SimpleMode)] + [CustomComboInfo("Advanced Mode - Single Target", $"Replaces Fire in Red with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", PCT.JobID)] + PCT_ST_AdvancedMode = 20005, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Lvl 100 Opener Option", $"Uses the Balance Opener.", PCT.JobID)] + PCT_ST_Advanced_Openers = 20006, + + [ParentCombo(PCT_ST_AdvancedMode)] + [ReplaceSkill(PCT.FireInRed, PCT.AeroInGreen, PCT.WaterinBlue)] + [CustomComboInfo("Prepull Motifs", "Adds missing Motifs to the combo while out of combat or while no target is present in combat.", PCT.JobID)] + PCT_ST_AdvancedMode_PrePullMotifs = 20007, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Starry Muse Burst Feature", $"Adds selected spells below to the burst phase.", PCT.JobID)] + PCT_ST_AdvancedMode_Burst_Phase = 20008, + + [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the burst phase.", PCT.JobID)] + PCT_ST_AdvancedMode_Burst_CometInBlack = 20009, + + [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Star Prism Option", $"Adds Star Prism to the burst phase.", PCT.JobID)] + PCT_ST_AdvancedMode_Burst_StarPrism = 20010, + + [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Rainbow Drip Option", $"Adds Rainbow Drip to the burst phase.", PCT.JobID)] + PCT_ST_AdvancedMode_Burst_RainbowDrip = 20011, + + [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp Combo to the burst phase.", PCT.JobID)] + PCT_ST_AdvancedMode_Burst_HammerCombo = 20012, + + [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Blizzard in Cyan Option", $"Adds Blizzard in Cyan to the burst phase.", PCT.JobID)] + PCT_ST_AdvancedMode_Burst_BlizzardInCyan = 20013, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Motif Selection Feature", $"Add Selected Motifs to the combo.", PCT.JobID)] + PCT_ST_AdvancedMode_MotifFeature = 20014, + + [ParentCombo(PCT_ST_AdvancedMode_MotifFeature)] + [CustomComboInfo("Landscape Motif Option", $"Adds Landscape Motif.", PCT.JobID)] + PCT_ST_AdvancedMode_LandscapeMotif = 20015, + + [ParentCombo(PCT_ST_AdvancedMode_MotifFeature)] + [CustomComboInfo("Creature Motif Option", $"Adds Landscape Motif.", PCT.JobID)] + PCT_ST_AdvancedMode_CreatureMotif = 20016, + + [ParentCombo(PCT_ST_AdvancedMode_MotifFeature)] + [CustomComboInfo("Weapon Motif Option", $"Adds Weapon Motif.", PCT.JobID)] + PCT_ST_AdvancedMode_WeaponMotif = 20017, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Muse Selection Feature", $"Adds Selected Muses to the combo.", PCT.JobID)] + PCT_ST_AdvancedMode_MuseFeature = 20018, + + [ParentCombo(PCT_ST_AdvancedMode_MuseFeature)] + [CustomComboInfo("Scenic Muse Option", $"Adds Scenic Muse.", PCT.JobID)] + PCT_ST_AdvancedMode_ScenicMuse = 20019, + + [ParentCombo(PCT_ST_AdvancedMode_MuseFeature)] + [CustomComboInfo("Living Muse Option", $"Adds Living Muse.", PCT.JobID)] + PCT_ST_AdvancedMode_LivingMuse = 20020, + + [ParentCombo(PCT_ST_AdvancedMode_MuseFeature)] + [CustomComboInfo("Steel Muse Option", $"Adds Steel Muse.", PCT.JobID)] + PCT_ST_AdvancedMode_SteelMuse = 20021, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Mog/Madeen Feature", $"Adds Mog/Madeen to the combo.", PCT.JobID)] + PCT_ST_AdvancedMode_MogOfTheAges = 20022, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Subtractive Palette Feature", $"Adds Subtractive Palette to the combo.", PCT.JobID)] + PCT_ST_AdvancedMode_SubtractivePalette = 20023, + + //Pooling option to be added - 20024 + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the combo.", PCT.JobID)] + PCT_ST_AdvancedMode_CometinBlack = 20025, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp combo.", PCT.JobID)] + PCT_ST_AdvancedMode_HammerStampCombo = 20026, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Movement Features", $"Adds selected features to the combo while moving.", PCT.JobID)] + PCT_ST_AdvancedMode_MovementFeature = 20027, + + [ParentCombo(PCT_ST_AdvancedMode_MovementFeature)] + [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp Combo to the combo while moving.", PCT.JobID)] + PCT_ST_AdvancedMode_MovementOption_HammerStampCombo = 20028, + + [ParentCombo(PCT_ST_AdvancedMode_MovementFeature)] + [CustomComboInfo("Holy in White Option", $"Adds Holy in White to the combo while moving.", PCT.JobID)] + PCT_ST_AdvancedMode_MovementOption_HolyInWhite = 20029, + + [ParentCombo(PCT_ST_AdvancedMode_MovementFeature)] + [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the combo while moving.", PCT.JobID)] + PCT_ST_AdvancedMode_MovementOption_CometinBlack = 20030, + + [ParentCombo(PCT_ST_AdvancedMode_MovementFeature)] + [CustomComboInfo("Swiftcast Option ", $"Adds Swiftcast to the combo while moving.", PCT.JobID)] + PCT_ST_AdvancedMode_SwitfcastOption = 20031, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Blizzard in Cyan Option", $"Adds Blizzard in Cyan to the combo.", PCT.JobID)] + PCT_ST_AdvancedMode_BlizzardInCyan = 20032, + + [ParentCombo(PCT_ST_AdvancedMode)] + [CustomComboInfo("Lucid Dreaming Option", $"Adds Lucid Dreaming to the combo.", PCT.JobID)] + PCT_ST_AdvancedMode_LucidDreaming = 20033, + + // Last value for ST = 20033 + #endregion + + [ReplaceSkill(PCT.FireIIinRed)] + [ConflictingCombos(CombinedAetherhues, PCT_AoE_SimpleMode)] + [CustomComboInfo("Advanced Mode - AoE", $"Replaces Fire II in Red with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", PCT.JobID)] + PCT_AoE_AdvancedMode = 20040, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [ReplaceSkill(PCT.FireIIinRed)] + [CustomComboInfo("Prepull Motifs", "Adds missing Motifs to the combo while out of combat or while no target is present in combat.", PCT.JobID)] + PCT_AoE_AdvancedMode_PrePullMotifs = 20041, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Starry Muse Burst Feature", $"Adds selected spells below to the burst phase.", PCT.JobID)] + PCT_AoE_AdvancedMode_Burst_Phase = 20042, + + [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the burst phase.", PCT.JobID)] + PCT_AoE_AdvancedMode_Burst_CometInBlack = 20043, + + [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Star Prism Option", $"Adds Star Prism to the burst phase.", PCT.JobID)] + PCT_AoE_AdvancedMode_Burst_StarPrism = 20044, + + [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Rainbow Drip Option", $"Adds Rainbow Drip to the burst phase.", PCT.JobID)] + PCT_AoE_AdvancedMode_Burst_RainbowDrip = 20045, + + [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp Combo to the burst phase.", PCT.JobID)] + PCT_AoE_AdvancedMode_Burst_HammerCombo = 20046, + + [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] + [CustomComboInfo("Blizzard in Cyan Option", $"Adds Blizzard in Cyan to the burst phase.", PCT.JobID)] + PCT_AoE_AdvancedMode_Burst_BlizzardInCyan = 20047, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Motif Selection Feature", $"Add Selected Motifs to the combo.", PCT.JobID)] + PCT_AoE_AdvancedMode_MotifFeature = 20048, + + [ParentCombo(PCT_AoE_AdvancedMode_MotifFeature)] + [CustomComboInfo("Landscape Motif Option", $"Adds Landscape Motif.", PCT.JobID)] + PCT_AoE_AdvancedMode_LandscapeMotif = 20049, + + [ParentCombo(PCT_AoE_AdvancedMode_MotifFeature)] + [CustomComboInfo("Creature Motif Option", $"Adds Landscape Motif.", PCT.JobID)] + PCT_AoE_AdvancedMode_CreatureMotif = 20050, + + [ParentCombo(PCT_AoE_AdvancedMode_MotifFeature)] + [CustomComboInfo("Weapon Motif Option", $"Adds Weapon Motif.", PCT.JobID)] + PCT_AoE_AdvancedMode_WeaponMotif = 20051, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Muse Selection Feature", $"Adds Selected Muses to the combo.", PCT.JobID)] + PCT_AoE_AdvancedMode_MuseFeature = 20052, + + [ParentCombo(PCT_AoE_AdvancedMode_MuseFeature)] + [CustomComboInfo("Scenic Muse Option", $"Adds Scenic Muse.", PCT.JobID)] + PCT_AoE_AdvancedMode_ScenicMuse = 20053, + + [ParentCombo(PCT_AoE_AdvancedMode_MuseFeature)] + [CustomComboInfo("Living Muse Option", $"Adds Living Muse.", PCT.JobID)] + PCT_AoE_AdvancedMode_LivingMuse = 20054, + + [ParentCombo(PCT_AoE_AdvancedMode_MuseFeature)] + [CustomComboInfo("Steel Muse Option", $"Adds Steel Muse.", PCT.JobID)] + PCT_AoE_AdvancedMode_SteelMuse = 20055, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Mog/Madeen Feature", $"Adds Mog/Madeen to the combo.", PCT.JobID)] + PCT_AoE_AdvancedMode_MogOfTheAges = 20056, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Subtractive Palette Feature", $"Adds Subtractive Palette to the combo.", PCT.JobID)] + PCT_AoE_AdvancedMode_SubtractivePalette = 20057, + + // Pooling Option to be added - 20058 + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Comet in Black Feature", $"Adds Comet in Black to the combo.", PCT.JobID)] + PCT_AoE_AdvancedMode_CometinBlack = 20059, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Hammer Stamp Combo Feature", $"Adds Hammer Stamp combo.", PCT.JobID)] + PCT_AoE_AdvancedMode_HammerStampCombo = 20060, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Movement Features", $"Adds selected features to the combo while moving.", PCT.JobID)] + PCT_AoE_AdvancedMode_MovementFeature = 20061, + + [ParentCombo(PCT_AoE_AdvancedMode_MovementFeature)] + [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp Combo to the combo while moving.", PCT.JobID)] + PCT_AoE_AdvancedMode_MovementOption_HammerStampCombo = 20062, + + [ParentCombo(PCT_AoE_AdvancedMode_MovementFeature)] + [CustomComboInfo("Holy in White Option", $"Adds Holy in White to the combo while moving.", PCT.JobID)] + PCT_AoE_AdvancedMode_MovementOption_HolyInWhite = 20063, + + [ParentCombo(PCT_AoE_AdvancedMode_MovementFeature)] + [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the combo while moving.", PCT.JobID)] + PCT_AoE_AdvancedMode_MovementOption_CometinBlack = 20064, + + [ParentCombo(PCT_AoE_AdvancedMode_MovementFeature)] + [CustomComboInfo("Swiftcast Option ", $"Adds Swiftcast to the combo while moving.", PCT.JobID)] + PCT_AoE_AdvancedMode_SwitfcastOption = 20065, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Blizzard in Cyan Option", $"Adds Blizzard in Cyan to the combo.", PCT.JobID)] + PCT_AoE_AdvancedMode_BlizzardInCyan = 20066, + + [ParentCombo(PCT_AoE_AdvancedMode)] + [CustomComboInfo("Lucid Dreaming Option", $"Adds Lucid Dreaming to the combo.", PCT.JobID)] + PCT_AoE_AdvancedMode_LucidDreaming = 20067, + + // Last value for AoE = 20067 #endregion #region PALADIN diff --git a/XIVSlothCombo/Combos/JobHelpers/PCT.cs b/XIVSlothCombo/Combos/JobHelpers/PCT.cs new file mode 100644 index 000000000..1d96f81ac --- /dev/null +++ b/XIVSlothCombo/Combos/JobHelpers/PCT.cs @@ -0,0 +1,228 @@ +using Dalamud.Game.ClientState.JobGauge.Types; +using ECommons.DalamudServices; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using XIVSlothCombo.Combos.JobHelpers.Enums; +using XIVSlothCombo.Combos.PvE; +using XIVSlothCombo.CustomComboNS.Functions; +using XIVSlothCombo.Data; + +namespace XIVSlothCombo.Combos.JobHelpers +{ + internal class PCTOpenerLogic : PCT + { + private static bool HasCooldowns() + { + if (!CustomComboFunctions.ActionReady(StarryMuse)) + return false; + + if (CustomComboFunctions.GetRemainingCharges(LivingMuse) < 3) + return false; + + if (CustomComboFunctions.GetRemainingCharges(SteelMuse) < 2) + return false; + return true; + } + private static bool HasMotifs() + { + var gauge = CustomComboFunctions.GetJobGauge(); + + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Pom)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Weapon)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) + return false; + return true; + } + + private static uint OpenerLevel => 100; + + public uint PrePullStep = 0; + + public uint OpenerStep = 0; + + public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + + private static bool CanOpener => HasCooldowns() && HasMotifs() && LevelChecked; + + private OpenerState currentState = OpenerState.PrePull; + + public OpenerState CurrentState + { + get + { + return currentState; + } + set + { + if (value != currentState) + { + if (value == OpenerState.PrePull) + { + Svc.Log.Debug($"Entered PrePull Opener"); + } + if (value == OpenerState.InOpener) OpenerStep = 1; + if (value == OpenerState.OpenerFinished || value == OpenerState.FailedOpener) + { + if (value == OpenerState.FailedOpener) + Svc.Log.Information($"Opener Failed at step {OpenerStep}"); + + ResetOpener(); + } + if (value == OpenerState.OpenerFinished) Svc.Log.Information("Opener Finished"); + + currentState = value; + } + } + } + + private bool DoPrePullSteps(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CanOpener && PrePullStep == 0) + { + PrePullStep = 1; + } + + if (!HasCooldowns() && !HasMotifs()) + { + PrePullStep = 0; + } + + if (CurrentState == OpenerState.PrePull) + { + if (CustomComboFunctions.LocalPlayer.CastActionId == RainbowDrip && PrePullStep == 1) CurrentState = OpenerState.InOpener; + else if (PrePullStep == 1) actionID = RainbowDrip; + + if (CustomComboFunctions.InCombat()) + CurrentState = OpenerState.FailedOpener; + + if(!HasMotifs()) + CurrentState = OpenerState.FailedOpener; + + return true; + } + PrePullStep = 0; + return false; + } + + private bool DoOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (currentState == OpenerState.InOpener) + { + + if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; + else if (OpenerStep == 1) actionID = StrikingMuse; + + if (CustomComboFunctions.WasLastAction(HolyInWhite) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = HolyInWhite; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; + else if (OpenerStep == 3) actionID = PomMuse; + + if (CustomComboFunctions.LocalPlayer.CastActionId == CustomComboFunctions.OriginalHook(CreatureMotif) && OpenerStep == 4) OpenerStep++; + else if (OpenerStep == 4) actionID = CustomComboFunctions.OriginalHook(CreatureMotif); + + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; + else if (OpenerStep == 5) actionID = StarryMuse; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; + else if (OpenerStep == 6) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = SubtractivePalette; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = BlizzardinCyan; + + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) actionID = StoneinYellow; + + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 10) OpenerStep++; + else if (OpenerStep == 10) actionID = ThunderinMagenta; + + if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == 11) OpenerStep++; + else if (OpenerStep == 11) actionID = CometinBlack; + + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 12) OpenerStep++; + else if (OpenerStep == 12) actionID = WingedMuse; + + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 13) OpenerStep++; + else if (OpenerStep == 13) actionID = MogoftheAges; + + if (CustomComboFunctions.WasLastAction(StarPrism) && OpenerStep == 14) OpenerStep++; + else if (OpenerStep == 14) actionID = StarPrism; + + if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == 15) OpenerStep++; + else if (OpenerStep == 15) actionID = HammerBrush; + + if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == 16) OpenerStep++; + else if (OpenerStep == 16) actionID = PolishingHammer; + + if (CustomComboFunctions.WasLastAction(RainbowDrip) && OpenerStep == 17) OpenerStep++; + else if (OpenerStep == 17) actionID = RainbowDrip; + + if (CustomComboFunctions.WasLastAction(HolyInWhite) && OpenerStep == 18) OpenerStep++; + else if (OpenerStep == 18) actionID = HolyInWhite; + + Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); + + if (ActionWatching.TimeSinceLastAction.TotalSeconds > 4) + { + CurrentState = OpenerState.FailedOpener; + Svc.Log.Warning("Opener Failed due to timeout."); + return false; + } + + if (OpenerStep > 18) // Assuming 18 is the last step + { + CurrentState = OpenerState.OpenerFinished; + Svc.Log.Information("Opener completed successfully."); + return false; + } + + return true; + } + return false; + } + + private void ResetOpener() + { + PrePullStep = 0; + OpenerStep = 0; + } + + public bool DoFullOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CurrentState == OpenerState.PrePull) + if (DoPrePullSteps(ref actionID)) + return true; + + if (CurrentState == OpenerState.InOpener) + { + if (DoOpener(ref actionID)) + return true; + } + + if (!CustomComboFunctions.InCombat()) + { + ResetOpener(); + CurrentState = OpenerState.PrePull; + } + return false; + } + } +} + diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index c1cd539fd..e683f4cea 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -1,6 +1,8 @@ using Dalamud.Game.ClientState.JobGauge.Types; +using XIVSlothCombo.Combos.JobHelpers; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; +using XIVSlothCombo.Data; using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.PvE @@ -11,15 +13,25 @@ internal class PCT public const uint BlizzardinCyan = 34653, + StoneinYellow = 34654, BlizzardIIinCyan = 34659, ClawMotif = 34666, ClawedMuse = 34672, CometinBlack = 34663, CreatureMotif = 34689, FireInRed = 34650, + AeroInGreen = 34651, + WaterInBlue = 34652, FireIIinRed = 34656, + HammerMotif = 34668, + WingedMuse = 34671, + StrikingMuse = 34674, + StarryMuse = 34675, HammerStamp = 34678, + HammerBrush = 34679, + PolishingHammer = 34680, HolyInWhite = 34662, + StarrySkyMotif = 34669, LandscapeMotif = 34691, LivingMuse = 35347, MawMotif = 34667, @@ -61,7 +73,9 @@ public static class Debuffs public static class Config { public static UserInt - CombinedAetherhueChoices = new("CombinedAetherhueChoices"); + CombinedAetherhueChoices = new("CombinedAetherhueChoices"), + PCT_ST_AdvancedMode_LucidOption = new("PCT_ST_AdvancedMode_LucidOption", 6500), + PCT_AoE_AdvancedMode_LucidOption = new("PCT_AoE_AdvancedMode_LucidOption", 6500); public static UserBool CombinedMotifsMog = new("CombinedMotifsMog"), @@ -163,6 +177,172 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } + internal class PCT_ST_AdvancedMode : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.PCT_ST_AdvancedMode; + internal static PCTOpenerLogic PCTOpener = new(); + + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + if (actionID is FireInRed) + { + var gauge = GetJobGauge(); + bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardinCyan)) : CanSpellWeave(OriginalHook(FireInRed)) || CanSpellWeave(OriginalHook(HammerStamp)) || CanSpellWeave(CometinBlack) || CanSpellWeave(HolyInWhite); + + + // Prepull logic + if (!InCombat() || (InCombat() && CurrentTarget == null)) + { + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_PrePullMotifs)) + { + if (LevelChecked(OriginalHook(CreatureMotif)) && !gauge.CreatureMotifDrawn) + return OriginalHook(CreatureMotif); + if (LevelChecked(OriginalHook(WeaponMotif)) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) + return OriginalHook(WeaponMotif); + if (LevelChecked(OriginalHook(LandscapeMotif)) && !gauge.LandscapeMotifDrawn && !HasEffect(Buffs.StarryMuse)) + return OriginalHook(LandscapeMotif); + } + } + + // Lvl 100 Opener + if (IsEnabled(CustomComboPreset.PCT_ST_Advanced_Openers) && LevelChecked(StarPrism)) + { + if (PCTOpener.DoFullOpener(ref actionID)) + return actionID; + } + + // General Weaves + if (canWeave) + { + //Muses + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_ScenicMuse) && gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && IsOffCooldown(ScenicMuse)) + return OriginalHook(ScenicMuse); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LivingMuse) && gauge.CreatureMotifDrawn && + (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || + GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || + GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || !ScenicMuse.LevelChecked()) && + HasCharges(OriginalHook(LivingMuse)) && canWeave) + { + if (GetCooldown(ScenicMuse).CooldownRemaining > GetCooldownChargeRemainingTime(LivingMuse)) + return OriginalHook(LivingMuse); + } + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SteelMuse) && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) + return OriginalHook(SteelMuse); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 40 || !ScenicMuse.LevelChecked())) + return OriginalHook(MogoftheAges); + + // Swiftcast motifs + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SwitfcastOption) && IsMoving && IsOffCooldown(All.Swiftcast) && (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + return All.Swiftcast; + + // Palette + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SubtractivePalette) && LevelChecked(SubtractivePalette) && !HasEffect(Buffs.SubtractivePalette)) + { + if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) + return SubtractivePalette; + } + } + + if (HasEffect(All.Buffs.Swiftcast)) + { + if (!gauge.CreatureMotifDrawn && LevelChecked(CreatureMotif) && !HasEffect(Buffs.StarryMuse)) + return OriginalHook(CreatureMotif); + if (!gauge.WeaponMotifDrawn && LevelChecked(WeaponMotif) && !HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.StarryMuse)) + return OriginalHook(HammerMotif); + if (!gauge.LandscapeMotifDrawn && LevelChecked(LandscapeMotif) && !HasEffect(Buffs.StarryMuse)) + return OriginalHook(LandscapeMotif); + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_BlizzardInCyan) && HasEffect(Buffs.SubtractivePalette)) + return OriginalHook(BlizzardinCyan); + } + + if (IsMoving && InCombat()) + { + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HammerStampCombo) && HasEffect(Buffs.HammerTime)) + return OriginalHook(HammerStamp); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HolyInWhite) && gauge.Paint >= 1 && !HasEffect(Buffs.MonochromeTones)) + return OriginalHook(HolyInWhite); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_CometinBlack) && gauge.Paint >= 1 && HasEffect(Buffs.MonochromeTones)) + return OriginalHook(CometinBlack); + } + + //Prepare for Burst + if (GetCooldownRemainingTime(ScenicMuse) <= 20) + { + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LandscapeMotif) && LevelChecked(LandscapeMotif) && !gauge.LandscapeMotifDrawn) + return OriginalHook(LandscapeMotif); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CreatureMotif) && LevelChecked(CreatureMotif) && !gauge.CreatureMotifDrawn) + return OriginalHook(CreatureMotif); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif) && LevelChecked(WeaponMotif) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) + return OriginalHook(WeaponMotif); + } + + // Burst + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_Phase) && HasEffect(Buffs.StarryMuse)) + { + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_CometInBlack) && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) + return CometinBlack; + + // Check for HammerTime + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_HammerCombo) && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) + return OriginalHook(HammerStamp); + + // Check for Starstruck + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_StarPrism)) + { + if (HasEffect(Buffs.Starstruck) || HasEffect(Buffs.Starstruck) && GetBuffRemainingTime(Buffs.Starstruck) <= 3f) + return StarPrism; + } + + // Check for RainbowBright + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_RainbowDrip)) + { + if (HasEffect(Buffs.RainbowBright) || HasEffect(Buffs.RainbowBright) && GetBuffRemainingTime(Buffs.StarryMuse) <= 3f) + return RainbowDrip; + } + + } + + + if (HasEffect(Buffs.RainbowBright) && !HasEffect(Buffs.StarryMuse)) + return RainbowDrip; + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CometinBlack) && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(Buffs.StarryMuse) > 30f) + return OriginalHook(CometinBlack); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_HammerStampCombo) && HasEffect(Buffs.HammerTime)) + return OriginalHook(HammerStamp); + + + if (!HasEffect(Buffs.StarryMuse)) + { + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LandscapeMotif) && LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && GetCooldownRemainingTime(ScenicMuse) <= 20) + return OriginalHook(LandscapeMotif); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CreatureMotif) && CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn && (HasCharges(LivingMuse) || GetCooldownChargeRemainingTime(LivingMuse) <= 8)) + return OriginalHook(CreatureMotif); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif) && WeaponMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime) && (HasCharges(SteelMuse) || GetCooldownChargeRemainingTime(SteelMuse) <= 8 && !HasEffect(Buffs.HammerTime))) + return OriginalHook(WeaponMotif); + } + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LucidDreaming) && ActionReady(All.LucidDreaming) && CanSpellWeave(actionID) && LocalPlayer.CurrentMp <= Config.PCT_ST_AdvancedMode_LucidOption) + return All.LucidDreaming; + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_BlizzardInCyan) && HasEffect(Buffs.SubtractivePalette)) + return OriginalHook(BlizzardinCyan); + } + return actionID; + } + } + internal class PCT_AoE_SimpleMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.PCT_AoE_SimpleMode; @@ -258,6 +438,162 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } + internal class PCT_AoE_AdvancedMode : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.PCT_AoE_AdvancedMode; + + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + if (actionID is FireIIinRed) + { + var gauge = GetJobGauge(); + bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardIIinCyan)) : CanSpellWeave(OriginalHook(FireIIinRed)) || CanSpellWeave(OriginalHook(HammerStamp)) || CanSpellWeave(CometinBlack) || CanSpellWeave(HolyInWhite); + + + // Prepull logic + if (!InCombat() || (InCombat() && CurrentTarget == null)) + { + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_PrePullMotifs)) + { + if (LevelChecked(OriginalHook(CreatureMotif)) && !gauge.CreatureMotifDrawn) + return OriginalHook(CreatureMotif); + if (LevelChecked(OriginalHook(WeaponMotif)) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) + return OriginalHook(WeaponMotif); + if (LevelChecked(OriginalHook(LandscapeMotif)) && !gauge.LandscapeMotifDrawn && !HasEffect(Buffs.StarryMuse)) + return OriginalHook(LandscapeMotif); + } + } + + // General Weaves + if (canWeave) + { + //Muses + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_ScenicMuse) && gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && IsOffCooldown(ScenicMuse)) + return OriginalHook(ScenicMuse); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LivingMuse) && gauge.CreatureMotifDrawn && + (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || + GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || + GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || !ScenicMuse.LevelChecked()) && + HasCharges(OriginalHook(LivingMuse)) && canWeave) + { + if (GetCooldown(ScenicMuse).CooldownRemaining > GetCooldownChargeRemainingTime(LivingMuse)) + return OriginalHook(LivingMuse); + } + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SteelMuse) && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) + return OriginalHook(SteelMuse); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 40 || !ScenicMuse.LevelChecked())) + return OriginalHook(MogoftheAges); + + // Swiftcast motifs + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SwitfcastOption) && IsMoving && IsOffCooldown(All.Swiftcast) && (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + return All.Swiftcast; + + // Palette + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SubtractivePalette) && LevelChecked(SubtractivePalette) && !HasEffect(Buffs.SubtractivePalette)) + { + if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) + return SubtractivePalette; + } + } + + if (HasEffect(All.Buffs.Swiftcast)) + { + if (!gauge.CreatureMotifDrawn && LevelChecked(CreatureMotif) && !HasEffect(Buffs.StarryMuse)) + return OriginalHook(CreatureMotif); + if (!gauge.WeaponMotifDrawn && LevelChecked(WeaponMotif) && !HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.StarryMuse)) + return OriginalHook(HammerMotif); + if (!gauge.LandscapeMotifDrawn && LevelChecked(LandscapeMotif) && !HasEffect(Buffs.StarryMuse)) + return OriginalHook(LandscapeMotif); + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_BlizzardInCyan) && HasEffect(Buffs.SubtractivePalette)) + return OriginalHook(BlizzardIIinCyan); + } + + if (IsMoving && InCombat()) + { + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HammerStampCombo) && HasEffect(Buffs.HammerTime)) + return OriginalHook(HammerStamp); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HolyInWhite) && gauge.Paint >= 1 && !HasEffect(Buffs.MonochromeTones)) + return OriginalHook(HolyInWhite); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_CometinBlack) && gauge.Paint >= 1 && HasEffect(Buffs.MonochromeTones)) + return OriginalHook(CometinBlack); + } + + //Prepare for Burst + if (GetCooldownRemainingTime(ScenicMuse) <= 20) + { + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LandscapeMotif) && LevelChecked(LandscapeMotif) && !gauge.LandscapeMotifDrawn) + return OriginalHook(LandscapeMotif); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CreatureMotif) && LevelChecked(CreatureMotif) && !gauge.CreatureMotifDrawn) + return OriginalHook(CreatureMotif); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_WeaponMotif) && LevelChecked(WeaponMotif) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) + return OriginalHook(WeaponMotif); + } + + // Burst + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_Phase) && HasEffect(Buffs.StarryMuse)) + { + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_CometInBlack) && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) + return CometinBlack; + + // Check for HammerTime + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_HammerCombo) && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) + return OriginalHook(HammerStamp); + + // Check for Starstruck + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_StarPrism) && HasEffect(Buffs.Starstruck) || HasEffect(Buffs.Starstruck) && GetBuffRemainingTime(Buffs.Starstruck) < 3) + return StarPrism; + + // Check for RainbowBright + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_RainbowDrip)) + { + if (HasEffect(Buffs.RainbowBright) || HasEffect(Buffs.RainbowBright) && GetBuffRemainingTime(Buffs.StarryMuse) < 3) + return RainbowDrip; + } + + } + + + if (HasEffect(Buffs.RainbowBright) && !HasEffect(Buffs.StarryMuse)) + return RainbowDrip; + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CometinBlack) && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(StarryMuse) > 30) + return OriginalHook(CometinBlack); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_HammerStampCombo) && HasEffect(Buffs.HammerTime)) + return OriginalHook(HammerStamp); + + + if (!HasEffect(Buffs.StarryMuse)) + { + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LandscapeMotif) && LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && GetCooldownRemainingTime(ScenicMuse) <= 20) + return OriginalHook(LandscapeMotif); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CreatureMotif) && CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn && (HasCharges(LivingMuse) || GetCooldownChargeRemainingTime(LivingMuse) <= 8)) + return OriginalHook(CreatureMotif); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_WeaponMotif) && WeaponMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime) && (HasCharges(SteelMuse) || GetCooldownChargeRemainingTime(SteelMuse) <= 8 && !HasEffect(Buffs.HammerTime))) + return OriginalHook(WeaponMotif); + } + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LucidDreaming) && ActionReady(All.LucidDreaming) && CanSpellWeave(actionID) && LocalPlayer.CurrentMp <= Config.PCT_ST_AdvancedMode_LucidOption) + return All.LucidDreaming; + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_BlizzardInCyan) && HasEffect(Buffs.SubtractivePalette)) + return OriginalHook(BlizzardIIinCyan); + + } + return actionID; + } + } + internal class CombinedAetherhues : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.CombinedAetherhues; @@ -334,4 +670,4 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } } -} +} \ No newline at end of file diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index d33a2869e..e8c2b8f4a 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1766,6 +1766,15 @@ internal static void Draw(CustomComboPreset preset, bool enabled) UserConfig.DrawAdditionalBoolChoice(PCT.Config.CombinedMotifsWeapon, $"{PCT.HammerStamp.ActionName()} Feature", $"Add {PCT.HammerStamp.ActionName()} when under the effect of {PCT.Buffs.HammerTime.StatusName()}."); } + if(preset == CustomComboPreset.PCT_ST_AdvancedMode_LucidDreaming ) + { + UserConfig.DrawSliderInt(0, 10000, PCT.Config.PCT_ST_AdvancedMode_LucidOption, "Add Lucid Dreaming when below this MP", sliderIncrement: SliderIncrements.Hundreds); + } + if(preset == CustomComboPreset.PCT_AoE_AdvancedMode_LucidDreaming) + { + UserConfig.DrawSliderInt(0, 10000, PCT.Config.PCT_AoE_AdvancedMode_LucidOption, "Add Lucid Dreaming when below this MP", sliderIncrement: SliderIncrements.Hundreds); + } + #endregion // ==================================================================================== #region PALADIN From 0c9b3198cf3fc6a2531cb824be1dc201c5d76fc8 Mon Sep 17 00:00:00 2001 From: edewen Date: Mon, 12 Aug 2024 14:53:37 -0400 Subject: [PATCH 060/142] Config naming structure Renamed options and features according to template given to me by zbee. --- XIVSlothCombo/Combos/CustomComboPreset.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index d595dbcf5..bc1c0bac3 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -621,22 +621,22 @@ public enum CustomComboPreset [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] [ConflictingCombos(BRD_StraightShotUpgrade, BRD_ST_oGCD, BRD_IronJaws, BRD_IronJaws_Alternate, BRD_ST_AdvMode)] - [CustomComboInfo("Simple Bard Feature", "Adds every single target ability to one button,\nIf there are DoTs on target, will try to maintain their uptime.", BRD.JobID)] + [CustomComboInfo("Simple Mode - Single Target", "Adds every single target ability to one button,\nIf there are DoTs on target, will try to maintain their uptime.", BRD.JobID)] BRD_ST_SimpleMode = 3036, [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD, BRD_AoE_AdvMode)] [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] - [CustomComboInfo("Simple AoE Bard Feature", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] + [CustomComboInfo("Simple Mode - AoE", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] BRD_AoE_SimpleMode = 3035, [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] [ConflictingCombos(BRD_StraightShotUpgrade, BRD_ST_oGCD, BRD_IronJaws, BRD_IronJaws_Alternate, BRD_ST_SimpleMode)] - [CustomComboInfo("Advanced Bard Feature", "Adds every single target ability to one button,\nIf there are DoTs on target, will try to maintain their uptime.", BRD.JobID)] + [CustomComboInfo("Advanced Mode - Single Target", "Adds every single target ability to one button,\nIf there are DoTs on target, will try to maintain their uptime.", BRD.JobID)] BRD_ST_AdvMode = 3009, [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD, BRD_AoE_SimpleMode)] [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] - [CustomComboInfo("Advanced AoE Bard Feature", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] + [CustomComboInfo("Advanced Mode - AoE", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] BRD_AoE_AdvMode = 3015, [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] @@ -649,7 +649,7 @@ public enum CustomComboPreset BRD_DoTMaintainance = 3002, [ParentCombo(BRD_StraightShotUpgrade)] - [CustomComboInfo("Apex Arrow Feature", "Replaces Burst Shot with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] + [CustomComboInfo("Apex Arrow Option", "Replaces Burst Shot with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] BRD_ApexST = 3034, [ReplaceSkill(BRD.IronJaws)] @@ -663,7 +663,7 @@ public enum CustomComboPreset BRD_IronJaws_Alternate = 3004, [ParentCombo(BRD_AoE_Combo)] - [CustomComboInfo("Ladonsbite/Quick Nock to Apex Arrow Feature", "Replaces Ladonsbite and Quick Nock with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] + [CustomComboInfo("Apex Arrow Option", "Replaces Ladonsbite and Quick Nock with Apex Arrow when gauge is full and Blast Arrow when you are Blast Arrow ready.", BRD.JobID)] BRD_Apex = 3005, [ReplaceSkill(BRD.Bloodletter)] @@ -678,7 +678,7 @@ public enum CustomComboPreset [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] [ConflictingCombos(BRD_AoE_AdvMode, BRD_AoE_SimpleMode)] - [CustomComboInfo("AoE Combo Feature", "Replaces Quick Nock/Ladonsbite with Shadowbite when ready.", BRD.JobID)] + [CustomComboInfo("Quick Nock Feature", "Replaces Quick Nock/Ladonsbite with Shadowbite when ready.", BRD.JobID)] BRD_AoE_Combo = 3008, [ParentCombo(BRD_ST_AdvMode)] @@ -690,7 +690,7 @@ public enum CustomComboPreset BRD_Adv_Song = 3011, [ParentCombo(BRD_AoE_oGCD)] - [CustomComboInfo("Songs Feature", "Adds Songs onto AoE oGCD Feature.", BRD.JobID)] + [CustomComboInfo("Songs Option", "Adds Songs onto AoE oGCD Feature.", BRD.JobID)] BRD_oGCDSongs = 3012, [ReplaceSkill(BRD.Barrage)] @@ -702,7 +702,7 @@ public enum CustomComboPreset BRD_OneButtonSongs = 3014, [ParentCombo(BRD_AoE_AdvMode)] - [CustomComboInfo("AoE Bard Song Option", "Weave Songs on the Advanced AoE.", BRD.JobID)] + [CustomComboInfo("Bard Song Option", "Weave Songs on the Advanced AoE.", BRD.JobID)] BRD_AoE_Adv_Songs = 3016, [ParentCombo(BRD_ST_AdvMode)] From 82240ad185a4487b3b53f4804129d1814ad927ef Mon Sep 17 00:00:00 2001 From: Kaeris Date: Mon, 12 Aug 2024 21:47:24 +0100 Subject: [PATCH 061/142] Debug window update --- XIVSlothCombo/Window/Tabs/Debug.cs | 157 ++++++++++++++++++++++++----- 1 file changed, 133 insertions(+), 24 deletions(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 014af90a3..c713c575d 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -1,10 +1,10 @@ using Dalamud.Game.ClientState.Objects.SubKinds; using Dalamud.Game.ClientState.Objects.Types; +using Dalamud.Interface.Colors; using ECommons.DalamudServices; using ImGuiNET; using System; using System.Linq; -using System.Numerics; using XIVSlothCombo.Combos; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; @@ -32,43 +32,152 @@ internal class DebugCombo : CustomCombo IPlayerCharacter? LocalPlayer = Svc.ClientState.LocalPlayer; DebugCombo? comboClass = new(); + // Custom Styling + static void CustomStyleText(string label, object? value) + { + if (!string.IsNullOrEmpty(label)) + { + ImGui.TextUnformatted(label); + ImGui.SameLine(0, 4f); + } + ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudGrey); + ImGui.TextUnformatted(value?.ToString() ?? ""); + ImGui.PopStyleColor(); + } + if (LocalPlayer != null) { - if (Svc.ClientState.LocalPlayer.TargetObject is IBattleChara chara) + // Player Status Effects + if (ImGui.CollapsingHeader("Player Status Effects")) + { + foreach (Status? status in Svc.ClientState.LocalPlayer.StatusList) + { + // Null Check (Source Name) + if (status.SourceObject is not null) + { + ImGui.TextUnformatted($"{status.SourceObject.Name} ->"); + ImGui.SameLine(0, 4f); + } + + // Null Check (Status Name) + if (!string.IsNullOrEmpty(ActionWatching.GetStatusName(status.StatusId))) + { + CustomStyleText(ActionWatching.GetStatusName(status.StatusId) + ":", status.StatusId); + ImGui.SameLine(0, 4f); + CustomStyleText("", $"({Math.Round(status.RemainingTime, 1)})"); + } + else + { + CustomStyleText("", $"{status.StatusId} ({Math.Round(status.RemainingTime, 1)})"); + } + } + } + + // Target Status Effects + if (ImGui.CollapsingHeader("Target Status Effects")) { - foreach (Status? status in chara.StatusList) + if (Svc.ClientState.LocalPlayer.TargetObject is IBattleChara chara) { - ImGui.TextUnformatted($"TARGET STATUS CHECK: {chara.Name} -> {ActionWatching.GetStatusName(status.StatusId)}: {status.StatusId} {Math.Round(status.RemainingTime, 1)}"); + foreach (Status? status in chara.StatusList) + { + // Null Check (Source Name) + if (status.SourceObject is not null) + { + ImGui.TextUnformatted($"{status.SourceObject.Name} ->"); + ImGui.SameLine(0, 4f); + } + + // Null Check (Status Name) + if (!string.IsNullOrEmpty(ActionWatching.GetStatusName(status.StatusId))) + { + CustomStyleText(ActionWatching.GetStatusName(status.StatusId) + ":", status.StatusId); + ImGui.SameLine(0, 4f); + CustomStyleText("", $"({Math.Round(status.RemainingTime, 1)})"); + } + else + { + CustomStyleText("", $"{status.StatusId} ({Math.Round(status.RemainingTime, 1)})"); + } + } + } } + ImGui.Spacing(); + + // Player Info + ImGui.Spacing(); + ImGui.Text("Player Info"); + ImGui.Separator(); + CustomStyleText("Job:", $"{Svc.ClientState.LocalPlayer.ClassJob.GameData.NameEnglish} (ID: {Svc.ClientState.LocalPlayer.ClassJob.Id})"); + CustomStyleText("Zone:", $"{Svc.Data.GetExcelSheet()?.FirstOrDefault(x => x.RowId == Svc.ClientState.TerritoryType).PlaceName.Value.Name} (ID: {Svc.ClientState.TerritoryType})"); + CustomStyleText("In PvP:", CustomComboFunctions.InPvP()); + CustomStyleText("In Combat:", CustomComboFunctions.InCombat()); + CustomStyleText("Hitbox Radius:", Svc.ClientState.LocalPlayer.HitboxRadius); + ImGui.Spacing(); + + // Target Info + ImGui.Spacing(); + ImGui.Text("Target Info"); + ImGui.Separator(); + CustomStyleText("ObjectId:", Svc.ClientState.LocalPlayer.TargetObject?.GameObjectId); + CustomStyleText("ObjectKind:", Svc.ClientState.LocalPlayer.TargetObject?.ObjectKind); + CustomStyleText("Is BattleChara:", Svc.ClientState.LocalPlayer.TargetObject is IBattleChara); + CustomStyleText("Is PlayerCharacter:", Svc.ClientState.LocalPlayer.TargetObject is IPlayerCharacter); + CustomStyleText("Distance:", $"{Math.Round(CustomComboFunctions.GetTargetDistance(), 2)}y"); + CustomStyleText("Hitbox Radius:", Svc.ClientState.LocalPlayer.TargetObject?.HitboxRadius); + CustomStyleText("In Melee Range:", CustomComboFunctions.InMeleeRange()); + CustomStyleText("Relative Direction:", CustomComboFunctions.AngleToTarget() == 2 ? "Rear" : (CustomComboFunctions.AngleToTarget() == 1 || CustomComboFunctions.AngleToTarget() == 3) ? "Flank" : CustomComboFunctions.AngleToTarget() == 4 ? "Front" : ""); + CustomStyleText("Health:", $"{CustomComboFunctions.EnemyHealthCurrentHp().ToString("N0")} / {CustomComboFunctions.EnemyHealthMaxHp().ToString("N0")} ({Math.Round(CustomComboFunctions.GetTargetHPPercent(), 2)}%)"); + ImGui.Spacing(); - foreach (Status? status in (Svc.ClientState.LocalPlayer as IBattleChara).StatusList) + // Action Info + ImGui.Spacing(); + ImGui.Text("Action Info"); + ImGui.Separator(); + CustomStyleText("Last Action:", ActionWatching.LastAction == 0 ? string.Empty : $"{ActionWatching.GetActionName(ActionWatching.LastAction)} (ID: {ActionWatching.LastAction})"); + CustomStyleText("Last Action Cost:", CustomComboFunctions.GetResourceCost(ActionWatching.LastAction)); + CustomStyleText("Last Action Type:", ActionWatching.GetAttackType(ActionWatching.LastAction)); + CustomStyleText("Last Weaponskill:", ActionWatching.GetActionName(ActionWatching.LastWeaponskill)); + CustomStyleText("Last Spell:", ActionWatching.GetActionName(ActionWatching.LastSpell)); + CustomStyleText("Last Ability:", ActionWatching.GetActionName(ActionWatching.LastAbility)); + CustomStyleText("Combo Timer:", Math.Round(CustomComboFunctions.ComboTimer, 2)); + CustomStyleText("Combo Action:", CustomComboFunctions.ComboAction == 0 ? string.Empty : $"{ActionWatching.GetActionName(CustomComboFunctions.ComboAction)} (ID: {CustomComboFunctions.ComboAction})"); + CustomStyleText("Cast Action:", Svc.ClientState.LocalPlayer.CastActionId == 0 ? string.Empty : $"{ActionWatching.GetActionName(Svc.ClientState.LocalPlayer.CastActionId)} (ID: {Svc.ClientState.LocalPlayer.CastActionId})"); + CustomStyleText("Cast Time (Total):", Math.Round(Svc.ClientState.LocalPlayer.TotalCastTime, 2)); + CustomStyleText("Cast Time (Current):", Math.Round(Svc.ClientState.LocalPlayer.CurrentCastTime, 2)); + ImGui.Spacing(); + + // Party Info + ImGui.Spacing(); + ImGui.Text("Party Info"); + ImGui.Separator(); + CustomStyleText("Party ID:", Svc.Party.PartyId); + CustomStyleText("Party Size:", Svc.Party.Length); + if (ImGui.CollapsingHeader("Party Members")) { - ImGui.TextUnformatted($"SELF STATUS CHECK: {Svc.ClientState.LocalPlayer.Name} -> {ActionWatching.GetStatusName(status.StatusId)}: {status.StatusId} {Math.Round(status.RemainingTime, 1)}"); + for (int i = 1; i <= 8; i++) + { + if (CustomComboFunctions.GetPartySlot(i) is not IBattleChara member || member is null) continue; + ImGui.TextUnformatted($"Slot {i} ->"); + ImGui.SameLine(0, 4f); + CustomStyleText($"{CustomComboFunctions.GetPartySlot(i).Name}", $"({member.ClassJob.GameData.Abbreviation})"); + } } + ImGui.Spacing(); - ImGui.TextUnformatted($"TERRITORY: {Svc.ClientState.TerritoryType}"); - ImGui.TextUnformatted($"TARGET OBJECT KIND: {Svc.ClientState.LocalPlayer.TargetObject?.ObjectKind}"); - ImGui.TextUnformatted($"TARGET IS BATTLE CHARA: {Svc.ClientState.LocalPlayer.TargetObject is IBattleChara}"); - ImGui.TextUnformatted($"IN COMBAT: {CustomComboFunctions.InCombat()}"); - ImGui.TextUnformatted($"IN MELEE RANGE: {CustomComboFunctions.InMeleeRange()}"); - ImGui.TextUnformatted($"DISTANCE FROM TARGET: {CustomComboFunctions.GetTargetDistance()}"); - ImGui.TextUnformatted($"TARGET HP VALUE: {CustomComboFunctions.EnemyHealthCurrentHp()}"); - ImGui.TextUnformatted($"LAST ACTION: {ActionWatching.GetActionName(ActionWatching.LastAction)} (ID:{ActionWatching.LastAction})"); - ImGui.TextUnformatted($"LAST ACTION COST: {CustomComboFunctions.GetResourceCost(ActionWatching.LastAction)}"); - ImGui.TextUnformatted($"LAST ACTION TYPE: {ActionWatching.GetAttackType(ActionWatching.LastAction)}"); - ImGui.TextUnformatted($"LAST WEAPONSKILL: {ActionWatching.GetActionName(ActionWatching.LastWeaponskill)}"); - ImGui.TextUnformatted($"LAST SPELL: {ActionWatching.GetActionName(ActionWatching.LastSpell)}"); - ImGui.TextUnformatted($"LAST ABILITY: {ActionWatching.GetActionName(ActionWatching.LastAbility)}"); - ImGui.TextUnformatted($"ZONE: {Svc.ClientState.TerritoryType}"); - ImGui.BeginChild("BLUSPELLS", new Vector2(250, 100), false); - ImGui.TextUnformatted($"SELECTED BLU SPELLS:\n{string.Join("\n", Service.Configuration.ActiveBLUSpells.Select(x => ActionWatching.GetActionName(x)).OrderBy(x => x))}"); - ImGui.EndChild(); + // Misc. Info + ImGui.Spacing(); + ImGui.Text("Miscellaneous Info"); + ImGui.Separator(); + if (ImGui.CollapsingHeader("Active Blue Mage Spells")) + { + ImGui.TextUnformatted($"{string.Join("\n", Service.Configuration.ActiveBLUSpells.Select(x => ActionWatching.GetActionName(x)).OrderBy(x => x))}"); + } } else { - ImGui.TextUnformatted("Please log in to use this tab."); + ImGui.TextUnformatted("Please log into the game to use this tab."); } } } From 412104da8cf5e4b3376a86d92f4e6c22792c10cd Mon Sep 17 00:00:00 2001 From: Kaeris Date: Mon, 12 Aug 2024 23:07:10 +0100 Subject: [PATCH 062/142] Fix digits --- XIVSlothCombo/Window/Tabs/Debug.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index c713c575d..1d6f219c0 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -140,7 +140,7 @@ static void CustomStyleText(string label, object? value) CustomStyleText("Last Weaponskill:", ActionWatching.GetActionName(ActionWatching.LastWeaponskill)); CustomStyleText("Last Spell:", ActionWatching.GetActionName(ActionWatching.LastSpell)); CustomStyleText("Last Ability:", ActionWatching.GetActionName(ActionWatching.LastAbility)); - CustomStyleText("Combo Timer:", Math.Round(CustomComboFunctions.ComboTimer, 2)); + CustomStyleText("Combo Timer:", Math.Round(CustomComboFunctions.ComboTimer, 1)); CustomStyleText("Combo Action:", CustomComboFunctions.ComboAction == 0 ? string.Empty : $"{ActionWatching.GetActionName(CustomComboFunctions.ComboAction)} (ID: {CustomComboFunctions.ComboAction})"); CustomStyleText("Cast Action:", Svc.ClientState.LocalPlayer.CastActionId == 0 ? string.Empty : $"{ActionWatching.GetActionName(Svc.ClientState.LocalPlayer.CastActionId)} (ID: {Svc.ClientState.LocalPlayer.CastActionId})"); CustomStyleText("Cast Time (Total):", Math.Round(Svc.ClientState.LocalPlayer.TotalCastTime, 2)); From 2620cf4bc1d9007bcb69bf2c9521fe889728709b Mon Sep 17 00:00:00 2001 From: Kaeris Date: Tue, 13 Aug 2024 02:29:30 +0100 Subject: [PATCH 063/142] Fix status durations --- XIVSlothCombo/Window/Tabs/Debug.cs | 81 +++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 24 deletions(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 1d6f219c0..934744937 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -15,10 +15,8 @@ namespace XIVSlothCombo.Window.Tabs { - internal class Debug : ConfigWindow { - internal class DebugCombo : CustomCombo { protected internal override CustomComboPreset Preset { get; } @@ -31,6 +29,7 @@ internal class DebugCombo : CustomCombo { IPlayerCharacter? LocalPlayer = Svc.ClientState.LocalPlayer; DebugCombo? comboClass = new(); + uint[] statusBlacklist = { 360, 361, 362, 363, 364, 365, 366, 367, 368 }; // Prevents status duration from being displayed // Custom Styling static void CustomStyleText(string label, object? value) @@ -50,7 +49,7 @@ static void CustomStyleText(string label, object? value) // Player Status Effects if (ImGui.CollapsingHeader("Player Status Effects")) { - foreach (Status? status in Svc.ClientState.LocalPlayer.StatusList) + foreach (Status? status in LocalPlayer.StatusList) { // Null Check (Source Name) if (status.SourceObject is not null) @@ -63,12 +62,29 @@ static void CustomStyleText(string label, object? value) if (!string.IsNullOrEmpty(ActionWatching.GetStatusName(status.StatusId))) { CustomStyleText(ActionWatching.GetStatusName(status.StatusId) + ":", status.StatusId); - ImGui.SameLine(0, 4f); - CustomStyleText("", $"({Math.Round(status.RemainingTime, 1)})"); + } else { - CustomStyleText("", $"{status.StatusId} ({Math.Round(status.RemainingTime, 1)})"); + CustomStyleText("", status.StatusId); + } + + // Duration + Blacklist Check + if (status.RemainingTime > 0 && !statusBlacklist.Contains(status.StatusId)) + { + string formattedDuration; + if (status.RemainingTime >= 60) + { + int minutes = (int)(status.RemainingTime / 60); + formattedDuration = $"{minutes}m"; + } + else + { + formattedDuration = $"{Math.Round(status.RemainingTime, 1)}s"; + } + + ImGui.SameLine(0, 4f); + CustomStyleText("", $"({formattedDuration})"); } } } @@ -76,7 +92,7 @@ static void CustomStyleText(string label, object? value) // Target Status Effects if (ImGui.CollapsingHeader("Target Status Effects")) { - if (Svc.ClientState.LocalPlayer.TargetObject is IBattleChara chara) + if (LocalPlayer.TargetObject is IBattleChara chara) { foreach (Status? status in chara.StatusList) { @@ -91,12 +107,29 @@ static void CustomStyleText(string label, object? value) if (!string.IsNullOrEmpty(ActionWatching.GetStatusName(status.StatusId))) { CustomStyleText(ActionWatching.GetStatusName(status.StatusId) + ":", status.StatusId); - ImGui.SameLine(0, 4f); - CustomStyleText("", $"({Math.Round(status.RemainingTime, 1)})"); + } else { - CustomStyleText("", $"{status.StatusId} ({Math.Round(status.RemainingTime, 1)})"); + CustomStyleText("", status.StatusId); + } + + // Duration + Blacklist Check + if (status.RemainingTime > 0 && !statusBlacklist.Contains(status.StatusId)) + { + string formattedDuration; + if (status.RemainingTime >= 60) + { + int minutes = (int)(status.RemainingTime / 60); + formattedDuration = $"{minutes}m"; + } + else + { + formattedDuration = $"{Math.Round(status.RemainingTime, 1)}s"; + } + + ImGui.SameLine(0, 4f); + CustomStyleText("", $"({formattedDuration})"); } } @@ -108,25 +141,25 @@ static void CustomStyleText(string label, object? value) ImGui.Spacing(); ImGui.Text("Player Info"); ImGui.Separator(); - CustomStyleText("Job:", $"{Svc.ClientState.LocalPlayer.ClassJob.GameData.NameEnglish} (ID: {Svc.ClientState.LocalPlayer.ClassJob.Id})"); + CustomStyleText("Job:", $"{LocalPlayer.ClassJob.GameData.NameEnglish} (ID: {LocalPlayer.ClassJob.Id})"); CustomStyleText("Zone:", $"{Svc.Data.GetExcelSheet()?.FirstOrDefault(x => x.RowId == Svc.ClientState.TerritoryType).PlaceName.Value.Name} (ID: {Svc.ClientState.TerritoryType})"); CustomStyleText("In PvP:", CustomComboFunctions.InPvP()); CustomStyleText("In Combat:", CustomComboFunctions.InCombat()); - CustomStyleText("Hitbox Radius:", Svc.ClientState.LocalPlayer.HitboxRadius); + CustomStyleText("Hitbox Radius:", LocalPlayer.HitboxRadius); ImGui.Spacing(); // Target Info ImGui.Spacing(); ImGui.Text("Target Info"); ImGui.Separator(); - CustomStyleText("ObjectId:", Svc.ClientState.LocalPlayer.TargetObject?.GameObjectId); - CustomStyleText("ObjectKind:", Svc.ClientState.LocalPlayer.TargetObject?.ObjectKind); - CustomStyleText("Is BattleChara:", Svc.ClientState.LocalPlayer.TargetObject is IBattleChara); - CustomStyleText("Is PlayerCharacter:", Svc.ClientState.LocalPlayer.TargetObject is IPlayerCharacter); + CustomStyleText("ObjectId:", LocalPlayer.TargetObject?.GameObjectId); + CustomStyleText("ObjectKind:", LocalPlayer.TargetObject?.ObjectKind); + CustomStyleText("Is BattleChara:", LocalPlayer.TargetObject is IBattleChara); + CustomStyleText("Is PlayerCharacter:", LocalPlayer.TargetObject is IPlayerCharacter); CustomStyleText("Distance:", $"{Math.Round(CustomComboFunctions.GetTargetDistance(), 2)}y"); - CustomStyleText("Hitbox Radius:", Svc.ClientState.LocalPlayer.TargetObject?.HitboxRadius); + CustomStyleText("Hitbox Radius:", LocalPlayer.TargetObject?.HitboxRadius); CustomStyleText("In Melee Range:", CustomComboFunctions.InMeleeRange()); - CustomStyleText("Relative Direction:", CustomComboFunctions.AngleToTarget() == 2 ? "Rear" : (CustomComboFunctions.AngleToTarget() == 1 || CustomComboFunctions.AngleToTarget() == 3) ? "Flank" : CustomComboFunctions.AngleToTarget() == 4 ? "Front" : ""); + CustomStyleText("Relative Direction:", CustomComboFunctions.AngleToTarget() is 2 ? "Rear" : (CustomComboFunctions.AngleToTarget() is 1 or 3) ? "Flank" : CustomComboFunctions.AngleToTarget() is 4 ? "Front" : ""); CustomStyleText("Health:", $"{CustomComboFunctions.EnemyHealthCurrentHp().ToString("N0")} / {CustomComboFunctions.EnemyHealthMaxHp().ToString("N0")} ({Math.Round(CustomComboFunctions.GetTargetHPPercent(), 2)}%)"); ImGui.Spacing(); @@ -134,17 +167,17 @@ static void CustomStyleText(string label, object? value) ImGui.Spacing(); ImGui.Text("Action Info"); ImGui.Separator(); - CustomStyleText("Last Action:", ActionWatching.LastAction == 0 ? string.Empty : $"{ActionWatching.GetActionName(ActionWatching.LastAction)} (ID: {ActionWatching.LastAction})"); + CustomStyleText("Last Action:", ActionWatching.LastAction == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(ActionWatching.LastAction)) ? "Unknown" : ActionWatching.GetActionName(ActionWatching.LastAction))} (ID: {ActionWatching.LastAction})"); CustomStyleText("Last Action Cost:", CustomComboFunctions.GetResourceCost(ActionWatching.LastAction)); CustomStyleText("Last Action Type:", ActionWatching.GetAttackType(ActionWatching.LastAction)); CustomStyleText("Last Weaponskill:", ActionWatching.GetActionName(ActionWatching.LastWeaponskill)); CustomStyleText("Last Spell:", ActionWatching.GetActionName(ActionWatching.LastSpell)); CustomStyleText("Last Ability:", ActionWatching.GetActionName(ActionWatching.LastAbility)); - CustomStyleText("Combo Timer:", Math.Round(CustomComboFunctions.ComboTimer, 1)); - CustomStyleText("Combo Action:", CustomComboFunctions.ComboAction == 0 ? string.Empty : $"{ActionWatching.GetActionName(CustomComboFunctions.ComboAction)} (ID: {CustomComboFunctions.ComboAction})"); - CustomStyleText("Cast Action:", Svc.ClientState.LocalPlayer.CastActionId == 0 ? string.Empty : $"{ActionWatching.GetActionName(Svc.ClientState.LocalPlayer.CastActionId)} (ID: {Svc.ClientState.LocalPlayer.CastActionId})"); - CustomStyleText("Cast Time (Total):", Math.Round(Svc.ClientState.LocalPlayer.TotalCastTime, 2)); - CustomStyleText("Cast Time (Current):", Math.Round(Svc.ClientState.LocalPlayer.CurrentCastTime, 2)); + CustomStyleText("Combo Timer:", $"{Math.Round(CustomComboFunctions.ComboTimer, 1)}"); + CustomStyleText("Combo Action:", CustomComboFunctions.ComboAction == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(CustomComboFunctions.ComboAction)) ? "Unknown" : ActionWatching.GetActionName(CustomComboFunctions.ComboAction))} (ID: {CustomComboFunctions.ComboAction})"); + CustomStyleText("Cast Action:", LocalPlayer.CastActionId == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(LocalPlayer.CastActionId)) ? "Unknown" : ActionWatching.GetActionName(LocalPlayer.CastActionId))} (ID: {LocalPlayer.CastActionId})"); + CustomStyleText("Cast Time (Total):", Math.Round(LocalPlayer.TotalCastTime, 2)); + CustomStyleText("Cast Time (Current):", Math.Round(LocalPlayer.CurrentCastTime, 2)); ImGui.Spacing(); // Party Info From 70ec5ad24716ceff7e9db07ae9c95e08c3ca17c8 Mon Sep 17 00:00:00 2001 From: Kaeris Date: Tue, 13 Aug 2024 02:33:03 +0100 Subject: [PATCH 064/142] String fix --- XIVSlothCombo/Window/Tabs/Debug.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 934744937..910bae2af 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -29,7 +29,7 @@ internal class DebugCombo : CustomCombo { IPlayerCharacter? LocalPlayer = Svc.ClientState.LocalPlayer; DebugCombo? comboClass = new(); - uint[] statusBlacklist = { 360, 361, 362, 363, 364, 365, 366, 367, 368 }; // Prevents status duration from being displayed + uint[] statusBlacklist = { 360, 361, 362, 363, 364, 365, 366, 367, 368 }; // Prevents status durations from being displayed // Custom Styling static void CustomStyleText(string label, object? value) @@ -173,7 +173,7 @@ static void CustomStyleText(string label, object? value) CustomStyleText("Last Weaponskill:", ActionWatching.GetActionName(ActionWatching.LastWeaponskill)); CustomStyleText("Last Spell:", ActionWatching.GetActionName(ActionWatching.LastSpell)); CustomStyleText("Last Ability:", ActionWatching.GetActionName(ActionWatching.LastAbility)); - CustomStyleText("Combo Timer:", $"{Math.Round(CustomComboFunctions.ComboTimer, 1)}"); + CustomStyleText("Combo Timer:", Math.Round(CustomComboFunctions.ComboTimer, 1)); CustomStyleText("Combo Action:", CustomComboFunctions.ComboAction == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(CustomComboFunctions.ComboAction)) ? "Unknown" : ActionWatching.GetActionName(CustomComboFunctions.ComboAction))} (ID: {CustomComboFunctions.ComboAction})"); CustomStyleText("Cast Action:", LocalPlayer.CastActionId == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(LocalPlayer.CastActionId)) ? "Unknown" : ActionWatching.GetActionName(LocalPlayer.CastActionId))} (ID: {LocalPlayer.CastActionId})"); CustomStyleText("Cast Time (Total):", Math.Round(LocalPlayer.TotalCastTime, 2)); From b7a5185f56499303dd8758b68b576c37abd53846 Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 12 Aug 2024 21:25:17 -0700 Subject: [PATCH 065/142] Overcap bandaid fix --- XIVSlothCombo/Combos/PvE/VPR.cs | 105 ++++++++++++-------------------- 1 file changed, 38 insertions(+), 67 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index ffdf627cd..7eb0f10a4 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -162,13 +162,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.SwiftskinsVenom) && InMeleeRange()) return OriginalHook(Twinblood); - - //Serpents Ire usage - if (!CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; } } + //Serpents Ire usage + if (!CappedOnCoils && CanWeave(Ouroboros) && ActionReady(SerpentsIre)) + return SerpentsIre; + if (LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) return VPRCheckRattlingCoils.HasRattlingCoilStack(gauge) ? UncoiledFury @@ -191,24 +191,25 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Reawaken; //Overcap protection - if (((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom)) || - GetCooldownRemainingTime(SerpentsIre) <= GCD * 5) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) + if (CappedOnCoils && //3 coils + ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken + (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up return UncoiledFury; //Vicewinder Usage - if (ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && + if (ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && HasEffect(Buffs.Swiftscaled) && ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && InMeleeRange() && !VPRCheckTimers.IsVenomExpiring(6) && !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) return Vicewinder; // Uncoiled Fury usage - if (LevelChecked(UncoiledFury) && - ((gauge.RattlingCoilStacks > 1) || + if (LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && + (((gauge.RattlingCoilStacks > 1) || (enemyHP < 1 && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6))) return UncoiledFury; //Reawaken combo @@ -312,31 +313,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { - int SerpentsIreUsed = ActionWatching.CombatActions.Count(x => x == SerpentsIre); - if (LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6)) { - //even minutes - if ((WasLastAbility(SerpentsIre) && HasEffect(Buffs.ReadyToReawaken)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros)) || - HasEffect(Buffs.ReadyToReawaken) || - (gauge.SerpentOffering >= 95 && WasLastAbility(SerpentsIre))) - return true; - - // odd minutes - if (((SerpentsIreUsed <= 3 || SerpentsIreUsed > 4) && - gauge.SerpentOffering >= 50 && - GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || - (SerpentsIreUsed is 4 && - (gauge.SerpentOffering >= 95 || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) && - GetCooldownRemainingTime(SerpentsIre) is >= 45 and <= 90)) + if ((!JustUsed(SerpentsIre, 3f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst + (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA + (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min + (gauge.SerpentOffering >= 100) || //overcap + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 return true; } return false; @@ -408,15 +394,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.SwiftskinsVenom)) return OriginalHook(Twinblood); } - - //Serpents Ire usage - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && - !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; } } } + //Serpents Ire usage + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && + CanWeave(Ouroboros) && + !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; + if (IsEnabled(CustomComboPreset.VPR_ST_RangedUptime) && LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) return (IsEnabled(CustomComboPreset.VPR_ST_RangedUptimeUncoiledFury) && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) @@ -442,28 +429,28 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Reawaken; //Overcap protection - if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && - ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom)) || - GetCooldownRemainingTime(SerpentsIre) <= GCD * 5) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) + if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && CappedOnCoils && + ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken + (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up return UncoiledFury; //Vicewinder Usage if (IsEnabled(CustomComboPreset.VPR_ST_CDs) && - IsEnabled(CustomComboPreset.VPR_ST_Vicewinder) && + IsEnabled(CustomComboPreset.VPR_ST_Vicewinder) && HasEffect(Buffs.Swiftscaled) && ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && - !VPRCheckTimers.IsVenomExpiring(6) && !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsComboExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return Vicewinder; // Uncoiled Fury usage if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && - LevelChecked(UncoiledFury) && + LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && ((gauge.RattlingCoilStacks > Config.VPR_ST_UncoiledFury_HoldCharges) || (enemyHP < uncoiledThreshold && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && + !VPRCheckTimers.IsComboExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return UncoiledFury; //Reawaken combo @@ -575,32 +562,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { - int SerpentsIreUsed = ActionWatching.CombatActions.Count(x => x == SerpentsIre); - - if (IsEnabled(CustomComboPreset.VPR_ST_Reawaken) && - LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && + if (LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6)) { - //even minutes - if ((WasLastAbility(SerpentsIre) && HasEffect(Buffs.ReadyToReawaken)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros)) || - HasEffect(Buffs.ReadyToReawaken) || - (gauge.SerpentOffering >= 95 && WasLastAbility(SerpentsIre))) - return true; - - // odd minutes - if (((SerpentsIreUsed <= 3 || SerpentsIreUsed > 4) && - gauge.SerpentOffering >= 50 && - GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || - (SerpentsIreUsed is 4 && - (gauge.SerpentOffering >= 95 || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) && - GetCooldownRemainingTime(SerpentsIre) is >= 45 and <= 90)) + if ((!JustUsed(SerpentsIre, 3f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst + (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA + (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min + (gauge.SerpentOffering >= 100) || //overcap + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 return true; } return false; From 42138f5f6033939cb99d172c45534a5a0cde8d8f Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Tue, 13 Aug 2024 07:37:09 +0100 Subject: [PATCH 066/142] Update Higanbana issue, adjust Meikyo usage --- XIVSlothCombo/Combos/PvE/SAM.cs | 30 +++++++++++++++++++----------- XIVSlothCombo/Core/IconReplacer.cs | 2 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/SAM.cs b/XIVSlothCombo/Combos/PvE/SAM.cs index bf0b4ea31..e117f4a56 100644 --- a/XIVSlothCombo/Combos/PvE/SAM.cs +++ b/XIVSlothCombo/Combos/PvE/SAM.cs @@ -1,5 +1,8 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; +using ECommons.DalamudServices; +using FFXIVClientStructs.FFXIV.Component.GUI; +using System; using System.Linq; using XIVSlothCombo.Combos.JobHelpers; using XIVSlothCombo.Combos.PvE.Content; @@ -70,7 +73,7 @@ public const ushort OgiNamikiriReady = 2959, Fuka = 1299, Fugetsu = 1298, - KaeshiSetsugekkaReady = 4216, + TsubameReady = 4216, TendoKaeshiSetsugekkaReady = 4218, KaeshiGokenReady = 3852, TendoKaeshiGokenReady = 4217, @@ -305,7 +308,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (oneSeal && enemyHP > 1 && LevelChecked(Traits.EnhancedMeikyoShishui2) && !HasEffect(Buffs.Tendo) && WasLastWeaponskill(Gekko)) || (twoSeal && !LevelChecked(MidareSetsugekka)) || (threeSeal && LevelChecked(MidareSetsugekka)) || - (threeSeal && LevelChecked(TendoSetsugekka) && !HasEffect(Buffs.KaeshiSetsugekkaReady)))) + (threeSeal && LevelChecked(TendoSetsugekka) && !HasEffect(Buffs.TsubameReady)))) return OriginalHook(Iaijutsu); } } @@ -371,7 +374,7 @@ private static bool UseTsubame() if (WasLastWeaponskill(TendoSetsugekka) && HasEffect(Buffs.TendoKaeshiSetsugekkaReady)) return true; - if (HasEffect(Buffs.KaeshiSetsugekkaReady)) + if (HasEffect(Buffs.TsubameReady)) { //1 and 2 min if ((MeikyoUsed is 0 or 1 or 2 or 3 or 4 or 9 or 10) && @@ -404,12 +407,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool oneSeal = OriginalHook(Iaijutsu) is Higanbana; bool twoSeal = OriginalHook(Iaijutsu) is TenkaGoken or TendoGoken; bool threeSeal = OriginalHook(Iaijutsu) is MidareSetsugekka or TendoSetsugekka; + int senCount = 0; + if (gauge.HasKa) senCount++; + if (gauge.HasGetsu) senCount++; + if (gauge.HasSetsu) senCount++; float enemyHP = GetTargetHPPercent(); bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); int kenkiOvercap = Config.SAM_ST_KenkiOvercapAmount; float shintenTreshhold = Config.SAM_ST_ExecuteThreshold; float HiganbanaThreshold = Config.SAM_ST_Higanbana_Threshold; float meikyostacks = GetBuffStacks(Buffs.MeikyoShisui); + bool startedCombo = lastComboMove == OriginalHook(Hakaze) || lastComboMove == OriginalHook(Jinpu) || lastComboMove == OriginalHook(Shifu); if (actionID is Hakaze or Gyofu) { @@ -438,14 +446,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return MeikyoShisui; //oGCDs - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { if (IsEnabled(CustomComboPreset.SAM_ST_CDs)) { //Meikyo Features if (IsEnabled(CustomComboPreset.SAM_ST_CDs_MeikyoShisui) && !HasEffect(Buffs.MeikyoShisui) && - ActionReady(MeikyoShisui) && JustUsed(MidareSetsugekka, 1)) + ActionReady(MeikyoShisui) && + GetCooldownRemainingTime(MeikyoShisui) <= 10 && + senCount < 3 && + !startedCombo) return MeikyoShisui; //Ikishoten Features @@ -512,13 +523,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if ((!IsEnabled(CustomComboPreset.SAM_ST_CDs_Iaijutsu_Movement) || (IsEnabled(CustomComboPreset.SAM_ST_CDs_Iaijutsu_Movement) && !IsMoving)) && - ((oneSeal && enemyHP > HiganbanaThreshold && - ((!TraitLevelChecked(Traits.EnhancedMeikyoShishui2) && GetDebuffRemainingTime(Debuffs.Higanbana) <= 10) || - (TraitLevelChecked(Traits.EnhancedMeikyoShishui2) && !HasEffect(Buffs.Tendo) && WasLastWeaponskill(Gekko)))) || + ((oneSeal && enemyHP > HiganbanaThreshold && GetDebuffRemainingTime(Debuffs.Higanbana) <= 10) || (twoSeal && !LevelChecked(MidareSetsugekka)) || (threeSeal && - (LevelChecked(MidareSetsugekka) || - (LevelChecked(TendoSetsugekka) && !HasEffect(Buffs.KaeshiSetsugekkaReady)))))) + (LevelChecked(MidareSetsugekka) && !HasEffect(Buffs.TsubameReady))))) return OriginalHook(Iaijutsu); } } @@ -592,7 +600,7 @@ private static bool UseTsubame() if (WasLastWeaponskill(TendoSetsugekka) && HasEffect(Buffs.TendoKaeshiSetsugekkaReady)) return true; - if (HasEffect(Buffs.KaeshiSetsugekkaReady)) + if (HasEffect(Buffs.TsubameReady)) { //1 and 2 min if ((MeikyoUsed is 0 or 1 or 2 or 3 or 4 or 9 or 10) && diff --git a/XIVSlothCombo/Core/IconReplacer.cs b/XIVSlothCombo/Core/IconReplacer.cs index 2f24d2f06..8f0c46496 100644 --- a/XIVSlothCombo/Core/IconReplacer.cs +++ b/XIVSlothCombo/Core/IconReplacer.cs @@ -69,7 +69,7 @@ private unsafe uint GetIconDetour(IntPtr actionManager, uint actionID) return OriginalHook(actionID); uint lastComboMove = ActionManager.Instance()->Combo.Action; - float comboTime = ActionManager.Instance()->Combo.Timer; + float comboTime = ActionManager.Instance()->Combo.Action != 0 ? ActionManager.Instance()->Combo.Timer : 0; byte level = Svc.ClientState.LocalPlayer?.Level ?? 0; foreach (CustomCombo? combo in customCombos) From cb45ab1879249882d0aebcee40e1a7f949272ee6 Mon Sep 17 00:00:00 2001 From: Ethan Henderson Date: Tue, 13 Aug 2024 00:41:10 -0600 Subject: [PATCH 067/142] Clarify Lightspeed option change --- XIVSlothCombo/Combos/CustomComboPreset.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..c83e436b9 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -185,7 +185,7 @@ public enum CustomComboPreset AST_ST_DPS_CombustUptime = 1018, [ParentCombo(AST_ST_DPS)] - [CustomComboInfo("Lightspeed Weave Option", "Adds Lightspeed", AST.JobID, 2, "", "")] + [CustomComboInfo("Lightspeed Weave Option", "Adds Lightspeed when moving", AST.JobID, 2, "", "")] AST_DPS_LightSpeed = 1020, [ParentCombo(AST_ST_DPS)] @@ -224,7 +224,7 @@ public enum CustomComboPreset AST_AOE_DPS = 1041, [ParentCombo(AST_AOE_DPS)] - [CustomComboInfo("Lightspeed Weave Option", "Adds Lightspeed", AST.JobID, 2, "", "")] + [CustomComboInfo("Lightspeed Weave Option", "Adds Lightspeed when moving", AST.JobID, 2, "", "")] AST_AOE_LightSpeed = 1048, [ParentCombo(AST_AOE_DPS)] @@ -4869,4 +4869,4 @@ The three digets after RDM.JobID can be used to reorder items in the list #endregion } -} \ No newline at end of file +} From 87e44dc00a07fbf01da401c606ee248950df2575 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Tue, 13 Aug 2024 07:53:21 +0100 Subject: [PATCH 068/142] Replicate changes from advanced to simple --- XIVSlothCombo/Combos/JobHelpers/SAM.cs | 28 +++++++++++++++++++++++++- XIVSlothCombo/Combos/PvE/SAM.cs | 20 +++++++++--------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/SAM.cs b/XIVSlothCombo/Combos/JobHelpers/SAM.cs index f42aa5756..174a8c014 100644 --- a/XIVSlothCombo/Combos/JobHelpers/SAM.cs +++ b/XIVSlothCombo/Combos/JobHelpers/SAM.cs @@ -1,4 +1,6 @@ -using ECommons.DalamudServices; +using Dalamud.Game.ClientState.JobGauge.Types; +using ECommons.DalamudServices; +using FFXIVClientStructs.FFXIV.Client.Game; using XIVSlothCombo.Combos.JobHelpers.Enums; using XIVSlothCombo.Combos.PvE; using XIVSlothCombo.CustomComboNS.Functions; @@ -6,6 +8,30 @@ namespace XIVSlothCombo.Combos.JobHelpers { + internal class SAMHelper : SAM + { + internal static int SenCount => GetSenCount(); + private static int GetSenCount() + { + var gauge = CustomComboFunctions.GetJobGauge(); + var senCount = 0; + if (gauge.HasGetsu) senCount++; + if (gauge.HasSetsu) senCount++; + if (gauge.HasKa) senCount++; + + return senCount; + } + internal static bool ComboStarted => GetComboStarted(); + private unsafe static bool GetComboStarted() + { + var comboAction = ActionManager.Instance()->Combo.Action; + if (comboAction == CustomComboFunctions.OriginalHook(Hakaze) || comboAction == CustomComboFunctions.OriginalHook(Jinpu) || comboAction == CustomComboFunctions.OriginalHook(Shifu)) + return true; + return false; + } + } + + internal class SAMOpenerLogic : SAM { private static bool HasCooldowns() diff --git a/XIVSlothCombo/Combos/PvE/SAM.cs b/XIVSlothCombo/Combos/PvE/SAM.cs index e117f4a56..b1906a288 100644 --- a/XIVSlothCombo/Combos/PvE/SAM.cs +++ b/XIVSlothCombo/Combos/PvE/SAM.cs @@ -221,7 +221,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim float enemyHP = GetTargetHPPercent(); bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); float meikyostacks = GetBuffStacks(Buffs.MeikyoShisui); - + if (actionID is Hakaze or Gyofu) { if (IsEnabled(CustomComboPreset.SAM_Variant_Cure) && @@ -247,7 +247,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (CanWeave(actionID)) { //Meikyo Features - if (ActionReady(MeikyoShisui) && WasLastWeaponskill(MidareSetsugekka)) + if (!HasEffect(Buffs.MeikyoShisui) && + ActionReady(MeikyoShisui) && + GetCooldownRemainingTime(MeikyoShisui) <= 10 && + SAMHelper.SenCount < 3 && + !SAMHelper.ComboStarted) return MeikyoShisui; //Ikishoten Features @@ -304,8 +308,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(TsubameGaeshi); if (!IsMoving && - ((oneSeal && GetDebuffRemainingTime(Debuffs.Higanbana) <= 10 && enemyHP > 1 && !LevelChecked(Traits.EnhancedMeikyoShishui2)) || - (oneSeal && enemyHP > 1 && LevelChecked(Traits.EnhancedMeikyoShishui2) && !HasEffect(Buffs.Tendo) && WasLastWeaponskill(Gekko)) || + ((oneSeal && GetDebuffRemainingTime(Debuffs.Higanbana) <= 10) || (twoSeal && !LevelChecked(MidareSetsugekka)) || (threeSeal && LevelChecked(MidareSetsugekka)) || (threeSeal && LevelChecked(TendoSetsugekka) && !HasEffect(Buffs.TsubameReady)))) @@ -407,17 +410,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool oneSeal = OriginalHook(Iaijutsu) is Higanbana; bool twoSeal = OriginalHook(Iaijutsu) is TenkaGoken or TendoGoken; bool threeSeal = OriginalHook(Iaijutsu) is MidareSetsugekka or TendoSetsugekka; - int senCount = 0; - if (gauge.HasKa) senCount++; - if (gauge.HasGetsu) senCount++; - if (gauge.HasSetsu) senCount++; float enemyHP = GetTargetHPPercent(); bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); int kenkiOvercap = Config.SAM_ST_KenkiOvercapAmount; float shintenTreshhold = Config.SAM_ST_ExecuteThreshold; float HiganbanaThreshold = Config.SAM_ST_Higanbana_Threshold; float meikyostacks = GetBuffStacks(Buffs.MeikyoShisui); - bool startedCombo = lastComboMove == OriginalHook(Hakaze) || lastComboMove == OriginalHook(Jinpu) || lastComboMove == OriginalHook(Shifu); if (actionID is Hakaze or Gyofu) { @@ -455,8 +453,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim !HasEffect(Buffs.MeikyoShisui) && ActionReady(MeikyoShisui) && GetCooldownRemainingTime(MeikyoShisui) <= 10 && - senCount < 3 && - !startedCombo) + SAMHelper.SenCount < 3 && + !SAMHelper.ComboStarted) return MeikyoShisui; //Ikishoten Features From 29cc3fa960ffb8aba98eb917de30c504d2bca6e7 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Tue, 13 Aug 2024 08:31:10 +0100 Subject: [PATCH 069/142] Senei & Oki Namikiri now more trigger happy --- XIVSlothCombo/Combos/PvE/SAM.cs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/SAM.cs b/XIVSlothCombo/Combos/PvE/SAM.cs index b1906a288..ec6c61b25 100644 --- a/XIVSlothCombo/Combos/PvE/SAM.cs +++ b/XIVSlothCombo/Combos/PvE/SAM.cs @@ -266,7 +266,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //Senei Features - if (gauge.Kenki >= 25 && ActionReady(Senei) && HasEffect(Buffs.MeikyoShisui) && + if (gauge.Kenki >= 25 && ActionReady(Senei) && HasEffect(Buffs.Fugetsu) && HasEffect(Buffs.Fuka)) return Senei; @@ -293,12 +293,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.Fugetsu) && HasEffect(Buffs.Fuka)) { //Ogi Namikiri Features - if (!IsMoving && - LevelChecked(OgiNamikiri) && - (gauge.Kaeshi == Kaeshi.NAMIKIRI || - (HasEffect(Buffs.OgiNamikiriReady) && !HasEffect(Buffs.ZanshinReady) && - ((meikyostacks is 2 && WasLastWeaponskill(Higanbana)) || - GetBuffRemainingTime(Buffs.OgiNamikiriReady) <= 6)))) + if (ActionReady(OgiNamikiri) && + (gauge.Kaeshi == Kaeshi.NAMIKIRI || HasEffect(Buffs.OgiNamikiriReady))) return OriginalHook(OgiNamikiri); // Iaijutsu Features @@ -470,7 +466,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Senei Features if (IsEnabled(CustomComboPreset.SAM_ST_CDs_Senei) && - gauge.Kenki >= 25 && ActionReady(Senei) && HasEffect(Buffs.MeikyoShisui) && + gauge.Kenki >= 25 && ActionReady(Senei) && HasEffect(Buffs.Fugetsu) && HasEffect(Buffs.Fuka)) return Senei; @@ -506,11 +502,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.SAM_ST_CDs_OgiNamikiri) && (!IsEnabled(CustomComboPreset.SAM_ST_CDs_OgiNamikiri_Movement) || (IsEnabled(CustomComboPreset.SAM_ST_CDs_OgiNamikiri_Movement) && !IsMoving)) && - LevelChecked(OgiNamikiri) && - (gauge.Kaeshi == Kaeshi.NAMIKIRI || - (HasEffect(Buffs.OgiNamikiriReady) && !HasEffect(Buffs.ZanshinReady) && - ((meikyostacks is 2 && WasLastWeaponskill(Higanbana)) || - GetBuffRemainingTime(Buffs.OgiNamikiriReady) <= 6)))) + ActionReady(OgiNamikiri) && + (gauge.Kaeshi == Kaeshi.NAMIKIRI || HasEffect(Buffs.OgiNamikiriReady))) return OriginalHook(OgiNamikiri); // Iaijutsu Features From 0fe32f598a530588fba728cd841132f9514dcff1 Mon Sep 17 00:00:00 2001 From: Sam Hill Date: Tue, 13 Aug 2024 11:45:41 +0100 Subject: [PATCH 070/142] Remove AoE heal threshold config --- XIVSlothCombo/Combos/PvE/MNK.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index f0e9b1c05..c20f168b7 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -108,8 +108,6 @@ public static class Config public static UserInt MNK_ST_SecondWind_Threshold = new("MNK_ST_SecondWindThreshold", 25), MNK_ST_Bloodbath_Threshold = new("MNK_ST_BloodbathThreshold", 40), - MNK_AoE_SecondWind_Threshold = new("MNK_AoE_SecondWindThreshold", 25), - MNK_AoE_Bloodbath_Threshold = new("MNK_AoE_BloodbathThreshold", 40), MNK_SelectedOpener = new("MNK_SelectedOpener"), MNK_VariantCure = new("MNK_Variant_Cure"); } @@ -539,9 +537,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(EnlightenedMeditation); } - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoE_SecondWind_Threshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + if (PlayerHealthPercentageHp() <= 25 && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_AoE_Bloodbath_Threshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + if (PlayerHealthPercentageHp() <= 40 && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) return All.Bloodbath; } From 0e2c2e7a19e49af4b8e69003d3c6ac16afca1d65 Mon Sep 17 00:00:00 2001 From: edewen Date: Tue, 13 Aug 2024 11:44:02 -0400 Subject: [PATCH 071/142] Swapped priority on apex and dot maint someone reported apex was higher priority than jaw on heavy to SS feature. swapped to fix --- XIVSlothCombo/Combos/PvE/BRD.cs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index a4841b2cf..61a613f92 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -100,16 +100,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is HeavyShot or BurstShot) { - if (IsEnabled(CustomComboPreset.BRD_ApexST)) - { - BRDGauge? gauge = GetJobGauge(); - - if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100) - return ApexArrow; - if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) - return BlastArrow; - } - + if (IsEnabled(CustomComboPreset.BRD_DoTMaintainance)) { bool venomous = TargetHasEffect(Debuffs.VenomousBite); @@ -134,6 +125,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + if (IsEnabled(CustomComboPreset.BRD_ApexST)) + { + BRDGauge? gauge = GetJobGauge(); + + if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100) + return ApexArrow; + if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) + return BlastArrow; + } + if (HasEffect(Buffs.HawksEye)) return LevelChecked(RefulgentArrow) ? RefulgentArrow From 7099a8132c10e8d2c984275fb514e66fc185f0be Mon Sep 17 00:00:00 2001 From: Kaeris Date: Tue, 13 Aug 2024 16:48:50 +0100 Subject: [PATCH 072/142] Housekeeping --- XIVSlothCombo/Window/Tabs/Debug.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 910bae2af..1590cbd4e 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -12,24 +12,23 @@ using XIVSlothCombo.Services; using Status = Dalamud.Game.ClientState.Statuses.Status; - namespace XIVSlothCombo.Window.Tabs { internal class Debug : ConfigWindow { + public static int debugNum = 0; + internal class DebugCombo : CustomCombo { protected internal override CustomComboPreset Preset { get; } - protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) => actionID; } - public static int debugNum = 0; internal unsafe static new void Draw() { - IPlayerCharacter? LocalPlayer = Svc.ClientState.LocalPlayer; DebugCombo? comboClass = new(); - uint[] statusBlacklist = { 360, 361, 362, 363, 364, 365, 366, 367, 368 }; // Prevents status durations from being displayed + IPlayerCharacter? LocalPlayer = Svc.ClientState.LocalPlayer; + uint[] statusBlacklist = { 360, 361, 362, 363, 364, 365, 366, 367, 368 }; // Duration will not be displayed for these status effects // Custom Styling static void CustomStyleText(string label, object? value) From 6657e44b01f8018fa5e1d97e825e6c1bf4ee6d28 Mon Sep 17 00:00:00 2001 From: Kage Date: Tue, 13 Aug 2024 18:12:08 +0200 Subject: [PATCH 073/142] fix weaving issue for all different recast speeds --- XIVSlothCombo/Combos/PvE/VPR.cs | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index 7eb0f10a4..caffc6af6 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -1,7 +1,5 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; -using System; -using System.Linq; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Data; @@ -137,7 +135,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; //All Weaves - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { // Death Rattle if (LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) @@ -163,11 +161,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.SwiftskinsVenom) && InMeleeRange()) return OriginalHook(Twinblood); } - } - //Serpents Ire usage - if (!CappedOnCoils && CanWeave(Ouroboros) && ActionReady(SerpentsIre)) - return SerpentsIre; + //Serpents Ire usage + if (!CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; + + } if (LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) return VPRCheckRattlingCoils.HasRattlingCoilStack(gauge) @@ -204,12 +203,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Uncoiled Fury usage if (LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && - (((gauge.RattlingCoilStacks > 1) || + ((gauge.RattlingCoilStacks > 1) || (enemyHP < 1 && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6))) + !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) return UncoiledFury; //Reawaken combo @@ -358,7 +357,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //All Weaves - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { // Death Rattle if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && @@ -394,15 +393,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.SwiftskinsVenom)) return OriginalHook(Twinblood); } + + //Serpents Ire usage + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && + !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; } } } - //Serpents Ire usage - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && - CanWeave(Ouroboros) && - !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; if (IsEnabled(CustomComboPreset.VPR_ST_RangedUptime) && LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) @@ -594,7 +593,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is SteelMaw) { - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { // Death Rattle if (LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is LastLash) @@ -765,7 +764,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is SteelMaw) { - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { // Death Rattle if (IsEnabled(CustomComboPreset.VPR_AoE_SerpentsTail) && From 46bcd7bfe95ad0ef0ca3fd770ad3444979f1179b Mon Sep 17 00:00:00 2001 From: edewen Date: Tue, 13 Aug 2024 12:53:17 -0400 Subject: [PATCH 074/142] Adding all options to advanced Added ogcd options to advanced, got rid of the unintuitive remove apex and added an add apex to advanced. cleared up the conflicting that weren't really conflicts. Shift apex below dot refresh in ironjaws feature for priority reasons. put a buff radiant requirement to advanced in order to encore. --- XIVSlothCombo/Combos/CustomComboPreset.cs | 35 +++++++++++++++-------- XIVSlothCombo/Combos/PvE/BRD.cs | 35 ++++++++++++----------- 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index bc1c0bac3..f74a3a931 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -620,21 +620,21 @@ public enum CustomComboPreset #region BARD [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] - [ConflictingCombos(BRD_StraightShotUpgrade, BRD_ST_oGCD, BRD_IronJaws, BRD_IronJaws_Alternate, BRD_ST_AdvMode)] + [ConflictingCombos(BRD_ST_AdvMode)] [CustomComboInfo("Simple Mode - Single Target", "Adds every single target ability to one button,\nIf there are DoTs on target, will try to maintain their uptime.", BRD.JobID)] BRD_ST_SimpleMode = 3036, - [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD, BRD_AoE_AdvMode)] + [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_AdvMode)] [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] [CustomComboInfo("Simple Mode - AoE", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] BRD_AoE_SimpleMode = 3035, [ReplaceSkill(BRD.HeavyShot, BRD.BurstShot)] - [ConflictingCombos(BRD_StraightShotUpgrade, BRD_ST_oGCD, BRD_IronJaws, BRD_IronJaws_Alternate, BRD_ST_SimpleMode)] + [ConflictingCombos(BRD_ST_SimpleMode)] [CustomComboInfo("Advanced Mode - Single Target", "Adds every single target ability to one button,\nIf there are DoTs on target, will try to maintain their uptime.", BRD.JobID)] BRD_ST_AdvMode = 3009, - [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_oGCD, BRD_AoE_SimpleMode)] + [ConflictingCombos(BRD_AoE_Combo, BRD_AoE_SimpleMode)] [ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)] [CustomComboInfo("Advanced Mode - AoE", "Weaves oGCDs onto Quick Nock/Ladonsbite.", BRD.JobID)] BRD_AoE_AdvMode = 3015, @@ -653,12 +653,12 @@ public enum CustomComboPreset BRD_ApexST = 3034, [ReplaceSkill(BRD.IronJaws)] - [ConflictingCombos(BRD_IronJaws_Alternate, BRD_ST_AdvMode, BRD_ST_SimpleMode)] + [ConflictingCombos(BRD_IronJaws_Alternate)] [CustomComboInfo("Iron Jaws Feature", "Iron Jaws is replaced with Caustic Bite/Stormbite if one or both are not up.\nAlternates between the two if Iron Jaws isn't available.", BRD.JobID)] BRD_IronJaws = 3003, [ReplaceSkill(BRD.IronJaws)] - [ConflictingCombos(BRD_IronJaws, BRD_ST_AdvMode, BRD_ST_SimpleMode)] + [ConflictingCombos(BRD_IronJaws)] [CustomComboInfo("Iron Jaws Alternate Feature", "Iron Jaws is replaced with Caustic Bite/Stormbite if one or both are not up.\nIron Jaws will only show up when debuffs are about to expire.", BRD.JobID)] BRD_IronJaws_Alternate = 3004, @@ -667,12 +667,10 @@ public enum CustomComboPreset BRD_Apex = 3005, [ReplaceSkill(BRD.Bloodletter)] - [ConflictingCombos(BRD_ST_AdvMode, BRD_ST_SimpleMode)] [CustomComboInfo("Single Target oGCD Feature", "All oGCD's on Bloodletter/Heartbreakshot (+ Songs rotation) depending on their CD.", BRD.JobID)] BRD_ST_oGCD = 3006, - [ReplaceSkill(BRD.RainOfDeath)] - [ConflictingCombos(BRD_AoE_AdvMode, BRD_AoE_SimpleMode)] + [ReplaceSkill(BRD.RainOfDeath)] [CustomComboInfo("AoE oGCD Feature", "All AoE oGCD's on Rain of Death depending on their CD.", BRD.JobID)] BRD_AoE_oGCD = 3007, @@ -705,6 +703,14 @@ public enum CustomComboPreset [CustomComboInfo("Bard Song Option", "Weave Songs on the Advanced AoE.", BRD.JobID)] BRD_AoE_Adv_Songs = 3016, + [ParentCombo(BRD_AoE_AdvMode)] + [CustomComboInfo("oGcd Option", "Weave Sidewinder, Empyreal arrow, Rain of death, and Pitch perfect when available.", BRD.JobID)] + BRD_AoE_Adv_oGCD = 3037, + + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("oGcd Option", "Weave Sidewinder, Empyreal arrow, Rain of death, and Pitch perfect when available.", BRD.JobID)] + BRD_ST_Adv_oGCD = 3038, + [ParentCombo(BRD_ST_AdvMode)] [CustomComboInfo("Buffs Option", "Adds buffs onto the Advanced Bard feature.", BRD.JobID)] BRD_Adv_Buffs = 3017, @@ -721,8 +727,13 @@ public enum CustomComboPreset [CustomComboInfo("Interrupt Option", "Uses interrupt during the rotation if applicable.", BRD.JobID)] BRD_Adv_Interrupt = 3020, - [CustomComboInfo("Disable Apex Arrow Feature", "Removes Apex Arrow from Adv Bard and AoE Feature.", BRD.JobID)] - BRD_RemoveApexArrow = 3021, + [ParentCombo(BRD_ST_AdvMode)] + [CustomComboInfo("Apex Arrow Option", "Adds Apex Arrow and Blast shot", BRD.JobID)] + BRD_ST_ApexArrow = 3021, + + [ParentCombo(BRD_AoE_AdvMode)] + [CustomComboInfo("Apex Arrow Option", "Adds Apex Arrow and Blast shot", BRD.JobID)] + BRD_Aoe_ApexArrow = 3039, //[ConflictingCombos(BardoGCDSingleTargetFeature)] //[ParentCombo(SimpleBardFeature)] @@ -770,7 +781,7 @@ public enum CustomComboPreset [ParentCombo(BRD_AoE_AdvMode)] [CustomComboInfo("AoE No Waste Option", "Adds enemy health checking on targetted mob for songs.\nThey will not be reapplied if less than specified.", BRD.JobID)] BRD_AoE_Adv_NoWaste = 3033, - // Last value = 3036 + // Last value = 3038 #endregion diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index 61a613f92..c4e80f1bd 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -153,16 +153,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is IronJaws) { - if (IsEnabled(CustomComboPreset.BRD_IronJawsApex) && LevelChecked(ApexArrow)) - { - BRDGauge? gauge = GetJobGauge(); - - if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) - return BlastArrow; - if (gauge.SoulVoice == 100 && IsOffCooldown(ApexArrow)) - return ApexArrow; - } - + if (!LevelChecked(IronJaws)) { Status? venomous = FindTargetEffect(Debuffs.VenomousBite); @@ -206,6 +197,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return CausticBite; if (LevelChecked(Stormbite)) return Stormbite; + + if (IsEnabled(CustomComboPreset.BRD_IronJawsApex) && LevelChecked(ApexArrow)) + { + BRDGauge? gauge = GetJobGauge(); + + if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) + return BlastArrow; + if (gauge.SoulVoice == 100 && IsOffCooldown(ApexArrow)) + return ApexArrow; + } } return actionID; @@ -419,7 +420,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } - if (canWeave) + if (canWeave && IsEnabled(CustomComboPreset.BRD_AoE_Adv_oGCD)) { float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); float empyrealCD = GetCooldownRemainingTime(EmpyrealArrow); @@ -476,7 +477,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(RainOfDeath); } //Moved Below ogcds as it was preventing them from happening. - if (HasEffect(Buffs.RadiantEncoreReady) && !JustUsed(RadiantFinale) && GetCooldownElapsed(BattleVoice) >= 4.2f) + if (HasEffect(Buffs.RadiantEncoreReady) && !JustUsed(RadiantFinale) && GetCooldownElapsed(BattleVoice) >= 4.2f && IsEnabled(CustomComboPreset.BRD_AoE_Adv_Buffs)) return OriginalHook(RadiantEncore); // healing - please move if not appropriate priority @@ -493,7 +494,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (wideVolleyReady) return OriginalHook(WideVolley); - if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100 && !IsEnabled(CustomComboPreset.BRD_RemoveApexArrow)) + if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100 && IsEnabled(CustomComboPreset.BRD_Aoe_ApexArrow)) return ApexArrow; if (blastArrowReady) return BlastArrow; @@ -560,7 +561,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim BRDGauge? gauge = GetJobGauge(); bool blastReady = LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady); - if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100 && !IsEnabled(CustomComboPreset.BRD_RemoveApexArrow)) + if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100) return ApexArrow; if (blastReady) return BlastArrow; @@ -720,7 +721,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - if (canWeave) + if (canWeave && IsEnabled(CustomComboPreset.BRD_ST_Adv_oGCD)) { float battleVoiceCD = GetCooldownRemainingTime(BattleVoice); float empyrealCD = GetCooldownRemainingTime(EmpyrealArrow); @@ -788,7 +789,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } //Moved below weaves bc roobert says it is blocking his weaves from happening - if (HasEffect(Buffs.RadiantEncoreReady) && !JustUsed(RadiantFinale) && GetCooldownElapsed(BattleVoice) >= 4.2f) + if (HasEffect(Buffs.RadiantEncoreReady) && !JustUsed(RadiantFinale) && GetCooldownElapsed(BattleVoice) >= 4.2f && IsEnabled(CustomComboPreset.BRD_Adv_BuffsRadiant)) return OriginalHook(RadiantEncore); if (isEnemyHealthHigh) @@ -855,7 +856,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - if (!IsEnabled(CustomComboPreset.BRD_RemoveApexArrow)) + if (IsEnabled(CustomComboPreset.BRD_ST_ApexArrow)) { if (LevelChecked(BlastArrow) && HasEffect(Buffs.BlastArrowReady)) return BlastArrow; From ab0ab87a2e2d694c1424318eca9058e2bab4b837 Mon Sep 17 00:00:00 2001 From: edewen Date: Tue, 13 Aug 2024 13:31:27 -0400 Subject: [PATCH 075/142] A few more blocks of unchecked abilities made sure radiant encore required use checkbox for radiant finale, and resonant required the checkbox for buffs. --- XIVSlothCombo/Combos/PvE/BRD.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index c4e80f1bd..c4d354295 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -496,11 +496,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(WideVolley); if (LevelChecked(ApexArrow) && gauge.SoulVoice == 100 && IsEnabled(CustomComboPreset.BRD_Aoe_ApexArrow)) return ApexArrow; - if (blastArrowReady) + if (blastArrowReady && IsEnabled(CustomComboPreset.BRD_Aoe_ApexArrow)) return BlastArrow; - if (resonantArrowReady) + if (resonantArrowReady && IsEnabled(CustomComboPreset.BRD_AoE_Adv_Buffs)) return ResonantArrow; - if (HasEffect(Buffs.RadiantEncoreReady)) + if (HasEffect(Buffs.RadiantEncoreReady) && IsEnabled(CustomComboPreset.BRD_AoE_Adv_Buffs)) return OriginalHook(RadiantEncore); } @@ -879,7 +879,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.HawksEye) || HasEffect(Buffs.Barrage)) return OriginalHook(StraightShot); - if (HasEffect(Buffs.ResonantArrowReady)) + if (HasEffect(Buffs.ResonantArrowReady) && IsEnabled(CustomComboPreset.BRD_Adv_Buffs)) return ResonantArrow; } From 82ff9ee68bb80462afbf47475fd3c8a904cd581f Mon Sep 17 00:00:00 2001 From: ace Date: Tue, 13 Aug 2024 16:51:32 -0700 Subject: [PATCH 076/142] menu overhaul --- XIVSlothCombo/Combos/CustomComboPreset.cs | 105 ++- XIVSlothCombo/Combos/PvE/GNB.cs | 846 ++++++++++++---------- 2 files changed, 521 insertions(+), 430 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index ee7b2c1df..d053a8c92 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -860,7 +860,7 @@ public enum CustomComboPreset // Devilment --> Starfall [ReplaceSkill(DNC.Devilment)] [ConflictingCombos(DNC_ST_AdvancedMode, DNC_AoE_AdvancedMode)] - [CustomComboInfo("Devilment to Starfall Feature", "Change Devilment into Starfall Dance after use.", DNC.JobID)] + [CustomComboInfo("Devilment to Starfall Feature", "Change Devilment into Starfall Dance after No Mercy is used.", DNC.JobID)] DNC_Starfall_Devilment = 4038, [ReplaceSkill(DNC.StandardStep, DNC.TechnicalStep)] @@ -1495,14 +1495,14 @@ public enum CustomComboPreset #region GUNBREAKER #region Simple ST - [ConflictingCombos(GNB_ST_Advanced, GNB_NoMercy_Cooldowns)] + [ConflictingCombos(GNB_ST_Advanced, GNB_NM_Features)] [ReplaceSkill(GNB.KeenEdge)] [CustomComboInfo("Simple Mode - Single Target", "Replace Keen Edge with its combo chain.\n This is the ideal selection for newcomers to the job.", GNB.JobID)] GNB_ST_Simple = 7001, #endregion #region Simple AOE - [ConflictingCombos(GNB_AoE_Advanced, GNB_NoMercy_Cooldowns)] + [ConflictingCombos(GNB_AoE_Advanced, GNB_NM_Features)] [ReplaceSkill(GNB.DemonSlice)] [CustomComboInfo("Simple Mode - AoE", "Replace Demon Slice with its combo chain.\n This is the ideal selection for newcomers to the job.", GNB.JobID)] GNB_AoE_Simple = 7002, @@ -1532,10 +1532,10 @@ public enum CustomComboPreset #region Cooldowns [ParentCombo(GNB_ST_Advanced)] - [CustomComboInfo("Cooldowns Option", "Adds various cooldowns to the main combo when under No Mercy or when No Mercy is on cooldown.", GNB.JobID)] + [CustomComboInfo("Cooldowns Option", "Adds various cooldowns to the main combo.", GNB.JobID)] GNB_ST_Advanced_CooldownsGroup = 7007, - [ConflictingCombos(GNB_NoMercy_Cooldowns)] + [ConflictingCombos(GNB_NM_Features)] [ParentCombo(GNB_ST_Advanced_CooldownsGroup)] [CustomComboInfo("No Mercy Option", "Adds No Mercy to the main combo when at full ammo.", GNB.JobID)] GNB_ST_NoMercy = 7008, @@ -1577,7 +1577,7 @@ public enum CustomComboPreset [CustomComboInfo("Advanced Mode - AoE", "Replace Demon Slice with its combo chain.", GNB.JobID)] GNB_AoE_Advanced = 7200, - [ConflictingCombos(GNB_NoMercy_Cooldowns)] + [ConflictingCombos(GNB_NM_Features)] [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("No Mercy Option", "Adds No Mercy to the AoE combo when it's available.", GNB.JobID)] GNB_AoE_NoMercy = 7201, @@ -1591,7 +1591,7 @@ public enum CustomComboPreset GNB_AoE_BowShock = 7203, [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("Bloodfest AoE Option", "Adds Bloodfest to the AoE combo when it's available.\n Will spend cartridges through Fated Circle to prepare for Bloodfest usage.", GNB.JobID)] + [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to the AoE combo when it's available.\n Will spend cartridges through Fated Circle to prepare for Bloodfest usage.", GNB.JobID)] GNB_AoE_Bloodfest = 7204, [ParentCombo(GNB_AoE_Advanced)] @@ -1599,52 +1599,57 @@ public enum CustomComboPreset GNB_AOE_SonicBreak = 7205, [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("Double Down AoE Option", "Adds Double Down to the AoE combo when it's available and you have 2 or more cartridges.", GNB.JobID)] + [CustomComboInfo("Double Down Option", "Adds Double Down to the AoE combo when it's available and you have 2 or more cartridges.", GNB.JobID)] GNB_AoE_DoubleDown = 7206, + [ParentCombo(GNB_AoE_Advanced)] + [CustomComboInfo("Reign Combo Option", "Adds Reign/Noble/LionHeart to the AoE combo when appropriate.", GNB.JobID)] + GNB_AoE_Reign = 7207, + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Ammo Overcap Option", "Adds Fated Circle to the AoE combo when about to overcap.", GNB.JobID)] - GNB_AOE_Overcap = 7207, + GNB_AOE_Overcap = 7208, #endregion #region Gnashing Fang [ReplaceSkill(GNB.GnashingFang)] - [CustomComboInfo("Gnashing Fang Features", "Collection of Gnashing Fang related features.", GNB.JobID)] - GNB_GF_Continuation = 7300, + [CustomComboInfo("Gnashing Fang Features", "Collection of Gnashing Fang related features.\n Enable all for this to be an all-in-one Single Target Burst button.", GNB.JobID)] + GNB_GF_Features = 7300, - [ParentCombo(GNB_GF_Continuation)] - [CustomComboInfo("Cooldowns Option", "Adds Bloodfest/Bow Shock/Blasting Zone on Gnashing Fang, order dependent on No Mercy buff.", GNB.JobID)] - GNB_GF_Cooldowns = 7301, + [ParentCombo(GNB_GF_Features)] + [CustomComboInfo("Continuation Option", "Adds Continuation to Gnashing Fang when available.", GNB.JobID)] + GNB_GF_Continuation = 7301, - [ParentCombo(GNB_GF_Continuation)] + [ConflictingCombos(GNB_ST_NoMercy)] + [ParentCombo(GNB_GF_Features)] [CustomComboInfo("No Mercy Option", "Adds No Mercy to Gnashing Fang when available.", GNB.JobID)] GNB_GF_NoMercy = 7302, - [ParentCombo(GNB_GF_Continuation)] + [ParentCombo(GNB_GF_Features)] [CustomComboInfo("Danger/Blasting Zone Option", "Adds Danger/Blasting Zone to Gnashing Fang when available.", GNB.JobID)] GNB_GF_Zone = 7303, - [ParentCombo(GNB_GF_Continuation)] + [ParentCombo(GNB_GF_Features)] [CustomComboInfo("Bow Shock Option", "Adds Bow Shock to Gnashing Fang when available.", GNB.JobID)] GNB_GF_BowShock = 7304, - [ParentCombo(GNB_GF_Continuation)] + [ParentCombo(GNB_GF_Features)] [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to Gnashing Fang when available.", GNB.JobID)] GNB_GF_Bloodfest = 7305, - [ParentCombo(GNB_GF_Continuation)] + [ParentCombo(GNB_GF_Features)] [CustomComboInfo("Sonic Break Option", "Adds Sonic Break on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] GNB_GF_SonicBreak = 7306, - [ParentCombo(GNB_GF_Continuation)] + [ParentCombo(GNB_GF_Features)] [CustomComboInfo("Double Down Option", "Adds Double Down to Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] GNB_GF_DoubleDown = 7307, - [ParentCombo(GNB_GF_Continuation)] + [ParentCombo(GNB_GF_Features)] [CustomComboInfo("Reign combo Option", "Adds Reign combo on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] GNB_GF_Reign = 7308, - [ParentCombo(GNB_GF_Continuation)] + [ParentCombo(GNB_GF_Features)] [CustomComboInfo("Burst Strike Option", "Adds Burst Strike on Gnashing Fang under No Mercy when appropriate.", GNB.JobID)] GNB_GF_BurstStrike = 7309, @@ -1656,53 +1661,73 @@ public enum CustomComboPreset GNB_BS = 7400, [ParentCombo(GNB_BS)] - [CustomComboInfo("Hypervelocity Option", "Adds Continuation (Hypervelocity) to Burst Strike.", GNB.JobID)] + [CustomComboInfo("Hypervelocity Option", "Adds Continuation (Hypervelocity) to Burst Strike when available.", GNB.JobID)] GNB_BS_Continuation = 7401, [ParentCombo(GNB_BS)] - [CustomComboInfo("Bloodfest Option", "Replace Burst Strike with Bloodfest if under No Mercy & you have 0 cartridges.", GNB.JobID)] + [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to Burst Strike when approrpiate.", GNB.JobID)] GNB_BS_Bloodfest = 7402, [ParentCombo(GNB_BS)] - [CustomComboInfo("Double Down Option", "Adds Double Down to Burst Strike when under No Mercy and ammo is above 2.", GNB.JobID)] + [CustomComboInfo("Double Down Option", "Adds Double Down to Burst Strike when appropriate.", GNB.JobID)] GNB_BS_DoubleDown = 7403, [ParentCombo(GNB_BS)] - [CustomComboInfo("Reign Combo Option", "Adds Reign/Noble/Lionheart to Burst Strike when under No Mercy and when Double Down & Gnashing Fang are on cooldown.", GNB.JobID)] + [CustomComboInfo("Reign Combo Option", "Adds Reign/Noble/Lionheart to Burst Strike when appropriate.", GNB.JobID)] GNB_BS_Reign = 7404, #endregion #region No Mercy - [ConflictingCombos(GNB_ST_NoMercy, GNB_AoE_NoMercy, GNB_ST_Simple, GNB_AoE_Simple)] + [ConflictingCombos(GNB_ST_Simple, GNB_AoE_Simple, GNB_ST_NoMercy, GNB_AoE_NoMercy, GNB_GF_NoMercy)] [ReplaceSkill(GNB.NoMercy)] [CustomComboInfo("No Mercy Features", "Collection of No Mercy related features.", GNB.JobID)] - GNB_NoMercy_Cooldowns = 7500, + GNB_NM_Features = 7500, + + [ParentCombo(GNB_NM_Features)] + [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to No Mercy when appropriate.", GNB.JobID)] + GNB_NM_Bloodfest = 7501, + + [ParentCombo(GNB_NM_Features)] + [CustomComboInfo("Danger/Blasting Zone Option", "Adds Danger/Blasting Zone to No Mercy.", GNB.JobID)] + GNB_NM_Zone = 7502, - [ParentCombo(GNB_NoMercy_Cooldowns)] - [CustomComboInfo("Double Down Option", "Adds Double Down to No Mercy when No Mercy is on cooldown.", GNB.JobID)] - GNB_NoMercy_Cooldowns_DD = 7501, + [ParentCombo(GNB_NM_Features)] + [CustomComboInfo("Bow Shock Option", "Adds Bow Shock to No Mercy appropriately after No Mercy is used.", GNB.JobID)] + GNB_NM_BS = 7503, - [ParentCombo(GNB_NoMercy_Cooldowns)] - [CustomComboInfo("Sonic Break/Bow Shock Option", "Adds Sonic Break and Bow Shock to No Mercy when No Mercy is on cooldown.", GNB.JobID)] - GNB_NoMercy_Cooldowns_SonicBreakBowShock = 7502, + [ParentCombo(GNB_NM_Features)] + [CustomComboInfo("Sonic Break Option", "Adds Sonic Break to No Mercy appropriately after No Mercy is used.", GNB.JobID)] + GNB_NM_SB = 7504, + + [ParentCombo(GNB_NM_Features)] + [CustomComboInfo("Double Down Option", "Adds Double to No Mercy appropriately after No Mercy is used.", GNB.JobID)] + GNB_NM_DD = 7505, + + [ParentCombo(GNB_NM_Features)] + [CustomComboInfo("Reign Option", "Adds Reign to No Mercy appropriately after No Mercy is used.", GNB.JobID)] + GNB_NM_Reign = 7506, #endregion #region Fated Circle [ReplaceSkill(GNB.FatedCircle)] [CustomComboInfo("Fated Circle Features", "Collection of Fated Circle related features.", GNB.JobID)] - GNB_FC = 7600, + GNB_FC_Features = 7600, - [ParentCombo(GNB_FC)] + [ParentCombo(GNB_FC_Features)] [CustomComboInfo("Fated Brand Option", "Adds Continuation (Fated Brand) on Fated Circle.", GNB.JobID)] GNB_FC_Continuation = 7601, - [ParentCombo(GNB_FC)] - [CustomComboInfo("Bloodfest Option", "Replace Fated Circle with Bloodfest when under No Mercy & you have 0 cartridges.", GNB.JobID)] + [ParentCombo(GNB_FC_Features)] + [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to fated Circle when appropriate.", GNB.JobID)] GNB_FC_Bloodfest = 7602, - [ParentCombo(GNB_FC)] - [CustomComboInfo("Double Down Option", "Adds Double Down to Fated Circle when under No Mercy and ammo is above 2.", GNB.JobID)] + [ParentCombo(GNB_FC_Features)] + [CustomComboInfo("Double Down Option", "Adds Double Down to Fated Circle when appropriate.", GNB.JobID)] GNB_FC_DoubleDown = 7603, + + [ParentCombo(GNB_FC_Features)] + [CustomComboInfo("Reign Option", "Adds Reign/Noble/LionHeart to Fated Circle when appropriate.", GNB.JobID)] + GNB_FC_Reign = 7604, #endregion [CustomComboInfo("Aurora Protection Feature", "Locks out Aurora if Aurora's effect is on the target.", GNB.JobID, 0, "", "")] diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index f2bbd19fc..28bd545fc 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -1,7 +1,9 @@ +using System; using Dalamud.Game.ClientState.JobGauge.Types; using Dalamud.Game.ClientState.Statuses; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.CustomComboNS; +using XIVSlothCombo.Data; namespace XIVSlothCombo.Combos.PvE { @@ -77,72 +79,88 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is KeenEdge) { - var gauge = GetJobGauge(); - var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; - float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy + var Ammo = GetJobGauge().Ammo; //carts + var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; //SkS purposes + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + + //Variant Cure + if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) + && PlayerHealthPercentageHp() <= GetOptionValue(Config.GNB_VariantCure)) + return Variant.VariantCure; - // Ranged Uptime + //Ranged Uptime if (!InMeleeRange() && LevelChecked(LightningShot) && HasBattleTarget()) return LightningShot; - // No Mercy + //No Mercy if (ActionReady(NoMercy)) { if (CanWeave(actionID)) { - if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && (gauge.Ammo == 2 || (gauge.Ammo == 3 && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) && IsOffCooldown(NoMercy)) // Lv100 on CD use (2/3 for 1min, 2 cart only for 2min even if slight delay) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 3) // Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2) // Lv90 1min 2 or 3cart - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && IsOffCooldown(Bloodfest) && gauge.Ammo == 1 && quarterWeave) // <=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 2) && quarterWeave)) // <=Lv80 lateweave use + if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv100 Opener/Reopener (0cart) + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && (Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave)) //<=Lv80 lateweave use + return NoMercy; + // 17) || // >=Lv60 - !LevelChecked(GnashingFang))) // 17) || //>=Lv60 + !LevelChecked(GnashingFang))) // 17)) return OriginalHook(DangerZone); } - // Hypervelocity - if (WasLastWeaponskill(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + //Hypervelocity + if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) return Hypervelocity; - // Continuation - if (LevelChecked(Continuation) && - (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + //Continuation + if (LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); - // 60s weaves + //60s weaves if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) { - // >=Lv90 + //>=Lv90 if (ActionReady(BowShock) && LevelChecked(BowShock)) return BowShock; if (ActionReady(DangerZone)) return OriginalHook(DangerZone); - // GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && gauge.Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) // 1min 2cart - || (gauge.Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) // 1min 3cart - || (JustUsed(Bloodfest, 2f) && WasLastWeaponskill(BrutalShell)))) // opener + if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min + || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart + || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) //1min 3cart + || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } - // Lv90 + //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { - if ((!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && - GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) // 2min - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2 && - (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts + if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && + GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min + || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2 && + (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts return SonicBreak; } - // = 40 || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && gauge.Ammo >= 2) + //Double Down + if ((JustUsed(NoMercy, 20f) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && Ammo >= 2) { - // Lv100 + //Lv100 if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((WasLastWeaponskill(SonicBreak) && !HasEffect(Buffs.ReadyToBreak) && (gauge.Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || IsOffCooldown(Bloodfest)) // 2min - || (WasLastWeaponskill(SonicBreak) && gauge.Ammo == 3)) // 1min NM 3 carts - || (WasLastWeaponskill(SolidBarrel) && gauge.Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) // 1min NM 2 carts + if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min + || (JustUsed(SonicBreak, 3f) && Ammo == 3) //1min NM 3 carts + || (JustUsed(SolidBarrel, 3f) && Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) //1min NM 2 carts return DoubleDown; } - // Lv90 + //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((gauge.Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || IsOffCooldown(Bloodfest))) // 2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && gauge.Ammo == 3 && WasLastWeaponskill(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) // 1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && gauge.Ammo == 3 && WasLastWeaponskill(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) // 1min NM 2 carts + if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) //1min NM 2 carts return DoubleDown; } - // = GCD * 4) && !HasEffect(Buffs.ReadyToRip) && IsOnCooldown(GnashingFang)) return SonicBreak; - if (ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) // subLv54 + if (ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) //subLv54 return OriginalHook(DangerZone); } } - // Gnashing Fang - if (LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && gauge.Ammo > 0) + //Gnashing Fang + if (LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && Ammo > 0) { - if (!HasEffect(Buffs.ReadyToBlast) && gauge.AmmoComboStep == 0 - && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && WasLastWeaponskill(DoubleDown)) // Lv100 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && WasLastWeaponskill(DoubleDown)) // Lv90 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && WasLastWeaponskill(DoubleDown)) // Lv90 odd minute scuffed windows - || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && IsOffCooldown(Bloodfest)) // Opener/Reopener Conditions - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) // = GCD * 24 && IsOffCooldown(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) // 30s use + if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 + && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv100 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv90 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && JustUsed(DoubleDown)) //Lv90 odd minute scuffed windows + || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && ActionReady(Bloodfest)) //Opener/Reopener Conditions + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) //= GCD * 24 && ActionReady(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) //30s use return GnashingFang; } - // Reign combo - if (LevelChecked(ReignOfBeasts)) + //Reign combo + if ((LevelChecked(ReignOfBeasts))) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && gauge.AmmoComboStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) { - if (WasLastWeaponskill(WickedTalon) || (WasLastAbility(EyeGouge))) + if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); } - if (WasLastWeaponskill(ReignOfBeasts) || WasLastWeaponskill(NobleBlood)) + if (JustUsed(ReignOfBeasts) || JustUsed(NobleBlood)) { return OriginalHook(ReignOfBeasts); } } - // Burst Strike + //Burst Strike if (LevelChecked(BurstStrike)) { if (HasEffect(Buffs.NoMercy)) { - // Lv100 use - if ((LevelChecked(ReignOfBeasts) - && gauge.Ammo >= 1 && gauge.AmmoComboStep == 0 - && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 - && !HasEffect(Buffs.ReadyToReign)) - // subLv90 use - || (!LevelChecked(ReignOfBeasts) - && gauge.Ammo >= 1 && gauge.AmmoComboStep == 0 - && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak) - && IsOnCooldown(DoubleDown) && IsOnCooldown(GnashingFang))) + if (GetCooldownRemainingTime(DoubleDown) > GCD * 3 && + ((LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) + || (!LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) return BurstStrike; } } - // Lv100 2cart 2min starter - if (LevelChecked(ReignOfBeasts) - && (GetCooldownRemainingTime(NoMercy) <= GCD || IsOffCooldown(NoMercy)) - && gauge.Ammo is 3 - && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) + //Lv100 2cart 2min starter + if (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) return BurstStrike; - // GF combo - if (gauge.AmmoComboStep is 1 or 2) // GF + //GF combo safety net + if (GunStep is 1 or 2) return OriginalHook(GnashingFang); - // 123 (overcap included) + //123 (overcap included) if (comboTime > 0) { if (lastComboMove == KeenEdge && LevelChecked(BrutalShell)) return BrutalShell; if (lastComboMove == BrutalShell && LevelChecked(SolidBarrel)) { - if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) //Lv100 Hypervelocity fit into NM check return Hypervelocity; - if (LevelChecked(BurstStrike) && gauge.Ammo == MaxCartridges(level)) + if (LevelChecked(BurstStrike) && Ammo == MaxCartridges(level)) return BurstStrike; return SolidBarrel; } - if (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && gauge.AmmoComboStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell) && gauge.Ammo == 2) + if (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && GunStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell) && Ammo == 2) return SolidBarrel; - if (!LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && gauge.AmmoComboStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell || WasLastWeaponskill(BurstStrike)) && gauge.Ammo == 2) + if (!LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && GunStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell || JustUsed(BurstStrike)) && Ammo == 2) return SolidBarrel; } @@ -313,90 +320,96 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is KeenEdge) { - var gauge = GetJobGauge(); - var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; - float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy - - // Variant Cure - if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.GNB_VariantCure)) + var Ammo = GetJobGauge().Ammo; //carts + var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; //SkS purposes + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + + //Variant Cure + if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) + && PlayerHealthPercentageHp() <= GetOptionValue(Config.GNB_VariantCure)) return Variant.VariantCure; - // Ranged Uptime - if (IsEnabled(CustomComboPreset.GNB_ST_RangedUptime) && !InMeleeRange() && LevelChecked(LightningShot) && HasBattleTarget()) + //Ranged Uptime + if (IsEnabled(CustomComboPreset.GNB_ST_RangedUptime) && + !InMeleeRange() && LevelChecked(LightningShot) && HasBattleTarget()) return LightningShot; - // No Mercy + //No Mercy if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_NoMercy)) { if (ActionReady(NoMercy)) { if (CanWeave(actionID)) { - if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && (gauge.Ammo == 2 || (gauge.Ammo == 3 && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) && IsOffCooldown(NoMercy)) // Lv100 on CD use (2/3 for 1min, 2 cart only for 2min even if slight delay) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 3) // Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2) // Lv90 1min 2 or 3cart - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && IsOffCooldown(Bloodfest) && gauge.Ammo == 1 && quarterWeave) // <=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 2) && quarterWeave)) // <=Lv80 lateweave use + if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv100 Opener/Reopener (0cart) + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && (Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave)) //<=Lv80 lateweave use return NoMercy; } } - // 17) || // >=Lv60 - !LevelChecked(GnashingFang))) // 17) || //>=Lv60 + !LevelChecked(GnashingFang))) // 17)) return OriginalHook(DangerZone); } - // Hypervelocity - if (WasLastWeaponskill(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + //Hypervelocity + if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) return Hypervelocity; - // Continuation - if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && LevelChecked(Continuation) && - (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + //Continuation + if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); - // 60s weaves + //60s weaves if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) { - // >=Lv90 + //>=Lv90 if (IsEnabled(CustomComboPreset.GNB_ST_BowShock) && ActionReady(BowShock) && LevelChecked(BowShock)) return BowShock; if (IsEnabled(CustomComboPreset.GNB_ST_BlastingZone) && ActionReady(DangerZone)) return OriginalHook(DangerZone); - // GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && gauge.Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) // 1min 2cart - || (gauge.Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) // 1min 3cart - || (JustUsed(Bloodfest, 2f) && WasLastWeaponskill(BrutalShell)))) // opener + if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min + || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart + || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) //1min 3cart + || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } - // Lv90 + //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { - if (IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && - (!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && - GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) // 2min - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2 && - (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts + if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && + GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min + || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2 && + (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts return SonicBreak; } - // = 40 || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && gauge.Ammo >= 2) + //Double Down + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_DoubleDown) && + (JustUsed(NoMercy, 20f) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && Ammo >= 2) { - // Lv100 - if (LevelChecked(ReignOfBeasts) && (IsEnabled(CustomComboPreset.GNB_ST_DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f)) + //Lv100 + if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((WasLastWeaponskill(SonicBreak) && !HasEffect(Buffs.ReadyToBreak) && (gauge.Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || IsOffCooldown(Bloodfest)) // 2min - || (WasLastWeaponskill(SonicBreak) && gauge.Ammo == 3)) // 1min NM 3 carts - || (WasLastWeaponskill(SolidBarrel) && gauge.Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) // 1min NM 2 carts + if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min + || (JustUsed(SonicBreak, 3f) && Ammo == 3) //1min NM 3 carts + || (JustUsed(SolidBarrel, 3f) && Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) //1min NM 2 carts return DoubleDown; } - // Lv90 - if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && IsEnabled(CustomComboPreset.GNB_ST_DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) + //Lv90 + if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((gauge.Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || IsOffCooldown(Bloodfest))) // 2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && gauge.Ammo == 3 && WasLastWeaponskill(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) // 1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && gauge.Ammo == 3 && WasLastWeaponskill(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) // 1min NM 2 carts + if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) //1min NM 2 carts return DoubleDown; } - // = GCD * 4) && !HasEffect(Buffs.ReadyToRip) && IsOnCooldown(GnashingFang)) return SonicBreak; - if (IsEnabled(CustomComboPreset.GNB_ST_BlastingZone) && ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) // subLv54 + if (IsEnabled(CustomComboPreset.GNB_ST_BlastingZone) && ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) //subLv54 return OriginalHook(DangerZone); } } - // Gnashing Fang - if (IsEnabled(CustomComboPreset.GNB_ST_GnashingFang_Starter) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && gauge.Ammo > 0) + //Gnashing Fang + if (IsEnabled(CustomComboPreset.GNB_ST_GnashingFang_Starter) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && Ammo > 0) { - if (!HasEffect(Buffs.ReadyToBlast) && gauge.AmmoComboStep == 0 - && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && WasLastWeaponskill(DoubleDown)) // Lv100 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && WasLastWeaponskill(DoubleDown)) // Lv90 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && WasLastWeaponskill(DoubleDown)) // Lv90 odd minute scuffed windows - || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && IsOffCooldown(Bloodfest)) // Opener/Reopener Conditions - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) // = GCD * 24 && IsOffCooldown(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) // 30s use + if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 + && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv100 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv90 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && JustUsed(DoubleDown)) //Lv90 odd minute scuffed windows + || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && ActionReady(Bloodfest)) //Opener/Reopener Conditions + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) //= GCD * 24 && ActionReady(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) //30s use return GnashingFang; } - // Reign combo + //Reign combo if (IsEnabled(CustomComboPreset.GNB_ST_Reign) && (LevelChecked(ReignOfBeasts))) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && gauge.AmmoComboStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) { - if (WasLastWeaponskill(WickedTalon) || (WasLastAbility(EyeGouge))) + if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); } - if (WasLastWeaponskill(ReignOfBeasts) || WasLastWeaponskill(NobleBlood)) + if (JustUsed(ReignOfBeasts) || JustUsed(NobleBlood)) { return OriginalHook(ReignOfBeasts); } } - // Burst Strike + //Burst Strike if (IsEnabled(CustomComboPreset.GNB_ST_BurstStrike) && LevelChecked(BurstStrike)) { if (HasEffect(Buffs.NoMercy)) { - // Lv100 use - if ((LevelChecked(ReignOfBeasts) - && gauge.Ammo >= 1 && gauge.AmmoComboStep == 0 - && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 - && !HasEffect(Buffs.ReadyToReign)) - // subLv90 use - || (!LevelChecked(ReignOfBeasts) - && gauge.Ammo >= 1 && gauge.AmmoComboStep == 0 - && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak) - && IsOnCooldown(DoubleDown) && IsOnCooldown(GnashingFang))) + if (GetCooldownRemainingTime(DoubleDown) > GCD * 3 && + ((LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) + || (!LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) return BurstStrike; } } - // Lv100 2cart 2min starter - if (LevelChecked(ReignOfBeasts) - && (GetCooldownRemainingTime(NoMercy) <= GCD || IsOffCooldown(NoMercy)) - && gauge.Ammo is 3 - && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) + //Lv100 2cart 2min starter + if (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) return BurstStrike; - // GF combo - if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && gauge.AmmoComboStep is 1 or 2) // GF + //GF combo safety net + if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && GunStep is 1 or 2) return OriginalHook(GnashingFang); - // 123 (overcap included) + //123 (overcap included) if (comboTime > 0) { if (lastComboMove == KeenEdge && LevelChecked(BrutalShell)) return BrutalShell; if (lastComboMove == BrutalShell && LevelChecked(SolidBarrel)) { - if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) //Lv100 Hypervelocity fit into NM check return Hypervelocity; - if (LevelChecked(BurstStrike) && gauge.Ammo == MaxCartridges(level)) + if (LevelChecked(BurstStrike) && Ammo == MaxCartridges(level)) return BurstStrike; return SolidBarrel; } - if (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && gauge.AmmoComboStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell) && gauge.Ammo == 2) + if (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && GunStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell) && Ammo == 2) return SolidBarrel; - if (!LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && gauge.AmmoComboStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell || WasLastWeaponskill(BurstStrike)) && gauge.Ammo == 2) + if (!LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && GunStep == 0 && LevelChecked(BurstStrike) && (lastComboMove is BrutalShell || JustUsed(BurstStrike)) && Ammo == 2) return SolidBarrel; } @@ -563,228 +563,207 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class GNB_GF_Continuation : CustomCombo + internal class GNB_GF_Features : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_GF_Continuation; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_GF_Features; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID == GnashingFang) + if (actionID is KeenEdge) { - var gauge = GetJobGauge(); - var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; - float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy - - // No Mercy - if (IsEnabled(CustomComboPreset.GNB_GF_NoMercy) && ActionReady(NoMercy) && - (LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && gauge.Ammo >= 2 && IsOffCooldown(NoMercy)) // Lv100 on CD use (2 or 3 cart, never 1) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && gauge.Ammo == 0 && lastComboMove is BrutalShell && IsOffCooldown(Bloodfest)) // Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 3) // Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2) // Lv90 1min 2 or 3cart - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && IsOffCooldown(Bloodfest) && gauge.Ammo == 1 && quarterWeave) // subLv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) && gauge.Ammo == 2) && quarterWeave)) // subLv80 lateweave use - return NoMercy; - - // oGCDs - if (CanWeave(SavageClaw)) + var Ammo = GetJobGauge().Ammo; //carts + var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; //SkS purposes + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + + //No Mercy + if (IsEnabled(CustomComboPreset.GNB_GF_NoMercy)) { - if (IsEnabled(CustomComboPreset.GNB_GF_Cooldowns)) + if (ActionReady(NoMercy)) { - // Bloodfest - if (IsEnabled(CustomComboPreset.GNB_GF_Bloodfest) && ActionReady(Bloodfest) && - gauge.Ammo is 0 && JustUsed(NoMercy, 20f)) - return Bloodfest; - - // Zone - if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone) && !JustUsed(NoMercy)) + if (CanWeave(actionID)) { - // Lv90 - if (!LevelChecked(ReignOfBeasts) && !HasEffect(Buffs.NoMercy) && ((IsOnCooldown(GnashingFang) && GetCooldownRemainingTime(NoMercy) > 17) || // >=Lv60 - !LevelChecked(GnashingFang))) // 17)) - return OriginalHook(DangerZone); + if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv100 Opener/Reopener (0cart) + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && (Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave)) //<=Lv80 lateweave use + return NoMercy; } + } - // Hypervelocity - if (WasLastWeaponskill(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast)) - return Hypervelocity; + // 17) || //>=Lv60 + !LevelChecked(GnashingFang))) // 17)) + return OriginalHook(DangerZone); + } + + //Hypervelocity + if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + return Hypervelocity; + + //Continuation + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + return OriginalHook(Continuation); + + //60s weaves + if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) + { + //>=Lv90 + if (IsEnabled(CustomComboPreset.GNB_GF_BowShock) && ActionReady(BowShock) && LevelChecked(BowShock)) + return BowShock; + if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone)) + return OriginalHook(DangerZone); + + //=Lv90 - if (IsEnabled(CustomComboPreset.GNB_GF_BowShock) && ActionReady(BowShock) && LevelChecked(BowShock)) - return BowShock; if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone)) return OriginalHook(DangerZone); - - // GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && gauge.Ammo == 0 && - !HasEffect(Buffs.ReadyToRip) && GetBuffRemainingTime(Buffs.NoMercy) < GCD * 5 && - (WasLastWeaponskill(GnashingFang) || WasLastAbility(SavageClaw))) + if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min + || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart + || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) //1min 3cart + || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; + } - // sks 9th GCD - if (GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && !HasEffect(Buffs.ReadyToReign) && gauge.Ammo == 2 && - !HasEffect(Buffs.ReadyToRip) && GetBuffRemainingTime(Buffs.NoMercy) < GCD) + //Lv90 + if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) + { + if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && + GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min + || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2 && + (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts + return SonicBreak; + } + + //= GCD * 4) && gauge.Ammo >= 2) + //Double Down + if (IsEnabled(CustomComboPreset.GNB_GF_DoubleDown) && + (JustUsed(NoMercy, 20f) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && Ammo >= 2) { - // Lv100 + //Lv100 if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((WasLastWeaponskill(SonicBreak) && gauge.Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 4 || IsOffCooldown(Bloodfest)) // 2min NM - || (!HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SonicBreak) && gauge.Ammo == 3) // 1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SolidBarrel) && gauge.Ammo == 3 && (GetBuffRemainingTime(Buffs.NoMercy) < 17))) // 1min NM 2 carts + if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min + || (JustUsed(SonicBreak, 3f) && Ammo == 3) //1min NM 3 carts + || (JustUsed(SolidBarrel, 3f) && Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) //1min NM 2 carts return DoubleDown; } - // Lv90 - if (!LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) + //Lv90 + if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((gauge.Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && WasLastWeaponskill(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || IsOffCooldown(Bloodfest))) // 2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && gauge.Ammo == 3 && WasLastWeaponskill(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) // 1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && gauge.Ammo == 3 && WasLastWeaponskill(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) // 1min NM 2 carts + if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) //1min NM 2 carts return DoubleDown; } - // = GCD * 4) && !HasEffect(Buffs.ReadyToRip) && IsOnCooldown(GnashingFang)) return SonicBreak; - if (IsEnabled(CustomComboPreset.GNB_GF_Cooldowns) && ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) // subLv54 + if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) //subLv54 return OriginalHook(DangerZone); } } - // Sonic Break - if (IsEnabled(CustomComboPreset.GNB_GF_SonicBreak) && (JustUsed(NoMercy) || (HasEffect(Buffs.NoMercy) && HasEffect(Buffs.ReadyToBreak)))) + //Gnashing Fang + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && Ammo > 0) { - // Lv100 - if (LevelChecked(ReignOfBeasts)) - { - if ((!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 2 && (GetBuffRemainingTime(Buffs.NoMercy) > GCD * 7) && - WasLastWeaponskill(BurstStrike) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min - || (!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && (GetBuffRemainingTime(Buffs.NoMercy) < GCD) && - (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest))) // 2min 3 carts - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo == 3 && GetCooldownRemainingTime(NoMercy) > GCD && - (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts - return SonicBreak; - } - - // Lv90 - if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) - { - if ((!HasEffect(Buffs.ReadyToBlast) && gauge.Ammo == 3 && - GetCooldownRemainingTime(Bloodfest) < GCD * 12 || IsOffCooldown(Bloodfest)) // 2min - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && gauge.Ammo >= 2 && GetBuffRemainingTime(Buffs.NoMercy) > GCD * 7 && - (WasLastWeaponskill(KeenEdge) || WasLastWeaponskill(BrutalShell) || WasLastWeaponskill(SolidBarrel)))) // 1min 3 carts - return SonicBreak; - } - - // GCD * 20 && JustUsed(DoubleDown)) //Lv90 odd minute scuffed windows + || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && ActionReady(Bloodfest)) //Opener/Reopener Conditions + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) //= GCD * 24 && ActionReady(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) //30s use + return GnashingFang; } - // Reign combo + //Reign combo if (IsEnabled(CustomComboPreset.GNB_GF_Reign) && (LevelChecked(ReignOfBeasts))) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && gauge.AmmoComboStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) { - if (WasLastWeaponskill(WickedTalon) || (WasLastAbility(EyeGouge))) + if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); } - if (WasLastWeaponskill(ReignOfBeasts) || WasLastWeaponskill(NobleBlood)) + if (JustUsed(ReignOfBeasts) || JustUsed(NobleBlood)) { return OriginalHook(ReignOfBeasts); } } - if (IsEnabled(CustomComboPreset.GNB_GF_BurstStrike)) + //Burst Strike + if (IsEnabled(CustomComboPreset.GNB_GF_BurstStrike) && LevelChecked(BurstStrike)) { - if ((LevelChecked(ReignOfBeasts) // Lv100 - && gauge.Ammo >= 1 && gauge.AmmoComboStep == 0 - && !HasEffect(Buffs.ReadyToReign) && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 - && ((HasEffect(Buffs.NoMercy)) || (!HasEffect(Buffs.NoMercy) && gauge.Ammo == 3 && ComboAction == BrutalShell))) - // subLv90 use - || (!LevelChecked(ReignOfBeasts) // <=Lv90 - && gauge.Ammo == MaxCartridges(level) && gauge.AmmoComboStep == 0 - && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak) - && IsOnCooldown(DoubleDown) && IsOnCooldown(GnashingFang))) - return BurstStrike; - if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast)) - return Hypervelocity; + if (HasEffect(Buffs.NoMercy)) + { + if (GetCooldownRemainingTime(DoubleDown) > GCD * 3 && + ((LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) + || (!LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) + return BurstStrike; + } } - } - - return actionID; - } - } - - - internal class GNB_BS : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_BS; - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID is BurstStrike) - { - var gauge = GetJobGauge(); - float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy + //Lv100 2cart 2min starter + if (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) + return BurstStrike; - if (IsEnabled(CustomComboPreset.GNB_BS_Continuation) && HasEffect(Buffs.ReadyToBlast) && LevelChecked(Hypervelocity)) - return Hypervelocity; - if (IsEnabled(CustomComboPreset.GNB_BS_Bloodfest) && gauge.Ammo is 0 && LevelChecked(Bloodfest) && !HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(Bloodfest) < 0.6f) - return Bloodfest; - if (IsEnabled(CustomComboPreset.GNB_BS_DoubleDown) && HasEffect(Buffs.NoMercy) && GetCooldownRemainingTime(DoubleDown) < 2 && gauge.Ammo >= 2 && LevelChecked(DoubleDown)) - return DoubleDown; - if (IsEnabled(CustomComboPreset.GNB_BS_Reign) && (LevelChecked(ReignOfBeasts))) - { - if (HasEffect(Buffs.ReadyToReign) && GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && gauge.AmmoComboStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) - { - if (WasLastWeaponskill(WickedTalon) || (WasLastAbility(EyeGouge))) - return OriginalHook(ReignOfBeasts); - } + //GF combo safety net + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && GunStep is 1 or 2) + return OriginalHook(GnashingFang); - if (WasLastWeaponskill(ReignOfBeasts) || WasLastWeaponskill(NobleBlood)) - { - return OriginalHook(ReignOfBeasts); - } - } + return KeenEdge; } return actionID; @@ -800,8 +779,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID == DemonSlice) { - var gauge = GetJobGauge(); - float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy + var Ammo = GetJobGauge().Ammo; //carts + var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy if (InCombat()) { @@ -813,23 +793,36 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BowShock; if (ActionReady(DangerZone) && (HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(GnashingFang) <= GCD * 7)) return OriginalHook(DangerZone); - if (gauge.Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) + if (Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) return Bloodfest; - if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && WasLastWeaponskill(FatedCircle) && LevelChecked(FatedBrand)) + if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && JustUsed(FatedCircle) && LevelChecked(FatedBrand)) return FatedBrand; } if (HasEffect(Buffs.ReadyToBreak) && !HasEffect(Buffs.ReadyToRaze) && HasEffect(Buffs.NoMercy)) return SonicBreak; - if (gauge.Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) + if (Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) return DoubleDown; - if (gauge.Ammo != 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)) + if (Ammo != 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)) return FatedCircle; + if (LevelChecked(ReignOfBeasts)) + { + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + { + if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) + return OriginalHook(ReignOfBeasts); + } + + if (JustUsed(ReignOfBeasts) || JustUsed(NobleBlood)) + { + return OriginalHook(ReignOfBeasts); + } + } } if (comboTime > 0 && lastComboMove == DemonSlice && LevelChecked(DemonSlaughter)) { - return (LevelChecked(FatedCircle) && gauge.Ammo == MaxCartridges(level)) ? FatedCircle : DemonSlaughter; + return (LevelChecked(FatedCircle) && Ammo == MaxCartridges(level)) ? FatedCircle : DemonSlaughter; } return DemonSlice; @@ -848,8 +841,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID == DemonSlice) { - var gauge = GetJobGauge(); - float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.5 supported, 2.45 is iffy + var Ammo = GetJobGauge().Ammo; //carts + var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.GNB_VariantCure)) return Variant.VariantCure; @@ -864,7 +858,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (sustainedDamage is null || sustainedDamage?.RemainingTime <= 3)) return Variant.VariantSpiritDart; - if (IsEnabled(CustomComboPreset.GNB_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && IsOffCooldown(Variant.VariantUltimatum)) + if (IsEnabled(CustomComboPreset.GNB_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && ActionReady(Variant.VariantUltimatum)) return Variant.VariantUltimatum; if (IsEnabled(CustomComboPreset.GNB_AoE_NoMercy) && ActionReady(NoMercy)) @@ -873,23 +867,36 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BowShock; if (IsEnabled(CustomComboPreset.GNB_AOE_DangerZone) && ActionReady(DangerZone) && (HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(GnashingFang) <= GCD * 7)) return OriginalHook(DangerZone); - if (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && gauge.Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) + if (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) return Bloodfest; - if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && WasLastWeaponskill(FatedCircle) && LevelChecked(FatedBrand)) + if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && JustUsed(FatedCircle) && LevelChecked(FatedBrand)) return FatedBrand; } if (IsEnabled(CustomComboPreset.GNB_AOE_SonicBreak) && HasEffect(Buffs.ReadyToBreak) && !HasEffect(Buffs.ReadyToRaze) && HasEffect(Buffs.NoMercy)) return SonicBreak; - if (IsEnabled(CustomComboPreset.GNB_AoE_DoubleDown) && gauge.Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) + if (IsEnabled(CustomComboPreset.GNB_AoE_DoubleDown) && Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) return DoubleDown; - if (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && gauge.Ammo != 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)) + if (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && Ammo != 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)) return FatedCircle; + if (IsEnabled(CustomComboPreset.GNB_AoE_Reign) && LevelChecked(ReignOfBeasts)) + { + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + { + if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) + return OriginalHook(ReignOfBeasts); + } + + if (JustUsed(ReignOfBeasts) || JustUsed(NobleBlood)) + { + return OriginalHook(ReignOfBeasts); + } + } } if (comboTime > 0 && lastComboMove == DemonSlice && LevelChecked(DemonSlaughter)) { - return (IsEnabled(CustomComboPreset.GNB_AOE_Overcap) && LevelChecked(FatedCircle) && gauge.Ammo == MaxCartridges(level)) ? FatedCircle : DemonSlaughter; + return (IsEnabled(CustomComboPreset.GNB_AOE_Overcap) && LevelChecked(FatedCircle) && Ammo == MaxCartridges(level)) ? FatedCircle : DemonSlaughter; } return DemonSlice; @@ -899,21 +906,58 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class GNB_FC : CustomCombo + internal class GNB_BS : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_BS; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (actionID is BurstStrike) + { + var Ammo = GetJobGauge().Ammo; //carts + var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + + if (IsEnabled(CustomComboPreset.GNB_BS_Continuation) && HasEffect(Buffs.ReadyToBlast) && LevelChecked(Hypervelocity)) + return Hypervelocity; + if (IsEnabled(CustomComboPreset.GNB_BS_Bloodfest) && Ammo is 0 && LevelChecked(Bloodfest) && !HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(Bloodfest) < 0.6f) + return Bloodfest; + if (IsEnabled(CustomComboPreset.GNB_BS_DoubleDown) && HasEffect(Buffs.NoMercy) && GetCooldownRemainingTime(DoubleDown) < 2 && Ammo >= 2 && LevelChecked(DoubleDown)) + return DoubleDown; + if (IsEnabled(CustomComboPreset.GNB_BS_Reign) && (LevelChecked(ReignOfBeasts))) + { + if (HasEffect(Buffs.ReadyToReign) && GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + { + if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) + return OriginalHook(ReignOfBeasts); + } + + if (JustUsed(ReignOfBeasts) || JustUsed(NobleBlood)) + { + return OriginalHook(ReignOfBeasts); + } + } + } + + return actionID; + } + } + + internal class GNB_FC_Features_Features : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_FC; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_FC_Features; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { if (actionID is FatedCircle) { - var gauge = GetJobGauge(); + var Ammo = GetJobGauge().Ammo; //carts if (IsEnabled(CustomComboPreset.GNB_FC_Continuation) && HasEffect(Buffs.ReadyToRaze) && LevelChecked(FatedBrand) && CanWeave(actionID)) return FatedBrand; - if (IsEnabled(CustomComboPreset.GNB_FC_Bloodfest) && gauge.Ammo is 0 && LevelChecked(Bloodfest) && !HasEffect(Buffs.ReadyToRaze)) + if (IsEnabled(CustomComboPreset.GNB_FC_Bloodfest) && Ammo is 0 && LevelChecked(Bloodfest) && !HasEffect(Buffs.ReadyToRaze)) return Bloodfest; - if (IsEnabled(CustomComboPreset.GNB_FC_DoubleDown) && GetCooldownRemainingTime(DoubleDown) < 2 && gauge.Ammo >= 2 && LevelChecked(DoubleDown)) + if (IsEnabled(CustomComboPreset.GNB_FC_DoubleDown) && GetCooldownRemainingTime(DoubleDown) < 2 && Ammo >= 2 && LevelChecked(DoubleDown)) return DoubleDown; } @@ -921,26 +965,48 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class GNB_NoMercy_Cooldowns : CustomCombo + internal class GNB_NM_Features : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_NoMercy_Cooldowns; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_NM_Features; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { if (actionID == NoMercy) { - var gauge = GetJobGauge().Ammo; - if (IsOnCooldown(NoMercy) && InCombat()) + var Ammo = GetJobGauge().Ammo; //carts + var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + if (JustUsed(NoMercy, 20f) && InCombat()) { - if (IsEnabled(CustomComboPreset.GNB_NoMercy_Cooldowns_DD) && IsOffCooldown(DoubleDown) && gauge >= 2 && LevelChecked(DoubleDown)) - return DoubleDown; - if (IsEnabled(CustomComboPreset.GNB_NoMercy_Cooldowns_SonicBreakBowShock)) + //oGCDs + if (CanWeave(ActionWatching.LastWeaponskill)) { - if (HasEffect(Buffs.ReadyToBreak)) - return SonicBreak; - if (IsOffCooldown(BowShock)) + if (IsEnabled(CustomComboPreset.GNB_NM_Bloodfest) && ActionReady(Bloodfest) && Ammo == 0) + return Bloodfest; + if (IsEnabled(CustomComboPreset.GNB_NM_Zone) && ActionReady(OriginalHook(DangerZone)) && (HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(GnashingFang) > 17)) + return OriginalHook(DangerZone); + if (IsEnabled(CustomComboPreset.GNB_NM_BS) && ActionReady(BowShock) && HasEffect(Buffs.NoMercy)) return BowShock; } + + //GCDs + if (IsEnabled(CustomComboPreset.GNB_NM_SB) && HasEffect(Buffs.ReadyToBreak)) + return SonicBreak; + if (IsEnabled(CustomComboPreset.GNB_NM_DD) && LevelChecked(DoubleDown) && ActionReady(DoubleDown) && Ammo >= 2 && LevelChecked(DoubleDown)) + return DoubleDown; + if (IsEnabled(CustomComboPreset.GNB_NM_Reign) && LevelChecked(ReignOfBeasts)) + { + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + { + if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) + return OriginalHook(ReignOfBeasts); + } + + if (JustUsed(ReignOfBeasts) || JustUsed(NobleBlood)) + { + return OriginalHook(ReignOfBeasts); + } + } } } From 954cecb594845d51b1d006f7928e773f5571d96e Mon Sep 17 00:00:00 2001 From: ace Date: Tue, 13 Aug 2024 17:22:54 -0700 Subject: [PATCH 077/142] touchups --- XIVSlothCombo/Combos/CustomComboPreset.cs | 12 ++++++------ XIVSlothCombo/Combos/PvE/GNB.cs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index d053a8c92..d3af8ead0 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -860,7 +860,7 @@ public enum CustomComboPreset // Devilment --> Starfall [ReplaceSkill(DNC.Devilment)] [ConflictingCombos(DNC_ST_AdvancedMode, DNC_AoE_AdvancedMode)] - [CustomComboInfo("Devilment to Starfall Feature", "Change Devilment into Starfall Dance after No Mercy is used.", DNC.JobID)] + [CustomComboInfo("Devilment to Starfall Feature", "Change Devilment into Starfall Dance after use.", DNC.JobID)] DNC_Starfall_Devilment = 4038, [ReplaceSkill(DNC.StandardStep, DNC.TechnicalStep)] @@ -1658,21 +1658,21 @@ public enum CustomComboPreset #region Burst Strike [ReplaceSkill(GNB.BurstStrike)] [CustomComboInfo("Burst Strike Features", "Collection of Burst Strike related features.", GNB.JobID)] - GNB_BS = 7400, + GNB_BS_Features = 7400, - [ParentCombo(GNB_BS)] + [ParentCombo(GNB_BS_Features)] [CustomComboInfo("Hypervelocity Option", "Adds Continuation (Hypervelocity) to Burst Strike when available.", GNB.JobID)] GNB_BS_Continuation = 7401, - [ParentCombo(GNB_BS)] + [ParentCombo(GNB_BS_Features)] [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to Burst Strike when approrpiate.", GNB.JobID)] GNB_BS_Bloodfest = 7402, - [ParentCombo(GNB_BS)] + [ParentCombo(GNB_BS_Features)] [CustomComboInfo("Double Down Option", "Adds Double Down to Burst Strike when appropriate.", GNB.JobID)] GNB_BS_DoubleDown = 7403, - [ParentCombo(GNB_BS)] + [ParentCombo(GNB_BS_Features)] [CustomComboInfo("Reign Combo Option", "Adds Reign/Noble/Lionheart to Burst Strike when appropriate.", GNB.JobID)] GNB_BS_Reign = 7404, #endregion diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 28bd545fc..0e9bbfefe 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -906,9 +906,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class GNB_BS : CustomCombo + internal class GNB_BS_Features : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_BS; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_BS_Features; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -943,7 +943,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class GNB_FC_Features_Features : CustomCombo + internal class GNB_FC_Features : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNB_FC_Features; From fe646d5ba5287946f3fe52bdd3f2cac5a4e66424 Mon Sep 17 00:00:00 2001 From: ace Date: Tue, 13 Aug 2024 18:27:40 -0700 Subject: [PATCH 078/142] More touchups --- XIVSlothCombo/Combos/CustomComboPreset.cs | 2 +- XIVSlothCombo/Combos/PvE/GNB.cs | 78 +++++++++++------------ 2 files changed, 38 insertions(+), 42 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index d3af8ead0..89091e9a4 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1522,7 +1522,7 @@ public enum CustomComboPreset #region Gnashing Fang [ParentCombo(GNB_ST_Advanced)] - [CustomComboInfo("Gnashing Fang & Continuation Option", "Adds Gnashing Fang to the main combo.\n Gnashing Fang Starter option must be enabled or started manually and Sloth will finish it off.", GNB.JobID)] + [CustomComboInfo("Gnashing Fang & Continuation Option", "Adds Gnashing Fang's full combo to the main combo.\n 'Gnashing Fang Starter' option must be enabled or started manually and Sloth will finish it off.", GNB.JobID)] GNB_ST_Gnashing = 7005, [ParentCombo(GNB_ST_Gnashing)] diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 0e9bbfefe..8979a18d7 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -98,14 +98,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (CanWeave(actionID)) { - if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && (Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min - || (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave)) //<=Lv80 lateweave use + if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use return NoMercy; // 1) - return Hypervelocity; - //Continuation if (LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); @@ -171,6 +167,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + //Hypervelocity + if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + return Hypervelocity; + //GF combo if (LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); @@ -241,9 +241,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && Ammo > 0) { if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 - && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv100 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv90 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && JustUsed(DoubleDown)) //Lv90 odd minute scuffed windows + && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown, 3f)) //Lv100 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown, 3f)) //Lv90 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && JustUsed(DoubleDown, 3f)) //Lv90 odd minute scuffed windows || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && ActionReady(Bloodfest)) //Opener/Reopener Conditions || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) //= GCD * 24 && ActionReady(Bloodfest)) // GCD * 12 && (Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min - || (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave)) //<=Lv80 lateweave use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use return NoMercy; } } @@ -392,10 +392,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(DangerZone); } - //Hypervelocity - if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) - return Hypervelocity; - //Continuation if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); @@ -421,6 +417,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + //Hypervelocity + if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + return Hypervelocity; + //GF combo if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); @@ -583,14 +583,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (CanWeave(actionID)) { - if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && (Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min - || (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave)) //<=Lv80 lateweave use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use return NoMercy; } } @@ -619,14 +619,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(DangerZone); } - //Hypervelocity - if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) - return Hypervelocity; - - //Continuation - if (IsEnabled(CustomComboPreset.GNB_GF_Features) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) - return OriginalHook(Continuation); - //60s weaves if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) { @@ -647,6 +639,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + //Hypervelocity + if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + return Hypervelocity; + //GF combo if (IsEnabled(CustomComboPreset.GNB_GF_Continuation) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); From 2733f00b5d70637013c8c5ac37c33664705d290e Mon Sep 17 00:00:00 2001 From: ace Date: Tue, 13 Aug 2024 21:02:59 -0700 Subject: [PATCH 079/142] GNBPvP update --- XIVSlothCombo/Combos/CustomComboPreset.cs | 58 ++++++++++++++-------- XIVSlothCombo/Combos/PvP/GNBPVP.cs | 60 +++++++++++++++++------ 2 files changed, 81 insertions(+), 37 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 89091e9a4..508207a6e 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1730,9 +1730,12 @@ public enum CustomComboPreset GNB_FC_Reign = 7604, #endregion + #region Aurora [CustomComboInfo("Aurora Protection Feature", "Locks out Aurora if Aurora's effect is on the target.", GNB.JobID, 0, "", "")] GNB_AuroraProtection = 7700, + #endregion + #region Variant Skills [Variant] [VariantParent(GNB_ST_Advanced, GNB_AoE_Advanced)] [CustomComboInfo("Spirit Dart Option", "Use Variant Spirit Dart whenever the debuff is not present or less than 3s.", GNB.JobID)] @@ -1749,6 +1752,8 @@ public enum CustomComboPreset GNB_Variant_Ultimatum = 7035, #endregion + #endregion + #region MACHINIST #region Simple ST @@ -4576,47 +4581,58 @@ The three digets after RDM.JobID can be used to reorder items in the list #region GUNBREAKER + #region Advanced Mode [PvPCustomCombo] - [CustomComboInfo("Burst Mode", "Turns Solid Barrel Combo into an all-in-one damage button.", GNB.JobID)] + [CustomComboInfo("Advanced Mode", "Replace Solid Barrel Combo with it's optimal combo chain.", GNB.JobID)] GNBPvP_Burst = 117000, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Double Down Option", "Adds Double Down to Burst Mode while under the No Mercy buff.", GNB.JobID)] + [CustomComboInfo("Double Down Option", "Adds Double Down to rotation when appropriate.", GNB.JobID)] GNBPvP_DoubleDown = 117001, - [PvPCustomCombo] - [CustomComboInfo("Gnashing Fang Continuation Feature", "Adds Continuation onto Gnashing Fang.", GNB.JobID)] - GNBPvP_GnashingFang = 117002, - [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Draw And Junction Option", "Adds Draw And Junction to Burst Mode.", GNB.JobID)] - GNBPvP_DrawAndJunction = 117003, + [CustomComboInfo("Draw & Junction Option", "Adds Draw And Junction to rotation when appropriate.", GNB.JobID)] + GNBPvP_ST_DrawAndJunction = 117002, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Gnashing Fang Option", "Adds Gnashing Fang to Burst Mode while under the No Mercy buff.", GNB.JobID)] - GNBPvP_ST_GnashingFang = 117004, + [CustomComboInfo("Gnashing Fang Option", "Adds Gnashing Fang to to rotation when appropriate.", GNB.JobID)] + GNBPvP_ST_GnashingFang = 117003, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Continuation Option", "Adds Continuation to Burst Mode.", GNB.JobID)] - GNBPvP_ST_Continuation = 117005, + [CustomComboInfo("Continuation Option", "Adds Continuation to rotation when appropriate.", GNB.JobID)] + GNBPvP_ST_Continuation = 117004, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Rough Divide Option", "Weaves Rough Divide when No Mercy Buff is about to expire.", GNB.JobID)] - GNBPvP_RoughDivide = 117006, + [CustomComboInfo("Rough Divide Option", "Adds Rough Divide to rotation when appropriate.", GNB.JobID)] + GNBPvP_RoughDivide = 117005, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Junction Cast DPS Option", "Adds Junction Cast (DPS) to Burst Mode.", GNB.JobID)] - GNBPvP_JunctionDPS = 117007, + [CustomComboInfo("Junction Cast DPS Option", "Adds Junction Cast (DPS) to rotation.", GNB.JobID)] + GNBPvP_JunctionDPS = 117006, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Junction Cast Healer Option", "Adds Junction Cast (Healer) to Burst Mode.", GNB.JobID)] - GNBPvP_JunctionHealer = 117008, + [CustomComboInfo("Junction Cast Healer Option", "Adds Junction Cast (Healer) to rotation.", GNB.JobID)] + GNBPvP_JunctionHealer = 117007, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Junction Cast Tank Option", "Adds Junction Cast (Tank) to Burst Mode.", GNB.JobID)] - GNBPvP_JunctionTank = 117009, + [CustomComboInfo("Junction Cast Tank Option", "Adds Junction Cast (Tank) to rotation.", GNB.JobID)] + GNBPvP_JunctionTank = 117008, + #endregion - // Last value = 117009 + #region Option Select + [ConflictingCombos(GNBPvP_ST_GnashingFang)] + [PvPCustomCombo] + [CustomComboInfo("Continuation Feature", "Adds Continuation to Gnashing Fang.", GNB.JobID)] + GNBPvP_GnashingFang = 117009, + + [ConflictingCombos(GNBPvP_ST_DrawAndJunction)] + [PvPCustomCombo] + [CustomComboInfo("Junctioned Cast Feature", "Adds Junctioned Cast to Draw and Junction.", GNB.JobID)] + GNBPvP_DrawAndJunction = 117010, + + // Last value = 117012 + + #endregion #endregion diff --git a/XIVSlothCombo/Combos/PvP/GNBPVP.cs b/XIVSlothCombo/Combos/PvP/GNBPVP.cs index 08f9e0e7f..0fadc4506 100644 --- a/XIVSlothCombo/Combos/PvP/GNBPVP.cs +++ b/XIVSlothCombo/Combos/PvP/GNBPVP.cs @@ -1,4 +1,6 @@ -using XIVSlothCombo.CustomComboNS; +using System; +using XIVSlothCombo.CustomComboNS; +using XIVSlothCombo.Data; namespace XIVSlothCombo.Combos.PvP { @@ -9,6 +11,7 @@ public const uint KeenEdge = 29098, BrutalShell = 29099, SolidBarrel = 29100, + BurstStrike = 29101, GnashingFang = 29102, SavageClaw = 29103, WickedTalon = 29104, @@ -44,48 +47,62 @@ internal const ushort internal class GNBPvP_Burst : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNBPvP_Burst; + + float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.4 base in PvP + bool enemyGuard = TargetHasEffect(PvPCommon.Buffs.Guard); //Guard check protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { if (actionID is KeenEdge or BrutalShell or SolidBarrel) { - // Buff Effects - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { + //Continuation if (IsEnabled(CustomComboPreset.GNBPvP_ST_Continuation) && (HasEffect(Buffs.ReadyToBlast) || HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); - if ((IsEnabled(CustomComboPreset.GNBPvP_JunctionDPS) && HasEffect(Buffs.JunctionDPS) && HasEffect(Buffs.NoMercy) && IsOffCooldown(JunctionedCast)) || - (IsEnabled(CustomComboPreset.GNBPvP_JunctionHealer) && HasEffect(Buffs.JunctionHealer) && IsOffCooldown(JunctionedCast)) || - (IsEnabled(CustomComboPreset.GNBPvP_JunctionTank) && HasEffect(Buffs.JunctionTank) && IsOffCooldown(JunctionedCast))) + //Draw&Junction buffs + if (!enemyGuard && + (IsEnabled(CustomComboPreset.GNBPvP_JunctionDPS) && HasEffect(Buffs.JunctionDPS) && HasEffect(Buffs.NoMercy) && ActionReady(JunctionedCast)) || + (IsEnabled(CustomComboPreset.GNBPvP_JunctionHealer) && HasEffect(Buffs.JunctionHealer) && ActionReady(JunctionedCast)) || + (IsEnabled(CustomComboPreset.GNBPvP_JunctionTank) && HasEffect(Buffs.JunctionTank) && ActionReady(JunctionedCast))) return OriginalHook(JunctionedCast); - if (IsEnabled(CustomComboPreset.GNBPvP_DrawAndJunction) && IsOffCooldown(DrawAndJunction) && !HasEffect(Buffs.PowderBarrel) && !HasEffect(Buffs.ReadyToBlast)) + //Draw&Junction + if (IsEnabled(CustomComboPreset.GNBPvP_DrawAndJunction) && ActionReady(DrawAndJunction) && !HasEffect(Buffs.PowderBarrel) && !HasEffect(Buffs.ReadyToBlast)) return DrawAndJunction; - if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && HasEffect(Buffs.NoMercy) && - GetBuffRemainingTime(Buffs.NoMercy) <= 1.5f && GetBuffRemainingTime(Buffs.NoMercy) > 0 && - GetRemainingCharges(RoughDivide) >= 1) + //RoughDivide + if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && ActionReady(RoughDivide) && !HasEffect(Buffs.NoMercy) && + (GetCooldownRemainingTime(DoubleDown) <= GCD || //Keeps 1 charge always for DoubleDown usage + GetCooldownRemainingTime(GnashingFang) <= GCD)) //Keeps 1 charge always for GnashingFang usage return RoughDivide; } - if (IsOffCooldown(DoubleDown) && - GetRemainingCharges(RoughDivide) == 2) + //RoughDivide overcap protection + if (ActionReady(DoubleDown) && GetRemainingCharges(RoughDivide) == 2) return RoughDivide; - // Gnashing Fang - if (IsEnabled(CustomComboPreset.GNBPvP_DoubleDown) && HasEffect(Buffs.NoMercy) && IsOffCooldown(DoubleDown) && InMeleeRange() && !TargetHasEffect(PvPCommon.Buffs.Guard)) + //DoubleDown + if (IsEnabled(CustomComboPreset.GNBPvP_DoubleDown) && !enemyGuard && HasEffect(Buffs.NoMercy) && ActionReady(DoubleDown) && InMeleeRange() && + (!JustUsed(GnashingFang) || !JustUsed(JugularRip) || !JustUsed(SavageClaw) && //Do not use when in GnashingFang combo + !HasEffect(Buffs.ReadyToBlast) || !HasEffect(Buffs.ReadyToRip) || !HasEffect(Buffs.ReadyToTear) || !HasEffect(Buffs.ReadyToGouge))) //Continuation buff check return DoubleDown; - if ((IsEnabled(CustomComboPreset.GNBPvP_ST_GnashingFang) && IsOffCooldown(GnashingFang) && !TargetHasEffect(PvPCommon.Buffs.Guard) && HasEffect(Buffs.NoMercy)) || - WasLastWeaponskill(GnashingFang) || WasLastWeaponskill(JugularRip) || WasLastWeaponskill(SavageClaw)) + if (HasEffect(Buffs.PowderBarrel) && ActionReady(GnashingFang)) //Burst Strike has prio over GnashingFang, but not DoubleDown + return BurstStrike; + + //GnashingFang + if (IsEnabled(CustomComboPreset.GNBPvP_ST_GnashingFang) && ActionReady(GnashingFang) && !enemyGuard && HasEffect(Buffs.NoMercy) || + JustUsed(GnashingFang) || JustUsed(JugularRip) || JustUsed(SavageClaw)) return OriginalHook(GnashingFang); } return actionID; } } + internal class GNBPvP_GnashingFang : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNBPvP_GnashingFang; @@ -96,5 +113,16 @@ actionID is GnashingFang && ? OriginalHook(Continuation) : actionID; } + + internal class GNBPvP_DrawJunction : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNBPvP_DrawAndJunction; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => + actionID is DrawAndJunction && + CanWeave(actionID) && (HasEffect(Buffs.JunctionDPS) || HasEffect(Buffs.JunctionHealer) || HasEffect(Buffs.JunctionTank)) + ? OriginalHook(JunctionedCast) + : actionID; + } } } \ No newline at end of file From 30add6cdbefcb1d8542f6bb7bd5361d30ecbdce8 Mon Sep 17 00:00:00 2001 From: ace Date: Tue, 13 Aug 2024 21:36:35 -0700 Subject: [PATCH 080/142] action leeway for scuffed windows --- XIVSlothCombo/Combos/CustomComboPreset.cs | 2 +- XIVSlothCombo/Combos/PvE/GNB.cs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 508207a6e..c72f7f4a2 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1522,7 +1522,7 @@ public enum CustomComboPreset #region Gnashing Fang [ParentCombo(GNB_ST_Advanced)] - [CustomComboInfo("Gnashing Fang & Continuation Option", "Adds Gnashing Fang's full combo to the main combo.\n 'Gnashing Fang Starter' option must be enabled or started manually and Sloth will finish it off.", GNB.JobID)] + [CustomComboInfo("Continuation Option", "Adds Continuation to the main combo.\n 'Gnashing Fang Starter' option must be enabled or started manually.", GNB.JobID)] GNB_ST_Gnashing = 7005, [ParentCombo(GNB_ST_Gnashing)] diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 8979a18d7..b2d6ae218 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -1,4 +1,3 @@ -using System; using Dalamud.Game.ClientState.JobGauge.Types; using Dalamud.Game.ClientState.Statuses; using XIVSlothCombo.Combos.PvE.Content; @@ -183,7 +182,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart - || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) //1min 3cart + || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -433,7 +432,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart - || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) //1min 3cart + || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -655,7 +654,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart - || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 75 and > 40 && JustUsed(NoMercy, 3f)) //1min 3cart + || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -752,7 +751,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //Lv100 2cart 2min starter - if (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) + if (IsEnabled(CustomComboPreset.GNB_GF_BurstStrike) && LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) return BurstStrike; //GF combo safety net From fc74062e8766f021c0aa94c6b1c0689da1446aa2 Mon Sep 17 00:00:00 2001 From: ace Date: Tue, 13 Aug 2024 21:52:26 -0700 Subject: [PATCH 081/142] alright I'm fucking done --- XIVSlothCombo/Combos/PvE/GNB.cs | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index b2d6ae218..a9e9b97b4 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -98,13 +98,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (CanWeave(actionID)) { if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use return NoMercy; // GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart + || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 15 && !ActionReady(DoubleDown) && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; @@ -192,7 +192,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2 && + || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2 && (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts return SonicBreak; } @@ -221,8 +221,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) //1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) //1min NM 2 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15)) //1min NM 2 carts return DoubleDown; } @@ -253,7 +253,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Reign combo if ((LevelChecked(ReignOfBeasts))) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -342,13 +342,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (CanWeave(actionID)) { if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use return NoMercy; } } @@ -431,7 +431,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (LevelChecked(ReignOfBeasts)) { if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min - || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart + || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && !ActionReady(DoubleDown) && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; @@ -442,7 +442,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2 && + || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2 && (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts return SonicBreak; } @@ -472,8 +472,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) //1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) //1min NM 2 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15)) //1min NM 2 carts return DoubleDown; } @@ -504,7 +504,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Reign combo if (IsEnabled(CustomComboPreset.GNB_ST_Reign) && (LevelChecked(ReignOfBeasts))) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -583,13 +583,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (CanWeave(actionID)) { if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) > GCD * 12 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use return NoMercy; } } @@ -664,7 +664,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min - || (GetCooldownRemainingTime(Bloodfest) > GCD * 12 && Ammo >= 2 && + || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2 && (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts return SonicBreak; } @@ -694,8 +694,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) > GCD * 12) //1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) > GCD * 12)) //1min NM 2 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15)) //1min NM 2 carts return DoubleDown; } @@ -726,7 +726,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Reign combo if (IsEnabled(CustomComboPreset.GNB_GF_Reign) && (LevelChecked(ReignOfBeasts))) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -802,7 +802,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return FatedCircle; if (LevelChecked(ReignOfBeasts)) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -876,7 +876,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return FatedCircle; if (IsEnabled(CustomComboPreset.GNB_AoE_Reign) && LevelChecked(ReignOfBeasts)) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -921,7 +921,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return DoubleDown; if (IsEnabled(CustomComboPreset.GNB_BS_Reign) && (LevelChecked(ReignOfBeasts))) { - if (HasEffect(Buffs.ReadyToReign) && GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (HasEffect(Buffs.ReadyToReign) && GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -991,7 +991,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return DoubleDown; if (IsEnabled(CustomComboPreset.GNB_NM_Reign) && LevelChecked(ReignOfBeasts)) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0 && GetCooldownRemainingTime(Bloodfest) > GCD * 12) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); From 0a1aebb2a429c382fa953b4f75b9c2ac473c344d Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Wed, 14 Aug 2024 06:47:39 +0100 Subject: [PATCH 082/142] Update tsubame logic --- XIVSlothCombo/Combos/JobHelpers/SAM.cs | 35 ++++++++++++++ XIVSlothCombo/Combos/PvE/SAM.cs | 67 +------------------------- 2 files changed, 37 insertions(+), 65 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/SAM.cs b/XIVSlothCombo/Combos/JobHelpers/SAM.cs index 174a8c014..ec2a655e5 100644 --- a/XIVSlothCombo/Combos/JobHelpers/SAM.cs +++ b/XIVSlothCombo/Combos/JobHelpers/SAM.cs @@ -1,6 +1,7 @@ using Dalamud.Game.ClientState.JobGauge.Types; using ECommons.DalamudServices; using FFXIVClientStructs.FFXIV.Client.Game; +using System.Linq; using XIVSlothCombo.Combos.JobHelpers.Enums; using XIVSlothCombo.Combos.PvE; using XIVSlothCombo.CustomComboNS.Functions; @@ -29,6 +30,40 @@ private unsafe static bool GetComboStarted() return true; return false; } + + internal static bool UseTsubame => GetUseTsubame(); + + private static bool GetUseTsubame() + { + int MeikyoUsed = ActionWatching.CombatActions.Count(x => x == MeikyoShisui); + + if (CustomComboFunctions.ActionReady(TsubameGaeshi)) + { + //Tendo + if (CustomComboFunctions.HasEffect(Buffs.TendoKaeshiSetsugekkaReady)) + return true; + + if (CustomComboFunctions.HasEffect(Buffs.TsubameReady)) + { + var meikyoModulo = MeikyoUsed % 15; + //1 and 2 min + if ((meikyoModulo is 0 or 1 or 2 or 3 or 4 or 9 or 10)) + return true; + + // 3 and 4 min + if ((meikyoModulo is 5 or 6 or 11 or 12) && + CustomComboFunctions.GetBuffStacks(Buffs.MeikyoShisui) is 2) + return true; + + // 5 and 6 min + if ((meikyoModulo is 7 or 8 or 13 or 14) && + CustomComboFunctions.GetBuffStacks(Buffs.MeikyoShisui) is 1) + return true; + } + } + return false; + } + } diff --git a/XIVSlothCombo/Combos/PvE/SAM.cs b/XIVSlothCombo/Combos/PvE/SAM.cs index ec6c61b25..cf5cbf4ca 100644 --- a/XIVSlothCombo/Combos/PvE/SAM.cs +++ b/XIVSlothCombo/Combos/PvE/SAM.cs @@ -300,7 +300,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Iaijutsu Features if (LevelChecked(Iaijutsu)) { - if (UseTsubame()) + if (SAMHelper.UseTsubame) return OriginalHook(TsubameGaeshi); if (!IsMoving && @@ -362,37 +362,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } return actionID; } - - private static bool UseTsubame() - { - int MeikyoUsed = ActionWatching.CombatActions.Count(x => x == MeikyoShisui); - - if (LevelChecked(TsubameGaeshi)) - { - //Tendo - if (WasLastWeaponskill(TendoSetsugekka) && HasEffect(Buffs.TendoKaeshiSetsugekkaReady)) - return true; - - if (HasEffect(Buffs.TsubameReady)) - { - //1 and 2 min - if ((MeikyoUsed is 0 or 1 or 2 or 3 or 4 or 9 or 10) && - WasLastWeaponskill(MidareSetsugekka)) - return true; - - // 3 and 4 min - if ((MeikyoUsed is 5 or 6 or 11 or 12) && - GetBuffStacks(Buffs.MeikyoShisui) is 2) - return true; - - // 5 and 6 min - if ((MeikyoUsed is 7 or 8 or 13 or 14) && - GetBuffStacks(Buffs.MeikyoShisui) is 1) - return true; - } - } - return false; - } } internal class SAM_ST_AdvancedMode : CustomCombo @@ -509,7 +478,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Iaijutsu Features if (IsEnabled(CustomComboPreset.SAM_ST_CDs_Iaijutsu) && LevelChecked(Iaijutsu)) { - if (UseTsubame()) + if (SAMHelper.UseTsubame) return OriginalHook(TsubameGaeshi); if ((!IsEnabled(CustomComboPreset.SAM_ST_CDs_Iaijutsu_Movement) || @@ -579,38 +548,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } return actionID; } - - private static bool UseTsubame() - { - int MeikyoUsed = ActionWatching.CombatActions.Count(x => x == MeikyoShisui); - - if (IsEnabled(CustomComboPreset.SAM_ST_CDs_Iaijutsu) && - LevelChecked(TsubameGaeshi)) - { - //Tendo - if (WasLastWeaponskill(TendoSetsugekka) && HasEffect(Buffs.TendoKaeshiSetsugekkaReady)) - return true; - - if (HasEffect(Buffs.TsubameReady)) - { - //1 and 2 min - if ((MeikyoUsed is 0 or 1 or 2 or 3 or 4 or 9 or 10) && - WasLastWeaponskill(MidareSetsugekka)) - return true; - - // 3 and 4 min - if ((MeikyoUsed is 5 or 6 or 11 or 12) && - GetBuffStacks(Buffs.MeikyoShisui) is 2) - return true; - - // 5 and 6 min - if ((MeikyoUsed is 7 or 8 or 13 or 14) && - GetBuffStacks(Buffs.MeikyoShisui) is 1) - return true; - } - } - return false; - } } internal class SAM_AoE_OkaCombo : CustomCombo From 7371e7dd27d567c4c86262e1769b00fd4f97e742 Mon Sep 17 00:00:00 2001 From: ace Date: Tue, 13 Aug 2024 23:43:25 -0700 Subject: [PATCH 083/142] DRG PvP overhaul --- XIVSlothCombo/Combos/CustomComboPreset.cs | 52 ++++++++++++-------- XIVSlothCombo/Combos/PvP/DRGPVP.cs | 34 +++++++++---- XIVSlothCombo/Window/Functions/UserConfig.cs | 4 +- 3 files changed, 58 insertions(+), 32 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..830319431 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -4485,38 +4485,50 @@ The three digets after RDM.JobID can be used to reorder items in the list #region DRAGOON [PvPCustomCombo] - [CustomComboInfo("Burst Mode", "Using Elusive Jump turns Wheeling Thrust Combo into all-in-one burst damage button.", DRG.JobID)] + [CustomComboInfo("Advanced Mode", "Replaces Wheeling Thrust Combo with its optimal combo chain.", DRG.JobID)] DRGPvP_Burst = 116000, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Geirskogul Option", "Adds Geirskogul to Burst Mode.", DRG.JobID)] - DRGPvP_Geirskogul = 116001, + [CustomComboInfo("Elusive Jump Option", "Adds Elusive Jump to the rotation.\n WARNING: This does not take into account anything whatsoever besides the rotation.\n Will always use on CD no matter any situation regarding AoEs or outside interference. Use at your own risk.", DRG.JobID)] + DRGPvP_ElusiveJump = 116001, + + [ParentCombo(DRGPvP_Burst)] + [CustomComboInfo("Geirskogul Option", "Adds Geirskogul to the rotation.", DRG.JobID)] + DRGPvP_Geirskogul = 116002, + + [ParentCombo(DRGPvP_Geirskogul)] + [CustomComboInfo("Nastrond Option", "Adds Nastrond to the rotation.", DRG.JobID)] + DRGPvP_Nastrond = 116003, [ParentCombo(DRGPvP_Geirskogul)] - [CustomComboInfo("Nastrond Option", "Adds Nastrond to Burst Mode.", DRG.JobID)] - DRGPvP_Nastrond = 116002, + [CustomComboInfo("Optimal Nastrond Option", "Adds Nastrond to the rotation when the target has 50 percent or lower HP or when buff is about to expire, regardless of settings above.", DRG.JobID)] + DRGPvP_NastrondOpti = 116004, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Horrid Roar Option", "Adds Horrid Roar to Burst Mode.", DRG.JobID)] - DRGPvP_HorridRoar = 116003, + [CustomComboInfo("Horrid Roar Option", "Adds Horrid Roar to the rotation.", DRG.JobID)] + DRGPvP_HorridRoar = 116005, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Sustain Chaos Spring Option", "Adds Chaos Spring to Burst Mode when below the set HP percentage.", DRG.JobID)] - DRGPvP_ChaoticSpringSustain = 116004, + [CustomComboInfo("Chaotic Spring Option", "Adds Chaotic Spring to the rotation, essentially only for damage purposes.", DRG.JobID)] + DRGPvP_ChaoticSpring = 116006, + + [ParentCombo(DRGPvP_ChaoticSpring)] + [CustomComboInfo("Chaotic Spring Self-Heal Option", "Adds Chaotic Spring to the rotation when below the set HP percentage, essentially only for healing purposes.", DRG.JobID)] + DRGPvP_ChaoticSpringSustain = 116007, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Wyrmwind Thrust Option", "Adds Wyrmwind Thrust to Burst Mode.", DRG.JobID)] - DRGPvP_WyrmwindThrust = 116006, + [CustomComboInfo("Wyrmwind Thrust Option", "Adds Wyrmwind Thrust to the rotation.", DRG.JobID)] + DRGPvP_WyrmwindThrust = 116008, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("High Jump Weave Option", "Adds High Jump to Burst Mode.", DRG.JobID)] - DRGPvP_HighJump = 116007, + [CustomComboInfo("High Jump Option", "Adds High Jump to the rotation, optimally.", DRG.JobID)] + DRGPvP_HighJump = 116009, [ParentCombo(DRGPvP_Burst)] [CustomComboInfo("Elusive Jump Burst Protection Option", "Disables Elusive Jump if Burst is not ready.", DRG.JobID)] - DRGPvP_BurstProtection = 116008, + DRGPvP_BurstProtection = 116010, - // Last value = 116008 + // Last value = 116010 #endregion @@ -4535,7 +4547,7 @@ The three digets after RDM.JobID can be used to reorder items in the list GNBPvP_GnashingFang = 117002, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Draw And Junction Option", "Adds Draw And Junction to Burst Mode.", GNB.JobID)] + [CustomComboInfo("Draw And Junction Option", "Adds Draw And Junction to the rotation.", GNB.JobID)] GNBPvP_DrawAndJunction = 117003, [ParentCombo(GNBPvP_Burst)] @@ -4543,7 +4555,7 @@ The three digets after RDM.JobID can be used to reorder items in the list GNBPvP_ST_GnashingFang = 117004, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Continuation Option", "Adds Continuation to Burst Mode.", GNB.JobID)] + [CustomComboInfo("Continuation Option", "Adds Continuation to the rotation.", GNB.JobID)] GNBPvP_ST_Continuation = 117005, [ParentCombo(GNBPvP_Burst)] @@ -4551,15 +4563,15 @@ The three digets after RDM.JobID can be used to reorder items in the list GNBPvP_RoughDivide = 117006, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Junction Cast DPS Option", "Adds Junction Cast (DPS) to Burst Mode.", GNB.JobID)] + [CustomComboInfo("Junction Cast DPS Option", "Adds Junction Cast (DPS) to the rotation.", GNB.JobID)] GNBPvP_JunctionDPS = 117007, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Junction Cast Healer Option", "Adds Junction Cast (Healer) to Burst Mode.", GNB.JobID)] + [CustomComboInfo("Junction Cast Healer Option", "Adds Junction Cast (Healer) to the rotation.", GNB.JobID)] GNBPvP_JunctionHealer = 117008, [ParentCombo(GNBPvP_Burst)] - [CustomComboInfo("Junction Cast Tank Option", "Adds Junction Cast (Tank) to Burst Mode.", GNB.JobID)] + [CustomComboInfo("Junction Cast Tank Option", "Adds Junction Cast (Tank) to the rotation.", GNB.JobID)] GNBPvP_JunctionTank = 117009, // Last value = 117009 diff --git a/XIVSlothCombo/Combos/PvP/DRGPVP.cs b/XIVSlothCombo/Combos/PvP/DRGPVP.cs index b3e8a9371..fbc7fd876 100644 --- a/XIVSlothCombo/Combos/PvP/DRGPVP.cs +++ b/XIVSlothCombo/Combos/PvP/DRGPVP.cs @@ -51,32 +51,46 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is RaidenThrust or FangAndClaw or WheelingThrust) { bool enemyGuarded = TargetHasEffectAny(PvPCommon.Buffs.Guard); + bool closeEnough = GetTargetDistance() <= 7; + bool farEnough = GetTargetDistance() <= 13; + float enemyHP = GetTargetHPPercent(); + float playerHP = PlayerHealthPercentageHp(); + float GCD = GetCooldown(WheelingThrust).CooldownTotal; if (!enemyGuarded) { if (CanWeave(actionID)) { - if (IsEnabled(CustomComboPreset.DRGPvP_HighJump) && IsOffCooldown(HighJump) && HasEffect(Buffs.LifeOfTheDragon)) + //ElusiveJump + if (IsEnabled(CustomComboPreset.DRGPvP_ElusiveJump) && ActionReady(ElusiveJump) && GetCooldownRemainingTime(HighJump) < 1.5f) //use on CD to keep rotation going + return ElusiveJump; + + //HighJump + if (IsEnabled(CustomComboPreset.DRGPvP_HighJump) && ActionReady(HighJump) && (JustUsed(WyrmwindThrust) || enemyHP <= 10)) //use to re-engage after ElusiveJump > far WyrmwindThrust, best held for burst or to execute return HighJump; - if (IsEnabled(CustomComboPreset.DRGPvP_Nastrond) && InMeleeRange()) + //Nastrond + if (IsEnabled(CustomComboPreset.DRGPvP_Nastrond) && farEnough) { - if (HasEffect(Buffs.LifeOfTheDragon) && PlayerHealthPercentageHp() < GetOptionValue(Config.DRGPvP_LOTD_HPValue) - || HasEffect(Buffs.LifeOfTheDragon) && GetBuffRemainingTime(Buffs.LifeOfTheDragon) < GetOptionValue(Config.DRGPvP_LOTD_Duration)) + if (HasEffect(Buffs.LifeOfTheDragon) && + ((IsEnabled(CustomComboPreset.DRGPvP_NastrondOpti) && (enemyHP <= 50 || GetBuffRemainingTime(Buffs.LifeOfTheDragon) <= GCD)) || //best used when TargetHP is lower than 50 + (IsNotEnabled(CustomComboPreset.DRGPvP_NastrondOpti) && playerHP < GetOptionValue(Config.DRGPvP_LOTD_HPValue)) || //PlayerHP slider + (IsNotEnabled(CustomComboPreset.DRGPvP_NastrondOpti) && GetBuffRemainingTime(Buffs.LifeOfTheDragon) < GetOptionValue(Config.DRGPvP_LOTD_Duration)))) //Buff duration slider return Nastrond; } - if (IsEnabled(CustomComboPreset.DRGPvP_HorridRoar) && IsOffCooldown(HorridRoar) && InMeleeRange()) + if (IsEnabled(CustomComboPreset.DRGPvP_HorridRoar) && ActionReady(HorridRoar) && HasEffect(Buffs.LifeOfTheDragon) && closeEnough) //best used when under LOTD to prevent dying due to squishiness return HorridRoar; } - if (IsEnabled(CustomComboPreset.DRGPvP_ChaoticSpringSustain) && IsOffCooldown(ChaoticSpring) && PlayerHealthPercentageHp() < GetOptionValue(Config.DRGPvP_CS_HP_Threshold)) + if (IsEnabled(CustomComboPreset.DRGPvP_ChaoticSpring) && InMeleeRange() && ActionReady(ChaoticSpring)) { - if (!HasEffect(Buffs.FirstmindsFocus) && !HasEffect(Buffs.LifeOfTheDragon) && IsOnCooldown(Geirskogul) && IsOnCooldown(ElusiveJump) - || !HasEffect(Buffs.FirstmindsFocus) && HasEffect(Buffs.LifeOfTheDragon) && IsOnCooldown(Geirskogul) && IsOnCooldown(ElusiveJump) && WasLastWeaponskill(HeavensThrust)) + if ((!HasEffect(Buffs.FirstmindsFocus) && !HasEffect(Buffs.LifeOfTheDragon) && !ActionReady(Geirskogul) && !ActionReady(ElusiveJump)) //for damage + || (IsEnabled(CustomComboPreset.DRGPvP_ChaoticSpringSustain) && playerHP < GetOptionValue(Config.DRGPvP_CS_HP_Threshold)) //PlayerHP slider + || (!IsEnabled(CustomComboPreset.DRGPvP_ChaoticSpringSustain) && playerHP < 60)) //force heal self return ChaoticSpring; } - if (IsEnabled(CustomComboPreset.DRGPvP_Geirskogul) && IsOffCooldown(Geirskogul) && WasLastAbility(ElusiveJump) && HasEffect(Buffs.FirstmindsFocus)) + if (IsEnabled(CustomComboPreset.DRGPvP_Geirskogul) && ActionReady(Geirskogul) && farEnough) return Geirskogul; - if (IsEnabled(CustomComboPreset.DRGPvP_WyrmwindThrust) && HasEffect(Buffs.FirstmindsFocus) && GetTargetDistance() >= GetOptionValue(Config.DRGPvP_Distance_Threshold)) + if (IsEnabled(CustomComboPreset.DRGPvP_WyrmwindThrust) && JustUsed(ElusiveJump, 3f) && GetTargetDistance() >= GetOptionValue(Config.DRGPvP_Distance_Threshold)) return WyrmwindThrust; } } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index d33a2869e..db42fd19b 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1583,10 +1583,10 @@ internal static void Draw(CustomComboPreset preset, bool enabled) UserConfig.DrawSliderInt(2, 8, DRGPvP.Config.DRGPvP_LOTD_Duration, "Seconds remaining of Life of the Dragon buff before using Nastrond if you are still above the set HP percentage.", 150, SliderIncrements.Ones); if (preset is CustomComboPreset.DRGPvP_ChaoticSpringSustain) - UserConfig.DrawSliderInt(0, 101, DRGPvP.Config.DRGPvP_CS_HP_Threshold, "Chaos Spring HP percentage threshold", 150, SliderIncrements.Ones); + UserConfig.DrawSliderInt(0, 101, DRGPvP.Config.DRGPvP_CS_HP_Threshold, "Chaotic Spring HP percentage threshold", 150, SliderIncrements.Ones); if (preset is CustomComboPreset.DRGPvP_WyrmwindThrust) - UserConfig.DrawSliderInt(0, 20, DRGPvP.Config.DRGPvP_Distance_Threshold, "Distance Treshold for Wyrmwind Thrust", 150, SliderIncrements.Ones); + UserConfig.DrawSliderInt(0, 20, DRGPvP.Config.DRGPvP_Distance_Threshold, "Distance Threshold for Wyrmwind Thrust", 150, SliderIncrements.Ones); #endregion #endregion From af271e11f84df98cbf7a0a9a69857b612241a07d Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 14 Aug 2024 02:25:34 -0700 Subject: [PATCH 084/142] WAR PvP overhaul --- XIVSlothCombo/Combos/CustomComboPreset.cs | 37 ++++++++++--- XIVSlothCombo/Combos/PvP/WARPVP.cs | 58 +++++++++++++------- XIVSlothCombo/Window/Functions/UserConfig.cs | 6 -- 3 files changed, 67 insertions(+), 34 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 830319431..dc879beff 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -4828,25 +4828,48 @@ The three digets after RDM.JobID can be used to reorder items in the list #region WARRIOR [PvPCustomCombo] - [CustomComboInfo("Burst Mode", "Turns Heavy Swing into an all-in-one damage button.", WARPvP.JobID)] + [CustomComboInfo("Advanced Mode", "Turns Heavy Swing Combo into its optimal combo chain.", WARPvP.JobID)] WARPvP_BurstMode = 128000, [PvPCustomCombo] [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Bloodwhetting Option", "Allows use of Bloodwhetting any time, not just between GCDs.", WARPvP.JobID)] + [CustomComboInfo("Bloodwhetting Option", "Adds Bloodwhetting to the rotation.", WARPvP.JobID)] WARPvP_BurstMode_Bloodwhetting = 128001, [PvPCustomCombo] [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Blota Option", "Adds Blota to Burst Mode when not in melee range.", WARPvP.JobID)] - WARPvP_BurstMode_Blota = 128003, + [CustomComboInfo("Onslaught Option", "Adds Onslaught to the rotation.", WARPvP.JobID)] + WARPvP_BurstMode_Onslaught = 128002, [PvPCustomCombo] [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Primal Rend Option", "Adds Primal Rend to Burst Mode.", WARPvP.JobID)] - WARPvP_BurstMode_PrimalRend = 128004, + [CustomComboInfo("Orogeny Option", "Adds Orogeny to the rotation when available.", WARPvP.JobID)] + WARPvP_BurstMode_Orogeny = 128003, - // Last value = 128002 + [PvPCustomCombo] + [ConflictingCombos(WARPvP_BurstMode_Stunlock)] + [ParentCombo(WARPvP_BurstMode)] + [CustomComboInfo("Blota Option", "Adds Blota to the rotation.", WARPvP.JobID)] + WARPvP_BurstMode_Blota = 128004, + + [PvPCustomCombo] + [ConflictingCombos(WARPvP_BurstMode_Blota, WARPvP_BurstMode_PrimalRend)] + [ParentCombo(WARPvP_BurstMode_PrimalRend)] + [CustomComboInfo("StunLock Option", "Adds Primal Rend & Blota to the rotation together to execute a 4s stun lock.", WARPvP.JobID)] + WARPvP_BurstMode_Stunlock = 128005, + + [PvPCustomCombo] + [ConflictingCombos(WARPvP_BurstMode_Stunlock)] + [ParentCombo(WARPvP_BurstMode)] + [CustomComboInfo("Primal Rend Option", "Adds Primal Rend the rotation.", WARPvP.JobID)] + WARPvP_BurstMode_PrimalRend = 128006, + + [PvPCustomCombo] + [ParentCombo(WARPvP_BurstMode)] + [CustomComboInfo("Chaotic Cyclone Option", "Adds Chaotic Cyclone the rotation when available.", WARPvP.JobID)] + WARPvP_BurstMode_ChaoticCyclone = 128007, + + // Last value = 128007 #endregion diff --git a/XIVSlothCombo/Combos/PvP/WARPVP.cs b/XIVSlothCombo/Combos/PvP/WARPVP.cs index ebbe323e1..ead0d9fe1 100644 --- a/XIVSlothCombo/Combos/PvP/WARPVP.cs +++ b/XIVSlothCombo/Combos/PvP/WARPVP.cs @@ -1,3 +1,4 @@ +using FFXIVClientStructs.FFXIV.Client.Game; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; @@ -15,6 +16,7 @@ internal const uint Onslaught = 29079, Orogeny = 29080, Blota = 29081, + PrimalScream = 29083, //LB Bloodwhetting = 29082; internal class Buffs @@ -24,46 +26,60 @@ internal const ushort InnerRelease = 1303; } - public static class Config + internal class Debuffs { - public static UserInt - WARPVP_BlotaTiming = new("WARPVP_BlotaTiming"); - + internal const ushort + Onslaught = 3029; } + internal class WARPvP_BurstMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WARPvP_BurstMode; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { + bool enemyStun = TargetHasEffectAny(PvPCommon.Debuffs.Stun); + bool enemyGuard = TargetHasEffectAny(PvPCommon.Buffs.Guard); + var canWeave = CanWeave(actionID); + if (actionID is HeavySwing or Maim or StormsPath) { - var canWeave = CanWeave(actionID); + if (canWeave && !enemyGuard) + { + //Orogeny + if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Orogeny) && + ActionReady(Orogeny) && InMeleeRange() && !enemyGuard) //use on CD + return OriginalHook(Orogeny); + } - if (!GetCooldown(Bloodwhetting).IsCooldown && (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Bloodwhetting) || canWeave)) + //Bloodwhetting + if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Bloodwhetting) && + ActionReady(Bloodwhetting) && (ActionReady(PrimalRend) || GetCooldownRemainingTime(PrimalRend) > 5) && GetCooldownRemainingTime(Onslaught) < 1) //use before Primal Rend burst return OriginalHook(Bloodwhetting); - if (!InMeleeRange() && IsOffCooldown(Blota) && !TargetHasEffectAny(PvPCommon.Debuffs.Stun) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && Config.WARPVP_BlotaTiming == 0 && IsOffCooldown(PrimalRend)) + //Blota + if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && !enemyStun && !enemyGuard && + (!InMeleeRange() && ActionReady(Blota) && !enemyStun && canWeave) || //use when out of range + (!IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Stunlock) && JustUsed(PrimalRend, 3f))) //stunlock return OriginalHook(Blota); - if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_PrimalRend) && IsOffCooldown(PrimalRend)) - return OriginalHook(PrimalRend); - - if (!InMeleeRange() && IsOffCooldown(Blota) && !TargetHasEffectAny(PvPCommon.Debuffs.Stun) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && Config.WARPVP_BlotaTiming == 1 && IsOnCooldown(PrimalRend)) - return OriginalHook(Blota); - - if (!GetCooldown(Onslaught).IsCooldown && canWeave) + //Onslaught + if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Onslaught) && + ActionReady(Onslaught) && (ActionReady(PrimalRend)) && !enemyGuard) return OriginalHook(Onslaught); - if (InMeleeRange()) - { - if (HasEffect(Buffs.NascentChaos)) - return OriginalHook(Bloodwhetting); + //ChaoticCyclone + if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_ChaoticCyclone) && + HasEffect(Buffs.NascentChaos) && !ActionReady(PrimalRend) && InMeleeRange()) //use on CD + return OriginalHook(Bloodwhetting); - if (!GetCooldown(Orogeny).IsCooldown && canWeave) - return OriginalHook(Orogeny); - } + //PrimalRend + if (!enemyGuard && JustUsed(Onslaught, 3f) && ActionReady(PrimalRend) && + (IsEnabled(CustomComboPreset.WARPvP_BurstMode_PrimalRend) || //use on CD + (!IsEnabled(CustomComboPreset.WARPvP_BurstMode_PrimalRend) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Stunlock) && GetCooldownRemainingTime(Blota) < 0.6f))) //stunlock + return OriginalHook(PrimalRend); } + return actionID; } } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index db42fd19b..6ad58f456 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -2476,12 +2476,6 @@ internal static void Draw(CustomComboPreset preset, bool enabled) if (preset == CustomComboPreset.WAR_AoE_Overpower_Infuriate) UserConfig.DrawSliderInt(0, 50, WAR.Config.WAR_InfuriateAoEGauge, "Use when gauge is under or equal to"); - if (preset == CustomComboPreset.WARPvP_BurstMode_Blota) - { - UserConfig.DrawHorizontalRadioButton(WARPvP.Config.WARPVP_BlotaTiming, "Before Primal Rend", "", 0); - UserConfig.DrawHorizontalRadioButton(WARPvP.Config.WARPVP_BlotaTiming, "After Primal Rend", "", 1); - } - #endregion // ==================================================================================== #region WHITE MAGE From 638d036177240ad921f9ffa3c4968d54b5a77704 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 14 Aug 2024 03:45:26 -0700 Subject: [PATCH 085/142] follow template --- XIVSlothCombo/Combos/CustomComboPreset.cs | 4 ++-- XIVSlothCombo/Combos/PvP/MCHPVP.cs | 29 +++++++++++++++-------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index dc879beff..2ecc3757f 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -4485,7 +4485,7 @@ The three digets after RDM.JobID can be used to reorder items in the list #region DRAGOON [PvPCustomCombo] - [CustomComboInfo("Advanced Mode", "Replaces Wheeling Thrust Combo with its optimal combo chain.", DRG.JobID)] + [CustomComboInfo("Burst Mode", "Turns Wheeling Thrust Combo into an all-in-one damage button.", DRG.JobID)] DRGPvP_Burst = 116000, [ParentCombo(DRGPvP_Burst)] @@ -4828,7 +4828,7 @@ The three digets after RDM.JobID can be used to reorder items in the list #region WARRIOR [PvPCustomCombo] - [CustomComboInfo("Advanced Mode", "Turns Heavy Swing Combo into its optimal combo chain.", WARPvP.JobID)] + [CustomComboInfo("Burst Mode", "Turns Heavy Swing Combo into its optimal combo chain.", WARPvP.JobID)] WARPvP_BurstMode = 128000, [PvPCustomCombo] diff --git a/XIVSlothCombo/Combos/PvP/MCHPVP.cs b/XIVSlothCombo/Combos/PvP/MCHPVP.cs index 1167bb3fc..5dfb9498e 100644 --- a/XIVSlothCombo/Combos/PvP/MCHPVP.cs +++ b/XIVSlothCombo/Combos/PvP/MCHPVP.cs @@ -47,29 +47,38 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID == BlastCharge) { var canWeave = CanWeave(actionID); - var analysisStacks = GetRemainingCharges(Analysis); - var bigDamageStacks = GetRemainingCharges(OriginalHook(Drill)); + var hasAnalysis = GetRemainingCharges(Analysis); //How many stacks of Analysis we have + var hasDrill = GetRemainingCharges(OriginalHook(Drill)); //How many charges var overheated = HasEffect(Buffs.Overheated); - if (canWeave && HasEffect(Buffs.Overheated) && IsOffCooldown(Wildfire)) + //Wildfire + if (canWeave && overheated && ActionReady(Wildfire)) return OriginalHook(Wildfire); + //Turret + //TODO: I'm not sure the opti on this skill. So I'm just going to include it as an option. + if (canWeave && ActionReady(BishopTurret)) + return OriginalHook(BishopTurret); + + //HeatBlast if (overheated) return OriginalHook(HeatBlast); - if ((HasEffect(Buffs.DrillPrimed) || - (HasEffect(Buffs.ChainSawPrimed) && !IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis)) || - (HasEffect(Buffs.AirAnchorPrimed) && IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis))) && - !HasEffect(Buffs.Analysis) && analysisStacks > 0 && (!IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltDrill) - || IsOnCooldown(Wildfire)) && !canWeave && !overheated && bigDamageStacks > 0) + //Analysis + if ((HasEffect(Buffs.DrillPrimed) || //Drill + (HasEffect(Buffs.ChainSawPrimed) && !IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis)) || //Chainsaw + (HasEffect(Buffs.AirAnchorPrimed) && IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis))) && //AirAnchor + !HasEffect(Buffs.Analysis) && hasAnalysis > 0 && (!IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltDrill) //Optimal use + || !ActionReady(Wildfire)) && !canWeave && !overheated && hasDrill > 0) return OriginalHook(Analysis); - if (bigDamageStacks > 0) + //Analysis procs Primed skills + if (hasDrill > 0) { if (HasEffect(Buffs.DrillPrimed)) return OriginalHook(Drill); - if (HasEffect(Buffs.BioblasterPrimed) && GetTargetDistance() <= 12) + if (HasEffect(Buffs.BioblasterPrimed) && GetTargetDistance() <= 10) return OriginalHook(BioBlaster); if (HasEffect(Buffs.AirAnchorPrimed)) From 577788136c842356b8e29bbe9ae621eebd4045b6 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 14 Aug 2024 04:09:46 -0700 Subject: [PATCH 086/142] MCH PvP overhaul --- XIVSlothCombo/Combos/CustomComboPreset.cs | 45 +++++++++++++++++++++-- XIVSlothCombo/Combos/PvP/MCHPVP.cs | 30 +++++++-------- 2 files changed, 54 insertions(+), 21 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 2ecc3757f..30e2f0229 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -4484,6 +4484,7 @@ The three digets after RDM.JobID can be used to reorder items in the list #endregion #region DRAGOON + [ReplaceSkill(DRGPvP.RaidenThrust)] [PvPCustomCombo] [CustomComboInfo("Burst Mode", "Turns Wheeling Thrust Combo into an all-in-one damage button.", DRG.JobID)] DRGPvP_Burst = 116000, @@ -4579,21 +4580,57 @@ The three digets after RDM.JobID can be used to reorder items in the list #endregion #region MACHINIST + [ReplaceSkill(MCHPvP.BlastCharge)] [PvPCustomCombo] [CustomComboInfo("Burst Mode", "Turns Blast Charge into an all-in-one damage button.", MCHPvP.JobID)] MCHPvP_BurstMode = 118000, [PvPCustomCombo] [ParentCombo(MCHPvP_BurstMode)] - [CustomComboInfo("Alternate Drill Option", "Saves Drill for use after Wildfire.", MCHPvP.JobID)] - MCHPvP_BurstMode_AltDrill = 118001, + [CustomComboInfo("Wildfire Option", "Adds Wildfire into the rotation.", MCHPvP.JobID)] + MCHPvP_BurstMode_Wildfire = 118001, + + [PvPCustomCombo] + [ParentCombo(MCHPvP_BurstMode)] + [CustomComboInfo("Heat Blast Option", "Adds Heat Blast into the rotation when appropriate.", MCHPvP.JobID)] + MCHPvP_BurstMode_HeatBlast = 118002, [PvPCustomCombo] [ParentCombo(MCHPvP_BurstMode)] + [CustomComboInfo("Analysis Option", "Adds Analysis into the rotation when appropriate.", MCHPvP.JobID)] + MCHPvP_BurstMode_Analysis = 118003, + + [PvPCustomCombo] + [ParentCombo(MCHPvP_BurstMode)] + [CustomComboInfo("Drill Option", "Adds Drill into the rotation when primed.", MCHPvP.JobID)] + MCHPvP_BurstMode_Drill = 118004, + + [PvPCustomCombo] + [ParentCombo(MCHPvP_BurstMode)] + [CustomComboInfo("BioBlaster Option", "Adds BioBlaster into the rotation when primed.", MCHPvP.JobID)] + MCHPvP_BurstMode_BioBlaster = 118005, + + [PvPCustomCombo] + [ParentCombo(MCHPvP_BurstMode)] + [CustomComboInfo("Air Anchor Option", "Adds Heat Blast into the rotation when primed.", MCHPvP.JobID)] + MCHPvP_BurstMode_AirAnchor = 118006, + + [PvPCustomCombo] + [ParentCombo(MCHPvP_BurstMode)] + [CustomComboInfo("Chain Saw Option", "Adds Heat Blast into the rotation when primed.", MCHPvP.JobID)] + MCHPvP_BurstMode_ChainSaw = 118007, + + [PvPCustomCombo] + [ParentCombo(MCHPvP_BurstMode_Drill)] + [CustomComboInfo("Alternate Drill Option", "Saves Drill for use after Wildfire.", MCHPvP.JobID)] + MCHPvP_BurstMode_AltDrill = 118008, + + [PvPCustomCombo] + [ParentCombo(MCHPvP_BurstMode_AirAnchor)] [CustomComboInfo("Alternate Analysis Option", "Uses Analysis with Air Anchor instead of Chain Saw.", MCHPvP.JobID)] - MCHPvP_BurstMode_AltAnalysis = 118002, + MCHPvP_BurstMode_AltAnalysis = 118009, - // Last value = 118002 + // Last value = 118009 #endregion diff --git a/XIVSlothCombo/Combos/PvP/MCHPVP.cs b/XIVSlothCombo/Combos/PvP/MCHPVP.cs index 5dfb9498e..3e36223d2 100644 --- a/XIVSlothCombo/Combos/PvP/MCHPVP.cs +++ b/XIVSlothCombo/Combos/PvP/MCHPVP.cs @@ -49,42 +49,38 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var canWeave = CanWeave(actionID); var hasAnalysis = GetRemainingCharges(Analysis); //How many stacks of Analysis we have var hasDrill = GetRemainingCharges(OriginalHook(Drill)); //How many charges - var overheated = HasEffect(Buffs.Overheated); + var hasHeat = HasEffect(Buffs.Overheated); //Wildfire - if (canWeave && overheated && ActionReady(Wildfire)) + if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_Wildfire) && + canWeave && hasHeat && ActionReady(Wildfire)) return OriginalHook(Wildfire); - //Turret - //TODO: I'm not sure the opti on this skill. So I'm just going to include it as an option. - if (canWeave && ActionReady(BishopTurret)) - return OriginalHook(BishopTurret); - //HeatBlast - if (overheated) + if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_HeatBlast) && hasHeat) return OriginalHook(HeatBlast); //Analysis - if ((HasEffect(Buffs.DrillPrimed) || //Drill + if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_Analysis) && (HasEffect(Buffs.DrillPrimed) || //Drill (HasEffect(Buffs.ChainSawPrimed) && !IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis)) || //Chainsaw - (HasEffect(Buffs.AirAnchorPrimed) && IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis))) && //AirAnchor - !HasEffect(Buffs.Analysis) && hasAnalysis > 0 && (!IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltDrill) //Optimal use - || !ActionReady(Wildfire)) && !canWeave && !overheated && hasDrill > 0) + (HasEffect(Buffs.AirAnchorPrimed) && IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis))) && //Alternate AirAnchor + !HasEffect(Buffs.Analysis) && hasAnalysis > 0 && (!IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltDrill) //Althernate Drill + || !ActionReady(Wildfire)) && !canWeave && !hasHeat && hasDrill > 0) return OriginalHook(Analysis); - //Analysis procs Primed skills + //Primed skills if (hasDrill > 0) { - if (HasEffect(Buffs.DrillPrimed)) + if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_Drill) && HasEffect(Buffs.DrillPrimed)) return OriginalHook(Drill); - if (HasEffect(Buffs.BioblasterPrimed) && GetTargetDistance() <= 10) + if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_BioBlaster) && HasEffect(Buffs.BioblasterPrimed) && GetTargetDistance() <= 10) return OriginalHook(BioBlaster); - if (HasEffect(Buffs.AirAnchorPrimed)) + if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AirAnchor) && HasEffect(Buffs.AirAnchorPrimed)) return OriginalHook(AirAnchor); - if (HasEffect(Buffs.ChainSawPrimed)) + if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_ChainSaw) && HasEffect(Buffs.ChainSawPrimed)) return OriginalHook(ChainSaw); } } From bbb73990b253d35737a3bce7543f540c7900a556 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 14 Aug 2024 04:33:04 -0700 Subject: [PATCH 087/142] touchups to PvP --- XIVSlothCombo/Combos/CustomComboPreset.cs | 29 +++++++++++++---------- XIVSlothCombo/Combos/PvP/GNBPVP.cs | 4 ++-- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index c72f7f4a2..20274ae4f 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -4581,56 +4581,61 @@ The three digets after RDM.JobID can be used to reorder items in the list #region GUNBREAKER - #region Advanced Mode + #region Burst Mode [PvPCustomCombo] - [CustomComboInfo("Advanced Mode", "Replace Solid Barrel Combo with it's optimal combo chain.", GNB.JobID)] + [CustomComboInfo("Burst Mode", "Turns Solid Barrel Combo into an all-in-one damage button.", GNB.JobID)] GNBPvP_Burst = 117000, [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Double Down Option", "Adds Double Down to rotation when appropriate.", GNB.JobID)] GNBPvP_DoubleDown = 117001, + [ParentCombo(GNBPvP_Burst)] + [CustomComboInfo("Burst Strike Option", "Adds Burst Strike to rotation when appropriate.", GNB.JobID)] + GNBPvP_BurstStrike = 117002, + [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Draw & Junction Option", "Adds Draw And Junction to rotation when appropriate.", GNB.JobID)] - GNBPvP_ST_DrawAndJunction = 117002, + GNBPvP_ST_DrawAndJunction = 117003, [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Gnashing Fang Option", "Adds Gnashing Fang to to rotation when appropriate.", GNB.JobID)] - GNBPvP_ST_GnashingFang = 117003, + GNBPvP_ST_GnashingFang = 117004, [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Continuation Option", "Adds Continuation to rotation when appropriate.", GNB.JobID)] - GNBPvP_ST_Continuation = 117004, + GNBPvP_ST_Continuation = 117005, [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Rough Divide Option", "Adds Rough Divide to rotation when appropriate.", GNB.JobID)] - GNBPvP_RoughDivide = 117005, + GNBPvP_RoughDivide = 117006, [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Junction Cast DPS Option", "Adds Junction Cast (DPS) to rotation.", GNB.JobID)] - GNBPvP_JunctionDPS = 117006, + GNBPvP_JunctionDPS = 117007, [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Junction Cast Healer Option", "Adds Junction Cast (Healer) to rotation.", GNB.JobID)] - GNBPvP_JunctionHealer = 117007, + GNBPvP_JunctionHealer = 117008, [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Junction Cast Tank Option", "Adds Junction Cast (Tank) to rotation.", GNB.JobID)] - GNBPvP_JunctionTank = 117008, + GNBPvP_JunctionTank = 117009, + #endregion #region Option Select [ConflictingCombos(GNBPvP_ST_GnashingFang)] [PvPCustomCombo] [CustomComboInfo("Continuation Feature", "Adds Continuation to Gnashing Fang.", GNB.JobID)] - GNBPvP_GnashingFang = 117009, + GNBPvP_GnashingFang = 117010, [ConflictingCombos(GNBPvP_ST_DrawAndJunction)] [PvPCustomCombo] [CustomComboInfo("Junctioned Cast Feature", "Adds Junctioned Cast to Draw and Junction.", GNB.JobID)] - GNBPvP_DrawAndJunction = 117010, + GNBPvP_DrawAndJunction = 117011, - // Last value = 117012 + // Last value = 117011 #endregion diff --git a/XIVSlothCombo/Combos/PvP/GNBPVP.cs b/XIVSlothCombo/Combos/PvP/GNBPVP.cs index 0fadc4506..13d4e7125 100644 --- a/XIVSlothCombo/Combos/PvP/GNBPVP.cs +++ b/XIVSlothCombo/Combos/PvP/GNBPVP.cs @@ -81,7 +81,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //RoughDivide overcap protection - if (ActionReady(DoubleDown) && GetRemainingCharges(RoughDivide) == 2) + if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && ActionReady(DoubleDown) && GetRemainingCharges(RoughDivide) == 2) return RoughDivide; //DoubleDown @@ -90,7 +90,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim !HasEffect(Buffs.ReadyToBlast) || !HasEffect(Buffs.ReadyToRip) || !HasEffect(Buffs.ReadyToTear) || !HasEffect(Buffs.ReadyToGouge))) //Continuation buff check return DoubleDown; - if (HasEffect(Buffs.PowderBarrel) && ActionReady(GnashingFang)) //Burst Strike has prio over GnashingFang, but not DoubleDown + if (IsEnabled(CustomComboPreset.GNBPvP_BurstStrike) && HasEffect(Buffs.PowderBarrel) && ActionReady(GnashingFang)) //Burst Strike has prio over GnashingFang, but not DoubleDown return BurstStrike; //GnashingFang From 7629d4fdab7b58fa9ac776727959fb0f93179eb3 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 14 Aug 2024 08:52:54 -0700 Subject: [PATCH 088/142] >_> --- XIVSlothCombo/Combos/PvP/BLMPVP.cs | 10 ++- XIVSlothCombo/Combos/PvP/GNBPVP.cs | 82 +++++++++++++++++++----- XIVSlothCombo/Combos/PvP/MCHPVP.cs | 9 +++ XIVSlothCombo/CustomCombo/CustomCombo.cs | 77 ++++++++++++++++++++++ 4 files changed, 160 insertions(+), 18 deletions(-) diff --git a/XIVSlothCombo/Combos/PvP/BLMPVP.cs b/XIVSlothCombo/Combos/PvP/BLMPVP.cs index d87ddd9f8..148155db5 100644 --- a/XIVSlothCombo/Combos/PvP/BLMPVP.cs +++ b/XIVSlothCombo/Combos/PvP/BLMPVP.cs @@ -16,6 +16,7 @@ public const uint Flare = 29651, Blizzard4 = 29654, Freeze = 29655, + SoulResonance = 29662, Foul = 29371; public static class Buffs @@ -48,6 +49,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is Fire or Fire4 or Flare) { bool canWeave = CanSpellWeave(actionID); + var hasLB = HasPVPLimitBreak(); + + if (hasLB && GetTargetDistance() > 10 && PlayerHealthPercentageHp() > 80) + return SoulResonance; if (HasEffect(Buffs.Polyglot)) return Foul; @@ -61,6 +66,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsOffCooldown(Burst)) return Burst; + if (PlayerHealthPercentageHp() < 50) + return PvPCommon.Sprint; + if (!TargetHasEffect(Debuffs.AstralWarmth)) return OriginalHook(Fire); @@ -69,7 +77,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Paradox; if (IsEnabled(CustomComboPreset.BLMPvP_BurstMode_NightWing) && - IsOffCooldown(NightWing)) + ActionReady(NightWing)) return NightWing; if (FindTargetEffect(Debuffs.AstralWarmth).StackCount == 3 && diff --git a/XIVSlothCombo/Combos/PvP/GNBPVP.cs b/XIVSlothCombo/Combos/PvP/GNBPVP.cs index 08f9e0e7f..b84c982b2 100644 --- a/XIVSlothCombo/Combos/PvP/GNBPVP.cs +++ b/XIVSlothCombo/Combos/PvP/GNBPVP.cs @@ -1,4 +1,6 @@ -using XIVSlothCombo.CustomComboNS; +using System; +using XIVSlothCombo.CustomComboNS; +using XIVSlothCombo.Data; namespace XIVSlothCombo.Combos.PvP { @@ -9,6 +11,7 @@ public const uint KeenEdge = 29098, BrutalShell = 29099, SolidBarrel = 29100, + BurstStrike = 29101, GnashingFang = 29102, SavageClaw = 29103, WickedTalon = 29104, @@ -19,6 +22,8 @@ public const uint EyeGouge = 29110, RoughDivide = 29123, DrawAndJunction = 29124, + RelentlessRush = 29130, + TerminalTrigger = 29131, JunctionedCast = 29125; internal class Debuffs @@ -36,6 +41,9 @@ internal const ushort ReadyToBlast = 3041, NoMercy = 3042, PowderBarrel = 3043, + JugularRip = 3048, + AbdomenTear = 3049, + EyeGouge = 3050, JunctionTank = 3044, JunctionDPS = 3045, JunctionHealer = 3046; @@ -45,47 +53,76 @@ internal class GNBPvP_Burst : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNBPvP_Burst; + float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.4 base in PvP + bool enemyGuard = TargetHasEffect(PvPCommon.Buffs.Guard); //Guard check + bool inGF = JustUsed(GnashingFang, 3f) || JustUsed(SavageClaw, 3f) || JustUsed(WickedTalon, 2f); + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { if (actionID is KeenEdge or BrutalShell or SolidBarrel) { - // Buff Effects - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { + //Continuation if (IsEnabled(CustomComboPreset.GNBPvP_ST_Continuation) && - (HasEffect(Buffs.ReadyToBlast) || HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + HasEffect(Buffs.ReadyToBlast) || //Hypervelocity + HasEffect(Buffs.ReadyToRip) || //GunStep1 + HasEffect(Buffs.ReadyToTear) || //GunStep2 + HasEffect(Buffs.ReadyToGouge)) //GunStep reset to 0 return OriginalHook(Continuation); - if ((IsEnabled(CustomComboPreset.GNBPvP_JunctionDPS) && HasEffect(Buffs.JunctionDPS) && HasEffect(Buffs.NoMercy) && IsOffCooldown(JunctionedCast)) || - (IsEnabled(CustomComboPreset.GNBPvP_JunctionHealer) && HasEffect(Buffs.JunctionHealer) && IsOffCooldown(JunctionedCast)) || - (IsEnabled(CustomComboPreset.GNBPvP_JunctionTank) && HasEffect(Buffs.JunctionTank) && IsOffCooldown(JunctionedCast))) + //Draw&Junction buffs + if (!enemyGuard && + (IsEnabled(CustomComboPreset.GNBPvP_JunctionDPS) && HasEffect(Buffs.JunctionDPS) && HasEffect(Buffs.NoMercy) && ActionReady(JunctionedCast)) || + (IsEnabled(CustomComboPreset.GNBPvP_JunctionHealer) && HasEffect(Buffs.JunctionHealer) && ActionReady(JunctionedCast)) || + (IsEnabled(CustomComboPreset.GNBPvP_JunctionTank) && HasEffect(Buffs.JunctionTank) && ActionReady(JunctionedCast))) return OriginalHook(JunctionedCast); - if (IsEnabled(CustomComboPreset.GNBPvP_DrawAndJunction) && IsOffCooldown(DrawAndJunction) && !HasEffect(Buffs.PowderBarrel) && !HasEffect(Buffs.ReadyToBlast)) + //Draw&Junction + if (IsEnabled(CustomComboPreset.GNBPvP_DrawAndJunction) && ActionReady(DrawAndJunction) && !HasEffect(Buffs.PowderBarrel) && !HasEffect(Buffs.ReadyToBlast)) return DrawAndJunction; - if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && HasEffect(Buffs.NoMercy) && - GetBuffRemainingTime(Buffs.NoMercy) <= 1.5f && GetBuffRemainingTime(Buffs.NoMercy) > 0 && - GetRemainingCharges(RoughDivide) >= 1) + //RoughDivide + if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && ActionReady(RoughDivide) && !HasEffect(Buffs.NoMercy) && + (GetCooldownRemainingTime(DoubleDown) <= GCD || //Keeps 1 charge always for DoubleDown usage + GetCooldownRemainingTime(GnashingFang) <= GCD)) //Keeps 1 charge always for GnashingFang usage return RoughDivide; } - if (IsOffCooldown(DoubleDown) && + if (HasPVPLimitBreak() && PlayerHealthPercentageHp() > 70 && HasEffect(Buffs.NoMercy) && !enemyGuard) + return RelentlessRush; + if (GetTargetHPPercent() < 20 && JustUsed(RelentlessRush, 4f)) + return TerminalTrigger; + + //RoughDivide overcap protection + if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && !enemyGuard && HasCharges(RoughDivide) && + (ActionReady(DoubleDown) && GetRemainingCharges(RoughDivide) > 1) || + (ActionReady(GnashingFang) && GetCooldownRemainingTime(RoughDivide) > 25) || GetRemainingCharges(RoughDivide) == 2) return RoughDivide; - // Gnashing Fang - if (IsEnabled(CustomComboPreset.GNBPvP_DoubleDown) && HasEffect(Buffs.NoMercy) && IsOffCooldown(DoubleDown) && InMeleeRange() && !TargetHasEffect(PvPCommon.Buffs.Guard)) + if (IsEnabled(CustomComboPreset.GNBPvP_GnashingFang) && + JustUsed(GnashingFang, 3f) || JustUsed(SavageClaw, 3f) ) + return OriginalHook(GnashingFang); + + //DoubleDown + if (IsEnabled(CustomComboPreset.GNBPvP_DoubleDown) && !enemyGuard && ActionReady(DoubleDown) && + HasEffect(Buffs.NoMercy) && InMeleeRange() && !inGF) return DoubleDown; - if ((IsEnabled(CustomComboPreset.GNBPvP_ST_GnashingFang) && IsOffCooldown(GnashingFang) && !TargetHasEffect(PvPCommon.Buffs.Guard) && HasEffect(Buffs.NoMercy)) || - WasLastWeaponskill(GnashingFang) || WasLastWeaponskill(JugularRip) || WasLastWeaponskill(SavageClaw)) - return OriginalHook(GnashingFang); + if (IsEnabled(CustomComboPreset.GNBPvP_GnashingFang) && ActionReady(GnashingFang)) + return GnashingFang; + + if (HasEffect(Buffs.PowderBarrel) && + (!HasEffect(Buffs.JugularRip) || !HasEffect(Buffs.AbdomenTear) || !HasEffect(Buffs.EyeGouge) && //Do not use when in GnashingFang combo + !HasEffect(Buffs.ReadyToBlast) || !HasEffect(Buffs.ReadyToRip) || !HasEffect(Buffs.ReadyToTear) || !HasEffect(Buffs.ReadyToGouge))) //Burst Strike has prio over GnashingFang, but not DoubleDown + return BurstStrike; } return actionID; } } + internal class GNBPvP_GnashingFang : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNBPvP_GnashingFang; @@ -96,5 +133,16 @@ actionID is GnashingFang && ? OriginalHook(Continuation) : actionID; } + + internal class GNBPvP_DrawJunction : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNBPvP_DrawAndJunction; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => + actionID is DrawAndJunction && + CanWeave(actionID) && (HasEffect(Buffs.JunctionDPS) || HasEffect(Buffs.JunctionHealer) || HasEffect(Buffs.JunctionTank)) + ? OriginalHook(JunctionedCast) + : actionID; + } } } \ No newline at end of file diff --git a/XIVSlothCombo/Combos/PvP/MCHPVP.cs b/XIVSlothCombo/Combos/PvP/MCHPVP.cs index 3e36223d2..89431c2a3 100644 --- a/XIVSlothCombo/Combos/PvP/MCHPVP.cs +++ b/XIVSlothCombo/Combos/PvP/MCHPVP.cs @@ -50,6 +50,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var hasAnalysis = GetRemainingCharges(Analysis); //How many stacks of Analysis we have var hasDrill = GetRemainingCharges(OriginalHook(Drill)); //How many charges var hasHeat = HasEffect(Buffs.Overheated); + var hasLB = HasPVPLimitBreak(); + var isLow = GetTargetHPPercent() < 33; + bool enemyGuard = TargetHasEffectAny(PvPCommon.Buffs.Guard); + + if (hasLB && isLow && !enemyGuard) + return MarksmanSpite; + + if (ActionReady(BishopTurret)) + return OriginalHook(BishopTurret); //Wildfire if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_Wildfire) && diff --git a/XIVSlothCombo/CustomCombo/CustomCombo.cs b/XIVSlothCombo/CustomCombo/CustomCombo.cs index 255fc9543..4c4bdbe0e 100644 --- a/XIVSlothCombo/CustomCombo/CustomCombo.cs +++ b/XIVSlothCombo/CustomCombo/CustomCombo.cs @@ -6,6 +6,10 @@ using XIVSlothCombo.Combos.PvE; using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Extensions; +using Dalamud.Game.ClientState.Objects.Types; +using FFXIVClientStructs.FFXIV.Component.GUI; +using XIVSlothCombo.Services; + namespace XIVSlothCombo.CustomComboNS { @@ -94,4 +98,77 @@ public unsafe bool TryInvoke(uint actionID, byte level, uint lastComboMove, floa /// The replacement action ID. protected abstract uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level); } + + /// Base class for each combo. + internal abstract partial class CustomCombo : CustomComboFunctions + { + #region Boss Check + // Rank 0 - Trash + // Rank 1 - Hunt Target (S/A/B). Eureka Pazuzu is also Rank 1. Fate bosses might also be R1. Haven't checked. + // Rank 2 - Final Dungeon Boss, Trial Boss, Raid Boss, Alliance Raid Boss. + // Rank 3 - Trash + // Rank 4 - Raid Trash (Alexander) + // Rank 5 - There is no Rank 5 + // Rank 6 - First 2 bosses in dungeons. + // Rank 7 - PvP stuff? + // Rank 8 - A puppy. + // 32, 33 34, 35, 36, 37 - Old Diadem mobs. + // Rank checks are very reliable. The HP check is done for unsynced content mainly. + // There are probably better ways of doing than relying on HP for unsync stuff but this works. + // For how to use, obviously just add a BossCheck() on dots for example. (Higanbana would be the perfect use case since the dot takes so long to be worth using) + protected static uint DataId() + { + if (CurrentTarget is not IBattleChara chara) + return 0; + return chara.DataId; + } + public static bool BossCheck() + { + double maxHealth = LocalPlayer.MaxHp; + var rank = Svc.Data.GetExcelSheet()?.GetRow((uint)DataId()); + + return rank != null && EnemyHealthMaxHp() >= maxHealth * 11 && (rank.Rank == 2 || rank.Rank == 6); + } + public static bool BossCheckLast() + { + double maxHealth = LocalPlayer.MaxHp; + var rank = Svc.Data.GetExcelSheet()?.GetRow((uint)DataId()); + + return rank != null && EnemyHealthMaxHp() >= maxHealth * 11 && (rank.Rank == 2); + } + #endregion + + #region Item Usage + public unsafe void UseItem(uint itemId) + { + FFXIVClientStructs.FFXIV.Client.Game.ActionManager.Instance()->UseAction(FFXIVClientStructs.FFXIV.Client.Game.ActionType.Item, itemId, 0xE0000000, 65535, 0, 0, null); + } + #endregion + #region Can use potion + public unsafe static bool CanUse() + { + var PotionCDGroup = 68; + bool canpot = ActionManager.Instance()->GetRecastGroupDetail(PotionCDGroup)->IsActive == 0; + return canpot; + } + // Execution can be called with something like this if (CanUse()) UseItem(1038956); + // that's the code for a HQ Hyper-Potion. + // This does NOT replace the action on the hotbar. The item is just...used so the conditions must be quite strict, but it works. + + #endregion + + #region Limit Break + // Not much else to say. Gets called like if (HasPVPLimitBreak()) return MarksmanSpite; + // Ofc, additional conditions as required, no guard, no full on HP. + public unsafe bool HasPVPLimitBreak() + { + AtkUnitBase* LBWidget = (AtkUnitBase*)Svc.GameGui.GetAddonByName("_LimitBreak", 1); + if (LBWidget->UldManager.SearchNodeById(6)->GetComponent()->UldManager.SearchNodeById(3)->Width >= 146) + return true; + return false; + } + #endregion + + } + } From 4e2509ad8821dca7d082f065de53811290d6f3eb Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 14 Aug 2024 09:07:52 -0700 Subject: [PATCH 089/142] . --- XIVSlothCombo/Combos/PvP/GNBPVP.cs | 46 +++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/XIVSlothCombo/Combos/PvP/GNBPVP.cs b/XIVSlothCombo/Combos/PvP/GNBPVP.cs index 13d4e7125..ca30b0f71 100644 --- a/XIVSlothCombo/Combos/PvP/GNBPVP.cs +++ b/XIVSlothCombo/Combos/PvP/GNBPVP.cs @@ -22,6 +22,8 @@ public const uint EyeGouge = 29110, RoughDivide = 29123, DrawAndJunction = 29124, + RelentlessRush = 29130, + TerminalTrigger = 29131, JunctionedCast = 29125; internal class Debuffs @@ -39,6 +41,9 @@ internal const ushort ReadyToBlast = 3041, NoMercy = 3042, PowderBarrel = 3043, + JugularRip = 3048, + AbdomenTear = 3049, + EyeGouge = 3050, JunctionTank = 3044, JunctionDPS = 3045, JunctionHealer = 3046; @@ -47,9 +52,10 @@ internal const ushort internal class GNBPvP_Burst : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.GNBPvP_Burst; - + float GCD = GetCooldown(KeenEdge).CooldownTotal; // 2.4 base in PvP bool enemyGuard = TargetHasEffect(PvPCommon.Buffs.Guard); //Guard check + bool inGF = JustUsed(GnashingFang, 3f) || JustUsed(SavageClaw, 3f) || JustUsed(WickedTalon, 2f); protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -59,14 +65,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { //Continuation if (IsEnabled(CustomComboPreset.GNBPvP_ST_Continuation) && - (HasEffect(Buffs.ReadyToBlast) || HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + HasEffect(Buffs.ReadyToBlast) || //Hypervelocity + HasEffect(Buffs.ReadyToRip) || //GunStep1 + HasEffect(Buffs.ReadyToTear) || //GunStep2 + HasEffect(Buffs.ReadyToGouge)) //GunStep reset to 0 return OriginalHook(Continuation); //Draw&Junction buffs if (!enemyGuard && - (IsEnabled(CustomComboPreset.GNBPvP_JunctionDPS) && HasEffect(Buffs.JunctionDPS) && HasEffect(Buffs.NoMercy) && ActionReady(JunctionedCast)) || - (IsEnabled(CustomComboPreset.GNBPvP_JunctionHealer) && HasEffect(Buffs.JunctionHealer) && ActionReady(JunctionedCast)) || - (IsEnabled(CustomComboPreset.GNBPvP_JunctionTank) && HasEffect(Buffs.JunctionTank) && ActionReady(JunctionedCast))) + (IsEnabled(CustomComboPreset.GNBPvP_JunctionDPS) && HasEffect(Buffs.JunctionDPS) && HasEffect(Buffs.NoMercy) && ActionReady(JunctionedCast)) || //BlastingZone + (IsEnabled(CustomComboPreset.GNBPvP_JunctionHealer) && HasEffect(Buffs.JunctionHealer) && ActionReady(JunctionedCast)) || //Aurora + (IsEnabled(CustomComboPreset.GNBPvP_JunctionTank) && HasEffect(Buffs.JunctionTank) && ActionReady(JunctionedCast))) //Nebula return OriginalHook(JunctionedCast); //Draw&Junction @@ -74,29 +83,38 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return DrawAndJunction; //RoughDivide - if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && ActionReady(RoughDivide) && !HasEffect(Buffs.NoMercy) && + if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && !enemyGuard && + ActionReady(RoughDivide) && !HasEffect(Buffs.NoMercy) && //Mashing would be a waste (GetCooldownRemainingTime(DoubleDown) <= GCD || //Keeps 1 charge always for DoubleDown usage GetCooldownRemainingTime(GnashingFang) <= GCD)) //Keeps 1 charge always for GnashingFang usage return RoughDivide; } //RoughDivide overcap protection - if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && ActionReady(DoubleDown) && GetRemainingCharges(RoughDivide) == 2) + if (IsEnabled(CustomComboPreset.GNBPvP_RoughDivide) && !enemyGuard && HasCharges(RoughDivide) && + (ActionReady(DoubleDown) && GetRemainingCharges(RoughDivide) > 1) || //force for DoubleDown + GetRemainingCharges(RoughDivide) == 2) //force if at 2 return RoughDivide; + //SavageClaw & WickedTalon + if (IsEnabled(CustomComboPreset.GNBPvP_GnashingFang) && + JustUsed(GnashingFang, 3f) || JustUsed(SavageClaw, 3f)) + return OriginalHook(GnashingFang); + //DoubleDown - if (IsEnabled(CustomComboPreset.GNBPvP_DoubleDown) && !enemyGuard && HasEffect(Buffs.NoMercy) && ActionReady(DoubleDown) && InMeleeRange() && - (!JustUsed(GnashingFang) || !JustUsed(JugularRip) || !JustUsed(SavageClaw) && //Do not use when in GnashingFang combo - !HasEffect(Buffs.ReadyToBlast) || !HasEffect(Buffs.ReadyToRip) || !HasEffect(Buffs.ReadyToTear) || !HasEffect(Buffs.ReadyToGouge))) //Continuation buff check + if (IsEnabled(CustomComboPreset.GNBPvP_DoubleDown) && !enemyGuard && ActionReady(DoubleDown) && + HasEffect(Buffs.NoMercy) && InMeleeRange() && !inGF) //DoubleDown breaks Gnashing combo in PvP return DoubleDown; - if (IsEnabled(CustomComboPreset.GNBPvP_BurstStrike) && HasEffect(Buffs.PowderBarrel) && ActionReady(GnashingFang)) //Burst Strike has prio over GnashingFang, but not DoubleDown + //BurstStrike + if (IsEnabled(CustomComboPreset.GNBPvP_BurstStrike) && HasEffect(Buffs.PowderBarrel) && + (!HasEffect(Buffs.JugularRip) || !HasEffect(Buffs.AbdomenTear) || !HasEffect(Buffs.EyeGouge) && //Do not use when in GnashingFang combo + !HasEffect(Buffs.ReadyToBlast) || !HasEffect(Buffs.ReadyToRip) || !HasEffect(Buffs.ReadyToTear) || !HasEffect(Buffs.ReadyToGouge))) //Burst Strike has prio over GnashingFang, but not DoubleDown return BurstStrike; //GnashingFang - if (IsEnabled(CustomComboPreset.GNBPvP_ST_GnashingFang) && ActionReady(GnashingFang) && !enemyGuard && HasEffect(Buffs.NoMercy) || - JustUsed(GnashingFang) || JustUsed(JugularRip) || JustUsed(SavageClaw)) - return OriginalHook(GnashingFang); + if (IsEnabled(CustomComboPreset.GNBPvP_GnashingFang) && ActionReady(GnashingFang) && !HasEffect(Buffs.PowderBarrel)) //BurstStrike first to avoid losing the buff if applicable + return GnashingFang; } return actionID; From c3d6f60f05f2ea9d7a42ac738237fd86011478b9 Mon Sep 17 00:00:00 2001 From: edewen Date: Wed, 14 Aug 2024 14:24:15 -0400 Subject: [PATCH 090/142] Lowered no waste from from 5% to 1% in simple modes --- XIVSlothCombo/Combos/PvE/BRD.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index c4d354295..782de97d2 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -951,7 +951,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool songMage = gauge.Song == Song.MAGE; bool songArmy = gauge.Song == Song.ARMY; int targetHPThreshold = PluginConfiguration.GetCustomIntValue(Config.BRD_AoENoWasteHPPercentage); - bool isEnemyHealthHigh = GetTargetHPPercent() > 5; + bool isEnemyHealthHigh = GetTargetHPPercent() > 1; if (IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= 50) return Variant.VariantCure; @@ -1156,7 +1156,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool songMage = gauge.Song == Song.MAGE; bool songArmy = gauge.Song == Song.ARMY; bool canInterrupt = CanInterruptEnemy() && IsOffCooldown(All.HeadGraze); - bool isEnemyHealthHigh = GetTargetHPPercent() > 5; + bool isEnemyHealthHigh = GetTargetHPPercent() > 1; if (!InCombat() && (inOpener || openerFinished)) { From 607b9159148435dc5e0f501c305bb5b3141126fd Mon Sep 17 00:00:00 2001 From: Kaeris Date: Wed, 14 Aug 2024 19:34:47 +0100 Subject: [PATCH 091/142] Wording --- XIVSlothCombo/Window/Tabs/Debug.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 1590cbd4e..4c6b2ff66 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -158,7 +158,7 @@ static void CustomStyleText(string label, object? value) CustomStyleText("Distance:", $"{Math.Round(CustomComboFunctions.GetTargetDistance(), 2)}y"); CustomStyleText("Hitbox Radius:", LocalPlayer.TargetObject?.HitboxRadius); CustomStyleText("In Melee Range:", CustomComboFunctions.InMeleeRange()); - CustomStyleText("Relative Direction:", CustomComboFunctions.AngleToTarget() is 2 ? "Rear" : (CustomComboFunctions.AngleToTarget() is 1 or 3) ? "Flank" : CustomComboFunctions.AngleToTarget() is 4 ? "Front" : ""); + CustomStyleText("Relative Position:", CustomComboFunctions.AngleToTarget() is 2 ? "Rear" : (CustomComboFunctions.AngleToTarget() is 1 or 3) ? "Flank" : CustomComboFunctions.AngleToTarget() is 4 ? "Front" : ""); CustomStyleText("Health:", $"{CustomComboFunctions.EnemyHealthCurrentHp().ToString("N0")} / {CustomComboFunctions.EnemyHealthMaxHp().ToString("N0")} ({Math.Round(CustomComboFunctions.GetTargetHPPercent(), 2)}%)"); ImGui.Spacing(); From b6056606c9366ca8bf93a47c72f6f0ef50eb05cb Mon Sep 17 00:00:00 2001 From: Kage Date: Wed, 14 Aug 2024 21:58:57 +0200 Subject: [PATCH 092/142] perfect combo checks --- XIVSlothCombo/Combos/PvE/DRG.cs | 34 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/DRG.cs b/XIVSlothCombo/Combos/PvE/DRG.cs index 4c2a3452d..05f3d73f2 100644 --- a/XIVSlothCombo/Combos/PvE/DRG.cs +++ b/XIVSlothCombo/Combos/PvE/DRG.cs @@ -96,7 +96,6 @@ internal class DRG_ST_SimpleMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.DRG_ST_SimpleMode; internal static DRGOpenerLogic DRGOpener = new(); - float GCD = GetCooldown(TrueThrust).CooldownTotal; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -142,7 +141,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BattleLitany; //Life Surge Feature - if (((GetCooldownRemainingTime(LifeSurge) < GCD * 16) || (GetCooldownRemainingTime(BattleLitany) > GCD * 20)) && + if (((GetCooldownRemainingTime(LifeSurge) <40 ) || (GetCooldownRemainingTime(BattleLitany) > 50)) && AnimationLock.CanDRGWeave(LifeSurge) && HasEffect(Buffs.LanceCharge) && ActionReady(LifeSurge) && !HasEffect(Buffs.LifeSurge) && @@ -203,17 +202,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove is TrueThrust or RaidenThrust && LevelChecked(VorpalThrust)) { return (LevelChecked(OriginalHook(Disembowel)) && - ((LevelChecked(OriginalHook(ChaosThrust)) && (ChaosDoTDebuff is null || - ChaosDoTDebuff.RemainingTime < GCD * 5 || - GetBuffRemainingTime(Buffs.PowerSurge) < GCD * 7)) || - (!LevelChecked(ChaosThrust) && GetBuffRemainingTime(Buffs.PowerSurge) < GCD * 4))) + ((LevelChecked(OriginalHook(ChaosThrust)) && ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) || + (!LevelChecked(ChaosThrust) && GetBuffRemainingTime(Buffs.PowerSurge) < 15))) ? OriginalHook(Disembowel) : OriginalHook(VorpalThrust); } if (lastComboMove is Disembowel or SpiralBlow && LevelChecked(OriginalHook(ChaosThrust))) { - if (trueNorthReady && CanDelayedWeave(actionID) && + if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) return All.TrueNorth; @@ -222,7 +219,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove is ChaosThrust or ChaoticSpring && LevelChecked(WheelingThrust)) { - if (trueNorthReady && CanDelayedWeave(actionID) && + if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) return All.TrueNorth; @@ -234,7 +231,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove is FullThrust or HeavensThrust && LevelChecked(FangAndClaw)) { - if (trueNorthReady && CanDelayedWeave(actionID) && + if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsFlank()) return All.TrueNorth; @@ -249,11 +246,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } } + internal class DRG_ST_AdvancedMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.DRG_ST_AdvancedMode; internal static DRGOpenerLogic DRGOpener = new(); - float GCD = GetCooldown(TrueThrust).CooldownTotal; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -313,7 +310,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { //Life Surge Feature if (IsEnabled(CustomComboPreset.DRG_ST_LifeSurge) && - ((GetCooldownRemainingTime(LifeSurge) < GCD * 16) || (GetCooldownRemainingTime(BattleLitany) > GCD * 20)) && + ((GetCooldownRemainingTime(LifeSurge) < 40) || (GetCooldownRemainingTime(BattleLitany) > 50)) && AnimationLock.CanDRGWeave(LifeSurge) && HasEffect(Buffs.LanceCharge) && ActionReady(LifeSurge) && !HasEffect(Buffs.LifeSurge) && @@ -402,18 +399,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove is TrueThrust or RaidenThrust && LevelChecked(VorpalThrust)) { return (LevelChecked(OriginalHook(Disembowel)) && - ((LevelChecked(OriginalHook(ChaosThrust)) && (ChaosDoTDebuff is null || - ChaosDoTDebuff.RemainingTime < GCD * 5 || - GetBuffRemainingTime(Buffs.PowerSurge) < GCD * 7)) || - (!LevelChecked(ChaosThrust) && GetBuffRemainingTime(Buffs.PowerSurge) < GCD * 4))) + ((LevelChecked(OriginalHook(ChaosThrust)) && ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) || + (!LevelChecked(ChaosThrust) && GetBuffRemainingTime(Buffs.PowerSurge) < 15))) ? OriginalHook(Disembowel) : OriginalHook(VorpalThrust); } if (lastComboMove is Disembowel or SpiralBlow && LevelChecked(OriginalHook(ChaosThrust))) { - if (IsEnabled(CustomComboPreset.DRG_TrueNorthDynamic) && - trueNorthReady && CanDelayedWeave(actionID) && + if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) return All.TrueNorth; @@ -422,8 +416,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove is ChaosThrust or ChaoticSpring && LevelChecked(WheelingThrust)) { - if (IsEnabled(CustomComboPreset.DRG_TrueNorthDynamic) && - trueNorthReady && CanDelayedWeave(actionID) && + if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) return All.TrueNorth; @@ -435,8 +428,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove is FullThrust or HeavensThrust && LevelChecked(FangAndClaw)) { - if (IsEnabled(CustomComboPreset.DRG_TrueNorthDynamic) && - trueNorthReady && CanDelayedWeave(actionID) && + if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsFlank()) return All.TrueNorth; From 7c3635d746db5aecd32dddb705a04e0262ab6a93 Mon Sep 17 00:00:00 2001 From: Kage Date: Wed, 14 Aug 2024 22:47:43 +0200 Subject: [PATCH 093/142] add missing lvlchecks make buff check and if dot is on target cleanup --- XIVSlothCombo/Combos/PvE/DRG.cs | 193 +++++++++++++++++++------------- 1 file changed, 115 insertions(+), 78 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/DRG.cs b/XIVSlothCombo/Combos/PvE/DRG.cs index 05f3d73f2..68b38271e 100644 --- a/XIVSlothCombo/Combos/PvE/DRG.cs +++ b/XIVSlothCombo/Combos/PvE/DRG.cs @@ -125,7 +125,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; // Piercing Talon Uptime Option - if (LevelChecked(PiercingTalon) && !InMeleeRange() && HasBattleTarget()) + if (LevelChecked(PiercingTalon) && + !InMeleeRange() && + HasBattleTarget()) return PiercingTalon; if (HasEffect(Buffs.PowerSurge)) @@ -141,56 +143,66 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BattleLitany; //Life Surge Feature - if (((GetCooldownRemainingTime(LifeSurge) <40 ) || (GetCooldownRemainingTime(BattleLitany) > 50)) && + if (ActionReady(LifeSurge) && + ((GetCooldownRemainingTime(LifeSurge) < 40) || (GetCooldownRemainingTime(BattleLitany) > 50)) && AnimationLock.CanDRGWeave(LifeSurge) && HasEffect(Buffs.LanceCharge) && - ActionReady(LifeSurge) && !HasEffect(Buffs.LifeSurge) && - ((WasLastWeaponskill(WheelingThrust) && LevelChecked(Drakesbane)) || - (WasLastWeaponskill(FangAndClaw) && LevelChecked(Drakesbane)) || - (WasLastWeaponskill(OriginalHook(VorpalThrust)) && LevelChecked(OriginalHook(FullThrust))))) + !HasEffect(Buffs.LifeSurge) && + ((JustUsed(WheelingThrust) && LevelChecked(Drakesbane)) || + (JustUsed(FangAndClaw) && LevelChecked(Drakesbane)) || + (JustUsed(OriginalHook(VorpalThrust)) && LevelChecked(FullThrust)))) return LifeSurge; //Wyrmwind Thrust Feature - if (AnimationLock.CanDRGWeave(WyrmwindThrust) && + if (LevelChecked(WyrmwindThrust) && + AnimationLock.CanDRGWeave(WyrmwindThrust) && gauge.FirstmindsFocusCount is 2) return WyrmwindThrust; //Geirskogul Feature - if (AnimationLock.CanDRGWeave(Geirskogul) && ActionReady(Geirskogul)) + if (ActionReady(Geirskogul) && + AnimationLock.CanDRGWeave(Geirskogul)) return Geirskogul; //(High) Jump Feature - if (AnimationLock.CanDRGWeave(OriginalHook(Jump)) && - ActionReady(OriginalHook(Jump)) && !IsMoving) + if (ActionReady(OriginalHook(Jump)) && + AnimationLock.CanDRGWeave(OriginalHook(Jump)) && + !IsMoving) return OriginalHook(Jump); //Dragonfire Dive Feature - if (AnimationLock.CanDRGWeave(DragonfireDive) && - ActionReady(DragonfireDive) && !IsMoving) + if (ActionReady(DragonfireDive) && + AnimationLock.CanDRGWeave(DragonfireDive) && + !IsMoving) return DragonfireDive; //StarDiver Feature - if (AnimationLock.CanDRGWeave(Stardiver) && - gauge.IsLOTDActive && ActionReady(Stardiver) && !IsMoving) + if (ActionReady(Stardiver) && + AnimationLock.CanDRGWeave(Stardiver) && + gauge.IsLOTDActive && !IsMoving) return Stardiver; //Starcross Feature - if (AnimationLock.CanDRGWeave(Starcross) && + if (LevelChecked(Starcross) && + AnimationLock.CanDRGWeave(Starcross) && HasEffect(Buffs.StarcrossReady)) return OriginalHook(Stardiver); //Rise of the Dragon Feature - if (AnimationLock.CanDRGWeave(RiseOfTheDragon) && - HasEffect(Buffs.DragonsFlight)) + if (LevelChecked(RiseOfTheDragon) && + AnimationLock.CanDRGWeave(RiseOfTheDragon) && + HasEffect(Buffs.DragonsFlight)) return OriginalHook(DragonfireDive); //Mirage Feature - if (AnimationLock.CanDRGWeave(MirageDive) && + if (LevelChecked(MirageDive) && + AnimationLock.CanDRGWeave(MirageDive) && HasEffect(Buffs.DiveReady)) return OriginalHook(HighJump); //Nastrond Feature - if (AnimationLock.CanDRGWeave(Nastrond) && + if (LevelChecked(Nastrond) && + AnimationLock.CanDRGWeave(Nastrond) && HasEffect(Buffs.NastrondReady) && gauge.IsLOTDActive) return OriginalHook(Geirskogul); @@ -201,14 +213,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (lastComboMove is TrueThrust or RaidenThrust && LevelChecked(VorpalThrust)) { - return (LevelChecked(OriginalHook(Disembowel)) && - ((LevelChecked(OriginalHook(ChaosThrust)) && ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) || + return (LevelChecked(Disembowel) && + ((LevelChecked(ChaosThrust) && ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) || (!LevelChecked(ChaosThrust) && GetBuffRemainingTime(Buffs.PowerSurge) < 15))) ? OriginalHook(Disembowel) : OriginalHook(VorpalThrust); } - if (lastComboMove is Disembowel or SpiralBlow && LevelChecked(OriginalHook(ChaosThrust))) + if (lastComboMove == OriginalHook(Disembowel) && LevelChecked(ChaosThrust)) { if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) @@ -217,7 +229,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(ChaosThrust); } - if (lastComboMove is ChaosThrust or ChaoticSpring && LevelChecked(WheelingThrust)) + if (lastComboMove == OriginalHook(ChaosThrust) && LevelChecked(WheelingThrust)) { if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) @@ -226,10 +238,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return WheelingThrust; } - if (lastComboMove is VorpalThrust or LanceBarrage && LevelChecked(OriginalHook(FullThrust))) + if (lastComboMove == OriginalHook(VorpalThrust) && LevelChecked(FullThrust)) return OriginalHook(FullThrust); - if (lastComboMove is FullThrust or HeavensThrust && LevelChecked(FangAndClaw)) + if (lastComboMove == OriginalHook(FullThrust) && LevelChecked(FangAndClaw)) { if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsFlank()) @@ -293,15 +305,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { //Lance Charge Feature if (IsEnabled(CustomComboPreset.DRG_ST_Lance) && - AnimationLock.CanDRGWeave(LanceCharge) && ActionReady(LanceCharge) && + AnimationLock.CanDRGWeave(LanceCharge) && GetTargetHPPercent() >= Config.DRG_ST_LanceChargeHP) return LanceCharge; //Battle Litany Feature if (IsEnabled(CustomComboPreset.DRG_ST_Litany) && - AnimationLock.CanDRGWeave(BattleLitany) && ActionReady(BattleLitany) && + AnimationLock.CanDRGWeave(BattleLitany) && GetTargetHPPercent() >= Config.DRG_ST_LitanyHP) return BattleLitany; } @@ -310,53 +322,57 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { //Life Surge Feature if (IsEnabled(CustomComboPreset.DRG_ST_LifeSurge) && + ActionReady(LifeSurge) && ((GetCooldownRemainingTime(LifeSurge) < 40) || (GetCooldownRemainingTime(BattleLitany) > 50)) && AnimationLock.CanDRGWeave(LifeSurge) && HasEffect(Buffs.LanceCharge) && - ActionReady(LifeSurge) && !HasEffect(Buffs.LifeSurge) && - ((WasLastWeaponskill(WheelingThrust) && LevelChecked(Drakesbane)) || - (WasLastWeaponskill(FangAndClaw) && LevelChecked(Drakesbane)) || - (WasLastWeaponskill(OriginalHook(VorpalThrust)) && LevelChecked(OriginalHook(FullThrust))))) + !HasEffect(Buffs.LifeSurge) && + ((JustUsed(WheelingThrust) && LevelChecked(Drakesbane)) || + (JustUsed(FangAndClaw) && LevelChecked(Drakesbane)) || + (JustUsed(OriginalHook(VorpalThrust)) && LevelChecked(FullThrust)))) return LifeSurge; //Dragonfire Dive Feature if (IsEnabled(CustomComboPreset.DRG_ST_DragonfireDive) && - AnimationLock.CanDRGWeave(DragonfireDive) && ActionReady(DragonfireDive) && + AnimationLock.CanDRGWeave(DragonfireDive) && (!IsEnabled(CustomComboPreset.DRG_ST_DragonfireDive_Movement) || (IsEnabled(CustomComboPreset.DRG_ST_DragonfireDive_Movement) && !IsMoving))) return DragonfireDive; //StarDiver Feature if (IsEnabled(CustomComboPreset.DRG_ST_Stardiver) && + ActionReady(Stardiver) && AnimationLock.CanDRGWeave(Stardiver) && - ActionReady(Stardiver) && gauge.IsLOTDActive && + gauge.IsLOTDActive && (!IsEnabled(CustomComboPreset.DRG_ST_Stardiver_Movement) || (IsEnabled(CustomComboPreset.DRG_ST_Stardiver_Movement) && !IsMoving))) return Stardiver; //(High) Jump Feature if (IsEnabled(CustomComboPreset.DRG_ST_HighJump) && - AnimationLock.CanDRGWeave(OriginalHook(Jump)) && ActionReady(OriginalHook(Jump)) && + AnimationLock.CanDRGWeave(OriginalHook(Jump)) && (!IsEnabled(CustomComboPreset.DRG_ST_HighJump_Movement) || (IsEnabled(CustomComboPreset.DRG_ST_HighJump_Movement) && !IsMoving))) return OriginalHook(Jump); //Wyrmwind Thrust Feature if (IsEnabled(CustomComboPreset.DRG_ST_Wyrmwind) && + LevelChecked(WyrmwindThrust) && AnimationLock.CanDRGWeave(WyrmwindThrust) && gauge.FirstmindsFocusCount is 2) return WyrmwindThrust; //Geirskogul Feature if (IsEnabled(CustomComboPreset.DRG_ST_Geirskogul) && - AnimationLock.CanDRGWeave(Geirskogul) && - ActionReady(Geirskogul)) + ActionReady(Geirskogul) && + AnimationLock.CanDRGWeave(Geirskogul)) return Geirskogul; //Starcross Feature if (IsEnabled(CustomComboPreset.DRG_ST_Starcross) && + LevelChecked(Starcross) && AnimationLock.CanDRGWeave(Starcross) && HasEffect(Buffs.StarcrossReady)) return OriginalHook(Stardiver); @@ -369,6 +385,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Nastrond Feature if (IsEnabled(CustomComboPreset.DRG_ST_Nastrond) && + LevelChecked(Nastrond) && AnimationLock.CanDRGWeave(Nastrond) && HasEffect(Buffs.NastrondReady) && gauge.IsLOTDActive) @@ -376,10 +393,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Mirage Feature if (IsEnabled(CustomComboPreset.DRG_ST_Mirage) && + LevelChecked(MirageDive) && AnimationLock.CanDRGWeave(MirageDive) && HasEffect(Buffs.DiveReady)) return OriginalHook(HighJump); - } } @@ -398,14 +415,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (lastComboMove is TrueThrust or RaidenThrust && LevelChecked(VorpalThrust)) { - return (LevelChecked(OriginalHook(Disembowel)) && - ((LevelChecked(OriginalHook(ChaosThrust)) && ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) || + return (LevelChecked(Disembowel) && + ((LevelChecked(ChaosThrust) && ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) || (!LevelChecked(ChaosThrust) && GetBuffRemainingTime(Buffs.PowerSurge) < 15))) ? OriginalHook(Disembowel) : OriginalHook(VorpalThrust); } - if (lastComboMove is Disembowel or SpiralBlow && LevelChecked(OriginalHook(ChaosThrust))) + if (lastComboMove == OriginalHook(Disembowel) && LevelChecked(ChaosThrust)) { if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) @@ -414,7 +431,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(ChaosThrust); } - if (lastComboMove is ChaosThrust or ChaoticSpring && LevelChecked(WheelingThrust)) + if (lastComboMove == OriginalHook(ChaosThrust) && LevelChecked(WheelingThrust)) { if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) @@ -423,10 +440,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return WheelingThrust; } - if (lastComboMove is VorpalThrust or LanceBarrage && LevelChecked(OriginalHook(FullThrust))) + if (lastComboMove == OriginalHook(VorpalThrust) && LevelChecked(FullThrust)) return OriginalHook(FullThrust); - if (lastComboMove is FullThrust or HeavensThrust && LevelChecked(FangAndClaw)) + if (lastComboMove == OriginalHook(FullThrust) && LevelChecked(FangAndClaw)) { if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsFlank()) @@ -472,61 +489,74 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.PowerSurge)) { //Lance Charge Feature - if (ActionReady(LanceCharge) && AnimationLock.CanDRGWeave(LanceCharge)) + if (ActionReady(LanceCharge) && + AnimationLock.CanDRGWeave(LanceCharge)) return LanceCharge; //Battle Litany Feature - if (ActionReady(BattleLitany) && AnimationLock.CanDRGWeave(BattleLitany)) + if (ActionReady(BattleLitany) && + AnimationLock.CanDRGWeave(BattleLitany)) return BattleLitany; //Life Surge Feature - if (ActionReady(LifeSurge) && AnimationLock.CanDRGWeave(LifeSurge) && !HasEffect(Buffs.LifeSurge) && - ((WasLastWeaponskill(SonicThrust) && LevelChecked(CoerthanTorment)) || - (WasLastWeaponskill(DoomSpike) && LevelChecked(SonicThrust)) || - (WasLastWeaponskill(DoomSpike) && !LevelChecked(SonicThrust)))) + if (ActionReady(LifeSurge) && + AnimationLock.CanDRGWeave(LifeSurge) && + !HasEffect(Buffs.LifeSurge) && + ((JustUsed(SonicThrust) && LevelChecked(CoerthanTorment)) || + (JustUsed(DoomSpike) && LevelChecked(SonicThrust)) || + (JustUsed(DoomSpike) && !LevelChecked(SonicThrust)))) return LifeSurge; //Wyrmwind Thrust Feature - if (AnimationLock.CanDRGWeave(WyrmwindThrust) && + if (LevelChecked(WyrmwindThrust) && + AnimationLock.CanDRGWeave(WyrmwindThrust) && gauge.FirstmindsFocusCount is 2) return WyrmwindThrust; //Geirskogul Feature - if (AnimationLock.CanDRGWeave(Geirskogul) && ActionReady(Geirskogul)) + if (ActionReady(Geirskogul) && + AnimationLock.CanDRGWeave(Geirskogul)) return Geirskogul; //(High) Jump Feature - if (AnimationLock.CanDRGWeave(OriginalHook(Jump)) && - ActionReady(OriginalHook(Jump)) && !IsMoving) + if (ActionReady(OriginalHook(Jump)) && + AnimationLock.CanDRGWeave(OriginalHook(Jump)) && + !IsMoving) return OriginalHook(Jump); //Dragonfire Dive Feature - if (AnimationLock.CanDRGWeave(DragonfireDive) && - ActionReady(DragonfireDive) && !IsMoving) + if (ActionReady(DragonfireDive) && + AnimationLock.CanDRGWeave(DragonfireDive) && + !IsMoving) return DragonfireDive; //StarDiver Feature - if (AnimationLock.CanDRGWeave(Stardiver) && - gauge.IsLOTDActive && ActionReady(Stardiver) && !IsMoving) + if (ActionReady(Stardiver) && + AnimationLock.CanDRGWeave(Stardiver) && + gauge.IsLOTDActive && !IsMoving) return Stardiver; //Starcross Feature - if (AnimationLock.CanDRGWeave(Starcross) && + if (LevelChecked(Starcross) && + AnimationLock.CanDRGWeave(Starcross) && HasEffect(Buffs.StarcrossReady)) return OriginalHook(Stardiver); //Rise of the Dragon Feature - if (AnimationLock.CanDRGWeave(RiseOfTheDragon) && + if (LevelChecked(RiseOfTheDragon) && + AnimationLock.CanDRGWeave(RiseOfTheDragon) && HasEffect(Buffs.DragonsFlight)) return OriginalHook(DragonfireDive); //Mirage Feature - if (AnimationLock.CanDRGWeave(MirageDive) && + if (LevelChecked(MirageDive) && + AnimationLock.CanDRGWeave(MirageDive) && HasEffect(Buffs.DiveReady)) return OriginalHook(HighJump); //Nastrond Feature - if (AnimationLock.CanDRGWeave(Nastrond) && + if (LevelChecked(Nastrond) && + AnimationLock.CanDRGWeave(Nastrond) && HasEffect(Buffs.NastrondReady) && gauge.IsLOTDActive) return OriginalHook(Geirskogul); @@ -539,7 +569,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove == TrueThrust && LevelChecked(Disembowel)) return Disembowel; - if (lastComboMove == Disembowel && LevelChecked(OriginalHook(ChaosThrust))) + if (lastComboMove == Disembowel && LevelChecked(ChaosThrust)) return OriginalHook(ChaosThrust); } @@ -552,12 +582,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return CoerthanTorment; } } - return HasEffect(Buffs.PowerSurge) || LevelChecked(SonicThrust) ? OriginalHook(DoomSpike) : OriginalHook(TrueThrust); } - return actionID; } } @@ -594,13 +622,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { //Lance Charge Feature if (IsEnabled(CustomComboPreset.DRG_AoE_Lance) && - ActionReady(LanceCharge) && AnimationLock.CanDRGWeave(LanceCharge) && + ActionReady(LanceCharge) && + AnimationLock.CanDRGWeave(LanceCharge) && GetTargetHPPercent() >= Config.DRG_AoE_LanceChargeHP) return LanceCharge; //Battle Litany Feature if (IsEnabled(CustomComboPreset.DRG_AoE_Litany) && - ActionReady(BattleLitany) && AnimationLock.CanDRGWeave(BattleLitany) && + ActionReady(BattleLitany) && + AnimationLock.CanDRGWeave(BattleLitany) && GetTargetHPPercent() >= Config.DRG_AoE_LitanyHP) return BattleLitany; } @@ -609,68 +639,75 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { //Life Surge Feature if (IsEnabled(CustomComboPreset.DRG_AoE_LifeSurge) && - ActionReady(LifeSurge) && AnimationLock.CanDRGWeave(LifeSurge) && !HasEffect(Buffs.LifeSurge) && - ((WasLastWeaponskill(SonicThrust) && LevelChecked(CoerthanTorment)) || - (WasLastWeaponskill(DoomSpike) && LevelChecked(SonicThrust)) || - (WasLastWeaponskill(DoomSpike) && !LevelChecked(SonicThrust)))) + ActionReady(LifeSurge) && + AnimationLock.CanDRGWeave(LifeSurge) && !HasEffect(Buffs.LifeSurge) && + ((JustUsed(SonicThrust) && LevelChecked(CoerthanTorment)) || + (JustUsed(DoomSpike) && LevelChecked(SonicThrust)) || + (JustUsed(DoomSpike) && !LevelChecked(SonicThrust)))) return LifeSurge; //Wyrmwind Thrust Feature if (IsEnabled(CustomComboPreset.DRG_AoE_Wyrmwind) && + LevelChecked(WyrmwindThrust) && AnimationLock.CanDRGWeave(WyrmwindThrust) && gauge.FirstmindsFocusCount is 2) return WyrmwindThrust; //Geirskogul Feature if (IsEnabled(CustomComboPreset.DRG_AoE_Geirskogul) && - AnimationLock.CanDRGWeave(Geirskogul) && - ActionReady(Geirskogul)) + ActionReady(Geirskogul) && + AnimationLock.CanDRGWeave(Geirskogul)) return Geirskogul; //(High) Jump Feature if (IsEnabled(CustomComboPreset.DRG_AoE_HighJump) && - AnimationLock.CanDRGWeave(OriginalHook(Jump)) && ActionReady(OriginalHook(Jump)) && + AnimationLock.CanDRGWeave(OriginalHook(Jump)) && (!IsEnabled(CustomComboPreset.DRG_AoE_HighJump_Movement) || (IsEnabled(CustomComboPreset.DRG_AoE_HighJump_Movement) && !IsMoving))) return OriginalHook(Jump); //Dragonfire Dive Feature if (IsEnabled(CustomComboPreset.DRG_AoE_DragonfireDive) && - AnimationLock.CanDRGWeave(DragonfireDive) && ActionReady(DragonfireDive) && + AnimationLock.CanDRGWeave(DragonfireDive) && (!IsEnabled(CustomComboPreset.DRG_AoE_DragonfireDive_Movement) || (IsEnabled(CustomComboPreset.DRG_AoE_DragonfireDive_Movement) && !IsMoving))) return DragonfireDive; //StarDiver Feature if (IsEnabled(CustomComboPreset.DRG_AoE_Stardiver) && + ActionReady(Stardiver) && AnimationLock.CanDRGWeave(Stardiver) && - ActionReady(Stardiver) && gauge.IsLOTDActive && + gauge.IsLOTDActive && (!IsEnabled(CustomComboPreset.DRG_AoE_Stardiver_Movement) || (IsEnabled(CustomComboPreset.DRG_AoE_Stardiver_Movement) && !IsMoving))) return Stardiver; //Starcross Feature if (IsEnabled(CustomComboPreset.DRG_AoE_Starcross) && + LevelChecked(Starcross) && AnimationLock.CanDRGWeave(Starcross) && HasEffect(Buffs.StarcrossReady)) return OriginalHook(Stardiver); //Rise of the Dragon Feature if (IsEnabled(CustomComboPreset.DRG_AoE_RiseOfTheDragon) && + LevelChecked(RiseOfTheDragon) && AnimationLock.CanDRGWeave(RiseOfTheDragon) && HasEffect(Buffs.DragonsFlight)) return OriginalHook(DragonfireDive); //Mirage Feature if (IsEnabled(CustomComboPreset.DRG_AoE_Mirage) && + LevelChecked(MirageDive) && AnimationLock.CanDRGWeave(MirageDive) && HasEffect(Buffs.DiveReady)) return OriginalHook(HighJump); //Nastrond Feature if (IsEnabled(CustomComboPreset.DRG_AoE_Nastrond) && + LevelChecked(Nastrond) && AnimationLock.CanDRGWeave(Nastrond) && HasEffect(Buffs.NastrondReady) && gauge.IsLOTDActive) @@ -696,7 +733,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove == TrueThrust && LevelChecked(Disembowel)) return Disembowel; - if (lastComboMove == Disembowel && LevelChecked(OriginalHook(ChaosThrust))) + if (lastComboMove == Disembowel && LevelChecked(ChaosThrust)) return OriginalHook(ChaosThrust); } @@ -709,11 +746,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return CoerthanTorment; } } - return IsEnabled(CustomComboPreset.DRG_AoE_Disembowel) && (!HasEffect(Buffs.PowerSurge) || !LevelChecked(SonicThrust)) + return IsEnabled(CustomComboPreset.DRG_AoE_Disembowel) && + (!HasEffect(Buffs.PowerSurge) || !LevelChecked(SonicThrust)) ? OriginalHook(TrueThrust) : OriginalHook(DoomSpike); } - return actionID; } } From 677ec5998801400e21551f56a3e9385b78a7c58b Mon Sep 17 00:00:00 2001 From: Kage Date: Wed, 14 Aug 2024 23:00:19 +0200 Subject: [PATCH 094/142] combo cleanup --- XIVSlothCombo/Combos/PvE/DRG.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/DRG.cs b/XIVSlothCombo/Combos/PvE/DRG.cs index 68b38271e..75d9eb410 100644 --- a/XIVSlothCombo/Combos/PvE/DRG.cs +++ b/XIVSlothCombo/Combos/PvE/DRG.cs @@ -125,7 +125,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; // Piercing Talon Uptime Option - if (LevelChecked(PiercingTalon) && + if (LevelChecked(PiercingTalon) && !InMeleeRange() && HasBattleTarget()) return PiercingTalon; @@ -214,8 +214,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove is TrueThrust or RaidenThrust && LevelChecked(VorpalThrust)) { return (LevelChecked(Disembowel) && - ((LevelChecked(ChaosThrust) && ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) || - (!LevelChecked(ChaosThrust) && GetBuffRemainingTime(Buffs.PowerSurge) < 15))) + ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) ? OriginalHook(Disembowel) : OriginalHook(VorpalThrust); } @@ -416,10 +415,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove is TrueThrust or RaidenThrust && LevelChecked(VorpalThrust)) { return (LevelChecked(Disembowel) && - ((LevelChecked(ChaosThrust) && ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) || - (!LevelChecked(ChaosThrust) && GetBuffRemainingTime(Buffs.PowerSurge) < 15))) - ? OriginalHook(Disembowel) - : OriginalHook(VorpalThrust); + ((ChaosDoTDebuff is null) || GetBuffRemainingTime(Buffs.PowerSurge) < 15)) + ? OriginalHook(Disembowel) + : OriginalHook(VorpalThrust); } if (lastComboMove == OriginalHook(Disembowel) && LevelChecked(ChaosThrust)) @@ -499,7 +497,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BattleLitany; //Life Surge Feature - if (ActionReady(LifeSurge) && + if (ActionReady(LifeSurge) && AnimationLock.CanDRGWeave(LifeSurge) && !HasEffect(Buffs.LifeSurge) && ((JustUsed(SonicThrust) && LevelChecked(CoerthanTorment)) || From eeefb7ee84a475354ac31fa9906da4b5fc7e867c Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 14 Aug 2024 16:02:46 -0700 Subject: [PATCH 095/142] . --- XIVSlothCombo/Combos/PvE/GNB.cs | 2 +- XIVSlothCombo/Combos/PvP/GNBPVP.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index a9e9b97b4..f7ae44229 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -147,7 +147,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(Continuation); //60s weaves - if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) + if (HasEffect(Buffs.NoMercy) && (!JustUsed(NoMercy, 3f))) { //>=Lv90 if (ActionReady(BowShock) && LevelChecked(BowShock)) diff --git a/XIVSlothCombo/Combos/PvP/GNBPVP.cs b/XIVSlothCombo/Combos/PvP/GNBPVP.cs index ca30b0f71..edd658690 100644 --- a/XIVSlothCombo/Combos/PvP/GNBPVP.cs +++ b/XIVSlothCombo/Combos/PvP/GNBPVP.cs @@ -79,7 +79,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(JunctionedCast); //Draw&Junction - if (IsEnabled(CustomComboPreset.GNBPvP_DrawAndJunction) && ActionReady(DrawAndJunction) && !HasEffect(Buffs.PowderBarrel) && !HasEffect(Buffs.ReadyToBlast)) + if (IsEnabled(CustomComboPreset.GNBPvP_ST_DrawAndJunction) && ActionReady(DrawAndJunction) && !HasEffect(Buffs.PowderBarrel) && !HasEffect(Buffs.ReadyToBlast)) return DrawAndJunction; //RoughDivide @@ -97,7 +97,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return RoughDivide; //SavageClaw & WickedTalon - if (IsEnabled(CustomComboPreset.GNBPvP_GnashingFang) && + if (IsEnabled(CustomComboPreset.GNBPvP_ST_GnashingFang) && JustUsed(GnashingFang, 3f) || JustUsed(SavageClaw, 3f)) return OriginalHook(GnashingFang); @@ -113,7 +113,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BurstStrike; //GnashingFang - if (IsEnabled(CustomComboPreset.GNBPvP_GnashingFang) && ActionReady(GnashingFang) && !HasEffect(Buffs.PowderBarrel)) //BurstStrike first to avoid losing the buff if applicable + if (IsEnabled(CustomComboPreset.GNBPvP_ST_GnashingFang) && ActionReady(GnashingFang) && !HasEffect(Buffs.PowderBarrel)) //BurstStrike first to avoid losing the buff if applicable return GnashingFang; } From 7abe0e7f0664112805d96a892dc39613c38fcde2 Mon Sep 17 00:00:00 2001 From: Ethan Henderson Date: Wed, 14 Aug 2024 22:29:53 -0600 Subject: [PATCH 096/142] Add missing level checks for Play3 --- XIVSlothCombo/Combos/PvE/AST.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/PvE/AST.cs b/XIVSlothCombo/Combos/PvE/AST.cs index dedd0994c..9cfc9618e 100644 --- a/XIVSlothCombo/Combos/PvE/AST.cs +++ b/XIVSlothCombo/Combos/PvE/AST.cs @@ -539,24 +539,28 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.AST_ST_SimpleHeals_Spire) && Gauge.DrawnCards[2] == CardType.SPIRE && GetTargetHPPercent(healTarget) <= Config.AST_Spire && + ActionReady(Play3) && canSpire) return OriginalHook(Play3); if (IsEnabled(CustomComboPreset.AST_ST_SimpleHeals_Ewer) && Gauge.DrawnCards[2] == CardType.EWER && GetTargetHPPercent(healTarget) <= Config.AST_Ewer && + ActionReady(Play3) && canEwer) return OriginalHook(Play3); if (IsEnabled(CustomComboPreset.AST_ST_SimpleHeals_Arrow) && Gauge.DrawnCards[1] == CardType.ARROW && GetTargetHPPercent(healTarget) <= Config.AST_Arrow && + ActionReady(Play2) && canArrow) return OriginalHook(Play2); if (IsEnabled(CustomComboPreset.AST_ST_SimpleHeals_Bole) && Gauge.DrawnCards[1] == CardType.BOLE && GetTargetHPPercent(healTarget) <= Config.AST_Bole && + ActionReady(Play2) && canBole) return OriginalHook(Play2); @@ -591,4 +595,4 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } } -} \ No newline at end of file +} From d3bd62b4dcc43ca95c58d046bb33c32ae0410769 Mon Sep 17 00:00:00 2001 From: Akinee Date: Thu, 15 Aug 2024 07:47:23 +0200 Subject: [PATCH 097/142] Bug Fix --- XIVSlothCombo/Combos/PvE/PCT.cs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index e683f4cea..6fc393aff 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -254,8 +254,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(HammerMotif); if (!gauge.LandscapeMotifDrawn && LevelChecked(LandscapeMotif) && !HasEffect(Buffs.StarryMuse)) return OriginalHook(LandscapeMotif); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_BlizzardInCyan) && HasEffect(Buffs.SubtractivePalette)) - return OriginalHook(BlizzardinCyan); + } if (IsMoving && InCombat()) @@ -263,11 +262,11 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HammerStampCombo) && HasEffect(Buffs.HammerTime)) return OriginalHook(HammerStamp); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HolyInWhite) && gauge.Paint >= 1 && !HasEffect(Buffs.MonochromeTones)) - return OriginalHook(HolyInWhite); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_CometinBlack) && gauge.Paint >= 1 && HasEffect(Buffs.MonochromeTones)) return OriginalHook(CometinBlack); + + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HolyInWhite) && gauge.Paint >= 1) + return OriginalHook(HolyInWhite); } //Prepare for Burst @@ -507,8 +506,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(HammerMotif); if (!gauge.LandscapeMotifDrawn && LevelChecked(LandscapeMotif) && !HasEffect(Buffs.StarryMuse)) return OriginalHook(LandscapeMotif); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_BlizzardInCyan) && HasEffect(Buffs.SubtractivePalette)) - return OriginalHook(BlizzardIIinCyan); } if (IsMoving && InCombat()) @@ -516,11 +513,12 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HammerStampCombo) && HasEffect(Buffs.HammerTime)) return OriginalHook(HammerStamp); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HolyInWhite) && gauge.Paint >= 1 && !HasEffect(Buffs.MonochromeTones)) - return OriginalHook(HolyInWhite); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_CometinBlack) && gauge.Paint >= 1 && HasEffect(Buffs.MonochromeTones)) return OriginalHook(CometinBlack); + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HolyInWhite) && gauge.Paint >= 1) + return OriginalHook(HolyInWhite); + } //Prepare for Burst From bf2890585ba5a37e35679fdf28d6cae75561795b Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 15 Aug 2024 07:14:06 +0100 Subject: [PATCH 098/142] Simple NIN sorted out --- XIVSlothCombo/Combos/CustomComboPreset.cs | 2 +- XIVSlothCombo/Combos/JobHelpers/NIN.cs | 19 +++- XIVSlothCombo/Combos/PvE/NIN.cs | 117 +++++++++++++--------- XIVSlothCombo/XIVSlothCombo.cs | 2 +- 4 files changed, 91 insertions(+), 49 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..42b2dd8cd 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2049,7 +2049,7 @@ public enum CustomComboPreset #region NINJA [ReplaceSkill(NIN.SpinningEdge)] - [ConflictingCombos(NIN_ArmorCrushCombo, NIN_ST_AdvancedMode, NIN_KassatsuChiJin, NIN_KassatsuTrick)] + [ConflictingCombos(NIN_ST_AdvancedMode)] [CustomComboInfo("Simple Mode - Single Target", "Replaces Spinning Edge with a one-button full single target rotation.\nThis is the ideal option for newcomers to the job.", NIN.JobID)] NIN_ST_SimpleMode = 10000, diff --git a/XIVSlothCombo/Combos/JobHelpers/NIN.cs b/XIVSlothCombo/Combos/JobHelpers/NIN.cs index 5ece51f04..f2db8eb4e 100644 --- a/XIVSlothCombo/Combos/JobHelpers/NIN.cs +++ b/XIVSlothCombo/Combos/JobHelpers/NIN.cs @@ -1,6 +1,7 @@ using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.JobGauge.Types; using ECommons.DalamudServices; +using System; using XIVSlothCombo.Combos.JobHelpers.Enums; using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Data; @@ -10,6 +11,22 @@ namespace XIVSlothCombo.Combos.JobHelpers { internal class NIN { + internal class NINHelper : PvE.NIN + { + internal static bool TrickDebuff => TargetHasTrickDebuff(); + private static bool TargetHasTrickDebuff() + { + return CustomComboFunctions.TargetHasEffect(Debuffs.TrickAttack) || CustomComboFunctions.TargetHasEffect(Debuffs.Dokumori); + } + + internal static bool MugDebuff => TargetHasMugDebuff(); + + private static bool TargetHasMugDebuff() + { + return CustomComboFunctions.TargetHasEffect(Debuffs.Mug) || CustomComboFunctions.TargetHasEffect(Debuffs.KunaisBane); + } + } + internal class MudraCasting : PvE.NIN { /// Checks if the player is in a state to be able to cast a ninjitsu. @@ -569,7 +586,7 @@ private bool DoOpener(ref uint actionID, MudraCasting mudraState) //Failure states if ((OpenerStep is 13 or 14 or 15 && CustomComboFunctions.IsMoving) || - (OpenerStep is 7 && !CustomComboFunctions.HasEffect(Buffs.Suiton)) || + (OpenerStep is 7 && !CustomComboFunctions.HasEffect(Buffs.ShadowWalker)) || (OpenerStep is 18 or 20 && CustomComboFunctions.GetJobGauge().Ninki < 45) || (OpenerStep is 17 or 19 && !CustomComboFunctions.HasEffect(Buffs.RaijuReady)) || (OpenerStep is 10 && !CustomComboFunctions.HasEffect(Buffs.Kassatsu))) diff --git a/XIVSlothCombo/Combos/PvE/NIN.cs b/XIVSlothCombo/Combos/PvE/NIN.cs index 58976b453..15f92b9f4 100644 --- a/XIVSlothCombo/Combos/PvE/NIN.cs +++ b/XIVSlothCombo/Combos/PvE/NIN.cs @@ -1,5 +1,6 @@ using Dalamud.Game.ClientState.JobGauge.Types; using Dalamud.Game.ClientState.Statuses; +using ECommons.DalamudServices; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; @@ -38,6 +39,8 @@ public const uint FleetingRaiju = 25778, Hellfrog = 7401, HollowNozuchi = 25776, + TenriJendo = 36961, + KunaisBane = 36958, //Mudras Ninjutsu = 2260, @@ -80,7 +83,10 @@ public static class Buffs public const ushort Mudra = 496, Kassatsu = 497, - Suiton = 507, + //Suiton = 507, + Higi = 3850, + TenriJendo = 3851, + ShadowWalker = 3848, Hidden = 614, TenChiJin = 1186, AssassinateReady = 1955, @@ -94,7 +100,9 @@ public const ushort public static class Debuffs { public const ushort + Dokumori = 3849, TrickAttack = 3254, + KunaisBane = 3906, Mug = 638; } @@ -150,11 +158,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool inTrickBurstSaveWindow = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack_Cooldowns) && IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack) && GetCooldownRemainingTime(TrickAttack) <= GetOptionValue(Config.Advanced_Trick_Cooldown); bool useBhakaBeforeTrickWindow = GetCooldownRemainingTime(TrickAttack) >= 3; bool inMudraState = HasEffect(Buffs.Mudra); - bool setupSuitonWindow = GetCooldownRemainingTime(TrickAttack) <= GetOptionValue(Config.Trick_CooldownRemaining) && !HasEffect(Buffs.Suiton); - bool setupKassatsuWindow = GetCooldownRemainingTime(TrickAttack) <= 10 && HasEffect(Buffs.Suiton); + bool setupSuitonWindow = GetCooldownRemainingTime(TrickAttack) <= GetOptionValue(Config.Trick_CooldownRemaining) && !HasEffect(Buffs.ShadowWalker); + bool setupKassatsuWindow = GetCooldownRemainingTime(TrickAttack) <= 10 && HasEffect(Buffs.ShadowWalker); bool chargeCheck = IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_ChargeHold) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_ChargeHold) && (GetRemainingCharges(Ten) == 2 || (GetRemainingCharges(Ten) == 1 && GetCooldownChargeRemainingTime(Ten) < 3))); bool doubleArmorCrush = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_ArmorCrush) && PluginConfiguration.GetCustomBoolValue(Config.Advanced_DoubleArmorCrush) && GetOptionValue(Config.Huton_RemainingArmorCrush) <= 12; - bool poolCharges = !GetOptionBool(Config.Advanced_ChargePool) || (GetRemainingCharges(Ten) == 1 && GetCooldownChargeRemainingTime(Ten) < 2) || TargetHasEffect(Debuffs.TrickAttack); + bool poolCharges = !GetOptionBool(Config.Advanced_ChargePool) || (GetRemainingCharges(Ten) == 1 && GetCooldownChargeRemainingTime(Ten) < 2) || NINHelper.TrickDebuff; bool raitonUptime = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Raiton_Uptime); bool suitonUptime = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Suiton_Uptime); int timesLastEnderWasArmorCrush = ActionWatching.HowManyTimesUsedAfterAnotherAction(ArmorCrush, AeolianEdge); @@ -193,7 +201,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Kassatsu_HyoshoRaynryu) && HasEffect(Buffs.Kassatsu) && - TargetHasEffect(Debuffs.TrickAttack) && + NINHelper.TrickDebuff && (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOnCooldown(Mug)))) mudraState.CurrentMudra = MudraCasting.MudraState.CastingHyoshoRanryu; @@ -210,7 +218,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Bunshin_Phantom) && HasEffect(Buffs.PhantomReady) && - ((GetCooldownRemainingTime(TrickAttack) > GetBuffRemainingTime(Buffs.PhantomReady) && GetBuffRemainingTime(Buffs.PhantomReady) < 5) || TargetHasEffect(Debuffs.TrickAttack) || (HasEffect(Buffs.Bunshin) && TargetHasEffect(Debuffs.Mug))) && + ((GetCooldownRemainingTime(TrickAttack) > GetBuffRemainingTime(Buffs.PhantomReady) && GetBuffRemainingTime(Buffs.PhantomReady) < 5) || NINHelper.TrickDebuff || (HasEffect(Buffs.Bunshin) && TargetHasEffect(Debuffs.Mug))) && PhantomKamaitachi.LevelChecked() && phantomUptime) return OriginalHook(PhantomKamaitachi); @@ -218,7 +226,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_Suiton) && setupSuitonWindow && TrickAttack.LevelChecked() && - !HasEffect(Buffs.Suiton) && + !HasEffect(Buffs.ShadowWalker) && chargeCheck && suitonUptime && mudraState.CastSuiton(ref actionID)) @@ -244,7 +252,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Variant.VariantRampart; if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug_AlignBefore) && - HasEffect(Buffs.Suiton) && + HasEffect(Buffs.ShadowWalker) && GetCooldownRemainingTime(TrickAttack) <= 3 && ((IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack_Delayed) && InCombat() && combatDuration.TotalSeconds > 6) || IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack_Delayed)) && @@ -253,7 +261,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(Mug); if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack) && - HasEffect(Buffs.Suiton) && + HasEffect(Buffs.ShadowWalker) && IsOffCooldown(TrickAttack) && ((IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack_Delayed) && InCombat() && combatDuration.TotalSeconds > 8) || IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack_Delayed))) @@ -262,7 +270,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Bunshin) && Bunshin.LevelChecked() && IsOffCooldown(Bunshin) && gauge.Ninki >= bunshinPool) return OriginalHook(Bunshin); - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Kassatsu) && (TargetHasEffect(Debuffs.TrickAttack) || setupKassatsuWindow) && IsOffCooldown(Kassatsu) && Kassatsu.LevelChecked()) + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Kassatsu) && (NINHelper.TrickDebuff || setupKassatsuWindow) && IsOffCooldown(Kassatsu) && Kassatsu.LevelChecked()) return OriginalHook(Kassatsu); //healing - please move if not appropriate priority @@ -276,14 +284,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return All.Bloodbath; if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Bhavacakra) && - ((TargetHasEffect(Debuffs.TrickAttack) && gauge.Ninki >= 50) || (useBhakaBeforeTrickWindow && gauge.Ninki == 100)) && + ((NINHelper.TrickDebuff && gauge.Ninki >= 50) || (useBhakaBeforeTrickWindow && gauge.Ninki == 100)) && (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOnCooldown(Mug))) && Bhavacakra.LevelChecked()) return OriginalHook(Bhavacakra); if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Bhavacakra) && - ((TargetHasEffect(Debuffs.TrickAttack) && gauge.Ninki >= 50) || (useBhakaBeforeTrickWindow && gauge.Ninki >= 60)) && + ((NINHelper.TrickDebuff && gauge.Ninki >= 50) || (useBhakaBeforeTrickWindow && gauge.Ninki >= 60)) && (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOnCooldown(Mug))) && !Bhavacakra.LevelChecked() && Hellfrog.LevelChecked()) return OriginalHook(Hellfrog); @@ -292,11 +300,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOffCooldown(Mug) && Mug.LevelChecked()) { - if (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug_AlignAfter) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug_AlignAfter) && TargetHasEffect(Debuffs.TrickAttack))) + if (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug_AlignAfter) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug_AlignAfter) && NINHelper.TrickDebuff)) return OriginalHook(Mug); } - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Meisui) && HasEffect(Buffs.Suiton) && gauge.Ninki <= 50 && IsOffCooldown(Meisui) && Meisui.LevelChecked()) + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Meisui) && HasEffect(Buffs.ShadowWalker) && gauge.Ninki <= 50 && IsOffCooldown(Meisui) && Meisui.LevelChecked()) return OriginalHook(Meisui); if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Bhavacakra) && gauge.Ninki >= bhavaPool && Bhavacakra.LevelChecked()) @@ -332,7 +340,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Bunshin_Phantom) && HasEffect(Buffs.PhantomReady) && - ((GetCooldownRemainingTime(TrickAttack) > GetBuffRemainingTime(Buffs.PhantomReady) && GetBuffRemainingTime(Buffs.PhantomReady) < 5) || TargetHasEffect(Debuffs.TrickAttack) || (HasEffect(Buffs.Bunshin) && TargetHasEffect(Debuffs.Mug))) && + ((GetCooldownRemainingTime(TrickAttack) > GetBuffRemainingTime(Buffs.PhantomReady) && GetBuffRemainingTime(Buffs.PhantomReady) < 5) || NINHelper.TrickDebuff || (HasEffect(Buffs.Bunshin) && TargetHasEffect(Debuffs.Mug))) && PhantomKamaitachi.LevelChecked()) return OriginalHook(PhantomKamaitachi); @@ -349,7 +357,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_Suiton) && setupSuitonWindow && TrickAttack.LevelChecked() && - !HasEffect(Buffs.Suiton) && + !HasEffect(Buffs.ShadowWalker) && chargeCheck && mudraState.CastSuiton(ref actionID)) return actionID; @@ -502,7 +510,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsNotEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Ninjitsus_Doton))) return OriginalHook(Kassatsu); - if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Meisui) && HasEffect(Buffs.Suiton) && gauge.Ninki <= 50 && IsOffCooldown(Meisui) && Meisui.LevelChecked()) + if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Meisui) && HasEffect(Buffs.ShadowWalker) && gauge.Ninki <= 50 && IsOffCooldown(Meisui) && Meisui.LevelChecked()) return OriginalHook(Meisui); if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_AssassinateDWAD) && IsOffCooldown(OriginalHook(Assassinate)) && Assassinate.LevelChecked()) @@ -614,7 +622,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (mudraState.CastHyoshoRanryu(ref actionID)) return actionID; - if (GetCooldownRemainingTime(TrickAttack) < 15 && TrickAttack.LevelChecked() && !HasEffect(Buffs.Suiton)) + if (GetCooldownRemainingTime(TrickAttack) < 15 && TrickAttack.LevelChecked() && !HasEffect(Buffs.ShadowWalker)) if (mudraState.CastSuiton(ref actionID)) return actionID; @@ -631,21 +639,24 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; + if (HasEffect(Buffs.TenriJendo)) + return OriginalHook(TenriJendo); + if (Bunshin.LevelChecked() && IsOffCooldown(Bunshin) && gauge.Ninki >= 50) return OriginalHook(Bunshin); - if (HasEffect(Buffs.Suiton) && IsOffCooldown(TrickAttack)) + if (HasEffect(Buffs.ShadowWalker) && IsOffCooldown(TrickAttack)) return OriginalHook(TrickAttack); - if (Bhavacakra.LevelChecked() && ((TargetHasEffect(Debuffs.TrickAttack) && gauge.Ninki >= 50) || useBhakaBeforeTrickWindow && gauge.Ninki == 100)) + if (Bhavacakra.LevelChecked() && ((NINHelper.TrickDebuff && gauge.Ninki >= 50) || useBhakaBeforeTrickWindow && gauge.Ninki == 100)) return OriginalHook(Bhavacakra); - if ((TargetHasEffect(Debuffs.TrickAttack) && gauge.Ninki >= 50) || (useBhakaBeforeTrickWindow && gauge.Ninki == 100) && !Bhavacakra.LevelChecked() && Hellfrog.LevelChecked()) + if ((NINHelper.TrickDebuff && gauge.Ninki >= 50) || (useBhakaBeforeTrickWindow && gauge.Ninki == 100) && !Bhavacakra.LevelChecked() && Hellfrog.LevelChecked()) return OriginalHook(Hellfrog); if (!inTrickBurstSaveWindow) { - if (HasEffect(Buffs.Suiton) && gauge.Ninki <= 50 && IsOffCooldown(Meisui) && Meisui.LevelChecked()) + if (HasEffect(Buffs.ShadowWalker) && gauge.Ninki <= 50 && IsOffCooldown(Meisui) && Meisui.LevelChecked()) return OriginalHook(Meisui); if (IsOffCooldown(Mug) && Mug.LevelChecked()) @@ -678,14 +689,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove == SpinningEdge && GustSlash.LevelChecked()) return OriginalHook(GustSlash); - if (lastComboMove == GustSlash && ArmorCrush.LevelChecked()) - return OriginalHook(ArmorCrush); - if (lastComboMove == GustSlash && TargetNeedsPositionals() && GetRemainingCharges(All.TrueNorth) > 0 && All.TrueNorth.LevelChecked() && !HasEffect(All.Buffs.TrueNorth) && canWeave) return OriginalHook(All.TrueNorth); - if (lastComboMove == GustSlash && AeolianEdge.LevelChecked()) + if (lastComboMove == GustSlash && AeolianEdge.LevelChecked() && gauge.Kazematoi > 0) return OriginalHook(AeolianEdge); + + if (lastComboMove == GustSlash && ArmorCrush.LevelChecked() && gauge.Kazematoi < 5) + return OriginalHook(ArmorCrush); + + } return OriginalHook(SpinningEdge); @@ -698,7 +711,7 @@ internal class NIN_AoE_SimpleMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.NIN_AoE_SimpleMode; - protected internal MudraCasting mudraState = new(); + private MudraCasting mudraState = new(); protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -707,6 +720,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var dotonBuff = FindEffect(Buffs.Doton); var gauge = GetJobGauge(); var canWeave = CanWeave(GustSlash); + bool inMudra = WasLastAction(Ten) || WasLastAction(Chi) || WasLastAction(Jin); if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5 && !InCombat()) mudraState.CurrentMudra = MudraCasting.MudraState.None; @@ -716,11 +730,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.TenChiJin)) { - if (WasLastAction(TCJFumaShurikenChi)) return OriginalHook(Ten); - if (WasLastAction(TCJKaton) || WasLastAction(HollowNozuchi)) return OriginalHook(Jin); - return OriginalHook(Chi); + if (WasLastAction(TCJFumaShurikenJin)) return OriginalHook(Ten); + if (WasLastAction(TCJKaton) || WasLastAction(HollowNozuchi)) return OriginalHook(Chi); + return OriginalHook(Jin); } + if (JustUsed(Kassatsu, 0.5f)) + mudraState.CurrentMudra = MudraCasting.MudraState.None; + if (mudraState.CurrentMudra != MudraCasting.MudraState.None) { if (mudraState.ContinueCurrentMudra(ref actionID)) @@ -744,29 +761,37 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - if (GetTargetHPPercent() > 20 && (dotonBuff is null || dotonBuff?.RemainingTime <= 3) && !WasLastAction(Doton)) - { - if (!WasLastAction(Chi) && !WasLastAction(TenCombo) && OriginalHook(Ninjutsu) != Katon) - mudraState.CurrentMudra = MudraCasting.MudraState.CastingDoton; + if (!HasEffect(Buffs.ShadowWalker) && KunaisBane.LevelChecked() && GetCooldownRemainingTime(KunaisBane) < 5 && mudraState.CastHuton(ref actionID)) + return actionID; - if (mudraState.CastDoton(ref actionID)) - return actionID; - } + if (HasEffect(Buffs.ShadowWalker) && KunaisBane.LevelChecked() && IsOffCooldown(KunaisBane) && canWeave) + return KunaisBane; - if (mudraState.CastKaton(ref actionID)) - return actionID; + //if (GetTargetHPPercent() > 20 && (dotonBuff is null || dotonBuff?.RemainingTime <= 3) && !JustUsed(Doton) && IsOnCooldown(TenChiJin)) + //{ + // if (mudraState.CastDoton(ref actionID)) + // return actionID; + //} + //else if (mudraState.CurrentMudra == MudraCasting.MudraState.CastingDoton) + // mudraState.CurrentMudra = MudraCasting.MudraState.None; - if (canWeave) + if (canWeave && !inMudra) { if (IsEnabled(CustomComboPreset.NIN_Variant_Rampart) && IsEnabled(Variant.VariantRampart) && IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; + if (IsOffCooldown(TenChiJin) && TenChiJin.LevelChecked()) + return OriginalHook(TenChiJin); + + if (HasEffect(Buffs.TenriJendo)) + return TenriJendo; + if (IsOffCooldown(Bunshin) && gauge.Ninki >= 50 && Bunshin.LevelChecked()) return OriginalHook(Bunshin); - if (HasEffect(Buffs.Suiton) && gauge.Ninki < 50 && IsOffCooldown(Meisui) && Meisui.LevelChecked()) + if (HasEffect(Buffs.ShadowWalker) && gauge.Ninki < 50 && IsOffCooldown(Meisui) && Meisui.LevelChecked()) return OriginalHook(Meisui); if (HasEffect(Buffs.Meisui) && gauge.Ninki >= 50) @@ -780,9 +805,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsOffCooldown(Kassatsu) && Kassatsu.LevelChecked()) return OriginalHook(Kassatsu); - - if (IsOffCooldown(TenChiJin) && TenChiJin.LevelChecked()) - return OriginalHook(TenChiJin); } else { @@ -790,6 +812,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(PhantomKamaitachi); } + if (mudraState.CastKaton(ref actionID)) + return actionID; + if (comboTime > 1f) { if (lastComboMove is DeathBlossom && HakkeMujinsatsu.LevelChecked()) @@ -875,7 +900,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID == Kassatsu) { - if (HasEffect(Buffs.Suiton) || HasEffect(Buffs.Hidden)) + if (HasEffect(Buffs.ShadowWalker) || HasEffect(Buffs.Hidden)) { return OriginalHook(TrickAttack); } @@ -894,7 +919,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID == TenChiJin) { - if (HasEffect(Buffs.Suiton)) + if (HasEffect(Buffs.ShadowWalker)) return Meisui; if (HasEffect(Buffs.TenChiJin) && IsEnabled(CustomComboPreset.NIN_TCJ)) diff --git a/XIVSlothCombo/XIVSlothCombo.cs b/XIVSlothCombo/XIVSlothCombo.cs index acbeccfe5..762799eab 100644 --- a/XIVSlothCombo/XIVSlothCombo.cs +++ b/XIVSlothCombo/XIVSlothCombo.cs @@ -57,7 +57,7 @@ public sealed partial class XIVSlothCombo : IDalamudPlugin //GNB.JobID, //MCH.JobID, MNK.JobID, - NIN.JobID, + //NIN.JobID, //PCT.JobID, //PLD.JobID, //RDM.JobID, From 32f3a9b257229c5c949f528bdbbd087bfb893405 Mon Sep 17 00:00:00 2001 From: Akinee Date: Thu, 15 Aug 2024 08:19:33 +0200 Subject: [PATCH 099/142] Add levelchecks --- XIVSlothCombo/Combos/PvE/PCT.cs | 115 +++++++++++++++++--------------- 1 file changed, 62 insertions(+), 53 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index 6fc393aff..dab20d5ff 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -187,19 +187,18 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (actionID is FireInRed) { var gauge = GetJobGauge(); - bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardinCyan)) : CanSpellWeave(OriginalHook(FireInRed)) || CanSpellWeave(OriginalHook(HammerStamp)) || CanSpellWeave(CometinBlack) || CanSpellWeave(HolyInWhite); - + bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardinCyan)) : CanSpellWeave(OriginalHook(FireInRed)) || CanSpellWeave(OriginalHook(HammerStamp)) || CanSpellWeave(CometinBlack) || CanSpellWeave(HolyInWhite) || CanSpellWeave(OriginalHook(CreatureMotif)) || CanSpellWeave(HammerMotif) || CanSpellWeave(LandscapeMotif); // Prepull logic if (!InCombat() || (InCombat() && CurrentTarget == null)) { if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_PrePullMotifs)) { - if (LevelChecked(OriginalHook(CreatureMotif)) && !gauge.CreatureMotifDrawn) + if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn) return OriginalHook(CreatureMotif); - if (LevelChecked(OriginalHook(WeaponMotif)) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) + if (WeaponMotif.LevelChecked() && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) return OriginalHook(WeaponMotif); - if (LevelChecked(OriginalHook(LandscapeMotif)) && !gauge.LandscapeMotifDrawn && !HasEffect(Buffs.StarryMuse)) + if (LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && !HasEffect(Buffs.StarryMuse)) return OriginalHook(LandscapeMotif); } } @@ -212,13 +211,13 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } // General Weaves - if (canWeave) + if (InCombat() && canWeave) { //Muses - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_ScenicMuse) && gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && IsOffCooldown(ScenicMuse)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_ScenicMuse) && ScenicMuse.LevelChecked() && gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && IsOffCooldown(ScenicMuse)) return OriginalHook(ScenicMuse); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LivingMuse) && gauge.CreatureMotifDrawn && + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LivingMuse) && LivingMuse.LevelChecked() && gauge.CreatureMotifDrawn && (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || !ScenicMuse.LevelChecked()) && @@ -228,18 +227,23 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(LivingMuse); } - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SteelMuse) && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SteelMuse) && SteelMuse.LevelChecked() && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) return OriginalHook(SteelMuse); if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 40 || !ScenicMuse.LevelChecked())) return OriginalHook(MogoftheAges); - // Swiftcast motifs - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SwitfcastOption) && IsMoving && IsOffCooldown(All.Swiftcast) && (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SwitfcastOption) && + IsMoving && + IsOffCooldown(All.Swiftcast) && + All.Swiftcast.LevelChecked() && + (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + { return All.Swiftcast; + } // Palette - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SubtractivePalette) && LevelChecked(SubtractivePalette) && !HasEffect(Buffs.SubtractivePalette)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && !HasEffect(Buffs.SubtractivePalette)) { if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) return SubtractivePalette; @@ -248,37 +252,37 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (HasEffect(All.Buffs.Swiftcast)) { - if (!gauge.CreatureMotifDrawn && LevelChecked(CreatureMotif) && !HasEffect(Buffs.StarryMuse)) + if (!gauge.CreatureMotifDrawn && CreatureMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) return OriginalHook(CreatureMotif); - if (!gauge.WeaponMotifDrawn && LevelChecked(WeaponMotif) && !HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.StarryMuse)) + if (!gauge.WeaponMotifDrawn && HammerMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.StarryMuse)) return OriginalHook(HammerMotif); - if (!gauge.LandscapeMotifDrawn && LevelChecked(LandscapeMotif) && !HasEffect(Buffs.StarryMuse)) + if (!gauge.LandscapeMotifDrawn && LandscapeMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) return OriginalHook(LandscapeMotif); } if (IsMoving && InCombat()) { - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HammerStampCombo) && HasEffect(Buffs.HammerTime)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HammerStampCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime)) return OriginalHook(HammerStamp); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_CometinBlack) && gauge.Paint >= 1 && HasEffect(Buffs.MonochromeTones)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_CometinBlack) && CometinBlack.LevelChecked() && gauge.Paint >= 1 && HasEffect(Buffs.MonochromeTones)) return OriginalHook(CometinBlack); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HolyInWhite) && gauge.Paint >= 1) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HolyInWhite) && HolyInWhite.LevelChecked() && gauge.Paint >= 1) return OriginalHook(HolyInWhite); } //Prepare for Burst if (GetCooldownRemainingTime(ScenicMuse) <= 20) { - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LandscapeMotif) && LevelChecked(LandscapeMotif) && !gauge.LandscapeMotifDrawn) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LandscapeMotif) && LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn) return OriginalHook(LandscapeMotif); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CreatureMotif) && LevelChecked(CreatureMotif) && !gauge.CreatureMotifDrawn) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CreatureMotif) && CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn) return OriginalHook(CreatureMotif); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif) && LevelChecked(WeaponMotif) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif) && WeaponMotif.LevelChecked() && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) return OriginalHook(WeaponMotif); } @@ -286,11 +290,11 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_Phase) && HasEffect(Buffs.StarryMuse)) { - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_CometInBlack) && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_CometInBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) return CometinBlack; // Check for HammerTime - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_HammerCombo) && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_HammerCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) return OriginalHook(HammerStamp); // Check for Starstruck @@ -313,10 +317,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (HasEffect(Buffs.RainbowBright) && !HasEffect(Buffs.StarryMuse)) return RainbowDrip; - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CometinBlack) && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(Buffs.StarryMuse) > 30f) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CometinBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(Buffs.StarryMuse) > 30f) return OriginalHook(CometinBlack); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_HammerStampCombo) && HasEffect(Buffs.HammerTime)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_HammerStampCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime)) return OriginalHook(HammerStamp); @@ -332,10 +336,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(WeaponMotif); } - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LucidDreaming) && ActionReady(All.LucidDreaming) && CanSpellWeave(actionID) && LocalPlayer.CurrentMp <= Config.PCT_ST_AdvancedMode_LucidOption) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LucidDreaming) && All.LucidDreaming.LevelChecked() && ActionReady(All.LucidDreaming) && CanSpellWeave(actionID) && LocalPlayer.CurrentMp <= Config.PCT_ST_AdvancedMode_LucidOption) return All.LucidDreaming; - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_BlizzardInCyan) && HasEffect(Buffs.SubtractivePalette)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_BlizzardInCyan) && BlizzardIIinCyan.LevelChecked() && HasEffect(Buffs.SubtractivePalette)) return OriginalHook(BlizzardinCyan); } return actionID; @@ -446,7 +450,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (actionID is FireIIinRed) { var gauge = GetJobGauge(); - bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardIIinCyan)) : CanSpellWeave(OriginalHook(FireIIinRed)) || CanSpellWeave(OriginalHook(HammerStamp)) || CanSpellWeave(CometinBlack) || CanSpellWeave(HolyInWhite); + bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardIIinCyan)) : CanSpellWeave(OriginalHook(FireInRed)) || CanSpellWeave(OriginalHook(HammerStamp)) || CanSpellWeave(CometinBlack) || CanSpellWeave(HolyInWhite) || CanSpellWeave(OriginalHook(CreatureMotif)) || CanSpellWeave(HammerMotif) || CanSpellWeave(LandscapeMotif); // Prepull logic @@ -454,23 +458,23 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_PrePullMotifs)) { - if (LevelChecked(OriginalHook(CreatureMotif)) && !gauge.CreatureMotifDrawn) + if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn) return OriginalHook(CreatureMotif); - if (LevelChecked(OriginalHook(WeaponMotif)) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) + if (WeaponMotif.LevelChecked() && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) return OriginalHook(WeaponMotif); - if (LevelChecked(OriginalHook(LandscapeMotif)) && !gauge.LandscapeMotifDrawn && !HasEffect(Buffs.StarryMuse)) + if (LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && !HasEffect(Buffs.StarryMuse)) return OriginalHook(LandscapeMotif); } } // General Weaves - if (canWeave) + if (InCombat() && canWeave) { //Muses - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_ScenicMuse) && gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && IsOffCooldown(ScenicMuse)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_ScenicMuse) && ScenicMuse.LevelChecked() && gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && IsOffCooldown(ScenicMuse)) return OriginalHook(ScenicMuse); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LivingMuse) && gauge.CreatureMotifDrawn && + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LivingMuse) && LivingMuse.LevelChecked() && gauge.CreatureMotifDrawn && (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || !ScenicMuse.LevelChecked()) && @@ -480,18 +484,23 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(LivingMuse); } - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SteelMuse) && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SteelMuse) && SteelMuse.LevelChecked() && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) return OriginalHook(SteelMuse); if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 40 || !ScenicMuse.LevelChecked())) return OriginalHook(MogoftheAges); - // Swiftcast motifs - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SwitfcastOption) && IsMoving && IsOffCooldown(All.Swiftcast) && (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SwitfcastOption) && + IsMoving && + IsOffCooldown(All.Swiftcast) && + All.Swiftcast.LevelChecked() && // Added this condition + (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + { return All.Swiftcast; + } // Palette - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SubtractivePalette) && LevelChecked(SubtractivePalette) && !HasEffect(Buffs.SubtractivePalette)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && !HasEffect(Buffs.SubtractivePalette)) { if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) return SubtractivePalette; @@ -500,23 +509,23 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (HasEffect(All.Buffs.Swiftcast)) { - if (!gauge.CreatureMotifDrawn && LevelChecked(CreatureMotif) && !HasEffect(Buffs.StarryMuse)) + if (!gauge.CreatureMotifDrawn && CreatureMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) return OriginalHook(CreatureMotif); - if (!gauge.WeaponMotifDrawn && LevelChecked(WeaponMotif) && !HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.StarryMuse)) + if (!gauge.WeaponMotifDrawn && HammerMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.StarryMuse)) return OriginalHook(HammerMotif); - if (!gauge.LandscapeMotifDrawn && LevelChecked(LandscapeMotif) && !HasEffect(Buffs.StarryMuse)) + if (!gauge.LandscapeMotifDrawn && LandscapeMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) return OriginalHook(LandscapeMotif); } if (IsMoving && InCombat()) { - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HammerStampCombo) && HasEffect(Buffs.HammerTime)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HammerStampCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime)) return OriginalHook(HammerStamp); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_CometinBlack) && gauge.Paint >= 1 && HasEffect(Buffs.MonochromeTones)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_CometinBlack) && CometinBlack.LevelChecked() && gauge.Paint >= 1 && HasEffect(Buffs.MonochromeTones)) return OriginalHook(CometinBlack); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HolyInWhite) && gauge.Paint >= 1) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MovementOption_HolyInWhite) && HolyInWhite.LevelChecked() && gauge.Paint >= 1) return OriginalHook(HolyInWhite); } @@ -524,13 +533,13 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb //Prepare for Burst if (GetCooldownRemainingTime(ScenicMuse) <= 20) { - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LandscapeMotif) && LevelChecked(LandscapeMotif) && !gauge.LandscapeMotifDrawn) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LandscapeMotif) && LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn) return OriginalHook(LandscapeMotif); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CreatureMotif) && LevelChecked(CreatureMotif) && !gauge.CreatureMotifDrawn) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CreatureMotif) && CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn) return OriginalHook(CreatureMotif); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_WeaponMotif) && LevelChecked(WeaponMotif) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_WeaponMotif) && WeaponMotif.LevelChecked() && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime)) return OriginalHook(WeaponMotif); } @@ -538,11 +547,11 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_Phase) && HasEffect(Buffs.StarryMuse)) { - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_CometInBlack) && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_CometInBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) return CometinBlack; // Check for HammerTime - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_HammerCombo) && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_HammerCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) return OriginalHook(HammerStamp); // Check for Starstruck @@ -562,10 +571,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (HasEffect(Buffs.RainbowBright) && !HasEffect(Buffs.StarryMuse)) return RainbowDrip; - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CometinBlack) && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(StarryMuse) > 30) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CometinBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(StarryMuse) > 30) return OriginalHook(CometinBlack); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_HammerStampCombo) && HasEffect(Buffs.HammerTime)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_HammerStampCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime)) return OriginalHook(HammerStamp); @@ -581,10 +590,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb return OriginalHook(WeaponMotif); } - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LucidDreaming) && ActionReady(All.LucidDreaming) && CanSpellWeave(actionID) && LocalPlayer.CurrentMp <= Config.PCT_ST_AdvancedMode_LucidOption) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LucidDreaming) && All.LucidDreaming.LevelChecked() && ActionReady(All.LucidDreaming) && CanSpellWeave(actionID) && LocalPlayer.CurrentMp <= Config.PCT_ST_AdvancedMode_LucidOption) return All.LucidDreaming; - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_BlizzardInCyan) && HasEffect(Buffs.SubtractivePalette)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_BlizzardInCyan) && BlizzardIIinCyan.LevelChecked() && HasEffect(Buffs.SubtractivePalette)) return OriginalHook(BlizzardIIinCyan); } From e35e1b8f569b4e46451b26e92e444a40df541e03 Mon Sep 17 00:00:00 2001 From: Kaeris Date: Thu, 15 Aug 2024 13:56:17 +0100 Subject: [PATCH 100/142] Formatting --- XIVSlothCombo/Window/Tabs/Debug.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 4c6b2ff66..785990ffd 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -175,8 +175,7 @@ static void CustomStyleText(string label, object? value) CustomStyleText("Combo Timer:", Math.Round(CustomComboFunctions.ComboTimer, 1)); CustomStyleText("Combo Action:", CustomComboFunctions.ComboAction == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(CustomComboFunctions.ComboAction)) ? "Unknown" : ActionWatching.GetActionName(CustomComboFunctions.ComboAction))} (ID: {CustomComboFunctions.ComboAction})"); CustomStyleText("Cast Action:", LocalPlayer.CastActionId == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(LocalPlayer.CastActionId)) ? "Unknown" : ActionWatching.GetActionName(LocalPlayer.CastActionId))} (ID: {LocalPlayer.CastActionId})"); - CustomStyleText("Cast Time (Total):", Math.Round(LocalPlayer.TotalCastTime, 2)); - CustomStyleText("Cast Time (Current):", Math.Round(LocalPlayer.CurrentCastTime, 2)); + CustomStyleText("Cast Time:", $"{LocalPlayer.CurrentCastTime:F2} / {LocalPlayer.TotalCastTime:F2}"); ImGui.Spacing(); // Party Info From 6f47a9fc227b1a46f214f6248482a0e246d3e981 Mon Sep 17 00:00:00 2001 From: Akinee Date: Thu, 15 Aug 2024 16:43:07 +0200 Subject: [PATCH 101/142] CiB overwrite fix & fix checking the actual skill and not the buff lol --- XIVSlothCombo/Combos/PvE/PCT.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index dab20d5ff..5d63f9be9 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -236,14 +236,14 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SwitfcastOption) && IsMoving && IsOffCooldown(All.Swiftcast) && - All.Swiftcast.LevelChecked() && + All.Swiftcast.LevelChecked() && (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) { return All.Swiftcast; } // Palette - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && !HasEffect(Buffs.SubtractivePalette)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && !HasEffect(Buffs.SubtractivePalette) && !HasEffect(Buffs.MonochromeTones)) { if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) return SubtractivePalette; @@ -317,7 +317,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (HasEffect(Buffs.RainbowBright) && !HasEffect(Buffs.StarryMuse)) return RainbowDrip; - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CometinBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(Buffs.StarryMuse) > 30f) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CometinBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(StarryMuse) > 30f) return OriginalHook(CometinBlack); if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_HammerStampCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime)) @@ -500,7 +500,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } // Palette - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && !HasEffect(Buffs.SubtractivePalette)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && !HasEffect(Buffs.SubtractivePalette) && !HasEffect(Buffs.MonochromeTones)) { if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) return SubtractivePalette; From 1fa1f0da16e8da68717558577dac5df7046bef71 Mon Sep 17 00:00:00 2001 From: ace Date: Thu, 15 Aug 2024 16:49:51 -0700 Subject: [PATCH 102/142] AOE fix --- XIVSlothCombo/Combos/CustomComboPreset.cs | 22 +++--- XIVSlothCombo/Combos/PvE/GNB.cs | 81 +++++++++++++++++------ 2 files changed, 73 insertions(+), 30 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 20274ae4f..063a4e29b 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1579,36 +1579,40 @@ public enum CustomComboPreset [ConflictingCombos(GNB_NM_Features)] [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("No Mercy Option", "Adds No Mercy to the AoE combo when it's available.", GNB.JobID)] + [CustomComboInfo("No Mercy Option", "Adds No Mercy to the AoE combo when appropriate.", GNB.JobID)] GNB_AoE_NoMercy = 7201, [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("Danger/Blasting Zone Option", "Adds Danger/Blasting Zone to the AoE combo when it's available.", GNB.JobID)] - GNB_AOE_DangerZone = 7202, + [CustomComboInfo("Danger/Blasting Zone Option", "Adds Danger/Blasting Zone to the AoE combo when appropriate.", GNB.JobID)] + GNB_AoE_DangerZone = 7202, [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("Bow Shock Option", "Adds Bow Shock onto the AoE combo when it's available.", GNB.JobID)] + [CustomComboInfo("Bow Shock Option", "Adds Bow Shock onto the AoE combo when appropriate.", GNB.JobID)] GNB_AoE_BowShock = 7203, [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to the AoE combo when it's available.\n Will spend cartridges through Fated Circle to prepare for Bloodfest usage.", GNB.JobID)] + [CustomComboInfo("Bloodfest Option", "Adds Bloodfest to the AoE combo when appropriate.", GNB.JobID)] GNB_AoE_Bloodfest = 7204, [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("Sonic Break Option", "Adds Sonic Break to the AoE combo when it's available.", GNB.JobID)] - GNB_AOE_SonicBreak = 7205, + [CustomComboInfo("Sonic Break Option", "Adds Sonic Break to the AoE combo when appropriate.", GNB.JobID)] + GNB_AoE_SonicBreak = 7205, [ParentCombo(GNB_AoE_Advanced)] - [CustomComboInfo("Double Down Option", "Adds Double Down to the AoE combo when it's available and you have 2 or more cartridges.", GNB.JobID)] + [CustomComboInfo("Double Down Option", "Adds Double Down to the AoE combo when appropriate.", GNB.JobID)] GNB_AoE_DoubleDown = 7206, [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Reign Combo Option", "Adds Reign/Noble/LionHeart to the AoE combo when appropriate.", GNB.JobID)] GNB_AoE_Reign = 7207, + [ParentCombo(GNB_AoE_Advanced)] + [CustomComboInfo("Fated Circle Option", "Adds Fated Circle to the AoE combo when appropriate.", GNB.JobID)] + GNB_AoE_FatedCircle = 7208, + [ParentCombo(GNB_AoE_Advanced)] [CustomComboInfo("Ammo Overcap Option", "Adds Fated Circle to the AoE combo when about to overcap.", GNB.JobID)] - GNB_AOE_Overcap = 7208, + GNB_AoE_Overcap = 7209, #endregion #region Gnashing Fang diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index f7ae44229..64187178d 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -778,29 +778,54 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + //Variant Cure + if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.GNB_VariantCure)) + return Variant.VariantCure; + if (InCombat()) { if (CanWeave(actionID)) { - if (ActionReady(NoMercy)) + //Variant SpiritDart + Status? sustainedDamage = FindTargetEffect(Variant.Debuffs.SustainedDamage); + if (IsEnabled(CustomComboPreset.GNB_Variant_SpiritDart) && + IsEnabled(Variant.VariantSpiritDart) && + (sustainedDamage is null || sustainedDamage?.RemainingTime <= 3)) + return Variant.VariantSpiritDart; + + //Variant Ultimatum + if (IsEnabled(CustomComboPreset.GNB_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && ActionReady(Variant.VariantUltimatum)) + return Variant.VariantUltimatum; + + //NoMercy + if (ActionReady(NoMercy)) //use on CD return NoMercy; - if (ActionReady(BowShock) && LevelChecked(BowShock) && HasEffect(Buffs.NoMercy)) + //BowShock + if (ActionReady(BowShock) && LevelChecked(BowShock) && HasEffect(Buffs.NoMercy)) //use on CD under NM return BowShock; - if (ActionReady(DangerZone) && (HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(GnashingFang) <= GCD * 7)) + //Zone + if (ActionReady(DangerZone) && (HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(GnashingFang) <= GCD * 7)) //use on CD after first usage in NM return OriginalHook(DangerZone); - if (Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) + //Bloodfest + if (Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) //use when Ammo is 0 in burst return Bloodfest; - if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && JustUsed(FatedCircle) && LevelChecked(FatedBrand)) + //Continuation + if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && JustUsed(FatedCircle) && LevelChecked(FatedBrand)) //FatedCircle weave return FatedBrand; } - if (HasEffect(Buffs.ReadyToBreak) && !HasEffect(Buffs.ReadyToRaze) && HasEffect(Buffs.NoMercy)) + //SonicBreak + if (HasEffect(Buffs.ReadyToBreak) && !HasEffect(Buffs.ReadyToRaze) && HasEffect(Buffs.NoMercy)) //use on CD return SonicBreak; - if (Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) + //DoubleDown + if ( Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) //use on CD under NM return DoubleDown; - if (Ammo != 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)) + //FatedCircle + if ((HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF + (Ammo > 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle))) // Bloodfest prep return FatedCircle; - if (LevelChecked(ReignOfBeasts)) + //Reign + if (LevelChecked(ReignOfBeasts)) //because leaving this out anywhere is a waste { if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0) { @@ -815,6 +840,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + //1-2 if (comboTime > 0 && lastComboMove == DemonSlice && LevelChecked(DemonSlaughter)) { return (LevelChecked(FatedCircle) && Ammo == MaxCartridges(level)) ? FatedCircle : DemonSlaughter; @@ -833,13 +859,13 @@ internal class GNB_AoE_AdvancedMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID == DemonSlice) { var Ammo = GetJobGauge().Ammo; //carts var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + //Variant Cure if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.GNB_VariantCure)) return Variant.VariantCure; @@ -847,34 +873,46 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (CanWeave(actionID)) { + //Variant SpiritDart Status? sustainedDamage = FindTargetEffect(Variant.Debuffs.SustainedDamage); if (IsEnabled(CustomComboPreset.GNB_Variant_SpiritDart) && IsEnabled(Variant.VariantSpiritDart) && (sustainedDamage is null || sustainedDamage?.RemainingTime <= 3)) return Variant.VariantSpiritDart; - + + //Variant Ultimatum if (IsEnabled(CustomComboPreset.GNB_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && ActionReady(Variant.VariantUltimatum)) return Variant.VariantUltimatum; - if (IsEnabled(CustomComboPreset.GNB_AoE_NoMercy) && ActionReady(NoMercy)) + //NoMercy + if (IsEnabled(CustomComboPreset.GNB_AoE_NoMercy) && ActionReady(NoMercy)) //use on CD return NoMercy; - if (IsEnabled(CustomComboPreset.GNB_AoE_BowShock) && ActionReady(BowShock) && LevelChecked(BowShock) && HasEffect(Buffs.NoMercy)) + //BowShock + if (IsEnabled(CustomComboPreset.GNB_AoE_BowShock) && ActionReady(BowShock) && LevelChecked(BowShock) && HasEffect(Buffs.NoMercy)) //use on CD under NM return BowShock; - if (IsEnabled(CustomComboPreset.GNB_AOE_DangerZone) && ActionReady(DangerZone) && (HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(GnashingFang) <= GCD * 7)) + //Zone + if (IsEnabled(CustomComboPreset.GNB_AoE_DangerZone) && ActionReady(DangerZone) && (HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(GnashingFang) <= GCD * 7)) //use on CD after first usage in NM return OriginalHook(DangerZone); - if (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) + //Bloodfest + if (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && Ammo == 0 && ActionReady(Bloodfest) && LevelChecked(Bloodfest) && HasEffect(Buffs.NoMercy)) //use when Ammo is 0 in burst return Bloodfest; - if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && JustUsed(FatedCircle) && LevelChecked(FatedBrand)) + //Continuation + if (LevelChecked(FatedBrand) && HasEffect(Buffs.ReadyToRaze) && JustUsed(FatedCircle) && LevelChecked(FatedBrand)) //FatedCircle weave return FatedBrand; } - if (IsEnabled(CustomComboPreset.GNB_AOE_SonicBreak) && HasEffect(Buffs.ReadyToBreak) && !HasEffect(Buffs.ReadyToRaze) && HasEffect(Buffs.NoMercy)) + //SonicBreak + if (IsEnabled(CustomComboPreset.GNB_AoE_SonicBreak) && HasEffect(Buffs.ReadyToBreak) && !HasEffect(Buffs.ReadyToRaze) && HasEffect(Buffs.NoMercy)) //use on CD return SonicBreak; - if (IsEnabled(CustomComboPreset.GNB_AoE_DoubleDown) && Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) + //DoubleDown + if (IsEnabled(CustomComboPreset.GNB_AoE_DoubleDown) && Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) //use on CD under NM return DoubleDown; - if (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && Ammo != 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)) + //FatedCircle + if ((IsEnabled(CustomComboPreset.GNB_AoE_FatedCircle) && HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF + (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && Ammo > 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle))) // Bloodfest prep return FatedCircle; - if (IsEnabled(CustomComboPreset.GNB_AoE_Reign) && LevelChecked(ReignOfBeasts)) + //Reign + if (IsEnabled(CustomComboPreset.GNB_AoE_Reign) && LevelChecked(ReignOfBeasts)) //because leaving this out anywhere is a waste { if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0) { @@ -889,9 +927,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + //1-2 if (comboTime > 0 && lastComboMove == DemonSlice && LevelChecked(DemonSlaughter)) { - return (IsEnabled(CustomComboPreset.GNB_AOE_Overcap) && LevelChecked(FatedCircle) && Ammo == MaxCartridges(level)) ? FatedCircle : DemonSlaughter; + return (IsEnabled(CustomComboPreset.GNB_AoE_Overcap) && LevelChecked(FatedCircle) && Ammo == MaxCartridges(level)) ? FatedCircle : DemonSlaughter; } return DemonSlice; From 871b734cd0dcda9880a08df85dd9e374d198e4a6 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Fri, 16 Aug 2024 14:11:06 +0100 Subject: [PATCH 103/142] NIN Advanced modes done and opener --- ECommons | 2 +- XIVSlothCombo/Combos/CustomComboPreset.cs | 50 +++--- XIVSlothCombo/Combos/JobHelpers/AST.cs | 17 ++- XIVSlothCombo/Combos/JobHelpers/NIN.cs | 89 ++++++----- XIVSlothCombo/Combos/PvE/AST.cs | 1 + XIVSlothCombo/Combos/PvE/NIN.cs | 152 +++++++++---------- XIVSlothCombo/Window/ConfigWindow.cs | 1 + XIVSlothCombo/Window/Functions/UserConfig.cs | 11 -- XIVSlothCombo/Window/Tabs/Debug.cs | 1 + XIVSlothCombo/Window/TargetHelper.cs | 14 +- XIVSlothCombo/XIVSlothCombo.cs | 1 + 11 files changed, 174 insertions(+), 165 deletions(-) diff --git a/ECommons b/ECommons index 540b7a353..3f2259f83 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 540b7a353814a9d3ed418a2027f5a6f7c4380e9c +Subproject commit 3f2259f8314e54077d509463a32f72506ff6845c diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 42b2dd8cd..40f4ce370 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2072,29 +2072,29 @@ public enum CustomComboPreset NIN_ST_AdvancedMode_RangedUptime = 10004, [ParentCombo(NIN_ST_AdvancedMode)] - [CustomComboInfo("Mug Option", "Adds Mug to Advanced Mode.", NIN.JobID)] + [CustomComboInfo("Mug/Dokumori Option", "Adds Mug/Dokumori to Advanced Mode.", NIN.JobID)] NIN_ST_AdvancedMode_Mug = 10005, [ConflictingCombos(NIN_ST_AdvancedMode_Mug_AlignBefore)] [ParentCombo(NIN_ST_AdvancedMode_Mug)] - [CustomComboInfo("Align Mug with Trick Attack Option", "Only uses Mug whilst the target has Trick Attack, otherwise will use on cooldown.", NIN.JobID)] + [CustomComboInfo("Align Mug with Trick Attack/Kunai's Bane Option", "Only uses Mug whilst the target has Trick Attack/Kunai's Bane, otherwise will use on cooldown.", NIN.JobID)] NIN_ST_AdvancedMode_Mug_AlignAfter = 10006, [ConflictingCombos(NIN_ST_AdvancedMode_Mug_AlignAfter)] [ParentCombo(NIN_ST_AdvancedMode_Mug)] - [CustomComboInfo("Use Mug before Trick Attack Option", "Aligns Mug with Trick Attack but weaves it at least 1 GCD before Trick Attack.", NIN.JobID)] + [CustomComboInfo("Use Mug before Trick Attack/Kunai's Bane Option", "Aligns Mug with Trick Attack/Kunai's Bane but weaves it at least 1 GCD before Trick Attack/Kunai's Bane.", NIN.JobID)] NIN_ST_AdvancedMode_Mug_AlignBefore = 10007, [ParentCombo(NIN_ST_AdvancedMode)] - [CustomComboInfo("Trick Attack Option", "Adds Trick Attack to Advanced Mode.", NIN.JobID)] //Has Config + [CustomComboInfo("Trick Attack/Kunai's Bane Option", "Adds Trick Attack/Kunai's Bane to Advanced Mode.", NIN.JobID)] //Has Config NIN_ST_AdvancedMode_TrickAttack = 10008, [ParentCombo(NIN_ST_AdvancedMode_TrickAttack)] - [CustomComboInfo("Save Cooldowns Before Trick Attack Option", "Stops using abilities with longer cooldowns up to 15 seconds before Trick Attack comes off cooldown.", NIN.JobID)] //HasConfig + [CustomComboInfo("Save Cooldowns Before Trick Attack/Kunai's Bane Option", "Stops using abilities with longer cooldowns up to 15 seconds before Trick Attack/Kunai's Bane comes off cooldown.", NIN.JobID)] //HasConfig NIN_ST_AdvancedMode_TrickAttack_Cooldowns = 10009, [ParentCombo(NIN_ST_AdvancedMode_TrickAttack)] - [CustomComboInfo("Delayed Trick Attack Option", "Waits at least 8 seconds into combat before using Trick Attack.", NIN.JobID)] + [CustomComboInfo("Delayed Trick Attack/Kunai's Bane Option", "Waits at least 8 seconds into combat before using Trick Attack/Kunai's Bane.", NIN.JobID)] NIN_ST_AdvancedMode_TrickAttack_Delayed = 10010, [ParentCombo(NIN_ST_AdvancedMode)] @@ -2117,15 +2117,10 @@ public enum CustomComboPreset [CustomComboInfo("Use Suiton", "Spends Mudra charges on Suiton.", NIN.JobID)] NIN_ST_AdvancedMode_Ninjitsus_Suiton = 10015, - [ParentCombo(NIN_ST_AdvancedMode_Ninjitsus)] - [CustomComboInfo("Use Huton", "Spends Mudra charges on Huton.", NIN.JobID)] - NIN_ST_AdvancedMode_Ninjitsus_Huton = 10016, - [ParentCombo(NIN_ST_AdvancedMode)] [CustomComboInfo("Assassinate/Dream Within a Dream Option", "Adds Assassinate and Dream Within a Dream to Advanced Mode.", NIN.JobID)] NIN_ST_AdvancedMode_AssassinateDWAD = 10017, - [ConflictingCombos(NIN_KassatsuTrick, NIN_KassatsuChiJin)] [ParentCombo(NIN_ST_AdvancedMode)] [CustomComboInfo("Kassatsu Option", "Adds Kassatsu to Advanced Mode.", NIN.JobID)] NIN_ST_AdvancedMode_Kassatsu = 10018, @@ -2134,14 +2129,6 @@ public enum CustomComboPreset [CustomComboInfo($"Use Hyosho Ranryu Option", "Spends Kassatsu on Hyosho Ranryu.", NIN.JobID)] NIN_ST_AdvancedMode_Kassatsu_HyoshoRaynryu = 10019, - [ParentCombo(NIN_ST_AdvancedMode)] - [CustomComboInfo("Armor Crush Option", "Adds Armor Crush to Advanced Mode.", NIN.JobID)] //Has Config - NIN_ST_AdvancedMode_ArmorCrush = 10020, - - [ParentCombo(NIN_ST_AdvancedMode)] - [CustomComboInfo("Huraijin Option", "Adds Huraijin to Advanced Mode.", NIN.JobID)] - NIN_ST_AdvancedMode_Huraijin = 10021, - [ParentCombo(NIN_ST_AdvancedMode)] [CustomComboInfo("Bhavacakra Option", "Adds Bhavacakra to Advanced Mode.", NIN.JobID)] //Has Config NIN_ST_AdvancedMode_Bhavacakra = 10022, @@ -2150,6 +2137,10 @@ public enum CustomComboPreset [CustomComboInfo("Ten Chi Jin Option", "Adds Ten Chi Jin (the cooldown) to Advanced Mode.", NIN.JobID)] NIN_ST_AdvancedMode_TCJ = 10023, + [ParentCombo(NIN_ST_AdvancedMode)] + [CustomComboInfo("Tenri Jindo Option", "Adds Tenri Jindo to Advanced Mode.", NIN.JobID)] + NIN_ST_AdvancedMode_TenriJindo = 10071, + [ParentCombo(NIN_ST_AdvancedMode)] [CustomComboInfo("Meisui Option", "Adds Meisui to Advanced Mode.", NIN.JobID)] NIN_ST_AdvancedMode_Meisui = 10024, @@ -2170,7 +2161,6 @@ public enum CustomComboPreset [CustomComboInfo("Forked Raiju Gap-Closer Option", "Uses Forked Raiju when out of range.", NIN.JobID)] NIN_ST_AdvancedMode_Raiju_Forked = 10028, - [ConflictingCombos(NIN_KassatsuChiJin, NIN_KassatsuTrick)] [ParentCombo(NIN_ST_AdvancedMode)] [CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nDoes pre-pull first, if you enter combat before hiding the opener will fail.\nLikewise, moving during TCJ will cause the opener to fail too.\nRequires you to be out of combat with majority of your cooldowns available for it to work.", NIN.JobID)] NIN_ST_AdvancedMode_BalanceOpener = 10029, @@ -2200,6 +2190,10 @@ public enum CustomComboPreset [CustomComboInfo("Advanced Mode - AoE", "Replace Death Blossom with a one-button full AoE rotation.\nThese features are ideal if you want to customize the rotation.", NIN.JobID)] NIN_AoE_AdvancedMode = 10035, + [ParentCombo(NIN_AoE_AdvancedMode)] + [CustomComboInfo("Kunai's Bane Option", "Adds Kunai's Bane to Advanced Mode. (Does not add Trick Attack)", NIN.JobID)] + NIN_AoE_AdvancedMode_KunaisBane = 10073, + [ParentCombo(NIN_AoE_AdvancedMode)] [CustomComboInfo("Assassinate/Dream Within a Dream Option", "Adds Assassinate/Dream Within a Dream to Advanced Mode.", NIN.JobID)] NIN_AoE_AdvancedMode_AssassinateDWAD = 10036, @@ -2224,7 +2218,6 @@ public enum CustomComboPreset [CustomComboInfo("Use Huton", "Spends Mudra charges on Huton.", NIN.JobID)] NIN_AoE_AdvancedMode_Ninjitsus_Huton = 10041, - [ConflictingCombos(NIN_KassatsuTrick, NIN_KassatsuChiJin)] [ParentCombo(NIN_AoE_AdvancedMode)] [CustomComboInfo("Kassatsu Option", "Adds Kassatsu to Advanced Mode.", NIN.JobID)] NIN_AoE_AdvancedMode_Kassatsu = 10042, @@ -2233,10 +2226,6 @@ public enum CustomComboPreset [CustomComboInfo("Goka Mekkyaku Option", "Adds Goka Mekkyaku to Advanced Mode.", NIN.JobID)] NIN_AoE_AdvancedMode_GokaMekkyaku = 10043, - [ParentCombo(NIN_AoE_AdvancedMode)] - [CustomComboInfo("Huraijin Option", "Adds Huraijin to Advanced Mode.", NIN.JobID)] - NIN_AoE_AdvancedMode_Huraijin = 10044, - [ParentCombo(NIN_AoE_AdvancedMode)] [CustomComboInfo("Hellfrog Medium Option", "Adds Hellfrog Medium to Advanced Mode.", NIN.JobID)] NIN_AoE_AdvancedMode_HellfrogMedium = 10045, @@ -2245,6 +2234,10 @@ public enum CustomComboPreset [CustomComboInfo("Ten Chi Jin Option", "Adds Ten Chi Jin (the cooldown) to Advanced Mode.", NIN.JobID)] NIN_AoE_AdvancedMode_TCJ = 10046, + [ParentCombo(NIN_AoE_AdvancedMode)] + [CustomComboInfo("Tenri Jindo Option", "Adds Tenri Jindo to Advanced Mode.", NIN.JobID)] + NIN_AoE_AdvancedMode_TenriJindo = 10072, + [ParentCombo(NIN_AoE_AdvancedMode)] [CustomComboInfo("Meisui Option", "Adds Meisui to Advanced Mode.", NIN.JobID)] NIN_AoE_AdvancedMode_Meisui = 10047, @@ -2270,26 +2263,23 @@ public enum CustomComboPreset NIN_AoE_AdvancedMode_Bloodbath = 10052, [ReplaceSkill(NIN.ArmorCrush)] - [ConflictingCombos(NIN_ST_SimpleMode)] [CustomComboInfo("Armor Crush Combo Feature", "Replace Armor Crush with its combo chain.", NIN.JobID)] NIN_ArmorCrushCombo = 10053, - [ConflictingCombos(NIN_ST_AdvancedMode_BalanceOpener, NIN_ST_AdvancedMode_BalanceOpener, NIN_ST_AdvancedMode_Kassatsu, NIN_AoE_AdvancedMode_Kassatsu, NIN_KassatsuChiJin)] [ReplaceSkill(NIN.Kassatsu)] - [CustomComboInfo("Kassatsu to Trick Feature", "Replaces Kassatsu with Trick Attack while Suiton or Hidden is up.\nCooldown tracking plugin recommended.", NIN.JobID)] + [CustomComboInfo("Kassatsu to Trick Feature", "Replaces Kassatsu with Trick Attack/Kunai's Bane while Suiton or Hidden is up.\nCooldown tracking plugin recommended.", NIN.JobID)] NIN_KassatsuTrick = 10054, [ReplaceSkill(NIN.TenChiJin)] [CustomComboInfo("Ten Chi Jin to Meisui Feature", "Replaces Ten Chi Jin (the move) with Meisui while Suiton is up.\nCooldown tracking plugin recommended.", NIN.JobID)] NIN_TCJMeisui = 10055, - [ConflictingCombos(NIN_ST_AdvancedMode_BalanceOpener, NIN_ST_AdvancedMode_BalanceOpener, NIN_KassatsuTrick, NIN_ST_AdvancedMode_Kassatsu, NIN_AoE_AdvancedMode_Kassatsu)] [ReplaceSkill(NIN.Chi)] [CustomComboInfo("Kassatsu Chi/Jin Feature", "Replaces Chi with Jin while Kassatsu is up if you have Enhanced Kassatsu.", NIN.JobID)] NIN_KassatsuChiJin = 10056, [ReplaceSkill(NIN.Hide)] - [CustomComboInfo("Hide to Mug/Trick Attack Feature", "Replaces Hide with Mug while in combat and Trick Attack whilst Hidden.", NIN.JobID)] + [CustomComboInfo("Hide to Mug/Trick Attack/Kunai's Bane Feature", "Replaces Hide with Mug while in combat and Trick Attack/Kunai's Bane whilst Hidden.", NIN.JobID)] NIN_HideMug = 10057, [ReplaceSkill(NIN.Ten, NIN.Chi, NIN.Jin)] diff --git a/XIVSlothCombo/Combos/JobHelpers/AST.cs b/XIVSlothCombo/Combos/JobHelpers/AST.cs index f2ffd6673..a3610c642 100644 --- a/XIVSlothCombo/Combos/JobHelpers/AST.cs +++ b/XIVSlothCombo/Combos/JobHelpers/AST.cs @@ -1,7 +1,9 @@ -using Dalamud.Game.ClientState.JobGauge.Enums; + using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Plugin.Services; using ECommons.DalamudServices; +using ECommons.GameFunctions; +using ECommons.ExcelServices; using System.Collections.Generic; using System.Linq; using XIVSlothCombo.CustomComboNS.Functions; @@ -52,11 +54,16 @@ private static bool BetterTargetAvailable() CustomComboFunctions.OutOfRange(Balance, AST_QuickTargetCards.SelectedRandomMember)) return true; - Svc.Log.Debug($"Picking better?"); + var m = AST_QuickTargetCards.SelectedRandomMember as IBattleChara; + if ((DrawnCard is CardType.BALANCE && CustomComboFunctions.JobIDs.Melee.Any(x => x == m.ClassJob.Id)) || + (DrawnCard is CardType.SPEAR && CustomComboFunctions.JobIDs.Ranged.Any(x => x == m.ClassJob.Id))) + return false; + var targets = new List(); for (int i = 1; i <= 8; i++) //Checking all 8 available slots and skipping nulls & DCs { if (CustomComboFunctions.GetPartySlot(i) is not IBattleChara member) continue; + if (member.GameObjectId == AST_QuickTargetCards.SelectedRandomMember.GameObjectId) continue; if (member is null) continue; //Skip nulls/disconnected people if (member.IsDead) continue; if (CustomComboFunctions.OutOfRange(Balance, member)) continue; @@ -67,13 +74,18 @@ private static bool BetterTargetAvailable() if (Config.AST_QuickTarget_SkipDamageDown && CustomComboFunctions.TargetHasDamageDown(member)) continue; if (Config.AST_QuickTarget_SkipRezWeakness && CustomComboFunctions.TargetHasRezWeakness(member)) continue; + if (member.GetRole() is CombatRole.Healer or CombatRole.Tank) continue; + targets.Add(member); } if (targets.Count == 0) return false; if ((DrawnCard is CardType.BALANCE && targets.Any(x => CustomComboFunctions.JobIDs.Melee.Any(y => y == x.ClassJob.Id))) || (DrawnCard is CardType.SPEAR && targets.Any(x => CustomComboFunctions.JobIDs.Ranged.Any(y => y == x.ClassJob.Id)))) + { + AST_QuickTargetCards.SelectedRandomMember = null; return true; + } return false; @@ -97,6 +109,7 @@ public static void Invoke() } else { + Svc.Log.Debug($"Setting card to {LocalPlayer.Name}"); SelectedRandomMember = LocalPlayer; } } diff --git a/XIVSlothCombo/Combos/JobHelpers/NIN.cs b/XIVSlothCombo/Combos/JobHelpers/NIN.cs index f2db8eb4e..20ef44c43 100644 --- a/XIVSlothCombo/Combos/JobHelpers/NIN.cs +++ b/XIVSlothCombo/Combos/JobHelpers/NIN.cs @@ -25,6 +25,13 @@ private static bool TargetHasMugDebuff() { return CustomComboFunctions.TargetHasEffect(Debuffs.Mug) || CustomComboFunctions.TargetHasEffect(Debuffs.KunaisBane); } + + internal static bool InMudra => GetInMudra(); + + private static bool GetInMudra() + { + return !CustomComboFunctions.IsOriginal(Ninjutsu); + } } internal class MudraCasting : PvE.NIN @@ -449,11 +456,11 @@ private static bool HasCooldowns() return true; } - private static uint OpenerLevel => 90; + private static uint OpenerLevel => 100; public uint PrePullStep = 1; - public uint OpenerStep = 1; + private uint openerStep = 1; public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; @@ -480,6 +487,18 @@ public OpenerState CurrentState } } + public uint OpenerStep + { + get => openerStep; set + { + if (value != openerStep) + { + Svc.Log.Debug($"{value}"); + } + openerStep = value; + } + } + private bool DoPrePullSteps(ref uint actionID, MudraCasting mudraState) { if (!LevelChecked) return false; @@ -488,24 +507,11 @@ private bool DoPrePullSteps(ref uint actionID, MudraCasting mudraState) if (CurrentState == OpenerState.PrePull) { - if (ActionWatching.TimeSinceLastAction.TotalSeconds > 5 && !CustomComboFunctions.InCombat()) - { - mudraState.CastHuton(ref actionID); - PrePullStep = 1; - return true; - } - - if (CustomComboFunctions.WasLastAction(Huton) && PrePullStep == 1) PrePullStep++; - else if (PrePullStep == 1) mudraState.CastHuton(ref actionID); - - if (CustomComboFunctions.WasLastAction(Hide) && PrePullStep == 2) PrePullStep++; - else if (PrePullStep == 2) { actionID = CustomComboFunctions.OriginalHook(Hide); } + if (CustomComboFunctions.WasLastAction(Suiton) && PrePullStep == 1) CurrentState = OpenerState.InOpener; + else if (PrePullStep == 1) mudraState.CastSuiton(ref actionID); - if (CustomComboFunctions.WasLastAction(Suiton) && PrePullStep == 3) CurrentState = OpenerState.InOpener; - else if (PrePullStep == 3) mudraState.CastSuiton(ref actionID); - - //Failure states - if (PrePullStep is (1 or 2) && CustomComboFunctions.InCombat()) { mudraState.CurrentMudra = MudraCasting.MudraState.None; ResetOpener(); } + ////Failure states + //if (PrePullStep is (1 or 2) && CustomComboFunctions.InCombat()) { mudraState.CurrentMudra = MudraCasting.MudraState.None; ResetOpener(); } return true; @@ -532,7 +538,7 @@ private bool DoOpener(ref uint actionID, MudraCasting mudraState) if (CustomComboFunctions.WasLastAction(GustSlash) && OpenerStep == 3) OpenerStep++; else if (OpenerStep == 3) actionID = CustomComboFunctions.OriginalHook(GustSlash); - if (CustomComboFunctions.WasLastAction(Mug) && OpenerStep == 4) OpenerStep++; + if (CustomComboFunctions.WasLastAction(CustomComboFunctions.OriginalHook(Mug)) && OpenerStep == 4) OpenerStep++; else if (OpenerStep == 4) actionID = CustomComboFunctions.OriginalHook(Mug); if (CustomComboFunctions.WasLastAction(Bunshin) && OpenerStep == 5) OpenerStep++; @@ -541,17 +547,17 @@ private bool DoOpener(ref uint actionID, MudraCasting mudraState) if (CustomComboFunctions.WasLastAction(PhantomKamaitachi) && OpenerStep == 6) OpenerStep++; else if (OpenerStep == 6) actionID = CustomComboFunctions.OriginalHook(PhantomKamaitachi); - if (CustomComboFunctions.WasLastAction(TrickAttack) && OpenerStep == 7) OpenerStep++; - else if (OpenerStep == 7 && inLateWeaveWindow) actionID = CustomComboFunctions.OriginalHook(TrickAttack); + if (CustomComboFunctions.WasLastAction(ArmorCrush) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = CustomComboFunctions.OriginalHook(ArmorCrush); - if (CustomComboFunctions.WasLastAction(AeolianEdge) && OpenerStep == 8) OpenerStep++; - else if (OpenerStep == 8) actionID = CustomComboFunctions.OriginalHook(AeolianEdge); + if (CustomComboFunctions.WasLastAction(CustomComboFunctions.OriginalHook(TrickAttack)) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8 && inLateWeaveWindow) actionID = CustomComboFunctions.OriginalHook(TrickAttack); - if (CustomComboFunctions.WasLastAction(DreamWithinADream) && OpenerStep == 9) OpenerStep++; - else if (OpenerStep == 9) actionID = CustomComboFunctions.OriginalHook(DreamWithinADream); + if (CustomComboFunctions.WasLastAction(HyoshoRanryu) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) mudraState.CastHyoshoRanryu(ref actionID); - if (CustomComboFunctions.WasLastAction(HyoshoRanryu) && OpenerStep == 10) OpenerStep++; - else if (OpenerStep == 10) mudraState.CastHyoshoRanryu(ref actionID); + if (CustomComboFunctions.WasLastAction(DreamWithinADream) && OpenerStep == 10) OpenerStep++; + else if (OpenerStep == 10) actionID = CustomComboFunctions.OriginalHook(DreamWithinADream); if (CustomComboFunctions.WasLastAction(Raiton) && OpenerStep == 11) OpenerStep++; else if (OpenerStep == 11) mudraState.CastRaiton(ref actionID); @@ -574,22 +580,31 @@ private bool DoOpener(ref uint actionID, MudraCasting mudraState) if (CustomComboFunctions.WasLastAction(FleetingRaiju) && OpenerStep == 17) OpenerStep++; else if (OpenerStep == 17) actionID = CustomComboFunctions.OriginalHook(FleetingRaiju); - if (CustomComboFunctions.WasLastAction(Bhavacakra) && OpenerStep == 18) OpenerStep++; + if (CustomComboFunctions.WasLastAction(ZeshoMeppo) && OpenerStep == 18) OpenerStep++; else if (OpenerStep == 18) actionID = CustomComboFunctions.OriginalHook(Bhavacakra); - if (CustomComboFunctions.WasLastAction(FleetingRaiju) && OpenerStep == 19) OpenerStep++; - else if (OpenerStep == 19) actionID = CustomComboFunctions.OriginalHook(FleetingRaiju); + if (CustomComboFunctions.WasLastAction(TenriJendo) && OpenerStep == 19) OpenerStep++; + else if (OpenerStep == 19) actionID = CustomComboFunctions.OriginalHook(TenriJendo); + + if (CustomComboFunctions.WasLastAction(FleetingRaiju) && OpenerStep == 20) OpenerStep++; + else if (OpenerStep == 20) actionID = CustomComboFunctions.OriginalHook(FleetingRaiju); + + if (CustomComboFunctions.WasLastAction(CustomComboFunctions.OriginalHook(Bhavacakra)) && OpenerStep == 21) OpenerStep++; + else if (OpenerStep == 21) actionID = CustomComboFunctions.OriginalHook(Bhavacakra); + + if (CustomComboFunctions.WasLastAction(Raiton) && OpenerStep == 22) OpenerStep++; + else if (OpenerStep == 22) mudraState.CastRaiton(ref actionID); - if (CustomComboFunctions.WasLastAction(Bhavacakra) && OpenerStep == 20) CurrentState = OpenerState.OpenerFinished; - else if (OpenerStep == 20) actionID = CustomComboFunctions.OriginalHook(Bhavacakra); + if (CustomComboFunctions.WasLastAction(FleetingRaiju) && OpenerStep == 23) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == 23) actionID = CustomComboFunctions.OriginalHook(FleetingRaiju); //Failure states if ((OpenerStep is 13 or 14 or 15 && CustomComboFunctions.IsMoving) || - (OpenerStep is 7 && !CustomComboFunctions.HasEffect(Buffs.ShadowWalker)) || - (OpenerStep is 18 or 20 && CustomComboFunctions.GetJobGauge().Ninki < 45) || - (OpenerStep is 17 or 19 && !CustomComboFunctions.HasEffect(Buffs.RaijuReady)) || - (OpenerStep is 10 && !CustomComboFunctions.HasEffect(Buffs.Kassatsu))) + (OpenerStep is 8 && !CustomComboFunctions.HasEffect(Buffs.ShadowWalker)) || + (OpenerStep is 18 or 21 && CustomComboFunctions.GetJobGauge().Ninki < 40) || + (OpenerStep is 17 or 20 && !CustomComboFunctions.HasEffect(Buffs.RaijuReady)) || + (OpenerStep is 9 && !CustomComboFunctions.HasEffect(Buffs.Kassatsu))) ResetOpener(); diff --git a/XIVSlothCombo/Combos/PvE/AST.cs b/XIVSlothCombo/Combos/PvE/AST.cs index dedd0994c..89bb2d78c 100644 --- a/XIVSlothCombo/Combos/PvE/AST.cs +++ b/XIVSlothCombo/Combos/PvE/AST.cs @@ -30,6 +30,7 @@ internal const uint //Cards AstralDraw = 37017, + UmbralDraw = 37018, Play1 = 37019, Play2 = 37020, Play3 = 37021, diff --git a/XIVSlothCombo/Combos/PvE/NIN.cs b/XIVSlothCombo/Combos/PvE/NIN.cs index 15f92b9f4..ac7b42bd3 100644 --- a/XIVSlothCombo/Combos/PvE/NIN.cs +++ b/XIVSlothCombo/Combos/PvE/NIN.cs @@ -1,6 +1,7 @@ using Dalamud.Game.ClientState.JobGauge.Types; using Dalamud.Game.ClientState.Statuses; using ECommons.DalamudServices; +using System; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; @@ -41,6 +42,7 @@ public const uint HollowNozuchi = 25776, TenriJendo = 36961, KunaisBane = 36958, + ZeshoMeppo = 36960, //Mudras Ninjutsu = 2260, @@ -116,9 +118,6 @@ public static class Config { public const string Trick_CooldownRemaining = "Trick_CooldownRemaining", - Huton_RemainingHuraijinST = "Huton_RemainingHuraijinST", - Huton_RemainingHuraijinAoE = "Huton_RemainingHuraijinAoE", - Huton_RemainingArmorCrush = "Huton_RemainingArmorCrush", Mug_NinkiGauge = "Mug_NinkiGauge", Ninki_BhavaPooling = "Ninki_BhavaPooling", Ninki_HellfrogPooling = "Ninki_HellfrogPooling", @@ -126,7 +125,6 @@ public const string Ninki_BunshinPoolingST = "Ninki_BunshinPoolingST", Ninki_BunshinPoolingAoE = "Ninki_BunshinPoolingAoE", Advanced_Trick_Cooldown = "Advanced_Trick_Cooldown", - Advanced_DoubleArmorCrush = "Advanced_DoubleArmorCrush", Advanced_DotonTimer = "Advanced_DotonTimer", Advanced_DotonHP = "Advanced_DotonHP", Advanced_TCJEnderAoE = "Advanced_TCJEnderAoe", @@ -157,25 +155,20 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var canDelayedWeave = CanDelayedWeave(SpinningEdge); bool inTrickBurstSaveWindow = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack_Cooldowns) && IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack) && GetCooldownRemainingTime(TrickAttack) <= GetOptionValue(Config.Advanced_Trick_Cooldown); bool useBhakaBeforeTrickWindow = GetCooldownRemainingTime(TrickAttack) >= 3; - bool inMudraState = HasEffect(Buffs.Mudra); - bool setupSuitonWindow = GetCooldownRemainingTime(TrickAttack) <= GetOptionValue(Config.Trick_CooldownRemaining) && !HasEffect(Buffs.ShadowWalker); + bool setupSuitonWindow = GetCooldownRemainingTime(OriginalHook(TrickAttack) ) <= GetOptionValue(Config.Trick_CooldownRemaining) && !HasEffect(Buffs.ShadowWalker); bool setupKassatsuWindow = GetCooldownRemainingTime(TrickAttack) <= 10 && HasEffect(Buffs.ShadowWalker); bool chargeCheck = IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_ChargeHold) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_ChargeHold) && (GetRemainingCharges(Ten) == 2 || (GetRemainingCharges(Ten) == 1 && GetCooldownChargeRemainingTime(Ten) < 3))); - bool doubleArmorCrush = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_ArmorCrush) && PluginConfiguration.GetCustomBoolValue(Config.Advanced_DoubleArmorCrush) && GetOptionValue(Config.Huton_RemainingArmorCrush) <= 12; bool poolCharges = !GetOptionBool(Config.Advanced_ChargePool) || (GetRemainingCharges(Ten) == 1 && GetCooldownChargeRemainingTime(Ten) < 2) || NINHelper.TrickDebuff; bool raitonUptime = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Raiton_Uptime); bool suitonUptime = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Suiton_Uptime); - int timesLastEnderWasArmorCrush = ActionWatching.HowManyTimesUsedAfterAnotherAction(ArmorCrush, AeolianEdge); - bool inTNWithDoubleArmorCrush = doubleArmorCrush && HasEffect(All.Buffs.TrueNorth) && timesLastEnderWasArmorCrush == 1; - int hutonHuraijinTimer = GetOptionValue(Config.Huton_RemainingHuraijinST) * 1000; int bhavaPool = GetOptionValue(Config.Ninki_BhavaPooling); - int hutonArmorCrushTimer = GetOptionValue(Config.Huton_RemainingArmorCrush) * 1000; int bunshinPool = GetOptionValue(Config.Ninki_BunshinPoolingST); int SecondWindThreshold = PluginConfiguration.GetCustomIntValue(Config.SecondWindThresholdST); int ShadeShiftThreshold = PluginConfiguration.GetCustomIntValue(Config.ShadeShiftThresholdST); int BloodbathThreshold = PluginConfiguration.GetCustomIntValue(Config.BloodbathThresholdST); double playerHP = PlayerHealthPercentageHp(); bool phantomUptime = IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Phantom_Uptime); + var comboLength = GetCooldown(GustSlash).CooldownTotal * 3; if (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus) || (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5 && !InCombat())) mudraState.CurrentMudra = MudraCasting.MudraState.None; @@ -244,14 +237,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(ThrowingDaggers); } - if (canWeave && !inMudraState) + if (canWeave && !NINHelper.InMudra) { if (IsEnabled(CustomComboPreset.NIN_Variant_Rampart) && IsEnabled(Variant.VariantRampart) && IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug_AlignBefore) && + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && + IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug_AlignBefore) && HasEffect(Buffs.ShadowWalker) && GetCooldownRemainingTime(TrickAttack) <= 3 && ((IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack_Delayed) && InCombat() && combatDuration.TotalSeconds > 6) || @@ -267,6 +261,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack_Delayed))) return OriginalHook(TrickAttack); + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TenriJindo) && HasEffect(Buffs.TenriJendo) && ((NINHelper.TrickDebuff && NINHelper.MugDebuff) || GetBuffRemainingTime(Buffs.TenriJendo) <= 3)) + return OriginalHook(TenriJendo); + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Bunshin) && Bunshin.LevelChecked() && IsOffCooldown(Bunshin) && gauge.Ninki >= bunshinPool) return OriginalHook(Bunshin); @@ -289,7 +286,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim Bhavacakra.LevelChecked()) return OriginalHook(Bhavacakra); - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Bhavacakra) && ((NINHelper.TrickDebuff && gauge.Ninki >= 50) || (useBhakaBeforeTrickWindow && gauge.Ninki >= 60)) && (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOnCooldown(Mug))) && @@ -344,57 +340,35 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim PhantomKamaitachi.LevelChecked()) return OriginalHook(PhantomKamaitachi); - if (!inTNWithDoubleArmorCrush) - { - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Kassatsu_HyoshoRaynryu) && - !inTrickBurstSaveWindow && - (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOnCooldown(Mug))) && - mudraState.CastHyoshoRanryu(ref actionID)) - return actionID; - - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus)) - { - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_Suiton) && - setupSuitonWindow && - TrickAttack.LevelChecked() && - !HasEffect(Buffs.ShadowWalker) && - chargeCheck && - mudraState.CastSuiton(ref actionID)) - return actionID; - - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_Raiton) && - !inTrickBurstSaveWindow && - chargeCheck && - poolCharges && - mudraState.CastRaiton(ref actionID)) - return actionID; - - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_FumaShuriken) && - !Raiton.LevelChecked() && - chargeCheck && - mudraState.CastFumaShuriken(ref actionID)) - return actionID; - } - } + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Kassatsu_HyoshoRaynryu) && + !inTrickBurstSaveWindow && + (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOnCooldown(Mug))) && + mudraState.CastHyoshoRanryu(ref actionID)) + return actionID; - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_ArmorCrush) && - !HasEffect(Buffs.RaijuReady) && - lastComboMove == GustSlash && - (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack) && IsOnCooldown(TrickAttack) || - IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack)) && - (doubleArmorCrush && timesLastEnderWasArmorCrush == 1) && - ArmorCrush.LevelChecked() && - comboTime > 1f) + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus)) { - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrueNorth) && - GetRemainingCharges(All.TrueNorth) > 0 && - All.TrueNorth.LevelChecked() && !HasEffect(All.Buffs.TrueNorth) && - !(IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrueNorth_ArmorCrush_Dynamic) && TargetNeedsPositionals() && OnTargetsFlank()) && - canDelayedWeave) - return OriginalHook(All.TrueNorth); + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_Suiton) && + setupSuitonWindow && + TrickAttack.LevelChecked() && + !HasEffect(Buffs.ShadowWalker) && + chargeCheck && + mudraState.CastSuiton(ref actionID)) + return actionID; - return OriginalHook(ArmorCrush); + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_Raiton) && + !inTrickBurstSaveWindow && + chargeCheck && + poolCharges && + mudraState.CastRaiton(ref actionID)) + return actionID; + + if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_FumaShuriken) && + !Raiton.LevelChecked() && + chargeCheck && + mudraState.CastFumaShuriken(ref actionID)) + return actionID; } if (comboTime > 1f) @@ -409,7 +383,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim canWeave) return OriginalHook(All.TrueNorth); - if (lastComboMove == GustSlash && AeolianEdge.LevelChecked()) + if (lastComboMove == GustSlash && ArmorCrush.LevelChecked()) + { + if ((!NINHelper.MugDebuff) || (NINHelper.MugDebuff && gauge.Kazematoi == 0)) + { + if (gauge.Kazematoi < 4) + return OriginalHook(ArmorCrush); + } + } + + if (lastComboMove == GustSlash && AeolianEdge.LevelChecked() && (gauge.Kazematoi > 0 || !ArmorCrush.LevelChecked())) return OriginalHook(AeolianEdge); } @@ -435,7 +418,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool chargeCheck = IsNotEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Ninjitsus_ChargeHold) || (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Ninjitsus_ChargeHold) && GetRemainingCharges(Ten) == 2); bool inMudraState = HasEffect(Buffs.Mudra); int hellfrogPool = GetOptionValue(Config.Ninki_HellfrogPooling); - int hutonHuraijinTimer = GetOptionValue(Config.Huton_RemainingHuraijinAoE) * 1000; int dotonTimer = GetOptionValue(Config.Advanced_DotonTimer); int dotonThreshold = GetOptionValue(Config.Advanced_DotonHP); int tcjPath = GetOptionValue(Config.Advanced_TCJEnderAoE); @@ -468,6 +450,18 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } + if (JustUsed(Kassatsu, 0.5f)) + mudraState.CurrentMudra = MudraCasting.MudraState.None; + + if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_KunaisBane)) + { + if (!HasEffect(Buffs.ShadowWalker) && KunaisBane.LevelChecked() && GetCooldownRemainingTime(KunaisBane) < 5 && mudraState.CastHuton(ref actionID)) + return actionID; + + if (HasEffect(Buffs.ShadowWalker) && KunaisBane.LevelChecked() && IsOffCooldown(KunaisBane) && canWeave) + return KunaisBane; + } + if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_GokaMekkyaku) && HasEffect(Buffs.Kassatsu)) mudraState.CurrentMudra = MudraCasting.MudraState.CastingGokaMekkyaku; @@ -487,6 +481,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; + if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_TenriJindo) && HasEffect(Buffs.TenriJendo)) + return OriginalHook(TenriJendo); + if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Bunshin) && Bunshin.LevelChecked() && IsOffCooldown(Bunshin) && gauge.Ninki >= bunshingPool) return OriginalHook(Bunshin); @@ -595,7 +592,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool canWeave = CanWeave(SpinningEdge); bool inTrickBurstSaveWindow = GetCooldownRemainingTime(TrickAttack) <= 15 && Suiton.LevelChecked(); bool useBhakaBeforeTrickWindow = GetCooldownRemainingTime(TrickAttack) >= 3; - bool inMudraState = HasEffect(Buffs.Mudra); if (OriginalHook(Ninjutsu) is Rabbit) return OriginalHook(Ninjutsu); @@ -610,7 +606,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(Ten); } - if (mudraState.CurrentMudra != MudraCasting.MudraState.None) + if (NINHelper.InMudra) { if (mudraState.ContinueCurrentMudra(ref actionID)) return actionID; @@ -632,7 +628,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } - if (canWeave && !inMudraState) + if (canWeave && !NINHelper.InMudra) { if (IsEnabled(CustomComboPreset.NIN_Variant_Rampart) && IsEnabled(Variant.VariantRampart) && @@ -692,7 +688,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove == GustSlash && TargetNeedsPositionals() && GetRemainingCharges(All.TrueNorth) > 0 && All.TrueNorth.LevelChecked() && !HasEffect(All.Buffs.TrueNorth) && canWeave) return OriginalHook(All.TrueNorth); - if (lastComboMove == GustSlash && AeolianEdge.LevelChecked() && gauge.Kazematoi > 0) + if (lastComboMove == GustSlash && AeolianEdge.LevelChecked() && (gauge.Kazematoi > 0 || !ArmorCrush.LevelChecked())) return OriginalHook(AeolianEdge); if (lastComboMove == GustSlash && ArmorCrush.LevelChecked() && gauge.Kazematoi < 5) @@ -720,7 +716,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var dotonBuff = FindEffect(Buffs.Doton); var gauge = GetJobGauge(); var canWeave = CanWeave(GustSlash); - bool inMudra = WasLastAction(Ten) || WasLastAction(Chi) || WasLastAction(Jin); if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5 && !InCombat()) mudraState.CurrentMudra = MudraCasting.MudraState.None; @@ -738,7 +733,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (JustUsed(Kassatsu, 0.5f)) mudraState.CurrentMudra = MudraCasting.MudraState.None; - if (mudraState.CurrentMudra != MudraCasting.MudraState.None) + if (NINHelper.InMudra) { if (mudraState.ContinueCurrentMudra(ref actionID)) return actionID; @@ -767,15 +762,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.ShadowWalker) && KunaisBane.LevelChecked() && IsOffCooldown(KunaisBane) && canWeave) return KunaisBane; - //if (GetTargetHPPercent() > 20 && (dotonBuff is null || dotonBuff?.RemainingTime <= 3) && !JustUsed(Doton) && IsOnCooldown(TenChiJin)) - //{ - // if (mudraState.CastDoton(ref actionID)) - // return actionID; - //} - //else if (mudraState.CurrentMudra == MudraCasting.MudraState.CastingDoton) - // mudraState.CurrentMudra = MudraCasting.MudraState.None; + if (GetTargetHPPercent() > 20 && (dotonBuff is null || dotonBuff?.RemainingTime <= GetCooldownChargeRemainingTime(Ten)) && !JustUsed(Doton) && IsOnCooldown(TenChiJin)) + { + if (mudraState.CastDoton(ref actionID)) + return actionID; + } + else if (mudraState.CurrentMudra == MudraCasting.MudraState.CastingDoton) + mudraState.CurrentMudra = MudraCasting.MudraState.None; + - if (canWeave && !inMudra) + if (canWeave && !NINHelper.InMudra) { if (IsEnabled(CustomComboPreset.NIN_Variant_Rampart) && IsEnabled(Variant.VariantRampart) && @@ -786,7 +782,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(TenChiJin); if (HasEffect(Buffs.TenriJendo)) - return TenriJendo; + return TenriJendo; if (IsOffCooldown(Bunshin) && gauge.Ninki >= 50 && Bunshin.LevelChecked()) return OriginalHook(Bunshin); diff --git a/XIVSlothCombo/Window/ConfigWindow.cs b/XIVSlothCombo/Window/ConfigWindow.cs index 834d7e46b..26d2badac 100644 --- a/XIVSlothCombo/Window/ConfigWindow.cs +++ b/XIVSlothCombo/Window/ConfigWindow.cs @@ -125,6 +125,7 @@ public override void Draw() { OpenWindow = OpenWindow.PvE; } + ImGui.Spacing(); if (ImGui.Selectable("PvP Features", OpenWindow == OpenWindow.PvP)) { OpenWindow = OpenWindow.PvP; diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index d33a2869e..da52ef4ad 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1682,17 +1682,6 @@ internal static void Draw(CustomComboPreset preset, bool enabled) UserConfig.DrawRadioButton(NIN.Config.NIN_SimpleMudra_Choice, "Mudra Path Set 2", $"2. Ten Mudras -> Fuma Shuriken, Hyoton/Hyosho Ranryu, Doton.\nChi Mudras -> Fuma Shuriken, Katon, Suiton.\nJin Mudras -> Fuma Shuriken, Raiton/Goka Mekkyaku, Huton (Doton under Kassatsu).", 2); } - if (preset == CustomComboPreset.NIN_ST_AdvancedMode_Huraijin) - UserConfig.DrawSliderInt(0, 60, NIN.Config.Huton_RemainingHuraijinST, "Set the amount of time remaining on Huton the feature should wait before using Huraijin"); - - if (preset == CustomComboPreset.NIN_ST_AdvancedMode_ArmorCrush) - { - UserConfig.DrawSliderInt(0, 30, NIN.Config.Huton_RemainingArmorCrush, "Set the amount of time remaining on Huton the feature should wait before using Armor Crush", hasAdditionalChoice: true, additonalChoiceCondition: "Value set to 12 or less."); - - if (PluginConfiguration.GetCustomIntValue(NIN.Config.Huton_RemainingArmorCrush) <= 12) - UserConfig.DrawAdditionalBoolChoice(NIN.Config.Advanced_DoubleArmorCrush, "Double Armor Crush Feature", "Uses the Armor Crush ender twice before switching back to Aeolian Edge.", isConditionalChoice: true); - } - if (preset == CustomComboPreset.NIN_ST_AdvancedMode_Bhavacakra) UserConfig.DrawSliderInt(50, 100, NIN.Config.Ninki_BhavaPooling, "Set the minimal amount of Ninki required to have before spending on Bhavacakra."); diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 014af90a3..b253b52c0 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -10,6 +10,7 @@ using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Data; using XIVSlothCombo.Services; +using static XIVSlothCombo.Combos.JobHelpers.NIN; using Status = Dalamud.Game.ClientState.Statuses.Status; diff --git a/XIVSlothCombo/Window/TargetHelper.cs b/XIVSlothCombo/Window/TargetHelper.cs index f8d0afe02..d7c1daa48 100644 --- a/XIVSlothCombo/Window/TargetHelper.cs +++ b/XIVSlothCombo/Window/TargetHelper.cs @@ -17,23 +17,25 @@ internal class TargetHelper : Dalamud.Interface.Windowing.Window internal TargetHelper() : base("###SlothComboTargeteHelper", ImGuiWindowFlags.NoBackground | ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.NoBackground | ImGuiWindowFlags.AlwaysUseWindowPadding | ImGuiWindowFlags.AlwaysAutoResize, true) { this.IsOpen = true; + this.RespectCloseHotkey = false; } internal unsafe void DrawTargetHelper() { if (Combos.JobHelpers.AST.AST_QuickTargetCards.SelectedRandomMember is not null) { + IntPtr partyPTR = Svc.GameGui.GetAddonByName("_PartyList", 1); + if (partyPTR == IntPtr.Zero) + return; + + AddonPartyList plist = Marshal.PtrToStructure(partyPTR); + if (!plist.IsVisible) return; + for (int i = 1; i <= 8; i++) { if (CustomComboFunctions.GetPartySlot(i) is null) continue; if (CustomComboFunctions.GetPartySlot(i).GameObjectId == Combos.JobHelpers.AST.AST_QuickTargetCards.SelectedRandomMember.GameObjectId) { - IntPtr partyPTR = Svc.GameGui.GetAddonByName("_PartyList", 1); - if (partyPTR == IntPtr.Zero) - return; - - AddonPartyList plist = Marshal.PtrToStructure(partyPTR); - var member = i switch { 1 => plist.PartyMembers[0].TargetGlow, diff --git a/XIVSlothCombo/XIVSlothCombo.cs b/XIVSlothCombo/XIVSlothCombo.cs index 762799eab..4bb8147a2 100644 --- a/XIVSlothCombo/XIVSlothCombo.cs +++ b/XIVSlothCombo/XIVSlothCombo.cs @@ -80,6 +80,7 @@ public static uint? JobID { if (jobID != value && value != null) { + Combos.JobHelpers.AST.AST_QuickTargetCards.SelectedRandomMember = null; Svc.Log.Debug($"Switched to job {value}"); PvEFeatures.HasToOpenJob = true; } From f5ce9a588370882e1387c4264fd3ad4edbb19a5a Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Fri, 16 Aug 2024 14:16:38 +0100 Subject: [PATCH 104/142] Update side features --- XIVSlothCombo/Combos/PvE/NIN.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/NIN.cs b/XIVSlothCombo/Combos/PvE/NIN.cs index ac7b42bd3..4f04d3195 100644 --- a/XIVSlothCombo/Combos/PvE/NIN.cs +++ b/XIVSlothCombo/Combos/PvE/NIN.cs @@ -833,12 +833,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (comboTime > 0f) { - if (lastComboMove == SpinningEdge && level >= 4) + if (lastComboMove == SpinningEdge && GustSlash.LevelChecked()) { return GustSlash; } - if (lastComboMove == GustSlash && level >= 54) + if (lastComboMove == GustSlash && ArmorCrush.LevelChecked()) { return ArmorCrush; } @@ -860,12 +860,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (HasCondition(Dalamud.Game.ClientState.Conditions.ConditionFlag.InCombat)) { - return Mug; + return OriginalHook(Mug); } if (HasEffect(Buffs.Hidden)) { - return TrickAttack; + return OriginalHook(TrickAttack); } } From d5efa915c46190d8bd6cad2bf1ceaa3e9dfe6c8c Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Fri, 16 Aug 2024 14:36:09 +0100 Subject: [PATCH 105/142] Update descriptions --- XIVSlothCombo/Combos/CustomComboPreset.cs | 4 ++-- XIVSlothCombo/Combos/JobHelpers/NIN.cs | 1 + XIVSlothCombo/Window/Functions/Presets.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 40f4ce370..6c55eb8af 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2054,7 +2054,7 @@ public enum CustomComboPreset NIN_ST_SimpleMode = 10000, [ParentCombo(NIN_ST_SimpleMode)] - [CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nDoes pre-pull first, if you enter combat before hiding the opener will fail.\nLikewise, moving during TCJ will cause the opener to fail too.\nRequires you to be out of combat with majority of your cooldowns available for it to work.", NIN.JobID)] + [CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nRequires level 100, with the following requirements:\n- 2 mudra charges ready\n- Dokumori off cooldown.\n- Kunai's Bane off cooldown.\n- TenChiJin off cooldown.\n- Phantom Kamaitachi off cooldown.\n- Bunshin off cooldown.\n- Dream Within a Dream off cooldown.\n- Kassatsu off cooldown.", NIN.JobID)] NIN_ST_SimpleMode_BalanceOpener = 10001, [ReplaceSkill(NIN.DeathBlossom)] @@ -2162,7 +2162,7 @@ public enum CustomComboPreset NIN_ST_AdvancedMode_Raiju_Forked = 10028, [ParentCombo(NIN_ST_AdvancedMode)] - [CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nDoes pre-pull first, if you enter combat before hiding the opener will fail.\nLikewise, moving during TCJ will cause the opener to fail too.\nRequires you to be out of combat with majority of your cooldowns available for it to work.", NIN.JobID)] + [CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nRequires level 100, with the following requirements:\n- 2 mudra charges ready\n- Dokumori off cooldown.\n- Kunai's Bane off cooldown.\n- TenChiJin off cooldown.\n- Phantom Kamaitachi off cooldown.\n- Bunshin off cooldown.\n- Dream Within a Dream off cooldown.\n- Kassatsu off cooldown.", NIN.JobID)] NIN_ST_AdvancedMode_BalanceOpener = 10029, [ParentCombo(NIN_ST_AdvancedMode)] diff --git a/XIVSlothCombo/Combos/JobHelpers/NIN.cs b/XIVSlothCombo/Combos/JobHelpers/NIN.cs index 20ef44c43..79a64c7a4 100644 --- a/XIVSlothCombo/Combos/JobHelpers/NIN.cs +++ b/XIVSlothCombo/Combos/JobHelpers/NIN.cs @@ -452,6 +452,7 @@ private static bool HasCooldowns() if (CustomComboFunctions.IsOnCooldown(Bunshin)) return false; if (CustomComboFunctions.IsOnCooldown(DreamWithinADream)) return false; if (CustomComboFunctions.IsOnCooldown(Kassatsu)) return false; + if (CustomComboFunctions.IsOnCooldown(TrickAttack)) return false; return true; } diff --git a/XIVSlothCombo/Window/Functions/Presets.cs b/XIVSlothCombo/Window/Functions/Presets.cs index 24e7dda68..2c00ddf18 100644 --- a/XIVSlothCombo/Window/Functions/Presets.cs +++ b/XIVSlothCombo/Window/Functions/Presets.cs @@ -204,7 +204,7 @@ internal unsafe static void DrawPreset(CustomComboPreset preset, CustomComboInfo ImGui.SetCursorPosX(ImGui.GetCursorPosX() + length.Length()); if (ImGui.Button($"Image of rotation###ninrtn{i}")) { - Util.OpenLink("https://i.imgur.com/q3lXeSZ.png"); + Util.OpenLink("https://i.imgur.com/IeP27KF.png"); } } From 1b9f2e3efedbb794eed3775a68b3d83c2e16d5ed Mon Sep 17 00:00:00 2001 From: Kaeris Date: Fri, 16 Aug 2024 16:25:24 +0100 Subject: [PATCH 106/142] Status durations fix --- XIVSlothCombo/Window/Tabs/Debug.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 785990ffd..be6ae3d79 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -69,7 +69,7 @@ static void CustomStyleText(string label, object? value) } // Duration + Blacklist Check - if (status.RemainingTime > 0 && !statusBlacklist.Contains(status.StatusId)) + if (status.RemainingTime != 0 && !statusBlacklist.Contains(status.StatusId)) { string formattedDuration; if (status.RemainingTime >= 60) @@ -114,7 +114,7 @@ static void CustomStyleText(string label, object? value) } // Duration + Blacklist Check - if (status.RemainingTime > 0 && !statusBlacklist.Contains(status.StatusId)) + if (status.RemainingTime != 0 && !statusBlacklist.Contains(status.StatusId)) { string formattedDuration; if (status.RemainingTime >= 60) From b87c0b2bf9c7cb7a5f7d1a0520b6ed2a4488ea9d Mon Sep 17 00:00:00 2001 From: Kaeris Date: Fri, 16 Aug 2024 18:25:30 +0100 Subject: [PATCH 107/142] Status duration fix --- XIVSlothCombo/Window/Tabs/Debug.cs | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index be6ae3d79..054272b34 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -2,6 +2,7 @@ using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Interface.Colors; using ECommons.DalamudServices; +using FFXIVClientStructs.FFXIV.Client.Game; using ImGuiNET; using System; using System.Linq; @@ -68,18 +69,22 @@ static void CustomStyleText(string label, object? value) CustomStyleText("", status.StatusId); } + float buffDuration = (CustomComboFunctions.FindEffectAny((ushort)status.StatusId).RemainingTime < 0) + ? (CustomComboFunctions.FindEffectAny((ushort)status.StatusId).RemainingTime * -1) + ActionManager.Instance()->AnimationLock + : CustomComboFunctions.FindEffectAny((ushort)status.StatusId).RemainingTime; + // Duration + Blacklist Check - if (status.RemainingTime != 0 && !statusBlacklist.Contains(status.StatusId)) + if (buffDuration != 0 && !statusBlacklist.Contains(status.StatusId)) { string formattedDuration; - if (status.RemainingTime >= 60) + if (buffDuration >= 60) { - int minutes = (int)(status.RemainingTime / 60); + int minutes = (int)(buffDuration / 60); formattedDuration = $"{minutes}m"; } else { - formattedDuration = $"{Math.Round(status.RemainingTime, 1)}s"; + formattedDuration = $"{Math.Round(buffDuration, 1)}s"; } ImGui.SameLine(0, 4f); @@ -113,18 +118,22 @@ static void CustomStyleText(string label, object? value) CustomStyleText("", status.StatusId); } + float debuffDuration = (CustomComboFunctions.FindTargetEffectAny((ushort)status.StatusId).RemainingTime < 0) + ? (CustomComboFunctions.FindTargetEffectAny((ushort)status.StatusId).RemainingTime * -1) + ActionManager.Instance()->AnimationLock + : CustomComboFunctions.FindTargetEffectAny((ushort)status.StatusId).RemainingTime; + // Duration + Blacklist Check - if (status.RemainingTime != 0 && !statusBlacklist.Contains(status.StatusId)) + if (debuffDuration != 0 && !statusBlacklist.Contains(status.StatusId)) { string formattedDuration; - if (status.RemainingTime >= 60) + if (debuffDuration >= 60) { - int minutes = (int)(status.RemainingTime / 60); + int minutes = (int)(debuffDuration / 60); formattedDuration = $"{minutes}m"; } else { - formattedDuration = $"{Math.Round(status.RemainingTime, 1)}s"; + formattedDuration = $"{Math.Round(debuffDuration, 1)}s"; } ImGui.SameLine(0, 4f); From 188c166f949dc7ecb4e3152967c4b05298cac0b0 Mon Sep 17 00:00:00 2001 From: ace Date: Fri, 16 Aug 2024 11:49:37 -0700 Subject: [PATCH 108/142] adjustments --- XIVSlothCombo/Combos/PvE/VPR.cs | 159 +++++++++++++++----------------- 1 file changed, 76 insertions(+), 83 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index caffc6af6..b3c1a3186 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -125,6 +125,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool HuntersCoilReady = gauge.DreadCombo == DreadCombo.HuntersCoil; bool SwiftskinsCoilReady = gauge.DreadCombo == DreadCombo.SwiftskinsCoil; float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; + bool in5y = GetTargetDistance() <= 5; int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); @@ -134,42 +135,44 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (VPROpener.DoFullOpener(ref actionID)) return actionID; - //All Weaves - if (CanWeave(ActionWatching.LastWeaponskill)) - { - // Death Rattle - if (LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); + //oGCDs - All oGCD weaves must be forced or possibly clipped or else it is a potency loss for every skill skipped/unused, unless disengaged for >= GCD + // Death Rattle - 280p loss if skipped + if (in5y && LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); - // Legacy Weaves - if (TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) - && OriginalHook(SerpentsTail) is not SerpentsTail) - return OriginalHook(SerpentsTail); + // Legacy Weaves - 280p loss if skipped + if (in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + && OriginalHook(SerpentsTail) is not SerpentsTail) + return OriginalHook(SerpentsTail); - // Uncoiled weaves - if (HasEffect(Buffs.PoisedForTwinfang)) - return OriginalHook(Twinfang); + // Fury Twin Weaves - 170p loss if skipped + if (HasEffect(Buffs.PoisedForTwinfang)) + return OriginalHook(Twinfang); - if (HasEffect(Buffs.PoisedForTwinblood)) - return OriginalHook(Twinblood); - if (!HasEffect(Buffs.Reawakened)) + if (HasEffect(Buffs.PoisedForTwinblood)) + return OriginalHook(Twinblood); + + //Vice Twin Weaves - 170p loss if skipped + if (!HasEffect(Buffs.Reawakened)) + { + //Vicewinder weaves + if (in5y) { - //Vicewinder weaves - if (HasEffect(Buffs.HuntersVenom) && InMeleeRange()) + if (HasEffect(Buffs.HuntersVenom)) return OriginalHook(Twinfang); - if (HasEffect(Buffs.SwiftskinsVenom) && InMeleeRange()) + if (HasEffect(Buffs.SwiftskinsVenom)) return OriginalHook(Twinblood); } - //Serpents Ire usage - if (!CappedOnCoils && ActionReady(SerpentsIre)) + //Serpents Ire - The only skill allowed to weave and not exactly force, however weave window is wide in case of Reawaken use before Ire is up + if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) return SerpentsIre; - } + //GCDs if (LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) - return VPRCheckRattlingCoils.HasRattlingCoilStack(gauge) + return (VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) ? UncoiledFury : WrithingSnap; @@ -190,25 +193,24 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Reawaken; //Overcap protection - if (CappedOnCoils && //3 coils + if (CappedOnCoils && ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up return UncoiledFury; //Vicewinder Usage - if (ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && HasEffect(Buffs.Swiftscaled) && - ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && InMeleeRange() && - !VPRCheckTimers.IsVenomExpiring(6) && !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + if (HasEffect(Buffs.Swiftscaled) && + ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && + ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && + !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return Vicewinder; // Uncoiled Fury usage if (LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && - ((gauge.RattlingCoilStacks > 1) || - (enemyHP < 1 && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && + gauge.RattlingCoilStacks > 1 && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return UncoiledFury; //Reawaken combo @@ -250,13 +252,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - // healing - if (PlayerHealthPercentageHp() <= 25 && ActionReady(All.SecondWind)) - return All.SecondWind; - - if (PlayerHealthPercentageHp() <= 40 && ActionReady(All.Bloodbath)) - return All.Bloodbath; - //1-2-3 (4-5-6) Combo if (comboTime > 0 && !HasEffect(Buffs.Reawakened)) { @@ -287,10 +282,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if ((HasEffect(Buffs.FlanksbaneVenom) || HasEffect(Buffs.HindsbaneVenom)) && LevelChecked(HindstingStrike)) { - if (trueNorthReady && !OnTargetsRear() && HasEffect(Buffs.HindsbaneVenom)) + if (trueNorthReady && !OnTargetsRear() && HasEffect(Buffs.HindsbaneVenom) && CanDelayedWeave(actionID)) return All.TrueNorth; - if (trueNorthReady && !OnTargetsFlank() && HasEffect(Buffs.FlanksbaneVenom)) + if (trueNorthReady && !OnTargetsFlank() && HasEffect(Buffs.FlanksbaneVenom) && CanDelayedWeave(actionID)) return All.TrueNorth; return OriginalHook(ReavingFangs); @@ -302,7 +297,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); } - //for lower lvls + //LowLevels return LevelChecked(ReavingFangs) && HasEffect(Buffs.HonedReavers) ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); @@ -343,6 +338,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool HuntersCoilReady = gauge.DreadCombo == DreadCombo.HuntersCoil; bool SwiftskinsCoilReady = gauge.DreadCombo == DreadCombo.SwiftskinsCoil; float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; + bool in5y = GetTargetDistance() <= 5; int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); @@ -356,53 +352,51 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } - //All Weaves - if (CanWeave(ActionWatching.LastWeaponskill)) - { - // Death Rattle - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && - LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); + //oGCDs - All oGCD weaves must be forced or possibly clipped or else it is a potency loss for every skill skipped/unused, unless disengaged for >= GCD + // Death Rattle - 280p loss if skipped + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && in5y && + LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); - // Legacy Weaves - if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && - TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) - && OriginalHook(SerpentsTail) is not SerpentsTail) - return OriginalHook(SerpentsTail); + // Legacy Weaves - 280p loss if skipped + if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && in5y && + TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + && OriginalHook(SerpentsTail) is not SerpentsTail) + return OriginalHook(SerpentsTail); - // Uncoiled weaves - if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) - { - if (HasEffect(Buffs.PoisedForTwinfang)) - return OriginalHook(Twinfang); + // Fury Twin Weaves - 170p loss if skipped + if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) + { + if (HasEffect(Buffs.PoisedForTwinfang)) + return OriginalHook(Twinfang); - if (HasEffect(Buffs.PoisedForTwinblood)) - return OriginalHook(Twinblood); - } + if (HasEffect(Buffs.PoisedForTwinblood)) + return OriginalHook(Twinblood); + } - if (!HasEffect(Buffs.Reawakened)) + //Vice Twin Weaves - 170p loss if skipped + if (!HasEffect(Buffs.Reawakened)) + { + if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) { - if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) + //Vicewinder weaves + if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && in5y) { - //vicewinder weaves - if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && InMeleeRange()) - { - if (HasEffect(Buffs.HuntersVenom)) - return OriginalHook(Twinfang); - - if (HasEffect(Buffs.SwiftskinsVenom)) - return OriginalHook(Twinblood); - } - - //Serpents Ire usage - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && - !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; + if (HasEffect(Buffs.HuntersVenom)) + return OriginalHook(Twinfang); + + if (HasEffect(Buffs.SwiftskinsVenom)) + return OriginalHook(Twinblood); } + + //Serpents Ire - The only skill allowed to weave and not exactly force, however weave window is wide in case of Reawaken use before Ire is up + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && InCombat() && + CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; } } - + //GCDs if (IsEnabled(CustomComboPreset.VPR_ST_RangedUptime) && LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) return (IsEnabled(CustomComboPreset.VPR_ST_RangedUptimeUncoiledFury) && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) @@ -438,7 +432,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsEnabled(CustomComboPreset.VPR_ST_Vicewinder) && HasEffect(Buffs.Swiftscaled) && ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && - !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsComboExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) + !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return Vicewinder; // Uncoiled Fury usage @@ -448,8 +442,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (enemyHP < uncoiledThreshold && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && - !VPRCheckTimers.IsComboExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return UncoiledFury; //Reawaken combo @@ -551,7 +544,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); } - //for lower lvls + //LowLevels return LevelChecked(ReavingFangs) && HasEffect(Buffs.HonedReavers) ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); @@ -566,7 +559,7 @@ private static bool UseReawaken(VPRGauge gauge) !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && !VPRCheckTimers.IsEmpowermentExpiring(6)) { - if ((!JustUsed(SerpentsIre, 3f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst + if ((!JustUsed(SerpentsIre, 2.1f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min (gauge.SerpentOffering >= 100) || //overcap From c66640df67fdedf387611441348e8fb0ae27fb6a Mon Sep 17 00:00:00 2001 From: ace Date: Fri, 16 Aug 2024 12:58:09 -0700 Subject: [PATCH 109/142] honkhonk --- XIVSlothCombo/Combos/PvE/VPR.cs | 237 ++++++++++++++------------------ 1 file changed, 100 insertions(+), 137 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index ffdf627cd..ac1608b10 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -1,7 +1,5 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; -using System; -using System.Linq; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Data; @@ -127,6 +125,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool HuntersCoilReady = gauge.DreadCombo == DreadCombo.HuntersCoil; bool SwiftskinsCoilReady = gauge.DreadCombo == DreadCombo.SwiftskinsCoil; float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; + bool in5y = GetTargetDistance() <= 5; int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); @@ -136,41 +135,44 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (VPROpener.DoFullOpener(ref actionID)) return actionID; - //All Weaves - if (CanWeave(actionID)) - { - // Death Rattle - if (LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); + //oGCDs - All oGCD weaves must be forced or possibly clipped or else it is a potency loss for every skill skipped/unused, unless disengaged for >= GCD + // Death Rattle - 280p loss if skipped + if (in5y && LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); - // Legacy Weaves - if (TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) - && OriginalHook(SerpentsTail) is not SerpentsTail) - return OriginalHook(SerpentsTail); + // Legacy Weaves - 280p loss if skipped + if (in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + && OriginalHook(SerpentsTail) is not SerpentsTail) + return OriginalHook(SerpentsTail); - // Uncoiled weaves - if (HasEffect(Buffs.PoisedForTwinfang)) - return OriginalHook(Twinfang); + // Fury Twin Weaves - 170p loss if skipped + if (HasEffect(Buffs.PoisedForTwinfang)) + return OriginalHook(Twinfang); - if (HasEffect(Buffs.PoisedForTwinblood)) - return OriginalHook(Twinblood); - if (!HasEffect(Buffs.Reawakened)) + if (HasEffect(Buffs.PoisedForTwinblood)) + return OriginalHook(Twinblood); + + //Vice Twin Weaves - 170p loss if skipped + if (!HasEffect(Buffs.Reawakened)) + { + //Vicewinder weaves + if (in5y) { - //Vicewinder weaves - if (HasEffect(Buffs.HuntersVenom) && InMeleeRange()) + if (HasEffect(Buffs.HuntersVenom)) return OriginalHook(Twinfang); - if (HasEffect(Buffs.SwiftskinsVenom) && InMeleeRange()) + if (HasEffect(Buffs.SwiftskinsVenom)) return OriginalHook(Twinblood); - - //Serpents Ire usage - if (!CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; } + + //Serpents Ire - The only skill allowed to weave and not exactly force, however weave window is wide in case of Reawaken use before Ire is up + if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; } + //GCDs if (LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) - return VPRCheckRattlingCoils.HasRattlingCoilStack(gauge) + return (VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) ? UncoiledFury : WrithingSnap; @@ -191,24 +193,24 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Reawaken; //Overcap protection - if (((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom)) || - GetCooldownRemainingTime(SerpentsIre) <= GCD * 5) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) + if (CappedOnCoils && + ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken + (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up return UncoiledFury; //Vicewinder Usage - if (ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && - ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && InMeleeRange() && - !VPRCheckTimers.IsVenomExpiring(6) && !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + if (HasEffect(Buffs.Swiftscaled) && + ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && + ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && + !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return Vicewinder; // Uncoiled Fury usage - if (LevelChecked(UncoiledFury) && - ((gauge.RattlingCoilStacks > 1) || - (enemyHP < 1 && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && + if (LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && + gauge.RattlingCoilStacks > 1 && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return UncoiledFury; //Reawaken combo @@ -250,13 +252,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - // healing - if (PlayerHealthPercentageHp() <= 25 && ActionReady(All.SecondWind)) - return All.SecondWind; - - if (PlayerHealthPercentageHp() <= 40 && ActionReady(All.Bloodbath)) - return All.Bloodbath; - //1-2-3 (4-5-6) Combo if (comboTime > 0 && !HasEffect(Buffs.Reawakened)) { @@ -287,10 +282,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if ((HasEffect(Buffs.FlanksbaneVenom) || HasEffect(Buffs.HindsbaneVenom)) && LevelChecked(HindstingStrike)) { - if (trueNorthReady && !OnTargetsRear() && HasEffect(Buffs.HindsbaneVenom)) + if (trueNorthReady && !OnTargetsRear() && HasEffect(Buffs.HindsbaneVenom) && CanDelayedWeave(actionID)) return All.TrueNorth; - if (trueNorthReady && !OnTargetsFlank() && HasEffect(Buffs.FlanksbaneVenom)) + if (trueNorthReady && !OnTargetsFlank() && HasEffect(Buffs.FlanksbaneVenom) && CanDelayedWeave(actionID)) return All.TrueNorth; return OriginalHook(ReavingFangs); @@ -302,7 +297,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); } - //for lower lvls + //LowLevels return LevelChecked(ReavingFangs) && HasEffect(Buffs.HonedReavers) ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); @@ -312,31 +307,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { - int SerpentsIreUsed = ActionWatching.CombatActions.Count(x => x == SerpentsIre); - if (LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6)) { - //even minutes - if ((WasLastAbility(SerpentsIre) && HasEffect(Buffs.ReadyToReawaken)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros)) || - HasEffect(Buffs.ReadyToReawaken) || - (gauge.SerpentOffering >= 95 && WasLastAbility(SerpentsIre))) - return true; - - // odd minutes - if (((SerpentsIreUsed <= 3 || SerpentsIreUsed > 4) && - gauge.SerpentOffering >= 50 && - GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || - (SerpentsIreUsed is 4 && - (gauge.SerpentOffering >= 95 || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) && - GetCooldownRemainingTime(SerpentsIre) is >= 45 and <= 90)) + if ((!JustUsed(SerpentsIre, 2.1f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst + (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA + (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min + (gauge.SerpentOffering >= 100) || //overcap + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 return true; } return false; @@ -358,6 +338,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool HuntersCoilReady = gauge.DreadCombo == DreadCombo.HuntersCoil; bool SwiftskinsCoilReady = gauge.DreadCombo == DreadCombo.SwiftskinsCoil; float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; + bool in5y = GetTargetDistance() <= 5; int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); @@ -371,52 +352,51 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } - //All Weaves - if (CanWeave(actionID)) - { - // Death Rattle - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && - LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); + //oGCDs - All oGCD weaves must be forced or possibly clipped or else it is a potency loss for every skill skipped/unused, unless disengaged for >= GCD + // Death Rattle - 280p loss if skipped + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && in5y && + LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); - // Legacy Weaves - if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && - TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) - && OriginalHook(SerpentsTail) is not SerpentsTail) - return OriginalHook(SerpentsTail); + // Legacy Weaves - 280p loss if skipped + if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && in5y && + TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + && OriginalHook(SerpentsTail) is not SerpentsTail) + return OriginalHook(SerpentsTail); - // Uncoiled weaves - if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) - { - if (HasEffect(Buffs.PoisedForTwinfang)) - return OriginalHook(Twinfang); + // Fury Twin Weaves - 170p loss if skipped + if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) + { + if (HasEffect(Buffs.PoisedForTwinfang)) + return OriginalHook(Twinfang); - if (HasEffect(Buffs.PoisedForTwinblood)) - return OriginalHook(Twinblood); - } + if (HasEffect(Buffs.PoisedForTwinblood)) + return OriginalHook(Twinblood); + } - if (!HasEffect(Buffs.Reawakened)) + //Vice Twin Weaves - 170p loss if skipped + if (!HasEffect(Buffs.Reawakened)) + { + if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) { - if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) + //Vicewinder weaves + if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && in5y) { - //vicewinder weaves - if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && InMeleeRange()) - { - if (HasEffect(Buffs.HuntersVenom)) - return OriginalHook(Twinfang); - - if (HasEffect(Buffs.SwiftskinsVenom)) - return OriginalHook(Twinblood); - } - - //Serpents Ire usage - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && - !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; + if (HasEffect(Buffs.HuntersVenom)) + return OriginalHook(Twinfang); + + if (HasEffect(Buffs.SwiftskinsVenom)) + return OriginalHook(Twinblood); } + + //Serpents Ire - The only skill allowed to weave and not exactly force, however weave window is wide in case of Reawaken use before Ire is up + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && InCombat() && + CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; } } + //GCDs if (IsEnabled(CustomComboPreset.VPR_ST_RangedUptime) && LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) return (IsEnabled(CustomComboPreset.VPR_ST_RangedUptimeUncoiledFury) && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) @@ -442,28 +422,27 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Reawaken; //Overcap protection - if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && - ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom)) || - GetCooldownRemainingTime(SerpentsIre) <= GCD * 5) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) + if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && CappedOnCoils && + ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken + (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up return UncoiledFury; //Vicewinder Usage if (IsEnabled(CustomComboPreset.VPR_ST_CDs) && - IsEnabled(CustomComboPreset.VPR_ST_Vicewinder) && + IsEnabled(CustomComboPreset.VPR_ST_Vicewinder) && HasEffect(Buffs.Swiftscaled) && ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && - !VPRCheckTimers.IsVenomExpiring(6) && !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return Vicewinder; // Uncoiled Fury usage if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && - LevelChecked(UncoiledFury) && + LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && ((gauge.RattlingCoilStacks > Config.VPR_ST_UncoiledFury_HoldCharges) || (enemyHP < uncoiledThreshold && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return UncoiledFury; //Reawaken combo @@ -565,7 +544,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); } - //for lower lvls + //LowLevels return LevelChecked(ReavingFangs) && HasEffect(Buffs.HonedReavers) ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); @@ -575,32 +554,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { - int SerpentsIreUsed = ActionWatching.CombatActions.Count(x => x == SerpentsIre); - - if (IsEnabled(CustomComboPreset.VPR_ST_Reawaken) && - LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && + if (LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && - !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6)) { - //even minutes - if ((WasLastAbility(SerpentsIre) && HasEffect(Buffs.ReadyToReawaken)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros)) || - HasEffect(Buffs.ReadyToReawaken) || - (gauge.SerpentOffering >= 95 && WasLastAbility(SerpentsIre))) - return true; - - // odd minutes - if (((SerpentsIreUsed <= 3 || SerpentsIreUsed > 4) && - gauge.SerpentOffering >= 50 && - GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || - (SerpentsIreUsed is 4 && - (gauge.SerpentOffering >= 95 || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) && - GetCooldownRemainingTime(SerpentsIre) is >= 45 and <= 90)) + if ((!JustUsed(SerpentsIre, 2.1f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst + (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA + (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min + (gauge.SerpentOffering >= 100) || //overcap + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 return true; } return false; @@ -623,7 +586,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is SteelMaw) { - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { // Death Rattle if (LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is LastLash) @@ -794,7 +757,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is SteelMaw) { - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { // Death Rattle if (IsEnabled(CustomComboPreset.VPR_AoE_SerpentsTail) && From 01b4302683314594a2bf9395096efd89222ddfaa Mon Sep 17 00:00:00 2001 From: ace Date: Fri, 16 Aug 2024 13:02:11 -0700 Subject: [PATCH 110/142] Weaving --- XIVSlothCombo/Combos/PvE/VPR.cs | 126 +++++++++++++++++--------------- 1 file changed, 66 insertions(+), 60 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index b3c1a3186..3cd8e8c18 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -135,39 +135,42 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (VPROpener.DoFullOpener(ref actionID)) return actionID; - //oGCDs - All oGCD weaves must be forced or possibly clipped or else it is a potency loss for every skill skipped/unused, unless disengaged for >= GCD - // Death Rattle - 280p loss if skipped - if (in5y && LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); + //oGCDs + if (CanWeave(ActionWatching.LastWeaponskill)) + { + // Death Rattle + if (in5y && LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); - // Legacy Weaves - 280p loss if skipped - if (in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) - && OriginalHook(SerpentsTail) is not SerpentsTail) - return OriginalHook(SerpentsTail); + // Legacy Weaves + if (in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + && OriginalHook(SerpentsTail) is not SerpentsTail) + return OriginalHook(SerpentsTail); - // Fury Twin Weaves - 170p loss if skipped - if (HasEffect(Buffs.PoisedForTwinfang)) - return OriginalHook(Twinfang); + // Fury Twin Weaves + if (HasEffect(Buffs.PoisedForTwinfang)) + return OriginalHook(Twinfang); - if (HasEffect(Buffs.PoisedForTwinblood)) - return OriginalHook(Twinblood); + if (HasEffect(Buffs.PoisedForTwinblood)) + return OriginalHook(Twinblood); - //Vice Twin Weaves - 170p loss if skipped - if (!HasEffect(Buffs.Reawakened)) - { - //Vicewinder weaves - if (in5y) + //Vice Twin Weaves + if (!HasEffect(Buffs.Reawakened)) { - if (HasEffect(Buffs.HuntersVenom)) - return OriginalHook(Twinfang); + //Vicewinder weaves + if (in5y) + { + if (HasEffect(Buffs.HuntersVenom)) + return OriginalHook(Twinfang); - if (HasEffect(Buffs.SwiftskinsVenom)) - return OriginalHook(Twinblood); - } + if (HasEffect(Buffs.SwiftskinsVenom)) + return OriginalHook(Twinblood); + } - //Serpents Ire - The only skill allowed to weave and not exactly force, however weave window is wide in case of Reawaken use before Ire is up - if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; + //Serpents Ire + if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; + } } //GCDs @@ -352,47 +355,50 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } - //oGCDs - All oGCD weaves must be forced or possibly clipped or else it is a potency loss for every skill skipped/unused, unless disengaged for >= GCD - // Death Rattle - 280p loss if skipped - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && in5y && - LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); + //oGCDs + if (CanWeave(ActionWatching.LastWeaponskill)) + { + // Death Rattle + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && in5y && + LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); - // Legacy Weaves - 280p loss if skipped - if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && in5y && - TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) - && OriginalHook(SerpentsTail) is not SerpentsTail) - return OriginalHook(SerpentsTail); + // Legacy Weaves + if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && in5y && + TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + && OriginalHook(SerpentsTail) is not SerpentsTail) + return OriginalHook(SerpentsTail); - // Fury Twin Weaves - 170p loss if skipped - if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) - { - if (HasEffect(Buffs.PoisedForTwinfang)) - return OriginalHook(Twinfang); + // Fury Twin Weaves + if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) + { + if (HasEffect(Buffs.PoisedForTwinfang)) + return OriginalHook(Twinfang); - if (HasEffect(Buffs.PoisedForTwinblood)) - return OriginalHook(Twinblood); - } + if (HasEffect(Buffs.PoisedForTwinblood)) + return OriginalHook(Twinblood); + } - //Vice Twin Weaves - 170p loss if skipped - if (!HasEffect(Buffs.Reawakened)) - { - if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) + //Vice Twin Weaves + if (!HasEffect(Buffs.Reawakened)) { - //Vicewinder weaves - if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && in5y) + if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) { - if (HasEffect(Buffs.HuntersVenom)) - return OriginalHook(Twinfang); - - if (HasEffect(Buffs.SwiftskinsVenom)) - return OriginalHook(Twinblood); + //Vicewinder weaves + if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && in5y) + { + if (HasEffect(Buffs.HuntersVenom)) + return OriginalHook(Twinfang); + + if (HasEffect(Buffs.SwiftskinsVenom)) + return OriginalHook(Twinblood); + } + + //Serpents Ire - Force this in order to maintain raid buff upkeep + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && InCombat() && + CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; } - - //Serpents Ire - The only skill allowed to weave and not exactly force, however weave window is wide in case of Reawaken use before Ire is up - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && InCombat() && - CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; } } From 48fbd7502dcef85e81b44703d99f5d5108718e06 Mon Sep 17 00:00:00 2001 From: ace Date: Fri, 16 Aug 2024 13:35:49 -0700 Subject: [PATCH 111/142] Revert "Merge branch 'clown-town' into GNB" This reverts commit fb76f25c70c1be1969a301d3477d5c587e001039, reversing changes made to 1fa1f0da16e8da68717558577dac5df7046bef71. --- XIVSlothCombo/Combos/CustomComboPreset.cs | 125 ++-------- XIVSlothCombo/Combos/PvE/VPR.cs | 237 +++++++++++-------- XIVSlothCombo/Combos/PvP/BLMPVP.cs | 10 +- XIVSlothCombo/Combos/PvP/DRGPVP.cs | 34 +-- XIVSlothCombo/Combos/PvP/GNBPVP.cs | 8 +- XIVSlothCombo/Combos/PvP/MCHPVP.cs | 44 ++-- XIVSlothCombo/Combos/PvP/WARPVP.cs | 58 ++--- XIVSlothCombo/CustomCombo/CustomCombo.cs | 77 ------ XIVSlothCombo/Window/Functions/UserConfig.cs | 10 +- 9 files changed, 219 insertions(+), 384 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index ba5e8a63e..063a4e29b 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -4547,52 +4547,39 @@ The three digets after RDM.JobID can be used to reorder items in the list #endregion #region DRAGOON - [ReplaceSkill(DRGPvP.RaidenThrust)] [PvPCustomCombo] - [CustomComboInfo("Burst Mode", "Turns Wheeling Thrust Combo into an all-in-one damage button.", DRG.JobID)] + [CustomComboInfo("Burst Mode", "Using Elusive Jump turns Wheeling Thrust Combo into all-in-one burst damage button.", DRG.JobID)] DRGPvP_Burst = 116000, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Elusive Jump Option", "Adds Elusive Jump to the rotation.\n WARNING: This does not take into account anything whatsoever besides the rotation.\n Will always use on CD no matter any situation regarding AoEs or outside interference. Use at your own risk.", DRG.JobID)] - DRGPvP_ElusiveJump = 116001, - - [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Geirskogul Option", "Adds Geirskogul to the rotation.", DRG.JobID)] - DRGPvP_Geirskogul = 116002, - - [ParentCombo(DRGPvP_Geirskogul)] - [CustomComboInfo("Nastrond Option", "Adds Nastrond to the rotation.", DRG.JobID)] - DRGPvP_Nastrond = 116003, + [CustomComboInfo("Geirskogul Option", "Adds Geirskogul to Burst Mode.", DRG.JobID)] + DRGPvP_Geirskogul = 116001, [ParentCombo(DRGPvP_Geirskogul)] - [CustomComboInfo("Optimal Nastrond Option", "Adds Nastrond to the rotation when the target has 50 percent or lower HP or when buff is about to expire, regardless of settings above.", DRG.JobID)] - DRGPvP_NastrondOpti = 116004, + [CustomComboInfo("Nastrond Option", "Adds Nastrond to Burst Mode.", DRG.JobID)] + DRGPvP_Nastrond = 116002, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Horrid Roar Option", "Adds Horrid Roar to the rotation.", DRG.JobID)] - DRGPvP_HorridRoar = 116005, + [CustomComboInfo("Horrid Roar Option", "Adds Horrid Roar to Burst Mode.", DRG.JobID)] + DRGPvP_HorridRoar = 116003, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Chaotic Spring Option", "Adds Chaotic Spring to the rotation, essentially only for damage purposes.", DRG.JobID)] - DRGPvP_ChaoticSpring = 116006, - - [ParentCombo(DRGPvP_ChaoticSpring)] - [CustomComboInfo("Chaotic Spring Self-Heal Option", "Adds Chaotic Spring to the rotation when below the set HP percentage, essentially only for healing purposes.", DRG.JobID)] - DRGPvP_ChaoticSpringSustain = 116007, + [CustomComboInfo("Sustain Chaos Spring Option", "Adds Chaos Spring to Burst Mode when below the set HP percentage.", DRG.JobID)] + DRGPvP_ChaoticSpringSustain = 116004, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("Wyrmwind Thrust Option", "Adds Wyrmwind Thrust to the rotation.", DRG.JobID)] - DRGPvP_WyrmwindThrust = 116008, + [CustomComboInfo("Wyrmwind Thrust Option", "Adds Wyrmwind Thrust to Burst Mode.", DRG.JobID)] + DRGPvP_WyrmwindThrust = 116006, [ParentCombo(DRGPvP_Burst)] - [CustomComboInfo("High Jump Option", "Adds High Jump to the rotation, optimally.", DRG.JobID)] - DRGPvP_HighJump = 116009, + [CustomComboInfo("High Jump Weave Option", "Adds High Jump to Burst Mode.", DRG.JobID)] + DRGPvP_HighJump = 116007, [ParentCombo(DRGPvP_Burst)] [CustomComboInfo("Elusive Jump Burst Protection Option", "Disables Elusive Jump if Burst is not ready.", DRG.JobID)] - DRGPvP_BurstProtection = 116010, + DRGPvP_BurstProtection = 116008, - // Last value = 116010 + // Last value = 116008 #endregion @@ -4615,7 +4602,6 @@ The three digets after RDM.JobID can be used to reorder items in the list [CustomComboInfo("Draw & Junction Option", "Adds Draw And Junction to rotation when appropriate.", GNB.JobID)] GNBPvP_ST_DrawAndJunction = 117003, - [ParentCombo(GNBPvP_Burst)] [CustomComboInfo("Gnashing Fang Option", "Adds Gnashing Fang to to rotation when appropriate.", GNB.JobID)] GNBPvP_ST_GnashingFang = 117004, @@ -4660,57 +4646,21 @@ The three digets after RDM.JobID can be used to reorder items in the list #endregion #region MACHINIST - [ReplaceSkill(MCHPvP.BlastCharge)] [PvPCustomCombo] [CustomComboInfo("Burst Mode", "Turns Blast Charge into an all-in-one damage button.", MCHPvP.JobID)] MCHPvP_BurstMode = 118000, [PvPCustomCombo] [ParentCombo(MCHPvP_BurstMode)] - [CustomComboInfo("Wildfire Option", "Adds Wildfire into the rotation.", MCHPvP.JobID)] - MCHPvP_BurstMode_Wildfire = 118001, - - [PvPCustomCombo] - [ParentCombo(MCHPvP_BurstMode)] - [CustomComboInfo("Heat Blast Option", "Adds Heat Blast into the rotation when appropriate.", MCHPvP.JobID)] - MCHPvP_BurstMode_HeatBlast = 118002, - - [PvPCustomCombo] - [ParentCombo(MCHPvP_BurstMode)] - [CustomComboInfo("Analysis Option", "Adds Analysis into the rotation when appropriate.", MCHPvP.JobID)] - MCHPvP_BurstMode_Analysis = 118003, - - [PvPCustomCombo] - [ParentCombo(MCHPvP_BurstMode)] - [CustomComboInfo("Drill Option", "Adds Drill into the rotation when primed.", MCHPvP.JobID)] - MCHPvP_BurstMode_Drill = 118004, - - [PvPCustomCombo] - [ParentCombo(MCHPvP_BurstMode)] - [CustomComboInfo("BioBlaster Option", "Adds BioBlaster into the rotation when primed.", MCHPvP.JobID)] - MCHPvP_BurstMode_BioBlaster = 118005, - - [PvPCustomCombo] - [ParentCombo(MCHPvP_BurstMode)] - [CustomComboInfo("Air Anchor Option", "Adds Heat Blast into the rotation when primed.", MCHPvP.JobID)] - MCHPvP_BurstMode_AirAnchor = 118006, - - [PvPCustomCombo] - [ParentCombo(MCHPvP_BurstMode)] - [CustomComboInfo("Chain Saw Option", "Adds Heat Blast into the rotation when primed.", MCHPvP.JobID)] - MCHPvP_BurstMode_ChainSaw = 118007, - - [PvPCustomCombo] - [ParentCombo(MCHPvP_BurstMode_Drill)] [CustomComboInfo("Alternate Drill Option", "Saves Drill for use after Wildfire.", MCHPvP.JobID)] - MCHPvP_BurstMode_AltDrill = 118008, + MCHPvP_BurstMode_AltDrill = 118001, [PvPCustomCombo] - [ParentCombo(MCHPvP_BurstMode_AirAnchor)] + [ParentCombo(MCHPvP_BurstMode)] [CustomComboInfo("Alternate Analysis Option", "Uses Analysis with Air Anchor instead of Chain Saw.", MCHPvP.JobID)] - MCHPvP_BurstMode_AltAnalysis = 118009, + MCHPvP_BurstMode_AltAnalysis = 118002, - // Last value = 118009 + // Last value = 118002 #endregion @@ -4945,48 +4895,25 @@ The three digets after RDM.JobID can be used to reorder items in the list #region WARRIOR [PvPCustomCombo] - [CustomComboInfo("Burst Mode", "Turns Heavy Swing Combo into its optimal combo chain.", WARPvP.JobID)] + [CustomComboInfo("Burst Mode", "Turns Heavy Swing into an all-in-one damage button.", WARPvP.JobID)] WARPvP_BurstMode = 128000, [PvPCustomCombo] [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Bloodwhetting Option", "Adds Bloodwhetting to the rotation.", WARPvP.JobID)] + [CustomComboInfo("Bloodwhetting Option", "Allows use of Bloodwhetting any time, not just between GCDs.", WARPvP.JobID)] WARPvP_BurstMode_Bloodwhetting = 128001, [PvPCustomCombo] [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Onslaught Option", "Adds Onslaught to the rotation.", WARPvP.JobID)] - WARPvP_BurstMode_Onslaught = 128002, - - [PvPCustomCombo] - [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Orogeny Option", "Adds Orogeny to the rotation when available.", WARPvP.JobID)] - WARPvP_BurstMode_Orogeny = 128003, - - [PvPCustomCombo] - [ConflictingCombos(WARPvP_BurstMode_Stunlock)] - [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Blota Option", "Adds Blota to the rotation.", WARPvP.JobID)] - WARPvP_BurstMode_Blota = 128004, - - [PvPCustomCombo] - [ConflictingCombos(WARPvP_BurstMode_Blota, WARPvP_BurstMode_PrimalRend)] - [ParentCombo(WARPvP_BurstMode_PrimalRend)] - [CustomComboInfo("StunLock Option", "Adds Primal Rend & Blota to the rotation together to execute a 4s stun lock.", WARPvP.JobID)] - WARPvP_BurstMode_Stunlock = 128005, - - [PvPCustomCombo] - [ConflictingCombos(WARPvP_BurstMode_Stunlock)] - [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Primal Rend Option", "Adds Primal Rend the rotation.", WARPvP.JobID)] - WARPvP_BurstMode_PrimalRend = 128006, + [CustomComboInfo("Blota Option", "Adds Blota to Burst Mode when not in melee range.", WARPvP.JobID)] + WARPvP_BurstMode_Blota = 128003, [PvPCustomCombo] [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Chaotic Cyclone Option", "Adds Chaotic Cyclone the rotation when available.", WARPvP.JobID)] - WARPvP_BurstMode_ChaoticCyclone = 128007, + [CustomComboInfo("Primal Rend Option", "Adds Primal Rend to Burst Mode.", WARPvP.JobID)] + WARPvP_BurstMode_PrimalRend = 128004, - // Last value = 128007 + // Last value = 128002 #endregion diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index ac1608b10..ffdf627cd 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -1,5 +1,7 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; +using System; +using System.Linq; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Data; @@ -125,7 +127,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool HuntersCoilReady = gauge.DreadCombo == DreadCombo.HuntersCoil; bool SwiftskinsCoilReady = gauge.DreadCombo == DreadCombo.SwiftskinsCoil; float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; - bool in5y = GetTargetDistance() <= 5; int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); @@ -135,44 +136,41 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (VPROpener.DoFullOpener(ref actionID)) return actionID; - //oGCDs - All oGCD weaves must be forced or possibly clipped or else it is a potency loss for every skill skipped/unused, unless disengaged for >= GCD - // Death Rattle - 280p loss if skipped - if (in5y && LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); - - // Legacy Weaves - 280p loss if skipped - if (in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) - && OriginalHook(SerpentsTail) is not SerpentsTail) - return OriginalHook(SerpentsTail); + //All Weaves + if (CanWeave(actionID)) + { + // Death Rattle + if (LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); - // Fury Twin Weaves - 170p loss if skipped - if (HasEffect(Buffs.PoisedForTwinfang)) - return OriginalHook(Twinfang); + // Legacy Weaves + if (TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + && OriginalHook(SerpentsTail) is not SerpentsTail) + return OriginalHook(SerpentsTail); - if (HasEffect(Buffs.PoisedForTwinblood)) - return OriginalHook(Twinblood); + // Uncoiled weaves + if (HasEffect(Buffs.PoisedForTwinfang)) + return OriginalHook(Twinfang); - //Vice Twin Weaves - 170p loss if skipped - if (!HasEffect(Buffs.Reawakened)) - { - //Vicewinder weaves - if (in5y) + if (HasEffect(Buffs.PoisedForTwinblood)) + return OriginalHook(Twinblood); + if (!HasEffect(Buffs.Reawakened)) { - if (HasEffect(Buffs.HuntersVenom)) + //Vicewinder weaves + if (HasEffect(Buffs.HuntersVenom) && InMeleeRange()) return OriginalHook(Twinfang); - if (HasEffect(Buffs.SwiftskinsVenom)) + if (HasEffect(Buffs.SwiftskinsVenom) && InMeleeRange()) return OriginalHook(Twinblood); - } - //Serpents Ire - The only skill allowed to weave and not exactly force, however weave window is wide in case of Reawaken use before Ire is up - if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; + //Serpents Ire usage + if (!CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; + } } - //GCDs if (LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) - return (VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) + return VPRCheckRattlingCoils.HasRattlingCoilStack(gauge) ? UncoiledFury : WrithingSnap; @@ -193,24 +191,24 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Reawaken; //Overcap protection - if (CappedOnCoils && - ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken - (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up + if (((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom)) || + GetCooldownRemainingTime(SerpentsIre) <= GCD * 5) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) return UncoiledFury; //Vicewinder Usage - if (HasEffect(Buffs.Swiftscaled) && - ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && - ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && - !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) + if (ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && + ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && InMeleeRange() && + !VPRCheckTimers.IsVenomExpiring(6) && !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) return Vicewinder; // Uncoiled Fury usage - if (LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && - gauge.RattlingCoilStacks > 1 && + if (LevelChecked(UncoiledFury) && + ((gauge.RattlingCoilStacks > 1) || + (enemyHP < 1 && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && + !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) return UncoiledFury; //Reawaken combo @@ -252,6 +250,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + // healing + if (PlayerHealthPercentageHp() <= 25 && ActionReady(All.SecondWind)) + return All.SecondWind; + + if (PlayerHealthPercentageHp() <= 40 && ActionReady(All.Bloodbath)) + return All.Bloodbath; + //1-2-3 (4-5-6) Combo if (comboTime > 0 && !HasEffect(Buffs.Reawakened)) { @@ -282,10 +287,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if ((HasEffect(Buffs.FlanksbaneVenom) || HasEffect(Buffs.HindsbaneVenom)) && LevelChecked(HindstingStrike)) { - if (trueNorthReady && !OnTargetsRear() && HasEffect(Buffs.HindsbaneVenom) && CanDelayedWeave(actionID)) + if (trueNorthReady && !OnTargetsRear() && HasEffect(Buffs.HindsbaneVenom)) return All.TrueNorth; - if (trueNorthReady && !OnTargetsFlank() && HasEffect(Buffs.FlanksbaneVenom) && CanDelayedWeave(actionID)) + if (trueNorthReady && !OnTargetsFlank() && HasEffect(Buffs.FlanksbaneVenom)) return All.TrueNorth; return OriginalHook(ReavingFangs); @@ -297,7 +302,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); } - //LowLevels + //for lower lvls return LevelChecked(ReavingFangs) && HasEffect(Buffs.HonedReavers) ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); @@ -307,16 +312,31 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { + int SerpentsIreUsed = ActionWatching.CombatActions.Count(x => x == SerpentsIre); + if (LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && - !VPRCheckTimers.IsEmpowermentExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && + !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) { - if ((!JustUsed(SerpentsIre, 2.1f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst - (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA - (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min - (gauge.SerpentOffering >= 100) || //overcap - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 + //even minutes + if ((WasLastAbility(SerpentsIre) && HasEffect(Buffs.ReadyToReawaken)) || + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros)) || + HasEffect(Buffs.ReadyToReawaken) || + (gauge.SerpentOffering >= 95 && WasLastAbility(SerpentsIre))) + return true; + + // odd minutes + if (((SerpentsIreUsed <= 3 || SerpentsIreUsed > 4) && + gauge.SerpentOffering >= 50 && + GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || + (SerpentsIreUsed is 4 && + (gauge.SerpentOffering >= 95 || + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) && + GetCooldownRemainingTime(SerpentsIre) is >= 45 and <= 90)) return true; } return false; @@ -338,7 +358,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool HuntersCoilReady = gauge.DreadCombo == DreadCombo.HuntersCoil; bool SwiftskinsCoilReady = gauge.DreadCombo == DreadCombo.SwiftskinsCoil; float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; - bool in5y = GetTargetDistance() <= 5; int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); @@ -352,51 +371,52 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } - //oGCDs - All oGCD weaves must be forced or possibly clipped or else it is a potency loss for every skill skipped/unused, unless disengaged for >= GCD - // Death Rattle - 280p loss if skipped - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && in5y && - LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); + //All Weaves + if (CanWeave(actionID)) + { + // Death Rattle + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && + LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); - // Legacy Weaves - 280p loss if skipped - if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && in5y && - TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) - && OriginalHook(SerpentsTail) is not SerpentsTail) - return OriginalHook(SerpentsTail); + // Legacy Weaves + if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && + TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + && OriginalHook(SerpentsTail) is not SerpentsTail) + return OriginalHook(SerpentsTail); - // Fury Twin Weaves - 170p loss if skipped - if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) - { - if (HasEffect(Buffs.PoisedForTwinfang)) - return OriginalHook(Twinfang); + // Uncoiled weaves + if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) + { + if (HasEffect(Buffs.PoisedForTwinfang)) + return OriginalHook(Twinfang); - if (HasEffect(Buffs.PoisedForTwinblood)) - return OriginalHook(Twinblood); - } + if (HasEffect(Buffs.PoisedForTwinblood)) + return OriginalHook(Twinblood); + } - //Vice Twin Weaves - 170p loss if skipped - if (!HasEffect(Buffs.Reawakened)) - { - if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) + if (!HasEffect(Buffs.Reawakened)) { - //Vicewinder weaves - if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && in5y) + if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) { - if (HasEffect(Buffs.HuntersVenom)) - return OriginalHook(Twinfang); - - if (HasEffect(Buffs.SwiftskinsVenom)) - return OriginalHook(Twinblood); + //vicewinder weaves + if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && InMeleeRange()) + { + if (HasEffect(Buffs.HuntersVenom)) + return OriginalHook(Twinfang); + + if (HasEffect(Buffs.SwiftskinsVenom)) + return OriginalHook(Twinblood); + } + + //Serpents Ire usage + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && + !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; } - - //Serpents Ire - The only skill allowed to weave and not exactly force, however weave window is wide in case of Reawaken use before Ire is up - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && InCombat() && - CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; } } - //GCDs if (IsEnabled(CustomComboPreset.VPR_ST_RangedUptime) && LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) return (IsEnabled(CustomComboPreset.VPR_ST_RangedUptimeUncoiledFury) && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) @@ -422,27 +442,28 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Reawaken; //Overcap protection - if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && CappedOnCoils && - ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken - (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up + if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && + ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom)) || + GetCooldownRemainingTime(SerpentsIre) <= GCD * 5) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) return UncoiledFury; //Vicewinder Usage if (IsEnabled(CustomComboPreset.VPR_ST_CDs) && - IsEnabled(CustomComboPreset.VPR_ST_Vicewinder) && HasEffect(Buffs.Swiftscaled) && + IsEnabled(CustomComboPreset.VPR_ST_Vicewinder) && ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && - !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) + !VPRCheckTimers.IsVenomExpiring(6) && !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) return Vicewinder; // Uncoiled Fury usage if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && - LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && + LevelChecked(UncoiledFury) && ((gauge.RattlingCoilStacks > Config.VPR_ST_UncoiledFury_HoldCharges) || (enemyHP < uncoiledThreshold && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && - !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && + !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) return UncoiledFury; //Reawaken combo @@ -544,7 +565,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); } - //LowLevels + //for lower lvls return LevelChecked(ReavingFangs) && HasEffect(Buffs.HonedReavers) ? OriginalHook(ReavingFangs) : OriginalHook(SteelFangs); @@ -554,16 +575,32 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { - if (LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && + int SerpentsIreUsed = ActionWatching.CombatActions.Count(x => x == SerpentsIre); + + if (IsEnabled(CustomComboPreset.VPR_ST_Reawaken) && + LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && - !VPRCheckTimers.IsEmpowermentExpiring(6)) + !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(6) && + !VPRCheckTimers.IsComboExpiring(6) && !VPRCheckTimers.IsHoningExpiring(6)) { - if ((!JustUsed(SerpentsIre, 2.1f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst - (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA - (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min - (gauge.SerpentOffering >= 100) || //overcap - (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 + //even minutes + if ((WasLastAbility(SerpentsIre) && HasEffect(Buffs.ReadyToReawaken)) || + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros)) || + HasEffect(Buffs.ReadyToReawaken) || + (gauge.SerpentOffering >= 95 && WasLastAbility(SerpentsIre))) + return true; + + // odd minutes + if (((SerpentsIreUsed <= 3 || SerpentsIreUsed > 4) && + gauge.SerpentOffering >= 50 && + GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || + (SerpentsIreUsed is 4 && + (gauge.SerpentOffering >= 95 || + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(Ouroboros)) || + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) && + GetCooldownRemainingTime(SerpentsIre) is >= 45 and <= 90)) return true; } return false; @@ -586,7 +623,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is SteelMaw) { - if (CanWeave(ActionWatching.LastWeaponskill)) + if (CanWeave(actionID)) { // Death Rattle if (LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is LastLash) @@ -757,7 +794,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is SteelMaw) { - if (CanWeave(ActionWatching.LastWeaponskill)) + if (CanWeave(actionID)) { // Death Rattle if (IsEnabled(CustomComboPreset.VPR_AoE_SerpentsTail) && diff --git a/XIVSlothCombo/Combos/PvP/BLMPVP.cs b/XIVSlothCombo/Combos/PvP/BLMPVP.cs index 148155db5..d87ddd9f8 100644 --- a/XIVSlothCombo/Combos/PvP/BLMPVP.cs +++ b/XIVSlothCombo/Combos/PvP/BLMPVP.cs @@ -16,7 +16,6 @@ public const uint Flare = 29651, Blizzard4 = 29654, Freeze = 29655, - SoulResonance = 29662, Foul = 29371; public static class Buffs @@ -49,10 +48,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is Fire or Fire4 or Flare) { bool canWeave = CanSpellWeave(actionID); - var hasLB = HasPVPLimitBreak(); - - if (hasLB && GetTargetDistance() > 10 && PlayerHealthPercentageHp() > 80) - return SoulResonance; if (HasEffect(Buffs.Polyglot)) return Foul; @@ -66,9 +61,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsOffCooldown(Burst)) return Burst; - if (PlayerHealthPercentageHp() < 50) - return PvPCommon.Sprint; - if (!TargetHasEffect(Debuffs.AstralWarmth)) return OriginalHook(Fire); @@ -77,7 +69,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Paradox; if (IsEnabled(CustomComboPreset.BLMPvP_BurstMode_NightWing) && - ActionReady(NightWing)) + IsOffCooldown(NightWing)) return NightWing; if (FindTargetEffect(Debuffs.AstralWarmth).StackCount == 3 && diff --git a/XIVSlothCombo/Combos/PvP/DRGPVP.cs b/XIVSlothCombo/Combos/PvP/DRGPVP.cs index fbc7fd876..b3e8a9371 100644 --- a/XIVSlothCombo/Combos/PvP/DRGPVP.cs +++ b/XIVSlothCombo/Combos/PvP/DRGPVP.cs @@ -51,46 +51,32 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is RaidenThrust or FangAndClaw or WheelingThrust) { bool enemyGuarded = TargetHasEffectAny(PvPCommon.Buffs.Guard); - bool closeEnough = GetTargetDistance() <= 7; - bool farEnough = GetTargetDistance() <= 13; - float enemyHP = GetTargetHPPercent(); - float playerHP = PlayerHealthPercentageHp(); - float GCD = GetCooldown(WheelingThrust).CooldownTotal; if (!enemyGuarded) { if (CanWeave(actionID)) { - //ElusiveJump - if (IsEnabled(CustomComboPreset.DRGPvP_ElusiveJump) && ActionReady(ElusiveJump) && GetCooldownRemainingTime(HighJump) < 1.5f) //use on CD to keep rotation going - return ElusiveJump; - - //HighJump - if (IsEnabled(CustomComboPreset.DRGPvP_HighJump) && ActionReady(HighJump) && (JustUsed(WyrmwindThrust) || enemyHP <= 10)) //use to re-engage after ElusiveJump > far WyrmwindThrust, best held for burst or to execute + if (IsEnabled(CustomComboPreset.DRGPvP_HighJump) && IsOffCooldown(HighJump) && HasEffect(Buffs.LifeOfTheDragon)) return HighJump; - //Nastrond - if (IsEnabled(CustomComboPreset.DRGPvP_Nastrond) && farEnough) + if (IsEnabled(CustomComboPreset.DRGPvP_Nastrond) && InMeleeRange()) { - if (HasEffect(Buffs.LifeOfTheDragon) && - ((IsEnabled(CustomComboPreset.DRGPvP_NastrondOpti) && (enemyHP <= 50 || GetBuffRemainingTime(Buffs.LifeOfTheDragon) <= GCD)) || //best used when TargetHP is lower than 50 - (IsNotEnabled(CustomComboPreset.DRGPvP_NastrondOpti) && playerHP < GetOptionValue(Config.DRGPvP_LOTD_HPValue)) || //PlayerHP slider - (IsNotEnabled(CustomComboPreset.DRGPvP_NastrondOpti) && GetBuffRemainingTime(Buffs.LifeOfTheDragon) < GetOptionValue(Config.DRGPvP_LOTD_Duration)))) //Buff duration slider + if (HasEffect(Buffs.LifeOfTheDragon) && PlayerHealthPercentageHp() < GetOptionValue(Config.DRGPvP_LOTD_HPValue) + || HasEffect(Buffs.LifeOfTheDragon) && GetBuffRemainingTime(Buffs.LifeOfTheDragon) < GetOptionValue(Config.DRGPvP_LOTD_Duration)) return Nastrond; } - if (IsEnabled(CustomComboPreset.DRGPvP_HorridRoar) && ActionReady(HorridRoar) && HasEffect(Buffs.LifeOfTheDragon) && closeEnough) //best used when under LOTD to prevent dying due to squishiness + if (IsEnabled(CustomComboPreset.DRGPvP_HorridRoar) && IsOffCooldown(HorridRoar) && InMeleeRange()) return HorridRoar; } - if (IsEnabled(CustomComboPreset.DRGPvP_ChaoticSpring) && InMeleeRange() && ActionReady(ChaoticSpring)) + if (IsEnabled(CustomComboPreset.DRGPvP_ChaoticSpringSustain) && IsOffCooldown(ChaoticSpring) && PlayerHealthPercentageHp() < GetOptionValue(Config.DRGPvP_CS_HP_Threshold)) { - if ((!HasEffect(Buffs.FirstmindsFocus) && !HasEffect(Buffs.LifeOfTheDragon) && !ActionReady(Geirskogul) && !ActionReady(ElusiveJump)) //for damage - || (IsEnabled(CustomComboPreset.DRGPvP_ChaoticSpringSustain) && playerHP < GetOptionValue(Config.DRGPvP_CS_HP_Threshold)) //PlayerHP slider - || (!IsEnabled(CustomComboPreset.DRGPvP_ChaoticSpringSustain) && playerHP < 60)) //force heal self + if (!HasEffect(Buffs.FirstmindsFocus) && !HasEffect(Buffs.LifeOfTheDragon) && IsOnCooldown(Geirskogul) && IsOnCooldown(ElusiveJump) + || !HasEffect(Buffs.FirstmindsFocus) && HasEffect(Buffs.LifeOfTheDragon) && IsOnCooldown(Geirskogul) && IsOnCooldown(ElusiveJump) && WasLastWeaponskill(HeavensThrust)) return ChaoticSpring; } - if (IsEnabled(CustomComboPreset.DRGPvP_Geirskogul) && ActionReady(Geirskogul) && farEnough) + if (IsEnabled(CustomComboPreset.DRGPvP_Geirskogul) && IsOffCooldown(Geirskogul) && WasLastAbility(ElusiveJump) && HasEffect(Buffs.FirstmindsFocus)) return Geirskogul; - if (IsEnabled(CustomComboPreset.DRGPvP_WyrmwindThrust) && JustUsed(ElusiveJump, 3f) && GetTargetDistance() >= GetOptionValue(Config.DRGPvP_Distance_Threshold)) + if (IsEnabled(CustomComboPreset.DRGPvP_WyrmwindThrust) && HasEffect(Buffs.FirstmindsFocus) && GetTargetDistance() >= GetOptionValue(Config.DRGPvP_Distance_Threshold)) return WyrmwindThrust; } } diff --git a/XIVSlothCombo/Combos/PvP/GNBPVP.cs b/XIVSlothCombo/Combos/PvP/GNBPVP.cs index 9148dd4f2..edd658690 100644 --- a/XIVSlothCombo/Combos/PvP/GNBPVP.cs +++ b/XIVSlothCombo/Combos/PvP/GNBPVP.cs @@ -100,15 +100,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.GNBPvP_ST_GnashingFang) && JustUsed(GnashingFang, 3f) || JustUsed(SavageClaw, 3f)) return OriginalHook(GnashingFang); - - //LB - if (HasPVPLimitBreak() && PlayerHealthPercentageHp() > 70 && HasEffect(Buffs.NoMercy) && !enemyGuard) - return RelentlessRush; - if (GetTargetHPPercent() < 20 && JustUsed(RelentlessRush, 4f)) - return TerminalTrigger; //DoubleDown - if (IsEnabled(CustomComboPreset.GNBPvP_DoubleDown) && !enemyGuard && ActionReady(DoubleDown) + if (IsEnabled(CustomComboPreset.GNBPvP_DoubleDown) && !enemyGuard && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy) && InMeleeRange() && !inGF) //DoubleDown breaks Gnashing combo in PvP return DoubleDown; diff --git a/XIVSlothCombo/Combos/PvP/MCHPVP.cs b/XIVSlothCombo/Combos/PvP/MCHPVP.cs index 89431c2a3..1167bb3fc 100644 --- a/XIVSlothCombo/Combos/PvP/MCHPVP.cs +++ b/XIVSlothCombo/Combos/PvP/MCHPVP.cs @@ -47,49 +47,35 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID == BlastCharge) { var canWeave = CanWeave(actionID); - var hasAnalysis = GetRemainingCharges(Analysis); //How many stacks of Analysis we have - var hasDrill = GetRemainingCharges(OriginalHook(Drill)); //How many charges - var hasHeat = HasEffect(Buffs.Overheated); - var hasLB = HasPVPLimitBreak(); - var isLow = GetTargetHPPercent() < 33; - bool enemyGuard = TargetHasEffectAny(PvPCommon.Buffs.Guard); + var analysisStacks = GetRemainingCharges(Analysis); + var bigDamageStacks = GetRemainingCharges(OriginalHook(Drill)); + var overheated = HasEffect(Buffs.Overheated); - if (hasLB && isLow && !enemyGuard) - return MarksmanSpite; - - if (ActionReady(BishopTurret)) - return OriginalHook(BishopTurret); - - //Wildfire - if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_Wildfire) && - canWeave && hasHeat && ActionReady(Wildfire)) + if (canWeave && HasEffect(Buffs.Overheated) && IsOffCooldown(Wildfire)) return OriginalHook(Wildfire); - //HeatBlast - if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_HeatBlast) && hasHeat) + if (overheated) return OriginalHook(HeatBlast); - //Analysis - if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_Analysis) && (HasEffect(Buffs.DrillPrimed) || //Drill - (HasEffect(Buffs.ChainSawPrimed) && !IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis)) || //Chainsaw - (HasEffect(Buffs.AirAnchorPrimed) && IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis))) && //Alternate AirAnchor - !HasEffect(Buffs.Analysis) && hasAnalysis > 0 && (!IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltDrill) //Althernate Drill - || !ActionReady(Wildfire)) && !canWeave && !hasHeat && hasDrill > 0) + if ((HasEffect(Buffs.DrillPrimed) || + (HasEffect(Buffs.ChainSawPrimed) && !IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis)) || + (HasEffect(Buffs.AirAnchorPrimed) && IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltAnalysis))) && + !HasEffect(Buffs.Analysis) && analysisStacks > 0 && (!IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AltDrill) + || IsOnCooldown(Wildfire)) && !canWeave && !overheated && bigDamageStacks > 0) return OriginalHook(Analysis); - //Primed skills - if (hasDrill > 0) + if (bigDamageStacks > 0) { - if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_Drill) && HasEffect(Buffs.DrillPrimed)) + if (HasEffect(Buffs.DrillPrimed)) return OriginalHook(Drill); - if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_BioBlaster) && HasEffect(Buffs.BioblasterPrimed) && GetTargetDistance() <= 10) + if (HasEffect(Buffs.BioblasterPrimed) && GetTargetDistance() <= 12) return OriginalHook(BioBlaster); - if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_AirAnchor) && HasEffect(Buffs.AirAnchorPrimed)) + if (HasEffect(Buffs.AirAnchorPrimed)) return OriginalHook(AirAnchor); - if (IsEnabled(CustomComboPreset.MCHPvP_BurstMode_ChainSaw) && HasEffect(Buffs.ChainSawPrimed)) + if (HasEffect(Buffs.ChainSawPrimed)) return OriginalHook(ChainSaw); } } diff --git a/XIVSlothCombo/Combos/PvP/WARPVP.cs b/XIVSlothCombo/Combos/PvP/WARPVP.cs index ead0d9fe1..ebbe323e1 100644 --- a/XIVSlothCombo/Combos/PvP/WARPVP.cs +++ b/XIVSlothCombo/Combos/PvP/WARPVP.cs @@ -1,4 +1,3 @@ -using FFXIVClientStructs.FFXIV.Client.Game; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; @@ -16,7 +15,6 @@ internal const uint Onslaught = 29079, Orogeny = 29080, Blota = 29081, - PrimalScream = 29083, //LB Bloodwhetting = 29082; internal class Buffs @@ -26,60 +24,46 @@ internal const ushort InnerRelease = 1303; } - internal class Debuffs + public static class Config { - internal const ushort - Onslaught = 3029; - } + public static UserInt + WARPVP_BlotaTiming = new("WARPVP_BlotaTiming"); + } internal class WARPvP_BurstMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WARPvP_BurstMode; protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { - bool enemyStun = TargetHasEffectAny(PvPCommon.Debuffs.Stun); - bool enemyGuard = TargetHasEffectAny(PvPCommon.Buffs.Guard); - var canWeave = CanWeave(actionID); - if (actionID is HeavySwing or Maim or StormsPath) { - if (canWeave && !enemyGuard) - { - //Orogeny - if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Orogeny) && - ActionReady(Orogeny) && InMeleeRange() && !enemyGuard) //use on CD - return OriginalHook(Orogeny); - } + var canWeave = CanWeave(actionID); - //Bloodwhetting - if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Bloodwhetting) && - ActionReady(Bloodwhetting) && (ActionReady(PrimalRend) || GetCooldownRemainingTime(PrimalRend) > 5) && GetCooldownRemainingTime(Onslaught) < 1) //use before Primal Rend burst + if (!GetCooldown(Bloodwhetting).IsCooldown && (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Bloodwhetting) || canWeave)) return OriginalHook(Bloodwhetting); - //Blota - if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && !enemyStun && !enemyGuard && - (!InMeleeRange() && ActionReady(Blota) && !enemyStun && canWeave) || //use when out of range - (!IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Stunlock) && JustUsed(PrimalRend, 3f))) //stunlock + if (!InMeleeRange() && IsOffCooldown(Blota) && !TargetHasEffectAny(PvPCommon.Debuffs.Stun) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && Config.WARPVP_BlotaTiming == 0 && IsOffCooldown(PrimalRend)) return OriginalHook(Blota); - //Onslaught - if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Onslaught) && - ActionReady(Onslaught) && (ActionReady(PrimalRend)) && !enemyGuard) + if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_PrimalRend) && IsOffCooldown(PrimalRend)) + return OriginalHook(PrimalRend); + + if (!InMeleeRange() && IsOffCooldown(Blota) && !TargetHasEffectAny(PvPCommon.Debuffs.Stun) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && Config.WARPVP_BlotaTiming == 1 && IsOnCooldown(PrimalRend)) + return OriginalHook(Blota); + + if (!GetCooldown(Onslaught).IsCooldown && canWeave) return OriginalHook(Onslaught); - //ChaoticCyclone - if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_ChaoticCyclone) && - HasEffect(Buffs.NascentChaos) && !ActionReady(PrimalRend) && InMeleeRange()) //use on CD - return OriginalHook(Bloodwhetting); + if (InMeleeRange()) + { + if (HasEffect(Buffs.NascentChaos)) + return OriginalHook(Bloodwhetting); - //PrimalRend - if (!enemyGuard && JustUsed(Onslaught, 3f) && ActionReady(PrimalRend) && - (IsEnabled(CustomComboPreset.WARPvP_BurstMode_PrimalRend) || //use on CD - (!IsEnabled(CustomComboPreset.WARPvP_BurstMode_PrimalRend) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Stunlock) && GetCooldownRemainingTime(Blota) < 0.6f))) //stunlock - return OriginalHook(PrimalRend); + if (!GetCooldown(Orogeny).IsCooldown && canWeave) + return OriginalHook(Orogeny); + } } - return actionID; } } diff --git a/XIVSlothCombo/CustomCombo/CustomCombo.cs b/XIVSlothCombo/CustomCombo/CustomCombo.cs index 4c4bdbe0e..255fc9543 100644 --- a/XIVSlothCombo/CustomCombo/CustomCombo.cs +++ b/XIVSlothCombo/CustomCombo/CustomCombo.cs @@ -6,10 +6,6 @@ using XIVSlothCombo.Combos.PvE; using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Extensions; -using Dalamud.Game.ClientState.Objects.Types; -using FFXIVClientStructs.FFXIV.Component.GUI; -using XIVSlothCombo.Services; - namespace XIVSlothCombo.CustomComboNS { @@ -98,77 +94,4 @@ public unsafe bool TryInvoke(uint actionID, byte level, uint lastComboMove, floa /// The replacement action ID. protected abstract uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level); } - - /// Base class for each combo. - internal abstract partial class CustomCombo : CustomComboFunctions - { - #region Boss Check - // Rank 0 - Trash - // Rank 1 - Hunt Target (S/A/B). Eureka Pazuzu is also Rank 1. Fate bosses might also be R1. Haven't checked. - // Rank 2 - Final Dungeon Boss, Trial Boss, Raid Boss, Alliance Raid Boss. - // Rank 3 - Trash - // Rank 4 - Raid Trash (Alexander) - // Rank 5 - There is no Rank 5 - // Rank 6 - First 2 bosses in dungeons. - // Rank 7 - PvP stuff? - // Rank 8 - A puppy. - // 32, 33 34, 35, 36, 37 - Old Diadem mobs. - // Rank checks are very reliable. The HP check is done for unsynced content mainly. - // There are probably better ways of doing than relying on HP for unsync stuff but this works. - // For how to use, obviously just add a BossCheck() on dots for example. (Higanbana would be the perfect use case since the dot takes so long to be worth using) - protected static uint DataId() - { - if (CurrentTarget is not IBattleChara chara) - return 0; - return chara.DataId; - } - public static bool BossCheck() - { - double maxHealth = LocalPlayer.MaxHp; - var rank = Svc.Data.GetExcelSheet()?.GetRow((uint)DataId()); - - return rank != null && EnemyHealthMaxHp() >= maxHealth * 11 && (rank.Rank == 2 || rank.Rank == 6); - } - public static bool BossCheckLast() - { - double maxHealth = LocalPlayer.MaxHp; - var rank = Svc.Data.GetExcelSheet()?.GetRow((uint)DataId()); - - return rank != null && EnemyHealthMaxHp() >= maxHealth * 11 && (rank.Rank == 2); - } - #endregion - - #region Item Usage - public unsafe void UseItem(uint itemId) - { - FFXIVClientStructs.FFXIV.Client.Game.ActionManager.Instance()->UseAction(FFXIVClientStructs.FFXIV.Client.Game.ActionType.Item, itemId, 0xE0000000, 65535, 0, 0, null); - } - #endregion - #region Can use potion - public unsafe static bool CanUse() - { - var PotionCDGroup = 68; - bool canpot = ActionManager.Instance()->GetRecastGroupDetail(PotionCDGroup)->IsActive == 0; - return canpot; - } - // Execution can be called with something like this if (CanUse()) UseItem(1038956); - // that's the code for a HQ Hyper-Potion. - // This does NOT replace the action on the hotbar. The item is just...used so the conditions must be quite strict, but it works. - - #endregion - - #region Limit Break - // Not much else to say. Gets called like if (HasPVPLimitBreak()) return MarksmanSpite; - // Ofc, additional conditions as required, no guard, no full on HP. - public unsafe bool HasPVPLimitBreak() - { - AtkUnitBase* LBWidget = (AtkUnitBase*)Svc.GameGui.GetAddonByName("_LimitBreak", 1); - if (LBWidget->UldManager.SearchNodeById(6)->GetComponent()->UldManager.SearchNodeById(3)->Width >= 146) - return true; - return false; - } - #endregion - - } - } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index 6ad58f456..d33a2869e 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1583,10 +1583,10 @@ internal static void Draw(CustomComboPreset preset, bool enabled) UserConfig.DrawSliderInt(2, 8, DRGPvP.Config.DRGPvP_LOTD_Duration, "Seconds remaining of Life of the Dragon buff before using Nastrond if you are still above the set HP percentage.", 150, SliderIncrements.Ones); if (preset is CustomComboPreset.DRGPvP_ChaoticSpringSustain) - UserConfig.DrawSliderInt(0, 101, DRGPvP.Config.DRGPvP_CS_HP_Threshold, "Chaotic Spring HP percentage threshold", 150, SliderIncrements.Ones); + UserConfig.DrawSliderInt(0, 101, DRGPvP.Config.DRGPvP_CS_HP_Threshold, "Chaos Spring HP percentage threshold", 150, SliderIncrements.Ones); if (preset is CustomComboPreset.DRGPvP_WyrmwindThrust) - UserConfig.DrawSliderInt(0, 20, DRGPvP.Config.DRGPvP_Distance_Threshold, "Distance Threshold for Wyrmwind Thrust", 150, SliderIncrements.Ones); + UserConfig.DrawSliderInt(0, 20, DRGPvP.Config.DRGPvP_Distance_Threshold, "Distance Treshold for Wyrmwind Thrust", 150, SliderIncrements.Ones); #endregion #endregion @@ -2476,6 +2476,12 @@ internal static void Draw(CustomComboPreset preset, bool enabled) if (preset == CustomComboPreset.WAR_AoE_Overpower_Infuriate) UserConfig.DrawSliderInt(0, 50, WAR.Config.WAR_InfuriateAoEGauge, "Use when gauge is under or equal to"); + if (preset == CustomComboPreset.WARPvP_BurstMode_Blota) + { + UserConfig.DrawHorizontalRadioButton(WARPvP.Config.WARPVP_BlotaTiming, "Before Primal Rend", "", 0); + UserConfig.DrawHorizontalRadioButton(WARPvP.Config.WARPVP_BlotaTiming, "After Primal Rend", "", 1); + } + #endregion // ==================================================================================== #region WHITE MAGE From efe7b101ec1ce0a12cd8cfa8fdf60a3d7b2fe82f Mon Sep 17 00:00:00 2001 From: Kaeris Date: Sat, 17 Aug 2024 12:30:35 +0100 Subject: [PATCH 112/142] Status ownership revision --- ECommons | 2 +- XIVSlothCombo/CustomCombo/Functions/Status.cs | 23 +++++++++--- XIVSlothCombo/Window/Tabs/Debug.cs | 35 ++++--------------- 3 files changed, 26 insertions(+), 34 deletions(-) diff --git a/ECommons b/ECommons index 3f2259f83..540b7a353 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 3f2259f8314e54077d509463a32f72506ff6845c +Subproject commit 540b7a353814a9d3ed418a2027f5a6f7c4380e9c diff --git a/XIVSlothCombo/CustomCombo/Functions/Status.cs b/XIVSlothCombo/CustomCombo/Functions/Status.cs index 6cd59153a..caede3cc2 100644 --- a/XIVSlothCombo/CustomCombo/Functions/Status.cs +++ b/XIVSlothCombo/CustomCombo/Functions/Status.cs @@ -20,9 +20,16 @@ public static byte GetBuffStacks(ushort effectId) return eff?.StackCount ?? 0; } - public unsafe static float GetBuffRemainingTime(ushort effectId) + /// Gets the duration of a status effect on the player. By default, the effect must be owned by the player or unowned. + /// Status effect ID. + /// Whether the status effect must be owned by the player, or whether it can be owned by anyone. + /// A value indicating if the effect exists. + public unsafe static float GetBuffRemainingTime(ushort effectId, bool isPlayerOwned = true) { - Status? eff = FindEffect(effectId); + Status? eff = (isPlayerOwned == true) + ? FindEffect(effectId) + : FindEffectAny(effectId); + if (eff is null) return 0; if (eff.RemainingTime < 0) return (eff.RemainingTime * -1) + ActionManager.Instance()->AnimationLock; return eff.RemainingTime; @@ -43,10 +50,16 @@ public unsafe static float GetBuffRemainingTime(ushort effectId) /// Status object or null. public static Status? FindTargetEffect(ushort effectID) => FindEffect(effectID, CurrentTarget, LocalPlayer?.GameObjectId); - /// - public unsafe static float GetDebuffRemainingTime(ushort effectId) + /// Gets the duration of a status effect on the current target. By default, the effect must be owned by the player or unowned. + /// Status effect ID. + /// Whether the status effect must be owned by the player, or whether it can be owned by anyone. + /// A value indicating if the effect exists. + public unsafe static float GetDebuffRemainingTime(ushort effectId, bool isPlayerOwned = true) { - Status? eff = FindTargetEffect(effectId); + Status? eff = (isPlayerOwned == true) + ? FindTargetEffect(effectId) + : FindTargetEffectAny(effectId); + if (eff is null) return 0; if (eff.RemainingTime < 0) return (eff.RemainingTime * -1) + ActionManager.Instance()->AnimationLock; return eff.RemainingTime; diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index 054272b34..e8db2132d 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -2,7 +2,6 @@ using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Interface.Colors; using ECommons.DalamudServices; -using FFXIVClientStructs.FFXIV.Client.Game; using ImGuiNET; using System; using System.Linq; @@ -62,18 +61,11 @@ static void CustomStyleText(string label, object? value) if (!string.IsNullOrEmpty(ActionWatching.GetStatusName(status.StatusId))) { CustomStyleText(ActionWatching.GetStatusName(status.StatusId) + ":", status.StatusId); - - } - else - { - CustomStyleText("", status.StatusId); } - - float buffDuration = (CustomComboFunctions.FindEffectAny((ushort)status.StatusId).RemainingTime < 0) - ? (CustomComboFunctions.FindEffectAny((ushort)status.StatusId).RemainingTime * -1) + ActionManager.Instance()->AnimationLock - : CustomComboFunctions.FindEffectAny((ushort)status.StatusId).RemainingTime; + else CustomStyleText("", status.StatusId); // Duration + Blacklist Check + float buffDuration = CustomComboFunctions.GetBuffRemainingTime((ushort)status.StatusId, false); if (buffDuration != 0 && !statusBlacklist.Contains(status.StatusId)) { string formattedDuration; @@ -82,10 +74,7 @@ static void CustomStyleText(string label, object? value) int minutes = (int)(buffDuration / 60); formattedDuration = $"{minutes}m"; } - else - { - formattedDuration = $"{Math.Round(buffDuration, 1)}s"; - } + else formattedDuration = $"{buffDuration:F1}s"; ImGui.SameLine(0, 4f); CustomStyleText("", $"({formattedDuration})"); @@ -111,18 +100,11 @@ static void CustomStyleText(string label, object? value) if (!string.IsNullOrEmpty(ActionWatching.GetStatusName(status.StatusId))) { CustomStyleText(ActionWatching.GetStatusName(status.StatusId) + ":", status.StatusId); - - } - else - { - CustomStyleText("", status.StatusId); } - - float debuffDuration = (CustomComboFunctions.FindTargetEffectAny((ushort)status.StatusId).RemainingTime < 0) - ? (CustomComboFunctions.FindTargetEffectAny((ushort)status.StatusId).RemainingTime * -1) + ActionManager.Instance()->AnimationLock - : CustomComboFunctions.FindTargetEffectAny((ushort)status.StatusId).RemainingTime; + else CustomStyleText("", status.StatusId); // Duration + Blacklist Check + float debuffDuration = CustomComboFunctions.GetDebuffRemainingTime((ushort)status.StatusId, false); if (debuffDuration != 0 && !statusBlacklist.Contains(status.StatusId)) { string formattedDuration; @@ -131,10 +113,7 @@ static void CustomStyleText(string label, object? value) int minutes = (int)(debuffDuration / 60); formattedDuration = $"{minutes}m"; } - else - { - formattedDuration = $"{Math.Round(debuffDuration, 1)}s"; - } + else formattedDuration = $"{debuffDuration:F1}s"; ImGui.SameLine(0, 4f); CustomStyleText("", $"({formattedDuration})"); @@ -181,7 +160,7 @@ static void CustomStyleText(string label, object? value) CustomStyleText("Last Weaponskill:", ActionWatching.GetActionName(ActionWatching.LastWeaponskill)); CustomStyleText("Last Spell:", ActionWatching.GetActionName(ActionWatching.LastSpell)); CustomStyleText("Last Ability:", ActionWatching.GetActionName(ActionWatching.LastAbility)); - CustomStyleText("Combo Timer:", Math.Round(CustomComboFunctions.ComboTimer, 1)); + CustomStyleText("Combo Timer:", $"{CustomComboFunctions.ComboTimer:F1}"); CustomStyleText("Combo Action:", CustomComboFunctions.ComboAction == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(CustomComboFunctions.ComboAction)) ? "Unknown" : ActionWatching.GetActionName(CustomComboFunctions.ComboAction))} (ID: {CustomComboFunctions.ComboAction})"); CustomStyleText("Cast Action:", LocalPlayer.CastActionId == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(LocalPlayer.CastActionId)) ? "Unknown" : ActionWatching.GetActionName(LocalPlayer.CastActionId))} (ID: {LocalPlayer.CastActionId})"); CustomStyleText("Cast Time:", $"{LocalPlayer.CurrentCastTime:F2} / {LocalPlayer.TotalCastTime:F2}"); From bc54e55721230dbf6cebfb4817b558760f0907c8 Mon Sep 17 00:00:00 2001 From: Kaeris Date: Sat, 17 Aug 2024 12:46:11 +0100 Subject: [PATCH 113/142] Organizing --- XIVSlothCombo/Window/Tabs/Debug.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XIVSlothCombo/Window/Tabs/Debug.cs b/XIVSlothCombo/Window/Tabs/Debug.cs index e8db2132d..1ddf70cec 100644 --- a/XIVSlothCombo/Window/Tabs/Debug.cs +++ b/XIVSlothCombo/Window/Tabs/Debug.cs @@ -162,8 +162,8 @@ static void CustomStyleText(string label, object? value) CustomStyleText("Last Ability:", ActionWatching.GetActionName(ActionWatching.LastAbility)); CustomStyleText("Combo Timer:", $"{CustomComboFunctions.ComboTimer:F1}"); CustomStyleText("Combo Action:", CustomComboFunctions.ComboAction == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(CustomComboFunctions.ComboAction)) ? "Unknown" : ActionWatching.GetActionName(CustomComboFunctions.ComboAction))} (ID: {CustomComboFunctions.ComboAction})"); - CustomStyleText("Cast Action:", LocalPlayer.CastActionId == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(LocalPlayer.CastActionId)) ? "Unknown" : ActionWatching.GetActionName(LocalPlayer.CastActionId))} (ID: {LocalPlayer.CastActionId})"); CustomStyleText("Cast Time:", $"{LocalPlayer.CurrentCastTime:F2} / {LocalPlayer.TotalCastTime:F2}"); + CustomStyleText("Cast Action:", LocalPlayer.CastActionId == 0 ? string.Empty : $"{(string.IsNullOrEmpty(ActionWatching.GetActionName(LocalPlayer.CastActionId)) ? "Unknown" : ActionWatching.GetActionName(LocalPlayer.CastActionId))} (ID: {LocalPlayer.CastActionId})"); ImGui.Spacing(); // Party Info From 023e9e842e5da475af095cf1afb83b4b30d15af5 Mon Sep 17 00:00:00 2001 From: Akinee Date: Sat, 17 Aug 2024 13:48:40 +0200 Subject: [PATCH 114/142] weave --- XIVSlothCombo/Combos/PvE/PCT.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index 5d63f9be9..60a3ee9f2 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -93,7 +93,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (actionID is FireInRed) { var gauge = GetJobGauge(); - bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardinCyan)) : CanSpellWeave(OriginalHook(FireInRed)); + bool canWeave = CanSpellWeave(ActionWatching.LastSpell); if (HasEffect(Buffs.Starstruck)) return OriginalHook(StarPrism); @@ -187,7 +187,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (actionID is FireInRed) { var gauge = GetJobGauge(); - bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardinCyan)) : CanSpellWeave(OriginalHook(FireInRed)) || CanSpellWeave(OriginalHook(HammerStamp)) || CanSpellWeave(CometinBlack) || CanSpellWeave(HolyInWhite) || CanSpellWeave(OriginalHook(CreatureMotif)) || CanSpellWeave(HammerMotif) || CanSpellWeave(LandscapeMotif); + bool canWeave = CanSpellWeave(ActionWatching.LastSpell); // Prepull logic if (!InCombat() || (InCombat() && CurrentTarget == null)) @@ -342,6 +342,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_BlizzardInCyan) && BlizzardIIinCyan.LevelChecked() && HasEffect(Buffs.SubtractivePalette)) return OriginalHook(BlizzardinCyan); } + return actionID; } } @@ -355,7 +356,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (actionID is FireIIinRed) { var gauge = GetJobGauge(); - bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardinCyan)) : CanSpellWeave(OriginalHook(FireInRed)); + bool canWeave = CanSpellWeave(ActionWatching.LastSpell); if (HasEffect(Buffs.Starstruck)) return OriginalHook(StarPrism); @@ -450,7 +451,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (actionID is FireIIinRed) { var gauge = GetJobGauge(); - bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardIIinCyan)) : CanSpellWeave(OriginalHook(FireInRed)) || CanSpellWeave(OriginalHook(HammerStamp)) || CanSpellWeave(CometinBlack) || CanSpellWeave(HolyInWhite) || CanSpellWeave(OriginalHook(CreatureMotif)) || CanSpellWeave(HammerMotif) || CanSpellWeave(LandscapeMotif); + bool canWeave = CanSpellWeave(ActionWatching.LastSpell); // Prepull logic From 280478cd2824758dce6c9becc01b5efe5dfff552 Mon Sep 17 00:00:00 2001 From: Kaeris Date: Sat, 17 Aug 2024 15:00:41 +0100 Subject: [PATCH 115/142] Description fix --- XIVSlothCombo/CustomCombo/Functions/Status.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/CustomCombo/Functions/Status.cs b/XIVSlothCombo/CustomCombo/Functions/Status.cs index caede3cc2..f213fbcde 100644 --- a/XIVSlothCombo/CustomCombo/Functions/Status.cs +++ b/XIVSlothCombo/CustomCombo/Functions/Status.cs @@ -22,8 +22,8 @@ public static byte GetBuffStacks(ushort effectId) /// Gets the duration of a status effect on the player. By default, the effect must be owned by the player or unowned. /// Status effect ID. - /// Whether the status effect must be owned by the player, or whether it can be owned by anyone. - /// A value indicating if the effect exists. + /// Whether the status effect must be owned by the player or can be owned by anyone. + /// The duration of the status effect. public unsafe static float GetBuffRemainingTime(ushort effectId, bool isPlayerOwned = true) { Status? eff = (isPlayerOwned == true) @@ -52,8 +52,8 @@ public unsafe static float GetBuffRemainingTime(ushort effectId, bool isPlayerOw /// Gets the duration of a status effect on the current target. By default, the effect must be owned by the player or unowned. /// Status effect ID. - /// Whether the status effect must be owned by the player, or whether it can be owned by anyone. - /// A value indicating if the effect exists. + /// Whether the status effect must be owned by the player or can be owned by anyone. + /// The duration of the status effect. public unsafe static float GetDebuffRemainingTime(ushort effectId, bool isPlayerOwned = true) { Status? eff = (isPlayerOwned == true) From e001a93dc2f7223659c3346f69d50183b205e10a Mon Sep 17 00:00:00 2001 From: Akinee Date: Sat, 17 Aug 2024 16:58:27 +0200 Subject: [PATCH 116/142] Remove holy in white from the end of the opener --- XIVSlothCombo/Combos/JobHelpers/PCT.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/PCT.cs b/XIVSlothCombo/Combos/JobHelpers/PCT.cs index 1d96f81ac..5d92e083c 100644 --- a/XIVSlothCombo/Combos/JobHelpers/PCT.cs +++ b/XIVSlothCombo/Combos/JobHelpers/PCT.cs @@ -171,8 +171,6 @@ private bool DoOpener(ref uint actionID) if (CustomComboFunctions.WasLastAction(RainbowDrip) && OpenerStep == 17) OpenerStep++; else if (OpenerStep == 17) actionID = RainbowDrip; - if (CustomComboFunctions.WasLastAction(HolyInWhite) && OpenerStep == 18) OpenerStep++; - else if (OpenerStep == 18) actionID = HolyInWhite; Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); @@ -183,7 +181,7 @@ private bool DoOpener(ref uint actionID) return false; } - if (OpenerStep > 18) // Assuming 18 is the last step + if (OpenerStep > 17) // Assuming 17 is the last step { CurrentState = OpenerState.OpenerFinished; Svc.Log.Information("Opener completed successfully."); From bec5f29c964c265bf8cdbf154e8b519fcbd46a6a Mon Sep 17 00:00:00 2001 From: Akinee Date: Sat, 17 Aug 2024 18:52:35 +0200 Subject: [PATCH 117/142] Mog fix --- XIVSlothCombo/Combos/PvE/PCT.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index 60a3ee9f2..7a0a741da 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -230,7 +230,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SteelMuse) && SteelMuse.LevelChecked() && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) return OriginalHook(SteelMuse); - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 40 || !ScenicMuse.LevelChecked())) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 60 || !ScenicMuse.LevelChecked())) return OriginalHook(MogoftheAges); if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SwitfcastOption) && @@ -488,7 +488,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SteelMuse) && SteelMuse.LevelChecked() && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) return OriginalHook(SteelMuse); - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 40 || !ScenicMuse.LevelChecked())) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 60 || !ScenicMuse.LevelChecked())) return OriginalHook(MogoftheAges); if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SwitfcastOption) && From ed6fc1686d0443b598f8894d0f20d502a559a09f Mon Sep 17 00:00:00 2001 From: Tartarga <109563717+Tartarga@users.noreply.github.com> Date: Sat, 17 Aug 2024 13:35:25 -0500 Subject: [PATCH 118/142] Level checked Vercure --- XIVSlothCombo/Combos/PvE/ALL.cs | 3 ++- XIVSlothCombo/Combos/PvE/RDM.cs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/PvE/ALL.cs b/XIVSlothCombo/Combos/PvE/ALL.cs index 2f2ade77a..05c3e5099 100644 --- a/XIVSlothCombo/Combos/PvE/ALL.cs +++ b/XIVSlothCombo/Combos/PvE/ALL.cs @@ -179,7 +179,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; if (IsOffCooldown(Swiftcast)) return Swiftcast; - if (LocalPlayer.ClassJob.Id is RDM.JobID) + if (LocalPlayer.ClassJob.Id is RDM.JobID && + ActionReady(RDM.Vercure)) return RDM.Vercure; } diff --git a/XIVSlothCombo/Combos/PvE/RDM.cs b/XIVSlothCombo/Combos/PvE/RDM.cs index 1bb541f6c..e47da42ae 100644 --- a/XIVSlothCombo/Combos/PvE/RDM.cs +++ b/XIVSlothCombo/Combos/PvE/RDM.cs @@ -669,6 +669,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (schwifty || HasEffect(Buffs.Dualcast)) return Verraise; if (IsEnabled(CustomComboPreset.RDM_Raise_Vercure) && !schwifty && + ActionReady(Vercure) && IsOnCooldown(All.Swiftcast)) return Vercure; } From a67ff040500a6b81fc9c79ed44dc246427f7b765 Mon Sep 17 00:00:00 2001 From: Akinee Date: Sun, 18 Aug 2024 01:24:36 +0200 Subject: [PATCH 119/142] Lower lvl openers --- XIVSlothCombo/Combos/CustomComboPreset.cs | 2 +- XIVSlothCombo/Combos/JobHelpers/PCT.cs | 847 +++++++++++++++++++++- XIVSlothCombo/Combos/PvE/PCT.cs | 293 ++++++-- 3 files changed, 1066 insertions(+), 76 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index e28bd0993..4c263d8b7 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2363,7 +2363,7 @@ public enum CustomComboPreset PCT_ST_AdvancedMode = 20005, [ParentCombo(PCT_ST_AdvancedMode)] - [CustomComboInfo("Lvl 100 Opener Option", $"Uses the Balance Opener.", PCT.JobID)] + [CustomComboInfo("Balance Opener Option", $"Uses the Balance Opener depending on your current level. \n Supports lvl 70, 80, 90, 92, 100. \n - Requirements: \n - Starry Muse off cooldown \n - Pom. Weapon, Landscape Motif", PCT.JobID)] PCT_ST_Advanced_Openers = 20006, [ParentCombo(PCT_ST_AdvancedMode)] diff --git a/XIVSlothCombo/Combos/JobHelpers/PCT.cs b/XIVSlothCombo/Combos/JobHelpers/PCT.cs index 5d92e083c..9fc14df3e 100644 --- a/XIVSlothCombo/Combos/JobHelpers/PCT.cs +++ b/XIVSlothCombo/Combos/JobHelpers/PCT.cs @@ -12,7 +12,8 @@ namespace XIVSlothCombo.Combos.JobHelpers { - internal class PCTOpenerLogic : PCT + #region Lvl 100 Opener + internal class PCTOpenerLogicLvl100 : PCT { private static bool HasCooldowns() { @@ -103,7 +104,7 @@ private bool DoPrePullSteps(ref uint actionID) if (CustomComboFunctions.InCombat()) CurrentState = OpenerState.FailedOpener; - if(!HasMotifs()) + if (!HasMotifs()) CurrentState = OpenerState.FailedOpener; return true; @@ -222,5 +223,845 @@ public bool DoFullOpener(ref uint actionID) return false; } } -} + #endregion + + #region Lvl 92 Opener + internal class PCTOpenerLogicLvl92 : PCT + { + private static bool HasCooldowns() + { + if (CustomComboFunctions.GetRemainingCharges(SteelMuse) < 2) + return false; + + if (!CustomComboFunctions.ActionReady(ScenicMuse)) + return false; + + if (CustomComboFunctions.GetRemainingCharges(LivingMuse) < 2) + return false; + + return true; + } + + private static bool HasMotifs() + { + var gauge = CustomComboFunctions.GetJobGauge(); + + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Pom)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Weapon)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) + return false; + return true; + } + + private static uint OpenerLevel => 92; + + public uint PrePullStep = 0; + + public uint OpenerStep = 0; + + public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + + private static bool CanOpener => HasCooldowns() && HasMotifs() && LevelChecked; + + private OpenerState currentState = OpenerState.PrePull; + + public OpenerState CurrentState + { + get + { + return currentState; + } + set + { + if (value != currentState) + { + if (value == OpenerState.PrePull) + { + Svc.Log.Debug($"Entered PrePull Opener"); + } + if (value == OpenerState.InOpener) OpenerStep = 1; + if (value == OpenerState.OpenerFinished || value == OpenerState.FailedOpener) + { + if (value == OpenerState.FailedOpener) + Svc.Log.Information($"Opener Failed at step {OpenerStep}"); + + ResetOpener(); + } + if (value == OpenerState.OpenerFinished) Svc.Log.Information("Opener Finished"); + + currentState = value; + } + } + } + + private bool DoPrePullSteps(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CanOpener && PrePullStep == 0) + { + PrePullStep = 1; + } + + if (!HasCooldowns() && !HasMotifs()) + { + PrePullStep = 0; + } + + if (CurrentState == OpenerState.PrePull && PrePullStep > 0) + { + if (CustomComboFunctions.LocalPlayer.CastActionId == RainbowDrip && PrePullStep == 1) CurrentState = OpenerState.InOpener; + else if (PrePullStep == 1) actionID = RainbowDrip; + + if (CustomComboFunctions.InCombat()) + CurrentState = OpenerState.FailedOpener; + + if (!HasMotifs()) + CurrentState = OpenerState.FailedOpener; + + return true; + } + PrePullStep = 0; + return false; + } + + private bool DoOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (currentState == OpenerState.InOpener) + { + if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; + else if (OpenerStep == 1) actionID = StrikingMuse; + + if (CustomComboFunctions.WasLastAction(HolyInWhite) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = HolyInWhite; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; + else if (OpenerStep == 3) actionID = PomMuse; + + if (CustomComboFunctions.LocalPlayer.CastActionId == CustomComboFunctions.OriginalHook(CreatureMotif) && OpenerStep == 4) OpenerStep++; + else if (OpenerStep == 4) actionID = CustomComboFunctions.OriginalHook(CreatureMotif); + + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; + else if (OpenerStep == 5) actionID = StarryMuse; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; + else if (OpenerStep == 6) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = SubtractivePalette; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = BlizzardinCyan; + + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) actionID = StoneinYellow; + + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 10) OpenerStep++; + else if (OpenerStep == 10) actionID = ThunderinMagenta; + + if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == 11) OpenerStep++; + else if (OpenerStep == 11) actionID = CometinBlack; + + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 12) OpenerStep++; + else if (OpenerStep == 12) actionID = WingedMuse; + + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 13) OpenerStep++; + else if (OpenerStep == 13) actionID = MogoftheAges; + + if (CustomComboFunctions.WasLastAction(FireInRed) && OpenerStep == 14) OpenerStep++; + else if (OpenerStep == 14) actionID = FireInRed; + + if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == 15) OpenerStep++; + else if (OpenerStep == 15) actionID = HammerBrush; + + if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == 16) OpenerStep++; + else if (OpenerStep == 16) actionID = PolishingHammer; + + if (CustomComboFunctions.WasLastAction(RainbowDrip) && OpenerStep == 17) OpenerStep++; + else if (OpenerStep == 17) actionID = RainbowDrip; + + Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); + + if (ActionWatching.TimeSinceLastAction.TotalSeconds > 3) + { + CurrentState = OpenerState.FailedOpener; + Svc.Log.Warning("Opener Failed due to timeout."); + return false; + } + + + if (OpenerStep > 17) // Assuming 15 is the last step + { + CurrentState = OpenerState.OpenerFinished; + Svc.Log.Information("Opener completed successfully."); + return false; + } + + return true; + } + return false; + } + + private void ResetOpener() + { + PrePullStep = 0; + OpenerStep = 0; + } + + public bool DoFullOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CurrentState == OpenerState.PrePull) + if (DoPrePullSteps(ref actionID)) + return true; + + if (CurrentState == OpenerState.InOpener) + { + if (DoOpener(ref actionID)) + return true; + } + + if (!CustomComboFunctions.InCombat()) + { + ResetOpener(); + CurrentState = OpenerState.PrePull; + } + return false; + } + } + #endregion + + #region Lvl 90 Opener + internal class PCTOpenerLogicLvl90 : PCT + { + private static bool HasCooldowns() + { + if (CustomComboFunctions.GetRemainingCharges(SteelMuse) < 2) + return false; + + if (!CustomComboFunctions.ActionReady(ScenicMuse)) + return false; + + if (CustomComboFunctions.GetRemainingCharges(LivingMuse) < 2) + return false; + + return true; + } + + private static bool HasMotifs() + { + var gauge = CustomComboFunctions.GetJobGauge(); + + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Pom)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Weapon)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) + return false; + return true; + } + + private static uint OpenerLevel => 90; + + public uint PrePullStep = 0; + + public uint OpenerStep = 0; + + public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + + private static bool CanOpener => HasCooldowns() && HasMotifs() && LevelChecked; + + private OpenerState currentState = OpenerState.PrePull; + + public OpenerState CurrentState + { + get + { + return currentState; + } + set + { + if (value != currentState) + { + if (value == OpenerState.PrePull) + { + Svc.Log.Debug($"Entered PrePull Opener"); + } + if (value == OpenerState.InOpener) OpenerStep = 1; + if (value == OpenerState.OpenerFinished || value == OpenerState.FailedOpener) + { + if (value == OpenerState.FailedOpener) + Svc.Log.Information($"Opener Failed at step {OpenerStep}"); + + ResetOpener(); + } + if (value == OpenerState.OpenerFinished) Svc.Log.Information("Opener Finished"); + + currentState = value; + } + } + } + + private bool DoPrePullSteps(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CanOpener && PrePullStep == 0) + { + PrePullStep = 1; + } + + if (!HasCooldowns() && !HasMotifs()) + { + PrePullStep = 0; + } + + if (CurrentState == OpenerState.PrePull && PrePullStep > 0) + { + if (CustomComboFunctions.WasLastAction(FireInRed) && PrePullStep == 1) CurrentState = OpenerState.InOpener; + else if (PrePullStep == 1) actionID = FireInRed; + + if (!HasMotifs()) + CurrentState = OpenerState.FailedOpener; + + return true; + } + PrePullStep = 0; + return false; + } + + private bool DoOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (currentState == OpenerState.InOpener) + { + if (!CustomComboFunctions.InCombat()) + { + CurrentState = OpenerState.FailedOpener; + Svc.Log.Warning("Opener Failed due to not being in combat."); + return false; + } + + if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; + else if (OpenerStep == 1) actionID = StrikingMuse; + + if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = AeroInGreen; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; + else if (OpenerStep == 3) actionID = PomMuse; + + if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == 4) OpenerStep++; + else if (OpenerStep == 4) actionID = WingMotif; + + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; + else if (OpenerStep == 5) actionID = StarryMuse; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; + else if (OpenerStep == 6) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = WingedMuse; + + if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = HammerBrush; + + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) actionID = MogoftheAges; + + if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == 10) OpenerStep++; + else if (OpenerStep == 10) actionID = PolishingHammer; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 11) OpenerStep++; + else if (OpenerStep == 11) actionID = SubtractivePalette; + + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 12) OpenerStep++; + else if (OpenerStep == 12) actionID = ThunderinMagenta; + + if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == 13) OpenerStep++; + else if (OpenerStep == 13) actionID = CometinBlack; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 14) OpenerStep++; + else if (OpenerStep == 14) actionID = BlizzardinCyan; + + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 15) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == 15) actionID = StoneinYellow; + + Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); + + if (ActionWatching.TimeSinceLastAction.TotalSeconds > 3) + { + CurrentState = OpenerState.FailedOpener; + Svc.Log.Warning("Opener Failed due to timeout."); + return false; + } + + + if (OpenerStep > 15) // Assuming 15 is the last step + { + CurrentState = OpenerState.OpenerFinished; + Svc.Log.Information("Opener completed successfully."); + return false; + } + + return true; + } + return false; + } + + private void ResetOpener() + { + PrePullStep = 0; + OpenerStep = 0; + } + + public bool DoFullOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CurrentState == OpenerState.PrePull) + if (DoPrePullSteps(ref actionID)) + return true; + + if (CurrentState == OpenerState.InOpener) + { + if (DoOpener(ref actionID)) + return true; + } + + if (!CustomComboFunctions.InCombat()) + { + ResetOpener(); + CurrentState = OpenerState.PrePull; + } + return false; + } + } + #endregion + + #region Lvl 80 Opener + internal class PCTOpenerLogicLvl80 : PCT + { + private static bool HasCooldowns() + { + if (!CustomComboFunctions.ActionReady(SteelMuse)) + return false; + + if (!CustomComboFunctions.ActionReady(ScenicMuse)) + return false; + + if (!CustomComboFunctions.ActionReady(LivingMuse)) + return false; + + return true; + } + + private static bool HasMotifs() + { + var gauge = CustomComboFunctions.GetJobGauge(); + + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Pom)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Weapon)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) + return false; + return true; + } + + private static uint OpenerLevel => 80; + + public uint PrePullStep = 0; + + public uint OpenerStep = 0; + + public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + + private static bool CanOpener => HasCooldowns() && HasMotifs() && LevelChecked; + + private OpenerState currentState = OpenerState.PrePull; + + public OpenerState CurrentState + { + get + { + return currentState; + } + set + { + if (value != currentState) + { + if (value == OpenerState.PrePull) + { + Svc.Log.Debug($"Entered PrePull Opener"); + } + if (value == OpenerState.InOpener) OpenerStep = 1; + if (value == OpenerState.OpenerFinished || value == OpenerState.FailedOpener) + { + if (value == OpenerState.FailedOpener) + Svc.Log.Information($"Opener Failed at step {OpenerStep}"); + + ResetOpener(); + } + if (value == OpenerState.OpenerFinished) Svc.Log.Information("Opener Finished"); + + currentState = value; + } + } + } + + private bool DoPrePullSteps(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CanOpener && PrePullStep == 0) + { + PrePullStep = 1; + } + + if (!HasCooldowns() && !HasMotifs()) + { + PrePullStep = 0; + } + + if (CurrentState == OpenerState.PrePull && PrePullStep > 0) + { + if (CustomComboFunctions.WasLastAction(FireInRed) && PrePullStep == 1) CurrentState = OpenerState.InOpener; + else if (PrePullStep == 1) actionID = FireInRed; + + if (!HasMotifs()) + CurrentState = OpenerState.FailedOpener; + + return true; + } + PrePullStep = 0; + return false; + } + + private bool DoOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (currentState == OpenerState.InOpener && CustomComboFunctions.InCombat()) + { + if (!CustomComboFunctions.InCombat()) + { + CurrentState = OpenerState.FailedOpener; + Svc.Log.Warning("Opener Failed due to not being in combat."); + return false; + } + + if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; + else if (OpenerStep == 1) actionID = StrikingMuse; + + if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = AeroInGreen; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; + else if (OpenerStep == 3) actionID = PomMuse; + + if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == 4) OpenerStep++; + else if (OpenerStep == 4) actionID = WingMotif; + + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; + else if (OpenerStep == 5) actionID = StarryMuse; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; + else if (OpenerStep == 6) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = WingedMuse; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) actionID = MogoftheAges; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 10) OpenerStep++; + else if (OpenerStep == 10) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 11) OpenerStep++; + else if (OpenerStep == 11) actionID = SubtractivePalette; + + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 12) OpenerStep++; + else if (OpenerStep == 12) actionID = ThunderinMagenta; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 13) OpenerStep++; + else if (OpenerStep == 13) actionID = BlizzardinCyan; + + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 14) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == 14) actionID = StoneinYellow; + + Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); + + if (ActionWatching.TimeSinceLastAction.TotalSeconds > 4) + { + CurrentState = OpenerState.FailedOpener; + Svc.Log.Warning("Opener Failed due to timeout."); + return false; + } + + if (OpenerStep > 14) // Assuming 15 is the last step + { + CurrentState = OpenerState.OpenerFinished; + Svc.Log.Information("Opener completed successfully."); + return false; + } + + return true; + } + return false; + } + + private void ResetOpener() + { + PrePullStep = 0; + OpenerStep = 0; + } + + public bool DoFullOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CurrentState == OpenerState.PrePull) + if (DoPrePullSteps(ref actionID)) + return true; + + if (CurrentState == OpenerState.InOpener) + { + if (DoOpener(ref actionID)) + return true; + } + + if (!CustomComboFunctions.InCombat()) + { + ResetOpener(); + CurrentState = OpenerState.PrePull; + } + return false; + } + } + #endregion + + #region Lvl 70 Opener + internal class PCTOpenerLogicLvl70 : PCT + { + private static bool HasCooldowns() + { + if (!CustomComboFunctions.ActionReady(SteelMuse)) + return false; + + if (!CustomComboFunctions.ActionReady(ScenicMuse)) + return false; + + if (CustomComboFunctions.GetRemainingCharges(LivingMuse) < 2) + return false; + + return true; + } + + private static bool HasMotifs() + { + var gauge = CustomComboFunctions.GetJobGauge(); + + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Pom)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Weapon)) + return false; + if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) + return false; + return true; + } + + private static uint OpenerLevel => 70; + + public uint PrePullStep = 0; + + public uint OpenerStep = 0; + public static bool LevelChecked => CustomComboFunctions.LocalPlayer.Level >= OpenerLevel; + private static bool CanOpener => HasCooldowns() && HasMotifs() && LevelChecked; + + private OpenerState currentState = OpenerState.PrePull; + + public OpenerState CurrentState + { + get + { + return currentState; + } + set + { + if (value != currentState) + { + if (value == OpenerState.PrePull) + { + Svc.Log.Debug($"Entered PrePull Opener"); + } + if (value == OpenerState.InOpener) OpenerStep = 1; + if (value == OpenerState.OpenerFinished || value == OpenerState.FailedOpener) + { + if (value == OpenerState.FailedOpener) + Svc.Log.Information($"Opener Failed at step {OpenerStep}"); + + ResetOpener(); + } + if (value == OpenerState.OpenerFinished) Svc.Log.Information("Opener Finished"); + + currentState = value; + } + } + } + + private bool DoPrePullSteps(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CanOpener && PrePullStep == 0) + { + PrePullStep = 1; + } + + if (!HasCooldowns() && !HasMotifs()) + { + PrePullStep = 0; + } + + if (CurrentState == OpenerState.PrePull && PrePullStep > 0) + { + if (CustomComboFunctions.WasLastAction(FireInRed) && PrePullStep == 1) CurrentState = OpenerState.InOpener; + else if (PrePullStep == 1) actionID = FireInRed; + + if (!HasMotifs()) + CurrentState = OpenerState.FailedOpener; + + return true; + } + PrePullStep = 0; + return false; + } + + private bool DoOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (currentState == OpenerState.InOpener && CustomComboFunctions.InCombat()) + { + if (!CustomComboFunctions.InCombat()) + { + CurrentState = OpenerState.FailedOpener; + Svc.Log.Warning("Opener Failed due to not being in combat."); + return false; + } + + if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; + else if (OpenerStep == 1) actionID = StrikingMuse; + + if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = AeroInGreen; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; + else if (OpenerStep == 3) actionID = PomMuse; + + if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == 4) OpenerStep++; + else if (OpenerStep == 4) actionID = WingMotif; + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; + else if (OpenerStep == 5) actionID = StarryMuse; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; + else if (OpenerStep == 6) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 7) OpenerStep++; + else if (OpenerStep == 7) actionID = WingedMuse; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 8) OpenerStep++; + else if (OpenerStep == 8) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 9) OpenerStep++; + else if (OpenerStep == 9) actionID = MogoftheAges; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 10) OpenerStep++; + else if (OpenerStep == 10) actionID = HammerStamp; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 11) OpenerStep++; + else if (OpenerStep == 11) actionID = SubtractivePalette; + + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 12) OpenerStep++; + else if (OpenerStep == 12) actionID = ThunderinMagenta; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 13) OpenerStep++; + else if (OpenerStep == 13) actionID = BlizzardinCyan; + + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 14) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == 14) actionID = StoneinYellow; + + Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); + + if (ActionWatching.TimeSinceLastAction.TotalSeconds > 4) + { + CurrentState = OpenerState.FailedOpener; + Svc.Log.Warning("Opener Failed due to timeout."); + return false; + } + + if (OpenerStep > 14) // Assuming 14 is the last step + { + CurrentState = OpenerState.OpenerFinished; + Svc.Log.Information("Opener completed successfully."); + return false; + } + + return true; + } + return false; + } + + private void ResetOpener() + { + PrePullStep = 0; + OpenerStep = 0; + } + + public bool DoFullOpener(ref uint actionID) + { + if (!LevelChecked) + return false; + + if (CurrentState == OpenerState.PrePull) + if (DoPrePullSteps(ref actionID)) + return true; + + if (CurrentState == OpenerState.InOpener) + { + if (DoOpener(ref actionID)) + return true; + } + + if (!CustomComboFunctions.InCombat()) + { + ResetOpener(); + CurrentState = OpenerState.PrePull; + } + return false; + } + } + #endregion +} diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index 7a0a741da..b7d5f7442 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -180,14 +180,18 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb internal class PCT_ST_AdvancedMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.PCT_ST_AdvancedMode; - internal static PCTOpenerLogic PCTOpener = new(); + internal static PCTOpenerLogicLvl100 PCTOpenerLvl100 = new(); + internal static PCTOpenerLogicLvl92 PCTOpenerLvl92 = new(); + internal static PCTOpenerLogicLvl90 PCTOpenerLvl90 = new(); + internal static PCTOpenerLogicLvl80 PCTOpenerLvl80 = new(); + internal static PCTOpenerLogicLvl70 PCTOpenerLvl70 = new(); protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) { if (actionID is FireInRed) { var gauge = GetJobGauge(); - bool canWeave = CanSpellWeave(ActionWatching.LastSpell); + bool canWeave = CanSpellWeave(ActionWatching.LastSpell) || CanSpellWeave(actionID); // Prepull logic if (!InCombat() || (InCombat() && CurrentTarget == null)) @@ -203,53 +207,129 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Lvl 100 Opener - if (IsEnabled(CustomComboPreset.PCT_ST_Advanced_Openers) && LevelChecked(StarPrism)) + // Check if Openers are enabled and determine which opener to execute based on current level + if (IsEnabled(CustomComboPreset.PCT_ST_Advanced_Openers)) { - if (PCTOpener.DoFullOpener(ref actionID)) - return actionID; + // Lvl 100 Opener + if (StarPrism.LevelChecked()) + { + if (PCTOpenerLvl100.DoFullOpener(ref actionID)) + return actionID; + } + // Lvl 92 Opener + else if (!StarPrism.LevelChecked() && RainbowDrip.LevelChecked()) + { + if (PCTOpenerLvl92.DoFullOpener(ref actionID)) + return actionID; + } + // Lvl 90 Opener + else if (!StarPrism.LevelChecked() && !RainbowDrip.LevelChecked() && CometinBlack.LevelChecked()) + { + if (PCTOpenerLvl90.DoFullOpener(ref actionID)) + return actionID; + } + // Lvl 80 Opener + else if (!StarPrism.LevelChecked() && !CometinBlack.LevelChecked() && HolyInWhite.LevelChecked()) + { + if (PCTOpenerLvl80.DoFullOpener(ref actionID)) + return actionID; + } + // Lvl 70 Opener + else if (!StarPrism.LevelChecked() && !CometinBlack.LevelChecked() && !HolyInWhite.LevelChecked() && StarryMuse.LevelChecked()) + { + if (PCTOpenerLvl70.DoFullOpener(ref actionID)) + return actionID; + } } // General Weaves if (InCombat() && canWeave) { - //Muses - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_ScenicMuse) && ScenicMuse.LevelChecked() && gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && IsOffCooldown(ScenicMuse)) - return OriginalHook(ScenicMuse); + // Scenic Muse + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_ScenicMuse)) + { + if (ScenicMuse.LevelChecked() && + gauge.LandscapeMotifDrawn && + gauge.WeaponMotifDrawn && + IsOffCooldown(ScenicMuse)) + { + return OriginalHook(ScenicMuse); + } + } - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LivingMuse) && LivingMuse.LevelChecked() && gauge.CreatureMotifDrawn && - (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || - GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || - GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || !ScenicMuse.LevelChecked()) && - HasCharges(OriginalHook(LivingMuse)) && canWeave) + // Living Muse + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LivingMuse)) { - if (GetCooldown(ScenicMuse).CooldownRemaining > GetCooldownChargeRemainingTime(LivingMuse)) - return OriginalHook(LivingMuse); + if (LivingMuse.LevelChecked() && + gauge.CreatureMotifDrawn && + (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || + GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || + GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || + !ScenicMuse.LevelChecked()) && + HasCharges(OriginalHook(LivingMuse))) + { + if (GetCooldown(ScenicMuse).CooldownRemaining > GetCooldownChargeRemainingTime(LivingMuse)) + { + return OriginalHook(LivingMuse); + } + } } - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SteelMuse) && SteelMuse.LevelChecked() && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) - return OriginalHook(SteelMuse); + // Steel Muse + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SteelMuse)) + { + if (SteelMuse.LevelChecked() && + !HasEffect(Buffs.HammerTime) && + gauge.WeaponMotifDrawn && + HasCharges(OriginalHook(SteelMuse)) && + (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || + GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || + !ScenicMuse.LevelChecked())) + { + return OriginalHook(SteelMuse); + } + } - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 60 || !ScenicMuse.LevelChecked())) - return OriginalHook(MogoftheAges); + // MogoftheAges + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MogOfTheAges)) + { + if (MogoftheAges.LevelChecked() && + (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && + IsOffCooldown(OriginalHook(MogoftheAges)) && + (GetCooldownRemainingTime(StarryMuse) >= 60 || !ScenicMuse.LevelChecked())) + { + return OriginalHook(MogoftheAges); + } + } - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SwitfcastOption) && - IsMoving && - IsOffCooldown(All.Swiftcast) && - All.Swiftcast.LevelChecked() && - (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + // Swiftcast + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SwitfcastOption)) { - return All.Swiftcast; + if (IsMoving && + IsOffCooldown(All.Swiftcast) && + All.Swiftcast.LevelChecked() && + (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + { + return All.Swiftcast; + } } - // Palette - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && !HasEffect(Buffs.SubtractivePalette) && !HasEffect(Buffs.MonochromeTones)) + // Subtractive Palette + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SubtractivePalette)) { - if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) - return SubtractivePalette; + if (SubtractivePalette.LevelChecked() && + !HasEffect(Buffs.SubtractivePalette) && + !HasEffect(Buffs.MonochromeTones)) + { + if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) + { + return SubtractivePalette; + } + } } } + // Swiftcast Motifs if (HasEffect(All.Buffs.Swiftcast)) { if (!gauge.CreatureMotifDrawn && CreatureMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) @@ -261,6 +341,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } + // IsMoving logic if (IsMoving && InCombat()) { if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_MovementOption_HammerStampCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime)) @@ -293,18 +374,15 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_CometInBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) return CometinBlack; - // Check for HammerTime if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_HammerCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) return OriginalHook(HammerStamp); - // Check for Starstruck if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_StarPrism)) { if (HasEffect(Buffs.Starstruck) || HasEffect(Buffs.Starstruck) && GetBuffRemainingTime(Buffs.Starstruck) <= 3f) return StarPrism; } - // Check for RainbowBright if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_Burst_RainbowDrip)) { if (HasEffect(Buffs.RainbowBright) || HasEffect(Buffs.RainbowBright) && GetBuffRemainingTime(Buffs.StarryMuse) <= 3f) @@ -323,19 +401,44 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_HammerStampCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime)) return OriginalHook(HammerStamp); - if (!HasEffect(Buffs.StarryMuse)) { - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LandscapeMotif) && LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && GetCooldownRemainingTime(ScenicMuse) <= 20) - return OriginalHook(LandscapeMotif); + // Landscape Motif + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LandscapeMotif)) + { + if (LandscapeMotif.LevelChecked() && + !gauge.LandscapeMotifDrawn && + GetCooldownRemainingTime(ScenicMuse) <= 20) + { + return OriginalHook(LandscapeMotif); + } + } - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CreatureMotif) && CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn && (HasCharges(LivingMuse) || GetCooldownChargeRemainingTime(LivingMuse) <= 8)) - return OriginalHook(CreatureMotif); + // Creature Motif + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CreatureMotif)) + { + if (CreatureMotif.LevelChecked() && + !gauge.CreatureMotifDrawn && + (HasCharges(LivingMuse) || GetCooldownChargeRemainingTime(LivingMuse) <= 8)) + { + return OriginalHook(CreatureMotif); + } + } - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif) && WeaponMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime) && (HasCharges(SteelMuse) || GetCooldownChargeRemainingTime(SteelMuse) <= 8 && !HasEffect(Buffs.HammerTime))) - return OriginalHook(WeaponMotif); + // Weapon Motif + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif)) + { + if (WeaponMotif.LevelChecked() && + !HasEffect(Buffs.HammerTime) && + !gauge.WeaponMotifDrawn && + (HasCharges(SteelMuse) || GetCooldownChargeRemainingTime(SteelMuse) <= 8)) + { + return OriginalHook(WeaponMotif); + } + } } + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LucidDreaming) && All.LucidDreaming.LevelChecked() && ActionReady(All.LucidDreaming) && CanSpellWeave(actionID) && LocalPlayer.CurrentMp <= Config.PCT_ST_AdvancedMode_LucidOption) return All.LucidDreaming; @@ -453,7 +556,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb var gauge = GetJobGauge(); bool canWeave = CanSpellWeave(ActionWatching.LastSpell); - // Prepull logic if (!InCombat() || (InCombat() && CurrentTarget == null)) { @@ -471,49 +573,88 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // General Weaves if (InCombat() && canWeave) { - //Muses - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_ScenicMuse) && ScenicMuse.LevelChecked() && gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && IsOffCooldown(ScenicMuse)) - return OriginalHook(ScenicMuse); - - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LivingMuse) && LivingMuse.LevelChecked() && gauge.CreatureMotifDrawn && - (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || - GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || - GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || !ScenicMuse.LevelChecked()) && - HasCharges(OriginalHook(LivingMuse)) && canWeave) + // Living Muse + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LivingMuse)) { - if (GetCooldown(ScenicMuse).CooldownRemaining > GetCooldownChargeRemainingTime(LivingMuse)) + if (LivingMuse.LevelChecked() && + gauge.CreatureMotifDrawn && + (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || + GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || + !ScenicMuse.LevelChecked()) && + HasCharges(OriginalHook(LivingMuse))) + { return OriginalHook(LivingMuse); + } } - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SteelMuse) && SteelMuse.LevelChecked() && !HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked())) - return OriginalHook(SteelMuse); + // Scenic Muse + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_ScenicMuse)) + { + if (ScenicMuse.LevelChecked() && + gauge.LandscapeMotifDrawn && + gauge.WeaponMotifDrawn && + IsOffCooldown(ScenicMuse)) + { + return OriginalHook(ScenicMuse); + } + } - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MogOfTheAges) && MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldownRemainingTime(StarryMuse) >= 60 || !ScenicMuse.LevelChecked())) - return OriginalHook(MogoftheAges); + // Steel Muse + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SteelMuse)) + { + if (SteelMuse.LevelChecked() && + !HasEffect(Buffs.HammerTime) && + gauge.WeaponMotifDrawn && + HasCharges(OriginalHook(SteelMuse)) && + (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || + GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || + !ScenicMuse.LevelChecked())) + { + return OriginalHook(SteelMuse); + } + } + // MogoftheAges + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_MogOfTheAges)) + { + if (MogoftheAges.LevelChecked() && + (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && + (IsOffCooldown(OriginalHook(MogoftheAges)) || !ScenicMuse.LevelChecked())) + { + return OriginalHook(MogoftheAges); + } + } + + // Swiftcast Option if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SwitfcastOption) && IsMoving && IsOffCooldown(All.Swiftcast) && - All.Swiftcast.LevelChecked() && // Added this condition + All.Swiftcast.LevelChecked() && (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) { return All.Swiftcast; } - // Palette - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && !HasEffect(Buffs.SubtractivePalette) && !HasEffect(Buffs.MonochromeTones)) + // Subtractive Palette + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SubtractivePalette) && + SubtractivePalette.LevelChecked() && + !HasEffect(Buffs.SubtractivePalette) && + !HasEffect(Buffs.MonochromeTones)) { if (HasEffect(Buffs.SubtractiveSpectrum) || gauge.PalleteGauge >= 50) return SubtractivePalette; } } + if (HasEffect(All.Buffs.Swiftcast)) { if (!gauge.CreatureMotifDrawn && CreatureMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) return OriginalHook(CreatureMotif); + if (!gauge.WeaponMotifDrawn && HammerMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.StarryMuse)) return OriginalHook(HammerMotif); + if (!gauge.LandscapeMotifDrawn && LandscapeMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) return OriginalHook(LandscapeMotif); } @@ -551,28 +692,27 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_CometInBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) return CometinBlack; - // Check for HammerTime if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_HammerCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) return OriginalHook(HammerStamp); - // Check for Starstruck - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_StarPrism) && HasEffect(Buffs.Starstruck) || HasEffect(Buffs.Starstruck) && GetBuffRemainingTime(Buffs.Starstruck) < 3) - return StarPrism; + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_StarPrism)) + { + if (HasEffect(Buffs.Starstruck) || (HasEffect(Buffs.Starstruck) && GetBuffRemainingTime(Buffs.Starstruck) < 3)) + return StarPrism; + } - // Check for RainbowBright if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_RainbowDrip)) { - if (HasEffect(Buffs.RainbowBright) || HasEffect(Buffs.RainbowBright) && GetBuffRemainingTime(Buffs.StarryMuse) < 3) + if (HasEffect(Buffs.RainbowBright) || (HasEffect(Buffs.RainbowBright) && GetBuffRemainingTime(Buffs.StarryMuse) < 3)) return RainbowDrip; } - } if (HasEffect(Buffs.RainbowBright) && !HasEffect(Buffs.StarryMuse)) return RainbowDrip; - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CometinBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(StarryMuse) > 30) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CometinBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0 && GetCooldownRemainingTime(StarryMuse) > 60) return OriginalHook(CometinBlack); if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_HammerStampCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime)) @@ -581,14 +721,23 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (!HasEffect(Buffs.StarryMuse)) { - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LandscapeMotif) && LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && GetCooldownRemainingTime(ScenicMuse) <= 20) - return OriginalHook(LandscapeMotif); + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LandscapeMotif)) + { + if (LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && GetCooldownRemainingTime(ScenicMuse) <= 20) + return OriginalHook(LandscapeMotif); + } - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CreatureMotif) && CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn && (HasCharges(LivingMuse) || GetCooldownChargeRemainingTime(LivingMuse) <= 8)) - return OriginalHook(CreatureMotif); + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_CreatureMotif)) + { + if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn && (HasCharges(LivingMuse) || GetCooldownChargeRemainingTime(LivingMuse) <= 8)) + return OriginalHook(CreatureMotif); + } - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_WeaponMotif) && WeaponMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime) && (HasCharges(SteelMuse) || GetCooldownChargeRemainingTime(SteelMuse) <= 8 && !HasEffect(Buffs.HammerTime))) - return OriginalHook(WeaponMotif); + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_WeaponMotif)) + { + if (WeaponMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !gauge.WeaponMotifDrawn && (HasCharges(SteelMuse) || GetCooldownChargeRemainingTime(SteelMuse) <= 8)) + return OriginalHook(WeaponMotif); + } } if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LucidDreaming) && All.LucidDreaming.LevelChecked() && ActionReady(All.LucidDreaming) && CanSpellWeave(actionID) && LocalPlayer.CurrentMp <= Config.PCT_ST_AdvancedMode_LucidOption) From 1c8adf8e47786b7512bd2a18a33b086601aee79d Mon Sep 17 00:00:00 2001 From: Akinee Date: Sun, 18 Aug 2024 11:03:45 +0200 Subject: [PATCH 120/142] Added "Early Starry Muse Opener Option" --- XIVSlothCombo/Combos/CustomComboPreset.cs | 4 + XIVSlothCombo/Combos/JobHelpers/PCT.cs | 576 +++++++++++++++------- XIVSlothCombo/Combos/PvE/PCT.cs | 5 +- 3 files changed, 416 insertions(+), 169 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 4c263d8b7..613146500 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2366,6 +2366,10 @@ public enum CustomComboPreset [CustomComboInfo("Balance Opener Option", $"Uses the Balance Opener depending on your current level. \n Supports lvl 70, 80, 90, 92, 100. \n - Requirements: \n - Starry Muse off cooldown \n - Pom. Weapon, Landscape Motif", PCT.JobID)] PCT_ST_Advanced_Openers = 20006, + [ParentCombo(PCT_ST_Advanced_Openers)] + [CustomComboInfo("Early Balance Opener Option", $"Uses Early Starry Muse Balance Opener depending on your current level.", PCT.JobID)] + PCT_ST_Advanced_Openers_EarlyOpener = 20034, + [ParentCombo(PCT_ST_AdvancedMode)] [ReplaceSkill(PCT.FireInRed, PCT.AeroInGreen, PCT.WaterinBlue)] [CustomComboInfo("Prepull Motifs", "Adds missing Motifs to the combo while out of combat or while no target is present in combat.", PCT.JobID)] diff --git a/XIVSlothCombo/Combos/JobHelpers/PCT.cs b/XIVSlothCombo/Combos/JobHelpers/PCT.cs index 9fc14df3e..62319c2ce 100644 --- a/XIVSlothCombo/Combos/JobHelpers/PCT.cs +++ b/XIVSlothCombo/Combos/JobHelpers/PCT.cs @@ -9,12 +9,16 @@ using XIVSlothCombo.Combos.PvE; using XIVSlothCombo.CustomComboNS.Functions; using XIVSlothCombo.Data; +using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.JobHelpers { + #region Lvl 100 Opener internal class PCTOpenerLogicLvl100 : PCT { + + private static bool HasCooldowns() { if (!CustomComboFunctions.ActionReady(StarryMuse)) @@ -37,6 +41,8 @@ private static bool HasMotifs() return false; if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) return false; + if (CustomComboFunctions.HasEffect(Buffs.SubtractivePalette)) + return false; return true; } @@ -118,60 +124,95 @@ private bool DoOpener(ref uint actionID) if (!LevelChecked) return false; + bool isEarlyOpenerEnabled = CustomComboFunctions.IsEnabled(CustomComboPreset.PCT_ST_Advanced_Openers_EarlyOpener); + if (currentState == OpenerState.InOpener) { - if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = StrikingMuse; - if (CustomComboFunctions.WasLastAction(HolyInWhite) && OpenerStep == 2) OpenerStep++; - else if (OpenerStep == 2) actionID = HolyInWhite; + // If the early opener is not enabled, include HolyInWhite + if (!isEarlyOpenerEnabled) + { + if (CustomComboFunctions.WasLastAction(HolyInWhite) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = HolyInWhite; + } + + // Adjust step numbers based on if HolyInWhite was skipped + int adjustedStep = isEarlyOpenerEnabled ? 2 : 3; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = PomMuse; + + adjustedStep++; + + if (CustomComboFunctions.LocalPlayer.CastActionId == CustomComboFunctions.OriginalHook(CreatureMotif) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = CustomComboFunctions.OriginalHook(CreatureMotif); + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StarryMuse; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerStamp; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = SubtractivePalette; + + adjustedStep++; - if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; - else if (OpenerStep == 3) actionID = PomMuse; + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = BlizzardinCyan; - if (CustomComboFunctions.LocalPlayer.CastActionId == CustomComboFunctions.OriginalHook(CreatureMotif) && OpenerStep == 4) OpenerStep++; - else if (OpenerStep == 4) actionID = CustomComboFunctions.OriginalHook(CreatureMotif); + adjustedStep++; - if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; - else if (OpenerStep == 5) actionID = StarryMuse; + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StoneinYellow; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; - else if (OpenerStep == 6) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 7) OpenerStep++; - else if (OpenerStep == 7) actionID = SubtractivePalette; + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = ThunderinMagenta; - if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 8) OpenerStep++; - else if (OpenerStep == 8) actionID = BlizzardinCyan; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 9) OpenerStep++; - else if (OpenerStep == 9) actionID = StoneinYellow; + if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = CometinBlack; - if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 10) OpenerStep++; - else if (OpenerStep == 10) actionID = ThunderinMagenta; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == 11) OpenerStep++; - else if (OpenerStep == 11) actionID = CometinBlack; + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = WingedMuse; - if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 12) OpenerStep++; - else if (OpenerStep == 12) actionID = WingedMuse; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 13) OpenerStep++; - else if (OpenerStep == 13) actionID = MogoftheAges; + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = MogoftheAges; - if (CustomComboFunctions.WasLastAction(StarPrism) && OpenerStep == 14) OpenerStep++; - else if (OpenerStep == 14) actionID = StarPrism; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == 15) OpenerStep++; - else if (OpenerStep == 15) actionID = HammerBrush; + if (CustomComboFunctions.WasLastAction(StarPrism) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StarPrism; - if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == 16) OpenerStep++; - else if (OpenerStep == 16) actionID = PolishingHammer; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(RainbowDrip) && OpenerStep == 17) OpenerStep++; - else if (OpenerStep == 17) actionID = RainbowDrip; + if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerBrush; + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = PolishingHammer; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(RainbowDrip) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = RainbowDrip; Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); @@ -182,7 +223,7 @@ private bool DoOpener(ref uint actionID) return false; } - if (OpenerStep > 17) // Assuming 17 is the last step + if (OpenerStep > adjustedStep) { CurrentState = OpenerState.OpenerFinished; Svc.Log.Information("Opener completed successfully."); @@ -194,6 +235,7 @@ private bool DoOpener(ref uint actionID) return false; } + private void ResetOpener() { PrePullStep = 0; @@ -252,6 +294,8 @@ private static bool HasMotifs() return false; if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) return false; + if (CustomComboFunctions.HasEffect(Buffs.SubtractivePalette)) + return false; return true; } @@ -335,56 +379,91 @@ private bool DoOpener(ref uint actionID) if (currentState == OpenerState.InOpener) { + bool isEarlyOpenerEnabled = CustomComboFunctions.IsEnabled(CustomComboPreset.PCT_ST_Advanced_Openers_EarlyOpener); + if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = StrikingMuse; - if (CustomComboFunctions.WasLastAction(HolyInWhite) && OpenerStep == 2) OpenerStep++; - else if (OpenerStep == 2) actionID = HolyInWhite; + if (!isEarlyOpenerEnabled) + { + if (CustomComboFunctions.WasLastAction(HolyInWhite) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = HolyInWhite; + } + + int adjustedStep = isEarlyOpenerEnabled ? 2 : 3; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = PomMuse; + + adjustedStep++; + + if (CustomComboFunctions.LocalPlayer.CastActionId == CustomComboFunctions.OriginalHook(CreatureMotif) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = CustomComboFunctions.OriginalHook(CreatureMotif); + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StarryMuse; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerStamp; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = SubtractivePalette; + + adjustedStep++; - if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; - else if (OpenerStep == 3) actionID = PomMuse; + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = BlizzardinCyan; - if (CustomComboFunctions.LocalPlayer.CastActionId == CustomComboFunctions.OriginalHook(CreatureMotif) && OpenerStep == 4) OpenerStep++; - else if (OpenerStep == 4) actionID = CustomComboFunctions.OriginalHook(CreatureMotif); + adjustedStep++; - if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; - else if (OpenerStep == 5) actionID = StarryMuse; + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StoneinYellow; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; - else if (OpenerStep == 6) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 7) OpenerStep++; - else if (OpenerStep == 7) actionID = SubtractivePalette; + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = ThunderinMagenta; - if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 8) OpenerStep++; - else if (OpenerStep == 8) actionID = BlizzardinCyan; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 9) OpenerStep++; - else if (OpenerStep == 9) actionID = StoneinYellow; + if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = CometinBlack; - if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 10) OpenerStep++; - else if (OpenerStep == 10) actionID = ThunderinMagenta; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == 11) OpenerStep++; - else if (OpenerStep == 11) actionID = CometinBlack; + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = WingedMuse; - if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 12) OpenerStep++; - else if (OpenerStep == 12) actionID = WingedMuse; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 13) OpenerStep++; - else if (OpenerStep == 13) actionID = MogoftheAges; + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = MogoftheAges; - if (CustomComboFunctions.WasLastAction(FireInRed) && OpenerStep == 14) OpenerStep++; - else if (OpenerStep == 14) actionID = FireInRed; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == 15) OpenerStep++; - else if (OpenerStep == 15) actionID = HammerBrush; + if (CustomComboFunctions.WasLastAction(FireInRed) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = FireInRed; - if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == 16) OpenerStep++; - else if (OpenerStep == 16) actionID = PolishingHammer; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(RainbowDrip) && OpenerStep == 17) OpenerStep++; - else if (OpenerStep == 17) actionID = RainbowDrip; + if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerBrush; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = PolishingHammer; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(RainbowDrip) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = RainbowDrip; Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); @@ -395,8 +474,7 @@ private bool DoOpener(ref uint actionID) return false; } - - if (OpenerStep > 17) // Assuming 15 is the last step + if (OpenerStep > adjustedStep) { CurrentState = OpenerState.OpenerFinished; Svc.Log.Information("Opener completed successfully."); @@ -408,6 +486,7 @@ private bool DoOpener(ref uint actionID) return false; } + private void ResetOpener() { PrePullStep = 0; @@ -466,6 +545,8 @@ private static bool HasMotifs() return false; if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) return false; + if (CustomComboFunctions.HasEffect(Buffs.SubtractivePalette)) + return false; return true; } @@ -553,50 +634,104 @@ private bool DoOpener(ref uint actionID) return false; } + bool isEarlyOpenerEnabled = CustomComboFunctions.IsEnabled(CustomComboPreset.PCT_ST_Advanced_Openers_EarlyOpener); + if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = StrikingMuse; - if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; - else if (OpenerStep == 2) actionID = AeroInGreen; + if (!isEarlyOpenerEnabled) + { + if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = AeroInGreen; + } + + int adjustedStep = isEarlyOpenerEnabled ? 2 : 3; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = PomMuse; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = WingMotif; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StarryMuse; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerStamp; + + adjustedStep++; - if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; - else if (OpenerStep == 3) actionID = PomMuse; + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = WingedMuse; - if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == 4) OpenerStep++; - else if (OpenerStep == 4) actionID = WingMotif; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; - else if (OpenerStep == 5) actionID = StarryMuse; + if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerBrush; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; - else if (OpenerStep == 6) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 7) OpenerStep++; - else if (OpenerStep == 7) actionID = WingedMuse; + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = MogoftheAges; - if (CustomComboFunctions.WasLastAction(HammerBrush) && OpenerStep == 8) OpenerStep++; - else if (OpenerStep == 8) actionID = HammerBrush; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 9) OpenerStep++; - else if (OpenerStep == 9) actionID = MogoftheAges; + if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = PolishingHammer; - if (CustomComboFunctions.WasLastAction(PolishingHammer) && OpenerStep == 10) OpenerStep++; - else if (OpenerStep == 10) actionID = PolishingHammer; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 11) OpenerStep++; - else if (OpenerStep == 11) actionID = SubtractivePalette; + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = SubtractivePalette; - if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 12) OpenerStep++; - else if (OpenerStep == 12) actionID = ThunderinMagenta; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == 13) OpenerStep++; - else if (OpenerStep == 13) actionID = CometinBlack; + if (!isEarlyOpenerEnabled) + { + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = ThunderinMagenta; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = CometinBlack; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = BlizzardinCyan; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == adjustedStep) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == adjustedStep) actionID = StoneinYellow; + } + else + { + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StoneinYellow; + + adjustedStep++; - if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 14) OpenerStep++; - else if (OpenerStep == 14) actionID = BlizzardinCyan; + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = ThunderinMagenta; - if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 15) CurrentState = OpenerState.OpenerFinished; - else if (OpenerStep == 15) actionID = StoneinYellow; + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(CometinBlack) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = CometinBlack; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == adjustedStep) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == adjustedStep) actionID = BlizzardinCyan; + } Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); @@ -607,8 +742,7 @@ private bool DoOpener(ref uint actionID) return false; } - - if (OpenerStep > 15) // Assuming 15 is the last step + if (OpenerStep > adjustedStep) { CurrentState = OpenerState.OpenerFinished; Svc.Log.Information("Opener completed successfully."); @@ -620,6 +754,7 @@ private bool DoOpener(ref uint actionID) return false; } + private void ResetOpener() { PrePullStep = 0; @@ -678,6 +813,8 @@ private static bool HasMotifs() return false; if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) return false; + if (CustomComboFunctions.HasEffect(Buffs.SubtractivePalette)) + return false; return true; } @@ -758,54 +895,119 @@ private bool DoOpener(ref uint actionID) if (currentState == OpenerState.InOpener && CustomComboFunctions.InCombat()) { - if (!CustomComboFunctions.InCombat()) - { - CurrentState = OpenerState.FailedOpener; - Svc.Log.Warning("Opener Failed due to not being in combat."); - return false; - } + bool isEarlyOpenerEnabled = CustomComboFunctions.IsEnabled(CustomComboPreset.PCT_ST_Advanced_Openers_EarlyOpener); if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = StrikingMuse; - if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; - else if (OpenerStep == 2) actionID = AeroInGreen; + if (!isEarlyOpenerEnabled) + { + if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = AeroInGreen; + } + + int adjustedStep = isEarlyOpenerEnabled ? 2 : 3; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = PomMuse; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = WingMotif; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StarryMuse; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerStamp; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = WingedMuse; + + adjustedStep++; + if ((CustomComboFunctions.WasLastAction(HammerStamp) || CustomComboFunctions.WasLastAction(HammerBrush)) && OpenerStep == adjustedStep) + { + OpenerStep++; + } + else if (OpenerStep == adjustedStep) + { + if (HammerBrush.LevelChecked()) + { + actionID = HammerBrush; + } + else + { + actionID = HammerStamp; + } + } + + adjustedStep++; - if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; - else if (OpenerStep == 3) actionID = PomMuse; + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = MogoftheAges; - if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == 4) OpenerStep++; - else if (OpenerStep == 4) actionID = WingMotif; + adjustedStep++; + if ((CustomComboFunctions.WasLastAction(HammerStamp) || CustomComboFunctions.WasLastAction(PolishingHammer)) && OpenerStep == adjustedStep) + { + OpenerStep++; + } + else if (OpenerStep == adjustedStep) + { + if (PolishingHammer.LevelChecked()) + { + actionID = PolishingHammer; + } + else + { + actionID = HammerStamp; + } + } - if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; - else if (OpenerStep == 5) actionID = StarryMuse; + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = SubtractivePalette; + + adjustedStep++; + + if (!isEarlyOpenerEnabled) + { + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = ThunderinMagenta; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; - else if (OpenerStep == 6) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 7) OpenerStep++; - else if (OpenerStep == 7) actionID = WingedMuse; + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = BlizzardinCyan; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 8) OpenerStep++; - else if (OpenerStep == 8) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 9) OpenerStep++; - else if (OpenerStep == 9) actionID = MogoftheAges; + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == adjustedStep) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == adjustedStep) actionID = StoneinYellow; + } + else + { + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StoneinYellow; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 10) OpenerStep++; - else if (OpenerStep == 10) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 11) OpenerStep++; - else if (OpenerStep == 11) actionID = SubtractivePalette; + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = ThunderinMagenta; - if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 12) OpenerStep++; - else if (OpenerStep == 12) actionID = ThunderinMagenta; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 13) OpenerStep++; - else if (OpenerStep == 13) actionID = BlizzardinCyan; + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == adjustedStep) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == adjustedStep) actionID = BlizzardinCyan; + } - if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 14) CurrentState = OpenerState.OpenerFinished; - else if (OpenerStep == 14) actionID = StoneinYellow; Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); @@ -816,7 +1018,7 @@ private bool DoOpener(ref uint actionID) return false; } - if (OpenerStep > 14) // Assuming 15 is the last step + if (OpenerStep > (isEarlyOpenerEnabled ? 14 : 15)) { CurrentState = OpenerState.OpenerFinished; Svc.Log.Information("Opener completed successfully."); @@ -828,6 +1030,7 @@ private bool DoOpener(ref uint actionID) return false; } + private void ResetOpener() { PrePullStep = 0; @@ -886,6 +1089,8 @@ private static bool HasMotifs() return false; if (!gauge.CanvasFlags.HasFlag(Dalamud.Game.ClientState.JobGauge.Enums.CanvasFlags.Landscape)) return false; + if (CustomComboFunctions.HasEffect(Buffs.SubtractivePalette)) + return false; return true; } @@ -962,56 +1167,96 @@ private bool DoOpener(ref uint actionID) if (!LevelChecked) return false; - if (currentState == OpenerState.InOpener && CustomComboFunctions.InCombat()) + if (currentState == OpenerState.InOpener) { - if (!CustomComboFunctions.InCombat()) - { - CurrentState = OpenerState.FailedOpener; - Svc.Log.Warning("Opener Failed due to not being in combat."); - return false; - } + bool isEarlyOpenerEnabled = CustomComboFunctions.IsEnabled(CustomComboPreset.PCT_ST_Advanced_Openers_EarlyOpener); if (CustomComboFunctions.WasLastAction(StrikingMuse) && OpenerStep == 1) OpenerStep++; else if (OpenerStep == 1) actionID = StrikingMuse; - if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; - else if (OpenerStep == 2) actionID = AeroInGreen; + if (!isEarlyOpenerEnabled) + { + if (CustomComboFunctions.WasLastAction(AeroInGreen) && OpenerStep == 2) OpenerStep++; + else if (OpenerStep == 2) actionID = AeroInGreen; + } + + int adjustedStep = isEarlyOpenerEnabled ? 2 : 3; + + if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = PomMuse; + + adjustedStep++; - if (CustomComboFunctions.WasLastAction(PomMuse) && OpenerStep == 3) OpenerStep++; - else if (OpenerStep == 3) actionID = PomMuse; + if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = WingMotif; - if (CustomComboFunctions.WasLastAction(WingMotif) && OpenerStep == 4) OpenerStep++; - else if (OpenerStep == 4) actionID = WingMotif; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == 5) OpenerStep++; - else if (OpenerStep == 5) actionID = StarryMuse; + if (CustomComboFunctions.WasLastAction(StarryMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StarryMuse; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 6) OpenerStep++; - else if (OpenerStep == 6) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == 7) OpenerStep++; - else if (OpenerStep == 7) actionID = WingedMuse; + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerStamp; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 8) OpenerStep++; - else if (OpenerStep == 8) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == 9) OpenerStep++; - else if (OpenerStep == 9) actionID = MogoftheAges; + if (CustomComboFunctions.WasLastAction(WingedMuse) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = WingedMuse; - if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == 10) OpenerStep++; - else if (OpenerStep == 10) actionID = HammerStamp; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == 11) OpenerStep++; - else if (OpenerStep == 11) actionID = SubtractivePalette; + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerStamp; - if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == 12) OpenerStep++; - else if (OpenerStep == 12) actionID = ThunderinMagenta; + adjustedStep++; - if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == 13) OpenerStep++; - else if (OpenerStep == 13) actionID = BlizzardinCyan; + if (CustomComboFunctions.WasLastAction(MogoftheAges) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = MogoftheAges; - if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == 14) CurrentState = OpenerState.OpenerFinished; - else if (OpenerStep == 14) actionID = StoneinYellow; + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(HammerStamp) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = HammerStamp; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(SubtractivePalette) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = SubtractivePalette; + + adjustedStep++; + + if (!isEarlyOpenerEnabled) + { + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = ThunderinMagenta; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = BlizzardinCyan; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == adjustedStep) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == adjustedStep) actionID = StoneinYellow; + } + else + { + if (CustomComboFunctions.WasLastAction(StoneinYellow) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = StoneinYellow; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(ThunderinMagenta) && OpenerStep == adjustedStep) OpenerStep++; + else if (OpenerStep == adjustedStep) actionID = ThunderinMagenta; + + adjustedStep++; + + if (CustomComboFunctions.WasLastAction(BlizzardinCyan) && OpenerStep == adjustedStep) CurrentState = OpenerState.OpenerFinished; + else if (OpenerStep == adjustedStep) actionID = BlizzardinCyan; + } Svc.Log.Debug($"TimeSinceLastAction: {ActionWatching.TimeSinceLastAction.TotalSeconds}, OpenerStep: {OpenerStep}"); @@ -1022,7 +1267,7 @@ private bool DoOpener(ref uint actionID) return false; } - if (OpenerStep > 14) // Assuming 14 is the last step + if (OpenerStep > 14) // Assuming 15 is the last step { CurrentState = OpenerState.OpenerFinished; Svc.Log.Information("Opener completed successfully."); @@ -1034,6 +1279,7 @@ private bool DoOpener(ref uint actionID) return false; } + private void ResetOpener() { PrePullStep = 0; diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index b7d5f7442..6d37e0727 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -425,7 +425,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Weapon Motif + // WeaponMotif if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif)) { if (WeaponMotif.LevelChecked() && @@ -651,10 +651,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (!gauge.CreatureMotifDrawn && CreatureMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) return OriginalHook(CreatureMotif); - if (!gauge.WeaponMotifDrawn && HammerMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.StarryMuse)) return OriginalHook(HammerMotif); - if (!gauge.LandscapeMotifDrawn && LandscapeMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse)) return OriginalHook(LandscapeMotif); } @@ -688,7 +686,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // Burst if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_Phase) && HasEffect(Buffs.StarryMuse)) { - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_CometInBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) return CometinBlack; From a320a48f82aad0db634adc0da41f83a3281e01d3 Mon Sep 17 00:00:00 2001 From: ace Date: Sun, 18 Aug 2024 10:45:12 -0700 Subject: [PATCH 121/142] Lv90 fixes --- XIVSlothCombo/Combos/PvE/GNB.cs | 58 +++++++++++++++++---------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 64187178d..80de5db23 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -190,10 +190,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { - if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && - GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min - || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2 && - (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts + if (JustUsed(NoMercy, 3f) && + ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min + || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo == 3) //1min 3 carts + || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -211,7 +211,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv100 if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min + if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min || (JustUsed(SonicBreak, 3f) && Ammo == 3) //1min NM 3 carts || (JustUsed(SolidBarrel, 3f) && Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) //1min NM 2 carts return DoubleDown; @@ -220,9 +220,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15)) //1min NM 2 carts + if ((Ammo >= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 2 carts + || (JustUsed(SonicBreak, 3f) && Ammo == 3)) //Opener return DoubleDown; } @@ -270,9 +271,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (HasEffect(Buffs.NoMercy)) { - if (GetCooldownRemainingTime(DoubleDown) > GCD * 3 && - ((LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) - || (!LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) + if (Ammo >= 1 && + ((LevelChecked(ReignOfBeasts) && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) + || (!LevelChecked(ReignOfBeasts) && GunStep == 0 && IsOnCooldown(DoubleDown) && IsOnCooldown(GnashingFang) && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) return BurstStrike; } } @@ -440,10 +441,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { - if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && - GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min - || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2 && - (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts + if (JustUsed(NoMercy, 3f) && + ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min + || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo == 3) //1min 3 carts + || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -462,7 +463,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv100 if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min + if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min || (JustUsed(SonicBreak, 3f) && Ammo == 3) //1min NM 3 carts || (JustUsed(SolidBarrel, 3f) && Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) //1min NM 2 carts return DoubleDown; @@ -471,9 +472,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15)) //1min NM 2 carts + if ((Ammo >= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 2 carts + || (JustUsed(SonicBreak, 3f) && Ammo == 3)) //Opener return DoubleDown; } @@ -521,15 +523,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (HasEffect(Buffs.NoMercy)) { - if (GetCooldownRemainingTime(DoubleDown) > GCD * 3 && - ((LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) - || (!LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) + if (Ammo >= 1 && + ((LevelChecked(ReignOfBeasts) && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) + || (!LevelChecked(ReignOfBeasts) && GunStep == 0 && IsOnCooldown(DoubleDown) && IsOnCooldown(GnashingFang) && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) return BurstStrike; } } //Lv100 2cart 2min starter - if (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) + if (LevelChecked(ReignOfBeasts) && ((GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)))) return BurstStrike; //GF combo safety net @@ -818,11 +820,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.ReadyToBreak) && !HasEffect(Buffs.ReadyToRaze) && HasEffect(Buffs.NoMercy)) //use on CD return SonicBreak; //DoubleDown - if ( Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) //use on CD under NM + if (Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) //use on CD under NM return DoubleDown; //FatedCircle - if ((HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF - (Ammo > 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle))) // Bloodfest prep + if (Ammo > 0 && (HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF + (GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle))) // Bloodfest prep return FatedCircle; //Reign if (LevelChecked(ReignOfBeasts)) //because leaving this out anywhere is a waste @@ -908,8 +910,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.GNB_AoE_DoubleDown) && Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) //use on CD under NM return DoubleDown; //FatedCircle - if ((IsEnabled(CustomComboPreset.GNB_AoE_FatedCircle) && HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF - (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && Ammo > 0 && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle))) // Bloodfest prep + if (Ammo > 0 && ((IsEnabled(CustomComboPreset.GNB_AoE_FatedCircle) && HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF + (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)))) // Bloodfest prep return FatedCircle; //Reign if (IsEnabled(CustomComboPreset.GNB_AoE_Reign) && LevelChecked(ReignOfBeasts)) //because leaving this out anywhere is a waste From d8bdb5492c0cb390e48658c16ef31a1b062d457d Mon Sep 17 00:00:00 2001 From: Akinee Date: Sun, 18 Aug 2024 21:49:33 +0200 Subject: [PATCH 122/142] Low lvl living muse fix & Swiftcast waste fix --- XIVSlothCombo/Combos/PvE/PCT.cs | 54 +++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index 6d37e0727..d8396f9cc 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -263,14 +263,15 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (LivingMuse.LevelChecked() && gauge.CreatureMotifDrawn && (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || - GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || - GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || - !ScenicMuse.LevelChecked()) && - HasCharges(OriginalHook(LivingMuse))) + GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse))) { - if (GetCooldown(ScenicMuse).CooldownRemaining > GetCooldownChargeRemainingTime(LivingMuse)) + if (HasCharges(OriginalHook(LivingMuse))) { - return OriginalHook(LivingMuse); + if (!ScenicMuse.LevelChecked() || + GetCooldown(ScenicMuse).CooldownRemaining > GetCooldownChargeRemainingTime(LivingMuse)) + { + return OriginalHook(LivingMuse); + } } } } @@ -308,6 +309,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsMoving && IsOffCooldown(All.Swiftcast) && All.Swiftcast.LevelChecked() && + !HasEffect(Buffs.HammerTime) && + gauge.Paint < 1 && (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) { return All.Swiftcast; @@ -391,7 +394,6 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } - if (HasEffect(Buffs.RainbowBright) && !HasEffect(Buffs.StarryMuse)) return RainbowDrip; @@ -425,7 +427,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // WeaponMotif + // Weapon Motif if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif)) { if (WeaponMotif.LevelChecked() && @@ -579,11 +581,16 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (LivingMuse.LevelChecked() && gauge.CreatureMotifDrawn && (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || - GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || - !ScenicMuse.LevelChecked()) && - HasCharges(OriginalHook(LivingMuse))) + GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse))) { - return OriginalHook(LivingMuse); + if (HasCharges(OriginalHook(LivingMuse))) + { + if (!ScenicMuse.LevelChecked() || + GetCooldown(ScenicMuse).CooldownRemaining > GetCooldownChargeRemainingTime(LivingMuse)) + { + return OriginalHook(LivingMuse); + } + } } } @@ -625,16 +632,21 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Swiftcast Option - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SwitfcastOption) && - IsMoving && - IsOffCooldown(All.Swiftcast) && - All.Swiftcast.LevelChecked() && - (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SwitfcastOption)) { - return All.Swiftcast; + if (IsMoving && + IsOffCooldown(All.Swiftcast) && + All.Swiftcast.LevelChecked() && + !HasEffect(Buffs.HammerTime) && + gauge.Paint < 1 && + (!gauge.CreatureMotifDrawn || !gauge.WeaponMotifDrawn || !gauge.LandscapeMotifDrawn)) + { + return All.Swiftcast; + } } + // Subtractive Palette if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SubtractivePalette) && SubtractivePalette.LevelChecked() && @@ -686,18 +698,22 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // Burst if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_Phase) && HasEffect(Buffs.StarryMuse)) { + // Check for CometInBlack if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_CometInBlack) && CometinBlack.LevelChecked() && HasEffect(Buffs.MonochromeTones) && gauge.Paint > 0) return CometinBlack; + // Check for HammerTime if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_HammerCombo) && HammerStamp.LevelChecked() && HasEffect(Buffs.HammerTime) && !HasEffect(Buffs.Starstruck)) return OriginalHook(HammerStamp); + // Check for Starstruck if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_StarPrism)) { if (HasEffect(Buffs.Starstruck) || (HasEffect(Buffs.Starstruck) && GetBuffRemainingTime(Buffs.Starstruck) < 3)) return StarPrism; } + // Check for RainbowBright if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_Burst_RainbowDrip)) { if (HasEffect(Buffs.RainbowBright) || (HasEffect(Buffs.RainbowBright) && GetBuffRemainingTime(Buffs.StarryMuse) < 3)) From c6be34e12998fc79c057c2beed5b43c63ebeb8e1 Mon Sep 17 00:00:00 2001 From: ace Date: Sun, 18 Aug 2024 13:08:18 -0700 Subject: [PATCH 123/142] code cleanup --- XIVSlothCombo/Combos/CustomComboPreset.cs | 6 +- XIVSlothCombo/Combos/PvE/GNB.cs | 375 +++++++++++----------- 2 files changed, 196 insertions(+), 185 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 063a4e29b..3e65a855d 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1523,11 +1523,11 @@ public enum CustomComboPreset #region Gnashing Fang [ParentCombo(GNB_ST_Advanced)] [CustomComboInfo("Continuation Option", "Adds Continuation to the main combo.\n 'Gnashing Fang Starter' option must be enabled or started manually.", GNB.JobID)] - GNB_ST_Gnashing = 7005, + GNB_ST_Continuation = 7005, - [ParentCombo(GNB_ST_Gnashing)] + [ParentCombo(GNB_ST_Continuation)] [CustomComboInfo("Gnashing Fang Starter Option", "Begins Gnashing Fang for you on the main combo.", GNB.JobID)] - GNB_ST_GnashingFang_Starter = 7006, + GNB_ST_GnashingStarter = 7006, #endregion #region Cooldowns diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 80de5db23..d447fb68e 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -78,10 +78,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is KeenEdge) { - var Ammo = GetJobGauge().Ammo; //carts - var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + var Ammo = GetJobGauge().Ammo; //Our carts + var GunStep = GetJobGauge().AmmoComboStep; // For GnashingFang & (possibly) ReignCombo purposes var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; //SkS purposes - float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + var nmCD = GetCooldownRemainingTime(NoMercy); //NoMercy's cooldown; 60s total + var bfCD = GetCooldownRemainingTime(Bloodfest); // Bloodfest's cooldown; 120s total + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 is base SkS, but can work with 2.4x //Variant Cure if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) @@ -98,16 +100,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (CanWeave(actionID)) { if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use - return NoMercy; - // 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3)) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min 2cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && bfCD is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (bfCD is < 90 and > 15 || (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave) //<=Lv80 lateweave use + || (!LevelChecked(BurstStrike) && quarterWeave)) // 17) || //>=Lv60 + if (!LevelChecked(ReignOfBeasts) && !HasEffect(Buffs.NoMercy) && ((!ActionReady(GnashingFang) && nmCD > 17) || //>=Lv60 !LevelChecked(GnashingFang))) // 17)) + if (LevelChecked(ReignOfBeasts) && (JustUsed(DoubleDown, 3f) || nmCD > 17)) return OriginalHook(DangerZone); } @@ -147,7 +147,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(Continuation); //60s weaves - if (HasEffect(Buffs.NoMercy) && (!JustUsed(NoMercy, 3f))) + if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) { //>=Lv90 if (ActionReady(BowShock) && LevelChecked(BowShock)) @@ -167,7 +167,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //Hypervelocity - if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && nmCD > 1) return Hypervelocity; //GF combo @@ -180,9 +180,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv100 if (LevelChecked(ReignOfBeasts)) { - if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min - || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 15 && !ActionReady(DoubleDown) && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart - || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart + if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (bfCD < GCD * 12 || ActionReady(Bloodfest))) //2min + || (JustUsed(GnashingFang, 3f) && bfCD is < 90 and > 15 && !ActionReady(DoubleDown) && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart + || (Ammo == 3 && (bfCD is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -191,8 +191,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { if (JustUsed(NoMercy, 3f) && - ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min - || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo == 3) //1min 3 carts + ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && bfCD < GCD * 12 || ActionReady(Bloodfest)) //2min + || (bfCD is < 90 and > 15 && Ammo == 3) //1min 3 carts || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -209,9 +209,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if ((JustUsed(NoMercy, 20f) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && Ammo >= 2) { //Lv100 - if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) + if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) < 0.7f) { - if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min + if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && bfCD < GCD * 6 || ActionReady(Bloodfest)) //2min || (JustUsed(SonicBreak, 3f) && Ammo == 3) //1min NM 3 carts || (JustUsed(SolidBarrel, 3f) && Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) //1min NM 2 carts return DoubleDown; @@ -220,9 +220,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((Ammo >= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 2 carts + if ((Ammo >= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (bfCD < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak, 3f) && bfCD is < 90 and > 15) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel, 3f) && bfCD is < 90 and > 15) //1min NM 2 carts || (JustUsed(SonicBreak, 3f) && Ammo == 3)) //Opener return DoubleDown; } @@ -230,31 +230,32 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //= GCD * 4) && !HasEffect(Buffs.ReadyToRip) && IsOnCooldown(GnashingFang)) + if (HasEffect(Buffs.ReadyToBreak) && (GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && !HasEffect(Buffs.ReadyToRip) && !ActionReady(GnashingFang)) return SonicBreak; - if (ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) //subLv54 + if (ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || nmCD < 30) //subLv54 return OriginalHook(DangerZone); } } //Gnashing Fang - if (LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && Ammo > 0) + if (LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) < 0.7f && Ammo > 0) { - if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 + if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 && ActionReady(GnashingFang) && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown, 3f)) //Lv100 odd/even minute use || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown, 3f)) //Lv90 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && JustUsed(DoubleDown, 3f)) //Lv90 odd minute scuffed windows - || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && ActionReady(Bloodfest)) //Opener/Reopener Conditions - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) //= GCD * 24 && ActionReady(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) //30s use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && nmCD > GCD * 20 && JustUsed(DoubleDown, 3f)) //Lv90 odd minute scuffed windows + || (LevelChecked(DoubleDown) && !ActionReady(Bloodfest) && JustUsed(DoubleDown, 3f)) //Lv90+ Opener/Reopener conditions + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && JustUsed(NoMercy, 3f)) //Lv80 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && LevelChecked(Bloodfest) && Ammo == 1 && JustUsed(NoMercy, 3f) && ActionReady(Bloodfest)) //Lv80 Opener/Reopener + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && !LevelChecked(Bloodfest) && JustUsed(NoMercy, 3f)) //<=Lv79 use + || (nmCD > GCD * 7 && nmCD < GCD * 14)) //30s use return GnashingFang; } //Reign combo - if ((LevelChecked(ReignOfBeasts))) + if (LevelChecked(ReignOfBeasts)) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(GnashingFang) && !ActionReady(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -273,13 +274,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (Ammo >= 1 && ((LevelChecked(ReignOfBeasts) && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) - || (!LevelChecked(ReignOfBeasts) && GunStep == 0 && IsOnCooldown(DoubleDown) && IsOnCooldown(GnashingFang) && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) + || (!LevelChecked(ReignOfBeasts) && GunStep == 0 && !ActionReady(DoubleDown) && !ActionReady(GnashingFang) && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) return BurstStrike; } } //Lv100 2cart 2min starter - if (LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) + if (LevelChecked(ReignOfBeasts) && ((nmCD <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (bfCD < GCD * 12 || ActionReady(Bloodfest)))) return BurstStrike; //GF combo safety net @@ -293,7 +294,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BrutalShell; if (lastComboMove == BrutalShell && LevelChecked(SolidBarrel)) { - if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) //Lv100 Hypervelocity fit into NM check + if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && nmCD > 1) //Lv100 Hypervelocity fit into NM check return Hypervelocity; if (LevelChecked(BurstStrike) && Ammo == MaxCartridges(level)) return BurstStrike; @@ -320,10 +321,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is KeenEdge) { - var Ammo = GetJobGauge().Ammo; //carts - var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + var Ammo = GetJobGauge().Ammo; //Our carts + var GunStep = GetJobGauge().AmmoComboStep; // For GnashingFang & (possibly) ReignCombo purposes var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; //SkS purposes - float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + var nmCD = GetCooldownRemainingTime(NoMercy); //NoMercy's cooldown; 60s total + var bfCD = GetCooldownRemainingTime(Bloodfest); // Bloodfest's cooldown; 120s total + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 is base SkS, but can work with 2.4x //Variant Cure if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) @@ -343,20 +346,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (CanWeave(actionID)) { if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && bfCD is < 90 and > 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3)) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min 2cart force || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && bfCD is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (bfCD is < 90 and > 15 || (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave) //<=Lv80 lateweave use + || (!LevelChecked(BurstStrike) && quarterWeave)) // 17) || //>=Lv60 + if (!LevelChecked(ReignOfBeasts) && !HasEffect(Buffs.NoMercy) && ((!ActionReady(GnashingFang) && nmCD > 17) || //>=Lv60 !LevelChecked(GnashingFang))) // 17)) + if (LevelChecked(ReignOfBeasts) && (JustUsed(DoubleDown, 3f) || nmCD > 17)) return OriginalHook(DangerZone); } //Continuation - if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + if (IsEnabled(CustomComboPreset.GNB_ST_Continuation) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); //60s weaves @@ -418,22 +418,22 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //Hypervelocity - if (JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) + if (IsEnabled(CustomComboPreset.GNB_ST_Continuation) && JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && nmCD > 1) return Hypervelocity; //GF combo - if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + if (IsEnabled(CustomComboPreset.GNB_ST_Continuation) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); //Sonic Break - if (IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && JustUsed(NoMercy, 20f)) + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && JustUsed(NoMercy, 20f)) { //Lv100 if (LevelChecked(ReignOfBeasts)) { - if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min - || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && !ActionReady(DoubleDown) && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart - || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart + if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (bfCD < GCD * 12 || ActionReady(Bloodfest))) //2min + || (JustUsed(GnashingFang, 3f) && bfCD is < 90 and > 15 && !ActionReady(DoubleDown) && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart + || (Ammo == 3 && (bfCD is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -442,8 +442,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { if (JustUsed(NoMercy, 3f) && - ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min - || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo == 3) //1min 3 carts + ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && bfCD < GCD * 12 || ActionReady(Bloodfest)) //2min + || (bfCD is < 90 and > 15 && Ammo == 3) //1min 3 carts || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -461,9 +461,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (JustUsed(NoMercy, 20f) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && Ammo >= 2) { //Lv100 - if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) + if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) < 0.7f) { - if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min + if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && bfCD < GCD * 6 || ActionReady(Bloodfest)) //2min || (JustUsed(SonicBreak, 3f) && Ammo == 3) //1min NM 3 carts || (JustUsed(SolidBarrel, 3f) && Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) //1min NM 2 carts return DoubleDown; @@ -472,9 +472,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((Ammo >= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel, 3f) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 2 carts + if ((Ammo >= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (bfCD < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak, 3f) && bfCD is < 90 and > 15) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel, 3f) && bfCD is < 90 and > 15) //1min NM 2 carts || (JustUsed(SonicBreak, 3f) && Ammo == 3)) //Opener return DoubleDown; } @@ -482,31 +482,32 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //= GCD * 4) && !HasEffect(Buffs.ReadyToRip) && IsOnCooldown(GnashingFang)) + if (IsEnabled(CustomComboPreset.GNB_ST_SonicBreak) && HasEffect(Buffs.ReadyToBreak) && (GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && !HasEffect(Buffs.ReadyToRip) && !ActionReady(GnashingFang)) return SonicBreak; - if (IsEnabled(CustomComboPreset.GNB_ST_BlastingZone) && ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) //subLv54 + if (IsEnabled(CustomComboPreset.GNB_ST_BlastingZone) && ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || nmCD < 30) //subLv54 return OriginalHook(DangerZone); } } //Gnashing Fang - if (IsEnabled(CustomComboPreset.GNB_ST_GnashingFang_Starter) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && Ammo > 0) + if (IsEnabled(CustomComboPreset.GNB_ST_GnashingStarter) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) < 0.7f && Ammo > 0) { - if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 - && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv100 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv90 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && JustUsed(DoubleDown)) //Lv90 odd minute scuffed windows - || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && ActionReady(Bloodfest)) //Opener/Reopener Conditions - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) //= GCD * 24 && ActionReady(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) //30s use + if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 && ActionReady(GnashingFang) + && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown, 3f)) //Lv100 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown, 3f)) //Lv90 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && nmCD > GCD * 20 && JustUsed(DoubleDown, 3f)) //Lv90 odd minute scuffed windows + || (LevelChecked(DoubleDown) && !ActionReady(Bloodfest) && JustUsed(DoubleDown, 3f)) //Lv90+ Opener/Reopener conditions + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && JustUsed(NoMercy, 3f)) //Lv80 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && LevelChecked(Bloodfest) && Ammo == 1 && JustUsed(NoMercy, 3f) && ActionReady(Bloodfest)) //Lv80 Opener/Reopener + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && !LevelChecked(Bloodfest) && JustUsed(NoMercy, 3f)) //<=Lv79 use + || (nmCD > GCD * 7 && nmCD < GCD * 14)) //30s use return GnashingFang; } //Reign combo - if (IsEnabled(CustomComboPreset.GNB_ST_Reign) && (LevelChecked(ReignOfBeasts))) + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_Reign) && (LevelChecked(ReignOfBeasts))) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(GnashingFang) && !ActionReady(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -519,23 +520,24 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //Burst Strike - if (IsEnabled(CustomComboPreset.GNB_ST_BurstStrike) && LevelChecked(BurstStrike)) + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_BurstStrike) && LevelChecked(BurstStrike)) { if (HasEffect(Buffs.NoMercy)) { if (Ammo >= 1 && ((LevelChecked(ReignOfBeasts) && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) - || (!LevelChecked(ReignOfBeasts) && GunStep == 0 && IsOnCooldown(DoubleDown) && IsOnCooldown(GnashingFang) && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) + || (!LevelChecked(ReignOfBeasts) && GunStep == 0 && !ActionReady(DoubleDown) && !ActionReady(GnashingFang) && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) return BurstStrike; } } //Lv100 2cart 2min starter - if (LevelChecked(ReignOfBeasts) && ((GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)))) + if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_BurstStrike) && + LevelChecked(ReignOfBeasts) && ((nmCD <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (bfCD < GCD * 12 || ActionReady(Bloodfest)))) return BurstStrike; //GF combo safety net - if (IsEnabled(CustomComboPreset.GNB_ST_Gnashing) && GunStep is 1 or 2) + if (IsEnabled(CustomComboPreset.GNB_ST_Continuation) && GunStep is 1 or 2) return OriginalHook(GnashingFang); //123 (overcap included) @@ -545,7 +547,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return BrutalShell; if (lastComboMove == BrutalShell && LevelChecked(SolidBarrel)) { - if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(NoMercy) > 1) //Lv100 Hypervelocity fit into NM check + if (LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && nmCD > 1) //Lv100 Hypervelocity fit into NM check return Hypervelocity; if (LevelChecked(BurstStrike) && Ammo == MaxCartridges(level)) return BurstStrike; @@ -570,78 +572,85 @@ internal class GNB_GF_Features : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID is KeenEdge) + if (actionID is GnashingFang) { - var Ammo = GetJobGauge().Ammo; //carts - var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo + var Ammo = GetJobGauge().Ammo; //Our carts + var GunStep = GetJobGauge().AmmoComboStep; // For GnashingFang & (possibly) ReignCombo purposes var quarterWeave = GetCooldownRemainingTime(actionID) < 1 && GetCooldownRemainingTime(actionID) > 0.6; //SkS purposes - float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + var nmCD = GetCooldownRemainingTime(NoMercy); //NoMercy's cooldown; 60s total + var bfCD = GetCooldownRemainingTime(Bloodfest); // Bloodfest's cooldown; 120s total + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 is base SkS, but can work with 2.4x //No Mercy - if (IsEnabled(CustomComboPreset.GNB_GF_NoMercy)) + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && IsEnabled(CustomComboPreset.GNB_GF_NoMercy)) { if (ActionReady(NoMercy)) { - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { if ((LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest) && GetCooldownRemainingTime(DoubleDown) < GCD * 2) //Lv100 Opener/Reopener (0cart) - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3) //Lv100 1min - || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && bfCD is < 90 and > 15 && ((Ammo == 2 && lastComboMove is BrutalShell) || Ammo == 3)) //Lv100 1min + || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min 2cart force || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && bfCD is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 || (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave))) //<=Lv80 lateweave use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (bfCD is < 90 and > 15 || (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave) //<=Lv80 lateweave use + || (!LevelChecked(BurstStrike) && quarterWeave)) // 17) || //>=Lv60 - !LevelChecked(GnashingFang))) // 17)) - return OriginalHook(DangerZone); - } - - //60s weaves - if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) + //CDs + if (IsEnabled(CustomComboPreset.GNB_GF_Features)) { - //>=Lv90 - if (IsEnabled(CustomComboPreset.GNB_GF_BowShock) && ActionReady(BowShock) && LevelChecked(BowShock)) - return BowShock; - if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone)) - return OriginalHook(DangerZone); + //Bloodfest + if (IsEnabled(CustomComboPreset.GNB_GF_Bloodfest) && ActionReady(Bloodfest) && Ammo is 0 && (JustUsed(NoMercy, 20f))) + return Bloodfest; - // 17) || //>=Lv60 + !LevelChecked(GnashingFang))) // 17)) return OriginalHook(DangerZone); + } + + //Continuation + if (IsEnabled(CustomComboPreset.GNB_GF_Continuation) && LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) + return OriginalHook(Continuation); + + //60s weaves + if (HasEffect(Buffs.NoMercy) && (GetBuffRemainingTime(Buffs.NoMercy) < 17.5)) + { + //>=Lv90 if (IsEnabled(CustomComboPreset.GNB_GF_BowShock) && ActionReady(BowShock) && LevelChecked(BowShock)) return BowShock; + if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone)) + return OriginalHook(DangerZone); + + // 1) + if (IsEnabled(CustomComboPreset.GNB_GF_Continuation) && JustUsed(BurstStrike) && LevelChecked(Hypervelocity) && HasEffect(Buffs.ReadyToBlast) && nmCD > 1) return Hypervelocity; //GF combo @@ -649,14 +658,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(Continuation); //Sonic Break - if (IsEnabled(CustomComboPreset.GNB_GF_SonicBreak) && JustUsed(NoMercy, 20f)) + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && IsEnabled(CustomComboPreset.GNB_GF_SonicBreak) && JustUsed(NoMercy, 20f)) { //Lv100 if (LevelChecked(ReignOfBeasts)) { - if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) //2min - || (JustUsed(GnashingFang, 3f) && GetCooldownRemainingTime(Bloodfest) > GCD * 14 && GetCooldownRemainingTime(DoubleDown) > GCD * 14 && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart - || (Ammo == 3 && (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart + if ((Ammo == 2 && JustUsed(NoMercy, 3f) && !HasEffect(Buffs.ReadyToBlast) && (bfCD < GCD * 12 || ActionReady(Bloodfest))) //2min + || (JustUsed(GnashingFang, 3f) && bfCD is < 90 and > 15 && !ActionReady(DoubleDown) && Ammo == 0 && !HasEffect(Buffs.ReadyToRip) && HasEffect(Buffs.ReadyToBreak)) //1min 2cart + || (Ammo == 3 && (bfCD is < 90 and > 15 && JustUsed(NoMercy, 3f)) //1min 3cart || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -664,10 +673,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { - if ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && - GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest)) //2min - || (GetCooldownRemainingTime(Bloodfest) is < 90 and > 15 && Ammo >= 2 && - (JustUsed(KeenEdge) || JustUsed(BrutalShell) || JustUsed(SolidBarrel)))) //1min 3 carts + if (JustUsed(NoMercy, 3f) && + ((!HasEffect(Buffs.ReadyToBlast) && Ammo == 3 && bfCD < GCD * 12 || ActionReady(Bloodfest)) //2min + || (bfCD is < 90 and > 15 && Ammo == 3) //1min 3 carts + || (JustUsed(Bloodfest, 2f) && JustUsed(BrutalShell)))) //opener return SonicBreak; } @@ -680,13 +689,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //Double Down - if (IsEnabled(CustomComboPreset.GNB_GF_DoubleDown) && + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && IsEnabled(CustomComboPreset.GNB_GF_DoubleDown) && (JustUsed(NoMercy, 20f) || GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && Ammo >= 2) { //Lv100 - if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) + if (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) < 0.7f) { - if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && Ammo == 2 && GetCooldownRemainingTime(Bloodfest) < GCD * 6 || ActionReady(Bloodfest)) //2min + if ((JustUsed(SonicBreak, 3f) && !HasEffect(Buffs.ReadyToBreak) && bfCD < GCD * 6 || ActionReady(Bloodfest)) //2min || (JustUsed(SonicBreak, 3f) && Ammo == 3) //1min NM 3 carts || (JustUsed(SolidBarrel, 3f) && Ammo == 3 && HasEffect(Buffs.ReadyToBreak) && HasEffect(Buffs.NoMercy))) //1min NM 2 carts return DoubleDown; @@ -695,40 +704,42 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Lv90 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= 0.6f) { - if ((Ammo == 3 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak) && (GetCooldownRemainingTime(Bloodfest) < GCD * 4 || ActionReady(Bloodfest))) //2min NM 3 carts - || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15) //1min NM 3 carts - || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel) && GetCooldownRemainingTime(Bloodfest) is < 90 and > 15)) //1min NM 2 carts + if ((Ammo >= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (bfCD < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts + || (!HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SonicBreak, 3f) && bfCD is < 90 and > 15) //1min NM 3 carts + || (HasEffect(Buffs.ReadyToBreak) && Ammo == 3 && JustUsed(SolidBarrel, 3f) && bfCD is < 90 and > 15) //1min NM 2 carts + || (JustUsed(SonicBreak, 3f) && Ammo == 3)) //Opener return DoubleDown; } //= GCD * 4) && !HasEffect(Buffs.ReadyToRip) && IsOnCooldown(GnashingFang)) + if (IsEnabled(CustomComboPreset.GNB_GF_SonicBreak) && HasEffect(Buffs.ReadyToBreak) && (GetBuffRemainingTime(Buffs.NoMercy) >= GCD * 4) && !HasEffect(Buffs.ReadyToRip) && !ActionReady(GnashingFang)) return SonicBreak; - if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || GetCooldownRemainingTime(NoMercy) < 30) //subLv54 + if (IsEnabled(CustomComboPreset.GNB_GF_Zone) && ActionReady(DangerZone) && !LevelChecked(SonicBreak) && HasEffect(Buffs.NoMercy) || nmCD < 30) //subLv54 return OriginalHook(DangerZone); } } //Gnashing Fang - if (IsEnabled(CustomComboPreset.GNB_GF_Features) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) <= 0.6f && Ammo > 0) + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) < 0.7f && Ammo > 0) { - if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 - && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv100 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown)) //Lv90 odd/even minute use - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) > GCD * 20 && JustUsed(DoubleDown)) //Lv90 odd minute scuffed windows - || (GetCooldownRemainingTime(NoMercy) > GCD * 4 && ActionReady(Bloodfest)) //Opener/Reopener Conditions - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && GetCooldownRemainingTime(NoMercy) >= GCD * 24) //= GCD * 24 && ActionReady(Bloodfest)) // GCD * 7 && GetCooldownRemainingTime(NoMercy) < GCD * 14)) //30s use + if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 && ActionReady(GnashingFang) + && (LevelChecked(ReignOfBeasts) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown, 3f)) //Lv100 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && HasEffect(Buffs.NoMercy) && JustUsed(DoubleDown, 3f)) //Lv90 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && nmCD > GCD * 20 && JustUsed(DoubleDown, 3f)) //Lv90 odd minute scuffed windows + || (LevelChecked(DoubleDown) && !ActionReady(Bloodfest) && JustUsed(DoubleDown, 3f)) //Lv90+ Opener/Reopener conditions + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && JustUsed(NoMercy, 3f)) //Lv80 odd/even minute use + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && LevelChecked(Bloodfest) && Ammo == 1 && JustUsed(NoMercy, 3f) && ActionReady(Bloodfest)) //Lv80 Opener/Reopener + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && !LevelChecked(Bloodfest) && JustUsed(NoMercy, 3f)) //<=Lv79 use + || (nmCD > GCD * 7 && nmCD < GCD * 14)) //30s use return GnashingFang; } //Reign combo - if (IsEnabled(CustomComboPreset.GNB_GF_Reign) && (LevelChecked(ReignOfBeasts))) + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && IsEnabled(CustomComboPreset.GNB_GF_Reign) && (LevelChecked(ReignOfBeasts))) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(GnashingFang) && !ActionReady(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -741,26 +752,25 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } //Burst Strike - if (IsEnabled(CustomComboPreset.GNB_GF_BurstStrike) && LevelChecked(BurstStrike)) + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && IsEnabled(CustomComboPreset.GNB_GF_BurstStrike) && LevelChecked(BurstStrike)) { if (HasEffect(Buffs.NoMercy)) { - if (GetCooldownRemainingTime(DoubleDown) > GCD * 3 && - ((LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) - || (!LevelChecked(ReignOfBeasts) && Ammo >= 1 && GunStep == 0 && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) + if (Ammo >= 1 && + ((LevelChecked(ReignOfBeasts) && GunStep == 0 && GetBuffRemainingTime(Buffs.NoMercy) <= GCD * 3 && !HasEffect(Buffs.ReadyToReign)) + || (!LevelChecked(ReignOfBeasts) && GunStep == 0 && !ActionReady(DoubleDown) && !ActionReady(GnashingFang) && HasEffect(Buffs.NoMercy) && !HasEffect(Buffs.ReadyToBreak)))) return BurstStrike; } } //Lv100 2cart 2min starter - if (IsEnabled(CustomComboPreset.GNB_GF_BurstStrike) && LevelChecked(ReignOfBeasts) && (GetCooldownRemainingTime(NoMercy) <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (GetCooldownRemainingTime(Bloodfest) < GCD * 12 || ActionReady(Bloodfest))) + if (IsEnabled(CustomComboPreset.GNB_GF_Features) && IsEnabled(CustomComboPreset.GNB_GF_BurstStrike) && + LevelChecked(ReignOfBeasts) && ((nmCD <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (bfCD < GCD * 12 || ActionReady(Bloodfest)))) return BurstStrike; //GF combo safety net - if (IsEnabled(CustomComboPreset.GNB_GF_Features) && GunStep is 1 or 2) + if (IsEnabled(CustomComboPreset.GNB_GF_Continuation) && GunStep is 1 or 2) return OriginalHook(GnashingFang); - - return KeenEdge; } return actionID; @@ -776,9 +786,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID == DemonSlice) { - var Ammo = GetJobGauge().Ammo; //carts - var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo - float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + var Ammo = GetJobGauge().Ammo; //Our carts + var GunStep = GetJobGauge().AmmoComboStep; // For GnashingFang & (possibly) ReignCombo purposes + var bfCD = GetCooldownRemainingTime(Bloodfest); // Bloodfest's cooldown; 120s total + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 is base SkS, but can work with 2.4x //Variant Cure if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.GNB_VariantCure)) @@ -824,12 +835,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return DoubleDown; //FatedCircle if (Ammo > 0 && (HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF - (GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle))) // Bloodfest prep + (bfCD < 6 && LevelChecked(FatedCircle))) // Bloodfest prep return FatedCircle; //Reign if (LevelChecked(ReignOfBeasts)) //because leaving this out anywhere is a waste { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -863,9 +874,10 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID == DemonSlice) { - var Ammo = GetJobGauge().Ammo; //carts - var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo - float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + var Ammo = GetJobGauge().Ammo; //Our carts + var GunStep = GetJobGauge().AmmoComboStep; // For GnashingFang & (possibly) ReignCombo purposes + var bfCD = GetCooldownRemainingTime(Bloodfest); // Bloodfest's cooldown; 120s total + float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 is base SkS, but can work with 2.4x //Variant Cure if (IsEnabled(CustomComboPreset.GNB_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.GNB_VariantCure)) @@ -911,12 +923,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return DoubleDown; //FatedCircle if (Ammo > 0 && ((IsEnabled(CustomComboPreset.GNB_AoE_FatedCircle) && HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF - (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && GetCooldownRemainingTime(Bloodfest) < 6 && LevelChecked(FatedCircle)))) // Bloodfest prep + (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && bfCD < 6 && LevelChecked(FatedCircle)))) // Bloodfest prep return FatedCircle; //Reign if (IsEnabled(CustomComboPreset.GNB_AoE_Reign) && LevelChecked(ReignOfBeasts)) //because leaving this out anywhere is a waste { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -950,19 +962,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (actionID is BurstStrike) { - var Ammo = GetJobGauge().Ammo; //carts - var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo - float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy + var Ammo = GetJobGauge().Ammo; //Our carts + var GunStep = GetJobGauge().AmmoComboStep; // For GnashingFang & (possibly) ReignCombo purposes + var bfCD = GetCooldownRemainingTime(Bloodfest); // Bloodfest's cooldown; 120s total if (IsEnabled(CustomComboPreset.GNB_BS_Continuation) && HasEffect(Buffs.ReadyToBlast) && LevelChecked(Hypervelocity)) return Hypervelocity; - if (IsEnabled(CustomComboPreset.GNB_BS_Bloodfest) && Ammo is 0 && LevelChecked(Bloodfest) && !HasEffect(Buffs.ReadyToBlast) && GetCooldownRemainingTime(Bloodfest) < 0.6f) + if (IsEnabled(CustomComboPreset.GNB_BS_Bloodfest) && Ammo is 0 && LevelChecked(Bloodfest) && !HasEffect(Buffs.ReadyToBlast) && bfCD < 0.6f) return Bloodfest; if (IsEnabled(CustomComboPreset.GNB_BS_DoubleDown) && HasEffect(Buffs.NoMercy) && GetCooldownRemainingTime(DoubleDown) < 2 && Ammo >= 2 && LevelChecked(DoubleDown)) return DoubleDown; if (IsEnabled(CustomComboPreset.GNB_BS_Reign) && (LevelChecked(ReignOfBeasts))) { - if (HasEffect(Buffs.ReadyToReign) && GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(DoubleDown) && GunStep == 0) + if (HasEffect(Buffs.ReadyToReign) && GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); @@ -1011,7 +1023,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { var Ammo = GetJobGauge().Ammo; //carts var GunStep = GetJobGauge().AmmoComboStep; // GF/Reign combo - float GCD = GetCooldown(KeenEdge).CooldownTotal; //2.5 supported, 2.45 is iffy if (JustUsed(NoMercy, 20f) && InCombat()) { //oGCDs @@ -1032,7 +1043,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return DoubleDown; if (IsEnabled(CustomComboPreset.GNB_NM_Reign) && LevelChecked(ReignOfBeasts)) { - if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && IsOnCooldown(GnashingFang) && IsOnCooldown(DoubleDown) && GunStep == 0) + if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(GnashingFang) && !ActionReady(DoubleDown) && GunStep == 0) { if (JustUsed(WickedTalon) || (JustUsed(EyeGouge))) return OriginalHook(ReignOfBeasts); From 6263ea5cd2b9575d535f0407bb927f60cd077e5e Mon Sep 17 00:00:00 2001 From: ace Date: Sun, 18 Aug 2024 13:28:45 -0700 Subject: [PATCH 124/142] FC break --- XIVSlothCombo/Combos/PvE/GNB.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index d447fb68e..29810e238 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -834,8 +834,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) //use on CD under NM return DoubleDown; //FatedCircle - if (Ammo > 0 && (HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF - (bfCD < 6 && LevelChecked(FatedCircle))) // Bloodfest prep + if (Ammo > 0 && LevelChecked(FatedCircle) && (HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF + (bfCD < 6)) // Bloodfest prep return FatedCircle; //Reign if (LevelChecked(ReignOfBeasts)) //because leaving this out anywhere is a waste @@ -922,8 +922,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.GNB_AoE_DoubleDown) && Ammo >= 2 && ActionReady(DoubleDown) && HasEffect(Buffs.NoMercy)) //use on CD under NM return DoubleDown; //FatedCircle - if (Ammo > 0 && ((IsEnabled(CustomComboPreset.GNB_AoE_FatedCircle) && HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF - (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && bfCD < 6 && LevelChecked(FatedCircle)))) // Bloodfest prep + if (Ammo > 0 && LevelChecked(FatedCircle) && ((IsEnabled(CustomComboPreset.GNB_AoE_FatedCircle) && HasEffect(Buffs.NoMercy) && !ActionReady(DoubleDown) && GunStep == 0) || //use when under NM after DD & ignores GF + (IsEnabled(CustomComboPreset.GNB_AoE_Bloodfest) && bfCD < 6))) // Bloodfest prep return FatedCircle; //Reign if (IsEnabled(CustomComboPreset.GNB_AoE_Reign) && LevelChecked(ReignOfBeasts)) //because leaving this out anywhere is a waste From 0ec6899450675dc3051698b21fe4a144ed012bb7 Mon Sep 17 00:00:00 2001 From: ace Date: Sun, 18 Aug 2024 13:54:47 -0700 Subject: [PATCH 125/142] oGCD priorities --- XIVSlothCombo/Combos/PvE/VPR.cs | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index 3cd8e8c18..a08178281 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -135,12 +135,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (VPROpener.DoFullOpener(ref actionID)) return actionID; + //Serpents Ire - ForceWeave + if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; + //oGCDs if (CanWeave(ActionWatching.LastWeaponskill)) { - // Death Rattle - if (in5y && LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) - return OriginalHook(SerpentsTail); + //Serpents Ire + if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; // Legacy Weaves if (in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) @@ -166,13 +170,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.SwiftskinsVenom)) return OriginalHook(Twinblood); } - - //Serpents Ire - if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; } } + // Death Rattle - Force to avoid loss + if (in5y && LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); + //GCDs if (LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) return (VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) @@ -355,6 +359,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } + //Serpents Ire - MaxPrio oGCD, ForceWeave this in order to maintain raid buff upkeep or to avoid delay when inside RA + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && InCombat() && + CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; + //oGCDs if (CanWeave(ActionWatching.LastWeaponskill)) { @@ -393,15 +402,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (HasEffect(Buffs.SwiftskinsVenom)) return OriginalHook(Twinblood); } - - //Serpents Ire - Force this in order to maintain raid buff upkeep - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsIre) && InCombat() && - CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; } } } + // Death Rattle - Force to avoid loss + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && in5y && + LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) + return OriginalHook(SerpentsTail); + //GCDs if (IsEnabled(CustomComboPreset.VPR_ST_RangedUptime) && LevelChecked(WrithingSnap) && !InMeleeRange() && HasBattleTarget()) From 538a359951e6dd6e58f6d5f389aab8601a0d55c9 Mon Sep 17 00:00:00 2001 From: ace Date: Sun, 18 Aug 2024 15:45:42 -0700 Subject: [PATCH 126/142] Simple Modes implementation --- XIVSlothCombo/Combos/CustomComboPreset.cs | 148 +++++++----- XIVSlothCombo/Combos/PvE/WAR.cs | 239 ++++++++++++++----- XIVSlothCombo/Window/Functions/UserConfig.cs | 14 +- 3 files changed, 276 insertions(+), 125 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index efb24349e..c91952032 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -3967,126 +3967,148 @@ The three digets after RDM.JobID can be used to reorder items in the list #region WARRIOR + #region Simple ST + [ConflictingCombos(WAR_ST_Advanced)] + [ReplaceSkill(WAR.StormsPath)] + [CustomComboInfo("Simple Mode - Single Target", "Replaces Storm's Path with a one-button full single target rotation.\nThis is the ideal selection for newcomers to the job.", WAR.JobID, 1)] + WAR_ST_Simple = 18000, + #endregion + + #region Simple AoE + [ConflictingCombos(WAR_AoE_Advanced)] + [ReplaceSkill(WAR.Overpower)] + [CustomComboInfo("Simple Mode - AoE", "Replaces Overpower with a one-button full AoE rotation.\nThis is the ideal selection for newcomers to the job.", WAR.JobID, 1)] + WAR_AoE_Simple = 18001, + #endregion + + #region Advanced ST + [ConflictingCombos(WAR_ST_Simple)] [ReplaceSkill(WAR.StormsPath)] - [CustomComboInfo("Advanced Mode - Single Target", "Replaces Storm's Path with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", WAR.JobID, 1)] - WAR_ST_StormsPath = 18000, + [CustomComboInfo("Advanced Mode - Single Target", "Replaces Storm's Path with a one-button full single target rotation.\nThis is the ideal selection for users experienced with the job.", WAR.JobID, 2)] + WAR_ST_Advanced = 18002, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Berserk / Inner Release Option", "Adds Berserk / Inner Release to Advanced Mode.", WAR.JobID)] - WAR_ST_StormsPath_InnerRelease = 18020, + WAR_ST_Advanced_InnerRelease = 18003, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Tomahawk Uptime Option", "Adds Tomahawk to Advanced Mode when you are out of range.", WAR.JobID, 1, "", "")] - WAR_ST_StormsPath_RangedUptime = 18016, + WAR_ST_Advanced_RangedUptime = 18004, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Storm's Eye Option", "Adds Storms Eye to Advanced Mode.", WAR.JobID, 2, "", "")] - WAR_ST_StormsPath_StormsEye = 18023, + WAR_ST_Advanced_StormsEye = 18005, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Inner Beast / Fell Cleave Option", "Adds Inner Beast / Fell Cleave to Advanced Mode. Will use when you have the set minimum gauge, or under the effect of Inner Release. Will also use Nascent Chaos.", WAR.JobID, 2, "", "")] - WAR_ST_StormsPath_FellCleave = 18012, + WAR_ST_Advanced_FellCleave = 18006, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Infuriate Option", "Adds Infuriate to Advanced Mode.", WAR.JobID, 3, "", "")] - WAR_ST_StormsPath_Infuriate = 18021, + WAR_ST_Advanced_Infuriate = 18007, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Onslaught Option", "Adds Onslaught to Advanced Mode if you are under Surging Tempest Buff.", WAR.JobID, 4, "", "")] - WAR_ST_StormsPath_Onslaught = 18013, + WAR_ST_Advanced_Onslaught = 18008, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Upheaval Option", "Adds Upheaval to Advanced Mode if you have Surging Tempest.", WAR.JobID, 5, "", "")] - WAR_ST_StormsPath_Upheaval = 18007, + WAR_ST_Advanced_Upheaval = 18009, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Primal Wrath Option", "Adds Primal Wrath to Advanced Mode if you have Surging Tempest.", WAR.JobID, 5, "", "")] - WAR_ST_StormsPath_PrimalWrath = 18008, + WAR_ST_Advanced_PrimalWrath = 18010, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Primal Ruination Option", "Adds Primal Ruination to Advanced Mode if you have Surging Tempest.", WAR.JobID, 5, "", "")] - WAR_ST_StormsPath_PrimalRuination = 18009, + WAR_ST_Advanced_PrimalRuination = 18011, - [ParentCombo(WAR_AoE_Overpower)] + [ParentCombo(WAR_AoE_Advanced)] [CustomComboInfo("Orogeny Option", "Adds Orogeny to Advanced Mode when you are buffed with Surging Tempest.", WAR.JobID, 6, "", "")] - WAR_AoE_Overpower_Orogeny = 18010, + WAR_AoE_Advanced_Orogeny = 18012, - [ParentCombo(WAR_ST_StormsPath)] + [ParentCombo(WAR_ST_Advanced)] [CustomComboInfo("Primal Rend Option", "Adds Primal Rend to Advanced Mode. Only uses when in the Target's target ring (1 yalm) & when not moving. Otherwise, will use when buff time is equal to 1 GCD.", WAR.JobID, 7, "", "")] - WAR_ST_StormsPath_PrimalRend = 18011, + WAR_ST_Advanced_PrimalRend = 18013, - [ReplaceSkill(WAR.Overpower)] - [CustomComboInfo("Advanced Mode - AoE", "Replaces Overpower with a one-button full AoE rotation.\nThese features are ideal if you want to customize the rotation.", WAR.JobID, 2, "", "")] - WAR_AoE_Overpower = 18002, + [ParentCombo(WAR_ST_Advanced_PrimalRend)] + [CustomComboInfo("Primal Rend Late Option", "Uses Primal Rend after you consume 3 stacks of Inner Release & after Primal Wrath.", WAR.JobID)] + WAR_ST_Advanced_PrimalRend_Late = 18014, - [ReplaceSkill(WAR.StormsEye)] - [CustomComboInfo("Storm's Eye Combo Feature", "Replace Storm's Eye with its combo chain.", WAR.JobID, 3, "", "")] - War_ST_StormsEye = 18001, + [ParentCombo(WAR_ST_Advanced_Onslaught)] + [CustomComboInfo("Melee Onslaught Option", "Uses Onslaught when under Surging Tempest & in the target ring (1 yalm) & when not moving.\nWill use as many stacks as selected in the above slider.", WAR.JobID)] + WAR_ST_Advanced_Onslaught_MeleeSpender = 18015, + #endregion + + #region Advanced AoE + [ConflictingCombos(WAR_AoE_Simple)] + [ReplaceSkill(WAR.Overpower)] + [CustomComboInfo("Advanced Mode - AoE", "Replaces Overpower with a one-button full AoE rotation.\nThis is the ideal selection for users experienced with the job.", WAR.JobID, 2, "", "")] + WAR_AoE_Advanced = 18016, [ReplaceSkill(WAR.NascentFlash)] [CustomComboInfo("Nascent Flash Feature", "Replace Nascent Flash with Raw intuition when level synced below 76.", WAR.JobID, 5, "", "")] - WAR_NascentFlash = 18005, + WAR_NascentFlash = 18017, - [ParentCombo(WAR_AoE_Overpower)] + [ParentCombo(WAR_AoE_Advanced)] [CustomComboInfo("Infuriate Option", "Adds Infuriate to Advanced Mode when gauge is below 50 and not under Inner Release.", WAR.JobID)] - WAR_AoE_Overpower_Infuriate = 18014, + WAR_AoE_Advanced_Infuriate = 18018, - [ParentCombo(WAR_AoE_Overpower)] + [ParentCombo(WAR_AoE_Advanced)] [CustomComboInfo("Berserk / Inner Release Option", "Adds Berserk / Inner Release to Advanced Mode.", WAR.JobID)] - WAR_AoE_Overpower_InnerRelease = 18015, + WAR_AoE_Advanced_InnerRelease = 18019, - [ParentCombo(WAR_AoE_Overpower)] + [ParentCombo(WAR_AoE_Advanced)] [CustomComboInfo("Primal Wrath Option", "Adds Primal Wrath to Advanced Mode if you have Surging Tempest.", WAR.JobID, 5, "", "")] - WAR_AOE_Overpower_PrimalWrath = 18017, + WAR_AoE_Advanced_PrimalWrath = 18020, - [ParentCombo(WAR_AoE_Overpower)] + [ParentCombo(WAR_AoE_Advanced)] [CustomComboInfo("Primal Rend Option", "Adds Primal Rend to Advanced Mode if you have Surging Tempest.", WAR.JobID, 5, "", "")] - WAR_AOE_Overpower_PrimalRend = 18018, + WAR_AoE_Advanced_PrimalRend = 18021, - [ParentCombo(WAR_AoE_Overpower)] + [ParentCombo(WAR_AoE_Advanced)] [CustomComboInfo("Primal Ruination Option", "Adds Primal Ruination to Advanced Mode if you have Surging Tempest.", WAR.JobID, 5, "", "")] - WAR_AOE_Overpower_PrimalRuination = 18019, + WAR_AoE_Advanced_PrimalRuination = 18022, + + [ParentCombo(WAR_AoE_Advanced)] + [CustomComboInfo("Steel Cyclone / Decimate Option", "Adds Steel Cyclone / Decimate to Advanced Mode.", WAR.JobID)] + WAR_AoE_Advanced_Decimate = 18023, + #endregion + #region Misc [ReplaceSkill(WAR.FellCleave, WAR.Decimate)] [CustomComboInfo("Infuriate on Fell Cleave / Decimate Feature", "Turns Fell Cleave and Decimate into Infuriate if at or under set rage value.", WAR.JobID, 4, "", "")] - WAR_InfuriateFellCleave = 18031, + WAR_InfuriateFellCleave = 18024, + + [ReplaceSkill(WAR.StormsEye)] + [CustomComboInfo("Storm's Eye Combo Feature", "Replace Storm's Eye with its combo chain.", WAR.JobID, 3, "", "")] + War_ST_StormsEye = 18025, [ReplaceSkill(WAR.InnerRelease)] [CustomComboInfo("Primal Combo Feature", "Turns Inner Release into the Primal combo on use.", WAR.JobID, 3, "", "")] - WAR_PrimalCombo_InnerRelease = 18032, + WAR_PrimalCombo_InnerRelease = 18026, [ParentCombo(WAR_InfuriateFellCleave)] [CustomComboInfo("Inner Release Priority Option", "Prevents the use of Infuriate while you have Inner Release stacks available.", WAR.JobID)] - WAR_InfuriateFellCleave_IRFirst = 18022, - - [ParentCombo(WAR_ST_StormsPath_PrimalRend)] - [CustomComboInfo("Primal Rend Late Option", "Uses Primal Rend after you consume 3 stacks of Inner Release & after Primal Wrath.", WAR.JobID)] - WAR_ST_StormsPath_PrimalRend_Late = 18024, - - [ParentCombo(WAR_ST_StormsPath_Onslaught)] - [CustomComboInfo("Melee Onslaught Option", "Uses Onslaught when under Surging Tempest & in the target ring (1 yalm) & when not moving.\nWill use as many stacks as selected in the above slider.", WAR.JobID)] - WAR_ST_StormsPath_Onslaught_MeleeSpender = 18025, + WAR_InfuriateFellCleave_IRFirst = 18027, [Variant] - [VariantParent(WAR_ST_StormsPath, WAR_AoE_Overpower)] + [VariantParent(WAR_ST_Advanced, WAR_AoE_Advanced)] [CustomComboInfo("Spirit Dart Option", "Use Variant Spirit Dart whenever the debuff is not present or less than 3s.", WAR.JobID)] - WAR_Variant_SpiritDart = 18026, + WAR_Variant_SpiritDart = 18028, [Variant] - [VariantParent(WAR_ST_StormsPath, WAR_AoE_Overpower)] + [VariantParent(WAR_ST_Advanced, WAR_AoE_Advanced)] [CustomComboInfo("Cure Option", "Use Variant Cure when HP is below set threshold.", WAR.JobID)] - WAR_Variant_Cure = 18027, + WAR_Variant_Cure = 18029, [Variant] - [VariantParent(WAR_ST_StormsPath, WAR_AoE_Overpower)] + [VariantParent(WAR_ST_Advanced, WAR_AoE_Advanced)] [CustomComboInfo("Ultimatum Option", "Use Variant Ultimatum on cooldown.", WAR.JobID)] - WAR_Variant_Ultimatum = 18028, - - [ParentCombo(WAR_AoE_Overpower)] - [CustomComboInfo("Steel Cyclone / Decimate Option", "Adds Steel Cyclone / Decimate to Advanced Mode.", WAR.JobID)] - WAR_AoE_Overpower_Decimate = 18029, + WAR_Variant_Ultimatum = 18030, + #endregion - // Last value = 18029 + // Last value = 18030 #endregion diff --git a/XIVSlothCombo/Combos/PvE/WAR.cs b/XIVSlothCombo/Combos/PvE/WAR.cs index f8b8783c5..82f14fc40 100644 --- a/XIVSlothCombo/Combos/PvE/WAR.cs +++ b/XIVSlothCombo/Combos/PvE/WAR.cs @@ -71,14 +71,92 @@ public const string WAR_InfuriateAoEGauge = "WAR_InfuriateAoEGauge"; } - // Replace Storm's Path with Storm's Path combo and overcap feature on main combo to fellcleave - internal class WAR_ST_StormsPath : CustomCombo + internal class WAR_ST_SimpleMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_ST_StormsPath; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_ST_Simple; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath) && actionID == StormsPath) + if (actionID == StormsPath) + { + var gauge = GetJobGauge().BeastGauge; + float GCD = GetCooldown(HeavySwing).CooldownTotal; + + if (IsEnabled(CustomComboPreset.WAR_Variant_Cure) && IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= GetOptionValue(Config.WAR_VariantCure)) + return Variant.VariantCure; + if (LevelChecked(Tomahawk) && !InMeleeRange() && HasBattleTarget()) + return Tomahawk; + if (InCombat() && LevelChecked(Infuriate) && ActionReady(Infuriate) && !HasEffect(Buffs.NascentChaos) && !HasEffect(Buffs.InnerReleaseStacks) && gauge <= 40 && CanWeave(actionID)) + return Infuriate; + if (CanWeave(actionID) && ActionReady(OriginalHook(Berserk)) && LevelChecked(Berserk) && !LevelChecked(StormsEye) && InCombat()) + return OriginalHook(Berserk); + + if (HasEffect(Buffs.SurgingTempest) && InCombat()) + { + if (CanWeave(actionID)) + { + if (ActionReady(OriginalHook(Berserk)) && LevelChecked(Berserk)) + return OriginalHook(Berserk); + if (ActionReady(Upheaval) && LevelChecked(Upheaval)) + return Upheaval; + if (HasEffect(Buffs.Wrathful) && LevelChecked(PrimalWrath)) + return PrimalWrath; + if (LevelChecked(Onslaught) && GetRemainingCharges(Onslaught) > 1) + { + if (!IsMoving && GetTargetDistance() <= 1 && (GetCooldownRemainingTime(InnerRelease) > 40 || !LevelChecked(InnerRelease))) + return Onslaught; + } + } + + if (HasEffect(Buffs.PrimalRendReady) && !JustUsed(InnerRelease) && ((!IsMoving && GetTargetDistance() <= 1) || GetBuffRemainingTime(Buffs.PrimalRendReady) <= GCD)) + return PrimalRend; + if (HasEffect(Buffs.PrimalRuinationReady) && LevelChecked(PrimalRuination) && JustUsed(PrimalRend)) + return PrimalRuination; + + if (LevelChecked(InnerBeast)) + { + if (HasEffect(Buffs.InnerReleaseStacks) || (HasEffect(Buffs.NascentChaos) && LevelChecked(InnerChaos))) + return OriginalHook(InnerBeast); + + if (HasEffect(Buffs.NascentChaos) && !LevelChecked(InnerChaos) && gauge >= 50) + return OriginalHook(Decimate); + } + + } + + if (comboTime > 0) + { + if (LevelChecked(InnerBeast) && (!LevelChecked(StormsEye) || HasEffectAny(Buffs.SurgingTempest)) && gauge >= 90) + return OriginalHook(InnerBeast); + + if (lastComboMove == HeavySwing && LevelChecked(Maim)) + { + return Maim; + } + + if (lastComboMove == Maim && LevelChecked(StormsPath)) + { + if (GetBuffRemainingTime(Buffs.SurgingTempest) <= 29 && LevelChecked(StormsEye)) + return StormsEye; + return StormsPath; + } + } + + return HeavySwing; + } + + return actionID; + } + } + + internal class WAR_ST_AdvancedMode : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_ST_Advanced; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced) && actionID == StormsPath) { var gauge = GetJobGauge().BeastGauge; var surgingThreshold = PluginConfiguration.GetCustomIntValue(Config.WAR_SurgingRefreshRange); @@ -88,18 +166,18 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var infuriateGauge = PluginConfiguration.GetCustomIntValue(Config.WAR_InfuriateSTGauge); float GCD = GetCooldown(HeavySwing).CooldownTotal; - if (IsEnabled(CustomComboPreset.WAR_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.WAR_VariantCure)) + if (IsEnabled(CustomComboPreset.WAR_Variant_Cure) && IsEnabled(Variant.VariantCure) && + PlayerHealthPercentageHp() <= GetOptionValue(Config.WAR_VariantCure)) return Variant.VariantCure; - - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_RangedUptime) && LevelChecked(Tomahawk) && !InMeleeRange() && HasBattleTarget()) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_RangedUptime) && + LevelChecked(Tomahawk) && !InMeleeRange() && HasBattleTarget()) return Tomahawk; - - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_Infuriate) && InCombat() && LevelChecked(Infuriate) && ActionReady(Infuriate) && !HasEffect(Buffs.NascentChaos) && !HasEffect(Buffs.InnerReleaseStacks) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_Infuriate) && + InCombat() && LevelChecked(Infuriate) && ActionReady(Infuriate) && + !HasEffect(Buffs.NascentChaos) && !HasEffect(Buffs.InnerReleaseStacks) && gauge <= infuriateGauge && CanWeave(actionID) && GetRemainingCharges(Infuriate) > infuriateChargesRemaining) return Infuriate; - - //Sub Storm's Eye level check - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_InnerRelease) && CanWeave(actionID) && IsOffCooldown(OriginalHook(Berserk)) && LevelChecked(Berserk) && !LevelChecked(StormsEye) && InCombat()) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_InnerRelease) && CanWeave(actionID) && ActionReady(OriginalHook(Berserk)) && LevelChecked(Berserk) && !LevelChecked(StormsEye) && InCombat()) return OriginalHook(Berserk); if (HasEffect(Buffs.SurgingTempest) && InCombat()) @@ -112,40 +190,40 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (sustainedDamage is null || sustainedDamage?.RemainingTime <= 3)) return Variant.VariantSpiritDart; - if (IsEnabled(CustomComboPreset.WAR_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && IsOffCooldown(Variant.VariantUltimatum)) + if (IsEnabled(CustomComboPreset.WAR_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && ActionReady(Variant.VariantUltimatum)) return Variant.VariantUltimatum; - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_InnerRelease) && CanWeave(actionID) && IsOffCooldown(OriginalHook(Berserk)) && LevelChecked(Berserk)) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_InnerRelease) && CanWeave(actionID) && ActionReady(OriginalHook(Berserk)) && LevelChecked(Berserk)) return OriginalHook(Berserk); - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_Upheaval) && IsOffCooldown(Upheaval) && LevelChecked(Upheaval)) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_Upheaval) && ActionReady(Upheaval) && LevelChecked(Upheaval)) return Upheaval; - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_PrimalWrath) && HasEffect(Buffs.Wrathful) && LevelChecked(PrimalWrath)) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_PrimalWrath) && HasEffect(Buffs.Wrathful) && LevelChecked(PrimalWrath)) return PrimalWrath; - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_Onslaught) && LevelChecked(Onslaught) && GetRemainingCharges(Onslaught) > onslaughtChargesRemaining) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_Onslaught) && LevelChecked(Onslaught) && GetRemainingCharges(Onslaught) > onslaughtChargesRemaining) { - if (IsNotEnabled(CustomComboPreset.WAR_ST_StormsPath_Onslaught_MeleeSpender) || - (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_Onslaught_MeleeSpender) && !IsMoving && GetTargetDistance() <= 1 && (GetCooldownRemainingTime(InnerRelease) > 40 || !LevelChecked(InnerRelease)))) + if (IsNotEnabled(CustomComboPreset.WAR_ST_Advanced_Onslaught_MeleeSpender) || + (IsEnabled(CustomComboPreset.WAR_ST_Advanced_Onslaught_MeleeSpender) && !IsMoving && GetTargetDistance() <= 1 && (GetCooldownRemainingTime(InnerRelease) > 40 || !LevelChecked(InnerRelease)))) return Onslaught; } } - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_PrimalRend) && HasEffect(Buffs.PrimalRendReady) && !JustUsed(InnerRelease)) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_PrimalRend) && HasEffect(Buffs.PrimalRendReady) && !JustUsed(InnerRelease)) { - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_PrimalRend_Late) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_PrimalRend_Late) && GetBuffStacks(Buffs.InnerReleaseStacks) is 0 && GetBuffStacks(Buffs.BurgeoningFury) is 0 && !HasEffect(Buffs.Wrathful)) return PrimalRend; - if (IsNotEnabled(CustomComboPreset.WAR_ST_StormsPath_PrimalRend_Late) && ((!IsMoving && GetTargetDistance() <= 1) || GetBuffRemainingTime(Buffs.PrimalRendReady) <= GCD)) + if (IsNotEnabled(CustomComboPreset.WAR_ST_Advanced_PrimalRend_Late) && ((!IsMoving && GetTargetDistance() <= 1) || GetBuffRemainingTime(Buffs.PrimalRendReady) <= GCD)) return PrimalRend; } - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && LevelChecked(PrimalRuination) && WasLastWeaponskill(PrimalRend)) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && LevelChecked(PrimalRuination) && JustUsed(PrimalRend)) return PrimalRuination; - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_FellCleave) && LevelChecked(InnerBeast)) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_FellCleave) && LevelChecked(InnerBeast)) { - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_FellCleave) && LevelChecked(InnerBeast)) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_FellCleave) && LevelChecked(InnerBeast)) { if (HasEffect(Buffs.InnerReleaseStacks) || (HasEffect(Buffs.NascentChaos) && LevelChecked(InnerChaos))) return OriginalHook(InnerBeast); @@ -159,7 +237,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (comboTime > 0) { - if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_FellCleave) && LevelChecked(InnerBeast) && (!LevelChecked(StormsEye) || HasEffectAny(Buffs.SurgingTempest)) && gauge >= fellCleaveGaugeSpend) + if (IsEnabled(CustomComboPreset.WAR_ST_Advanced_FellCleave) && LevelChecked(InnerBeast) && (!LevelChecked(StormsEye) || HasEffectAny(Buffs.SurgingTempest)) && gauge >= fellCleaveGaugeSpend) return OriginalHook(InnerBeast); if (lastComboMove == HeavySwing && LevelChecked(Maim)) @@ -167,13 +245,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return Maim; } - if (lastComboMove == Maim && LevelChecked(StormsPath) && IsEnabled(CustomComboPreset.WAR_ST_StormsPath_StormsEye)) + if (lastComboMove == Maim && LevelChecked(StormsPath) && IsEnabled(CustomComboPreset.WAR_ST_Advanced_StormsEye)) { if (GetBuffRemainingTime(Buffs.SurgingTempest) <= surgingThreshold && LevelChecked(StormsEye)) return StormsEye; return StormsPath; } - if (lastComboMove == Maim && LevelChecked(StormsPath) && IsNotEnabled(CustomComboPreset.WAR_ST_StormsPath_StormsEye)) + if (lastComboMove == Maim && LevelChecked(StormsPath) && IsNotEnabled(CustomComboPreset.WAR_ST_Advanced_StormsEye)) { return StormsPath; } @@ -186,33 +264,62 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class War_ST_StormsEye : CustomCombo + internal class WAR_AoE_SimpleMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.War_ST_StormsEye; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_AoE_Simple; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - if (actionID == StormsEye) + if (actionID == Overpower) { - if (comboTime > 0) + var gauge = GetJobGauge().BeastGauge; + float GCD = GetCooldown(HeavySwing).CooldownTotal; + + if (InCombat() && ActionReady(Infuriate) && !HasEffect(Buffs.NascentChaos) && !HasEffect(Buffs.InnerReleaseStacks) && gauge <= 40 && CanWeave(actionID)) + return Infuriate; + if (CanWeave(actionID) && ActionReady(OriginalHook(Berserk)) && LevelChecked(Berserk) && !LevelChecked(MythrilTempest) && InCombat()) + return OriginalHook(Berserk); + + if (HasEffect(Buffs.SurgingTempest) && InCombat()) { - if (lastComboMove == HeavySwing && LevelChecked(Maim)) - return Maim; + if (CanWeave(actionID)) + { + if (CanWeave(actionID) && ActionReady(OriginalHook(Berserk)) && LevelChecked(Berserk)) + return OriginalHook(Berserk); + if (ActionReady(Orogeny) && LevelChecked(Orogeny) && HasEffect(Buffs.SurgingTempest)) + return Orogeny; + if (HasEffect(Buffs.Wrathful) && LevelChecked(PrimalWrath)) + return PrimalWrath; + } - if (lastComboMove == Maim && LevelChecked(StormsEye)) - return StormsEye; + if (HasEffect(Buffs.PrimalRendReady) && LevelChecked(PrimalRend)) + return PrimalRend; + if (HasEffect(Buffs.PrimalRendReady) && LevelChecked(PrimalRend) && GetBuffRemainingTime(Buffs.PrimalRendReady) <= GCD) + return PrimalRend; + if (HasEffect(Buffs.PrimalRuinationReady) && LevelChecked(PrimalRuination) && JustUsed(PrimalRend, 4f)) + return PrimalRuination; + if (LevelChecked(SteelCyclone) && (gauge >= 90 || HasEffect(Buffs.InnerReleaseStacks) || HasEffect(Buffs.NascentChaos))) + return OriginalHook(SteelCyclone); } - return HeavySwing; + if (comboTime > 0) + { + if (lastComboMove == Overpower && LevelChecked(MythrilTempest)) + { + return MythrilTempest; + } + } + + return Overpower; } return actionID; } } - internal class WAR_AoE_Overpower : CustomCombo + internal class WAR_AoE_AdvancedMode : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_AoE_Overpower; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_AoE_Advanced; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -226,11 +333,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.WAR_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.WAR_VariantCure)) return Variant.VariantCure; - if (IsEnabled(CustomComboPreset.WAR_AoE_Overpower_Infuriate) && InCombat() && ActionReady(Infuriate) && !HasEffect(Buffs.NascentChaos) && !HasEffect(Buffs.InnerReleaseStacks) && gauge <= infuriateGauge && CanWeave(actionID)) + if (IsEnabled(CustomComboPreset.WAR_AoE_Advanced_Infuriate) && InCombat() && ActionReady(Infuriate) && !HasEffect(Buffs.NascentChaos) && !HasEffect(Buffs.InnerReleaseStacks) && gauge <= infuriateGauge && CanWeave(actionID)) return Infuriate; //Sub Mythril Tempest level check - if (IsEnabled(CustomComboPreset.WAR_AoE_Overpower_InnerRelease) && CanWeave(actionID) && IsOffCooldown(OriginalHook(Berserk)) && LevelChecked(Berserk) && !LevelChecked(MythrilTempest) && InCombat()) + if (IsEnabled(CustomComboPreset.WAR_AoE_Advanced_InnerRelease) && CanWeave(actionID) && ActionReady(OriginalHook(Berserk)) && LevelChecked(Berserk) && !LevelChecked(MythrilTempest) && InCombat()) return OriginalHook(Berserk); if (HasEffect(Buffs.SurgingTempest) && InCombat()) @@ -243,26 +350,24 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (sustainedDamage is null || sustainedDamage?.RemainingTime <= 3)) return Variant.VariantSpiritDart; - if (IsEnabled(CustomComboPreset.WAR_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && IsOffCooldown(Variant.VariantUltimatum)) + if (IsEnabled(CustomComboPreset.WAR_Variant_Ultimatum) && IsEnabled(Variant.VariantUltimatum) && ActionReady(Variant.VariantUltimatum)) return Variant.VariantUltimatum; - if (IsEnabled(CustomComboPreset.WAR_AoE_Overpower_InnerRelease) && CanWeave(actionID) && IsOffCooldown(OriginalHook(Berserk)) && LevelChecked(Berserk)) + if (IsEnabled(CustomComboPreset.WAR_AoE_Advanced_InnerRelease) && CanWeave(actionID) && ActionReady(OriginalHook(Berserk)) && LevelChecked(Berserk)) return OriginalHook(Berserk); - if (IsEnabled(CustomComboPreset.WAR_AoE_Overpower_Orogeny) && IsOffCooldown(Orogeny) && LevelChecked(Orogeny) && HasEffect(Buffs.SurgingTempest)) + if (IsEnabled(CustomComboPreset.WAR_AoE_Advanced_Orogeny) && ActionReady(Orogeny) && LevelChecked(Orogeny) && HasEffect(Buffs.SurgingTempest)) return Orogeny; - if (IsEnabled(CustomComboPreset.WAR_AOE_Overpower_PrimalWrath) && HasEffect(Buffs.Wrathful) && LevelChecked(PrimalWrath)) + if (IsEnabled(CustomComboPreset.WAR_AoE_Advanced_PrimalWrath) && HasEffect(Buffs.Wrathful) && LevelChecked(PrimalWrath)) return PrimalWrath; } - if (IsEnabled(CustomComboPreset.WAR_AOE_Overpower_PrimalRend) && HasEffect(Buffs.PrimalRendReady) && LevelChecked(PrimalRend)) + if (IsEnabled(CustomComboPreset.WAR_AoE_Advanced_PrimalRend) && HasEffect(Buffs.PrimalRendReady) && LevelChecked(PrimalRend)) return PrimalRend; - if (IsNotEnabled(CustomComboPreset.WAR_AOE_Overpower_PrimalRend) && HasEffect(Buffs.PrimalRendReady) && LevelChecked(PrimalRend) && GetBuffRemainingTime(Buffs.PrimalRendReady) <= GCD) + if (IsNotEnabled(CustomComboPreset.WAR_AoE_Advanced_PrimalRend) && HasEffect(Buffs.PrimalRendReady) && LevelChecked(PrimalRend) && GetBuffRemainingTime(Buffs.PrimalRendReady) <= GCD) return PrimalRend; - - if (IsEnabled(CustomComboPreset.WAR_AOE_Overpower_PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && LevelChecked(PrimalRuination) && WasLastWeaponskill(PrimalRend)) + if (IsEnabled(CustomComboPreset.WAR_AoE_Advanced_PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && LevelChecked(PrimalRuination) && JustUsed(PrimalRend, 4f)) return PrimalRuination; - - if (IsEnabled(CustomComboPreset.WAR_AoE_Overpower_Decimate) && LevelChecked(SteelCyclone) && (gauge >= decimateGaugeSpend || HasEffect(Buffs.InnerReleaseStacks) || HasEffect(Buffs.NascentChaos))) + if (IsEnabled(CustomComboPreset.WAR_AoE_Advanced_Decimate) && LevelChecked(SteelCyclone) && (gauge >= decimateGaugeSpend || HasEffect(Buffs.InnerReleaseStacks) || HasEffect(Buffs.NascentChaos))) return OriginalHook(SteelCyclone); } @@ -281,6 +386,30 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } + internal class War_ST_StormsEye : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.War_ST_StormsEye; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (actionID == StormsEye) + { + if (comboTime > 0) + { + if (lastComboMove == HeavySwing && LevelChecked(Maim)) + return Maim; + + if (lastComboMove == Maim && LevelChecked(StormsEye)) + return StormsEye; + } + + return HeavySwing; + } + + return actionID; + } + } + internal class WAR_NascentFlash : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_NascentFlash; @@ -299,9 +428,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } - internal class WAR_ST_StormsPath_PrimalCombo : CustomCombo + internal class WAR_ST_Advanced_PrimalCombo : CustomCombo { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_ST_StormsPath_PrimalRend; + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WAR_ST_Advanced_PrimalRend; protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -309,7 +438,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (LevelChecked(PrimalRend) && HasEffect(Buffs.PrimalRendReady)) return PrimalRend; - if (LevelChecked(PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && WasLastWeaponskill(PrimalRend)) + if (LevelChecked(PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && JustUsed(PrimalRend)) return PrimalRuination; } @@ -350,7 +479,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (LevelChecked(PrimalRend) && HasEffect(Buffs.PrimalRendReady)) return PrimalRend; - if (LevelChecked(PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && WasLastWeaponskill(PrimalRend)) + if (LevelChecked(PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && JustUsed(PrimalRend)) return PrimalRuination; } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index d33a2869e..58774a677 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -2449,31 +2449,31 @@ internal static void Draw(CustomComboPreset preset, bool enabled) // ==================================================================================== #region WARRIOR - if (preset == CustomComboPreset.WAR_ST_StormsPath_StormsEye && enabled) + if (preset == CustomComboPreset.WAR_ST_Advanced_StormsEye && enabled) UserConfig.DrawSliderInt(0, 30, WAR.Config.WAR_SurgingRefreshRange, "Seconds remaining before refreshing Surging Tempest."); if (preset == CustomComboPreset.WAR_InfuriateFellCleave && enabled) UserConfig.DrawSliderInt(0, 50, WAR.Config.WAR_InfuriateRange, "Set how much rage to be at or under to use this feature."); - if (preset == CustomComboPreset.WAR_ST_StormsPath_Onslaught && enabled) + if (preset == CustomComboPreset.WAR_ST_Advanced_Onslaught && enabled) UserConfig.DrawSliderInt(0, 2, WAR.Config.WAR_KeepOnslaughtCharges, "How many charges to keep ready? (0 = Use All)"); - if (preset == CustomComboPreset.WAR_ST_StormsPath_Infuriate && enabled) + if (preset == CustomComboPreset.WAR_ST_Advanced_Infuriate && enabled) UserConfig.DrawSliderInt(0, 2, WAR.Config.WAR_KeepInfuriateCharges, "How many charges to keep ready? (0 = Use All)"); if (preset == CustomComboPreset.WAR_Variant_Cure) UserConfig.DrawSliderInt(1, 100, WAR.Config.WAR_VariantCure, "HP% to be at or under", 200); - if (preset == CustomComboPreset.WAR_ST_StormsPath_FellCleave) + if (preset == CustomComboPreset.WAR_ST_Advanced_FellCleave) UserConfig.DrawSliderInt(50, 100, WAR.Config.WAR_FellCleaveGauge, "Minimum gauge to spend"); - if (preset == CustomComboPreset.WAR_AoE_Overpower_Decimate) + if (preset == CustomComboPreset.WAR_AoE_Advanced_Decimate) UserConfig.DrawSliderInt(50, 100, WAR.Config.WAR_DecimateGauge, "Minimum gauge to spend"); - if (preset == CustomComboPreset.WAR_ST_StormsPath_Infuriate) + if (preset == CustomComboPreset.WAR_ST_Advanced_Infuriate) UserConfig.DrawSliderInt(0, 50, WAR.Config.WAR_InfuriateSTGauge, "Use when gauge is under or equal to"); - if (preset == CustomComboPreset.WAR_AoE_Overpower_Infuriate) + if (preset == CustomComboPreset.WAR_AoE_Advanced_Infuriate) UserConfig.DrawSliderInt(0, 50, WAR.Config.WAR_InfuriateAoEGauge, "Use when gauge is under or equal to"); if (preset == CustomComboPreset.WARPvP_BurstMode_Blota) From c481a48fd099d1f920d31793cffc910759a79e59 Mon Sep 17 00:00:00 2001 From: ace Date: Sun, 18 Aug 2024 15:59:07 -0700 Subject: [PATCH 127/142] cleanup --- XIVSlothCombo/Combos/PvE/VPR.cs | 56 +++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index a08178281..66813a1f7 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -119,15 +119,16 @@ internal class VPR_ST_SimpleMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { VPRGauge? gauge = GetJobGauge(); + int RattlingCoils = gauge.RattlingCoilStacks; + var enemyHP = GetTargetHPPercent(); + var ireCD = GetCooldownRemainingTime(SerpentsIre); bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); - double enemyHP = GetTargetHPPercent(); bool VicewinderReady = gauge.DreadCombo == DreadCombo.Dreadwinder; bool HuntersCoilReady = gauge.DreadCombo == DreadCombo.HuntersCoil; bool SwiftskinsCoilReady = gauge.DreadCombo == DreadCombo.SwiftskinsCoil; - float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; bool in5y = GetTargetDistance() <= 5; - int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); + float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; if (actionID is SteelFangs) { @@ -202,13 +203,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Overcap protection if (CappedOnCoils && ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken - (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up + (ireCD <= GCD * 5))) //spend in case under Reawaken right as Ire comes up return UncoiledFury; //Vicewinder Usage if (HasEffect(Buffs.Swiftscaled) && ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && - ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && + ((ireCD >= GCD * 5) || !LevelChecked(SerpentsIre)) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return Vicewinder; @@ -314,14 +315,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { + var ireCD = GetCooldownRemainingTime(SerpentsIre); + if (LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && !VPRCheckTimers.IsEmpowermentExpiring(6)) { if ((!JustUsed(SerpentsIre, 3f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst - (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA - (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min + (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50 && ireCD >= 50) || //2nd RA + (gauge.SerpentOffering is >= 50 and <= 80 && ireCD is >= 50 and <= 62) || //1min (gauge.SerpentOffering >= 100) || //overcap (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 return true; @@ -338,16 +341,17 @@ internal class VPR_ST_AdvancedMode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { VPRGauge? gauge = GetJobGauge(); - bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); int uncoiledThreshold = Config.VPR_ST_UncoiledFury_Threshold; - double enemyHP = GetTargetHPPercent(); + int RattlingCoils = gauge.RattlingCoilStacks; + var enemyHP = GetTargetHPPercent(); + var ireCD = GetCooldownRemainingTime(SerpentsIre); + bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); bool VicewinderReady = gauge.DreadCombo == DreadCombo.Dreadwinder; bool HuntersCoilReady = gauge.DreadCombo == DreadCombo.HuntersCoil; bool SwiftskinsCoilReady = gauge.DreadCombo == DreadCombo.SwiftskinsCoil; - float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; bool in5y = GetTargetDistance() <= 5; - int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); + float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; if (actionID is SteelFangs) @@ -439,14 +443,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Overcap protection if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && CappedOnCoils && ((HasCharges(Vicewinder) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.Reawakened)) || //spend if Vicewinder is up, after Reawaken - (GetCooldownRemainingTime(SerpentsIre) <= GCD * 5))) //spend in case under Reawaken right as Ire comes up + (ireCD <= GCD * 5))) //spend in case under Reawaken right as Ire comes up return UncoiledFury; //Vicewinder Usage if (IsEnabled(CustomComboPreset.VPR_ST_CDs) && IsEnabled(CustomComboPreset.VPR_ST_Vicewinder) && HasEffect(Buffs.Swiftscaled) && ActionReady(Vicewinder) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && - ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && + ((ireCD >= GCD * 5) || !LevelChecked(SerpentsIre)) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return Vicewinder; @@ -569,14 +573,16 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { + var ireCD = GetCooldownRemainingTime(SerpentsIre); + if (LevelChecked(Reawaken) && !HasEffect(Buffs.Reawakened) && InActionRange(Reawaken) && !HasEffect(Buffs.HuntersVenom) && !HasEffect(Buffs.SwiftskinsVenom) && !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && !VPRCheckTimers.IsEmpowermentExpiring(6)) { if ((!JustUsed(SerpentsIre, 2.1f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst - (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50) || //2nd RA - (gauge.SerpentOffering is >= 50 and <= 80 && GetCooldownRemainingTime(SerpentsIre) is >= 50 and <= 65) || //1min + (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50 && ireCD >= 50) || //2nd RA + (gauge.SerpentOffering is >= 50 and <= 80 && ireCD is >= 50 and <= 62) || //1min (gauge.SerpentOffering >= 100) || //overcap (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 return true; @@ -592,12 +598,13 @@ internal class VPR_AoE_Simplemode : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { VPRGauge? gauge = GetJobGauge(); + int RattlingCoils = gauge.RattlingCoilStacks; + var ireCD = GetCooldownRemainingTime(SerpentsIre); bool VicepitReady = gauge.DreadCombo == DreadCombo.PitOfDread; bool SwiftskinsDenReady = gauge.DreadCombo == DreadCombo.SwiftskinsDen; bool HuntersDenReady = gauge.DreadCombo == DreadCombo.HuntersDen; - float GCD = GetCooldown(ReavingMaw).CooldownTotal; - int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); + float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; if (actionID is SteelMaw) { @@ -654,12 +661,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Overcap protection if (((HasCharges(Vicepit) && !HasEffect(Buffs.FellskinsVenom) && !HasEffect(Buffs.FellhuntersVenom)) || - GetCooldownRemainingTime(SerpentsIre) <= GCD * 2) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) + ireCD <= GCD * 2) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) return UncoiledFury; //Vicepit Usage if (ActionReady(Vicepit) && !HasEffect(Buffs.Reawakened) && - ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre)) && InMeleeRange()) + ((ireCD >= GCD * 5) || !LevelChecked(SerpentsIre)) && InMeleeRange()) return Vicepit; // Uncoiled Fury usage @@ -762,13 +769,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { VPRGauge? gauge = GetJobGauge(); int uncoiledThreshold = Config.VPR_AoE_UncoiledFury_Threshold; - double enemyHP = GetTargetHPPercent(); + int RattlingCoils = gauge.RattlingCoilStacks; + var enemyHP = GetTargetHPPercent(); + var ireCD = GetCooldownRemainingTime(SerpentsIre); bool VicepitReady = gauge.DreadCombo == DreadCombo.PitOfDread; bool SwiftskinsDenReady = gauge.DreadCombo == DreadCombo.SwiftskinsDen; bool HuntersDenReady = gauge.DreadCombo == DreadCombo.HuntersDen; - float GCD = GetCooldown(ReavingMaw).CooldownTotal; - int RattlingCoils = gauge.RattlingCoilStacks; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); + float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; if (actionID is SteelMaw) { @@ -840,14 +848,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //Overcap protection if (IsEnabled(CustomComboPreset.VPR_AoE_UncoiledFury) && ((HasCharges(Vicepit) && !HasEffect(Buffs.FellskinsVenom) && !HasEffect(Buffs.FellhuntersVenom)) || - GetCooldownRemainingTime(SerpentsIre) <= GCD * 2) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) + ireCD <= GCD * 2) && !HasEffect(Buffs.Reawakened) && CappedOnCoils) return UncoiledFury; //Vicepit Usage if (IsEnabled(CustomComboPreset.VPR_AoE_CDs) && IsEnabled(CustomComboPreset.VPR_AoE_Vicepit) && ActionReady(Vicepit) && !HasEffect(Buffs.Reawakened) && InMeleeRange() && - ((GetCooldownRemainingTime(SerpentsIre) >= GCD * 5) || !LevelChecked(SerpentsIre))) + ((ireCD >= GCD * 5) || !LevelChecked(SerpentsIre))) return Vicepit; // Uncoiled Fury usage From d006b5e789c3728320223e25a373768be0e3f19e Mon Sep 17 00:00:00 2001 From: Ethan Henderson Date: Mon, 19 Aug 2024 03:47:20 -0600 Subject: [PATCH 128/142] Fix minor typos --- XIVSlothCombo/Combos/PvE/AST.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/AST.cs b/XIVSlothCombo/Combos/PvE/AST.cs index 9cfc9618e..7677f0e01 100644 --- a/XIVSlothCombo/Combos/PvE/AST.cs +++ b/XIVSlothCombo/Combos/PvE/AST.cs @@ -355,12 +355,12 @@ Gauge.DrawnCards[0] is not CardType.NONE && CanSpellWeave(actionID)) return Variant.VariantSpiritDart; - float refreshtimer = Config.AST_ST_DPS_CombustUptime_Adv ? Config.AST_ST_DPS_CombustUptime_Threshold : 3; - if (GetDebuffRemainingTime(dotDebuffID) <= refreshtimer && + float refreshTimer = Config.AST_ST_DPS_CombustUptime_Adv ? Config.AST_ST_DPS_CombustUptime_Threshold : 3; + if (GetDebuffRemainingTime(dotDebuffID) <= refreshTimer && GetTargetHPPercent() > Config.AST_DPS_CombustOption) return OriginalHook(Combust); - //AlterateMode idles as Malefic + //Alternate Mode (idles as Malefic) if (AlternateMode) return OriginalHook(Malefic); } } From 72026a422e5506bf8aa6bf391b4140a48bc2854b Mon Sep 17 00:00:00 2001 From: Ethan Henderson Date: Mon, 19 Aug 2024 04:08:58 -0600 Subject: [PATCH 129/142] Add AST's Earthly Star --- XIVSlothCombo/Combos/CustomComboPreset.cs | 18 ++++++++++++++---- XIVSlothCombo/Combos/PvE/AST.cs | 19 +++++++++++++++++-- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index c83e436b9..565c2bc7f 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -213,9 +213,14 @@ public enum CustomComboPreset AST_DPS_Oracle = 1015, [ParentCombo(AST_ST_DPS)] - [CustomComboInfo("Level 100 Opener", "Use the Balance opener.", AST.JobID, 11, "", "")] + [CustomComboInfo("Level 100 Opener", "Use the Balance opener.", AST.JobID, 1)] AST_ST_DPS_Opener = 1040, + [ParentCombo(AST_ST_DPS)] + [CustomComboInfo("Earthly Star Option", "Adds Earthly Star." + + "\nTo be used in conjunction with Redirect/Reaction/etc", AST.JobID, 11)] + AST_ST_DPS_EarthlyStar = 1051, + #endregion #region AOE DPS @@ -244,12 +249,17 @@ public enum CustomComboPreset AST_AOE_AutoPlay = 1045, [ParentCombo(AST_AOE_DPS)] - [CustomComboInfo("Lord of Crowns Weave Option", "Adds Lord Of Crowns", AST.JobID, 10, "", "")] + [CustomComboInfo("Lord of Crowns Weave Option", "Adds Lord Of Crowns", AST.JobID, 7, "", "")] AST_AOE_LazyLord = 1046, [ParentCombo(AST_AOE_DPS)] - [CustomComboInfo("Oracle Option", "Adds Oracle after Divination", AST.JobID)] - AST_AOE_Oracle = 1047, + [CustomComboInfo("Oracle Option", "Adds Oracle after Divination", AST.JobID, 8)] + AST_AOE_Oracle = 1047, + + [ParentCombo(AST_AOE_DPS)] + [CustomComboInfo("Earthly Star Option", "Adds Earthly Star." + + "\nTo be used in conjunction with Redirect/Reaction/etc", AST.JobID, 9)] + AST_AOE_DPS_EarthlyStar = 1052, #endregion diff --git a/XIVSlothCombo/Combos/PvE/AST.cs b/XIVSlothCombo/Combos/PvE/AST.cs index 7677f0e01..dffbb3b20 100644 --- a/XIVSlothCombo/Combos/PvE/AST.cs +++ b/XIVSlothCombo/Combos/PvE/AST.cs @@ -27,6 +27,8 @@ internal const uint Gravity = 3615, Gravity2 = 25872, Oracle = 37029, + EarthlyStar = 7439, + DetonateStar = 8324, //Cards AstralDraw = 37017, @@ -86,6 +88,7 @@ internal const ushort Divination = 1878, LordOfCrownsDrawn = 2054, LadyOfCrownsDrawn = 2055, + GiantDominance = 1248, ClarifyingDraw = 2713, Macrocosmos = 2718, //The "Buff" that shows when you're holding onto the card @@ -341,6 +344,12 @@ Gauge.DrawnCards[0] is not CardType.NONE && CanDelayedWeave(actionID)) return OriginalHook(MinorArcana); + //Earthly Star + if (IsEnabled(CustomComboPreset.AST_ST_DPS_EarthlyStar) && + ActionReady(EarthlyStar) && + CanSpellWeave(actionID)) + return EarthlyStar; + if (HasBattleTarget()) { //Combust @@ -450,8 +459,14 @@ Gauge.DrawnCards[0] is not CardType.NONE && IsEnabled(CustomComboPreset.AST_AOE_LazyLord) && Gauge.DrawnCrownCard is CardType.LORD && HasBattleTarget() && CanDelayedWeave(actionID)) - return OriginalHook(MinorArcana); - + return OriginalHook(MinorArcana); + + //Earthly Star + if (IsEnabled(CustomComboPreset.AST_AOE_DPS_EarthlyStar) && + ActionReady(EarthlyStar) && + CanSpellWeave(actionID)) + return EarthlyStar; + } return actionID; } From 24b935f2e0cccfe5c791022c813ced7cd003d38a Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 19 Aug 2024 04:03:57 -0700 Subject: [PATCH 130/142] . --- XIVSlothCombo/Combos/PvE/VPR.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index 66813a1f7..1e5d54d0c 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -120,7 +120,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { VPRGauge? gauge = GetJobGauge(); int RattlingCoils = gauge.RattlingCoilStacks; - var enemyHP = GetTargetHPPercent(); var ireCD = GetCooldownRemainingTime(SerpentsIre); bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) && !HasEffect(All.Buffs.TrueNorth) && CanDelayedWeave(actionID); bool VicewinderReady = gauge.DreadCombo == DreadCombo.Dreadwinder; @@ -215,7 +214,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Uncoiled Fury usage if (LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && - gauge.RattlingCoilStacks > 1 && + RattlingCoils > 1 && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && !VPRCheckTimers.IsEmpowermentExpiring(6) && !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) @@ -457,7 +456,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Uncoiled Fury usage if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && - ((gauge.RattlingCoilStacks > Config.VPR_ST_UncoiledFury_HoldCharges) || + ((RattlingCoils > Config.VPR_ST_UncoiledFury_HoldCharges) || (enemyHP < uncoiledThreshold && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && !VicewinderReady && !HuntersCoilReady && !SwiftskinsCoilReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.ReadyToReawaken) && !WasLastWeaponskill(Ouroboros) && @@ -861,7 +860,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Uncoiled Fury usage if (IsEnabled(CustomComboPreset.VPR_AoE_UncoiledFury) && LevelChecked(UncoiledFury) && - ((gauge.RattlingCoilStacks > Config.VPR_AoE_UncoiledFury_HoldCharges) || (enemyHP < uncoiledThreshold && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && + ((RattlingCoils > Config.VPR_AoE_UncoiledFury_HoldCharges) || (enemyHP < uncoiledThreshold && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge))) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && !VicepitReady && !HuntersDenReady && !SwiftskinsDenReady && !HasEffect(Buffs.Reawakened) && !HasEffect(Buffs.FellskinsVenom) && !HasEffect(Buffs.FellhuntersVenom) && From 1dbbe536dec4adcb009a361026a7a92802f95aac Mon Sep 17 00:00:00 2001 From: Akinee Date: Mon, 19 Aug 2024 18:27:03 +0200 Subject: [PATCH 131/142] Added motif downtime option --- XIVSlothCombo/Combos/CustomComboPreset.cs | 119 ++++++++++++---------- XIVSlothCombo/Combos/PvE/PCT.cs | 28 ++--- 2 files changed, 77 insertions(+), 70 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 613146500..433bd8ac6 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2333,7 +2333,6 @@ public enum CustomComboPreset #region PICTOMANCER - #region Single Target [ReplaceSkill(PCT.FireInRed)] [ConflictingCombos(CombinedAetherhues)] [CustomComboInfo("Simple Mode - Single Target", "Consolidates the single target rotation into one button, ideal for newcomers.", PCT.JobID)] @@ -2357,6 +2356,8 @@ public enum CustomComboPreset [CustomComboInfo("One Button Paint", "Consolidates paint-consuming actions into one button.", PCT.JobID)] CombinedPaint = 20004, + #region ST + [ReplaceSkill(PCT.FireInRed)] [ConflictingCombos(CombinedAetherhues, PCT_ST_SimpleMode)] [CustomComboInfo("Advanced Mode - Single Target", $"Replaces Fire in Red with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", PCT.JobID)] @@ -2368,200 +2369,204 @@ public enum CustomComboPreset [ParentCombo(PCT_ST_Advanced_Openers)] [CustomComboInfo("Early Balance Opener Option", $"Uses Early Starry Muse Balance Opener depending on your current level.", PCT.JobID)] - PCT_ST_Advanced_Openers_EarlyOpener = 20034, + PCT_ST_Advanced_Openers_EarlyOpener = 20007, [ParentCombo(PCT_ST_AdvancedMode)] - [ReplaceSkill(PCT.FireInRed, PCT.AeroInGreen, PCT.WaterinBlue)] - [CustomComboInfo("Prepull Motifs", "Adds missing Motifs to the combo while out of combat or while no target is present in combat.", PCT.JobID)] - PCT_ST_AdvancedMode_PrePullMotifs = 20007, + [CustomComboInfo("Prepull Motifs Feature", "Adds missing Motifs to the combo while out of combat.", PCT.JobID)] + PCT_ST_AdvancedMode_PrePullMotifs = 20008, + + [ParentCombo(PCT_ST_AdvancedMode_PrePullMotifs)] + [CustomComboInfo("Downtime Motifs Option", "Adds missing Motifs to the combo while no target is present in combat.", PCT.JobID)] + PCT_ST_AdvancedMode_NoTargetMotifs = 20009, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Starry Muse Burst Feature", $"Adds selected spells below to the burst phase.", PCT.JobID)] - PCT_ST_AdvancedMode_Burst_Phase = 20008, + PCT_ST_AdvancedMode_Burst_Phase = 20010, [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the burst phase.", PCT.JobID)] - PCT_ST_AdvancedMode_Burst_CometInBlack = 20009, + PCT_ST_AdvancedMode_Burst_CometInBlack = 20011, [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] [CustomComboInfo("Star Prism Option", $"Adds Star Prism to the burst phase.", PCT.JobID)] - PCT_ST_AdvancedMode_Burst_StarPrism = 20010, + PCT_ST_AdvancedMode_Burst_StarPrism = 20012, [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] [CustomComboInfo("Rainbow Drip Option", $"Adds Rainbow Drip to the burst phase.", PCT.JobID)] - PCT_ST_AdvancedMode_Burst_RainbowDrip = 20011, + PCT_ST_AdvancedMode_Burst_RainbowDrip = 20013, [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp Combo to the burst phase.", PCT.JobID)] - PCT_ST_AdvancedMode_Burst_HammerCombo = 20012, + PCT_ST_AdvancedMode_Burst_HammerCombo = 20014, [ParentCombo(PCT_ST_AdvancedMode_Burst_Phase)] [CustomComboInfo("Blizzard in Cyan Option", $"Adds Blizzard in Cyan to the burst phase.", PCT.JobID)] - PCT_ST_AdvancedMode_Burst_BlizzardInCyan = 20013, + PCT_ST_AdvancedMode_Burst_BlizzardInCyan = 20015, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Motif Selection Feature", $"Add Selected Motifs to the combo.", PCT.JobID)] - PCT_ST_AdvancedMode_MotifFeature = 20014, + PCT_ST_AdvancedMode_MotifFeature = 20016, [ParentCombo(PCT_ST_AdvancedMode_MotifFeature)] [CustomComboInfo("Landscape Motif Option", $"Adds Landscape Motif.", PCT.JobID)] - PCT_ST_AdvancedMode_LandscapeMotif = 20015, + PCT_ST_AdvancedMode_LandscapeMotif = 20017, [ParentCombo(PCT_ST_AdvancedMode_MotifFeature)] [CustomComboInfo("Creature Motif Option", $"Adds Landscape Motif.", PCT.JobID)] - PCT_ST_AdvancedMode_CreatureMotif = 20016, + PCT_ST_AdvancedMode_CreatureMotif = 20018, [ParentCombo(PCT_ST_AdvancedMode_MotifFeature)] [CustomComboInfo("Weapon Motif Option", $"Adds Weapon Motif.", PCT.JobID)] - PCT_ST_AdvancedMode_WeaponMotif = 20017, + PCT_ST_AdvancedMode_WeaponMotif = 20019, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Muse Selection Feature", $"Adds Selected Muses to the combo.", PCT.JobID)] - PCT_ST_AdvancedMode_MuseFeature = 20018, + PCT_ST_AdvancedMode_MuseFeature = 20020, [ParentCombo(PCT_ST_AdvancedMode_MuseFeature)] [CustomComboInfo("Scenic Muse Option", $"Adds Scenic Muse.", PCT.JobID)] - PCT_ST_AdvancedMode_ScenicMuse = 20019, + PCT_ST_AdvancedMode_ScenicMuse = 20021, [ParentCombo(PCT_ST_AdvancedMode_MuseFeature)] [CustomComboInfo("Living Muse Option", $"Adds Living Muse.", PCT.JobID)] - PCT_ST_AdvancedMode_LivingMuse = 20020, + PCT_ST_AdvancedMode_LivingMuse = 20022, [ParentCombo(PCT_ST_AdvancedMode_MuseFeature)] [CustomComboInfo("Steel Muse Option", $"Adds Steel Muse.", PCT.JobID)] - PCT_ST_AdvancedMode_SteelMuse = 20021, + PCT_ST_AdvancedMode_SteelMuse = 20023, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Mog/Madeen Feature", $"Adds Mog/Madeen to the combo.", PCT.JobID)] - PCT_ST_AdvancedMode_MogOfTheAges = 20022, + PCT_ST_AdvancedMode_MogOfTheAges = 20024, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Subtractive Palette Feature", $"Adds Subtractive Palette to the combo.", PCT.JobID)] - PCT_ST_AdvancedMode_SubtractivePalette = 20023, - - //Pooling option to be added - 20024 + PCT_ST_AdvancedMode_SubtractivePalette = 20025, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the combo.", PCT.JobID)] - PCT_ST_AdvancedMode_CometinBlack = 20025, + PCT_ST_AdvancedMode_CometinBlack = 20026, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp combo.", PCT.JobID)] - PCT_ST_AdvancedMode_HammerStampCombo = 20026, + PCT_ST_AdvancedMode_HammerStampCombo = 20027, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Movement Features", $"Adds selected features to the combo while moving.", PCT.JobID)] - PCT_ST_AdvancedMode_MovementFeature = 20027, + PCT_ST_AdvancedMode_MovementFeature = 20028, [ParentCombo(PCT_ST_AdvancedMode_MovementFeature)] [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp Combo to the combo while moving.", PCT.JobID)] - PCT_ST_AdvancedMode_MovementOption_HammerStampCombo = 20028, + PCT_ST_AdvancedMode_MovementOption_HammerStampCombo = 20029, [ParentCombo(PCT_ST_AdvancedMode_MovementFeature)] [CustomComboInfo("Holy in White Option", $"Adds Holy in White to the combo while moving.", PCT.JobID)] - PCT_ST_AdvancedMode_MovementOption_HolyInWhite = 20029, + PCT_ST_AdvancedMode_MovementOption_HolyInWhite = 20030, [ParentCombo(PCT_ST_AdvancedMode_MovementFeature)] [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the combo while moving.", PCT.JobID)] - PCT_ST_AdvancedMode_MovementOption_CometinBlack = 20030, + PCT_ST_AdvancedMode_MovementOption_CometinBlack = 20031, [ParentCombo(PCT_ST_AdvancedMode_MovementFeature)] [CustomComboInfo("Swiftcast Option ", $"Adds Swiftcast to the combo while moving.", PCT.JobID)] - PCT_ST_AdvancedMode_SwitfcastOption = 20031, + PCT_ST_AdvancedMode_SwitfcastOption = 20032, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Blizzard in Cyan Option", $"Adds Blizzard in Cyan to the combo.", PCT.JobID)] - PCT_ST_AdvancedMode_BlizzardInCyan = 20032, + PCT_ST_AdvancedMode_BlizzardInCyan = 20033, [ParentCombo(PCT_ST_AdvancedMode)] [CustomComboInfo("Lucid Dreaming Option", $"Adds Lucid Dreaming to the combo.", PCT.JobID)] - PCT_ST_AdvancedMode_LucidDreaming = 20033, + PCT_ST_AdvancedMode_LucidDreaming = 20034, - // Last value for ST = 20033 + // Last value for ST = 20034 #endregion + #region AoE + [ReplaceSkill(PCT.FireIIinRed)] [ConflictingCombos(CombinedAetherhues, PCT_AoE_SimpleMode)] - [CustomComboInfo("Advanced Mode - AoE", $"Replaces Fire II in Red with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", PCT.JobID)] + [CustomComboInfo("Advanced Mode - AoE", $"Replaces Fire II in Red with a one-button full AoE rotation.\nThese features are ideal if you want to customize the rotation.", PCT.JobID)] PCT_AoE_AdvancedMode = 20040, [ParentCombo(PCT_AoE_AdvancedMode)] - [ReplaceSkill(PCT.FireIIinRed)] - [CustomComboInfo("Prepull Motifs", "Adds missing Motifs to the combo while out of combat or while no target is present in combat.", PCT.JobID)] + [CustomComboInfo("Prepull Motifs Feature", "Adds missing Motifs to the combo while out of combat.", PCT.JobID)] PCT_AoE_AdvancedMode_PrePullMotifs = 20041, + [ParentCombo(PCT_AoE_AdvancedMode_PrePullMotifs)] + [CustomComboInfo("Downtime Motifs Option", "Adds missing Motifs to the combo while no target is present in combat.", PCT.JobID)] + PCT_AoE_AdvancedMode_NoTargetMotifs = 20042, + [ParentCombo(PCT_AoE_AdvancedMode)] [CustomComboInfo("Starry Muse Burst Feature", $"Adds selected spells below to the burst phase.", PCT.JobID)] - PCT_AoE_AdvancedMode_Burst_Phase = 20042, + PCT_AoE_AdvancedMode_Burst_Phase = 20043, [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the burst phase.", PCT.JobID)] - PCT_AoE_AdvancedMode_Burst_CometInBlack = 20043, + PCT_AoE_AdvancedMode_Burst_CometInBlack = 20044, [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] [CustomComboInfo("Star Prism Option", $"Adds Star Prism to the burst phase.", PCT.JobID)] - PCT_AoE_AdvancedMode_Burst_StarPrism = 20044, + PCT_AoE_AdvancedMode_Burst_StarPrism = 20045, [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] [CustomComboInfo("Rainbow Drip Option", $"Adds Rainbow Drip to the burst phase.", PCT.JobID)] - PCT_AoE_AdvancedMode_Burst_RainbowDrip = 20045, + PCT_AoE_AdvancedMode_Burst_RainbowDrip = 20046, [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp Combo to the burst phase.", PCT.JobID)] - PCT_AoE_AdvancedMode_Burst_HammerCombo = 20046, + PCT_AoE_AdvancedMode_Burst_HammerCombo = 20047, [ParentCombo(PCT_AoE_AdvancedMode_Burst_Phase)] [CustomComboInfo("Blizzard in Cyan Option", $"Adds Blizzard in Cyan to the burst phase.", PCT.JobID)] - PCT_AoE_AdvancedMode_Burst_BlizzardInCyan = 20047, + PCT_AoE_AdvancedMode_Burst_BlizzardInCyan = 20048, [ParentCombo(PCT_AoE_AdvancedMode)] [CustomComboInfo("Motif Selection Feature", $"Add Selected Motifs to the combo.", PCT.JobID)] - PCT_AoE_AdvancedMode_MotifFeature = 20048, + PCT_AoE_AdvancedMode_MotifFeature = 20049, [ParentCombo(PCT_AoE_AdvancedMode_MotifFeature)] [CustomComboInfo("Landscape Motif Option", $"Adds Landscape Motif.", PCT.JobID)] - PCT_AoE_AdvancedMode_LandscapeMotif = 20049, + PCT_AoE_AdvancedMode_LandscapeMotif = 20050, [ParentCombo(PCT_AoE_AdvancedMode_MotifFeature)] [CustomComboInfo("Creature Motif Option", $"Adds Landscape Motif.", PCT.JobID)] - PCT_AoE_AdvancedMode_CreatureMotif = 20050, + PCT_AoE_AdvancedMode_CreatureMotif = 20051, [ParentCombo(PCT_AoE_AdvancedMode_MotifFeature)] [CustomComboInfo("Weapon Motif Option", $"Adds Weapon Motif.", PCT.JobID)] - PCT_AoE_AdvancedMode_WeaponMotif = 20051, + PCT_AoE_AdvancedMode_WeaponMotif = 20052, [ParentCombo(PCT_AoE_AdvancedMode)] [CustomComboInfo("Muse Selection Feature", $"Adds Selected Muses to the combo.", PCT.JobID)] - PCT_AoE_AdvancedMode_MuseFeature = 20052, + PCT_AoE_AdvancedMode_MuseFeature = 20053, [ParentCombo(PCT_AoE_AdvancedMode_MuseFeature)] [CustomComboInfo("Scenic Muse Option", $"Adds Scenic Muse.", PCT.JobID)] - PCT_AoE_AdvancedMode_ScenicMuse = 20053, + PCT_AoE_AdvancedMode_ScenicMuse = 20054, [ParentCombo(PCT_AoE_AdvancedMode_MuseFeature)] [CustomComboInfo("Living Muse Option", $"Adds Living Muse.", PCT.JobID)] - PCT_AoE_AdvancedMode_LivingMuse = 20054, + PCT_AoE_AdvancedMode_LivingMuse = 20055, [ParentCombo(PCT_AoE_AdvancedMode_MuseFeature)] [CustomComboInfo("Steel Muse Option", $"Adds Steel Muse.", PCT.JobID)] - PCT_AoE_AdvancedMode_SteelMuse = 20055, + PCT_AoE_AdvancedMode_SteelMuse = 20056, [ParentCombo(PCT_AoE_AdvancedMode)] [CustomComboInfo("Mog/Madeen Feature", $"Adds Mog/Madeen to the combo.", PCT.JobID)] - PCT_AoE_AdvancedMode_MogOfTheAges = 20056, + PCT_AoE_AdvancedMode_MogOfTheAges = 20057, [ParentCombo(PCT_AoE_AdvancedMode)] [CustomComboInfo("Subtractive Palette Feature", $"Adds Subtractive Palette to the combo.", PCT.JobID)] - PCT_AoE_AdvancedMode_SubtractivePalette = 20057, - - // Pooling Option to be added - 20058 + PCT_AoE_AdvancedMode_SubtractivePalette = 20058, [ParentCombo(PCT_AoE_AdvancedMode)] - [CustomComboInfo("Comet in Black Feature", $"Adds Comet in Black to the combo.", PCT.JobID)] + [CustomComboInfo("Comet in Black Option", $"Adds Comet in Black to the combo.", PCT.JobID)] PCT_AoE_AdvancedMode_CometinBlack = 20059, [ParentCombo(PCT_AoE_AdvancedMode)] - [CustomComboInfo("Hammer Stamp Combo Feature", $"Adds Hammer Stamp combo.", PCT.JobID)] + [CustomComboInfo("Hammer Stamp Combo Option", $"Adds Hammer Stamp combo.", PCT.JobID)] PCT_AoE_AdvancedMode_HammerStampCombo = 20060, [ParentCombo(PCT_AoE_AdvancedMode)] @@ -2595,6 +2600,8 @@ public enum CustomComboPreset // Last value for AoE = 20067 #endregion + #endregion + #region PALADIN // Simple Modes diff --git a/XIVSlothCombo/Combos/PvE/PCT.cs b/XIVSlothCombo/Combos/PvE/PCT.cs index d8396f9cc..df12da91e 100644 --- a/XIVSlothCombo/Combos/PvE/PCT.cs +++ b/XIVSlothCombo/Combos/PvE/PCT.cs @@ -194,9 +194,9 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb bool canWeave = CanSpellWeave(ActionWatching.LastSpell) || CanSpellWeave(actionID); // Prepull logic - if (!InCombat() || (InCombat() && CurrentTarget == null)) + if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_PrePullMotifs)) { - if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_PrePullMotifs)) + if (!InCombat() || (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_NoTargetMotifs) && InCombat() && CurrentTarget == null)) { if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn) return OriginalHook(CreatureMotif); @@ -245,7 +245,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // General Weaves if (InCombat() && canWeave) { - // Scenic Muse + // ScenicMuse if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_ScenicMuse)) { if (ScenicMuse.LevelChecked() && @@ -257,7 +257,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Living Muse + // LivingMuse if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LivingMuse)) { if (LivingMuse.LevelChecked() && @@ -276,7 +276,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Steel Muse + // SteelMuse if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SteelMuse)) { if (SteelMuse.LevelChecked() && @@ -317,7 +317,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Subtractive Palette + // SubtractivePalette if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SubtractivePalette)) { if (SubtractivePalette.LevelChecked() && @@ -405,7 +405,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (!HasEffect(Buffs.StarryMuse)) { - // Landscape Motif + // LandscapeMotif if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_LandscapeMotif)) { if (LandscapeMotif.LevelChecked() && @@ -416,7 +416,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Creature Motif + // CreatureMotif if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_CreatureMotif)) { if (CreatureMotif.LevelChecked() && @@ -427,7 +427,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Weapon Motif + // WeaponMotif if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_WeaponMotif)) { if (WeaponMotif.LevelChecked() && @@ -559,9 +559,9 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb bool canWeave = CanSpellWeave(ActionWatching.LastSpell); // Prepull logic - if (!InCombat() || (InCombat() && CurrentTarget == null)) + if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_PrePullMotifs)) { - if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_PrePullMotifs)) + if (!InCombat() || (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_NoTargetMotifs) && InCombat() && CurrentTarget == null)) { if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn) return OriginalHook(CreatureMotif); @@ -575,7 +575,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // General Weaves if (InCombat() && canWeave) { - // Living Muse + // LivingMuse if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_LivingMuse)) { if (LivingMuse.LevelChecked() && @@ -594,7 +594,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Scenic Muse + // ScenicMuse if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_ScenicMuse)) { if (ScenicMuse.LevelChecked() && @@ -606,7 +606,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } } - // Steel Muse + // SteelMuse if (IsEnabled(CustomComboPreset.PCT_AoE_AdvancedMode_SteelMuse)) { if (SteelMuse.LevelChecked() && From 7613f58c6ce4c4b3cf93d75ecf1eb305f8b88821 Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 19 Aug 2024 11:56:51 -0700 Subject: [PATCH 132/142] PrimalComboFeature PRuination fix --- XIVSlothCombo/Combos/PvE/WAR.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/PvE/WAR.cs b/XIVSlothCombo/Combos/PvE/WAR.cs index 82f14fc40..d1eebaf01 100644 --- a/XIVSlothCombo/Combos/PvE/WAR.cs +++ b/XIVSlothCombo/Combos/PvE/WAR.cs @@ -479,7 +479,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (LevelChecked(PrimalRend) && HasEffect(Buffs.PrimalRendReady)) return PrimalRend; - if (LevelChecked(PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady) && JustUsed(PrimalRend)) + if (LevelChecked(PrimalRuination) && HasEffect(Buffs.PrimalRuinationReady)) return PrimalRuination; } From 90dc566b6b90606e67ef0d05ddce918a18e5405b Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 19 Aug 2024 14:43:49 -0700 Subject: [PATCH 133/142] . --- XIVSlothCombo/Combos/PvE/VPR.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index 1e5d54d0c..ef145eb89 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -142,10 +142,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //oGCDs if (CanWeave(ActionWatching.LastWeaponskill)) { - //Serpents Ire - if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; - // Legacy Weaves if (in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) && OriginalHook(SerpentsTail) is not SerpentsTail) From d8a8a8e3d9d2f8cbd5018ec7b69510a8009ef7a2 Mon Sep 17 00:00:00 2001 From: Kage Date: Wed, 21 Aug 2024 09:52:10 +0200 Subject: [PATCH 134/142] fix TN not going off --- XIVSlothCombo/Combos/JobHelpers/DRG.cs | 3 ++- XIVSlothCombo/Combos/PvE/DRG.cs | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/DRG.cs b/XIVSlothCombo/Combos/JobHelpers/DRG.cs index cfd139623..1f298d86c 100644 --- a/XIVSlothCombo/Combos/JobHelpers/DRG.cs +++ b/XIVSlothCombo/Combos/JobHelpers/DRG.cs @@ -239,7 +239,8 @@ internal class AnimationLock DRG.WyrmwindThrust, DRG.RiseOfTheDragon, DRG.Starcross, - PvE.Content.Variant.VariantRampart + PvE.Content.Variant.VariantRampart, + PvE.All.TrueNorth ]; internal static readonly List MidLocks = diff --git a/XIVSlothCombo/Combos/PvE/DRG.cs b/XIVSlothCombo/Combos/PvE/DRG.cs index 75d9eb410..10d2f9033 100644 --- a/XIVSlothCombo/Combos/PvE/DRG.cs +++ b/XIVSlothCombo/Combos/PvE/DRG.cs @@ -422,7 +422,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove == OriginalHook(Disembowel) && LevelChecked(ChaosThrust)) { - if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && + if (IsEnabled(CustomComboPreset.DRG_TrueNorthDynamic) && + trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsRear()) return All.TrueNorth; @@ -431,8 +432,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove == OriginalHook(ChaosThrust) && LevelChecked(WheelingThrust)) { - if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && - !OnTargetsRear()) + if (IsEnabled(CustomComboPreset.DRG_TrueNorthDynamic) && + trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && + !OnTargetsRear()) return All.TrueNorth; return WheelingThrust; @@ -443,7 +445,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove == OriginalHook(FullThrust) && LevelChecked(FangAndClaw)) { - if (trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && + if (IsEnabled(CustomComboPreset.DRG_TrueNorthDynamic) && + trueNorthReady && AnimationLock.CanDRGWeave(All.TrueNorth) && !OnTargetsFlank()) return All.TrueNorth; From 53ab5011dab40ca310b6d335e264bf37a1436e55 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 21 Aug 2024 18:02:19 -0700 Subject: [PATCH 135/142] Ire GCD delay --- XIVSlothCombo/Combos/PvE/VPR.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index ef145eb89..4e2765be9 100644 --- a/XIVSlothCombo/Combos/PvE/VPR.cs +++ b/XIVSlothCombo/Combos/PvE/VPR.cs @@ -317,7 +317,7 @@ private static bool UseReawaken(VPRGauge gauge) !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && !VPRCheckTimers.IsEmpowermentExpiring(6)) { - if ((!JustUsed(SerpentsIre, 3f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst + if ((!JustUsed(SerpentsIre, 2.2f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50 && ireCD >= 50) || //2nd RA (gauge.SerpentOffering is >= 50 and <= 80 && ireCD is >= 50 and <= 62) || //1min (gauge.SerpentOffering >= 100) || //overcap @@ -575,7 +575,7 @@ private static bool UseReawaken(VPRGauge gauge) !HasEffect(Buffs.PoisedForTwinblood) && !HasEffect(Buffs.PoisedForTwinfang) && !VPRCheckTimers.IsEmpowermentExpiring(6)) { - if ((!JustUsed(SerpentsIre, 2.1f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst + if ((!JustUsed(SerpentsIre, 2.2f) && HasEffect(Buffs.ReadyToReawaken)) || //2min burst (WasLastWeaponskill(Ouroboros) && gauge.SerpentOffering >= 50 && ireCD >= 50) || //2nd RA (gauge.SerpentOffering is >= 50 and <= 80 && ireCD is >= 50 and <= 62) || //1min (gauge.SerpentOffering >= 100) || //overcap From 550e2109e97296d736e18a77e7b0e34daf9f6842 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 22 Aug 2024 03:57:51 +0100 Subject: [PATCH 136/142] Null check --- XIVSlothCombo/Combos/JobHelpers/AST.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/JobHelpers/AST.cs b/XIVSlothCombo/Combos/JobHelpers/AST.cs index a3610c642..d5b7ea2b8 100644 --- a/XIVSlothCombo/Combos/JobHelpers/AST.cs +++ b/XIVSlothCombo/Combos/JobHelpers/AST.cs @@ -105,11 +105,11 @@ public static void Invoke() if (GetPartySlot(2) is not null) { SetTarget(); - Svc.Log.Debug($"Set card to {SelectedRandomMember.Name}"); + Svc.Log.Debug($"Set card to {SelectedRandomMember?.Name}"); } else { - Svc.Log.Debug($"Setting card to {LocalPlayer.Name}"); + Svc.Log.Debug($"Setting card to {LocalPlayer?.Name}"); SelectedRandomMember = LocalPlayer; } } From 696619a561ea5fc65c1d5a99f5dda240bfe440d8 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 22 Aug 2024 05:16:36 +0100 Subject: [PATCH 137/142] Update open PR and corrected mistakes/inconstencies --- XIVSlothCombo/Combos/CustomComboPreset.cs | 8 +- XIVSlothCombo/Combos/JobHelpers/MNK.cs | 72 ++++++ XIVSlothCombo/Combos/PvE/MNK.cs | 283 +++++++--------------- 3 files changed, 162 insertions(+), 201 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 05da1c2e2..fcce206dd 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -1914,15 +1914,15 @@ public enum CustomComboPreset #region MONK - [ReplaceSkill([MNK.ArmOfTheDestroyer])] - [CustomComboInfo("Simple Mode - AoE", "Replaces Arm of the Destroyer with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", MNK.JobID)] - MNK_AOE_SimpleMode = 9003, - [ReplaceSkill([MNK.Bootshine])] [CustomComboInfo("Simple Mode - Single Target", "Replaces Bootshine with a one - button full single target rotation.\nThis is ideal for newcomers to the job.", MNK.JobID)] [ConflictingCombos(MNK_ST_BeastChakras, MNK_ST_AdvancedMode)] MNK_ST_SimpleMode = 9004, + [ReplaceSkill([MNK.ArmOfTheDestroyer])] + [CustomComboInfo("Simple Mode - AoE", "Replaces Arm of the Destroyer with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", MNK.JobID)] + MNK_AOE_SimpleMode = 9003, + #region Monk Advanced ST [ReplaceSkill([MNK.Bootshine])] [CustomComboInfo("Advanced Mode - Single Target", "Replaces Bootshine with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", MNK.JobID)] diff --git a/XIVSlothCombo/Combos/JobHelpers/MNK.cs b/XIVSlothCombo/Combos/JobHelpers/MNK.cs index 6debc2bfc..93bbe544d 100644 --- a/XIVSlothCombo/Combos/JobHelpers/MNK.cs +++ b/XIVSlothCombo/Combos/JobHelpers/MNK.cs @@ -8,6 +8,78 @@ namespace XIVSlothCombo.Combos.JobHelpers { + + internal class MNKHelper : MNK + { + public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnabled = true) + { + if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm) || CustomComboFunctions.HasEffect(Buffs.FormlessFist)) + { + if (Gauge.OpoOpoFury == 0) + { + if (CustomComboFunctions.LevelChecked(DragonKick)) + return DragonKick; + } + else + { + return CustomComboFunctions.OriginalHook(Bootshine); + } + } + + if (CustomComboFunctions.HasEffect(Buffs.RaptorForm)) + { + if (Gauge.RaptorFury == 0) + { + if (CustomComboFunctions.LevelChecked(TwinSnakes)) + return TwinSnakes; + } + else + { + if (CustomComboFunctions.LevelChecked(TrueStrike)) + return CustomComboFunctions.OriginalHook(TrueStrike); + } + } + + if (CustomComboFunctions.HasEffect(Buffs.CoeurlForm)) + { + if (Gauge.CoeurlFury == 0) + { + if (!CustomComboFunctions.OnTargetsRear() + && CustomComboFunctions.TargetNeedsPositionals() + && !CustomComboFunctions.HasEffect(Buffs.TrueNorth) + && CustomComboFunctions.LevelChecked(TrueNorth) + && CustomComboFunctions.HasCharges(TrueNorth) + && useTrueNorthIfEnabled) + { + return TrueNorth; + } + else + { + if (CustomComboFunctions.LevelChecked(Demolish)) + return Demolish; + } + } + + if (!CustomComboFunctions.OnTargetsFlank() + && CustomComboFunctions.TargetNeedsPositionals() + && !CustomComboFunctions.HasEffect(Buffs.TrueNorth) + && CustomComboFunctions.LevelChecked(TrueNorth) + && CustomComboFunctions.HasCharges(TrueNorth) + && useTrueNorthIfEnabled) + { + return TrueNorth; + } + else + { + if (CustomComboFunctions.LevelChecked(SnapPunch)) + return CustomComboFunctions.OriginalHook(SnapPunch); + } + } + + return actionId; + } + } + internal class MNKOpenerLogic : MNK { private static bool HasCooldowns() diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index c20f168b7..444fcc3fb 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -1,6 +1,5 @@ using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; -using ECommons.DalamudServices; using System; using System.Linq; using XIVSlothCombo.Combos.JobHelpers; @@ -8,7 +7,6 @@ using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; -using XIVSlothCombo.Data; using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.PvE @@ -23,7 +21,7 @@ public const uint TrueStrike = 54, SnapPunch = 56, Meditation = 36940, - SteelPeak = 3547, + SteelPeak = 25761, TwinSnakes = 61, ArmOfTheDestroyer = 62, Demolish = 66, @@ -31,7 +29,7 @@ public const uint DragonKick = 74, Rockbreaker = 70, Thunderclap = 25762, - HowlingFist = 16474, + HowlingFist = 25763, FourPointFury = 16473, PerfectBalance = 69, FormShift = 4262, @@ -73,34 +71,6 @@ public const ushort Brotherhood = 1185; } - public static class Levels - { - public const byte - TrueStrike = 4, - SnapPunch = 6, - Meditation = 15, - SteelPeak = 15, - TwinSnakes = 18, - ArmOfTheDestroyer = 26, - Rockbreaker = 30, - Demolish = 30, - FourPointFury = 45, - HowlingFist = 40, - DragonKick = 50, - PerfectBalance = 50, - TrueNorth = 50, - FormShift = 52, - MasterfulBlitz = 60, - RiddleOfFire = 68, - Enlightenment = 70, - Brotherhood = 70, - RiddleOfWind = 72, - TheForbiddenChakra = 54, - ShadowOfTheDestroyer = 82, - WindsReply = 96, - FiresReply = 100; - } - public static MNKGauge Gauge => CustomComboFunctions.GetJobGauge(); public static class Config @@ -147,50 +117,42 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance)) + if (ActionReady(PerfectBalance) && !HasEffect(Buffs.PerfectBalance)) { if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) - && GetCooldownRemainingTime(RiddleOfFire) < 7 - && GetCooldownRemainingTime(Brotherhood) < 7) - { - return PerfectBalance; - } - else if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) - && HasEffect(Buffs.RiddleOfFire) - && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8 - && !HasEffect(Buffs.FiresRumination)) + && (GetCooldownRemainingTime(RiddleOfFire) < 8 + && GetCooldownRemainingTime(Brotherhood) < 7) || + (GetBuffRemainingTime(Buffs.RiddleOfFire) >= 8 + && !HasEffect(Buffs.FiresRumination))) { return PerfectBalance; } } - if (level >= Levels.Brotherhood - && !IsOnCooldown(Brotherhood)) + if (ActionReady(Brotherhood)) { return Brotherhood; } - if (level >= Levels.RiddleOfFire - && !IsOnCooldown(RiddleOfFire)) + if (ActionReady(RiddleOfFire)) { return RiddleOfFire; } - if (level >= Levels.RiddleOfWind - && !IsOnCooldown(RiddleOfWind)) + if (ActionReady(RiddleOfWind)) { return RiddleOfWind; } - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_SecondWind_Threshold) && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + if (PlayerHealthPercentageHp() <= 25 && ActionReady(All.SecondWind)) return All.SecondWind; - if (PlayerHealthPercentageHp() <= PluginConfiguration.GetCustomIntValue(Config.MNK_ST_Bloodbath_Threshold) && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + if (PlayerHealthPercentageHp() <= 40 && ActionReady(All.Bloodbath)) return All.Bloodbath; if (Gauge.Chakra >= 5 - && level >= Levels.SteelPeak) + && SteelPeak.LevelChecked()) { - return OriginalHook(Meditation); + return OriginalHook(SteelPeak); } } @@ -198,14 +160,12 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (inCombat) { // Ensure usage if buff is almost depleted. - if (HasEffect(Buffs.FiresRumination) - && GetBuffRemainingTime(Buffs.FiresRumination) < 4) + if (GetBuffRemainingTime(Buffs.FiresRumination) < 4) { return FiresReply; } - if (HasEffect(Buffs.WindsRumination) - && GetBuffRemainingTime(Buffs.WindsRumination) < 4) + if (GetBuffRemainingTime(Buffs.WindsRumination) < 4) { return WindsReply; } @@ -216,47 +176,46 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb } // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) - { - return OriginalHook(MasterfulBlitz); - } + if (MasterfulBlitz.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && !IsOriginal(MasterfulBlitz)) + { + return OriginalHook(MasterfulBlitz); + } - // Perfect Balance - if (HasEffect(Buffs.PerfectBalance)) - { - bool solarNadi = Gauge.Nadi == Nadi.SOLAR; - bool lunarNadi = Gauge.Nadi == Nadi.LUNAR; - int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); - int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); - int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); + // Perfect Balance + if (HasEffect(Buffs.PerfectBalance)) + { + bool solarNadi = Gauge.Nadi == Nadi.SOLAR; + bool lunarNadi = Gauge.Nadi == Nadi.LUNAR; + int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count(); + int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count(); + int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count(); - #region Open Solar - if (!solarNadi && !bothNadisOpen) + #region Open Solar + if (!solarNadi && !bothNadisOpen) + { + if (coeurlChakra == 0) { - if (coeurlChakra == 0) - { - return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); - } - else if (raptorChakra == 0) - { - return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); - } - else if (opoOpoChakra == 0) - { - return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); - } + return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch); } - #endregion - #region Open Lunar - if (solarNadi || lunarNadi || bothNadisOpen) + else if (raptorChakra == 0) + { + return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike); + } + else if (opoOpoChakra == 0) { return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); } - #endregion } + #endregion + #region Open Lunar + if (solarNadi || lunarNadi || bothNadisOpen) + { + return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine); + } + #endregion + } - if (HasEffect(Buffs.WindsRumination) - && level >= Levels.WindsReply) + if (HasEffect(Buffs.WindsRumination)) { return WindsReply; } @@ -264,14 +223,13 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (HasEffect(Buffs.FiresRumination) && !HasEffect(Buffs.PerfectBalance) && !HasEffect(Buffs.FormlessFist) - && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) - && level >= Levels.FiresReply) + && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick))) { return FiresReply; } - // Standard Balls - return DetermineCoreAbility(actionID); + // Standard Beast Chakras + return MNKHelper.DetermineCoreAbility(actionID); } } @@ -317,7 +275,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) + if (PerfectBalance.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && HasCharges(PerfectBalance) && IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) && GetCooldownRemainingTime(RiddleOfFire) < 7 @@ -325,9 +283,9 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { return PerfectBalance; } - else if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) - && HasEffect(Buffs.RiddleOfFire) - && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8 + else if ((WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) + && HasEffect(Buffs.RiddleOfFire) + && GetBuffRemainingTime(Buffs.RiddleOfFire) > 8 && !HasEffect(Buffs.FiresRumination)) { return PerfectBalance; @@ -336,20 +294,20 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseBuffs)) { - if (level >= Levels.Brotherhood + if (Brotherhood.LevelChecked() && !IsOnCooldown(Brotherhood)) { return Brotherhood; } - if (level >= Levels.RiddleOfFire + if (RiddleOfFire.LevelChecked() && !IsOnCooldown(RiddleOfFire)) { return RiddleOfFire; } if (IsEnabled(CustomComboPreset.MNK_STUseROW) - && level >= Levels.RiddleOfWind + && RiddleOfWind.LevelChecked() && !IsOnCooldown(RiddleOfWind)) { return RiddleOfWind; @@ -363,7 +321,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseTheForbiddenChakra) && Gauge.Chakra >= 5 - && level >= Levels.SteelPeak) + && SteelPeak.LevelChecked()) { return OriginalHook(Meditation); } @@ -395,7 +353,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance)) { // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + if (MasterfulBlitz.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) { return OriginalHook(MasterfulBlitz); } @@ -437,7 +395,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (IsEnabled(CustomComboPreset.MNK_STUseWindsReply) && HasEffect(Buffs.WindsRumination) - && level >= Levels.WindsReply) + && WindsReply.LevelChecked()) { return WindsReply; } @@ -447,13 +405,13 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb && !HasEffect(Buffs.PerfectBalance) && !HasEffect(Buffs.FormlessFist) && (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)) - && level >= Levels.FiresReply) + && FiresReply.LevelChecked()) { return FiresReply; } - // Standard Balls - return DetermineCoreAbility(actionID); + // Standard Beast Chakras + return MNKHelper.DetermineCoreAbility(actionID, IsEnabled(CustomComboPreset.MNK_STUseTrueNorth)); } } @@ -479,7 +437,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!inCombat) { - if (gauge.Chakra < 5 && level >= Levels.Meditation) + if (gauge.Chakra < 5 && Meditation.LevelChecked()) { return OriginalHook(Meditation); ; } @@ -497,66 +455,67 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim IsOffCooldown(Variant.VariantRampart)) return Variant.VariantRampart; - if (level >= Levels.RiddleOfFire && !IsOnCooldown(RiddleOfFire)) + if (ActionReady(RiddleOfFire)) { return RiddleOfFire; } - if (level >= Levels.PerfectBalance && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) == MasterfulBlitz) + if (PerfectBalance.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && IsOriginal(MasterfulBlitz)) { // Use Perfect Balance if: - // 1. It's after Bootshine/Dragon Kick. + // 1. It's after Bootshine/Dragon Kick. - This doesn't apply to AoE // 2. At max stacks / before overcap. // 3. During Brotherhood. // 4. During Riddle of Fire. // 5. Prepare Masterful Blitz for the Riddle of Fire & Brotherhood window. - if ((GetRemainingCharges(PerfectBalance) == 2) || - (GetRemainingCharges(PerfectBalance) == 1 && GetCooldownChargeRemainingTime(PerfectBalance) < 4) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.Brotherhood)) || - (GetRemainingCharges(PerfectBalance) >= 1 && HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || - (GetRemainingCharges(PerfectBalance) >= 1 && GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) + if (HasCharges(PerfectBalance) && + (GetRemainingCharges(PerfectBalance) == GetMaxCharges(PerfectBalance)) || + (GetCooldownRemainingTime(PerfectBalance) <= 4) || + (HasEffect(Buffs.Brotherhood)) || + (HasEffect(Buffs.RiddleOfFire) && GetBuffRemainingTime(Buffs.RiddleOfFire) < 10) || + (GetCooldownRemainingTime(RiddleOfFire) < 4 && GetCooldownRemainingTime(Brotherhood) < 8)) { return PerfectBalance; } } - if (level >= Levels.Brotherhood && !IsOnCooldown(Brotherhood)) + if (ActionReady(Brotherhood)) { return Brotherhood; } - if (level >= Levels.RiddleOfWind && !IsOnCooldown(RiddleOfWind)) + if (ActionReady(RiddleOfWind)) { return RiddleOfWind; } if (Gauge.Chakra >= 5 - && level >= Levels.HowlingFist + && HowlingFist.LevelChecked() && HasBattleTarget()) { - return OriginalHook(EnlightenedMeditation); + return OriginalHook(HowlingFist); } - if (PlayerHealthPercentageHp() <= 25 && LevelChecked(All.SecondWind) && IsOffCooldown(All.SecondWind)) + if (PlayerHealthPercentageHp() <= 25 && ActionReady(All.SecondWind)) return All.SecondWind; - if (PlayerHealthPercentageHp() <= 40 && LevelChecked(All.Bloodbath) && IsOffCooldown(All.Bloodbath)) + if (PlayerHealthPercentageHp() <= 40 && ActionReady(All.Bloodbath)) return All.Bloodbath; } if (inCombat) { - if (HasEffect(Buffs.WindsRumination) && level >= Levels.WindsReply) + if (HasEffect(Buffs.WindsRumination)) { return WindsReply; } - if (HasEffect(Buffs.FiresRumination) && level >= Levels.FiresReply) + if (HasEffect(Buffs.FiresRumination)) { return FiresReply; } // Masterful Blitz - if (level >= Levels.MasterfulBlitz && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) + if (MasterfulBlitz.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && OriginalHook(MasterfulBlitz) != MasterfulBlitz) { return OriginalHook(MasterfulBlitz); } @@ -568,7 +527,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim { if (pbStacks?.StackCount > 0) { - return level >= Levels.ShadowOfTheDestroyer ? ShadowOfTheDestroyer : Rockbreaker; + return ShadowOfTheDestroyer.LevelChecked() ? ShadowOfTheDestroyer : Rockbreaker; } } if (lunarNadi) @@ -600,7 +559,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return TwinSnakes; } - if (HasEffect(Buffs.CoeurlForm) && level >= Levels.Rockbreaker) + if (HasEffect(Buffs.CoeurlForm) && Rockbreaker.LevelChecked()) { return Rockbreaker; } @@ -707,7 +666,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb { if (actionID == PerfectBalance) { - if (OriginalHook(MasterfulBlitz) != MasterfulBlitz && level >= Levels.MasterfulBlitz) + if (OriginalHook(MasterfulBlitz) != MasterfulBlitz && MasterfulBlitz.LevelChecked()) return OriginalHook(MasterfulBlitz); } @@ -721,80 +680,10 @@ internal class MNK_Riddle_Brotherhood : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { - return actionID is RiddleOfFire && level >= Levels.Brotherhood && IsOnCooldown(RiddleOfFire) && IsOffCooldown(Brotherhood) + return actionID is RiddleOfFire && Brotherhood.LevelChecked() && IsOnCooldown(RiddleOfFire) && IsOffCooldown(Brotherhood) ? Brotherhood : actionID; } } - - public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnabled = true) - { - if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm) || CustomComboFunctions.HasEffect(Buffs.FormlessFist)) - { - if (Gauge.OpoOpoFury == 0) - { - if (CustomComboFunctions.LevelChecked(DragonKick)) - return DragonKick; - } - else - { - return CustomComboFunctions.OriginalHook(Bootshine); - } - } - - if (CustomComboFunctions.HasEffect(Buffs.RaptorForm)) - { - if (Gauge.RaptorFury == 0) - { - if (CustomComboFunctions.LevelChecked(TwinSnakes)) - return TwinSnakes; - } - else - { - if (CustomComboFunctions.LevelChecked(TrueStrike)) - return CustomComboFunctions.OriginalHook(TrueStrike); - } - } - - if (CustomComboFunctions.HasEffect(Buffs.CoeurlForm)) - { - if (Gauge.CoeurlFury == 0) - { - if (!CustomComboFunctions.OnTargetsRear() - && CustomComboFunctions.IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - && CustomComboFunctions.TargetNeedsPositionals() - && !CustomComboFunctions.HasEffect(Buffs.TrueNorth) - && CustomComboFunctions.LevelChecked(TrueNorth) - && CustomComboFunctions.HasCharges(TrueNorth) - && useTrueNorthIfEnabled) - { - return TrueNorth; - } - else - { - if (CustomComboFunctions.LevelChecked(Demolish)) - return Demolish; - } - } - - if (!CustomComboFunctions.OnTargetsFlank() - && CustomComboFunctions.IsEnabled(CustomComboPreset.MNK_STUseTrueNorth) - && CustomComboFunctions.TargetNeedsPositionals() - && !CustomComboFunctions.HasEffect(Buffs.TrueNorth) - && CustomComboFunctions.LevelChecked(TrueNorth) - && CustomComboFunctions.HasCharges(TrueNorth) - && useTrueNorthIfEnabled) - { - return TrueNorth; - } - else - { - if (CustomComboFunctions.LevelChecked(SnapPunch)) - return CustomComboFunctions.OriginalHook(SnapPunch); - } - } - - return actionId; - } } } \ No newline at end of file From b04e531d18eb2ae5ecca03b642e874a877d18f12 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 21 Aug 2024 22:37:04 -0700 Subject: [PATCH 138/142] done --- XIVSlothCombo/Combos/PvE/GNB.cs | 50 ++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/GNB.cs b/XIVSlothCombo/Combos/PvE/GNB.cs index 29810e238..dcffeaecd 100644 --- a/XIVSlothCombo/Combos/PvE/GNB.cs +++ b/XIVSlothCombo/Combos/PvE/GNB.cs @@ -94,7 +94,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!InMeleeRange() && LevelChecked(LightningShot) && HasBattleTarget()) return LightningShot; - //No Mercy + //NoMercy if (ActionReady(NoMercy)) { if (CanWeave(actionID)) @@ -104,8 +104,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim || (LevelChecked(ReignOfBeasts) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) //Lv100 2min 2cart force || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && Ammo == 0 && lastComboMove is BrutalShell && ActionReady(Bloodfest)) //Lv90 Opener/Reopener (0cart) || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 3) //Lv90 2min 3cart force - || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && bfCD is < 90 and > 15 && Ammo >= 2) //Lv90 1min 2 or 3cart - || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener (1cart) + || (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown) && GetCooldownRemainingTime(DoubleDown) <= GCD * 2 && bfCD is < 90 and > 15 && Ammo >= 2) //Lv90 1min + || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && lastComboMove is SolidBarrel && ActionReady(Bloodfest) && Ammo == 1 && quarterWeave) //<=Lv80 Opener/Reopener lateweave (1cart) || (!LevelChecked(ReignOfBeasts) && !LevelChecked(DoubleDown) && (bfCD is < 90 and > 15 || (bfCD < GCD * 12 || ActionReady(Bloodfest)) && Ammo == 2) && quarterWeave) //<=Lv80 lateweave use || (!LevelChecked(BurstStrike) && quarterWeave)) // 1) return Hypervelocity; - //GF combo + //Continuation, procced from GnashingFang combo usage - forced to avoid loss if (LevelChecked(Continuation) && (HasEffect(Buffs.ReadyToRip) || HasEffect(Buffs.ReadyToTear) || HasEffect(Buffs.ReadyToGouge))) return OriginalHook(Continuation); @@ -187,7 +187,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return SonicBreak; } - //Lv90 + //Lv90-Lv99 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { if (JustUsed(NoMercy, 3f) && @@ -197,7 +197,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return SonicBreak; } - //= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (bfCD < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts @@ -227,7 +227,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return DoubleDown; } - //= GCD * 4) && !HasEffect(Buffs.ReadyToRip) && !ActionReady(GnashingFang)) @@ -237,7 +237,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - //Gnashing Fang + //GnashingFang if (LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) < 0.7f && Ammo > 0) { if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 && ActionReady(GnashingFang) @@ -252,7 +252,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return GnashingFang; } - //Reign combo + //ReadyToReign combo if (LevelChecked(ReignOfBeasts)) { if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(GnashingFang) && !ActionReady(DoubleDown) && GunStep == 0) @@ -267,7 +267,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - //Burst Strike + //BurstStrike if (LevelChecked(BurstStrike)) { if (HasEffect(Buffs.NoMercy)) @@ -283,7 +283,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (LevelChecked(ReignOfBeasts) && ((nmCD <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (bfCD < GCD * 12 || ActionReady(Bloodfest)))) return BurstStrike; - //GF combo safety net + //GnashingFang combo safety net if (GunStep is 1 or 2) return OriginalHook(GnashingFang); @@ -338,7 +338,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim !InMeleeRange() && LevelChecked(LightningShot) && HasBattleTarget()) return LightningShot; - //No Mercy + //NoMercy if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_NoMercy)) { if (ActionReady(NoMercy)) @@ -362,7 +362,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim //oGCDs if (CanWeave(actionID)) { - //Variant Spirit Dart + //Variant SpiritDart Status? sustainedDamage = FindTargetEffect(Variant.Debuffs.SustainedDamage); if (IsEnabled(CustomComboPreset.GNB_Variant_SpiritDart) && IsEnabled(Variant.VariantSpiritDart) && @@ -438,7 +438,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return SonicBreak; } - //Lv90 + //Lv90-Lv99 if (!LevelChecked(ReignOfBeasts) && LevelChecked(DoubleDown)) { if (JustUsed(NoMercy, 3f) && @@ -448,7 +448,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return SonicBreak; } - //= 2 && !HasEffect(Buffs.ReadyToBreak) && JustUsed(SonicBreak, 3f) && (bfCD < GCD * 6 || ActionReady(Bloodfest))) //2min NM 3 carts @@ -479,7 +479,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return DoubleDown; } - //= GCD * 4) && !HasEffect(Buffs.ReadyToRip) && !ActionReady(GnashingFang)) @@ -489,7 +489,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - //Gnashing Fang + //GnashingFang if (IsEnabled(CustomComboPreset.GNB_ST_GnashingStarter) && LevelChecked(GnashingFang) && GetCooldownRemainingTime(GnashingFang) < 0.7f && Ammo > 0) { if (!HasEffect(Buffs.ReadyToBlast) && GunStep == 0 && ActionReady(GnashingFang) @@ -504,7 +504,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return GnashingFang; } - //Reign combo + //ReadyToReign combo if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_Reign) && (LevelChecked(ReignOfBeasts))) { if (GetBuffRemainingTime(Buffs.ReadyToReign) > 0 && !ActionReady(GnashingFang) && !ActionReady(DoubleDown) && GunStep == 0) @@ -519,7 +519,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - //Burst Strike + //BurstStrike if (IsEnabled(CustomComboPreset.GNB_ST_Advanced_CooldownsGroup) && IsEnabled(CustomComboPreset.GNB_ST_BurstStrike) && LevelChecked(BurstStrike)) { if (HasEffect(Buffs.NoMercy)) @@ -536,7 +536,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim LevelChecked(ReignOfBeasts) && ((nmCD <= GCD || ActionReady(NoMercy)) && Ammo is 3 && (bfCD < GCD * 12 || ActionReady(Bloodfest)))) return BurstStrike; - //GF combo safety net + //GnashingFang combo safety net if (IsEnabled(CustomComboPreset.GNB_ST_Continuation) && GunStep is 1 or 2) return OriginalHook(GnashingFang); From c71c5db948a4d34a0e48ee78753a0c31e0fa05f2 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 22 Aug 2024 07:18:47 +0100 Subject: [PATCH 139/142] Fix errant buff check removal --- XIVSlothCombo/Combos/PvE/MNK.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 444fcc3fb..cba7252be 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -160,12 +160,12 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (inCombat) { // Ensure usage if buff is almost depleted. - if (GetBuffRemainingTime(Buffs.FiresRumination) < 4) + if (HasEffect(Buffs.FiresRumination) && GetBuffRemainingTime(Buffs.FiresRumination) < 4) { return FiresReply; } - if (GetBuffRemainingTime(Buffs.WindsRumination) < 4) + if (HasEffect(Buffs.WindsRumination) && GetBuffRemainingTime(Buffs.WindsRumination) < 4) { return WindsReply; } From 347bd99293a3b6fdf0877cf50fb3a576595678cc Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 22 Aug 2024 07:33:02 +0100 Subject: [PATCH 140/142] Rearrange SAM, update AoE titles --- XIVSlothCombo/Combos/CustomComboPreset.cs | 80 +++++++++++------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 0ab3f8976..1dda460a0 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -3278,21 +3278,6 @@ The three digets after RDM.JobID can be used to reorder items in the list #region SAMURAI - #region Yukikaze/Kasha/Gekko Combos - - [ReplaceSkill(SAM.Yukikaze)] - [CustomComboInfo("Yukikaze Combo", "Replace Yukikaze with its combo chain.", SAM.JobID)] - SAM_ST_YukikazeCombo = 15000, - - [ReplaceSkill(SAM.Kasha)] - [CustomComboInfo("Kasha Combo", "Replace Kasha with its combo chain.", SAM.JobID)] - SAM_ST_KashaCombo = 15001, - - [ReplaceSkill(SAM.Gekko)] - [CustomComboInfo("Gekko Combo", "Replace Gekko with its combo chain.", SAM.JobID)] - SAM_ST_GekkoCombo = 15010, - #endregion - #region Simple ST [ReplaceSkill(SAM.Hakaze, SAM.Gyofu)] @@ -3382,22 +3367,6 @@ The three digets after RDM.JobID can be used to reorder items in the list SAM_ST_TrueNorth = 15099, - #endregion - - #region AoE Oka Combo - - [ReplaceSkill(SAM.Oka)] - [CustomComboInfo("Oka Combo", "Replace Oka with its combo chain.", SAM.JobID)] - SAM_AoE_OkaCombo = 15100, - - //[ParentCombo(SAM_AoE_OkaCombo)] - //[CustomComboInfo("Oka Two Target Rotation Feature", "Adds the Yukikaze combo, Mangetsu combo, Senei, Shinten, and Shoha to Oka combo.\nUsed for two targets only and when Lv86 and above.", SAM.JobID)] - //SAM_AoE_OkaCombo_TwoTarget = 15101, - - [ReplaceSkill(SAM.Mangetsu)] - [CustomComboInfo("Mangetsu Combo", "Replace Mangetsu with its combo chain.", SAM.JobID)] - SAM_AoE_MangetsuCombo = 15101, - #endregion #region Simple AoE @@ -3421,39 +3390,39 @@ The three digets after RDM.JobID can be used to reorder items in the list SAM_AoE_Oka = 15104, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Kyuten", "Adds Kyuten to the rotation.", SAM.JobID)] + [CustomComboInfo("Kyuten Option", "Adds Kyuten to the rotation.", SAM.JobID)] SAM_AoE_Kyuten = 15105, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Iaijutsu", "Adds Tenka Goken, Midare: Setsugekka, and Kaeshi: Goken when ready and when you're not moving to the rotation.", SAM.JobID)] + [CustomComboInfo("Iaijutsu Option", "Adds Tenka Goken, Midare: Setsugekka, and Kaeshi: Goken when ready and when you're not moving to the rotation.", SAM.JobID)] SAM_AoE_TenkaGoken = 15107, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Ikishoten", "Adds Ikishoten when at or below 50 Kenki.\nWill dump Kenki at 10 seconds left to allow Ikishoten to be used.", SAM.JobID)] + [CustomComboInfo("Ikishoten Option", "Adds Ikishoten when at or below 50 Kenki.\nWill dump Kenki at 10 seconds left to allow Ikishoten to be used.", SAM.JobID)] SAM_AOE_CDs_Ikishoten = 15108, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Ogi Namikiri", "Adds Ogi Namikiri and Kaeshi: Namikiri when ready and when you're not moving to the rotation.", SAM.JobID)] + [CustomComboInfo("Ogi Namikiri Option", "Adds Ogi Namikiri and Kaeshi: Namikiri when ready and when you're not moving to the rotation.", SAM.JobID)] SAM_AoE_OgiNamikiri = 15109, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Zanshin", "Adds Zanshin to the rotation.", SAM.JobID)] + [CustomComboInfo("Zanshin Option", "Adds Zanshin to the rotation.", SAM.JobID)] SAM_AoE_Zanshin = 15110, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Shoha", "Adds Shoha when you have 3 meditation stacks.", SAM.JobID)] + [CustomComboInfo("Shoha Option", "Adds Shoha when you have 3 meditation stacks.", SAM.JobID)] SAM_AoE_Shoha = 15111, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Guren", "Adds Guren to the rotation.", SAM.JobID)] + [CustomComboInfo("Guren Option", "Adds Guren to the rotation.", SAM.JobID)] SAM_AoE_Guren = 15112, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Hagakure", "Adds Hagakure to the rotation when there are three Sen.", SAM.JobID)] + [CustomComboInfo("Hagakure Option", "Adds Hagakure to the rotation when there are three Sen.", SAM.JobID)] SAM_AoE_Hagakure = 15113, [ParentCombo(SAM_AoE_AdvancedMode)] - [CustomComboInfo("Meikyo Shisui", "Adds Meikyo Shisui to the rotation.", SAM.JobID)] + [CustomComboInfo("Meikyo Shisui Option", "Adds Meikyo Shisui to the rotation.", SAM.JobID)] SAM_AoE_MeikyoShisui = 15114, [ParentCombo(SAM_AoE_AdvancedMode)] @@ -3461,6 +3430,37 @@ The three digets after RDM.JobID can be used to reorder items in the list SAM_AoE_ComboHeals = 15199, + #endregion + + #region Yukikaze/Kasha/Gekko Combos + + [ReplaceSkill(SAM.Yukikaze)] + [CustomComboInfo("Yukikaze Combo", "Replace Yukikaze with its combo chain.", SAM.JobID)] + SAM_ST_YukikazeCombo = 15000, + + [ReplaceSkill(SAM.Kasha)] + [CustomComboInfo("Kasha Combo", "Replace Kasha with its combo chain.", SAM.JobID)] + SAM_ST_KashaCombo = 15001, + + [ReplaceSkill(SAM.Gekko)] + [CustomComboInfo("Gekko Combo", "Replace Gekko with its combo chain.", SAM.JobID)] + SAM_ST_GekkoCombo = 15010, + #endregion + + #region AoE Oka Combo + + [ReplaceSkill(SAM.Oka)] + [CustomComboInfo("Oka Combo", "Replace Oka with its combo chain.", SAM.JobID)] + SAM_AoE_OkaCombo = 15100, + + //[ParentCombo(SAM_AoE_OkaCombo)] + //[CustomComboInfo("Oka Two Target Rotation Feature", "Adds the Yukikaze combo, Mangetsu combo, Senei, Shinten, and Shoha to Oka combo.\nUsed for two targets only and when Lv86 and above.", SAM.JobID)] + //SAM_AoE_OkaCombo_TwoTarget = 15101, + + [ReplaceSkill(SAM.Mangetsu)] + [CustomComboInfo("Mangetsu Combo", "Replace Mangetsu with its combo chain.", SAM.JobID)] + SAM_AoE_MangetsuCombo = 15101, + #endregion #region Cooldown Features From dc7a64dd979fee0ab6ccce3a1894864913bd51c4 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 22 Aug 2024 07:37:35 +0100 Subject: [PATCH 141/142] Rearrange PCT options --- XIVSlothCombo/Combos/CustomComboPreset.cs | 36 ++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 67ecaaf7d..708538463 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2407,30 +2407,15 @@ public enum CustomComboPreset #region PICTOMANCER [ReplaceSkill(PCT.FireInRed)] - [ConflictingCombos(CombinedAetherhues)] + [ConflictingCombos(CombinedAetherhues, PCT_ST_AdvancedMode)] [CustomComboInfo("Simple Mode - Single Target", "Consolidates the single target rotation into one button, ideal for newcomers.", PCT.JobID)] PCT_ST_SimpleMode = 20000, [ReplaceSkill(PCT.FireIIinRed)] - [ConflictingCombos(CombinedAetherhues)] + [ConflictingCombos(CombinedAetherhues, PCT_AoE_AdvancedMode)] [CustomComboInfo("Simple Mode - AoE", "Consolidates the AoE rotation into one button, ideal for newcomers.", PCT.JobID)] PCT_AoE_SimpleMode = 20001, - [ReplaceSkill(PCT.FireInRed, PCT.FireIIinRed)] - [ConflictingCombos(PCT_ST_SimpleMode, PCT_AoE_SimpleMode)] - [CustomComboInfo("Combined Aetherhues Feature", "Merges aetherhue actions for specific target types into a single button.", PCT.JobID)] - CombinedAetherhues = 20002, - - [ReplaceSkill(PCT.CreatureMotif, PCT.WeaponMotif, PCT.LandscapeMotif)] - [CustomComboInfo("One Button Motifs", "Merges Motifs and Muses into a single button.", PCT.JobID)] - CombinedMotifs = 20003, - - [ReplaceSkill(PCT.HolyInWhite)] - [CustomComboInfo("One Button Paint", "Consolidates paint-consuming actions into one button.", PCT.JobID)] - CombinedPaint = 20004, - - #region ST - [ReplaceSkill(PCT.FireInRed)] [ConflictingCombos(CombinedAetherhues, PCT_ST_SimpleMode)] [CustomComboInfo("Advanced Mode - Single Target", $"Replaces Fire in Red with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", PCT.JobID)] @@ -2670,6 +2655,23 @@ public enum CustomComboPreset [CustomComboInfo("Lucid Dreaming Option", $"Adds Lucid Dreaming to the combo.", PCT.JobID)] PCT_AoE_AdvancedMode_LucidDreaming = 20067, + [ReplaceSkill(PCT.FireInRed, PCT.FireIIinRed)] + [ConflictingCombos(PCT_ST_SimpleMode, PCT_AoE_SimpleMode)] + [CustomComboInfo("Combined Aetherhues Feature", "Merges aetherhue actions for specific target types into a single button.", PCT.JobID)] + CombinedAetherhues = 20002, + + [ReplaceSkill(PCT.CreatureMotif, PCT.WeaponMotif, PCT.LandscapeMotif)] + [CustomComboInfo("One Button Motifs", "Merges Motifs and Muses into a single button.", PCT.JobID)] + CombinedMotifs = 20003, + + [ReplaceSkill(PCT.HolyInWhite)] + [CustomComboInfo("One Button Paint", "Consolidates paint-consuming actions into one button.", PCT.JobID)] + CombinedPaint = 20004, + + #region ST + + + // Last value for AoE = 20067 #endregion From ff793d8f3e4aafd949e7bf413d068b4ce5d0d48f Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 22 Aug 2024 07:57:00 +0100 Subject: [PATCH 142/142] submodule --- ECommons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECommons b/ECommons index 540b7a353..d77c9db19 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 540b7a353814a9d3ed418a2027f5a6f7c4380e9c +Subproject commit d77c9db195056fca9e855c7d142bc6cd8566258f