|
|
|
@ -37,6 +37,7 @@ local Dispersion = Bastion.SpellBook:GetSpell(47585) |
|
|
|
|
local Halo = Bastion.SpellBook:GetSpell(120644) |
|
|
|
|
local MindFlay = Bastion.SpellBook:GetSpell(15407) |
|
|
|
|
local MindFlayInsanity = Bastion.SpellBook:GetSpell(391399) |
|
|
|
|
local MindSear = Bastion.SpellBook:GetSpell(48045) |
|
|
|
|
local MindSpike = Bastion.SpellBook:GetSpell(73510) |
|
|
|
|
local Mindbender = Bastion.SpellBook:GetSpell(200174) |
|
|
|
|
local ShadowCrash = Bastion.SpellBook:GetSpell(205385) |
|
|
|
@ -113,6 +114,7 @@ local RestingAPL = Bastion.APL:New('resting') |
|
|
|
|
local OpenerAPL = Bastion.APL:New('opener') |
|
|
|
|
local STAPL = Bastion.APL:New('st') |
|
|
|
|
local AOEAPL = Bastion.APL:New('aoe') |
|
|
|
|
local DefensivesAPL = Bastion.APL:New('defensives') |
|
|
|
|
local UtilityAPL = Bastion.APL:New('utility') |
|
|
|
|
|
|
|
|
|
-- Resting - Out of Combat Actions |
|
|
|
@ -135,7 +137,7 @@ RestingAPL:AddSpell( |
|
|
|
|
local opener = myconf:Read('opener') |
|
|
|
|
OpenerAPL:AddSpell( |
|
|
|
|
ShadowCrash:CastableIf(function(self) |
|
|
|
|
return opener == 'crash' and Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return opener == 'crash' and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(None):OnCast(function(self) |
|
|
|
|
local loc = Target:GetPosition() |
|
|
|
|
self:Click(loc) |
|
|
|
@ -147,10 +149,31 @@ OpenerAPL:AddSpell( |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- Defensive spells |
|
|
|
|
-- Power Word: Shield |
|
|
|
|
local pws = myconf:Read('pws') |
|
|
|
|
local pwspercent = myconf:Read('pwspercent') |
|
|
|
|
DefensivesAPL:AddSpell( |
|
|
|
|
PowerWordShield:CastableIf(function(self) |
|
|
|
|
return pws and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMy(PowerWordShield):IsUp() |
|
|
|
|
and Player:GetHP() <= pwspercent |
|
|
|
|
end):SetTarget(Player) |
|
|
|
|
) |
|
|
|
|
-- Dispersion |
|
|
|
|
local dispersion = myconf:Read('dispersion') |
|
|
|
|
local dispersionpercent = myconf:Read('dispersionpercent') |
|
|
|
|
DefensivesAPL:AddSpell( |
|
|
|
|
Dispersion:CastableIf(function(self) |
|
|
|
|
return dispersion and self:IsKnownAndUsable() and Player:GetHP() <= dispersionpercent |
|
|
|
|
end):SetTarget(Player) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- Utility spells |
|
|
|
|
-- Interrupt with Silence |
|
|
|
|
local silence = myconf:Read('silence') |
|
|
|
|
UtilityAPL:AddSpell( |
|
|
|
|
Silence:CastableIf(function(self) |
|
|
|
|
return InterruptTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return silence and InterruptTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(InterruptTarget) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -164,38 +187,45 @@ STAPL:AddSpell( |
|
|
|
|
-- Cast Mindbender on cooldown |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
Mindbender:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Dark Ascension on cooldown |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
DarkAscension:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(Player) |
|
|
|
|
) |
|
|
|
|
-- Cast Power Infusion if Dark Ascension is active |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
PowerInfusion:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetAuras():FindMy(DarkAscension):IsUp() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetAuras():FindMy(DarkAscension):IsUp() |
|
|
|
|
end):SetTarget(Player) |
|
|
|
|
) |
|
|
|
|
-- Use offensive trinkets and potions. |
|
|
|
|
-- Cast Mind Blast if you have two charges |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
MindBlast:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and MindBlast:GetCharges() == 2 |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and MindBlast:GetCharges() == 2 |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Shadow Word: Death if Mindbender is active |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
ShadowWordDeath:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and checktotem("Mindbender") |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and checktotem("Mindbender") |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Mind Sear to avoid over capping Insanity, consider holding it small amounts of time for mobs to group up. 3+ targets |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
MindSear:CastableIf(function(self) |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Target:GetEnemies(10) >= 3 |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Devouring Plague if you're close to capping Insanity or the debuff will expire |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
DevouringPlague:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetPower(Enum.PowerType.Insanity) >= 80 |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetPower(Enum.PowerType.Insanity) >= 80 |
|
|
|
|
and Target:GetEnemies(10) <= 2 |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Vampiric Touch if you are within pandemic range to maintain uptime |
|
|
|
@ -208,25 +238,25 @@ STAPL:AddSpell( |
|
|
|
|
-- Cast Shadow Word: Death if the target is below 20% hp |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
ShadowWordDeath:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Target:GetHealthPercent() <= 20 |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Target:GetHealthPercent() <= 20 |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Mind Blast |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
MindBlast:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Mindgames |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
Mindgames:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Shadow Crash, even if your DoTs are not close to expiring |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
ShadowCrash:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(None):OnCast(function(self) |
|
|
|
|
local loc = Target:GetPosition() |
|
|
|
|
self:Click(loc) |
|
|
|
@ -235,37 +265,43 @@ STAPL:AddSpell( |
|
|
|
|
-- Cast Void Torrent |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
VoidTorrent:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Halo |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
Halo:CastableIf(function(self) |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Target:GetEnemies(10) >= 2 |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Mind Spike if you have a Surge of Darkness proc |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
MindSpike:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetAuras():FindMy(SurgeofDarkness):IsUp() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetAuras():FindMy(SurgeofDarkness):IsUp() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Mind Flay: Insanity |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
MindFlayInsanity:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Mind Spike |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
MindSpike:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Target:GetEnemies(10) == 1 |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Mind Flay |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
MindFlay:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
-- Cast Shadow Word: Pain if you're moving and nothing else is available |
|
|
|
|
STAPL:AddSpell( |
|
|
|
|
ShadowWordPain:CastableIf(function(self) |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Player:IsMoving() |
|
|
|
|
return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:IsMoving() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -274,10 +310,12 @@ ShadowModule:Sync(function() |
|
|
|
|
if not Player:IsAffectingCombat() then |
|
|
|
|
RestingAPL:Execute() |
|
|
|
|
end |
|
|
|
|
if not Player:IsAffectingCombat() and Target:Exists() then |
|
|
|
|
if not Player:IsAffectingCombat() and Target:Exists() and Target:IsHostile() and not Target:IsDead() then |
|
|
|
|
OpenerAPL:Execute() |
|
|
|
|
end |
|
|
|
|
if Player:IsAffectingCombat() and Target:Exists() then |
|
|
|
|
if Player:IsAffectingCombat() and Target:Exists() and Target:IsHostile() and not Target:IsDead() then |
|
|
|
|
UtilityAPL:Execute() |
|
|
|
|
DefensivesAPL:Execute() |
|
|
|
|
STAPL:Execute() |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
@ -308,7 +346,7 @@ local tab1 = |
|
|
|
|
initialValue = myconf:Read('shadowform', false), |
|
|
|
|
onValueChanged = function(_, flag) myconf:Write('shadowform', flag) end }, }, |
|
|
|
|
|
|
|
|
|
[5] = { shadpr = { type = 'header', label = 'Defensives' } }, |
|
|
|
|
[5] = { shadpr = { type = 'label', label = 'Defensives' } }, |
|
|
|
|
|
|
|
|
|
[6] = { shield1 = { type = 'checkbox', label = 'Power Word: Shield', column = 6, order = 1, |
|
|
|
|
initialValue = myconf:Read('pws', false), |
|
|
|
@ -328,38 +366,11 @@ local tab1 = |
|
|
|
|
initialValue = myconf:Read('dispersionpercent', 35), |
|
|
|
|
onValueChanged = function(_, value) myconf:Write('dispersionpercent', value) end }, }, |
|
|
|
|
|
|
|
|
|
[8] = { shadpr = { type = 'header', label = 'Interrupts' } }, |
|
|
|
|
[8] = { shadpr = { type = 'label', label = 'Interrupts' } }, |
|
|
|
|
|
|
|
|
|
[9] = { silence = { type = 'checkbox', label = 'Silence on CD', column = 6, order = 1, |
|
|
|
|
[9] = { silence = { type = 'checkbox', label = 'Silence on CD', column = 12, 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 }, }, |
|
|
|
|
onValueChanged = function(_, flag) myconf:Write('silence', flag) end }, }, |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
@ -368,7 +379,7 @@ local tab2 = |
|
|
|
|
{ |
|
|
|
|
layoutConfig = { padding = { top = 40 } }, |
|
|
|
|
rows = { |
|
|
|
|
[1] = { shadpr = { type = 'header', label = 'Player Healing' } }, |
|
|
|
|
[1] = { shadpr = { type = 'label', label = 'Player Healing' } }, |
|
|
|
|
|
|
|
|
|
[2] = { incombat = { type = 'checkbox', label = 'In Combat Healing', column = 6, order = 1, |
|
|
|
|
initialValue = myconf:Read('playericheal', false), |
|
|
|
@ -404,7 +415,7 @@ local shadpriestconfig = { |
|
|
|
|
layout = tab1 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name = 'group', |
|
|
|
|
name = 'placeholder', |
|
|
|
|
title = 'Placeholder', |
|
|
|
|
layout = tab2 |
|
|
|
|
} |
|
|
|
@ -413,7 +424,7 @@ local shadpriestconfig = { |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
Bastion.settingstemplate(shadpriestconfig, 'Shadow 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 |
|
|
|
|
Bastion.settingstemplate(shadpriestconfig, 'Shadow Priest', 400, 500, 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 |
|
|
|
|