From 6d444abbec6acb7685366a47370cecba70604782 Mon Sep 17 00:00:00 2001 From: Cilraaz Date: Sun, 4 Aug 2024 14:41:47 -0400 Subject: [PATCH] feat(BeastMastery): 11.0 First Pass --- HeroRotation_Hunter/BeastMastery.lua | 434 +++++++++++---------------- HeroRotation_Hunter/Hunter.lua | 3 + HeroRotation_Hunter/Settings.lua | 1 + 3 files changed, 179 insertions(+), 259 deletions(-) diff --git a/HeroRotation_Hunter/BeastMastery.lua b/HeroRotation_Hunter/BeastMastery.lua index ee497cef3..f56de4adc 100644 --- a/HeroRotation_Hunter/BeastMastery.lua +++ b/HeroRotation_Hunter/BeastMastery.lua @@ -23,25 +23,25 @@ local CastSuggested = HR.CastSuggested -- Num/Bool Helper Functions local num = HR.Commons.Everyone.num local bool = HR.Commons.Everyone.bool --- Lua --- ============================ CONTENT =========================== --- ======= APL LOCALS ======= --- Spells -local S = Spell.Hunter.BeastMastery; + +-- Define S/I for spell and item arrays +local S = Spell.Hunter.BeastMastery +local I = Item.Hunter.BeastMastery + +-- Define array of summon_pet spells local SummonPetSpells = { S.SummonPet, S.SummonPet2, S.SummonPet3, S.SummonPet4, S.SummonPet5 } --- Items -local I = Item.Hunter.BeastMastery; +-- Create table to exclude above trinkets from On Use function local OnUseExcludes = { - -- I.TrinketName:ID(), + -- I.ItemName:ID(), } --- Commons +--- ===== GUI Settings ===== local Everyone = HR.Commons.Everyone local Hunter = HR.Commons.Hunter - --- GUI Settings local Settings = { General = HR.GUISettings.General, Commons = HR.GUISettings.APL.Hunter.Commons, @@ -50,93 +50,83 @@ local Settings = { BeastMastery = HR.GUISettings.APL.Hunter.BeastMastery } --- Equipment -local Equip = Player:GetEquipment() -local Trinket1 = Equip[13] and Item(Equip[13]) or Item(0) -local Trinket2 = Equip[14] and Item(Equip[14]) or Item(0) - --- Rotation Variables +--- ===== Rotation Variables ===== local GCDMax local BossFightRemains = 11111 local FightRemains = 11111 -local VarCotWReady = true local VarSyncActive = false local VarSyncReady = false local VarSyncRemains = 0 -local VarTrinket1Stronger = not Trinket2:HasCooldown() or Trinket1:HasUseBuff() and (not Trinket2:HasUseBuff() or not Trinket1:ID() == I.MirrorofFracturedTomorrows:ID() and (Trinket2:ID() == I.MirrorofFracturedTomorrows:ID() or Trinket2:Cooldown() < Trinket1:Cooldown() or Trinket2:CastTime() < Trinket1:CastTime() or Trinket2:CastTime() == Trinket1:CastTime() and Trinket2:Cooldown() == Trinket1:Cooldown())) or not Trinket1:HasUseBuff() and (not Trinket2:HasUseBuff() and (Trinket2:Cooldown() < Trinket1:Cooldown() or Trinket2:CastTime() < Trinket1:CastTime() or Trinket2:CastTime() == Trinket1:CastTime() and Trinket2:Cooldown() == Trinket1:Cooldown())) -local VarTrinket2Stronger = not VarTrinket1Stronger +local VarTrinket1ID, VarTrinket2ID +local VarTrinket1Spell, VarTrinket2Spell +local VarTrinket1Range, VarTrinket2Range +local VarTrinket1CD, VarTrinket2CD +local VarTrinket1BL, VarTrinket2BL +local VarTrinket1Stronger, VarTrinket2Stronger +local Enemies40y, PetEnemiesMixed, PetEnemiesMixedCount +local TargetInRange40y, TargetInRange30y +local TargetInRangePet30y --- Reset variables after combat -HL:RegisterForEvent(function() - BossFightRemains = 11111 - FightRemains = 11111 -end, "PLAYER_REGEN_ENABLED") +--- ===== Trinket Item Objects ===== +local Trinket1, Trinket2 = Player:GetTrinketItems() --- Equipment updates -HL:RegisterForEvent(function() - Equip = Player:GetEquipment() - Trinket1 = Equip[13] and Item(Equip[13]) or Item(0) - Trinket2 = Equip[14] and Item(Equip[14]) or Item(0) - VarTrinket1Stronger = not Trinket2:HasCooldown() or Trinket1:HasUseBuff() and (not Trinket2:HasUseBuff() or not Trinket1:ID() == I.MirrorofFracturedTomorrows:ID() and (Trinket2:ID() == I.MirrorofFracturedTomorrows:ID() or Trinket2:Cooldown() < Trinket1:Cooldown() or Trinket2:CastTime() < Trinket1:CastTime() or Trinket2:CastTime() == Trinket1:CastTime() and Trinket2:Cooldown() == Trinket1:Cooldown())) or not Trinket1:HasUseBuff() and (not Trinket2:HasUseBuff() and (Trinket2:Cooldown() < Trinket1:Cooldown() or Trinket2:CastTime() < Trinket1:CastTime() or Trinket2:CastTime() == Trinket1:CastTime() and Trinket2:Cooldown() == Trinket1:Cooldown())) - VarTrinket2Stronger = not VarTrinket1Stronger -end, "PLAYER_EQUIPMENT_CHANGED") +--- ===== Trinket Variables (from Precombat) ===== +local function SetTrinketVariables() + VarTrinket1ID = Trinket1:ID() + VarTrinket2ID = Trinket2:ID() --- Enemies -local Enemies40y, PetEnemiesMixed, PetEnemiesMixedCount + VarTrinket1Spell = Trinket1:OnUseSpell() + VarTrinket1Range = (VarTrinket1Spell and VarTrinket1Spell.MaximumRange > 0 and VarTrinket1Spell.MaximumRange <= 100) and VarTrinket1Spell.MaximumRange or 100 + VarTrinket2Spell = Trinket2:OnUseSpell() + VarTrinket2Range = (VarTrinket2Spell and VarTrinket2Spell.MaximumRange > 0 and VarTrinket2Spell.MaximumRange <= 100) and VarTrinket2Spell.MaximumRange or 100 --- Range -local TargetInRange40y, TargetInRange30y -local TargetInRangePet30y + VarTrinket1CD = Trinket1:Cooldown() + VarTrinket2CD = Trinket2:Cooldown() + + VarTrinket1BL = Player:IsItemBlacklisted(Trinket1) + VarTrinket2BL = Player:IsItemBlacklisted(Trinket2) + + VarTrinket1Stronger = VarTrinket1CD == 0 or Trinket1:HasUseBuff() and (not Trinket2:HasUseBuff() or not VarTrinket1ID == I.MirrorofFracturedTomorrows:ID() and (VarTrinket2ID == I.MirrorofFracturedTomorrows:ID() or VarTrinket2CD < VarTrinket1CD or VarTrinket2Spell:CastTime() < VarTrinket1Spell:CastTime() or VarTrinket2Spell:CastTime() == VarTrinket1Spell:CastTime() and VarTrinket2CD == VarTrinket1CD)) or not Trinket1:HasUseBuff() and (not Trinket2:HasUseBuff() and (VarTrinket2CD < VarTrinket1CD or VarTrinket2Spell:CastTime() < VarTrinket1Spell:CastTime() or VarTrinket2Spell:CastTime() == VarTrinket1Spell:CastTime() and VarTrinket2CD == VarTrinket1CD)) + VarTrinket2Stronger = not VarTrinket1Stronger +end +SetTrinketVariables() --- Interrupts +--- ===== Stun Interrupts List ===== local StunInterrupts = { { S.Intimidation, "Cast Intimidation (Interrupt)", function () return true; end }, } ---- ======= CastTargetIf Functions ======= +--- ===== Event Registrations ===== +HL:RegisterForEvent(function() + BossFightRemains = 11111 + FightRemains = 11111 +end, "PLAYER_REGEN_ENABLED") + +HL:RegisterForEvent(function() + Trinket1, Trinket2 = Player:GetTrinketItems() + SetTrinketVariables() +end, "PLAYER_EQUIPMENT_CHANGED") + +--- ===== CastTargetIf Filter Functions ===== local function EvaluateTargetIfFilterBarbedShot(TargetUnit) -- target_if=min:dot.barbed_shot.remains return (TargetUnit:DebuffRemains(S.BarbedShotDebuff)) end -local function EvaluateTargetIfFilterLatentPoison(TargetUnit) - -- target_if=max:debuff.latent_poison.stack - return (TargetUnit:DebuffStack(S.LatentPoisonDebuff)) -end - local function EvaluateTargetIfFilterSerpentSting(TargetUnit) - -- target_if=min:remains + -- target_if=min:dot.serpent_sting.remains return (TargetUnit:DebuffRemains(S.SerpentStingDebuff)) end -local function EvaluateTargetIfBarbedShotCleave(TargetUnit) - -- if=debuff.latent_poison.stack>9&(pet.main.buff.frenzy.up&pet.main.buff.frenzy.remains<=gcd+0.25|talent.scent_of_blood&cooldown.bestial_wrath.remains<12+gcd|pet.main.buff.frenzy.stack<3&(cooldown.bestial_wrath.ready|cooldown.call_of_the_wild.ready)|full_recharge_time 9 and (Pet:BuffUp(S.FrenzyPetBuff) and Pet:BuffRemains(S.FrenzyPetBuff) <= GCDMax + 0.25 or S.ScentofBlood:IsAvailable() and S.BestialWrath:CooldownRemains() < 12 + GCDMax or Pet:BuffStack(S.FrenzyPetBuff) < 3 and (S.BestialWrath:CooldownUp() or S.CalloftheWild:CooldownUp()) or S.BarbedShot:FullRechargeTime() < GCDMax and S.BestialWrath:CooldownDown())) +--- ===== CastTargetIf Condition Functions ===== +local function EvaluateTargetIfKillShotCleave(TargetUnit) + -- if=talent.venoms_bite&dot.serpent_sting.remains10 + return TargetUnit:DebuffRemains(S.SerpentStingDebuff) < Player:GCD() and TargetUnit:TimeToDie() > 10 end -local function EvaluateTargetIfBarbedShotCleave2(TargetUnit) - -- if=pet.main.buff.frenzy.up&pet.main.buff.frenzy.remains<=gcd+0.25|talent.scent_of_blood&cooldown.bestial_wrath.remains<12+gcd|pet.main.buff.frenzy.stack<3&(cooldown.bestial_wrath.ready|cooldown.call_of_the_wild.ready)|full_recharge_time9&(buff.call_of_the_wild.up|fight_remains<9|talent.wild_call&charges_fractional>1.2|talent.savagery) - return (TargetUnit:DebuffStack(S.LatentPoisonDebuff) > 9 and (Player:BuffUp(S.CalloftheWildBuff) or FightRemains < 9 or S.WildCall:IsAvailable() and S.BarbedShot:ChargesFractional() > 1.2 or S.Savagery:IsAvailable())) -end - -local function EvaluateTargetIfBarbedShotCleave4(TargetUnit) - -- if=buff.call_of_the_wild.up|fight_remains<9|talent.wild_call&charges_fractional>1.2|talent.savagery - return (Player:BuffUp(S.CalloftheWildBuff) or FightRemains < 9 or S.WildCall:IsAvailable() and S.BarbedShot:ChargesFractional() > 1.2 or S.Savagery:IsAvailable()) -end - -local function EvaluateTargetIfSerpentStingCleave(TargetUnit) - -- if=refreshable&target.time_to_die>duration - return (TargetUnit:DebuffRefreshable(S.SerpentStingDebuff) and TargetUnit:TimeToDie() > S.SerpentStingDebuff:BaseDuration()) -end - -local function EvaluateTargetIfBarbedShotST(TargetUnit) - -- if=pet.main.buff.frenzy.up&pet.main.buff.frenzy.remains<=gcd+0.25|talent.scent_of_blood&pet.main.buff.frenzy.stack<3&(cooldown.bestial_wrath.ready|cooldown.call_of_the_wild.ready) - return (Pet:BuffUp(S.FrenzyPetBuff) and Pet:BuffRemains(S.FrenzyPetBuff) <= GCDMax + 0.25 or S.ScentofBlood:IsAvailable() and Pet:BuffStack(S.FrenzyPetBuff) < 3 and (S.BestialWrath:CooldownUp() or S.CalloftheWild:CooldownUp())) +local function EvaluateTargetIfKillShotST(TargetUnit) + -- if=talent.venoms_bite&dot.serpent_sting.refreshable + return TargetUnit:DebuffRefreshable(S.SerpentStingDebuff) end local function EvaluateTargetIfBarbedShotST2(TargetUnit) @@ -144,12 +134,7 @@ local function EvaluateTargetIfBarbedShotST2(TargetUnit) return (S.WildCall:IsAvailable() and S.BarbedShot:ChargesFractional() > 1.4 or Player:BuffUp(S.CalloftheWildBuff) or S.BarbedShot:FullRechargeTime() < GCDMax and S.BestialWrath:CooldownDown() or S.ScentofBlood:IsAvailable() and (S.BestialWrath:CooldownRemains() < 12 + GCDMax) or S.Savagery:IsAvailable() or FightRemains < 9) end -local function EvaluateTargetIfSerpentStingST(TargetUnit) - -- if=refreshable&target.time_to_die>duration - return (TargetUnit:DebuffRefreshable(S.SerpentStingDebuff) and Target:TimeToDie() > S.SerpentStingDebuff:BaseDuration()) -end - ---- ======= ACTION LISTS ======= +--- ===== Rotation Functions ===== local function Precombat() -- flask -- augmentation @@ -157,36 +142,21 @@ local function Precombat() -- summon_pet -- Handled in APL() -- snapshot_stats - -- variable,name=trinket_1_stronger,value=!trinket.2.has_cooldown|trinket.1.has_use_buff&(!trinket.2.has_use_buff|!trinket.1.is.mirror_of_fractured_tomorrows&(trinket.2.is.mirror_of_fractured_tomorrows|trinket.2.cooldown.duration= 2 then - if Cast(S.BarbedShot, nil, nil, not Target:IsSpellInRange(S.BarbedShot)) then return "barbed_shot precombat 8"; end - end - -- Kill Shot - if S.KillShot:IsReady() then - if Cast(S.KillShot, nil, nil, not Target:IsSpellInRange(S.KillShot)) then return "kill_shot precombat 10"; end + -- hunters_mark,if=debuff.hunters_mark.down + if S.HuntersMark:IsCastable() and (Target:DebuffDown(S.HuntersMark)) then + if Cast(S.HuntersMark, Settings.CommonsOGCD.GCDasOffGCD.HuntersMark) then return "hunters_mark precombat 2"; end end - -- Kill Command - if S.KillCommand:IsReady() and TargetInRangePet30y then - if Cast(S.KillCommand, nil, nil, not Target:IsSpellInRange(S.KillCommand)) then return "kill_command precombat 12"; end + -- bestial_wrath + if S.BestialWrath:IsCastable() then + if Cast(S.BestialWrath, Settings.BeastMastery.GCDasOffGCD.BestialWrath) then return "bestial_wrath precombat 4"; end end - if PetEnemiesMixedCount > 1 then - -- Multi Shot - if S.MultiShot:IsReady() then - if Cast(S.MultiShot, nil, nil, not Target:IsSpellInRange(S.MultiShot)) then return "multishot precombat 14"; end - end - else - -- Cobra Shot - if S.CobraShot:IsReady() then - if Cast(S.CobraShot, nil, nil, not Target:IsSpellInRange(S.CobraShot)) then return "cobra_shot precombat 16"; end - end + -- barbed_shot + if S.BarbedShot:IsCastable() and S.BarbedShot:Charges() >= 2 then + if Cast(S.BarbedShot, nil, nil, not Target:IsSpellInRange(S.BarbedShot)) then return "barbed_shot precombat 8"; end end end @@ -218,207 +188,155 @@ local function CDs() end end -local function ST() - -- barbed_shot,target_if=min:dot.barbed_shot.remains,if=pet.main.buff.frenzy.up&pet.main.buff.frenzy.remains<=gcd+0.25|talent.scent_of_blood&pet.main.buff.frenzy.stack<3&(cooldown.bestial_wrath.ready|cooldown.call_of_the_wild.ready) +local function Cleave() + -- barbed_shot,target_if=min:dot.barbed_shot.remains,if=pet.main.buff.frenzy.up&pet.main.buff.frenzy.remains<=gcd+0.25|talent.scent_of_blood&cooldown.bestial_wrath.remains<12+gcd|pet.main.buff.frenzy.stack<3&(cooldown.bestial_wrath.ready|cooldown.call_of_the_wild.ready)|full_recharge_time1.4|buff.call_of_the_wild.up|full_recharge_time10 + if S.KillShot:IsReady() and (S.VenomsBite:IsAvailable()) then + if Everyone.CastTargetIf(S.KillShot, Enemies40y, "min", EvaluateTargetIfFilterSerpentSting, EvaluateTargetIfKillShotCleave, not Target:IsSpellInActionRange(S.KillShot)) then return "kill_shot cleave 16"; end end -- dire_beast if S.DireBeast:IsCastable() then - if Cast(S.DireBeast, Settings.BeastMastery.GCDasOffGCD.DireBeast, nil, not Target:IsSpellInRange(S.DireBeast)) then return "dire_beast st 30"; end + if Cast(S.DireBeast, Settings.BeastMastery.GCDasOffGCD.DireBeast, nil, not Target:IsSpellInRange(S.DireBeast)) then return "dire_beast cleave 18"; end end - -- serpent_sting,target_if=min:remains,if=refreshable&target.time_to_die>duration - if S.SerpentSting:IsReady() then - if Everyone.CastTargetIf(S.SerpentSting, Enemies40y, "min", EvaluateTargetIfFilterSerpentSting, EvaluateTargetIfSerpentStingST, not Target:IsSpellInRange(S.SerpentSting)) then return "serpent_sting st 32"; end + -- barbed_shot,target_if=min:dot.barbed_shot.remains,if=buff.call_of_the_wild.up|fight_remains<9|talent.wild_call&charges_fractional>1.2|talent.savagery + if S.BarbedShot:IsCastable() then + if Everyone.CastTargetIf(S.BarbedShot, Enemies40y, "min", EvaluateTargetIfFilterBarbedShot, EvaluateTargetIfBarbedShotCleave4, not Target:IsSpellInRange(S.BarbedShot)) then return "barbed_shot cleave 20"; end end - -- kill_shot - if S.KillShot:IsReady() then - if Cast(S.KillShot, nil, nil, not Target:IsSpellInRange(S.KillShot)) then return "kill_shot st 34"; end + -- kill_command + if S.KillCommand:IsReady() then + if Cast(S.KillCommand, nil, nil, not Target:IsSpellInRange(S.KillCommand)) then return "kill_command cleave 22"; end + end + -- multishot,if=pet.main.buff.beast_cleave.remainsexecute_time|target.time_to_die<5 - if S.WailingArrow:IsReady() and (Pet:BuffRemains(S.FrenzyPetBuff) > S.WailingArrow:ExecuteTime() or FightRemains < 5) then - if Cast(S.WailingArrow, Settings.BeastMastery.GCDasOffGCD.WailingArrow, nil, not Target:IsSpellInRange(S.WailingArrow)) then return "wailing_arrow st 40"; end + -- cobra_shot,if=focus.time_to_max9&(pet.main.buff.frenzy.up&pet.main.buff.frenzy.remains<=gcd+0.25|talent.scent_of_blood&cooldown.bestial_wrath.remains<12+gcd|pet.main.buff.frenzy.stack<3&(cooldown.bestial_wrath.ready|cooldown.call_of_the_wild.ready)|full_recharge_time9&(buff.call_of_the_wild.up|fight_remains<9|talent.wild_call&charges_fractional>1.2|talent.savagery) - if S.BarbedShot:IsCastable() then - if Everyone.CastTargetIf(S.BarbedShot, Enemies40y, "max", EvaluateTargetIfFilterLatentPoison, EvaluateTargetIfBarbedShotCleave3, not Target:IsSpellInRange(S.BarbedShot)) then return "barbed_shot cleave 26"; end + -- kill_command + if S.KillCommand:IsReady() then + if Cast(S.KillCommand, nil, nil, not Target:IsSpellInRange(S.KillCommand)) then return "kill_command st 18"; end end - -- barbed_shot,target_if=min:dot.barbed_shot.remains,if=buff.call_of_the_wild.up|fight_remains<9|talent.wild_call&charges_fractional>1.2|talent.savagery + -- barbed_shot,target_if=min:dot.barbed_shot.remains,if=talent.wild_call&charges_fractional>1.4|buff.call_of_the_wild.up|full_recharge_timeduration - if S.SerpentSting:IsReady() then - if Everyone.CastTargetIf(S.SerpentSting, Enemies40y, "min", EvaluateTargetIfFilterSerpentSting, EvaluateTargetIfSerpentStingCleave, not Target:IsSpellInRange(S.SerpentSting)) then return "serpent_sting cleave 34"; end + if Cast(S.DireBeast, Settings.BeastMastery.GCDasOffGCD.DireBeast, nil, not Target:IsSpellInRange(S.DireBeast)) then return "dire_beast st 30"; end end - -- barrage,if=pet.main.buff.frenzy.remains>execute_time - if S.Barrage:IsReady() and (Pet:BuffRemains(S.FrenzyPetBuff) > S.Barrage:ExecuteTime()) then - if Cast(S.Barrage, nil, nil, not Target:IsSpellInRange(S.Barrage)) then return "barrage cleave 36"; end + -- explosive_shot,if=!buff.bestial_wrath.up&talent.killer_cobra|!talent.killer_cobra + if S.ExplosiveShot:IsReady() and (Player:BuffDown(S.BestialWrathBuff) and S.KillerCobra:IsAvailable() or not S.KillerCobra:IsAvailable()) then + if Cast(S.ExplosiveShot, Settings.CommonsOGCD.GCDasOffGCD.ExplosiveShot, nil, not Target:IsSpellInRange(S.ExplosiveShot)) then return "explosive_shot st 32"; end end - -- multishot,if=pet.main.buff.beast_cleave.remainsexecute_time|fight_remains<5 - if S.WailingArrow:IsReady() and (Pet:BuffRemains(S.FrenzyPetBuff) > S.WailingArrow:ExecuteTime() or FightRemains < 5) then - if Cast(S.WailingArrow, Settings.BeastMastery.GCDasOffGCD.WailingArrow, nil, not Target:IsSpellInRange(S.WailingArrow)) then return "wailing_arrow cleave 46"; end + if Cast(S.LightsJudgment, Settings.CommonsOGCD.OffGCDasOffGCD.Racials, nil, not Target:IsInRange(5)) then return "lights_judgment st 36"; end end - -- bag_of_tricks,if=buff.bestial_wrath.down|target.time_to_die<5 - if S.BagofTricks:IsCastable() and CDsON() and (Player:BuffDown(S.BestialWrathBuff) or FightRemains < 5) then - if Cast(S.BagofTricks, Settings.CommonsOGCD.OffGCDasOffGCD.Racials) then return "bag_of_tricks cleave 48"; end + -- cobra_shot + if S.CobraShot:IsReady() then + if Cast(S.CobraShot, nil, nil, not Target:IsSpellInRange(S.CobraShot)) then return "cobra_shot st 38"; end end - -- arcane_torrent,if=(focus+focus.regen+30)trinket.1.cooldown.duration%3&fight_remains>trinket.1.cooldown.duration+20|trinket.2.has_use_buff&trinket.2.cooldown.remains>variable.sync_remains-15&trinket.2.cooldown.remains-5fight_remains)|variable.trinket_2_stronger&(trinket.2.cooldown.remains&(trinket.2.cooldown.remains-5=20|trinket.2.cooldown.remains-5>=variable.sync_remains&(variable.sync_remains>trinket.1.cooldown.duration%3|trinket.1.cooldown.durationfight_remains)))|trinket.2.cooldown.ready&variable.sync_remains>20&variable.sync_remains20|trinket.2.cooldown.remains>20))|fight_remains<25&(variable.trinket_1_stronger|trinket.2.cooldown.remains) - local Trinket1ToUse, _, Trinket1Range = Player:GetUseableItems(OnUseExcludes, 13) - if Trinket1ToUse and (Trinket1:HasUseBuff() and (VarSyncReady and (VarTrinket1Stronger or Trinket2:CooldownDown()) or not VarSyncReady and (VarTrinket1Stronger and (VarSyncRemains > Trinket1:Cooldown() / 3 and FightRemains > Trinket1:Cooldown() + 20 or Trinket2:HasUseBuff() and Trinket2:CooldownRemains() > VarSyncRemains - 15 and Trinket2:CooldownRemains() - 5 < VarSyncRemains and VarSyncRemains + 45 > FightRemains) or VarTrinket2Stronger and (Trinket2:CooldownDown() and (Trinket2:CooldownRemains() - 5 < VarSyncRemains and VarSyncRemains >= 20 or Trinket2:CooldownRemains() - 5 >= VarSyncRemains and (VarSyncRemains > Trinket1:Cooldown() / 3 or Trinket1:Cooldown() < FightRemains and (VarSyncRemains + Trinket1:Cooldown() > FightRemains))) or Trinket2:CooldownUp() and VarSyncRemains > 20 and VarSyncRemains < Trinket2:Cooldown() / 3))) or not Trinket1:HasUseBuff() and (Trinket1:CastTime() == 0 or not VarSyncActive) and (not Trinket2:HasUseBuff() and (VarTrinket1Stronger or Trinket2:CooldownDown()) or Trinket2:HasUseBuff() and (not VarSyncActive and VarSyncRemains > 20 or Trinket2:CooldownRemains() > 20)) or FightRemains < 25 and (VarTrinket1Stronger or Trinket2:CooldownDown())) then - if Cast(Trinket1ToUse, nil, Settings.CommonsDS.DisplayStyle.Trinkets, not Target:IsInRange(Trinket1Range)) then return "trinket1 ("..Trinket1ToUse:Name()..") trinkets 2"; end + if Trinket1:IsReady() and not VarTrinket1BL and (Trinket1:HasUseBuff() and (VarSyncReady and (VarTrinket1Stronger or Trinket2:CooldownDown()) or not VarSyncReady and (VarTrinket1Stronger and (VarSyncRemains > VarTrinket1CD / 3 and FightRemains > VarTrinket1CD + 20 or Trinket2:HasUseBuff() and Trinket2:CooldownRemains() > VarSyncRemains - 15 and Trinket2:CooldownRemains() - 5 < VarSyncRemains and VarSyncRemains + 45 > FightRemains) or VarTrinket2Stronger and (Trinket2:CooldownDown() and (Trinket2:CooldownRemains() - 5 < VarSyncRemains and VarSyncRemains >= 20 or Trinket2:CooldownRemains() - 5 >= VarSyncRemains and (VarSyncRemains > VarTrinket1CD / 3 or VarTrinket1CD < FightRemains and (VarSyncRemains + VarTrinket1CD > FightRemains))) or Trinket2:CooldownUp() and VarSyncRemains > 20 and VarSyncRemains < VarTrinket2CD / 3))) or not Trinket1:HasUseBuff() and (VarTrinket1Spell:CastTime() == 0 or not VarSyncActive) and (not Trinket2:HasUseBuff() and (VarTrinket1Stronger or Trinket2:CooldownDown()) or Trinket2:HasUseBuff() and (not VarSyncActive and VarSyncRemains > 20 or Trinket2:CooldownRemains() > 20)) or FightRemains < 25 and (VarTrinket1Stronger or Trinket2:CooldownDown())) then + if Cast(Trinket1, nil, Settings.CommonsDS.DisplayStyle.Trinkets, not Target:IsInRange(VarTrinket1Range)) then return "use_item for "..Trinket1:Name().." trinkets 2"; end end -- use_item,use_off_gcd=1,slot=trinket2,if=trinket.2.has_use_buff&(variable.sync_ready&(variable.trinket_2_stronger|trinket.1.cooldown.remains)|!variable.sync_ready&(variable.trinket_2_stronger&(variable.sync_remains>trinket.2.cooldown.duration%3&fight_remains>trinket.2.cooldown.duration+20|trinket.1.has_use_buff&trinket.1.cooldown.remains>variable.sync_remains-15&trinket.1.cooldown.remains-5fight_remains)|variable.trinket_1_stronger&(trinket.1.cooldown.remains&(trinket.1.cooldown.remains-5=20|trinket.1.cooldown.remains-5>=variable.sync_remains&(variable.sync_remains>trinket.2.cooldown.duration%3|trinket.2.cooldown.durationfight_remains)))|trinket.1.cooldown.ready&variable.sync_remains>20&variable.sync_remains20|trinket.1.cooldown.remains>20))|fight_remains<25&(variable.trinket_2_stronger|trinket.1.cooldown.remains) - local Trinket2ToUse, _, Trinket2Range = Player:GetUseableItems(OnUseExcludes, 14) - if Trinket2ToUse and (Trinket2:HasUseBuff() and (VarSyncReady and (VarTrinket2Stronger or Trinket1:CooldownDown()) or not VarSyncReady and (VarTrinket2Stronger and (VarSyncRemains > Trinket2:Cooldown() / 3 and FightRemains > Trinket2:Cooldown() + 20 or Trinket1:HasUseBuff() and Trinket1:CooldownRemains() > VarSyncRemains - 15 and Trinket1:CooldownRemains() - 5 < VarSyncRemains and VarSyncRemains + 45 > FightRemains) or VarTrinket1Stronger and (Trinket1:CooldownDown() and (Trinket1:CooldownRemains() - 5 < VarSyncRemains and VarSyncRemains >= 20 or Trinket1:CooldownRemains() - 5 >= VarSyncRemains and (VarSyncRemains > Trinket2:Cooldown() / 3 or Trinket2:Cooldown() < FightRemains and (VarSyncRemains + Trinket2:Cooldown() > FightRemains))) or Trinket1:CooldownUp() and VarSyncRemains > 20 and VarSyncRemains < Trinket1:Cooldown() / 3))) or not Trinket2:HasUseBuff() and (Trinket2:CastTime() == 0 or not VarSyncActive) and (not Trinket1:HasUseBuff() and (VarTrinket2Stronger or Trinket1:CooldownDown()) or Trinket1:HasUseBuff() and (not VarSyncActive and VarSyncRemains > 20 or Trinket1:CooldownRemains() > 20)) or FightRemains < 25 and (VarTrinket2Stronger or Trinket1:CooldownDown())) then - if Cast(Trinket2ToUse, nil, Settings.CommonsDS.DisplayStyle.Trinkets, not Target:IsInRange(Trinket2Range)) then return "trinket2 ("..Trinket2ToUse:Name()..") trinkets 4"; end + if Trinket2:IsReady() and not VarTrinket2BL and (Trinket2:HasUseBuff() and (VarSyncReady and (VarTrinket2Stronger or Trinket1:CooldownDown()) or not VarSyncReady and (VarTrinket2Stronger and (VarSyncRemains > VarTrinket2CD / 3 and FightRemains > VarTrinket2CD + 20 or Trinket1:HasUseBuff() and Trinket1:CooldownRemains() > VarSyncRemains - 15 and Trinket1:CooldownRemains() - 5 < VarSyncRemains and VarSyncRemains + 45 > FightRemains) or VarTrinket1Stronger and (Trinket1:CooldownDown() and (Trinket1:CooldownRemains() - 5 < VarSyncRemains and VarSyncRemains >= 20 or Trinket1:CooldownRemains() - 5 >= VarSyncRemains and (VarSyncRemains > VarTrinket2CD / 3 or VarTrinket2CD < FightRemains and (VarSyncRemains + VarTrinket2CD > FightRemains))) or Trinket1:CooldownUp() and VarSyncRemains > 20 and VarSyncRemains < VarTrinket1CD / 3))) or not Trinket2:HasUseBuff() and (VarTrinket2Spell:CastTime() == 0 or not VarSyncActive) and (not Trinket1:HasUseBuff() and (VarTrinket2Stronger or Trinket1:CooldownDown()) or Trinket1:HasUseBuff() and (not VarSyncActive and VarSyncRemains > 20 or Trinket1:CooldownRemains() > 20)) or FightRemains < 25 and (VarTrinket2Stronger or Trinket1:CooldownDown())) then + if Cast(Trinket2, nil, Settings.CommonsDS.DisplayStyle.Trinkets, not Target:IsInRange(VarTrinket2Range)) then return "use_item for "..Trinket2:Name().." trinkets 4"; end end end diff --git a/HeroRotation_Hunter/Hunter.lua b/HeroRotation_Hunter/Hunter.lua index 8cb52d6f7..50fa95a77 100644 --- a/HeroRotation_Hunter/Hunter.lua +++ b/HeroRotation_Hunter/Hunter.lua @@ -108,7 +108,9 @@ Spell.Hunter.BeastMastery = MergeTableByKey(Spell.Hunter.Commons, { CalloftheWild = Spell(359844), CobraShot = Spell(193455), DireBeast = Spell(120679), + HuntmastersCall = Spell(459730), KillCleave = Spell(378207), + KillerCobra = Spell(199532), MultiShot = Spell(2643), OneWithThePack = Spell(199528), Savagery = Spell(424557), @@ -124,6 +126,7 @@ Spell.Hunter.BeastMastery = MergeTableByKey(Spell.Hunter.Commons, { BestialWrathPetBuff = Spell(186254, "Pet"), CalloftheWildBuff = Spell(359844), FrenzyPetBuff = Spell(272790, "Pet"), + HuntersPreyBuff = Spell(378215), -- Debuffs BarbedShotDebuff = Spell(217200), }) diff --git a/HeroRotation_Hunter/Settings.lua b/HeroRotation_Hunter/Settings.lua index 30dcdbaeb..260b2d1bf 100644 --- a/HeroRotation_Hunter/Settings.lua +++ b/HeroRotation_Hunter/Settings.lua @@ -43,6 +43,7 @@ HR.GUISettings.APL.Hunter = { ExplosiveShot = false, Flare = false, FreezingTrap = false, + HuntersMark = false, MendPet = false, RevivePet = false, Stampede = false,