|
|
@ -139,11 +139,12 @@ local Lowest = Bastion.UnitManager:CreateCustomUnit('lowest', function(unit) |
|
|
|
return lowest |
|
|
|
return lowest |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
local DispelTarget = Bastion.UnitManager:CreateCustomUnit('dispel', function() |
|
|
|
local DispelTarget = Bastion.UnitManager:CreateCustomUnit('rejuv', function(unit) |
|
|
|
local dispelTarget = nil |
|
|
|
local lowest = nil |
|
|
|
|
|
|
|
local lowestHP = math.huge |
|
|
|
|
|
|
|
|
|
|
|
Bastion.UnitManager:EnumFriends(function(unit) |
|
|
|
Bastion.UnitManager:EnumFriends(function(unit) |
|
|
|
if Player:GetDistance(unit) > 40 then |
|
|
|
if unit:IsDead() then |
|
|
|
return false |
|
|
|
return false |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -151,24 +152,57 @@ local DispelTarget = Bastion.UnitManager:CreateCustomUnit('dispel', function() |
|
|
|
return false |
|
|
|
return false |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if unit:IsDead() then |
|
|
|
if Player:GetDistance(unit) > 40 then |
|
|
|
return false |
|
|
|
return false |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if unit:GetAuras():HasAnyDispelableAura(NaturesCure) then |
|
|
|
if not unit:IsDead() and Player:CanSee(unit) and |
|
|
|
return true |
|
|
|
unit:GetAuras():HasAnyDispelableAura(NaturesCure) then |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false |
|
|
|
local hp = unit:GetHP() |
|
|
|
|
|
|
|
if hp < lowestHP then |
|
|
|
|
|
|
|
lowest = unit |
|
|
|
|
|
|
|
lowestHP = hp |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
if not dispelTarget then |
|
|
|
if lowest == nil then |
|
|
|
dispelTarget = Player |
|
|
|
lowest = None |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
return dispelTarget |
|
|
|
return lowest |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- local PurgeTarget = Bastion.UnitManager:CreateCustomUnit('purge', function(unit) |
|
|
|
|
|
|
|
-- local purge = nil |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Bastion.UnitManager:EnumEnemies(function(unit) |
|
|
|
|
|
|
|
-- if unit:IsDead() then |
|
|
|
|
|
|
|
-- return false |
|
|
|
|
|
|
|
-- end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- if not Player:CanSee(unit) then |
|
|
|
|
|
|
|
-- return false |
|
|
|
|
|
|
|
-- end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- if Player:GetDistance(unit) > 40 then |
|
|
|
|
|
|
|
-- return false |
|
|
|
|
|
|
|
-- end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- if not unit:IsDead() and Player:CanSee(unit) and |
|
|
|
|
|
|
|
-- unit:GetAuras():HasAnyStealableAura() then |
|
|
|
|
|
|
|
-- purge = unit |
|
|
|
|
|
|
|
-- end |
|
|
|
|
|
|
|
-- end) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- if purge == nil then |
|
|
|
|
|
|
|
-- purge = None |
|
|
|
|
|
|
|
-- end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- return purge |
|
|
|
|
|
|
|
-- end) |
|
|
|
|
|
|
|
|
|
|
|
local Tank = Bastion.UnitManager:CreateCustomUnit('tank', function(unit) |
|
|
|
local Tank = Bastion.UnitManager:CreateCustomUnit('tank', function(unit) |
|
|
|
local tank = nil |
|
|
|
local tank = nil |
|
|
|
|
|
|
|
|
|
|
@ -277,7 +311,7 @@ local SwiftmendUnit = Bastion.UnitManager:CreateCustomUnit('swiftmend', function |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if lowest == nil then |
|
|
|
if lowest == nil then |
|
|
|
lowest = Player |
|
|
|
lowest = None |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
return lowest |
|
|
|
return lowest |
|
|
@ -319,10 +353,17 @@ DefaultAPL:AddAction( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
NaturesCure:CastableIf(function(self) |
|
|
|
NaturesCure:CastableIf(function(self) |
|
|
|
return DispelTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and |
|
|
|
return DispelTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and |
|
|
|
self:IsInRange(DispelTarget) and DispelTarget:GetAuras():HasAnyDispelableAura(self) |
|
|
|
self:IsInRange(DispelTarget) and DispelTarget:GetAuras():HasAnyDispelableAura(NaturesCure) |
|
|
|
end):SetTarget(DispelTarget) |
|
|
|
end):SetTarget(DispelTarget) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
|
|
|
Soothe:CastableIf(function(self) |
|
|
|
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and |
|
|
|
|
|
|
|
self:IsInRange(Target) and Target:GetAuras():HasAnyStealableAura() |
|
|
|
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
NaturesSwiftness:CastableIf(function(self) |
|
|
|
NaturesSwiftness:CastableIf(function(self) |
|
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
@ -459,7 +500,8 @@ DefaultAPL:AddSpell( |
|
|
|
and Player:CanSee(Target) and |
|
|
|
and Player:CanSee(Target) and |
|
|
|
( |
|
|
|
( |
|
|
|
not Target:GetAuras():FindMy(SunfireAura):IsUp() or |
|
|
|
not Target:GetAuras():FindMy(SunfireAura):IsUp() or |
|
|
|
Target:GetAuras():FindMy(SunfireAura):GetRemainingTime() <= 5.4) |
|
|
|
Target:GetAuras():FindMy(SunfireAura):GetRemainingTime() <= 5.4) and Target:IsHostile() and |
|
|
|
|
|
|
|
Target:IsAffectingCombat() |
|
|
|
end):SetTarget(Target) |
|
|
|
end):SetTarget(Target) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -469,21 +511,24 @@ DefaultAPL:AddSpell( |
|
|
|
and Player:CanSee(Target) and |
|
|
|
and Player:CanSee(Target) and |
|
|
|
( |
|
|
|
( |
|
|
|
not Target:GetAuras():FindMy(MoonfireAura):IsUp() or |
|
|
|
not Target:GetAuras():FindMy(MoonfireAura):IsUp() or |
|
|
|
Target:GetAuras():FindMy(MoonfireAura):GetRemainingTime() <= 5.4) |
|
|
|
Target:GetAuras():FindMy(MoonfireAura):GetRemainingTime() <= 5.4) and Target:IsHostile() and |
|
|
|
|
|
|
|
Target:IsAffectingCombat() |
|
|
|
end):SetTarget(Target) |
|
|
|
end):SetTarget(Target) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
Starsurge:CastableIf(function(self) |
|
|
|
Starsurge:CastableIf(function(self) |
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
and Player:CanSee(Target) |
|
|
|
and Player:CanSee(Target) and Target:IsHostile() and |
|
|
|
|
|
|
|
Target:IsAffectingCombat() |
|
|
|
end):SetTarget(Target) |
|
|
|
end):SetTarget(Target) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
Wrath:CastableIf(function(self) |
|
|
|
Wrath:CastableIf(function(self) |
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
and Player:CanSee(Target) and not Player:IsMoving() |
|
|
|
and Player:CanSee(Target) and not Player:IsMoving() and Target:IsHostile() and |
|
|
|
|
|
|
|
Target:IsAffectingCombat() |
|
|
|
end):SetTarget(Target) |
|
|
|
end):SetTarget(Target) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|