Handle off GCD spells better, faster, always cast

pull/1/head
4n0n 2 years ago
parent dfa7b56eff
commit 1aa8c67dd4
  1. 12
      scripts/subtlety.lua
  2. 7
      src/Spell/Spell.lua

@ -385,9 +385,7 @@ DefaultAPL:AddSpell(
self:IsKnownAndUsable() and
not Player:IsCastingOrChanneling()
end):SetTarget(Player):OnCast(function()
SpellCancelQueuedSpell()
ShurikenTornado:Cast(Target)
SpellCancelQueuedSpell()
end)
)
@ -410,9 +408,7 @@ DefaultAPL:AddSpell(
Player:GetAuras():FindMy(SliceAndDice):IsUp() and
Target:GetAuras():FindMy(Rupture):IsUp()
end):SetTarget(Player):OnCast(function()
SpellCancelQueuedSpell()
SecretTechnique:Cast(Target)
SpellCancelQueuedSpell()
end)
)
@ -433,9 +429,7 @@ DefaultAPL:AddSpell(
self:IsKnownAndUsable() and Gloomblade:IsKnownAndUsable() and
not Player:IsCastingOrChanneling() and Player:GetComboPoints(Target) <= 2
end):SetTarget(Player):OnCast(function()
SpellCancelQueuedSpell()
Gloomblade:Cast(Target) -- We want to cast gloomblade immediately with shadow dance to trigger 1 stack of danse macabre
SpellCancelQueuedSpell()
end)
)
@ -550,9 +544,7 @@ AOEAPL:AddSpell(
self:IsKnownAndUsable() and
not Player:IsCastingOrChanneling()
end):SetTarget(Player):OnCast(function()
SpellCancelQueuedSpell()
ShurikenTornado:Cast(Target)
SpellCancelQueuedSpell()
end)
)
@ -575,9 +567,7 @@ AOEAPL:AddSpell(
Player:GetAuras():FindMy(SliceAndDice):IsUp() and
Target:GetAuras():FindMy(Rupture):IsUp()
end):SetTarget(Player):OnCast(function()
SpellCancelQueuedSpell()
SecretTechnique:Cast(Target)
SpellCancelQueuedSpell()
end)
)
@ -598,9 +588,7 @@ AOEAPL:AddSpell(
self:IsKnownAndUsable() and Gloomblade:IsKnownAndUsable() and
not Player:IsCastingOrChanneling() and Player:GetComboPoints(Target) <= 2
end):SetTarget(Player):OnCast(function()
SpellCancelQueuedSpell()
Gloomblade:Cast(Target) -- We want to cast gloomblade immediately with shadow dance to trigger 1 stack of danse macabre
SpellCancelQueuedSpell()
end)
)

@ -117,6 +117,7 @@ function Spell:Cast(unit, condition)
-- Cast the spell
CastSpellByName(self:GetName(), u)
SpellCancelQueuedSpell()
Bastion:Debug("Casting", self)
@ -223,15 +224,15 @@ function Spell:IsInRange(unit)
local hasRange = self:HasRange()
local inRange = IsSpellInRange(self:GetName(), unit.unit)
if not hasRange then
if hasRange == false then
return true
end
if hasRange and inRange == 1 then
if inRange == 1 then
return true
end
return false
return Bastion.UnitManager['player']:InMelee(unit)
end
-- Get the last cast time

Loading…
Cancel
Save