diff --git a/XIVSlothCombo/Combos/PvE/VPR.cs b/XIVSlothCombo/Combos/PvE/VPR.cs index ffdf627cd..4e2765be9 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; @@ -121,14 +119,15 @@ 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 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; - int RattlingCoils = gauge.RattlingCoilStacks; + bool in5y = GetTargetDistance() <= 5; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); + float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; if (actionID is SteelFangs) { @@ -136,41 +135,47 @@ 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); + //Serpents Ire - ForceWeave + if (InCombat() && CanWeave(UncoiledFury) && !CappedOnCoils && ActionReady(SerpentsIre)) + return SerpentsIre; + //oGCDs + if (CanWeave(ActionWatching.LastWeaponskill)) + { // Legacy Weaves - if (TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) + if (in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) && OriginalHook(SerpentsTail) is not SerpentsTail) return OriginalHook(SerpentsTail); - // Uncoiled weaves + // Fury Twin Weaves if (HasEffect(Buffs.PoisedForTwinfang)) return OriginalHook(Twinfang); if (HasEffect(Buffs.PoisedForTwinblood)) return OriginalHook(Twinblood); + + //Vice Twin Weaves if (!HasEffect(Buffs.Reawakened)) { //Vicewinder weaves - if (HasEffect(Buffs.HuntersVenom) && InMeleeRange()) - return OriginalHook(Twinfang); - - if (HasEffect(Buffs.SwiftskinsVenom) && InMeleeRange()) - return OriginalHook(Twinblood); + if (in5y) + { + if (HasEffect(Buffs.HuntersVenom)) + return OriginalHook(Twinfang); - //Serpents Ire usage - if (!CappedOnCoils && ActionReady(SerpentsIre)) - return SerpentsIre; + if (HasEffect(Buffs.SwiftskinsVenom)) + return OriginalHook(Twinblood); + } } } + // 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) + return (VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) ? UncoiledFury : WrithingSnap; @@ -191,24 +196,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 + (ireCD <= 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() && + ((ireCD >= 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) && + RattlingCoils > 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 +255,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 +285,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 +300,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 +310,18 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { - int SerpentsIreUsed = ActionWatching.CombatActions.Count(x => x == SerpentsIre); + 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) && !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.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 + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 return true; } return false; @@ -351,15 +336,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; - int RattlingCoils = gauge.RattlingCoilStacks; + bool in5y = GetTargetDistance() <= 5; bool CappedOnCoils = (TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 2) || (!TraitLevelChecked(Traits.EnhancedVipersRattle) && RattlingCoils > 1); + float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal; if (actionID is SteelFangs) @@ -371,21 +358,26 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return actionID; } - //All Weaves - if (CanWeave(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)) { // Death Rattle - if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && + if (IsEnabled(CustomComboPreset.VPR_ST_SerpentsTail) && in5y && LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is DeathRattle) return OriginalHook(SerpentsTail); // Legacy Weaves - if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && + if (IsEnabled(CustomComboPreset.VPR_ST_ReawakenCombo) && in5y && TraitLevelChecked(Traits.SerpentsLegacy) && HasEffect(Buffs.Reawakened) && OriginalHook(SerpentsTail) is not SerpentsTail) return OriginalHook(SerpentsTail); - // Uncoiled weaves + // Fury Twin Weaves if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFuryCombo)) { if (HasEffect(Buffs.PoisedForTwinfang)) @@ -395,12 +387,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(Twinblood); } + //Vice Twin Weaves if (!HasEffect(Buffs.Reawakened)) { if (IsEnabled(CustomComboPreset.VPR_ST_CDs)) { - //vicewinder weaves - if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && InMeleeRange()) + //Vicewinder weaves + if (IsEnabled(CustomComboPreset.VPR_ST_VicewinderCombo) && in5y) { if (HasEffect(Buffs.HuntersVenom)) return OriginalHook(Twinfang); @@ -408,15 +401,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; } } } + // 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()) return (IsEnabled(CustomComboPreset.VPR_ST_RangedUptimeUncoiledFury) && VPRCheckRattlingCoils.HasRattlingCoilStack(gauge)) @@ -442,28 +436,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 + (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) && + 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)) + ((ireCD >= GCD * 5) || !LevelChecked(SerpentsIre)) && + !VPRCheckTimers.IsVenomExpiring(3) && !VPRCheckTimers.IsHoningExpiring(3)) return Vicewinder; // Uncoiled Fury usage if (IsEnabled(CustomComboPreset.VPR_ST_UncoiledFury) && - LevelChecked(UncoiledFury) && - ((gauge.RattlingCoilStacks > Config.VPR_ST_UncoiledFury_HoldCharges) || + LevelChecked(UncoiledFury) && HasEffect(Buffs.Swiftscaled) && HasEffect(Buffs.HuntersInstinct) && + ((RattlingCoils > 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 +558,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 +568,18 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim private static bool UseReawaken(VPRGauge gauge) { - int SerpentsIreUsed = ActionWatching.CombatActions.Count(x => x == SerpentsIre); + var ireCD = GetCooldownRemainingTime(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.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 + (gauge.SerpentOffering >= 50 && WasLastWeaponskill(FourthGeneration) && !LevelChecked(Ouroboros))) //<100 return true; } return false; @@ -614,16 +593,17 @@ 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) { - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { // Death Rattle if (LevelChecked(SerpentsTail) && OriginalHook(SerpentsTail) is LastLash) @@ -676,12 +656,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 @@ -784,17 +764,18 @@ 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) { - if (CanWeave(actionID)) + if (CanWeave(ActionWatching.LastWeaponskill)) { // Death Rattle if (IsEnabled(CustomComboPreset.VPR_AoE_SerpentsTail) && @@ -862,20 +843,20 @@ 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 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) &&