|
|
|
@ -19,6 +19,10 @@ local BlessingOfTheDawn = Bastion.SpellBook:GetSpell(385127) |
|
|
|
|
local ShieldOfTheRighteous = Bastion.SpellBook:GetSpell(53600) |
|
|
|
|
local BlessedHammer = Bastion.SpellBook:GetSpell(204019) |
|
|
|
|
local AutoAttack = Bastion.SpellBook:GetSpell(6603) |
|
|
|
|
local WoG = Bastion.SpellBook:GetSpell(85673) |
|
|
|
|
local ShinningLight = Bastion.SpellBook:GetSpell(327510) |
|
|
|
|
|
|
|
|
|
local HolyPower = Enum.PowerType.HolyPower |
|
|
|
|
|
|
|
|
|
---@type Rebuke |
|
|
|
|
local Rebuke = Tinkr:require("scripts/bastion/scripts/paladin/shared/rebuke", Bastion) |
|
|
|
@ -26,7 +30,7 @@ local Rebuke = Tinkr:require("scripts/bastion/scripts/paladin/shared/rebuke", Ba |
|
|
|
|
---@type HammerOfWrath |
|
|
|
|
local HammerOfWrath = Tinkr:require("scripts/bastion/scripts/paladin/shared/hammer-of-wrath", Bastion) |
|
|
|
|
|
|
|
|
|
local AvengersShieldTarget = Bastion.UnitManager:CreateCustomUnit('avengers_shield', function() |
|
|
|
|
local AvengersShieldTarget = Bastion.UnitManager:CreateCustomUnit('avengersshield', function() |
|
|
|
|
local target = nil |
|
|
|
|
|
|
|
|
|
Bastion.UnitManager:EnumEnemies(function(unit) |
|
|
|
@ -61,6 +65,45 @@ local AvengersShieldTarget = Bastion.UnitManager:CreateCustomUnit('avengers_shie |
|
|
|
|
return target |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
local WoGTarget = Bastion.UnitManager:CreateCustomUnit('wordofglory', function() |
|
|
|
|
if not WoG:IsKnownAndUsable() then return None end |
|
|
|
|
|
|
|
|
|
local lowest = nil |
|
|
|
|
local lowestHP = math.huge |
|
|
|
|
|
|
|
|
|
Bastion.UnitManager:EnumFriends(function(unit) |
|
|
|
|
if unit:IsDead() then |
|
|
|
|
return false |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if WoG:IsInRange(unit) then |
|
|
|
|
return false |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if not Player:CanSee(unit) then |
|
|
|
|
return false |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if not unit:GetHealthPercent() <= 55 then |
|
|
|
|
return false |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local hp = unit:GetHP() |
|
|
|
|
if hp < lowestHP then |
|
|
|
|
lowest = unit |
|
|
|
|
lowestHP = hp |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
return false |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
if not lowest then |
|
|
|
|
lowest = None |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
return lowest |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
---@return boolean |
|
|
|
|
local function CombatRotation() |
|
|
|
|
-- Attack the target is auto attack isnt active. |
|
|
|
@ -80,20 +123,24 @@ local function CombatRotation() |
|
|
|
|
if OfDuskAndDawn:IsKnown() then |
|
|
|
|
-- If Blessing of Dawn isnt up, or will expire soon then wait for 5 HP to cast it. |
|
|
|
|
if not Player:GetAuras():FindMy(BlessingOfTheDawn):IsUp() or Player:GetAuras():FindMy(BlessingOfTheDawn):GetRemainingTime() < 7 then |
|
|
|
|
if Player:GetPower(Enum.PowerType.HolyPower) > 4 and ShieldOfTheRighteous:IsKnownAndUsable() and ShieldOfTheRighteous:IsInRange(Target) then |
|
|
|
|
if Player:GetPower(HolyPower) > 4 and ShieldOfTheRighteous:IsKnownAndUsable() and ShieldOfTheRighteous:IsInRange(Target) and not Player:IsCastingOrChanneling() then |
|
|
|
|
return ShieldOfTheRighteous:Cast(Target) |
|
|
|
|
end |
|
|
|
|
-- If Blessing of Dawn is up, cast SoR at 3 or more HP |
|
|
|
|
elseif Player:GetPower(Enum.PowerType.HolyPower) >= 3 and ShieldOfTheRighteous:IsKnownAndUsable() and ShieldOfTheRighteous:IsInRange(Target) then |
|
|
|
|
elseif Player:GetPower(HolyPower) >= 3 and not Player:IsCastingOrChanneling() and ShieldOfTheRighteous:IsKnownAndUsable() and ShieldOfTheRighteous:IsInRange(Target) then |
|
|
|
|
return ShieldOfTheRighteous:Cast(Target) |
|
|
|
|
end |
|
|
|
|
else |
|
|
|
|
-- If Dusk And Dawn isnt known, rip SoR normally. |
|
|
|
|
if ShieldOfTheRighteous:IsKnownAndUsable() and ShieldOfTheRighteous:IsInRange(Target) then |
|
|
|
|
if ShieldOfTheRighteous:IsKnownAndUsable() and ShieldOfTheRighteous:IsInRange(Target) and not Player:IsCastingOrChanneling() then |
|
|
|
|
return ShieldOfTheRighteous:Cast(Target) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if WoG:IsKnownAndUsable() and Player:GetAuras():FindMy(ShinningLight):IsUp() and Player:GetHealthPercent() <= 51 and not Player:IsCastingOrChanneling() then |
|
|
|
|
return WoG:Cast(Player) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
-- Avengers shield with higher prio than Judgement in AOE. Prefer targets that are casting. |
|
|
|
|
if Player:GetEnemies(10) > 1 and AvengersShield:IsKnownAndUsable() and AvengersShieldTarget:Exists() then |
|
|
|
|
return AvengersShield:Cast(AvengersShieldTarget) |
|
|
|
@ -117,6 +164,11 @@ local function CombatRotation() |
|
|
|
|
return BlessedHammer:Cast(Player) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if WoGTarget:Exists() and not Player:IsCastingOrChanneling() then |
|
|
|
|
print('FOUND WoG TARGET') |
|
|
|
|
return WoG:Cast(WoGTarget) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
-- Refresh Consecrate if we've got nothing else to cast. |
|
|
|
|
if Consecrate:IsKnownAndUsable() and Player:GetEnemies(10) >= 1 and not Player:IsMoving() then |
|
|
|
|
return Consecrate:Cast(Player) |
|
|
|
|