parent
7939b9fe03
commit
be415a57cf
@ -0,0 +1,184 @@ |
|||||||
|
local Tinkr, Bastion = ... |
||||||
|
|
||||||
|
local VengeanceModule = Bastion.Module:New('VengeanceDH') |
||||||
|
local Player = Bastion.UnitManager:Get('player') |
||||||
|
local Target = Bastion.UnitManager:Get('target') |
||||||
|
local SpellBook = Bastion.SpellBook:New() |
||||||
|
|
||||||
|
-- Spells |
||||||
|
local SoulCleave = SpellBook:GetSpell(228477) |
||||||
|
local Fracture = SpellBook:GetSpell(263642) |
||||||
|
local SpiritBomb = SpellBook:GetSpell(247454) |
||||||
|
local SigilOfFlame = SpellBook:GetSpell(204596) |
||||||
|
local FieryBrand = SpellBook:GetSpell(204021) |
||||||
|
local FelDevastation = SpellBook:GetSpell(212084) |
||||||
|
local InfernalStrike = SpellBook:GetSpell(189110) |
||||||
|
local DemonSpikes = SpellBook:GetSpell(203720) |
||||||
|
local Metamorphosis = SpellBook:GetSpell(187827) |
||||||
|
local ImmolationAura = SpellBook:GetSpell(258920) |
||||||
|
local Felblade = SpellBook:GetSpell(232893) |
||||||
|
local TheHunt = SpellBook:GetSpell(370965) |
||||||
|
local SoulCarver = SpellBook:GetSpell(207407) |
||||||
|
local ElysianDecree = SpellBook:GetSpell(390163) |
||||||
|
local Shear = SpellBook:GetSpell(203782) |
||||||
|
|
||||||
|
-- Buffs and Debuffs |
||||||
|
local MetamorphosisBuff = SpellBook:GetSpell(187827) |
||||||
|
local DemonSpikesBuff = SpellBook:GetSpell(203819) |
||||||
|
local FrailtyDebuff = SpellBook:GetSpell(247456) |
||||||
|
local FieryDemiseBuff = SpellBook:GetSpell(389220) |
||||||
|
|
||||||
|
-- Create APLs |
||||||
|
local SingleTargetAPL = Bastion.APL:New('single_target') |
||||||
|
local AoEAPL = Bastion.APL:New('aoe') |
||||||
|
local DefensiveAPL = Bastion.APL:New('defensive') |
||||||
|
local CooldownAPL = Bastion.APL:New('cooldown') |
||||||
|
|
||||||
|
-- Defensive APL |
||||||
|
DefensiveAPL:AddSpell( |
||||||
|
DemonSpikes:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(DemonSpikesBuff):IsUp() |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
DefensiveAPL:AddSpell( |
||||||
|
Metamorphosis:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetHP() < 50 |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
DefensiveAPL:AddSpell( |
||||||
|
FieryBrand:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetHP() < 70 |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
-- Cooldown APL |
||||||
|
CooldownAPL:AddSpell( |
||||||
|
TheHunt:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetEnemies(30) > 0 |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
CooldownAPL:AddSpell( |
||||||
|
SoulCarver:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(FieryDemiseBuff):IsUp() |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
CooldownAPL:AddSpell( |
||||||
|
ElysianDecree:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetEnemies(8) > 2 |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
-- Single Target APL |
||||||
|
SingleTargetAPL:AddSpell( |
||||||
|
ImmolationAura:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
SingleTargetAPL:AddSpell( |
||||||
|
SigilOfFlame:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
SingleTargetAPL:AddSpell( |
||||||
|
Fracture:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetPower() < 80 |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
SingleTargetAPL:AddSpell( |
||||||
|
SoulCleave:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetPower() >= 30 |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
SingleTargetAPL:AddSpell( |
||||||
|
Felblade:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetPower() < 80 |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
SingleTargetAPL:AddSpell( |
||||||
|
FelDevastation:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(FieryDemiseBuff):IsUp() |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
-- AoE APL |
||||||
|
AoEAPL:AddSpell( |
||||||
|
ImmolationAura:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
AoEAPL:AddSpell( |
||||||
|
SigilOfFlame:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() |
||||||
|
end):SetTarget(Player) |
||||||
|
) |
||||||
|
|
||||||
|
AoEAPL:AddSpell( |
||||||
|
SpiritBomb:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetComboPoints() >= 4 |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
AoEAPL:AddSpell( |
||||||
|
Fracture:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetComboPoints() < 4 |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
AoEAPL:AddSpell( |
||||||
|
SoulCleave:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetPower() >= 80 |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
AoEAPL:AddSpell( |
||||||
|
FelDevastation:CastableIf(function(self) |
||||||
|
return self:IsKnownAndUsable() and Player:GetAuras():FindMy(FieryDemiseBuff):IsUp() |
||||||
|
end):SetTarget(Target) |
||||||
|
) |
||||||
|
|
||||||
|
-- Helper function to count Soul Fragments |
||||||
|
local function GetSoulFragmentCount() |
||||||
|
-- This is a placeholder. In a real scenario, you'd need to implement |
||||||
|
-- a way to track Soul Fragments, possibly using combat log events. |
||||||
|
return Player:GetComboPoints() |
||||||
|
end |
||||||
|
|
||||||
|
VengeanceModule:Sync(function() |
||||||
|
if not Player:IsAffectingCombat() then return end |
||||||
|
|
||||||
|
DefensiveAPL:Execute() |
||||||
|
CooldownAPL:Execute() |
||||||
|
|
||||||
|
-- Use Infernal Strike if we have 2 charges, but keep 1 in reserve |
||||||
|
if InfernalStrike:GetCharges() == 2 then |
||||||
|
InfernalStrike:Cast(Player) |
||||||
|
end |
||||||
|
|
||||||
|
-- Choose between Single Target and AoE rotation |
||||||
|
if Player:GetEnemies(8) > 2 then |
||||||
|
AoEAPL:Execute() |
||||||
|
else |
||||||
|
SingleTargetAPL:Execute() |
||||||
|
end |
||||||
|
|
||||||
|
-- Frailty mechanic |
||||||
|
if Player:GetAuras():FindMy(FrailtyDebuff):GetStacks() < 3 then |
||||||
|
if Player:GetEnemies(8) > 1 then |
||||||
|
SpiritBomb:Cast(Target) |
||||||
|
else |
||||||
|
SoulCleave:Cast(Target) |
||||||
|
end |
||||||
|
end |
||||||
|
end) |
||||||
|
|
||||||
|
Bastion:Register(VengeanceModule) |
Loading…
Reference in new issue