Skip to content

Commit

Permalink
Subtlety: Add Rupture Duration option.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hekili committed Jan 22, 2024
1 parent c7530c5 commit 464bdd3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Dragonflight/RogueAssassination.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2359,7 +2359,11 @@ spec:RegisterAbilities( {
aura = "rupture",
cycle = "rupture",

usable = function () return combo_points.current > 0, "requires combo_points" end,
usable = function ()
if combo_points.current == 0 then return false, "requires combo_points" end
if ( settings.rupture_duration or 0 ) > 0 and target.time_to_die < ( settings.rupture_duration or 0 ) then return false, "target will die within " .. ( settings.rupture_duration or 0 ) .. " seconds" end
return true
end,

used_for_danse = function()
if not state.spec.subtlety or not talent.danse_macabre.enabled or buff.shadow_dance.down then return false end
Expand Down
17 changes: 15 additions & 2 deletions Dragonflight/RogueSubtlety.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ local Hekili = _G[ addon ]
local class, state = Hekili.Class, Hekili.State

local insert, wipe = table.insert, table.wipe
local strformat = string.format

local spec = Hekili:NewSpecialization( 261 )

Expand Down Expand Up @@ -655,7 +656,7 @@ spec:RegisterHook( "reset_precast", function( amt, resource )
end

if buff.shuriken_tornado.up then
local moment = buff.shuriken_tornado.expires
local moment = buff.shuriken_tornado.expires - 0.02
while( moment > query_time ) do
state:QueueAuraEvent( "shuriken_tornado", class.abilities.shuriken_storm.handler, moment, "AURA_PERIODIC" )
moment = moment - 1
Expand Down Expand Up @@ -1260,7 +1261,7 @@ spec:RegisterAbilities( {
handler = function ()
applyBuff( "shuriken_tornado" )

local moment = buff.shuriken_tornado.expires
local moment = buff.shuriken_tornado.expires - 0.02
while( moment > query_time ) do
state:QueueAuraEvent( "shuriken_tornado", class.abilities.shuriken_storm.handler, moment, "AURA_PERIODIC" )
moment = moment - 1
Expand Down Expand Up @@ -1364,6 +1365,18 @@ spec:RegisterStateExpr( "priority_rotation", function ()
return prio
end )

spec:RegisterSetting( "rupture_duration", 12, {
name = strformat( "%s Duration", Hekili:GetSpellLinkWithTexture( 1943 ) ),
desc = strformat( "If set above 0, %s will not be recommended if the target will die within the timeframe specified.\n\n"
.. "Popular guides suggest using that a target should live at least 12 seconds for %s to be worth using.\n\n",
Hekili:GetSpellLinkWithTexture( 1943 ), class.specs[ 259 ].abilities.rupture.name ),
type = "range",
min = 0,
max = 18,
step = 0.1,
width = "full",
} )

spec:RegisterSetting( "solo_vanish", true, {
name = "Allow |T132331:0|t Vanish when Solo",
desc = "If unchecked, the addon will not recommend |T132331:0|t Vanish when you are alone (to avoid resetting combat).",
Expand Down

0 comments on commit 464bdd3

Please sign in to comment.