From 5f4bb55b0711d69407b4f3ca6b82768aa140d5bc Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Sun, 7 Jul 2024 08:23:05 +0100 Subject: [PATCH] Fix log spam --- XIVSlothCombo/Combos/CustomComboPreset.cs | 16 ----- XIVSlothCombo/Combos/JobHelpers/AST.cs | 8 +-- XIVSlothCombo/Combos/PvE/AST.cs | 46 +------------ XIVSlothCombo/Combos/PvE/NIN.cs | 79 +---------------------- XIVSlothCombo/Combos/PvE/RDM.cs | 4 +- 5 files changed, 12 insertions(+), 141 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index b7a70d65a..d9d2e7a91 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -2144,18 +2144,6 @@ public enum CustomComboPreset [CustomComboInfo("Hide to Mug/Trick Attack Feature", "Replaces Hide with Mug while in combat and Trick Attack whilst Hidden.", NIN.JobID)] NIN_HideMug = 10057, - [ReplaceSkill(NIN.Huraijin)] - [CustomComboInfo("Huraijin / Raiju Feature", "Replaces Huraijin with Forked and Fleeting Raiju when available.", NIN.JobID)] - NIN_HuraijinRaiju = 10059, - - [ParentCombo(NIN_HuraijinRaiju)] - [CustomComboInfo("Huraijin / Raiju Feature Option 1", "Replaces Huraijin with Fleeting Raiju when available.", NIN.JobID)] - NIN_HuraijinRaiju_Fleeting = 10060, - - [ParentCombo(NIN_HuraijinRaiju)] - [CustomComboInfo("Huraijin / Raiju Feature Option 2", "Replaces Huraijin with Forked Raiju when available.", NIN.JobID)] - NIN_HuraijinRaiju_Forked = 10061, - [ReplaceSkill(NIN.Ten, NIN.Chi, NIN.Jin)] [CustomComboInfo("Simple Mudras Feature", "Simplify the mudra casting to avoid failing.", NIN.JobID)] NIN_Simple_Mudras = 10062, @@ -2165,10 +2153,6 @@ public enum CustomComboPreset [CustomComboInfo("Ten Chi Jin Feature", "Turns Ten Chi Jin (the move) into Ten, Chi, and Jin.", NIN.JobID)] NIN_TCJ = 10063, - [ReplaceSkill(NIN.Huraijin)] - [CustomComboInfo("Huraijin / Armor Crush Combo Feature", "Replace Huraijin with Armor Crush after using Gust Slash.", NIN.JobID)] - NIN_HuraijinArmorCrush = 10064, - [ParentCombo(NIN_ST_AdvancedMode_Ninjitsus_Raiton)] [CustomComboInfo("Raiton Uptime Option", "Adds Raiton as an uptime feature.", NIN.JobID)] NIN_ST_AdvancedMode_Raiton_Uptime = 10065, diff --git a/XIVSlothCombo/Combos/JobHelpers/AST.cs b/XIVSlothCombo/Combos/JobHelpers/AST.cs index 0b2188f1b..16321ed9c 100644 --- a/XIVSlothCombo/Combos/JobHelpers/AST.cs +++ b/XIVSlothCombo/Combos/JobHelpers/AST.cs @@ -22,9 +22,9 @@ private static void CheckCards(IFramework framework) if (Service.ClientState.LocalPlayer is null || Service.ClientState.LocalPlayer.ClassJob.Id != 33) return; - if (DrawnCard != Gauge.DrawnCard) + if (DrawnCard != Gauge.DrawnCards[0]) { - DrawnCard = Gauge.DrawnCard; + DrawnCard = Gauge.DrawnCards[0]; if (CustomComboFunctions.IsEnabled(CustomComboPreset.AST_Cards_QuickTargetCards)) { AST_QuickTargetCards.SelectedRandomMember = null; @@ -60,8 +60,8 @@ public static void Invoke() private static bool SetTarget() { - if (Gauge.DrawnCard.Equals(CardType.NONE)) return false; - CardType cardDrawn = Gauge.DrawnCard; + if (Gauge.DrawnCards[0].Equals(CardType.NONE)) return false; + CardType cardDrawn = Gauge.DrawnCards[0]; PartyTargets.Clear(); for (int i = 1; i <= 8; i++) //Checking all 8 available slots and skipping nulls & DCs { diff --git a/XIVSlothCombo/Combos/PvE/AST.cs b/XIVSlothCombo/Combos/PvE/AST.cs index 2193205e8..006e3cd28 100644 --- a/XIVSlothCombo/Combos/PvE/AST.cs +++ b/XIVSlothCombo/Combos/PvE/AST.cs @@ -157,22 +157,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID is Play) { var haveCard = HasEffect(Buffs.BalanceDrawn) || HasEffect(Buffs.BoleDrawn) || HasEffect(Buffs.ArrowDrawn) || HasEffect(Buffs.SpearDrawn) || HasEffect(Buffs.EwerDrawn) || HasEffect(Buffs.SpireDrawn); - var cardDrawn = Gauge.DrawnCard; + var cardDrawn = Gauge.DrawnCards[0]; - if (IsEnabled(CustomComboPreset.AST_Cards_AstrodyneOnPlay) && ActionReady(Astrodyne) && !Gauge.ContainsSeal(SealType.NONE) && - (Gauge.DrawnCard != CardType.NONE || HasCharges(Draw))) - return Astrodyne; if (haveCard) { - if (HasEffect(Buffs.ClarifyingDraw) && IsEnabled(CustomComboPreset.AST_Cards_Redraw)) - { - if ((cardDrawn is CardType.BALANCE or CardType.BOLE && Gauge.Seals.Contains(SealType.SUN)) || - (cardDrawn is CardType.ARROW or CardType.EWER && Gauge.Seals.Contains(SealType.MOON)) || - (cardDrawn is CardType.SPEAR or CardType.SPIRE && Gauge.Seals.Contains(SealType.CELESTIAL))) - return Redraw; - } - return OriginalHook(Play); } @@ -248,29 +237,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim CanSpellWeave(actionID)) return All.LucidDreaming; - //Astrodyne - if (IsEnabled(CustomComboPreset.AST_DPS_Astrodyne) && - ActionReady(Astrodyne) && - !Gauge.ContainsSeal(SealType.NONE) && - CanSpellWeave(actionID)) - return Astrodyne; - - //Redraw Card - if (IsEnabled(CustomComboPreset.AST_DPS_AutoPlay_Redraw) && HasEffect(Buffs.ClarifyingDraw) && ActionReady(Redraw)) - { - var cardDrawn = Gauge.DrawnCard; - if (((cardDrawn is CardType.BALANCE or CardType.BOLE && Gauge.Seals.Contains(SealType.SUN)) || - (cardDrawn is CardType.ARROW or CardType.EWER && Gauge.Seals.Contains(SealType.MOON)) || - (cardDrawn is CardType.SPEAR or CardType.SPIRE && Gauge.Seals.Contains(SealType.CELESTIAL))) && - CanSpellWeave(actionID) && - spellsSinceDraw >= (IsEnabled(CustomComboPreset.AST_DPS_AutoPlay) ? Config.AST_ST_DPS_Play_SpeedSetting : 1)) - return Redraw; - } //Play Card if (IsEnabled(CustomComboPreset.AST_DPS_AutoPlay) && ActionReady(Play) && - Gauge.DrawnCard is not CardType.NONE && + Gauge.DrawnCards[0] is not CardType.NONE && CanSpellWeave(actionID) && spellsSinceDraw >= Config.AST_ST_DPS_Play_SpeedSetting && !WasLastAction(Redraw)) @@ -279,7 +250,7 @@ Gauge.DrawnCard is not CardType.NONE && //Card Draw if (IsEnabled(CustomComboPreset.AST_DPS_AutoDraw) && ActionReady(Draw) && - Gauge.DrawnCard is CardType.NONE && + Gauge.DrawnCards[0] is CardType.NONE && CanDelayedWeave(actionID)) return Draw; @@ -379,17 +350,6 @@ Gauge.DrawnCrownCard is CardType.LADY } } - //Works With AST_Cards_DrawOnPlay as a feature, or by itself if AST_Cards_DrawOnPlay is disabled. - //Do not do ConflictingCombos with AST_Cards_DrawOnPlay - internal class AST_Cards_AstrodyneOnPlay : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.AST_Cards_AstrodyneOnPlay; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - => actionID is Play && !IsEnabled(CustomComboPreset.AST_Cards_DrawOnPlay) && !Gauge.ContainsSeal(SealType.NONE) - ? Astrodyne - : actionID; - } internal class AST_Cards_RedrawStandalone : CustomCombo { diff --git a/XIVSlothCombo/Combos/PvE/NIN.cs b/XIVSlothCombo/Combos/PvE/NIN.cs index ab9ea9d4a..15b5e01ee 100644 --- a/XIVSlothCombo/Combos/PvE/NIN.cs +++ b/XIVSlothCombo/Combos/PvE/NIN.cs @@ -33,7 +33,6 @@ public const uint HakkeMujinsatsu = 16488, Meisui = 16489, Bunshin = 16493, - Huraijin = 25876, PhantomKamaitachi = 25774, ForkedRaiju = 25777, FleetingRaiju = 25778, @@ -339,20 +338,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (!inTNWithDoubleArmorCrush) { - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_Huton) && - IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus) && - (!Huraijin.LevelChecked() || !InCombat()) && - gauge.HutonTimer <= 15000 && - chargeCheck && - mudraState.CastHuton(ref actionID)) - return actionID; - - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Huraijin) && - InCombat() && - gauge.HutonTimer <= hutonHuraijinTimer && - Huraijin.LevelChecked() && !inMudraState) - return OriginalHook(Huraijin); - if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Kassatsu_HyoshoRaynryu) && !inTrickBurstSaveWindow && (IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOnCooldown(Mug))) && @@ -390,8 +375,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim lastComboMove == GustSlash && (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack) && IsOnCooldown(TrickAttack) || IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack)) && - ((gauge.HutonTimer <= hutonArmorCrushTimer) || doubleArmorCrush && timesLastEnderWasArmorCrush == 1) && - gauge.HutonTimer > 0 && ArmorCrush.LevelChecked() && + (doubleArmorCrush && timesLastEnderWasArmorCrush == 1) && + ArmorCrush.LevelChecked() && comboTime > 1f) { if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrueNorth) && @@ -548,20 +533,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } - if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Ninjitsus_Huton) && - IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Ninjitsus) && - (!Huraijin.LevelChecked() || !InCombat()) && - gauge.HutonTimer <= 15000 && - chargeCheck && - mudraState.CastHuton(ref actionID)) - return actionID; - - if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Huraijin) && - InCombat() && - gauge.HutonTimer <= hutonHuraijinTimer && - Huraijin.LevelChecked() && !inMudraState) - return OriginalHook(Huraijin); - if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_GokaMekkyaku) && mudraState.CastGokaMekkyaku(ref actionID)) return actionID; @@ -640,12 +611,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.NIN_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.NIN_VariantCure)) return Variant.VariantCure; - if (!Huraijin.LevelChecked() && gauge.HutonTimer <= 15000 && mudraState.CastHuton(ref actionID)) - return actionID; - - if (InCombat() && gauge.HutonTimer == 0 && Huraijin.LevelChecked() && !inMudraState) - return OriginalHook(Huraijin); - if (mudraState.CastHyoshoRanryu(ref actionID)) return actionID; @@ -713,7 +678,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (lastComboMove == SpinningEdge && GustSlash.LevelChecked()) return OriginalHook(GustSlash); - if (lastComboMove == GustSlash && gauge.HutonTimer <= 30000 && ArmorCrush.LevelChecked()) + if (lastComboMove == GustSlash && ArmorCrush.LevelChecked()) return OriginalHook(ArmorCrush); if (lastComboMove == GustSlash && TargetNeedsPositionals() && GetRemainingCharges(All.TrueNorth) > 0 && All.TrueNorth.LevelChecked() && !HasEffect(All.Buffs.TrueNorth) && canWeave) @@ -765,12 +730,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.NIN_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.NIN_VariantCure)) return Variant.VariantCure; - if (!Huraijin.LevelChecked() && gauge.HutonTimer <= 15000 && mudraState.CastHuton(ref actionID)) - return actionID; - - if (InCombat() && gauge.HutonTimer == 0 && Huraijin.LevelChecked()) - return OriginalHook(Huraijin); - if (HasEffect(Buffs.Kassatsu)) { if (GokaMekkyaku.LevelChecked()) @@ -869,20 +828,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class NIN_HuraijinArmorCrush : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.NIN_HuraijinArmorCrush; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == Huraijin) - { - if (lastComboMove == GustSlash && !HasEffect(Buffs.RaijuReady)) - return ArmorCrush; - } - return actionID; - } - } internal class NIN_HideMug : CustomCombo { @@ -970,24 +915,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } - internal class NIN_HuraijinRaiju : CustomCombo - { - protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.NIN_HuraijinRaiju; - - protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) - { - if (actionID == Huraijin) - { - if (IsEnabled(CustomComboPreset.NIN_HuraijinRaiju_Fleeting) && ForkedRaiju.LevelChecked() && HasEffect(Buffs.RaijuReady)) - return FleetingRaiju; - - if (IsEnabled(CustomComboPreset.NIN_HuraijinRaiju_Forked) && ForkedRaiju.LevelChecked() && HasEffect(Buffs.RaijuReady)) - return ForkedRaiju; - } - return actionID; - } - } - internal class NIN_Simple_Mudras : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.NIN_Simple_Mudras; diff --git a/XIVSlothCombo/Combos/PvE/RDM.cs b/XIVSlothCombo/Combos/PvE/RDM.cs index 7c72dfe78..0e9b56503 100644 --- a/XIVSlothCombo/Combos/PvE/RDM.cs +++ b/XIVSlothCombo/Combos/PvE/RDM.cs @@ -838,7 +838,7 @@ internal class RDM_EmboldenProtection : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => actionID is Embolden && ActionReady(Embolden) && - HasEffectAny(Buffs.EmboldenOthers) ? SCH.ChainStratagem : actionID; + HasEffectAny(Buffs.EmboldenOthers) ? OriginalHook(11) : actionID; } internal class RDM_MagickProtection : CustomCombo @@ -847,7 +847,7 @@ internal class RDM_MagickProtection : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) => actionID is MagickBarrier && ActionReady(MagickBarrier) && - HasEffectAny(Buffs.MagickBarrier) ? SCH.SacredSoil : actionID; + HasEffectAny(Buffs.MagickBarrier) ? OriginalHook(11) : actionID; } } }