|
|
|
@ -61,14 +61,14 @@ local InterruptTarget = Bastion.UnitManager:CreateCustomUnit('interrupttarget', |
|
|
|
|
Bastion.UnitManager:EnumEnemies(function(unit) |
|
|
|
|
if unit:IsAffectingCombat() and unit:GetDistance(Player) <= 40 and Player:CanSee(unit) |
|
|
|
|
and unit:IsCasting() and unit:IsInterruptible() then |
|
|
|
|
local castPercentage = GetCastPercentage(unit) |
|
|
|
|
local castPercentage = unit:GetChannelOrCastPercentComplete() |
|
|
|
|
if castPercentage >= 30 and castPercentage <= 80 then |
|
|
|
|
target = unit |
|
|
|
|
return true |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
return target or BestTarget |
|
|
|
|
return target or Bastion.UnitManager:Get('none') |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
local ExecuteTarget = Bastion.UnitManager:CreateCustomUnit('executetarget', function() |
|
|
|
@ -355,16 +355,12 @@ PetAPL:AddSpell( |
|
|
|
|
-- Interrupt APL |
|
|
|
|
InterruptAPL:AddSpell( |
|
|
|
|
CounterShot:CastableIf(function(self) |
|
|
|
|
if not BestTarget:Exists() or not self:IsKnownAndUsable() or Player:IsCastingOrChanneling() then |
|
|
|
|
return false |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if BestTarget:IsCasting() and BestTarget:IsInterruptible() then |
|
|
|
|
return ShouldInterrupt(BestTarget) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
return false |
|
|
|
|
end):SetTarget(BestTarget) |
|
|
|
|
local target = InterruptTarget |
|
|
|
|
return target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
and target:IsCasting() and target:IsInterruptible() |
|
|
|
|
and target:GetChannelOrCastPercentComplete() >= 30 |
|
|
|
|
and target:GetChannelOrCastPercentComplete() <= 80 |
|
|
|
|
end):SetTarget(InterruptTarget) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- Defensive APL |
|
|
|
|