Skip to content

Commit b986f25

Browse files
committed
Update PriestShadow.lua
1 parent f6f8fb8 commit b986f25

1 file changed

Lines changed: 44 additions & 13 deletions

File tree

TheWarWithin/PriestShadow.lua

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ spec:RegisterAuras( {
603603
max_stack = 1
604604
},
605605
power_surge = {
606+
id = 453113,
606607
duration = 10,
607608
tick_time = 5,
608609
max_stack = 1
@@ -738,6 +739,11 @@ spec:RegisterAuras( {
738739
duration = 3600,
739740
max_stack = 1
740741
},
742+
sustained_potency = {
743+
id = 454002,
744+
duration = 60,
745+
max_stack = 6
746+
},
741747
-- Taking Shadow damage every $t1 sec.
742748
-- https://wowhead.com/beta/spell=363656
743749
torment_mind = {
@@ -985,6 +991,10 @@ spec:RegisterStateExpr( "tww3_archon_4pc_helper_stacks", function()
985991
return PowerSurgeDPs
986992
end )
987993

994+
spec:RegisterStateExpr( "tww3_archon_halo_extensions", function()
995+
return floor( PowerSurgeDPs / 2 )
996+
end )
997+
988998
spec:RegisterStateTable( "priest", setmetatable( {},{
989999
__index = function( t, k )
9901000
if k == "self_power_infusion" then return true
@@ -1017,7 +1027,7 @@ spec:RegisterGear( {
10171027
tww3_archon_4pc_helper = {
10181028
-- id = 999999, -- dummy ID
10191029
duration = spec.auras.power_surge.duration,
1020-
max_stack = 6, -- 3 extensions max * 2 casts per extension
1030+
max_stack = 4, -- 3 extensions max * 2 casts per extension
10211031
generate = function( t )
10221032
if tww3_archon_4pc_helper_stacks > 0 and state.buff.power_surge.up then
10231033
local power_surge_expiry = state.buff.power_surge.expires
@@ -1166,12 +1176,15 @@ spec:RegisterHook( "reset_precast", function ()
11661176

11671177
rift_extensions = nil
11681178

1169-
if talent.power_surge.enabled and query_time - action.halo.lastCast < 10 then
1170-
applyBuff( "power_surge", ( 10 + 5 * floor( tww3_archon_4pc_helper_stacks / 2 ) ) - ( query_time - action.halo.lastCast ) )
1171-
if buff.power_surge.remains > 5 then
1172-
state:QueueAuraEvent( "power_surge", PowerSurge, buff.power_surge.expires - 5, "TICK" )
1179+
if buff.power_surge.up then
1180+
local tick, expires = buff.power_surge.applied, buff.power_surge.expires
1181+
local final_tick = ( 2 + tww3_archon_halo_extensions )
1182+
for i = 1, final_tick do
1183+
tick = tick + 5
1184+
if tick > query_time and tick <= expires then
1185+
state:QueueAuraEvent( "create_additional_halo", PowerSurge, tick, "AURA_TICK" )
1186+
end
11731187
end
1174-
state:QueueAuraExpiration( "power_surge", PowerSurge, buff.power_surge.expires )
11751188
end
11761189

11771190
local vwRemains = cooldown.voidwraith.true_remains
@@ -1218,10 +1231,10 @@ local InescapableTorment = setfenv( function ()
12181231
end, state )
12191232

12201233
local TWW3ArchonTrigger = setfenv( function()
1221-
if tww3_archon_4pc_helper_stacks >= 6 then
1234+
if tww3_archon_4pc_helper_stacks >= 4 then
12221235
return
12231236
else
1224-
tww3_archon_4pc_helper_stacks = min( 6, tww3_archon_4pc_helper_stacks + 1 )
1237+
tww3_archon_4pc_helper_stacks = min( 4, tww3_archon_4pc_helper_stacks + 1 )
12251238
if tww3_archon_4pc_helper_stacks % 2 == 0 then
12261239
buff.power_surge.expires = buff.power_surge.expires + 5
12271240
end
@@ -1480,7 +1493,7 @@ spec:RegisterAbilities( {
14801493
halo = {
14811494
id = 120644,
14821495
cast = 1.5,
1483-
cooldown = 40,
1496+
cooldown = 60,
14841497
gcd = "spell",
14851498
school = "shadow",
14861499

@@ -1492,7 +1505,25 @@ spec:RegisterAbilities( {
14921505

14931506
handler = function ()
14941507
gain( 10, "insanity" )
1495-
if talent.power_surge.enabled then applyBuff( "power_surge" ) end
1508+
if talent.power_surge.enabled then
1509+
if buff.power_surge.down then
1510+
-- Don't repeatedly run these during "additional Halos", only run during initial cast
1511+
applyBuff( "power_surge", nil, 10 )
1512+
for i = 5, 10, 5 do
1513+
-- Queue the additional Halos, one every 5 seconds until expiry
1514+
-- Further halos beyond base duration from TWW3 set will be added during reset_precast
1515+
state:QueueAuraEvent( "create_additional_halo", PowerSurge, query_time + i, "AURA_TICK" )
1516+
end
1517+
end
1518+
if talent.manifested_power.enabled then addStack( "mind_flay_insanity" ) end
1519+
if talent.sustained_potency.enabled then
1520+
if buff.voidform.up then
1521+
buff.voidform.expires = buff.voidform.expires + 1
1522+
else
1523+
addStack( "sustained_potency" )
1524+
end
1525+
end
1526+
end
14961527
end,
14971528
},
14981529

@@ -2158,9 +2189,9 @@ spec:RegisterAbilities( {
21582189
end
21592190
end,
21602191

2161-
readyTime = function()
2192+
readyTime = function()
21622193
local holdCount = settings.hold_crash
2163-
if holdCount > 0 and active_enemies < holdCount then return action.shadow_crash.full_recharge_time end
2194+
if holdCount > 0 and active_enemies < holdCount then return action.shadow_crash.full_recharge_time end
21642195
end,
21652196

21662197
copy = { 205385, 457042 }
@@ -2400,7 +2431,7 @@ spec:RegisterAbilities( {
24002431
spend( spec.abilities.void_bolt.spend, spec.abilities.void_bolt.spendType )
24012432
applyBuff( "power_infusion", buff.power_infusion.remains + 5 )
24022433
end
2403-
applyBuff( "voidform" )
2434+
applyBuff( "voidform", nil, ( 20 + ( buff.sustained_potency.stack ) ) )
24042435
if talent.ancient_madness.enabled then applyBuff( "ancient_madness", nil, 20 ) end
24052436
end,
24062437
},

0 commit comments

Comments
 (0)