|
|
@ -29,6 +29,7 @@ local VampiricBlood = SpellBook:GetSpell(55233) |
|
|
|
-- Buffs |
|
|
|
-- Buffs |
|
|
|
local BoneShield = SpellBook:GetSpell(195181) |
|
|
|
local BoneShield = SpellBook:GetSpell(195181) |
|
|
|
local DancingRuneWeaponBuff = SpellBook:GetSpell(81256) |
|
|
|
local DancingRuneWeaponBuff = SpellBook:GetSpell(81256) |
|
|
|
|
|
|
|
local DeathAndDecayBuff = SpellBook:GetSpell(188290) |
|
|
|
|
|
|
|
|
|
|
|
-- Helper Functions |
|
|
|
-- Helper Functions |
|
|
|
local function GetEnemiesInRange(range) |
|
|
|
local function GetEnemiesInRange(range) |
|
|
@ -45,6 +46,13 @@ local function HasEnoughRunicPower(cost) |
|
|
|
return Player:GetPower() >= cost |
|
|
|
return Player:GetPower() >= cost |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local function ShouldUseDeathStrike() |
|
|
|
|
|
|
|
local hp = Player:GetHP() |
|
|
|
|
|
|
|
local runicPower = Player:GetPower() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return hp <= 70 or runicPower > 110 or (hp <= 85 and HasEnoughRunicPower(45)) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Create APLs |
|
|
|
-- Create 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') |
|
|
@ -115,6 +123,12 @@ DefensiveAPL:AddSpell( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
-- Default APL |
|
|
|
-- Default APL |
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
|
|
|
DeathStrike:CastableIf(function(self) |
|
|
|
|
|
|
|
return self:IsKnownAndUsable() and ShouldUseDeathStrike() |
|
|
|
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
Marrowrend:CastableIf(function(self) |
|
|
|
Marrowrend:CastableIf(function(self) |
|
|
|
local boneShieldCount = Player:GetAuras():FindMy(BoneShield):GetCount() |
|
|
|
local boneShieldCount = Player:GetAuras():FindMy(BoneShield):GetCount() |
|
|
@ -124,17 +138,11 @@ DefaultAPL:AddSpell( |
|
|
|
end):SetTarget(Target) |
|
|
|
end):SetTarget(Target) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
|
|
|
DeathStrike:CastableIf(function(self) |
|
|
|
|
|
|
|
return self:IsKnownAndUsable() and HasEnoughRunicPower(45) and Player:GetHP() <= 80 |
|
|
|
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
Tombstone:CastableIf(function(self) |
|
|
|
Tombstone:CastableIf(function(self) |
|
|
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(BoneShield):GetCount() > 6 |
|
|
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(BoneShield):GetCount() > 6 |
|
|
|
and not Player:GetAuras():FindMy(DancingRuneWeaponBuff):IsUp() |
|
|
|
and not Player:GetAuras():FindMy(DancingRuneWeaponBuff):IsUp() |
|
|
|
and Player:GetAuras():FindMy(DeathAndDecay):IsUp() |
|
|
|
and Player:GetAuras():FindMy(DeathAndDecayBuff):IsUp() |
|
|
|
and DancingRuneWeapon:GetCooldownRemaining() > 0 |
|
|
|
and DancingRuneWeapon:GetCooldownRemaining() > 0 |
|
|
|
end):SetTarget(Player) |
|
|
|
end):SetTarget(Player) |
|
|
|
) |
|
|
|
) |
|
|
@ -143,7 +151,7 @@ DefaultAPL:AddSpell( |
|
|
|
Bonestorm:CastableIf(function(self) |
|
|
|
Bonestorm:CastableIf(function(self) |
|
|
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(BoneShield):GetCount() > 11 |
|
|
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(BoneShield):GetCount() > 11 |
|
|
|
and not Player:GetAuras():FindMy(DancingRuneWeaponBuff):IsUp() |
|
|
|
and not Player:GetAuras():FindMy(DancingRuneWeaponBuff):IsUp() |
|
|
|
and Player:GetAuras():FindMy(DeathAndDecay):IsUp() |
|
|
|
and Player:GetAuras():FindMy(DeathAndDecayBuff):IsUp() |
|
|
|
and HasEnoughRunicPower(100) |
|
|
|
and HasEnoughRunicPower(100) |
|
|
|
and DancingRuneWeapon:GetCooldownRemaining() > 0 |
|
|
|
and DancingRuneWeapon:GetCooldownRemaining() > 0 |
|
|
|
end):SetTarget(Player) |
|
|
|
end):SetTarget(Player) |
|
|
@ -151,8 +159,13 @@ DefaultAPL:AddSpell( |
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DeathAndDecay:CastableIf(function(self) |
|
|
|
DeathAndDecay:CastableIf(function(self) |
|
|
|
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(DeathAndDecay):IsUp() |
|
|
|
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(DeathAndDecayBuff):IsUp() |
|
|
|
end):SetTarget(Player) |
|
|
|
end):SetTarget(Player):OnCast(function(self) |
|
|
|
|
|
|
|
local loc = Bastion.UnitManager:FindEnemiesCentroid(10, 30) |
|
|
|
|
|
|
|
if loc then |
|
|
|
|
|
|
|
self:Click(loc) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
DefaultAPL:AddSpell( |
|
|
@ -171,7 +184,12 @@ DefaultAPL:AddSpell( |
|
|
|
local OpenerSequence = Bastion.Sequencer:New({ |
|
|
|
local OpenerSequence = Bastion.Sequencer:New({ |
|
|
|
function(self) |
|
|
|
function(self) |
|
|
|
if DeathAndDecay:IsKnownAndUsable() then |
|
|
|
if DeathAndDecay:IsKnownAndUsable() then |
|
|
|
DeathAndDecay:Cast(Player) |
|
|
|
DeathAndDecay:Cast(Player):OnCast(function(self) |
|
|
|
|
|
|
|
local loc = Bastion.UnitManager:FindEnemiesCentroid(10, 30) |
|
|
|
|
|
|
|
if loc then |
|
|
|
|
|
|
|
self:Click(loc) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end) |
|
|
|
return true |
|
|
|
return true |
|
|
|
end |
|
|
|
end |
|
|
|
return false |
|
|
|
return false |
|
|
@ -219,7 +237,7 @@ local OpenerSequence = Bastion.Sequencer:New({ |
|
|
|
return false |
|
|
|
return false |
|
|
|
end, |
|
|
|
end, |
|
|
|
function(self) |
|
|
|
function(self) |
|
|
|
if DeathStrike:IsKnownAndUsable() then |
|
|
|
if DeathStrike:IsKnownAndUsable() and ShouldUseDeathStrike() then |
|
|
|
DeathStrike:Cast(Target) |
|
|
|
DeathStrike:Cast(Target) |
|
|
|
return true |
|
|
|
return true |
|
|
|
end |
|
|
|
end |
|
|
@ -240,7 +258,7 @@ local OpenerSequence = Bastion.Sequencer:New({ |
|
|
|
return false |
|
|
|
return false |
|
|
|
end, |
|
|
|
end, |
|
|
|
function(self) |
|
|
|
function(self) |
|
|
|
if DeathStrike:IsKnownAndUsable() then |
|
|
|
if DeathStrike:IsKnownAndUsable() and ShouldUseDeathStrike() then |
|
|
|
DeathStrike:Cast(Target) |
|
|
|
DeathStrike:Cast(Target) |
|
|
|
return true |
|
|
|
return true |
|
|
|
end |
|
|
|
end |
|
|
|