parent
a12424d3b8
commit
a26433aec5
@ -0,0 +1,106 @@ |
|||||||
|
local Tinkr, Bastion = ... |
||||||
|
local ElementalModule = Bastion.Module:New('ElementalShaman') |
||||||
|
local Player = Bastion.UnitManager:Get('player') |
||||||
|
local Target = Bastion.UnitManager:Get('target') |
||||||
|
local SpellBook = Bastion.SpellBook:New() |
||||||
|
|
||||||
|
-- Spells |
||||||
|
local StormElemental = SpellBook:GetSpell(192249) |
||||||
|
local PrimordialWave = SpellBook:GetSpell(375982) |
||||||
|
local Stormkeeper = SpellBook:GetSpell(191634) |
||||||
|
local LavaBurst = SpellBook:GetSpell(51505) |
||||||
|
local EarthShock = SpellBook:GetSpell(8042) |
||||||
|
local LightningBolt = SpellBook:GetSpell(188196) |
||||||
|
local FlameShock = SpellBook:GetSpell(188389) |
||||||
|
local FrostShock = SpellBook:GetSpell(196840) |
||||||
|
local FireElemental = SpellBook:GetSpell(198067) |
||||||
|
local ElementalBlast = SpellBook:GetSpell(117014) |
||||||
|
local Icefury = SpellBook:GetSpell(210714) |
||||||
|
local Ascendance = SpellBook:GetSpell(114050) |
||||||
|
|
||||||
|
-- Buffs |
||||||
|
local MasterOfTheElements = SpellBook:GetSpell(16166) |
||||||
|
local LavaSurge = SpellBook:GetSpell(77762) |
||||||
|
|
||||||
|
-- Create APL |
||||||
|
local DefaultAPL = Bastion.APL:New('default') |
||||||
|
|
||||||
|
-- Default APL |
||||||
|
DefaultAPL:AddSpell( |
||||||
|
StormElemental:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
PrimordialWave:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
Stormkeeper:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
LavaBurst:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and |
||||||
|
(Player:GetPower() <= 90 or Player:GetAuras():FindMy(MasterOfTheElements):IsUp()) |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
EarthShock:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and |
||||||
|
(Player:GetAuras():FindMy(MasterOfTheElements):IsUp() or Player:GetPower() >= 90) |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
ElementalBlast:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and |
||||||
|
(Player:GetAuras():FindMy(MasterOfTheElements):IsUp() or Player:GetPower() >= 90) |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
Icefury:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(Icefury):IsUp() |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
FrostShock:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and |
||||||
|
Player:GetAuras():FindMy(Icefury):IsUp() and |
||||||
|
Player:GetAuras():FindMy(MasterOfTheElements):IsUp() |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
LightningBolt:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
FlameShock:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and |
||||||
|
(Player:IsMoving() or Target:GetAuras():FindMy(FlameShock):GetRemainingTime() < 3) |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
DefaultAPL:AddSpell( |
||||||
|
FrostShock:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:IsMoving() |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
ElementalModule:Sync(function() |
||||||
|
if not Player:IsAffectingCombat() then return end |
||||||
|
DefaultAPL:Execute() |
||||||
|
end) |
||||||
|
|
||||||
|
Bastion:Register(ElementalModule) |
Loading…
Reference in new issue