Auto-commit: changes committed

main
Emlembow 5 months ago
parent 78c817cfb8
commit 6408b3a222
  1. 168
      FrostDK.lua
  2. 126
      Outlaw.lua
  3. 147
      ProtWarrior.lua

@ -0,0 +1,168 @@
local Tinkr, Bastion = ...
local FrostDKModule = Bastion.Module:New('FrostDK')
local Player = Bastion.UnitManager:Get('player')
local Target = Bastion.UnitManager:Get('target')
local SpellBook = Bastion.SpellBook:New()
-- Spells
local FrostStrike = SpellBook:GetSpell(49143)
local Obliterate = SpellBook:GetSpell(49020)
local RemorselessWinter = SpellBook:GetSpell(196770)
local HowlingBlast = SpellBook:GetSpell(49184)
local SoulReaper = SpellBook:GetSpell(343294)
local GlacialAdvance = SpellBook:GetSpell(194913)
local DeathAndDecay = SpellBook:GetSpell(43265)
local FrostwyrmsFury = SpellBook:GetSpell(279302)
local PillarOfFrost = SpellBook:GetSpell(51271)
-- Buffs
local IcyTalons = SpellBook:GetSpell(194879)
local UnleashedFrenzy = SpellBook:GetSpell(338501)
local KillingMachine = SpellBook:GetSpell(51124)
local Rime = SpellBook:GetSpell(59052)
local RuneOfRazorice = SpellBook:GetSpell(326911)
local ShatteredFrost = SpellBook:GetSpell(385727)
-- Debuffs
local FrostFever = SpellBook:GetSpell(55095)
-- Create APLs
local SingleTargetAPL = Bastion.APL:New('single_target')
local MultiTargetAPL = Bastion.APL:New('multi_target')
local CooldownAPL = Bastion.APL:New('cooldown')
-- Single Target APL
SingleTargetAPL:AddSpell(
FrostStrike:CastableIf(function(self)
local icyTalons = Player:GetAuras():FindMy(IcyTalons)
local unleashedFrenzy = Player:GetAuras():FindMy(UnleashedFrenzy)
return self:IsKnownAndUsable() and (icyTalons:GetCount() < 3 or unleashedFrenzy:GetCount() < 3 or
(Player:GetAuras():FindMy(RuneOfRazorice):IsUp() and Player:GetAuras():FindMy(ShatteredFrost):IsUp()))
end):SetTarget(Target)
)
SingleTargetAPL:AddSpell(
Obliterate:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(KillingMachine):GetCount() == 2
end):SetTarget(Target)
)
SingleTargetAPL:AddSpell(
RemorselessWinter:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Player)
)
SingleTargetAPL:AddSpell(
HowlingBlast:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(Rime):IsUp()
end):SetTarget(Target)
)
SingleTargetAPL:AddSpell(
Obliterate:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(KillingMachine):IsUp()
end):SetTarget(Target)
)
SingleTargetAPL:AddSpell(
SoulReaper:CastableIf(function(self)
return self:IsKnownAndUsable() and Target:GetHP() < 35
end):SetTarget(Target)
)
SingleTargetAPL:AddSpell(
FrostStrike:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetPower() >= 70
end):SetTarget(Target)
)
SingleTargetAPL:AddSpell(
Obliterate:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Target)
)
SingleTargetAPL:AddSpell(
FrostStrike:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Target)
)
-- Multi Target APL
MultiTargetAPL:AddSpell(
GlacialAdvance:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Target)
)
MultiTargetAPL:AddSpell(
RemorselessWinter:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Player)
)
MultiTargetAPL:AddSpell(
DeathAndDecay:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Player)
)
MultiTargetAPL:AddSpell(
Obliterate:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(KillingMachine):IsUp()
end):SetTarget(Target)
)
MultiTargetAPL:AddSpell(
FrostStrike:CastableIf(function(self)
local unleashedFrenzy = Player:GetAuras():FindMy(UnleashedFrenzy)
return self:IsKnownAndUsable() and (unleashedFrenzy:GetRemainingTime() < 3 or
(Player:GetAuras():FindMy(RuneOfRazorice):GetCount() == 5 and Player:GetAuras():FindMy(ShatteredFrost):IsUp()))
end):SetTarget(Target)
)
MultiTargetAPL:AddSpell(
HowlingBlast:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(Rime):IsUp()
end):SetTarget(Target)
)
MultiTargetAPL:AddSpell(
Obliterate:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Target)
)
MultiTargetAPL:AddSpell(
FrostStrike:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Target)
)
-- Cooldown APL
CooldownAPL:AddSpell(
PillarOfFrost:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Player)
)
CooldownAPL:AddSpell(
FrostwyrmsFury:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(PillarOfFrost):IsUp()
end):SetTarget(Target)
)
FrostDKModule:Sync(function()
if not Player:IsAffectingCombat() then return end
CooldownAPL:Execute()
if Player:GetEnemies(8) > 2 then
MultiTargetAPL:Execute()
else
SingleTargetAPL:Execute()
end
end)
Bastion:Register(FrostDKModule)

@ -0,0 +1,126 @@
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)

@ -0,0 +1,147 @@
local Tinkr, Bastion = ...
local ProtWarriorModule = Bastion.Module:New('ProtWarrior')
local Player = Bastion.UnitManager:Get('player')
local Target = Bastion.UnitManager:Get('target')
local SpellBook = Bastion.SpellBook:New()
-- Power type for Rage
local RAGE_POWER_TYPE = 1
-- Spells
local ShieldSlam = SpellBook:GetSpell(23922)
local ThunderClap = SpellBook:GetSpell(6343)
local Revenge = SpellBook:GetSpell(6572)
local IgnorePain = SpellBook:GetSpell(190456)
local ShieldBlock = SpellBook:GetSpell(2565)
local DemoralizingShout = SpellBook:GetSpell(1160)
local Avatar = SpellBook:GetSpell(401150)
local Ravager = SpellBook:GetSpell(228920)
local ShieldCharge = SpellBook:GetSpell(385952)
local HeroicThrow = SpellBook:GetSpell(57755)
local Taunt = SpellBook:GetSpell(355)
local Shockwave = SpellBook:GetSpell(46968)
local BattleShout = SpellBook:GetSpell(6673)
-- Buffs
local ShieldBlockBuff = SpellBook:GetSpell(132404)
local AvatarBuff = SpellBook:GetSpell(401150)
local BattleShoutBuff = SpellBook:GetSpell(6673)
-- 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(
BattleShout:CastableIf(function(self)
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(BattleShoutBuff):IsUp()
end):SetTarget(Player)
)
UtilityAPL:AddSpell(
HeroicThrow:CastableIf(function(self)
return self:IsKnownAndUsable() and Target:Exists() and not Player:InMelee(Target)
end):SetTarget(Target)
)
-- Cooldown APL
CooldownAPL:AddSpell(
Avatar:CastableIf(function(self)
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(AvatarBuff):IsUp() and Player:GetEnemies(8) > 2
end):SetTarget(Player)
)
CooldownAPL:AddSpell(
Ravager:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetEnemies(8) > 2
end):SetTarget(Player)
)
CooldownAPL:AddSpell(
DemoralizingShout:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetEnemies(8) > 2
end):SetTarget(Player)
)
-- Defensive APL
DefensiveAPL:AddSpell(
ShieldBlock:CastableIf(function(self)
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(ShieldBlockBuff):IsUp() and Player:GetPower(RAGE_POWER_TYPE) >= 30
end):SetTarget(Player)
)
DefensiveAPL:AddSpell(
IgnorePain:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetPower(RAGE_POWER_TYPE) >= 40 and Player:GetHP() <= 80
end):SetTarget(Player)
)
-- Default APL
DefaultAPL:AddSpell(
ShieldCharge:CastableIf(function(self)
return self:IsKnownAndUsable() and Target:Exists() and Player:GetDistance(Target) <= 25
end):SetTarget(Target)
)
DefaultAPL:AddSpell(
ShieldSlam:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Target)
)
DefaultAPL:AddSpell(
ThunderClap:CastableIf(function(self)
return self:IsKnownAndUsable()
end):SetTarget(Target)
)
DefaultAPL:AddSpell(
Revenge:CastableIf(function(self)
return self:IsKnownAndUsable() and Player:GetPower(RAGE_POWER_TYPE) >= 20
end):SetTarget(Target)
)
-- Interrupt APL
local InterruptAPL = Bastion.APL:New('interrupt')
InterruptAPL:AddSpell(
Shockwave:CastableIf(function(self)
return self:IsKnownAndUsable() and Target:IsCasting() and not Target:IsInterruptible() and Player:InMelee(Target)
end):SetTarget(Target)
)
InterruptAPL:AddSpell(
Taunt:CastableIf(function(self)
return self:IsKnownAndUsable() and not Player:IsTanking(Target) and Target:Exists()
end):SetTarget(Target)
)
-- Rage Management
local function ManageRage()
if Player:GetPower(RAGE_POWER_TYPE) >= 80 then
if not Player:GetAuras():FindMy(ShieldBlockBuff):IsUp() then
ShieldBlock:Cast(Player)
elseif Player:GetHP() <= 90 then
IgnorePain:Cast(Player)
else
Revenge:Cast(Target)
end
end
end
ProtWarriorModule:Sync(function()
if not Player:IsAffectingCombat() then
UtilityAPL:Execute()
return
end
ManageRage()
InterruptAPL:Execute()
DefensiveAPL:Execute()
CooldownAPL:Execute()
DefaultAPL:Execute()
end)
Bastion:Register(ProtWarriorModule)
Loading…
Cancel
Save