Skip to content

Commit

Permalink
More Lightsmith support
Browse files Browse the repository at this point in the history
Needs more work, but adds a lot of support. Partial fix for Hekili#4174
  • Loading branch information
syrifgit committed Nov 26, 2024
1 parent c9fe486 commit 7fa3b63
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 27 deletions.
40 changes: 36 additions & 4 deletions TheWarWithin/PaladinHoly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 )
Expand All @@ -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 )

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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" )
Expand Down
38 changes: 15 additions & 23 deletions TheWarWithin/PaladinProtection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ spec:RegisterAuras( {

-- Azerite Powers
empyreal_ward = {
id = 387792,
duration = 8,
id = 287731,
duration = 60,
max_stack = 1,
},

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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" )
Expand All @@ -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
Expand Down Expand Up @@ -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",
Expand All @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -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,
},

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7fa3b63

Please sign in to comment.