forked from Bastion/Bastion
parent
bd58c55102
commit
8c691161e4
@ -0,0 +1,726 @@ |
||||
local Tinkr, Bastion = ... |
||||
|
||||
local DiscModule = Bastion.Module:New('disc') |
||||
local Evaluator = Tinkr.Util.Evaluator |
||||
local Player = Bastion.UnitManager:Get('player') |
||||
local None = Bastion.UnitManager:Get('none') |
||||
local Target = Bastion.UnitManager:Get('target') |
||||
|
||||
local myconf = Tinkr.Util.Config:New('disc_priest') |
||||
|
||||
local AngelicFeather = Bastion.SpellBook:GetSpell(121536) |
||||
local DesperatePrayer = Bastion.SpellBook:GetSpell(19236) |
||||
local DispelMagic = Bastion.SpellBook:GetSpell(528) |
||||
local Fade = Bastion.SpellBook:GetSpell(586) |
||||
local FlashHeal = Bastion.SpellBook:GetSpell(2061) |
||||
local LeapofFaith = Bastion.SpellBook:GetSpell(73325) |
||||
local Levitate = Bastion.SpellBook:GetSpell(1706) |
||||
local MassDispel = Bastion.SpellBook:GetSpell(32375) |
||||
local MindBlast = Bastion.SpellBook:GetSpell(8092) |
||||
local MindSoothe = Bastion.SpellBook:GetSpell(453) |
||||
local MindVision = Bastion.SpellBook:GetSpell(2096) |
||||
local PowerInfusion = Bastion.SpellBook:GetSpell(10060) |
||||
local PowerWordFortitude = Bastion.SpellBook:GetSpell(21562) |
||||
local PowerWordLife = Bastion.SpellBook:GetSpell(373481) |
||||
local PowerWordShield = Bastion.SpellBook:GetSpell(17) |
||||
local PsychicScream = Bastion.SpellBook:GetSpell(8122) |
||||
local Renew = Bastion.SpellBook:GetSpell(139) |
||||
local Resurrection = Bastion.SpellBook:GetSpell(2006) |
||||
local ShadowWordDeath = Bastion.SpellBook:GetSpell(32379) |
||||
local Shadowfiend = Bastion.SpellBook:GetSpell(34433) |
||||
local Smite = Bastion.SpellBook:GetSpell(585) |
||||
local VampiricEmbrace = Bastion.SpellBook:GetSpell(15286) |
||||
local VoidTendrils = Bastion.SpellBook:GetSpell(108920) |
||||
local FocusedWill = Bastion.SpellBook:GetSpell(45243) |
||||
local BoonoftheAscended = Bastion.SpellBook:GetSpell(325013) |
||||
|
||||
local Apotheosis = Bastion.SpellBook:GetSpell(392941) |
||||
local DivineStar = Bastion.SpellBook:GetSpell(110744) |
||||
local MassResurrection = Bastion.SpellBook:GetSpell(212036) |
||||
local PainSuppression = Bastion.SpellBook:GetSpell(33206) |
||||
local Penance = Bastion.SpellBook:GetSpell(47540) |
||||
local PowerWordBarrier = Bastion.SpellBook:GetSpell(62618) |
||||
local PowerWordRadiance = Bastion.SpellBook:GetSpell(194509) |
||||
local PurgetheWicked = Bastion.SpellBook:GetSpell(204197) |
||||
local Purify = Bastion.SpellBook:GetSpell(527) |
||||
local Rapture = Bastion.SpellBook:GetSpell(47536) |
||||
local Schism = Bastion.SpellBook:GetSpell(214621) |
||||
local ShadowCovenant = Bastion.SpellBook:GetSpell(314867) |
||||
local Atonement = Bastion.SpellBook:GetSpell(81749) |
||||
local MasteryGrace = Bastion.SpellBook:GetSpell(271534) |
||||
local SinsoftheMany = Bastion.SpellBook:GetSpell(280391) |
||||
local Apotheosis = Bastion.SpellBook:GetSpell(392941) |
||||
local DivineStar = Bastion.SpellBook:GetSpell(110744) |
||||
local MassResurrection = Bastion.SpellBook:GetSpell(212036) |
||||
local Purify = Bastion.SpellBook:GetSpell(527) |
||||
local ShadowWordPain = Bastion.SpellBook:GetSpell(204197) |
||||
local DivineStar = Bastion.SpellBook:GetSpell(110744) |
||||
local ShadowWordPain = Bastion.SpellBook:GetSpell(204197) |
||||
|
||||
local Lowest = Bastion.UnitManager:CreateCustomUnit('lowest', function(unit) |
||||
local lowest = nil |
||||
local lowestHP = math.huge |
||||
|
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
local hp = unit:GetHP() |
||||
if hp < lowestHP then |
||||
lowest = unit |
||||
lowestHP = hp |
||||
end |
||||
end) |
||||
|
||||
if not lowest then |
||||
lowest = Player |
||||
end |
||||
|
||||
return lowest |
||||
end) |
||||
|
||||
local PurgeTarget = Bastion.UnitManager:CreateCustomUnit('purge', function(unit) |
||||
local purge = nil |
||||
|
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if not unit:IsDead() and Player:CanSee(unit) and |
||||
unit:GetAuras():HasAnyStealableAura() then |
||||
purge = unit |
||||
return true |
||||
end |
||||
end) |
||||
|
||||
if purge == nil then |
||||
purge = None |
||||
end |
||||
|
||||
return purge |
||||
end) |
||||
local DispelTarget = Bastion.UnitManager:CreateCustomUnit('dispel', function(unit) |
||||
local lowest = nil |
||||
local lowestHP = math.huge |
||||
|
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if not unit:IsDead() and Player:CanSee(unit) and |
||||
unit:GetAuras():HasAnyDispelableAura(Purify) then |
||||
|
||||
local hp = unit:GetHP() |
||||
if hp < lowestHP then |
||||
lowest = unit |
||||
lowestHP = hp |
||||
end |
||||
end |
||||
end) |
||||
|
||||
if lowest == nil then |
||||
lowest = None |
||||
end |
||||
|
||||
return lowest |
||||
end) |
||||
local Tank = Bastion.UnitManager:CreateCustomUnit('tank', function(unit) |
||||
local tank = nil |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if unit:IsDead() then return false end |
||||
if unit:IsTank() then |
||||
tank = unit |
||||
return true |
||||
end |
||||
return false |
||||
end) |
||||
if tank == nil then |
||||
tank = None |
||||
end |
||||
return tank |
||||
end) |
||||
local Explosive = Bastion.UnitManager:CreateCustomUnit('explosive', function(unit) |
||||
local explosive = nil |
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if Player:InMelee(unit) and unit:GetID() == 120651 and Player:IsFacing(unit) then |
||||
explosive = unit |
||||
return true |
||||
end |
||||
end) |
||||
if explosive == nil then |
||||
explosive = None |
||||
end |
||||
return explosive |
||||
end) |
||||
local RenewUnit = Bastion.UnitManager:CreateCustomUnit('renew', function(unit) |
||||
local lowest = nil |
||||
local lowestHP = math.huge |
||||
|
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if not unit:IsDead() and Player:CanSee(unit) and |
||||
( |
||||
not unit:GetAuras():FindMy(Renew):IsUp() or |
||||
unit:GetAuras():FindMy(Renew):GetRemainingTime() <= 1.6) then |
||||
|
||||
local hp = unit:GetHP() |
||||
if hp < lowestHP then |
||||
lowest = unit |
||||
lowestHP = hp |
||||
end |
||||
end |
||||
|
||||
end) |
||||
|
||||
|
||||
if lowest == nil then |
||||
lowest = Player |
||||
end |
||||
|
||||
return lowest |
||||
end) |
||||
|
||||
local PshieldUnit = Bastion.UnitManager:CreateCustomUnit('pshield', function(unit) |
||||
local lowest = nil |
||||
local lowestHP = math.huge |
||||
|
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if not unit:IsDead() and Player:CanSee(unit) and |
||||
( |
||||
not unit:GetAuras():FindMy(PowerWordShield):IsUp()) then |
||||
|
||||
local hp = unit:GetHP() |
||||
if hp < lowestHP then |
||||
lowest = unit |
||||
lowestHP = hp |
||||
end |
||||
end |
||||
|
||||
end) |
||||
|
||||
|
||||
if lowest == nil then |
||||
lowest = Player |
||||
end |
||||
|
||||
return lowest |
||||
end) |
||||
|
||||
|
||||
|
||||
local DefaultAPL = Bastion.APL:New('default') |
||||
DefaultAPL:AddSpell( |
||||
PowerWordFortitude:CastableIf(function(self) |
||||
return usepwf and self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(PowerWordFortitude):IsUp() and not IsMounted() |
||||
end):SetTarget(Player) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
ShadowCovenant:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Player) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
ShadowWordPain:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Target:GetAuras():FindMy(ShadowWordPain):IsUp() |
||||
end):SetTarget(Target) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
PowerWordShield:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(PowerWordShield):IsUp() and not IsMounted() and Player:GetHealth() < 80 |
||||
end):SetTarget(Player) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
Shadowfiend:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
PowerInfusion:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Player) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
ShadowWordDeath:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Target:GetHealthPercent() <= 20 |
||||
end):SetTarget(Target) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
MindBlast:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
Smite:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
PurgeTheWicked:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Target:GetAuras():PurgeTheWicked() |
||||
end):SetTarget(Target) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
Schism:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
Penance:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
Penance:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Lowest:GetHP() <= 70 |
||||
end):SetTarget(Lowest) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
DispelMagic:CastableIf(function(self) |
||||
return PurgeTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and |
||||
self:IsInRange(PurgeTarget) and PurgeTarget:GetAuras():HasAnyStealableAura() |
||||
end):SetTarget(PurgeTarget) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
Purify:CastableIf(function(self) |
||||
return DispelTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and |
||||
self:IsInRange(DispelTarget) and DispelTarget:GetAuras():HasAnyDispelableAura(Purify) |
||||
end):SetTarget(DispelTarget) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
PainSuppression:CastableIf(function(self) |
||||
return Tank:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
and Player:CanSee(Tank) and Tank:GetHP() <= 30 |
||||
end):SetTarget(Tank) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
FlashHeal:CastableIf(function(self) |
||||
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
and Player:CanSee(Lowest) and Lowest:GetHP() <= 65 |
||||
end):SetTarget(Lowest) |
||||
) |
||||
|
||||
DefaultAPL:AddSpell( |
||||
PowerWordLife:CastableIf(function(self) |
||||
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
and Player:CanSee(Lowest) and Lowest:GetHP() <= 35 |
||||
end):SetTarget(Lowest) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
Renew:CastableIf(function(self) |
||||
return RenewUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
and Player:CanSee(RenewUnit) and RenewUnit:GetHP() <= 95 |
||||
|
||||
end):SetTarget(RenewUnit) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
PowerWordShield:CastableIf(function(self) |
||||
return PshieldUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
and Player:CanSee(PshieldUnit) and PshieldUnit:GetHP() <= 70 |
||||
|
||||
end):SetTarget(PshieldUnit) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
PowerWordRadiance:CastableIf(function(self) |
||||
return Player:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:IsInParty() and |
||||
self:IsInRange(Player) and Player:GetPartyHPAround(50) >= 3 |
||||
end):SetTarget(Player) |
||||
) |
||||
DefaultAPL:AddSpell( |
||||
PowerWordBarrier:CastableIf(function(self) |
||||
return Player:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:IsInParty() and |
||||
self:IsInRange(Player) and Player:GetPartyHPAround(40) >= 3 |
||||
end):SetTarget(Player) |
||||
) |
||||
OpenerAPL:AddSpell( |
||||
DivineStar:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:IsFacing(target) |
||||
end):SetTarget(None):OnCast(function(self) |
||||
local loc = Target:GetPosition() |
||||
self:Click(loc) |
||||
end) |
||||
) |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DiscModule:Sync(function() |
||||
if Player:IsAffectingCombat() then |
||||
DefaultAPL:Execute() |
||||
end |
||||
end) |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Bastion:Register(DiscModule) |
||||
|
||||
|
||||
local tab1 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
|
||||
|
||||
[1] = { resto = { type = 'header', label = 'DPS Options' } }, |
||||
|
||||
[2] = { dps1 = { type = 'slider', label = 'DPS Health Threshold', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('dpshealth', 85), |
||||
onValueChanged = function(_, value) myconf:Write('dpshealth', value) end }, |
||||
|
||||
dps2 = { type = 'slider', label = 'Player Mana Threshold', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('playermana', 85), |
||||
onValueChanged = function(_, value) myconf:Write('playermana', value) end }, }, |
||||
|
||||
|
||||
|
||||
[3] = { autoform = { type = 'header', label = 'Natures Cure' } }, |
||||
[4] = { pummel = { type = 'checkbox', label = 'Dispell', column = 6, |
||||
initialValue = myconf:Read('naturescure1', false), |
||||
onValueChanged = function(_, flag) myconf:Write('naturescure1', flag) end }, }, |
||||
|
||||
[5] = { resto = { type = 'header', label = 'Soothe' } }, |
||||
|
||||
[6] = { incombat = { type = 'checkbox', label = 'Shoote Target', column = 12, order = 1, |
||||
initialValue = myconf:Read('soothe', false), |
||||
onValueChanged = function(_, flag) myconf:Write('soothe', flag) end }, }, |
||||
|
||||
[7] = { resto = { type = 'header', label = 'Dispel Delay Time' } }, |
||||
|
||||
[8] = { delay = { type = 'slider', label = 'In seconds', column = 6, order = 1, |
||||
min = 0.5, max = 2, precision = 1, |
||||
initialValue = myconf:Read('dispeldelay', 1), |
||||
onValueChanged = function(_, value) myconf:Write('dispeldelay', value) end }, }, |
||||
|
||||
[9] = { innervate1 = { type = 'checkbox', label = 'Innervate', column = 6, order = 1, |
||||
initialValue = myconf:Read('innervate', false), |
||||
onValueChanged = function(_, flag) myconf:Write('innervate', flag) end }, |
||||
|
||||
innervate2 = { type = 'slider', label = 'Player Mana', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('innervatemana', 35), |
||||
onValueChanged = function(_, value) myconf:Write('innervatemana', value) end }, }, |
||||
|
||||
[10] = { frostmage = { type = 'header', label = 'Trinkets' } }, |
||||
[11] = { pummel = { type = 'checkbox', label = 'Use Trinkets', column = 6, |
||||
initialValue = myconf:Read('trinkets', false), |
||||
onValueChanged = function(_, flag) myconf:Write('trinkets', flag) end }, }, |
||||
|
||||
[12] = { autoform = { type = 'header', label = 'Auto Form' } }, |
||||
[13] = { pummel = { type = 'checkbox', label = 'Use Auto Form', column = 6, |
||||
initialValue = myconf:Read('autoform', false), |
||||
onValueChanged = function(_, flag) myconf:Write('autoform', flag) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local tab2 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { resto = { type = 'header', label = 'Player Healing' } }, |
||||
|
||||
[2] = { incombat = { type = 'checkbox', label = 'In Combat Healing', column = 6, order = 1, |
||||
initialValue = myconf:Read('playericheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('playericheal', flag) end }, |
||||
|
||||
outcombat = { type = 'checkbox', label = 'Out of Combat Healing', column = 6, order = 2, |
||||
initialValue = myconf:Read('playeroocheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('playeroocheal', flag) end }, }, |
||||
|
||||
[3] = { shadowmend1 = { type = 'checkbox', label = 'Regrowth', column = 6, order = 1, |
||||
initialValue = myconf:Read('shadowmend', false), |
||||
onValueChanged = function(_, flag) myconf:Write('shadowmend', flag) end }, |
||||
|
||||
shadowmend2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('shadowmendpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('shadowmendpercent', value) end }, }, |
||||
|
||||
[4] = { resto = { type = 'header', label = 'Defensives' } }, |
||||
|
||||
[5] = { bark1 = { type = 'checkbox', label = 'Barkskin', column = 6, order = 1, |
||||
initialValue = myconf:Read('barkskin', false), |
||||
onValueChanged = function(_, flag) myconf:Write('barkskin', flag) end }, |
||||
|
||||
bark2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('barkskinpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('barkskinpercent', value) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local tab3 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { incombat = { type = 'checkbox', label = 'In Combat Healing', column = 6, order = 1, |
||||
initialValue = myconf:Read('groupicheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('groupicheal', flag) end }, |
||||
|
||||
outcombat = { type = 'checkbox', label = 'Out of Combat Healing', column = 6, order = 2, |
||||
initialValue = myconf:Read('groupoocheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('groupoocheal', flag) end }, }, |
||||
|
||||
[2] = { lifebloom1 = { type = 'dropdown', label = 'Lifebloom on', column = 6, order = 1, |
||||
options = { |
||||
{ text = 'Tank Only', value = 'tank'}, |
||||
{ text = 'All Party', value = 'party'}, |
||||
{ text = 'Player', value = 'player'}, |
||||
{ text = 'None', value = 'none'}, |
||||
}, |
||||
initialValue = myconf:Read('lifebloomtarget', 'tank'), |
||||
onValueChanged = function(_, value) myconf:Write('lifebloomtarget', value) end }, }, |
||||
|
||||
[3] = { resto = { type = 'header', label = 'AOE Heals' } }, |
||||
|
||||
[4] = { tranq1 = { type = 'checkbox', label = 'Tranquility', column = 6, order = 1, |
||||
initialValue = myconf:Read('grptranq', false), |
||||
onValueChanged = function(_, flag) myconf:Write('grptranq', flag) end }, }, |
||||
|
||||
[5] = { tranq2 = { type = 'slider', label = 'Number of Targets', column = 6, order = 2, |
||||
min = 1, max = 10, precision = 0, |
||||
initialValue = myconf:Read('tranqtargets', 3), |
||||
onValueChanged = function(_, value) myconf:Write('tranqtargets', value) end }, |
||||
|
||||
tranq3 = { type = 'slider', label = 'Target Health', column = 6, order = 1, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('tranqpercent', 50), |
||||
onValueChanged = function(_, value) myconf:Write('tranqpercent', value) end }, }, |
||||
|
||||
[6] = { flourish1 = { type = 'checkbox', label = 'Flourish', column = 6, order = 1, |
||||
initialValue = myconf:Read('flourish', false), |
||||
onValueChanged = function(_, flag) myconf:Write('flourish', flag) end }, }, |
||||
|
||||
[7] = { flourish2 = { type = 'slider', label = 'Number of Targets', column = 6, order = 2, |
||||
min = 1, max = 10, precision = 0, |
||||
initialValue = myconf:Read('flourishtargets', 3), |
||||
onValueChanged = function(_, value) myconf:Write('flourishtargets', value) end }, |
||||
|
||||
flourish3 = { type = 'slider', label = 'Target Health', column = 6, order = 1, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('flourishpercent', 50), |
||||
onValueChanged = function(_, value) myconf:Write('flourishpercent', value) end }, }, |
||||
|
||||
[8] = { convoke1 = { type = 'checkbox', label = 'Convoke The Spirits', column = 6, order = 1, |
||||
initialValue = myconf:Read('convoke', false), |
||||
onValueChanged = function(_, flag) myconf:Write('convoke', flag) end }, }, |
||||
|
||||
[9] = { convoke2 = { type = 'slider', label = 'Number of Targets', column = 6, order = 2, |
||||
min = 1, max = 10, precision = 0, |
||||
initialValue = myconf:Read('convoketargets', 3), |
||||
onValueChanged = function(_, value) myconf:Write('convoketargets', value) end }, |
||||
|
||||
convoke3 = { type = 'slider', label = 'Target Health', column = 6, order = 1, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('convokepercent', 50), |
||||
onValueChanged = function(_, value) myconf:Write('convokepercent', value) end }, }, |
||||
|
||||
[10] = { wild1 = { type = 'checkbox', label = 'Wild Growth', column = 6, order = 1, |
||||
initialValue = myconf:Read('grpwildgrowth', false), |
||||
onValueChanged = function(_, flag) myconf:Write('grpwildgrowth', flag) end }, }, |
||||
|
||||
[11] = { wild2 = { type = 'slider', label = 'Number of Targets', column = 6, order = 2, |
||||
min = 1, max = 10, precision = 0, |
||||
initialValue = myconf:Read('wildgrowthtargets', 3), |
||||
onValueChanged = function(_, value) myconf:Write('wildgrowthtargets', value) end }, |
||||
|
||||
wild3 = { type = 'slider', label = 'Target Health', column = 6, order = 1, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('wildgrowthpercent', 80), |
||||
onValueChanged = function(_, value) myconf:Write('wildgrowthpercent', value) end }, }, |
||||
|
||||
|
||||
|
||||
[12] = { incarnationtree1 = { type = 'checkbox', label = 'Incarnation: Tree of Life', column = 6, order = 1, |
||||
initialValue = myconf:Read('incarnationtree', false), |
||||
onValueChanged = function(_, flag) myconf:Write('incarnationtree', flag) end }, }, |
||||
|
||||
[13] = { convoke2 = { type = 'slider', label = 'Number of Targets', column = 6, order = 2, |
||||
min = 1, max = 10, precision = 0, |
||||
initialValue = myconf:Read('incarnationtreetargets', 3), |
||||
onValueChanged = function(_, value) myconf:Write('incarnationtreetargets', value) end }, |
||||
|
||||
convoke3 = { type = 'slider', label = 'Target Health', column = 6, order = 1, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('incarnationtreepercent', 50), |
||||
onValueChanged = function(_, value) myconf:Write('incarnationtreepercent', value) end }, } |
||||
|
||||
|
||||
}, |
||||
} |
||||
local tab4 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { resto = { type = 'header', label = 'AOE Heals ' } }, |
||||
|
||||
[2] = { ironbark1 = { type = 'dropdown', label = 'Ironbark on', column = 6, order = 1, |
||||
options = { |
||||
{ text = 'Tank Only', value = 'tank'}, |
||||
{ text = 'All Party', value = 'party'}, |
||||
{ text = 'None', value = 'none'}, |
||||
}, |
||||
initialValue = myconf:Read('ironbarktarget', 'tank'), |
||||
onValueChanged = function(_, value) myconf:Write('ironbarktarget', value) end }, |
||||
|
||||
ironbark2 = { type = 'slider', label = 'Target Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('ironbarkpercent', 30), |
||||
onValueChanged = function(_, value) myconf:Write('ironbarkpercent', value) end }, }, |
||||
|
||||
[3] = { ward1 = { type = 'dropdown', label = 'Cenarion Ward on', column = 6, order = 1, |
||||
options = { |
||||
{ text = 'Tank Only', value = 'tank'}, |
||||
{ text = 'All Party', value = 'party'}, |
||||
{ text = 'None', value = 'none'}, |
||||
}, |
||||
initialValue = myconf:Read('wardtarget', 'tank'), |
||||
onValueChanged = function(_, value) myconf:Write('wardtarget', value) end }, |
||||
|
||||
ward2 = { type = 'slider', label = 'Target Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('wardpercent', 30), |
||||
onValueChanged = function(_, value) myconf:Write('wardpercent', value) end }, }, |
||||
|
||||
[4] = { natswift1 = { type = 'checkbox', label = 'Natures Swiftness', column = 6, order = 1, |
||||
initialValue = myconf:Read('grpnatswift', false), |
||||
onValueChanged = function(_, flag) myconf:Write('grpnatswift', flag) end }, |
||||
|
||||
natswift2 = { type = 'slider', label = 'Target Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('grpnatswiftpercent', 40), |
||||
onValueChanged = function(_, value) myconf:Write('grpnatswiftpercent', value) end }, }, |
||||
|
||||
[5] = { swift1 = { type = 'checkbox', label = 'Swiftmend', column = 6, order = 1, |
||||
initialValue = myconf:Read('grpswiftmend', false), |
||||
onValueChanged = function(_, flag) myconf:Write('grpswiftmend', flag) end }, |
||||
|
||||
swift2 = { type = 'slider', label = 'Target Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('grpswiftmendpercent', 60), |
||||
onValueChanged = function(_, value) myconf:Write('grpswiftmendpercent', value) end }, }, |
||||
|
||||
[6] = { regrowth1 = { type = 'checkbox', label = 'Regrowth', column = 6, order = 1, |
||||
initialValue = myconf:Read('grpregrowth', false), |
||||
onValueChanged = function(_, flag) myconf:Write('grpregrowth', flag) end }, |
||||
|
||||
regrowth2 = { type = 'slider', label = 'Target Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('grpregrowthpercent', 65), |
||||
onValueChanged = function(_, value) myconf:Write('grpregrowthpercent', value) end }, }, |
||||
|
||||
[7] = { rejuv1 = { type = 'checkbox', label = 'Rejuvenation', column = 6, order = 1, |
||||
initialValue = myconf:Read('grprejuv', false), |
||||
onValueChanged = function(_, flag) myconf:Write('grprejuv', flag) end }, |
||||
|
||||
rejuv2 = { type = 'slider', label = 'Target Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('grprejuvpercent', 85), |
||||
onValueChanged = function(_, value) myconf:Write('grprejuvpercent', value) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local discpriestconfig = { |
||||
layoutConfig = { padding = { top = 30 } }, |
||||
rows = { |
||||
[1] = { |
||||
container = { |
||||
type = 'tab', |
||||
fullSize = true, |
||||
tabs = { |
||||
{ |
||||
name = 'player', |
||||
title = 'Player Settings', |
||||
layout = tab1 |
||||
}, |
||||
{ |
||||
name = 'playerhealing', |
||||
title = 'Player Healing', |
||||
layout = tab2 |
||||
}, |
||||
{ |
||||
name = 'group', |
||||
title = 'Group Healing', |
||||
layout = tab3 |
||||
}, |
||||
{ |
||||
name = 'group2', |
||||
title = 'AOE Healing ', |
||||
layout = tab4 |
||||
} |
||||
}, |
||||
} |
||||
}, |
||||
}, |
||||
} |
||||
Bastion.settingstemplate(discpriestconfig, 'Disc Priest', 460, 780, 1.00, 0.49, 0.04) |
@ -0,0 +1,400 @@ |
||||
local Tinkr, Bastion = ... |
||||
|
||||
local FeralModule = Bastion.Module:New('feral') |
||||
local Evaluator = Tinkr.Util.Evaluator |
||||
local Player = Bastion.UnitManager:Get('player') |
||||
local None = Bastion.UnitManager:Get('none') |
||||
local Target = Bastion.UnitManager:Get('target') |
||||
|
||||
local myconf = Tinkr.Util.Config:New('feral_druid') -- for saving variables |
||||
|
||||
-- Spellbook spells |
||||
local Shadowmeld = Bastion.SpellBook:GetSpell(58984) |
||||
local Barkskin = Bastion.SpellBook:GetSpell(22812) |
||||
local BearForm = Bastion.SpellBook:GetSpell(5487) |
||||
--local Berserk = Bastion.SpellBook:GetSpell(50334) |
||||
local CatForm = Bastion.SpellBook:GetSpell(768) |
||||
local Dash = Bastion.SpellBook:GetSpell(1850) |
||||
local EntanglingRoots = Bastion.SpellBook:GetSpell(339) |
||||
local FeralFrenzy = Bastion.SpellBook:GetSpell(274837) |
||||
local FerociousBite = Bastion.SpellBook:GetSpell(22568) |
||||
--local FrenziedRegeneration = Bastion.SpellBook:GetSpell(22842) |
||||
local Growl = Bastion.SpellBook:GetSpell(6795) |
||||
--local Ironfur = Bastion.SpellBook:GetSpell(192081) |
||||
local Mangle = Bastion.SpellBook:GetSpell(33917) |
||||
local MarkoftheWild = Bastion.SpellBook:GetSpell(1126) |
||||
local Moonfire = Bastion.SpellBook:GetSpell(8921) |
||||
local MoonfireDebuff = Bastion.SpellBook:GetSpell(164812) |
||||
local PredatorySwiftness = Bastion.SpellBook:GetSpell(69369) |
||||
local PrimalWrath = Bastion.SpellBook:GetSpell(285381) |
||||
local Prowl = Bastion.SpellBook:GetSpell(5215) |
||||
local Rake = Bastion.SpellBook:GetSpell(1822) |
||||
local RakeDebuff = Bastion.SpellBook:GetSpell(155722) |
||||
local Regrowth = Bastion.SpellBook:GetSpell(8936) |
||||
local Revive = Bastion.SpellBook:GetSpell(50769) |
||||
local Rip = Bastion.SpellBook:GetSpell(1079) |
||||
local Shred = Bastion.SpellBook:GetSpell(5221) |
||||
local SkullBash = Bastion.SpellBook:GetSpell(106839) |
||||
--local Thrash = Bastion.SpellBook:GetSpell(106830) |
||||
local Thrash = Bastion.SpellBook:GetSpell(106832) |
||||
local ThrashDebuff = Bastion.SpellBook:GetSpell(106830) |
||||
local TigersFury = Bastion.SpellBook:GetSpell(5217) |
||||
local TravelForm = Bastion.SpellBook:GetSpell(783) |
||||
local Wrath = Bastion.SpellBook:GetSpell(5176) |
||||
--local Maul = Bastion.SpellBook:GetSpell(6807) |
||||
--local SurvivalInstincts = Bastion.SpellBook:GetSpell(61336) |
||||
--local Swipe = Bastion.SpellBook:GetSpell(106785) |
||||
local Swipe = Bastion.SpellBook:GetSpell(213764) |
||||
local BrutalSlash = Bastion.SpellBook:GetSpell(202028) |
||||
local ApexPredator = Bastion.SpellBook:GetSpell(391882) |
||||
local Incarnation = Bastion.SpellBook:GetSpell(102543) |
||||
|
||||
-- Define Units |
||||
local InterruptTarget = Bastion.UnitManager:CreateCustomUnit('skullbash', function(unit) |
||||
local interrupt = nil |
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if Player:InMelee(unit) and unit:IsInterruptible(5) and Player:IsFacing(unit) then |
||||
interrupt = unit |
||||
return true |
||||
end |
||||
end) |
||||
if interrupt == nil then |
||||
interrupt = None |
||||
end |
||||
return interrupt |
||||
end) |
||||
|
||||
local Tank = Bastion.UnitManager:CreateCustomUnit('tank', function(unit) |
||||
local tank = nil |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if unit:IsDead() then return false end |
||||
if unit:IsTank() then |
||||
tank = unit |
||||
return true |
||||
end |
||||
return false |
||||
end) |
||||
if tank == nil then |
||||
tank = None |
||||
end |
||||
return tank |
||||
end) |
||||
|
||||
local Explosive = Bastion.UnitManager:CreateCustomUnit('explosive', function(unit) |
||||
local explosive = nil |
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if Player:InMelee(unit) and unit:GetID() == 120651 and Player:IsFacing(unit) then |
||||
explosive = unit |
||||
return true |
||||
end |
||||
end) |
||||
if explosive == nil then |
||||
explosive = None |
||||
end |
||||
return explosive |
||||
end) |
||||
|
||||
-- Rotation code here |
||||
local function Buffs() |
||||
-- Mark of the Wild |
||||
local motw = myconf:Read('motw') |
||||
MarkoftheWild:Condition('Mark of the Wild', function() |
||||
return motw and MarkoftheWild:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(MarkoftheWild):IsUp() |
||||
and not Player:IsMounted() |
||||
end) |
||||
MarkoftheWild:Cast(Player, 'Mark of the Wild') |
||||
end |
||||
|
||||
local function DruidProwl() |
||||
-- Prowl |
||||
Prowl:Condition('Prowl', function() |
||||
return Prowl:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(Prowl):IsUp() |
||||
and Player:GetDistance(Target) <= 25 and not Player:IsMounted() and Target:IsHostile() and not Target:IsDead() |
||||
end) |
||||
Prowl:Cast(Player, 'Prowl') |
||||
end |
||||
|
||||
local function Opener() |
||||
-- Rake |
||||
Rake:Condition('Rake', function() |
||||
return Rake:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:InMelee(Target) |
||||
and not Target:GetAuras():FindMy(RakeDebuff):IsUp() and Target:Exists() and Target:IsHostile() and not Target:IsDead() |
||||
end) |
||||
Rake:Cast(Target, 'Rake') |
||||
end |
||||
|
||||
local function Interrupt() |
||||
-- Skull Bash |
||||
SkullBash:Condition('SkullBash', function() |
||||
return SkullBash:IsKnownAndUsable() and InterruptTarget:Exists() and not Player:IsCastingOrChanneling() |
||||
end) |
||||
C_Timer.After(1.5, function() |
||||
SkullBash:Cast(Target, 'SkullBash') |
||||
end) |
||||
end |
||||
|
||||
local function Damage() |
||||
-- Cat Form |
||||
CatForm:Condition('Cat Form', function() |
||||
return CatForm:IsKnownAndUsable() and not Player:GetAuras():FindMy(CatForm):IsUp() |
||||
end) |
||||
CatForm:Cast(Player, 'Cat Form') |
||||
-- Healing with Predatory Swiftness |
||||
Regrowth:Condition('Regrowth', function() |
||||
return Regrowth:IsKnownAndUsable() and Player:GetAuras():FindMy(PredatorySwiftness):IsUp() |
||||
end) |
||||
Regrowth:Cast(Player, 'Regrowth') |
||||
-- Cooldowns |
||||
-- Tiger's Fury |
||||
TigersFury:Condition('Tigers Fury', function() |
||||
return TigersFury:IsKnownAndUsable() and not Player:GetAuras():FindMy(TigersFury):IsUp() |
||||
end) |
||||
TigersFury:Cast(Player, 'Tigers Fury') |
||||
-- Feral Frenzy on cooldown and when combo points are zero |
||||
FeralFrenzy:Condition('Feral Frenzy', function() |
||||
return FeralFrenzy:IsKnownAndUsable() and Player:GetComboPoints(Target) == 0 |
||||
end) |
||||
FeralFrenzy:Cast(Player, 'Feral Frenzy') |
||||
-- Incarnation: Avatar of Ashamane |
||||
Incarnation:Condition('Incarnation', function() |
||||
return Incarnation:IsKnownAndUsable() |
||||
end) |
||||
Incarnation:Cast(Player, 'Incarnation') |
||||
|
||||
-- Multi Target Rotation |
||||
if Player:GetEnemies(8) >= 2 then |
||||
-- Primal Wrath at 5 combo points |
||||
PrimalWrath:Condition('Primal Wrath', function() |
||||
return PrimalWrath:IsKnownAndUsable() and Player:InMelee(Target) and Player:GetComboPoints(Target) >= 5 |
||||
and (not Target:GetAuras():FindMy(Rip):IsUp() or Target:GetAuras():FindMy(Rip):GetRemainingTime() <= 7) |
||||
end) |
||||
PrimalWrath:Cast(Target, 'Primal Wrath') |
||||
-- Spend Apex Predator Procs on Ferocious Bite |
||||
FerociousBite:Condition('Ferocious Bite Apex Predator', function() |
||||
return FerociousBite:IsKnownAndUsable() and Player:InMelee(Target) and Player:GetAuras():FindMy(ApexPredator):IsUp() |
||||
end) |
||||
FerociousBite:Cast(Target, 'Ferocious Bite Apex Predator') |
||||
-- Maintain Rake |
||||
Rake:Condition('Maintain Rake', function() |
||||
return Rake:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:InMelee(Target) |
||||
and Target:GetAuras():FindMy(RakeDebuff):GetRemainingTime() <= 4 |
||||
end) |
||||
Rake:Cast(Target, 'Maintain Rake') |
||||
-- Cast Thrash if its not up |
||||
Thrash:Condition('Thrash', function() |
||||
return Thrash:IsKnownAndUsable() and not Target:GetAuras():FindMy(ThrashDebuff):IsUp() and Player:InMelee(Target) |
||||
end) |
||||
Thrash:Cast(Target, 'Thrash') |
||||
-- Avoid capping Brutal Slash charges |
||||
BrutalSlash:Condition('Brutal Slash', function() |
||||
return BrutalSlash:IsKnownAndUsable() and Player:InMelee(Target) |
||||
end) |
||||
BrutalSlash:Cast(Target, 'Brutal Slash') |
||||
-- Shred to generate combo points |
||||
Shred:Condition('Shred', function() |
||||
return Shred:IsKnownAndUsable() and Player:InMelee(Target) |
||||
end) |
||||
Shred:Cast(Target, 'Shred') |
||||
end |
||||
|
||||
-- Single Target Rotation |
||||
if Player:GetEnemies(8) == 1 then |
||||
-- Maintain Rip - you'll want to cast this at 5 combo points |
||||
Rip:Condition('Rip', function() |
||||
return Rip:IsKnownAndUsable() and Player:InMelee(Target) and Player:GetComboPoints(Target) >= 5 |
||||
and (not Target:GetAuras():FindMy(Rip):IsUp() or Target:GetAuras():FindMy(Rip):GetRemainingTime() <= 7) |
||||
end) |
||||
Rip:Cast(Target, 'Rip') |
||||
-- Spend Apex Predator Procs on Ferocious Bite |
||||
FerociousBite:Condition('Ferocious Bite Apex Predator', function() |
||||
return FerociousBite:IsKnownAndUsable() and Player:InMelee(Target) and Player:GetAuras():FindMy(ApexPredator):IsUp() |
||||
end) |
||||
FerociousBite:Cast(Target, 'Ferocious Bite Apex Predator') |
||||
-- If you have 5 combo points and Rip is not in Pandemic then cast Ferocious Bite |
||||
FerociousBite:Condition('Ferocious Bite', function() |
||||
return FerociousBite:IsKnownAndUsable() and Player:InMelee(Target) and Player:GetComboPoints(Target) >= 5 |
||||
end) |
||||
FerociousBite:Cast(Target, 'Ferocious Bite') |
||||
-- Maintain Rake |
||||
Rake:Condition('Maintain Rake', function() |
||||
return Rake:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:InMelee(Target) |
||||
and Target:GetAuras():FindMy(RakeDebuff):GetRemainingTime() <= 4 |
||||
end) |
||||
Rake:Cast(Target, 'Maintain Rake') |
||||
-- Avoid capping Brutal Slash charges |
||||
BrutalSlash:Condition('Brutal Slash', function() |
||||
return BrutalSlash:IsKnownAndUsable() and Player:InMelee(Target) |
||||
end) |
||||
BrutalSlash:Cast(Target, 'Brutal Slash') |
||||
-- Cast Thrash if its not up |
||||
Thrash:Condition('Thrash', function() |
||||
return Thrash:IsKnownAndUsable() and not Target:GetAuras():FindMy(ThrashDebuff):IsUp() and Player:InMelee(Target) |
||||
end) |
||||
Thrash:Cast(Target, 'Thrash') |
||||
-- Shred to generate combo points |
||||
Shred:Condition('Shred', function() |
||||
return Shred:IsKnownAndUsable() and Player:InMelee(Target) |
||||
end) |
||||
Shred:Cast(Target, 'Shred') |
||||
end |
||||
end |
||||
|
||||
-- Module that dictates workflow |
||||
FeralModule:Sync(function() |
||||
if not Player:IsAffectingCombat() then |
||||
if Buffs() then return end |
||||
if DruidProwl() then return end |
||||
if Opener() then return end |
||||
end |
||||
if Player:IsAffectingCombat() and Target:Exists() and Target:IsHostile() and not Target:IsDead() then |
||||
if Interrupt() then return end |
||||
if Damage() then return end |
||||
end |
||||
end) |
||||
Bastion:Register(FeralModule) |
||||
|
||||
local tab1 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { shadpr = { type = 'label', label = 'Open Combat' } }, |
||||
|
||||
[2] = { opener = { type = 'dropdown', label = 'Opener', column = 6, order = 1, |
||||
options = { |
||||
{ text = 'Moonfire', value = 'moonfire'}, |
||||
{ text = 'None', value = 'none'}, |
||||
}, |
||||
initialValue = myconf:Read('opener', 'moonfire'), |
||||
onValueChanged = function(_, value) myconf:Write('opener', value) end }, }, |
||||
|
||||
[3] = { shadpr = { type = 'label', label = 'Buffs' } }, |
||||
|
||||
[4] = { motw = { type = 'checkbox', label = 'Mark of the Wild', column = 12, order = 1, |
||||
initialValue = myconf:Read('motw', false), |
||||
onValueChanged = function(_, flag) myconf:Write('motw', flag) end }, }, |
||||
|
||||
[5] = { shadpr = { type = 'label', label = 'Defensives' } }, |
||||
|
||||
[6] = { shield1 = { type = 'checkbox', label = 'Ironfur', column = 6, order = 1, |
||||
initialValue = myconf:Read('ironfur', false), |
||||
onValueChanged = function(_, flag) myconf:Write('ironfur', flag) end }, |
||||
|
||||
shield2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('ironfurpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('ironfurpercent', value) end }, }, |
||||
|
||||
[7] = { dispersion1 = { type = 'checkbox', label = 'Frenzied Regeneration', column = 6, order = 1, |
||||
initialValue = myconf:Read('fregen', false), |
||||
onValueChanged = function(_, flag) myconf:Write('fregen', flag) end }, |
||||
|
||||
dispersion2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('fregenpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('fregenpercent', value) end }, }, |
||||
|
||||
[8] = { shadpr = { type = 'label', label = 'Interrupts' } }, |
||||
|
||||
[9] = { silence = { type = 'checkbox', label = 'Skull Bash on CD', column = 12, order = 1, |
||||
initialValue = myconf:Read('skullbash', false), |
||||
onValueChanged = function(_, flag) myconf:Write('skullbash', flag) end }, }, |
||||
|
||||
[10] = { shadpr = { type = 'header', label = 'Purify Disease' } }, |
||||
|
||||
[11] = { incombat = { type = 'checkbox', label = 'In Combat', column = 6, order = 1, |
||||
initialValue = myconf:Read('purifyic', false), |
||||
onValueChanged = function(_, flag) myconf:Write('purifyic', flag) end }, |
||||
|
||||
outcombat = { type = 'checkbox', label = 'Out of Combat', column = 6, order = 2, |
||||
initialValue = myconf:Read('purifyooc', false), |
||||
onValueChanged = function(_, flag) myconf:Write('purifyooc', flag) end }, }, |
||||
|
||||
[12] = { shadpr = { type = 'header', label = 'Dispel Magic' } }, |
||||
|
||||
[13] = { incombat = { type = 'checkbox', label = 'In Combat', column = 12, order = 1, |
||||
initialValue = myconf:Read('dispelic', false), |
||||
onValueChanged = function(_, flag) myconf:Write('dispelic', flag) end }, }, |
||||
|
||||
[14] = { shadpr = { type = 'header', label = 'Dispel Delay Time' } }, |
||||
|
||||
[15] = { delay = { type = 'slider', label = 'In seconds', column = 6, order = 1, |
||||
min = 0.5, max = 2, precision = 1, |
||||
initialValue = myconf:Read('dispeldelay', 1), |
||||
onValueChanged = function(_, value) myconf:Write('dispeldelay', value) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local tab2 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { shadpr = { type = 'header', label = 'Player Healing' } }, |
||||
|
||||
[2] = { incombat = { type = 'checkbox', label = 'In Combat Healing', column = 6, order = 1, |
||||
initialValue = myconf:Read('playericheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('playericheal', flag) end }, |
||||
|
||||
outcombat = { type = 'checkbox', label = 'Out of Combat Healing', column = 6, order = 2, |
||||
initialValue = myconf:Read('playeroocheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('playeroocheal', flag) end }, }, |
||||
|
||||
[3] = { shadowmend1 = { type = 'checkbox', label = 'Shadow Mend', column = 6, order = 1, |
||||
initialValue = myconf:Read('shadowmend', false), |
||||
onValueChanged = function(_, flag) myconf:Write('shadowmend', flag) end }, |
||||
|
||||
shadowmend2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('shadowmendpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('shadowmendpercent', value) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local feralconfig = { |
||||
layoutConfig = { padding = { top = 30 } }, |
||||
rows = { |
||||
[1] = { |
||||
container = { |
||||
type = 'tab', |
||||
fullSize = true, |
||||
tabs = { |
||||
{ |
||||
name = 'player', |
||||
title = 'Player Settings', |
||||
layout = tab1 |
||||
}, |
||||
{ |
||||
name = 'group', |
||||
title = 'Placeholder', |
||||
layout = tab2 |
||||
} |
||||
}, |
||||
} |
||||
}, |
||||
}, |
||||
} |
||||
Bastion.settingstemplate(feralconfig, 'Feral Druid', 400, 600, 1.00, 0.49, 0.04) -- config, Title of Settings Frame, Width, Height, ClassRGB |
||||
|
||||
-- Class colours |
||||
-- Death Knight 0.77 0.12 0.23 Red |
||||
-- Demon Hunter 0.64 0.19 0.79 Dark Magenta |
||||
-- Druid 1.00 0.49 0.04 Orange |
||||
-- Evoker 0.20 0.58 0.50 Dark Emerald |
||||
-- Hunter 0.67 0.83 0.45 Green |
||||
-- Mage 0.25 0.78 0.92 Light Blue |
||||
-- Monk 0.00 1.00 0.60 Spring Green |
||||
-- Paladin 0.96 0.55 0.73 Pink |
||||
-- Priest 1.00 1.00 1.00 White |
||||
-- Rogue 1.00 0.96 0.41 Yellow |
||||
-- Shaman 0.00 0.44 0.87 Blue |
||||
-- Warlock 0.53 0.53 0.93 Purple |
||||
-- Warrior 0.78 0.61 0.43 Tan |
@ -0,0 +1,337 @@ |
||||
local Tinkr, Bastion = ... |
||||
|
||||
local GuardianModule = Bastion.Module:New('guardian') |
||||
local Evaluator = Tinkr.Util.Evaluator |
||||
local Player = Bastion.UnitManager:Get('player') |
||||
local None = Bastion.UnitManager:Get('none') |
||||
local Target = Bastion.UnitManager:Get('target') |
||||
|
||||
local myconf = Tinkr.Util.Config:New('guardian_druid') -- for saving variables |
||||
|
||||
local AutoAttack = Bastion.SpellBook:GetSpell(6603) |
||||
local WarStomp = Bastion.SpellBook:GetSpell(20549) |
||||
local Barkskin = Bastion.SpellBook:GetSpell(22812) |
||||
local BearForm = Bastion.SpellBook:GetSpell(5487) |
||||
local Berserk = Bastion.SpellBook:GetSpell(50334) |
||||
local CatForm = Bastion.SpellBook:GetSpell(768) |
||||
local Dash = Bastion.SpellBook:GetSpell(1850) |
||||
local EntanglingRoots = Bastion.SpellBook:GetSpell(339) |
||||
local FerociousBite = Bastion.SpellBook:GetSpell(22568) |
||||
local FrenziedRegeneration = Bastion.SpellBook:GetSpell(22842) |
||||
local Growl = Bastion.SpellBook:GetSpell(6795) |
||||
local Ironfur = Bastion.SpellBook:GetSpell(192081) |
||||
local Mangle = Bastion.SpellBook:GetSpell(33917) |
||||
local MarkoftheWild = Bastion.SpellBook:GetSpell(1126) |
||||
local Moonfire = Bastion.SpellBook:GetSpell(8921) |
||||
local MoonfireDebuff = Bastion.SpellBook:GetSpell(164812) |
||||
local Prowl = Bastion.SpellBook:GetSpell(5215) |
||||
local Regrowth = Bastion.SpellBook:GetSpell(8936) |
||||
local Revive = Bastion.SpellBook:GetSpell(50769) |
||||
local Shred = Bastion.SpellBook:GetSpell(5221) |
||||
local SkullBash = Bastion.SpellBook:GetSpell(106839) |
||||
local Thrash = Bastion.SpellBook:GetSpell(77758) |
||||
local ThrashDebuff = Bastion.SpellBook:GetSpell(192090) |
||||
local TravelForm = Bastion.SpellBook:GetSpell(783) |
||||
local Wrath = Bastion.SpellBook:GetSpell(5176) |
||||
local Maul = Bastion.SpellBook:GetSpell(6807) |
||||
local SurvivalInstincts = Bastion.SpellBook:GetSpell(61336) |
||||
local Swipe = Bastion.SpellBook:GetSpell(213771) |
||||
|
||||
local InterruptTarget = Bastion.UnitManager:CreateCustomUnit('skullbash', function(unit) |
||||
local interrupt = nil |
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if Player:InMelee(unit) and unit:IsInterruptible(5) and Player:IsFacing(unit) then |
||||
interrupt = unit |
||||
return true |
||||
end |
||||
end) |
||||
if interrupt == nil then |
||||
interrupt = None |
||||
end |
||||
return interrupt |
||||
end) |
||||
|
||||
local Tank = Bastion.UnitManager:CreateCustomUnit('tank', function(unit) |
||||
local tank = nil |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if unit:IsDead() then return false end |
||||
if unit:IsTank() then |
||||
tank = unit |
||||
return true |
||||
end |
||||
return false |
||||
end) |
||||
if tank == nil then |
||||
tank = None |
||||
end |
||||
return tank |
||||
end) |
||||
|
||||
local Explosive = Bastion.UnitManager:CreateCustomUnit('explosive', function(unit) |
||||
local explosive = nil |
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if Player:InMelee(unit) and unit:GetID() == 120651 and Player:IsFacing(unit) then |
||||
explosive = unit |
||||
return true |
||||
end |
||||
end) |
||||
if explosive == nil then |
||||
explosive = None |
||||
end |
||||
return explosive |
||||
end) |
||||
|
||||
local RestingAPL = Bastion.APL:New('resting') |
||||
local OpenerAPL = Bastion.APL:New('opener') |
||||
local DefensivesAPL = Bastion.APL:New('defensives') |
||||
local STAPL = Bastion.APL:New('st') |
||||
local UtilityAPL = Bastion.APL:New('utility') |
||||
|
||||
-- Resting - Out of Combat Actions |
||||
local motw = myconf:Read('motw') |
||||
RestingAPL:AddSpell( |
||||
MarkoftheWild:CastableIf(function(self) |
||||
return motw and self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(MarkoftheWild):IsUp() and not IsMounted() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Opener spells |
||||
local opener = myconf:Read('opener') |
||||
OpenerAPL:AddSpell( |
||||
Moonfire:CastableIf(function(self) |
||||
return opener == 'moonfire' and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Defensive spells |
||||
local ironfur = myconf:Read('ironfur') |
||||
local ironfurpercent = myconf:Read('ironfurpercent') |
||||
DefensivesAPL:AddSpell( |
||||
Ironfur:CastableIf(function(self) |
||||
return ironfur and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(Ironfur):IsUp() |
||||
and Player:GetHP() <= ironfurpercent |
||||
end):SetTarget(Player) |
||||
) |
||||
-- Heal yourself with Frenzied Regeneration if your health ever dips low |
||||
local fregen = myconf:Read('fregen') |
||||
local fregenpercent = myconf:Read('fregenpercent') |
||||
DefensivesAPL:AddSpell( |
||||
FrenziedRegeneration:CastableIf(function(self) |
||||
return fregen and self:IsKnownAndUsable() and Player:GetHP() <= fregenpercent |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Utility spells |
||||
local skullbash = myconf:Read('skullbash') |
||||
UtilityAPL:AddSpell( |
||||
SkullBash:CastableIf(function(self) |
||||
return skullbash and InterruptTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(InterruptTarget) |
||||
) |
||||
|
||||
-- Single Target Action Priority List |
||||
-- Bear Form |
||||
STAPL:AddSpell( |
||||
BearForm:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:GetAuras():FindMy(BearForm):IsUp() |
||||
end):SetTarget(Player) |
||||
) |
||||
-- Auto Attack |
||||
STAPL:AddSpell( |
||||
AutoAttack:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not IsCurrentSpell(AutoAttack) and Player:InMelee(Target) |
||||
end):SetTarget(Target) |
||||
) |
||||
-- Opener spells |
||||
STAPL:AddSpell( |
||||
Moonfire:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Target:GetAuras():FindMy(MoonfireDebuff):IsUp() |
||||
end):SetTarget(Target) |
||||
) |
||||
-- Spend your rage on Maul as required |
||||
STAPL:AddSpell( |
||||
Maul:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and Player:InMelee(Target) |
||||
end):SetTarget(Target) |
||||
) |
||||
-- Maintain Moonfire on as many mobs as possible |
||||
-- Thrash on cooldown |
||||
STAPL:AddSpell( |
||||
Thrash:CastableIf(function(self) |
||||
return not Target:GetAuras():FindMy(ThrashDebuff):IsUp() and Player:InMelee(Target) |
||||
end):SetTarget(Target) |
||||
) |
||||
-- Mangle on cooldown |
||||
STAPL:AddSpell( |
||||
Mangle:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and Player:InMelee(Target) |
||||
end):SetTarget(Target) |
||||
) |
||||
-- Fill your empty GCDs with Swipe |
||||
STAPL:AddSpell( |
||||
Swipe:CastableIf(function(self) |
||||
return not self:IsOnCooldown() and Player:InMelee(Target) |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Module that dictates APL flow |
||||
GuardianModule:Sync(function() |
||||
if not Player:IsAffectingCombat() then |
||||
RestingAPL:Execute() |
||||
end |
||||
if not Player:IsAffectingCombat() and Target:Exists() and Target:IsHostile() and not Target:IsDead() then |
||||
OpenerAPL:Execute() |
||||
end |
||||
if Player:IsAffectingCombat() and Target:Exists() and Target:IsHostile() and not Target:IsDead() then |
||||
DefensivesAPL:Execute() |
||||
STAPL:Execute() |
||||
end |
||||
end) |
||||
Bastion:Register(GuardianModule) |
||||
|
||||
local tab1 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { shadpr = { type = 'label', label = 'Open Combat' } }, |
||||
|
||||
[2] = { opener = { type = 'dropdown', label = 'Opener', column = 6, order = 1, |
||||
options = { |
||||
{ text = 'Moonfire', value = 'moonfire'}, |
||||
{ text = 'None', value = 'none'}, |
||||
}, |
||||
initialValue = myconf:Read('opener', 'moonfire'), |
||||
onValueChanged = function(_, value) myconf:Write('opener', value) end }, }, |
||||
|
||||
[3] = { shadpr = { type = 'label', label = 'Buffs' } }, |
||||
|
||||
[4] = { motw = { type = 'checkbox', label = 'Mark of the Wild', column = 12, order = 1, |
||||
initialValue = myconf:Read('motw', false), |
||||
onValueChanged = function(_, flag) myconf:Write('motw', flag) end }, }, |
||||
|
||||
[5] = { shadpr = { type = 'label', label = 'Defensives' } }, |
||||
|
||||
[6] = { shield1 = { type = 'checkbox', label = 'Ironfur', column = 6, order = 1, |
||||
initialValue = myconf:Read('ironfur', false), |
||||
onValueChanged = function(_, flag) myconf:Write('ironfur', flag) end }, |
||||
|
||||
shield2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('ironfurpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('ironfurpercent', value) end }, }, |
||||
|
||||
[7] = { dispersion1 = { type = 'checkbox', label = 'Frenzied Regeneration', column = 6, order = 1, |
||||
initialValue = myconf:Read('fregen', false), |
||||
onValueChanged = function(_, flag) myconf:Write('fregen', flag) end }, |
||||
|
||||
dispersion2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('fregenpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('fregenpercent', value) end }, }, |
||||
|
||||
[8] = { shadpr = { type = 'label', label = 'Interrupts' } }, |
||||
|
||||
[9] = { silence = { type = 'checkbox', label = 'Skull Bash on CD', column = 12, order = 1, |
||||
initialValue = myconf:Read('skullbash', false), |
||||
onValueChanged = function(_, flag) myconf:Write('skullbash', flag) end }, }, |
||||
|
||||
[10] = { shadpr = { type = 'header', label = 'Purify Disease' } }, |
||||
|
||||
[11] = { incombat = { type = 'checkbox', label = 'In Combat', column = 6, order = 1, |
||||
initialValue = myconf:Read('purifyic', false), |
||||
onValueChanged = function(_, flag) myconf:Write('purifyic', flag) end }, |
||||
|
||||
outcombat = { type = 'checkbox', label = 'Out of Combat', column = 6, order = 2, |
||||
initialValue = myconf:Read('purifyooc', false), |
||||
onValueChanged = function(_, flag) myconf:Write('purifyooc', flag) end }, }, |
||||
|
||||
[12] = { shadpr = { type = 'header', label = 'Dispel Magic' } }, |
||||
|
||||
[13] = { incombat = { type = 'checkbox', label = 'In Combat', column = 12, order = 1, |
||||
initialValue = myconf:Read('dispelic', false), |
||||
onValueChanged = function(_, flag) myconf:Write('dispelic', flag) end }, }, |
||||
|
||||
[14] = { shadpr = { type = 'header', label = 'Dispel Delay Time' } }, |
||||
|
||||
[15] = { delay = { type = 'slider', label = 'In seconds', column = 6, order = 1, |
||||
min = 0.5, max = 2, precision = 1, |
||||
initialValue = myconf:Read('dispeldelay', 1), |
||||
onValueChanged = function(_, value) myconf:Write('dispeldelay', value) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local tab2 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { shadpr = { type = 'header', label = 'Player Healing' } }, |
||||
|
||||
[2] = { incombat = { type = 'checkbox', label = 'In Combat Healing', column = 6, order = 1, |
||||
initialValue = myconf:Read('playericheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('playericheal', flag) end }, |
||||
|
||||
outcombat = { type = 'checkbox', label = 'Out of Combat Healing', column = 6, order = 2, |
||||
initialValue = myconf:Read('playeroocheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('playeroocheal', flag) end }, }, |
||||
|
||||
[3] = { shadowmend1 = { type = 'checkbox', label = 'Shadow Mend', column = 6, order = 1, |
||||
initialValue = myconf:Read('shadowmend', false), |
||||
onValueChanged = function(_, flag) myconf:Write('shadowmend', flag) end }, |
||||
|
||||
shadowmend2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('shadowmendpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('shadowmendpercent', value) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local guardianconfig = { |
||||
layoutConfig = { padding = { top = 30 } }, |
||||
rows = { |
||||
[1] = { |
||||
container = { |
||||
type = 'tab', |
||||
fullSize = true, |
||||
tabs = { |
||||
{ |
||||
name = 'player', |
||||
title = 'Player Settings', |
||||
layout = tab1 |
||||
}, |
||||
{ |
||||
name = 'group', |
||||
title = 'Placeholder', |
||||
layout = tab2 |
||||
} |
||||
}, |
||||
} |
||||
}, |
||||
}, |
||||
} |
||||
Bastion.settingstemplate(guardianconfig, 'Guardian Druid', 400, 600, 1.00, 0.49, 0.04) -- config, Title of Settings Frame, Width, Height, ClassRGB |
||||
|
||||
-- Class colours |
||||
-- Death Knight 0.77 0.12 0.23 Red |
||||
-- Demon Hunter 0.64 0.19 0.79 Dark Magenta |
||||
-- Druid 1.00 0.49 0.04 Orange |
||||
-- Evoker 0.20 0.58 0.50 Dark Emerald |
||||
-- Hunter 0.67 0.83 0.45 Green |
||||
-- Mage 0.25 0.78 0.92 Light Blue |
||||
-- Monk 0.00 1.00 0.60 Spring Green |
||||
-- Paladin 0.96 0.55 0.73 Pink |
||||
-- Priest 1.00 1.00 1.00 White |
||||
-- Rogue 1.00 0.96 0.41 Yellow |
||||
-- Shaman 0.00 0.44 0.87 Blue |
||||
-- Warlock 0.53 0.53 0.93 Purple |
||||
-- Warrior 0.78 0.61 0.43 Tan |
@ -0,0 +1,476 @@ |
||||
local Tinkr, Bastion = ... |
||||
|
||||
local HolyModule = Bastion.Module:New('holypriest') |
||||
local Evaluator = Tinkr.Util.Evaluator |
||||
local Player = Bastion.UnitManager:Get('player') |
||||
local None = Bastion.UnitManager:Get('none') |
||||
local Target = Bastion.UnitManager:Get('target') |
||||
|
||||
local myconf = Tinkr.Util.Config:New('holy_priest') -- for saving variables |
||||
|
||||
local ArcaneTorrent = Bastion.SpellBook:GetSpell(232633) |
||||
local AutoAttack = Bastion.SpellBook:GetSpell(6603) |
||||
local AngelicFeather = Bastion.SpellBook:GetSpell(121536) |
||||
local DesperatePrayer = Bastion.SpellBook:GetSpell(19236) |
||||
local DispelMagic = Bastion.SpellBook:GetSpell(528) |
||||
local Fade = Bastion.SpellBook:GetSpell(586) |
||||
local FlashHeal = Bastion.SpellBook:GetSpell(2061) |
||||
local HolyNova = Bastion.SpellBook:GetSpell(132157) |
||||
local HolyWordSalvation = Bastion.SpellBook:GetSpell(265202) |
||||
local LeapofFaith = Bastion.SpellBook:GetSpell(73325) |
||||
local Levitate = Bastion.SpellBook:GetSpell(1706) |
||||
local MassDispel = Bastion.SpellBook:GetSpell(32375) |
||||
local MindSoothe = Bastion.SpellBook:GetSpell(453) |
||||
local MindVision = Bastion.SpellBook:GetSpell(2096) |
||||
local PowerInfusion = Bastion.SpellBook:GetSpell(10060) |
||||
local PowerWordFortitude = Bastion.SpellBook:GetSpell(21562) |
||||
local PowerWordLife = Bastion.SpellBook:GetSpell(373481) |
||||
local PowerWordShield = Bastion.SpellBook:GetSpell(17) |
||||
local PrayerofMending = Bastion.SpellBook:GetSpell(33076) |
||||
local PsychicScream = Bastion.SpellBook:GetSpell(8122) |
||||
local Renew = Bastion.SpellBook:GetSpell(139) |
||||
local Resurrection = Bastion.SpellBook:GetSpell(2006) |
||||
local ShadowWordPain = Bastion.SpellBook:GetSpell(589) |
||||
local Shadowfiend = Bastion.SpellBook:GetSpell(34433) |
||||
local Smite = Bastion.SpellBook:GetSpell(585) |
||||
local FocusedWill = Bastion.SpellBook:GetSpell(45243) |
||||
local CircleofHealing = Bastion.SpellBook:GetSpell(204883) |
||||
local DivineHymn = Bastion.SpellBook:GetSpell(64843) |
||||
local DivineWord = Bastion.SpellBook:GetSpell(372760) |
||||
local GuardianSpirit = Bastion.SpellBook:GetSpell(47788) |
||||
local Halo = Bastion.SpellBook:GetSpell(120517) |
||||
local Heal = Bastion.SpellBook:GetSpell(2060) |
||||
local HolyFire = Bastion.SpellBook:GetSpell(14914) |
||||
local HolyWordSanctify = Bastion.SpellBook:GetSpell(34861) |
||||
local HolyWordSerenity = Bastion.SpellBook:GetSpell(2050) |
||||
local Lightweaver = Bastion.SpellBook:GetSpell(390993) |
||||
local MassResurrection = Bastion.SpellBook:GetSpell(212036) |
||||
local PrayerofHealing = Bastion.SpellBook:GetSpell(596) |
||||
local Purify = Bastion.SpellBook:GetSpell(527) |
||||
local SurgeofLight = Bastion.SpellBook:GetSpell(114255) |
||||
local SymbolofHope = Bastion.SpellBook:GetSpell(64901) |
||||
local MindBlast = Bastion.SpellBook:GetSpell(14914) |
||||
|
||||
local Lowest = Bastion.UnitManager:CreateCustomUnit('lowest', function(unit) |
||||
local lowest = nil |
||||
local lowestHP = math.huge |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
local hp = unit:GetHP() |
||||
if hp < lowestHP then |
||||
lowest = unit |
||||
lowestHP = hp |
||||
end |
||||
end) |
||||
if not lowest then |
||||
lowest = Player |
||||
end |
||||
return lowest |
||||
end) |
||||
|
||||
local Tank = Bastion.UnitManager:CreateCustomUnit('tank', function(unit) |
||||
local tank = nil |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if unit:IsDead() then return false end |
||||
if unit:IsTank() then |
||||
tank = unit |
||||
return true |
||||
end |
||||
return false |
||||
end) |
||||
if tank == nil then |
||||
tank = Player |
||||
end |
||||
return tank |
||||
end) |
||||
|
||||
local Healer = Bastion.UnitManager:CreateCustomUnit('healer', function(unit) |
||||
local healer = nil |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if unit:IsDead() then return false end |
||||
if unit:IsHealer() then |
||||
healer = unit |
||||
return true |
||||
end |
||||
return false |
||||
end) |
||||
if healer == nil then |
||||
healer = Player |
||||
end |
||||
return healer |
||||
end) |
||||
|
||||
local PurifyUnit = Bastion.UnitManager:CreateCustomUnit('dispel', function(unit) |
||||
local lowest = nil |
||||
local lowestHP = math.huge |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if not unit:IsDead() and Player:CanSee(unit) and |
||||
unit:GetAuras():HasAnyDispelableAura(Purify) then |
||||
local hp = unit:GetHP() |
||||
if hp < lowestHP then |
||||
lowest = unit |
||||
lowestHP = hp |
||||
end |
||||
end |
||||
end) |
||||
if lowest == nil then |
||||
lowest = None |
||||
end |
||||
return lowest |
||||
end) |
||||
|
||||
local SanctifyUnit = Bastion.UnitManager:CreateCustomUnit('sanctify', function(unit) |
||||
local lowest = nil |
||||
local lowestHP = math.huge |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if Player:CanSee(unit) and unit:GetPartyHPAround(10, 70) >= 5 |
||||
then |
||||
local hp = unit:GetHP() |
||||
if hp < lowestHP then |
||||
lowest = unit |
||||
lowestHP = hp |
||||
end |
||||
end |
||||
end) |
||||
if lowest == nil then |
||||
lowest = None |
||||
end |
||||
return lowest |
||||
end) |
||||
|
||||
local CoHUnit = Bastion.UnitManager:CreateCustomUnit('coh', function(unit) |
||||
local lowest = nil |
||||
local lowestHP = math.huge |
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if Player:CanSee(unit) and unit:GetPartyHPAround(30, 80) >= 4 |
||||
then |
||||
local hp = unit:GetHP() |
||||
if hp < lowestHP then |
||||
lowest = unit |
||||
lowestHP = hp |
||||
end |
||||
end |
||||
end) |
||||
if lowest == nil then |
||||
lowest = None |
||||
end |
||||
return lowest |
||||
end) |
||||
|
||||
local Explosive = Bastion.UnitManager:CreateCustomUnit('explosive', function(unit) |
||||
local explosive = nil |
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then return false end |
||||
if not Player:CanSee(unit) then return false end |
||||
if Player:GetDistance(unit) > 40 then return false end |
||||
if Player:InMelee(unit) and unit:GetID() == 120651 and Player:IsFacing(unit) then |
||||
explosive = unit |
||||
return true |
||||
end |
||||
end) |
||||
if explosive == nil then |
||||
explosive = None |
||||
end |
||||
return explosive |
||||
end) |
||||
|
||||
local RestingAPL = Bastion.APL:New('resting') |
||||
local HealAPL = Bastion.APL:New('heal') |
||||
local DamageAPL = Bastion.APL:New('damage') |
||||
|
||||
-- Resting - Out of Combat Actions |
||||
local usepwf = myconf:Read('pwf') |
||||
RestingAPL:AddSpell( |
||||
PowerWordFortitude:CastableIf(function(self) |
||||
return usepwf and self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(PowerWordFortitude):IsUp() and not IsMounted() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- HealAPL - Healing here |
||||
-- Purify |
||||
HealAPL:AddSpell( |
||||
Purify:CastableIf(function(self) |
||||
return PurifyUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and |
||||
self:IsInRange(PurifyUnit) and PurifyUnit:GetAuras():HasAnyDispelableAura(Purify) |
||||
end):SetTarget(PurifyUnit) |
||||
) |
||||
-- Symbol of Hope |
||||
HealAPL:AddSpell( |
||||
SymbolofHope:CastableIf(function(self) |
||||
return Healer:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Healer:GetPP() <= 50 |
||||
end):SetTarget(Player) |
||||
) |
||||
-- Guardian Spirit |
||||
HealAPL:AddSpell( |
||||
GuardianSpirit:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Tank:GetHP() <= 40 |
||||
end):SetTarget(Tank) |
||||
) |
||||
-- Flash Heal with Surge of Light |
||||
HealAPL:AddSpell( |
||||
FlashHeal:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetAuras():FindMy(SurgeofLight):IsUp() |
||||
end):SetTarget(Lowest) |
||||
) |
||||
-- Holy Word: Salvation when the majority of the raid is heavily injured |
||||
HealAPL:AddSpell( |
||||
HolyWordSalvation:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetPartyHPAround(40, 50) >= 5 |
||||
and not Player:IsMoving() |
||||
end):SetTarget(Player) |
||||
) |
||||
-- Divine Hymn when the majority of the raid is heavily injured |
||||
HealAPL:AddSpell( |
||||
DivineHymn:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetPartyHPAround(40, 40) >= 5 |
||||
and not Player:IsMoving() |
||||
end):SetTarget(Player) |
||||
) |
||||
-- Divine Word followed by Holy Word: Sanctify (if available) on a cluster of injured allies |
||||
-- Divine Word followed by Holy Word: Serenity (if available) on an injured ally |
||||
HealAPL:AddSpell( |
||||
DivineWord:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(DivineWord):IsUp() |
||||
and (Lowest:GetHP() <= 60 or SanctifyUnit:GetPartyHPAround(10, 60) >= 5) |
||||
end):SetTarget(Player) |
||||
) |
||||
-- Holy Word: Sanctify when a cluster of your raid is injured |
||||
HealAPL:AddSpell( |
||||
HolyWordSanctify:CastableIf(function(self) |
||||
return SanctifyUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
and Player:CanSee(SanctifyUnit) and SanctifyUnit:GetPartyHPAround(10, 70) >= 5 |
||||
end):SetTarget(None):OnCast(function(self) |
||||
local loc = SanctifyUnit:GetPosition() |
||||
self:Click(loc) |
||||
end) |
||||
) |
||||
-- Holy Word: Serenity on an injured ally |
||||
HealAPL:AddSpell( |
||||
HolyWordSerenity:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Lowest:GetHP() <= 70 |
||||
end):SetTarget(Lowest) |
||||
) |
||||
-- Circle of Healing on cooldown when at least 4 allies are injured |
||||
HealAPL:AddSpell( |
||||
CircleofHealing:CastableIf(function(self) |
||||
return CoHUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
and Player:CanSee(CoHUnit) and CoHUnit:GetPartyHPAround(30, 80) >= 4 |
||||
end):SetTarget(CoHUnit) |
||||
) |
||||
-- Prayer of Mending on cooldown, usually on the active tank |
||||
HealAPL:AddSpell( |
||||
PrayerofMending:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Tank:GetHP() <= 95 |
||||
end):SetTarget(Tank) |
||||
) |
||||
-- Halo when most of your raid is injured |
||||
HealAPL:AddSpell( |
||||
Halo:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetPartyHPAround(30, 70) >= 5 |
||||
end):SetTarget(Player) |
||||
) |
||||
-- Power Word: Life for emergency triage on an ally below 35% hitpoints |
||||
HealAPL:AddSpell( |
||||
PowerWordLife:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Tank:GetHP() <= 35 |
||||
end):SetTarget(Tank) |
||||
) |
||||
-- Alternate between Flash Heal and Heal and use Lightweaver buff |
||||
HealAPL:AddSpell( |
||||
Heal:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetAuras():FindMy(Lightweaver):IsUp() |
||||
and Lowest:GetHP() <= 90 |
||||
end):SetTarget(Lowest) |
||||
) |
||||
HealAPL:AddSpell( |
||||
FlashHeal:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(Lightweaver):IsUp() |
||||
and Lowest:GetHP() <= 90 |
||||
end):SetTarget(Lowest) |
||||
) |
||||
|
||||
-- DamageAPL - DPS spells here |
||||
-- Cast Shadow Word: Pain if you're moving and nothing else is available |
||||
DamageAPL:AddSpell( |
||||
ShadowWordPain:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Target:GetAuras():FindMy(ShadowWordPain):IsUp() |
||||
end):SetTarget(Target) |
||||
) |
||||
-- Cast Smite |
||||
DamageAPL:AddSpell( |
||||
Smite:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Module that dictates APL flow |
||||
HolyModule:Sync(function() |
||||
-- Bastion:Print(Lowest) |
||||
-- if not Player:IsAffectingCombat() then |
||||
-- RestingAPL:Execute() |
||||
-- end |
||||
HealAPL:Execute() |
||||
-- if Player:IsAffectingCombat() and Target:Exists() and Target:IsHostile() then |
||||
-- DamageAPL:Execute() |
||||
-- end |
||||
end) |
||||
Bastion:Register(HolyModule) |
||||
|
||||
local tab1 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { shadpr = { type = 'label', label = 'Open Combat' } }, |
||||
|
||||
[2] = { opener = { type = 'dropdown', label = 'Opener', column = 6, order = 1, |
||||
options = { |
||||
{ text = 'Shadow Word: Pain', value = 'swp'}, |
||||
{ text = 'Shadow Crash', value = 'crash'}, |
||||
{ text = 'None', value = 'none'}, |
||||
}, |
||||
initialValue = myconf:Read('opener', 'shield'), |
||||
onValueChanged = function(_, value) myconf:Write('opener', value) end }, }, |
||||
|
||||
[3] = { shadpr = { type = 'label', label = 'Buffs' } }, |
||||
|
||||
[4] = { pwf = { type = 'checkbox', label = 'Power Word: Fortitude', column = 12, order = 1, |
||||
initialValue = myconf:Read('pwf', false), |
||||
onValueChanged = function(_, flag) myconf:Write('pwf', flag) end }, }, |
||||
|
||||
[5] = { shadpr = { type = 'header', label = 'Defensives' } }, |
||||
|
||||
[6] = { shield1 = { type = 'checkbox', label = 'Power Word: Shield', column = 6, order = 1, |
||||
initialValue = myconf:Read('pws', false), |
||||
onValueChanged = function(_, flag) myconf:Write('pws', flag) end }, |
||||
|
||||
shield2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('pwspercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('pwspercent', value) end }, }, |
||||
|
||||
[7] = { dispersion1 = { type = 'checkbox', label = 'Dispersion', column = 6, order = 1, |
||||
initialValue = myconf:Read('dispersion', false), |
||||
onValueChanged = function(_, flag) myconf:Write('dispersion', flag) end }, |
||||
|
||||
dispersion2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('dispersionpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('dispersionpercent', value) end }, }, |
||||
|
||||
[8] = { shadpr = { type = 'header', label = 'Interrupts' } }, |
||||
|
||||
[9] = { silence = { type = 'checkbox', label = 'Silence on CD', column = 6, order = 1, |
||||
initialValue = myconf:Read('silence', false), |
||||
onValueChanged = function(_, flag) myconf:Write('silence', flag) end }, |
||||
|
||||
horror = { type = 'checkbox', label = 'Psychic Horror on CD', column = 6, order = 2, |
||||
initialValue = myconf:Read('horror', false), |
||||
onValueChanged = function(_, flag) myconf:Write('horror', flag) end }, }, |
||||
|
||||
[10] = { shadpr = { type = 'header', label = 'Purify Disease' } }, |
||||
|
||||
[11] = { incombat = { type = 'checkbox', label = 'In Combat', column = 6, order = 1, |
||||
initialValue = myconf:Read('purifyic', false), |
||||
onValueChanged = function(_, flag) myconf:Write('purifyic', flag) end }, |
||||
|
||||
outcombat = { type = 'checkbox', label = 'Out of Combat', column = 6, order = 2, |
||||
initialValue = myconf:Read('purifyooc', false), |
||||
onValueChanged = function(_, flag) myconf:Write('purifyooc', flag) end }, }, |
||||
|
||||
[12] = { shadpr = { type = 'header', label = 'Dispel Magic' } }, |
||||
|
||||
[13] = { incombat = { type = 'checkbox', label = 'In Combat', column = 12, order = 1, |
||||
initialValue = myconf:Read('dispelic', false), |
||||
onValueChanged = function(_, flag) myconf:Write('dispelic', flag) end }, }, |
||||
|
||||
[14] = { shadpr = { type = 'header', label = 'Dispel Delay Time' } }, |
||||
|
||||
[15] = { delay = { type = 'slider', label = 'In seconds', column = 6, order = 1, |
||||
min = 0.5, max = 2, precision = 1, |
||||
initialValue = myconf:Read('dispeldelay', 1), |
||||
onValueChanged = function(_, value) myconf:Write('dispeldelay', value) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local tab2 = |
||||
{ |
||||
layoutConfig = { padding = { top = 40 } }, |
||||
rows = { |
||||
[1] = { shadpr = { type = 'header', label = 'Player Healing' } }, |
||||
|
||||
[2] = { incombat = { type = 'checkbox', label = 'In Combat Healing', column = 6, order = 1, |
||||
initialValue = myconf:Read('playericheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('playericheal', flag) end }, |
||||
|
||||
outcombat = { type = 'checkbox', label = 'Out of Combat Healing', column = 6, order = 2, |
||||
initialValue = myconf:Read('playeroocheal', false), |
||||
onValueChanged = function(_, flag) myconf:Write('playeroocheal', flag) end }, }, |
||||
|
||||
[3] = { shadowmend1 = { type = 'checkbox', label = 'Shadow Mend', column = 6, order = 1, |
||||
initialValue = myconf:Read('shadowmend', false), |
||||
onValueChanged = function(_, flag) myconf:Write('shadowmend', flag) end }, |
||||
|
||||
shadowmend2 = { type = 'slider', label = 'Player Health', column = 6, order = 2, |
||||
min = 1, max = 100, precision = 0, |
||||
initialValue = myconf:Read('shadowmendpercent', 35), |
||||
onValueChanged = function(_, value) myconf:Write('shadowmendpercent', value) end }, }, |
||||
|
||||
}, |
||||
} |
||||
|
||||
local holypriestconfig = { |
||||
layoutConfig = { padding = { top = 30 } }, |
||||
rows = { |
||||
[1] = { |
||||
container = { |
||||
type = 'tab', |
||||
fullSize = true, |
||||
tabs = { |
||||
{ |
||||
name = 'player', |
||||
title = 'Player Settings', |
||||
layout = tab1 |
||||
}, |
||||
{ |
||||
name = 'group', |
||||
title = 'Placeholder', |
||||
layout = tab2 |
||||
} |
||||
}, |
||||
} |
||||
}, |
||||
}, |
||||
} |
||||
Bastion.settingstemplate(holypriestconfig, 'Holy Priest', 400, 600, 1.00, 1.00, 1.00) --, 0.00, 0.44, 0.87, 'enhsha') --Title of Settings Frame, Width, Height, ClassRGB, Rotation Name |
||||
|
||||
-- Class colours |
||||
-- Death Knight 0.77 0.12 0.23 Red |
||||
-- Demon Hunter 0.64 0.19 0.79 Dark Magenta |
||||
-- Druid 1.00 0.49 0.04 Orange |
||||
-- Evoker 0.20 0.58 0.50 Dark Emerald |
||||
-- Hunter 0.67 0.83 0.45 Green |
||||
-- Mage 0.25 0.78 0.92 Light Blue |
||||
-- Monk 0.00 1.00 0.60 Spring Green |
||||
-- Paladin 0.96 0.55 0.73 Pink |
||||
-- Priest 1.00 1.00 1.00 White |
||||
-- Rogue 1.00 0.96 0.41 Yellow |
||||
-- Shaman 0.00 0.44 0.87 Blue |
||||
-- Warlock 0.53 0.53 0.93 Purple |
||||
-- Warrior 0.78 0.61 0.43 Tan |
@ -1,608 +0,0 @@ |
||||
local Tinkr, Bastion = ... |
||||
|
||||
local OutlawModule = Bastion.Module:New('outlaw') |
||||
local Evaluator = Tinkr.Util.Evaluator |
||||
local Player = Bastion.UnitManager:Get('player') |
||||
local None = Bastion.UnitManager:Get('none') |
||||
local Target = Bastion.UnitManager:Get('target') |
||||
|
||||
local RollTheBones = Bastion.SpellBook:GetSpell(315508) |
||||
local SliceAndDice = Bastion.SpellBook:GetSpell(315496) |
||||
local BetweenTheEyes = Bastion.SpellBook:GetSpell(315341) |
||||
local BladeRush = Bastion.SpellBook:GetSpell(271877) |
||||
local Vanish = Bastion.SpellBook:GetSpell(1856) |
||||
local Dispatch = Bastion.SpellBook:GetSpell(2098) |
||||
local Ambush = Bastion.SpellBook:GetSpell(8676) |
||||
local Stealth = Bastion.SpellBook:GetSpell(1784) |
||||
local PistolShot = Bastion.SpellBook:GetSpell(185763) |
||||
local Opportunity = Bastion.SpellBook:GetSpell(195627) |
||||
local SinisterStrike = Bastion.SpellBook:GetSpell(193315) |
||||
local GrandMelee = Bastion.SpellBook:GetSpell(193358) |
||||
local Broadside = Bastion.SpellBook:GetSpell(193356) |
||||
local TrueBearing = Bastion.SpellBook:GetSpell(193359) |
||||
local RuthlessPrecision = Bastion.SpellBook:GetSpell(193357) |
||||
local SkullAndCrossbones = Bastion.SpellBook:GetSpell(199603) |
||||
local BuriedTreasure = Bastion.SpellBook:GetSpell(199600) |
||||
local AdrenalineRush = Bastion.SpellBook:GetSpell(13750) |
||||
local ShadowDance = Bastion.SpellBook:GetSpell(185313) |
||||
local Audacity = Bastion.SpellBook:GetSpell(381845) |
||||
local Flagellation = Bastion.SpellBook:GetSpell(323654) |
||||
local Dreadblades = Bastion.SpellBook:GetSpell(343142) |
||||
local JollyRoger = Bastion.SpellBook:GetSpell(199603) |
||||
local BladeFlurry = Bastion.SpellBook:GetSpell(13877) |
||||
local Kick = Bastion.SpellBook:GetSpell(1766) |
||||
local MarkedForDeath = Bastion.SpellBook:GetSpell(137619) |
||||
local CrimsonVial = Bastion.SpellBook:GetSpell(185311) |
||||
local Shiv = Bastion.SpellBook:GetSpell(5938) |
||||
local KidneyShot = Bastion.SpellBook:GetSpell(408) |
||||
local InstantPoison = Bastion.SpellBook:GetSpell(315584) |
||||
local AtrophicPosion = Bastion.SpellBook:GetSpell(381637) |
||||
local Evasion = Bastion.SpellBook:GetSpell(5277) |
||||
local TricksOfTheTrade = Bastion.SpellBook:GetSpell(57934) |
||||
local CheapShot = Bastion.SpellBook:GetSpell(1833) |
||||
local BagOfTricks = Bastion.SpellBook:GetSpell(312411) |
||||
local AutoAttack = Bastion.SpellBook:GetSpell(6603) |
||||
|
||||
local IrideusFragment = Bastion.ItemBook:GetItem(193743) |
||||
local Healthstone = Bastion.ItemBook:GetItem(5512) |
||||
local WindscarWhetstone = Bastion.ItemBook:GetItem(137486) |
||||
|
||||
local PurgeTarget = Bastion.UnitManager:CreateCustomUnit('purge', function(unit) |
||||
local purge = nil |
||||
|
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if unit:GetAuras():HasAnyStealableAura() then |
||||
purge = unit |
||||
return true |
||||
end |
||||
end) |
||||
|
||||
if purge == nil then |
||||
purge = None |
||||
end |
||||
|
||||
return purge |
||||
end) |
||||
|
||||
local KickTarget = Bastion.UnitManager:CreateCustomUnit('kick', function(unit) |
||||
local purge = nil |
||||
|
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if Player:InMelee(unit) and unit:IsInterruptible(5) and Player:IsFacing(unit) then |
||||
purge = unit |
||||
return true |
||||
end |
||||
end) |
||||
|
||||
if purge == nil then |
||||
purge = None |
||||
end |
||||
|
||||
return purge |
||||
end) |
||||
|
||||
local Tank = Bastion.UnitManager:CreateCustomUnit('tank', function(unit) |
||||
local tank = nil |
||||
|
||||
Bastion.UnitManager:EnumFriends(function(unit) |
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if unit:IsTank() then |
||||
tank = unit |
||||
return true |
||||
end |
||||
|
||||
return false |
||||
end) |
||||
|
||||
if tank == nil then |
||||
tank = None |
||||
end |
||||
|
||||
return tank |
||||
end) |
||||
|
||||
local Explosive = Bastion.UnitManager:CreateCustomUnit('explosive', function(unit) |
||||
local explosive = nil |
||||
|
||||
Bastion.UnitManager:EnumEnemies(function(unit) |
||||
if unit:IsDead() then |
||||
return false |
||||
end |
||||
|
||||
if not Player:CanSee(unit) then |
||||
return false |
||||
end |
||||
|
||||
if Player:GetDistance(unit) > 40 then |
||||
return false |
||||
end |
||||
|
||||
if Player:InMelee(unit) and unit:GetID() == 120651 and Player:IsFacing(unit) then |
||||
|
||||
explosive = unit |
||||
return true |
||||
end |
||||
end) |
||||
|
||||
if explosive == nil then |
||||
explosive = None |
||||
end |
||||
|
||||
return explosive |
||||
end) |
||||
|
||||
local DefaultAPL = Bastion.APL:New('default') |
||||
local AOEAPL = Bastion.APL:New('aoe') |
||||
local SpecialAPL = Bastion.APL:New('special') |
||||
|
||||
SpecialAPL:AddSpell( |
||||
Kick:CastableIf(function(self) |
||||
return KickTarget:Exists() and Player:InMelee(KickTarget) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() |
||||
end):SetTarget(KickTarget) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
SinisterStrike:CastableIf(function(self) |
||||
return Explosive:Exists() and not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Explosive) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
KidneyShot:CastableIf(function(self) |
||||
return KickTarget:Exists() and Player:InMelee(KickTarget) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
(Player:GetComboPoints(Target) >= 5 or |
||||
( |
||||
Player:GetComboPoints(Target) >= 4 and |
||||
(Player:GetAuras():FindMy(Broadside):IsUp() or Player:GetAuras():FindMy(Opportunity):IsUp()))) |
||||
|
||||
end):SetTarget(KickTarget) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
CheapShot:CastableIf(function(self) |
||||
return KickTarget:Exists() and Player:InMelee(KickTarget) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and Player:GetAuras():FindMy(Stealth):IsUp() |
||||
end):SetTarget(KickTarget) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
Stealth:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and not Player:IsAffectingCombat() and |
||||
not Player:GetAuras():FindMy(Stealth):IsUp() and not IsMounted() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
CrimsonVial:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetHealthPercent() < 70 |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
Shiv:CastableIf(function(self) |
||||
return PurgeTarget:Exists() and Player:InMelee(PurgeTarget) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and PurgeTarget:GetAuras():HasAnyStealableAura() |
||||
end):SetTarget(PurgeTarget) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
InstantPoison:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
not Player:GetAuras():FindMy(InstantPoison):IsUp() and not Player:IsMoving() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
AtrophicPosion:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
not Player:GetAuras():FindMy(AtrophicPosion):IsUp() and not Player:IsMoving() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
SpecialAPL:AddItem( |
||||
Healthstone:UsableIf(function(self) |
||||
return self:IsEquippedAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetHealthPercent() < 40 |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
TricksOfTheTrade:CastableIf(function(self) |
||||
return Tank:Exists() and self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:IsTanking(Target) |
||||
end):SetTarget(Tank) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
Evasion:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetHealthPercent() < 40 |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
SpecialAPL:AddItem( |
||||
IrideusFragment:UsableIf(function(self) |
||||
return self:IsEquippedAndUsable() and |
||||
not Player:IsCastingOrChanneling() and (Player:GetMeleeAttackers() > 2 or Target:IsBoss()) |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
SpecialAPL:AddItem( |
||||
WindscarWhetstone:UsableIf(function(self) |
||||
return self:IsEquippedAndUsable() and |
||||
not Player:IsCastingOrChanneling() and (Player:GetMeleeAttackers() > 2 or Target:IsBoss()) |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
SpecialAPL:AddSpell( |
||||
BagOfTricks:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Adrenaline Rush on cooldown. |
||||
DefaultAPL:AddSpell( |
||||
AdrenalineRush:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Roll the Bones if you have no combat enhancements active. |
||||
DefaultAPL:AddSpell( |
||||
RollTheBones:CastableIf(function(self) |
||||
local numBuffs = 0 |
||||
if Player:GetAuras():FindMy(Broadside):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(BuriedTreasure):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(GrandMelee):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(RuthlessPrecision):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(SkullAndCrossbones):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(TrueBearing):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
((not Player:GetAuras():FindMy(Broadside):IsUp() and |
||||
not Player:GetAuras():FindMy(TrueBearing):IsUp()) or numBuffs < 2) |
||||
end):SetTarget(Player) |
||||
) |
||||
-- Slice and Dice if at max, or -1 from maximum combo points with Broadside or Opportunity active, if missing or has has 12 or less seconds remaining. |
||||
DefaultAPL:AddSpell( |
||||
SliceAndDice:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
(Player:GetComboPoints(Target) >= 5 or |
||||
( |
||||
Player:GetComboPoints(Target) >= 4 and |
||||
(Player:GetAuras():FindMy(Broadside):IsUp() or Player:GetAuras():FindMy(Opportunity):IsUp()))) and |
||||
( |
||||
not Player:GetAuras():FindMy(SliceAndDice):IsUp() or |
||||
Player:GetAuras():FindMy(SliceAndDice):GetRemainingTime() <= 12 |
||||
) |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Between the Eyes on cooldown if at max, or -1 from maximum combo points with Broadside or Opportunity active. |
||||
DefaultAPL:AddSpell( |
||||
BetweenTheEyes:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
(Player:GetComboPoints(Target) >= 5 or |
||||
( |
||||
Player:GetComboPoints(Target) >= 4 and |
||||
(Player:GetAuras():FindMy(Broadside):IsUp() or Player:GetAuras():FindMy(Opportunity):IsUp()))) |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Dispatch if at max, or -1 from maximum combo points with Broadside or Opportunity active. |
||||
DefaultAPL:AddSpell( |
||||
Dispatch:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
(Player:GetComboPoints(Target) >= 5 or |
||||
( |
||||
Player:GetComboPoints(Target) >= 4 and |
||||
(Player:GetAuras():FindMy(Broadside):IsUp() or Player:GetAuras():FindMy(Opportunity):IsUp()))) |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Shadow Dance at or below 3 combo points, and do not have Audacity or Opportunity active and wait until you have at least 80 energy. While active Ambush becomes your highest priority builder. |
||||
DefaultAPL:AddSpell( |
||||
ShadowDance:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetComboPoints(Target) <= 3 and |
||||
not Player:GetAuras():FindMy(Audacity):IsUp() and |
||||
not Player:GetAuras():FindMy(Opportunity):IsUp() and |
||||
Player:GetPower() >= 80 |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Blade Rush if missing 50 or more energy and do not have Flagellation, Dreadblades or Shadow Dance active. |
||||
DefaultAPL:AddSpell( |
||||
BladeRush:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetPower() <= 50 and |
||||
not Player:GetAuras():FindMy(Flagellation):IsUp() and |
||||
not Player:GetAuras():FindMy(Dreadblades):IsUp() and |
||||
not Player:GetAuras():FindMy(ShadowDance):IsUp() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Vanish followed by Ambush if you won't overcap combo points and wait until you have at least 50 energy. |
||||
DefaultAPL:AddSpell( |
||||
Vanish:CastableIf(function(self) |
||||
return Tank:Exists() and Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetComboPoints(Target) <= 4 and |
||||
Player:GetPower() >= 50 and not Player:GetAuras():FindMy(Stealth):IsUp() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Pistol Shot if you have an Opportunity proc and won't overcap combo points. |
||||
DefaultAPL:AddSpell( |
||||
PistolShot:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetAuras():FindMy(Opportunity):IsUp() and |
||||
Player:GetComboPoints(Target) <= 4 |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Use Ambush Icon Ambush instead of Sinister Strike Icon Sinister Strike whenever it is available to cast from any of the procs or cooldowns. |
||||
DefaultAPL:AddSpell( |
||||
Ambush:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Sinister Strike if you won't overcap combo points. |
||||
DefaultAPL:AddSpell( |
||||
SinisterStrike:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetComboPoints(Target) < 5 |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- AOE APL |
||||
|
||||
-- Adrenaline Rush on cooldown. |
||||
AOEAPL:AddSpell( |
||||
AdrenalineRush:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Roll the Bones if you have no combat enhancements active. |
||||
-- Roll the Bones has a large outcome of buffs which include; Broadside, Buried Treasure, Grand Melee, Ruthless Precision, Skull and Crossbones, and True Bearing. The buffs you want to keep this tier are going to be Broadside and True Bearing as single buffs or any combination of 2 or more buffs. Any of the other 4 buffs as a single means it's worth recasting Roll the Bones as soon as you are able to. |
||||
|
||||
AOEAPL:AddSpell( |
||||
RollTheBones:CastableIf(function(self) |
||||
local numBuffs = 0 |
||||
if Player:GetAuras():FindMy(Broadside):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(BuriedTreasure):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(GrandMelee):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(RuthlessPrecision):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(SkullAndCrossbones):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
if Player:GetAuras():FindMy(TrueBearing):IsUp() then |
||||
numBuffs = numBuffs + 1 |
||||
end |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
((not Player:GetAuras():FindMy(Broadside):IsUp() and |
||||
not Player:GetAuras():FindMy(TrueBearing):IsUp()) or numBuffs < 2) |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Blade Flurry when missing. |
||||
AOEAPL:AddSpell( |
||||
BladeFlurry:CastableIf(function(self) |
||||
return self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
(not Player:GetAuras():FindMy(self):IsUp() or Player:GetAuras():FindMy(self):GetRemainingTime() <= 2) |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Slice and Dice if at max, or -1 from maximum combo points with Broadside or Opportunity active, if missing or has has 12 or less seconds remaining. |
||||
AOEAPL:AddSpell( |
||||
SliceAndDice:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
(Player:GetComboPoints(Target) >= 5 or |
||||
(Player:GetComboPoints(Target) >= 4 and |
||||
(Player:GetAuras():FindMy(Broadside):IsUp() or |
||||
Player:GetAuras():FindMy(Opportunity):IsUp()))) and |
||||
(not Player:GetAuras():FindMy(self):IsUp() or |
||||
Player:GetAuras():FindMy(self):GetRemainingTime() <= 12) |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Between the Eyes on cooldown if at max, or -1 from maximum combo points with Broadside or Opportunity active. |
||||
AOEAPL:AddSpell( |
||||
BetweenTheEyes:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
(Player:GetComboPoints(Target) >= 5 or |
||||
(Player:GetComboPoints(Target) >= 4 and |
||||
(Player:GetAuras():FindMy(Broadside):IsUp() or |
||||
Player:GetAuras():FindMy(Opportunity):IsUp()))) |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Dispatch if at max, or -1 from maximum combo points with Broadside or Opportunity active. |
||||
AOEAPL:AddSpell( |
||||
Dispatch:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
(Player:GetComboPoints(Target) >= 5 or |
||||
(Player:GetComboPoints(Target) >= 4 and |
||||
(Player:GetAuras():FindMy(Broadside):IsUp() or |
||||
Player:GetAuras():FindMy(Opportunity):IsUp()))) |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Shadow Dance at or below 3 combo points, and do not have Audacity or Opportunity active and wait until you have at least 80 energy. While active Ambush becomes your highest priority builder. |
||||
AOEAPL:AddSpell( |
||||
ShadowDance:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetComboPoints(Target) <= 3 and |
||||
not Player:GetAuras():FindMy(Audacity):IsUp() and |
||||
not Player:GetAuras():FindMy(Opportunity):IsUp() and |
||||
Player:GetPower() >= 80 |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Blade Rush if missing 50 or more energy and do not have Flagellation, Dreadblades or Shadow Dance active. |
||||
AOEAPL:AddSpell( |
||||
BladeRush:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetPower() >= 50 and |
||||
not Player:GetAuras():FindMy(Flagellation):IsUp() and |
||||
not Player:GetAuras():FindMy(Dreadblades):IsUp() and |
||||
not Player:GetAuras():FindMy(ShadowDance):IsUp() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Vanish followed by Ambush if you won't overcap combo points and wait until you have at least 50 energy. |
||||
AOEAPL:AddSpell( |
||||
Vanish:CastableIf(function(self) |
||||
return Tank:Exists() and Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetComboPoints(Target) < 5 and |
||||
Player:GetPower() >= 50 and not Player:GetAuras():FindMy(Stealth):IsUp() |
||||
end):SetTarget(Player) |
||||
) |
||||
|
||||
-- Pistol Shot if you have an Opportunity proc and won't overcap combo points. |
||||
AOEAPL:AddSpell( |
||||
PistolShot:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetAuras():FindMy(Opportunity):IsUp() and |
||||
Player:GetComboPoints(Target) < 5 |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
AOEAPL:AddSpell( |
||||
Ambush:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
-- Sinister Strike if you won't overcap combo points. |
||||
AOEAPL:AddSpell( |
||||
SinisterStrike:CastableIf(function(self) |
||||
return Target:Exists() and Player:InMelee(Target) and |
||||
self:IsKnownAndUsable() and |
||||
not Player:IsCastingOrChanneling() and |
||||
Player:GetComboPoints(Target) < 5 |
||||
end):SetTarget(Target) |
||||
) |
||||
|
||||
OutlawModule:Sync(function() |
||||
SpecialAPL:Execute() |
||||
if Player:GetMeleeAttackers() > 1 then |
||||
AOEAPL:Execute() |
||||
else |
||||
DefaultAPL:Execute() |
||||
end |
||||
end) |
||||
|
||||
Bastion:Register(OutlawModule) |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue