Basic rotations that work
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OkRotations/Outlaw.lua

126 lines
3.8 KiB

local Tinkr, Bastion = ...
local OutlawModule = Bastion.Module:New('OutlawRogue')
local Player = Bastion.UnitManager:Get('player')
local Target = Bastion.UnitManager:Get('target')
local SpellBook = Bastion.SpellBook:New()
-- Spells
local BladeFlurry = SpellBook:GetSpell(13877)
local BetweenTheEyes = SpellBook:GetSpell(315341)
local SliceAndDice = SpellBook:GetSpell(315496)
local RollTheBones = SpellBook:GetSpell(315508)
local Dispatch = SpellBook:GetSpell(2098)
local PistolShot = SpellBook:GetSpell(185763)
local SinisterStrike = SpellBook:GetSpell(193315)
local Gouge = SpellBook:GetSpell(1776)
local KidneyShot = SpellBook:GetSpell(408)
local Blind = SpellBook:GetSpell(2094)
local TricksOfTheTrade = SpellBook:GetSpell(57934)
-- Buffs
local SliceAndDiceBuff = SpellBook:GetSpell(315496)
local BladeFlurryBuff = SpellBook:GetSpell(13877)
local OpportunityBuff = SpellBook:GetSpell(195627)
-- Create APLs
local DefaultAPL = Bastion.APL:New('default')
local CooldownAPL = Bastion.APL:New('cooldown')
local DefensiveAPL = Bastion.APL:New('defensive')
local UtilityAPL = Bastion.APL:New('utility')
-- Utility APL
UtilityAPL:AddSpell(
TricksOfTheTrade:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:IsTanking(Target)
end):SetTarget(Bastion.UnitManager:Get('tank'))
)
-- Cooldown APL
CooldownAPL:AddSpell(
BladeFlurry:CastableIf(function(self)
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(BladeFlurryBuff):IsUp() and Player:GetEnemies(8) > 1
end):SetTarget(Player)
)
CooldownAPL:AddSpell(
RollTheBones:CastableIf(function(self)
return self:IsKnownAndUsable() and GetRTBBuffCount() < 2
end):SetTarget(Player)
)
-- Default APL
DefaultAPL:AddSpell(
SliceAndDice:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(SliceAndDiceBuff):GetRemainingTime() < 3 and Player:GetComboPoints() >= 5
end):SetTarget(Player)
)
DefaultAPL:AddSpell(
BetweenTheEyes:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetComboPoints() >= 5
end):SetTarget(Target)
)
DefaultAPL:AddSpell(
Dispatch:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetComboPoints() >= 5
end):SetTarget(Target)
)
DefaultAPL:AddSpell(
PistolShot:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(OpportunityBuff):IsUp()
end):SetTarget(Target)
)
DefaultAPL:AddSpell(
SinisterStrike:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Target)
)
-- Interrupt/CC APL
local InterruptAPL = Bastion.APL:New('interrupt')
InterruptAPL:AddSpell(
Gouge:CastableIf(function(self)
return self:IsKnownAndUsable() and Target:IsCasting() and not Target:IsInterruptible() and Player:IsFacing(Target)
end):SetTarget(Target)
)
InterruptAPL:AddSpell(
KidneyShot:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetComboPoints() >= 5 and Target:IsCasting()
end):SetTarget(Target)
)
InterruptAPL:AddSpell(
Blind:CastableIf(function(self)
return self:IsKnownAndUsable() and Target:IsCasting() and not Target:IsInterruptible()
end):SetTarget(Target)
)
-- Helper function to count Roll the Bones buffs
function GetRTBBuffCount()
local count = 0
local rtbBuffs = {193356, 193357, 193358, 193359, 199600, 199603}
for _, buffId in ipairs(rtbBuffs) do
if Player:GetAuras():FindMy(SpellBook:GetSpell(buffId)):IsUp() then
count = count + 1
end
end
return count
end
OutlawModule:Sync(function()
if not Player:IsAffectingCombat() then
UtilityAPL:Execute()
return
end
InterruptAPL:Execute()
CooldownAPL:Execute()
DefaultAPL:Execute()
end)
Bastion:Register(OutlawModule)