|
|
@ -69,6 +69,18 @@ local InterruptTarget = Bastion.UnitManager:CreateCustomUnit('interrupttarget', |
|
|
|
return target or BestTarget |
|
|
|
return target or BestTarget |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local ExecuteTarget = Bastion.UnitManager:CreateCustomUnit('executetarget', function() |
|
|
|
|
|
|
|
local target = nil |
|
|
|
|
|
|
|
Bastion.UnitManager:EnumEnemies(function(unit) |
|
|
|
|
|
|
|
if unit:IsAffectingCombat() and unit:GetDistance(Player) <= 40 and Player:CanSee(unit) |
|
|
|
|
|
|
|
and unit:GetHP() < 20 then |
|
|
|
|
|
|
|
target = unit |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end) |
|
|
|
|
|
|
|
return target or Bastion.UnitManager:Get('none') |
|
|
|
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
-- APLs |
|
|
|
-- APLs |
|
|
|
local DefaultAPL = Bastion.APL:New('default') |
|
|
|
local DefaultAPL = Bastion.APL:New('default') |
|
|
|
local CooldownAPL = Bastion.APL:New('cooldown') |
|
|
|
local CooldownAPL = Bastion.APL:New('cooldown') |
|
|
@ -78,6 +90,7 @@ local InterruptAPL = Bastion.APL:New('interrupt') |
|
|
|
local DefensiveAPL = Bastion.APL:New('defensive') |
|
|
|
local DefensiveAPL = Bastion.APL:New('defensive') |
|
|
|
local BossAPL = Bastion.APL:New('boss') |
|
|
|
local BossAPL = Bastion.APL:New('boss') |
|
|
|
local TranqAPL = Bastion.APL:New('tranq') |
|
|
|
local TranqAPL = Bastion.APL:New('tranq') |
|
|
|
|
|
|
|
local ExecuteAPL = Bastion.APL:New('execute') |
|
|
|
|
|
|
|
|
|
|
|
-- Helper Functions |
|
|
|
-- Helper Functions |
|
|
|
local function GetBarbedShotCharges() |
|
|
|
local function GetBarbedShotCharges() |
|
|
@ -196,13 +209,6 @@ DefaultAPL:AddSpell( |
|
|
|
end):SetTarget(BestTarget) |
|
|
|
end):SetTarget(BestTarget) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
|
|
|
KillShot:CastableIf(function(self) |
|
|
|
|
|
|
|
return BestTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
|
|
|
and BestTarget:GetHP() < 20 |
|
|
|
|
|
|
|
end):SetTarget(BestTarget) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
CobraShot:CastableIf(function(self) |
|
|
|
CobraShot:CastableIf(function(self) |
|
|
|
return BestTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
return BestTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
@ -308,13 +314,6 @@ AoEAPL:AddSpell( |
|
|
|
end):SetTarget(BestTarget) |
|
|
|
end):SetTarget(BestTarget) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
AoEAPL:AddSpell( |
|
|
|
|
|
|
|
KillShot:CastableIf(function(self) |
|
|
|
|
|
|
|
return BestTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
|
|
|
and IsVenomsBiteTalented() and BestTarget:GetHP() < 20 |
|
|
|
|
|
|
|
end):SetTarget(BestTarget) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AoEAPL:AddSpell( |
|
|
|
AoEAPL:AddSpell( |
|
|
|
ExplosiveShot:CastableIf(function(self) |
|
|
|
ExplosiveShot:CastableIf(function(self) |
|
|
|
return BestTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
return BestTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
@ -388,6 +387,12 @@ BossAPL:AddSpell( |
|
|
|
end):SetTarget(Player) |
|
|
|
end):SetTarget(Player) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExecuteAPL:AddSpell( |
|
|
|
|
|
|
|
KillShot:CastableIf(function(self) |
|
|
|
|
|
|
|
return ExecuteTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
|
|
|
end):SetTarget(ExecuteTarget) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
-- Module Sync |
|
|
|
-- Module Sync |
|
|
|
BMHunterModule:Sync(function() |
|
|
|
BMHunterModule:Sync(function() |
|
|
|
if Player:IsMounted() then |
|
|
|
if Player:IsMounted() then |
|
|
@ -396,9 +401,10 @@ BMHunterModule:Sync(function() |
|
|
|
|
|
|
|
|
|
|
|
DefensiveAPL:Execute() |
|
|
|
DefensiveAPL:Execute() |
|
|
|
PetAPL:Execute() |
|
|
|
PetAPL:Execute() |
|
|
|
TranqAPL:Execute() -- This will now respect the random reaction delay |
|
|
|
TranqAPL:Execute() |
|
|
|
|
|
|
|
|
|
|
|
if Player:IsAffectingCombat() then |
|
|
|
if Player:IsAffectingCombat() then |
|
|
|
|
|
|
|
ExecuteAPL:Execute() -- Add this line |
|
|
|
InterruptAPL:Execute() |
|
|
|
InterruptAPL:Execute() |
|
|
|
|
|
|
|
|
|
|
|
if BestTarget:Exists() and BestTarget:IsBoss() then |
|
|
|
if BestTarget:Exists() and BestTarget:IsBoss() then |
|
|
|