From dd09c31dfbe1676f573ab00e1c619a3ac91c7be5 Mon Sep 17 00:00:00 2001 From: Emlembow <36314674+Emlembow@users.noreply.github.com> Date: Wed, 28 Aug 2024 22:19:29 -0700 Subject: [PATCH] Auto-commit: changes committed --- .DS_Store | Bin 0 -> 6148 bytes DiscPriest.lua | 44 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0= 70 and unit:GetHP() <= 90 then + target = unit + return true + end elseif atonementBuff:GetRemainingTime() < lowestAtonementTime then target = unit lowestAtonementTime = atonementBuff:GetRemainingTime() @@ -264,27 +266,58 @@ DiscPriestModule:Sync(function() return end + -- Prioritize Defensive APL DefensiveAPL:Execute() if Player:IsAffectingCombat() then + -- Prioritize cooldowns if necessary 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() DpsAPL:Execute() + else -- Out of combat healing and preparation 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 + elseif AtoneTarget:GetHP() <= 90 and not AtoneTarget:GetAuras():FindMy(Renew):IsUp() then Renew:Cast(AtoneTarget) - elseif AtoneTarget:GetHP() < 80 then + elseif AtoneTarget:GetHP() <= 80 then FlashHeal:Cast(AtoneTarget) elseif AtoneTarget:GetAuras():FindMy(Atonement):IsUp() and Penance:IsKnownAndUsable() then Penance:Cast(AtoneTarget) 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 not Target:GetAuras():FindMy(PurgeTheWickedDebuff):IsUp() and Player:IsWithinCombatDistance(Target, 40) then PurgeTheWicked:Cast(Target) @@ -293,4 +326,5 @@ DiscPriestModule:Sync(function() end end) +-- Register the DiscPriest module with Bastion Bastion:Register(DiscPriestModule)