From 7fa3b6369223cf16d3c9892ce84035a2ea4a1295 Mon Sep 17 00:00:00 2001 From: syrifgit <139663837+syrifgit@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:45:47 -0400 Subject: [PATCH] More Lightsmith support Needs more work, but adds a lot of support. Partial fix for #4174 --- TheWarWithin/PaladinHoly.lua | 40 +++++++++++++++++++++++++++--- TheWarWithin/PaladinProtection.lua | 38 +++++++++++----------------- 2 files changed, 51 insertions(+), 27 deletions(-) diff --git a/TheWarWithin/PaladinHoly.lua b/TheWarWithin/PaladinHoly.lua index 26763256b..a4893f12c 100644 --- a/TheWarWithin/PaladinHoly.lua +++ b/TheWarWithin/PaladinHoly.lua @@ -276,6 +276,11 @@ spec:RegisterAuras( { duration = 3600, max_stack = 3 }, + blessed_assurance = { + id = 433019, + duration = 20, + max_stack = 1, + }, blessing_of_autumn = { id = 388010, duration = 30, @@ -455,7 +460,10 @@ spec:RegisterAuras( { infusion_of_light = { id = 54149, duration = 15, - max_stack = 2, + max_stack = function() if talent.inflorescence_of_the_sunwell.enabled then + return 2 end + return 1 + end, copy = 53576 }, liberation = { @@ -628,12 +636,15 @@ spec:RegisterHook( "reset_precast", function() end if talent.holy_armaments.enabled then - if IsActiveSpell( 432472 ) then applyBuff( "sacred_weapon_ready" ) + if IsSpellKnownOrOverridesKnown( 432472 ) then applyBuff( "sacred_weapon_ready" ) else applyBuff( "holy_bulwark_ready" ) end end end ) spec:RegisterHook( "spend", function( amt, resource ) + + if amt == 0 or amt == nil then Hekili:Print("Free spend detected: ", state.this_action, " spending ", amt, " ", resource) end + if amt > 0 and resource == "holy_power" then if talent.tirions_devotion.enabled then reduceCooldown( "lay_on_hands", amt * 1.5 ) @@ -642,6 +653,10 @@ spec:RegisterHook( "spend", function( amt, resource ) if talent.relentless_inquisition.enabled then addStack( "relentless_inquisitor" ) end + + if talent.blessed_assurance.enabled then + applyBuff( "blessed_assurance" ) + end end end ) @@ -1288,7 +1303,11 @@ spec:RegisterAbilities( { texture = 135907, handler = function () - removeBuff( "infusion_of_light" ) + if buff.infusion_of_light.up then + removeStack( "infusion_of_light" ) + if talent.valiance.enabled then reduceCooldown( "holy_armaments", 3 ) end + if talent.imbued_infusions.enabled then reduceCooldown( "holy_shock", 1) end + end removeBuff( "divine_favor" ) if talent.boundless_salvation.enabled and buff.tyrs_deliverance.up then buff.tyrs_deliverance.expires = buff.tyrs_deliverance.expires + 4 @@ -1411,7 +1430,9 @@ spec:RegisterAbilities( { removeBuff( "liberation" ) if buff.infusion_of_light.up then - removeBuff( "infusion_of_light" ) + removeStack( "infusion_of_light" ) + if talent.valiance.enabled then reduceCooldown( "holy_armaments", 3 ) end + if talent.imbued_infusions.enabled then reduceCooldown( "holy_shock", 1) end end if talent.boundless_salvation.enabled and buff.tyrs_deliverance.up then buff.tyrs_deliverance.expires = buff.tyrs_deliverance.expires + 8 @@ -1517,6 +1538,12 @@ spec:RegisterAbilities( { gain( 1, "holy_power" ) HandleAwakening() + if buff.infusion_of_light.up then + removeStack( "infusion_of_light" ) + if talent.valiance.enabled then reduceCooldown( "holy_armaments", 3 ) end + if talent.imbued_infusions.enabled then reduceCooldown( "holy_shock", 1) end + end + removeBuff( "liberation" ) if talent.empyrean_legacy.enabled and debuff.empyrean_legacy_icd.down then @@ -1562,6 +1589,7 @@ spec:RegisterAbilities( { texture = 461859, handler = function () + if talent.blessed_assurance.enabled then applyBuff( "blessed_assurance" ) end spend( 0.18 * mana.max, "mana" ) if buff.divine_purpose.down and buff.shining_righteousness_ready.down then addStack( "afterimage_stacks", nil, 3 ) end if buff.dawnlight.up then @@ -1662,7 +1690,10 @@ spec:RegisterAbilities( { texture = 236265, equipped = "shield", + handler = function () + if talent.blessed_assurance.enabled then applyBuff( "blessed_assurance" ) end + if buff.divine_purpose.down and buff.shining_righteousness_ready.down then addStack( "afterimage_stacks", nil, 3 ) end removeBuff( "divine_purpose" ) reduceCooldown( "crusader_strike", 1.5 ) @@ -1757,6 +1788,7 @@ spec:RegisterAbilities( { texture = 133192, handler = function () + if talent.blessed_assurance.enabled then applyBuff( "blessed_assurance" ) end if buff.afterimage_stacks.stack >= 20 then removeStack( "afterimage_stacks", 20 ) end if buff.dawnlight.up then applyBuff( "dawnlight_hot" ) diff --git a/TheWarWithin/PaladinProtection.lua b/TheWarWithin/PaladinProtection.lua index 6b406c241..c263b8115 100644 --- a/TheWarWithin/PaladinProtection.lua +++ b/TheWarWithin/PaladinProtection.lua @@ -774,8 +774,8 @@ spec:RegisterAuras( { -- Azerite Powers empyreal_ward = { - id = 387792, - duration = 8, + id = 287731, + duration = 60, max_stack = 1, }, @@ -915,7 +915,7 @@ spec:RegisterHook( "reset_precast", function () end if talent.holy_armaments.enabled then - if IsActiveSpell( 432472 ) then applyBuff( "sacred_weapon_ready" ) + if IsSpellKnownOrOverridesKnown( 432472 ) then applyBuff( "sacred_weapon_ready" ) else applyBuff( "holy_bulwark_ready" ) end end @@ -1054,10 +1054,6 @@ spec:RegisterAbilities( { talent = "avengers_shield", startsCombat = true, - max_targets = function() if talent.soaring_shield.enabled then - return 5 end - return 3 - end, handler = function () applyDebuff( "target", "avengers_shield" ) @@ -1070,7 +1066,7 @@ spec:RegisterAbilities( { if talent.crusaders_resolve.enabled then applyDebuff( "target", "crusaders_resolve" ) end if talent.first_avenger.enabled then applyBuff( "first_avenger" ) end if talent.gift_of_the_golden_valkyr.enabled then - reduceCooldown( "guardian_of_ancient_kings", 1 * talent.gift_of_the_golden_valkyr.rank * min( active_enemies, action.avengers_shield.max_targets )) + reduceCooldown( "guardian_of_ancient_kings", 0.5 * talent.gift_of_the_golden_valkyr.rank * min( active_enemies, 3 + ( talent.soaring_shield.enabled and 2 or 0 ) ) ) end if talent.refining_fire.enabled then applyDebuff( "target", "refining_fire" ) end if talent.strength_in_adversity.enabled then addStack( "strength_in_adversity", nil, min( active_enemies, 3 + ( talent.soaring_shield.enabled and 2 or 0 ) ) ) end @@ -1444,7 +1440,7 @@ spec:RegisterAbilities( { -- Talent: Empowers you with the spirit of ancient kings, reducing all damage you take by 50% for 8 sec. guardian_of_ancient_kings = { - id = function () return IsSpellKnownOrOverridesKnown( 228049 ) and 228049 or 86659 end, + id = function () return IsSpellKnownOrOverridesKnown( 212641 ) and 212641 or 86659 end, cast = 0, cooldown = function () return 300 - ( conduit.royal_decree.mod * 0.001 ) end, gcd = "off", @@ -1460,7 +1456,7 @@ spec:RegisterAbilities( { if conduit.royal_decree.enabled then applyBuff( "royal_decree" ) end end, - copy = { 86659, 212641, 228049 } + copy = { 86659, 212641 } }, -- Empowers the friendly target with the spirit of the forgotten queen, causing the target to be immune to all damage for 10 sec. @@ -1614,9 +1610,9 @@ spec:RegisterAbilities( { id = function() return buff.holy_bulwark_ready.up and 432459 or 432472 end, known = 432459, cast = 0.0, - cooldown = 60, + cooldown = function() return 60 * ( 0.8 * talent.forewarning.rank ) end, charges = 2, - recharge = 60, + recharge = function() return 60 * ( 0.8 * talent.forewarning.rank ) end, gcd = "spell", startsCombat = false, @@ -1670,10 +1666,7 @@ spec:RegisterAbilities( { -- Talent: Heals a friendly target for an amount equal to 100% your maximum health. Cannot be used on a target with Forbearance. Causes Forbearance for 30 sec. lay_on_hands = { - id = function() if talent.empyreal_ward.enabled then - return 633 end - return 471195 - end, + id = 633, cast = 0, cooldown = function () return 600 * ( talent.unbreakable_spirit.enabled and 0.7 or 1 ) * ( 1 - 0.3 * talent.uthers_counsel.rank ) end, gcd = "off", @@ -1687,9 +1680,8 @@ spec:RegisterAbilities( { handler = function () gain( health.max, "health" ) - if talent.tirions_devotion.enabled then gain( 0.05 * mana.max, "mana" ) end - -- applyDebuff( "", "forbearance" ) - if talent.empyreal_ward.enabled then applyBuff( "empyrael_ward" ) end + applyDebuff( "player", "forbearance" ) + if azerite.empyreal_ward.enabled then applyBuff( "empyrael_ward" ) end end, }, @@ -1778,16 +1770,16 @@ spec:RegisterAbilities( { if talent.faiths_armor.enabled then applyBuff( "faiths_armor" ) end if talent.redoubt.enabled then addStack( "redoubt", nil, 3 ) end - - if buff.shining_light_full.up then removeBuff( "shining_light_full" ) - elseif talent.shining_light.enabled then + if talent.shining_light.enabled then addStack( "shining_light", nil, 1 ) if buff.shining_light.stack == 3 then - applyBuff( "shining_light_full" ) + addStack( "shining_light_full" ) removeBuff( "shining_light" ) end end + + applyBuff( "shield_of_the_righteous", buff.shield_of_the_righteous.remains + 4.5 ) last_shield = query_time end,