|
|
@ -82,8 +82,10 @@ local AtoneTarget = Bastion.UnitManager:CreateCustomUnit('atonetarget', function |
|
|
|
|
|
|
|
|
|
|
|
local atonementBuff = unit:GetAuras():FindMy(Atonement) |
|
|
|
local atonementBuff = unit:GetAuras():FindMy(Atonement) |
|
|
|
if not atonementBuff:IsUp() then |
|
|
|
if not atonementBuff:IsUp() then |
|
|
|
|
|
|
|
if unit:GetHP() >= 70 and unit:GetHP() <= 90 then |
|
|
|
target = unit |
|
|
|
target = unit |
|
|
|
return true |
|
|
|
return true |
|
|
|
|
|
|
|
end |
|
|
|
elseif atonementBuff:GetRemainingTime() < lowestAtonementTime then |
|
|
|
elseif atonementBuff:GetRemainingTime() < lowestAtonementTime then |
|
|
|
target = unit |
|
|
|
target = unit |
|
|
|
lowestAtonementTime = atonementBuff:GetRemainingTime() |
|
|
|
lowestAtonementTime = atonementBuff:GetRemainingTime() |
|
|
@ -264,27 +266,58 @@ DiscPriestModule:Sync(function() |
|
|
|
return |
|
|
|
return |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Prioritize Defensive APL |
|
|
|
DefensiveAPL:Execute() |
|
|
|
DefensiveAPL:Execute() |
|
|
|
|
|
|
|
|
|
|
|
if Player:IsAffectingCombat() then |
|
|
|
if Player:IsAffectingCombat() then |
|
|
|
|
|
|
|
-- Prioritize cooldowns if necessary |
|
|
|
CooldownAPL:Execute() |
|
|
|
CooldownAPL:Execute() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Apply Atonement to targets before proceeding with DPS |
|
|
|
|
|
|
|
if AtoneTarget:Exists() and not AtoneTarget:GetAuras():FindMy(Atonement):IsUp() then |
|
|
|
|
|
|
|
if not AtoneTarget:GetAuras():FindMy(PowerWordShield):IsUp() and not AtoneTarget:GetAuras():FindMy(WeakenedSoul):IsUp() then |
|
|
|
|
|
|
|
PowerWordShield:Cast(AtoneTarget) |
|
|
|
|
|
|
|
elseif AtoneTarget:GetHP() <= 90 and not AtoneTarget:GetAuras():FindMy(Renew):IsUp() then |
|
|
|
|
|
|
|
Renew:Cast(AtoneTarget) |
|
|
|
|
|
|
|
elseif AtoneTarget:GetHP() <= 80 then |
|
|
|
|
|
|
|
FlashHeal:Cast(AtoneTarget) |
|
|
|
|
|
|
|
elseif AtoneTarget:GetAuras():FindMy(Atonement):IsUp() and Penance:IsKnownAndUsable() then |
|
|
|
|
|
|
|
Penance:Cast(AtoneTarget) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Execute Default and DPS APLs |
|
|
|
DefaultAPL:Execute() |
|
|
|
DefaultAPL:Execute() |
|
|
|
DpsAPL:Execute() |
|
|
|
DpsAPL:Execute() |
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
-- Out of combat healing and preparation |
|
|
|
-- Out of combat healing and preparation |
|
|
|
if AtoneTarget:Exists() and not AtoneTarget:GetAuras():FindMy(Atonement):IsUp() then |
|
|
|
if AtoneTarget:Exists() and not AtoneTarget:GetAuras():FindMy(Atonement):IsUp() then |
|
|
|
if not AtoneTarget:GetAuras():FindMy(PowerWordShield):IsUp() and not AtoneTarget:GetAuras():FindMy(WeakenedSoul):IsUp() then |
|
|
|
if not AtoneTarget:GetAuras():FindMy(PowerWordShield):IsUp() and not AtoneTarget:GetAuras():FindMy(WeakenedSoul):IsUp() then |
|
|
|
PowerWordShield:Cast(AtoneTarget) |
|
|
|
PowerWordShield:Cast(AtoneTarget) |
|
|
|
elseif AtoneTarget:GetHP() < 90 and not AtoneTarget:GetAuras():FindMy(Renew):IsUp() then |
|
|
|
elseif AtoneTarget:GetHP() <= 90 and not AtoneTarget:GetAuras():FindMy(Renew):IsUp() then |
|
|
|
Renew:Cast(AtoneTarget) |
|
|
|
Renew:Cast(AtoneTarget) |
|
|
|
elseif AtoneTarget:GetHP() < 80 then |
|
|
|
elseif AtoneTarget:GetHP() <= 80 then |
|
|
|
FlashHeal:Cast(AtoneTarget) |
|
|
|
FlashHeal:Cast(AtoneTarget) |
|
|
|
elseif AtoneTarget:GetAuras():FindMy(Atonement):IsUp() and Penance:IsKnownAndUsable() then |
|
|
|
elseif AtoneTarget:GetAuras():FindMy(Atonement):IsUp() and Penance:IsKnownAndUsable() then |
|
|
|
Penance:Cast(AtoneTarget) |
|
|
|
Penance:Cast(AtoneTarget) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Apply Purge the Wicked to main target if not in combat and about to pull |
|
|
|
-- Top off teammates' health to 100% |
|
|
|
|
|
|
|
Bastion.UnitManager:EnumFriends(function(unit) |
|
|
|
|
|
|
|
if unit:GetHP() < 100 and Player:CanSee(unit) and Player:GetDistance(unit) <= 40 then |
|
|
|
|
|
|
|
if not unit:GetAuras():FindMy(WeakenedSoul):IsUp() and PowerWordShield:IsKnownAndUsable() then |
|
|
|
|
|
|
|
PowerWordShield:Cast(unit) |
|
|
|
|
|
|
|
elseif FlashHeal:IsKnownAndUsable() then |
|
|
|
|
|
|
|
FlashHeal:Cast(unit) |
|
|
|
|
|
|
|
elseif Renew:IsKnownAndUsable() and not unit:GetAuras():FindMy(Renew):IsUp() then |
|
|
|
|
|
|
|
Renew:Cast(unit) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Prepare for combat by applying buffs and debuffs |
|
|
|
if Target:Exists() and Target:IsEnemy() and PurgeTheWicked:IsKnownAndUsable() and not Player:IsCastingOrChanneling() then |
|
|
|
if Target:Exists() and Target:IsEnemy() and PurgeTheWicked:IsKnownAndUsable() and not Player:IsCastingOrChanneling() then |
|
|
|
if not Target:GetAuras():FindMy(PurgeTheWickedDebuff):IsUp() and Player:IsWithinCombatDistance(Target, 40) then |
|
|
|
if not Target:GetAuras():FindMy(PurgeTheWickedDebuff):IsUp() and Player:IsWithinCombatDistance(Target, 40) then |
|
|
|
PurgeTheWicked:Cast(Target) |
|
|
|
PurgeTheWicked:Cast(Target) |
|
|
@ -293,4 +326,5 @@ DiscPriestModule:Sync(function() |
|
|
|
end |
|
|
|
end |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Register the DiscPriest module with Bastion |
|
|
|
Bastion:Register(DiscPriestModule) |
|
|
|
Bastion:Register(DiscPriestModule) |
|
|
|