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.
154 lines
4.2 KiB
154 lines
4.2 KiB
local Tinkr, Bastion = ...
|
|
local FrostMageModule = Bastion.Module:New('FrostMage')
|
|
local Player = Bastion.UnitManager:Get('player')
|
|
local Target = Bastion.UnitManager:Get('target')
|
|
local SpellBook = Bastion.SpellBook:New()
|
|
|
|
-- Spells
|
|
local Frostbolt = SpellBook:GetSpell(116)
|
|
local Flurry = SpellBook:GetSpell(44614)
|
|
local IceLance = SpellBook:GetSpell(30455)
|
|
local CometStorm = SpellBook:GetSpell(153595)
|
|
local GlacialSpike = SpellBook:GetSpell(199786)
|
|
local FrozenOrb = SpellBook:GetSpell(84714)
|
|
local ShiftingPower = SpellBook:GetSpell(382440)
|
|
local IcyVeins = SpellBook:GetSpell(12472)
|
|
local Blizzard = SpellBook:GetSpell(190356)
|
|
local IceNova = SpellBook:GetSpell(157997)
|
|
local ArcaneExplosion = SpellBook:GetSpell(1449)
|
|
|
|
-- Buffs
|
|
local FingersOfFrost = SpellBook:GetSpell(112965)
|
|
local BrainFreeze = SpellBook:GetSpell(190446)
|
|
local WintersChill = SpellBook:GetSpell(228358)
|
|
local DeathsChill = SpellBook:GetSpell(305393)
|
|
|
|
-- Create APLs
|
|
local DefaultAPL = Bastion.APL:New('default')
|
|
local AoEAPL = Bastion.APL:New('aoe')
|
|
local CooldownAPL = Bastion.APL:New('cooldown')
|
|
|
|
-- Cooldown APL
|
|
CooldownAPL:AddSpell(
|
|
IcyVeins:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Player)
|
|
)
|
|
|
|
-- Default (Single Target) APL
|
|
DefaultAPL:AddSpell(
|
|
CometStorm:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and Target:GetAuras():FindMy(WintersChill):IsUp()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Flurry:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and (Player:GetAuras():FindMy(BrainFreeze):IsUp() or Player:GetComboPoints() == 4)
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
GlacialSpike:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and (Target:GetAuras():FindMy(WintersChill):IsUp() or Player:GetComboPoints() == 5)
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
FrozenOrb:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
ShiftingPower:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and CometStorm:GetCooldownRemaining() > 10 and FrozenOrb:GetCooldownRemaining() > 10
|
|
end):SetTarget(Player)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
IceLance:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and (Target:GetAuras():FindMy(WintersChill):IsUp() or Player:GetAuras():FindMy(FingersOfFrost):IsUp())
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Frostbolt:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
-- AoE APL
|
|
AoEAPL:AddSpell(
|
|
FrozenOrb:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
Blizzard:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
CometStorm:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(DeathsChill):GetCount() >= 12
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
IceNova:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and GlacialSpike:GetTimeSinceLastCast() < 1.5
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
ShiftingPower:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Player)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
GlacialSpike:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
Flurry:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
IceLance:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(FingersOfFrost):IsUp()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
ArcaneExplosion:CastableIf(function(self)
|
|
return self:IsKnownAndUsable() and Player:GetEnemies(10) >= 7 and Player:GetPP() > 30
|
|
end):SetTarget(Player)
|
|
)
|
|
|
|
AoEAPL:AddSpell(
|
|
Frostbolt:CastableIf(function(self)
|
|
return self:IsKnownAndUsable()
|
|
end):SetTarget(Target)
|
|
)
|
|
|
|
FrostMageModule:Sync(function()
|
|
if not Player:IsAffectingCombat() then return end
|
|
|
|
CooldownAPL:Execute()
|
|
|
|
if Player:GetEnemies(10) > 2 then
|
|
AoEAPL:Execute()
|
|
else
|
|
DefaultAPL:Execute()
|
|
end
|
|
end)
|
|
|
|
Bastion:Register(FrostMageModule) |