forked from Bastion/Bastion
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
677 lines
27 KiB
677 lines
27 KiB
local Tinkr, Bastion = ...
|
|
|
|
local RestoModule = Bastion.Module:New('resto')
|
|
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('resto_druid') -- for saving variables
|
|
|
|
-- Spellbook spells
|
|
local AutoAttack = Bastion.SpellBook:GetSpell(6603)
|
|
local CenarionWard = Bastion.SpellBook:GetSpell(102351)
|
|
local Barkskin = Bastion.SpellBook:GetSpell(22812)
|
|
local BearForm = Bastion.SpellBook:GetSpell(5487)
|
|
local CatForm = Bastion.SpellBook:GetSpell(768)
|
|
local Cyclone = Bastion.SpellBook:GetSpell(33786)
|
|
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 Innervate = Bastion.SpellBook:GetSpell(29166)
|
|
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 Rebirth = Bastion.SpellBook:GetSpell(20484)
|
|
local Regrowth = Bastion.SpellBook:GetSpell(8936)
|
|
local Rejuvenation = Bastion.SpellBook:GetSpell(774)
|
|
local RejuvenationBuff = Bastion.SpellBook:GetSpell(25299)
|
|
local Revive = Bastion.SpellBook:GetSpell(50769)
|
|
local Rip = Bastion.SpellBook:GetSpell(1079)
|
|
local Shred = Bastion.SpellBook:GetSpell(5221)
|
|
local Soothe = Bastion.SpellBook:GetSpell(2908)
|
|
local StampedingRoar = Bastion.SpellBook:GetSpell(106898)
|
|
local Sunfire = Bastion.SpellBook:GetSpell(93402)
|
|
local SunfireDebuff = Bastion.SpellBook:GetSpell(164815)
|
|
local Swiftmend = Bastion.SpellBook:GetSpell(18562)
|
|
local TeleportMoonglade = Bastion.SpellBook:GetSpell(18960)
|
|
local Thrash = Bastion.SpellBook:GetSpell(106832)
|
|
local TigerDash = Bastion.SpellBook:GetSpell(252216)
|
|
local TravelForm = Bastion.SpellBook:GetSpell(783)
|
|
local UrsolsVortex = Bastion.SpellBook:GetSpell(102793)
|
|
local WildGrowth = Bastion.SpellBook:GetSpell(48438)
|
|
local Wrath = Bastion.SpellBook:GetSpell(5176)
|
|
local AquaticForm = Bastion.SpellBook:GetSpell(276012)
|
|
local FlightForm = Bastion.SpellBook:GetSpell(276029)
|
|
local Efflorescence = Bastion.SpellBook:GetSpell(145205)
|
|
local IncarnationTreeofLife = Bastion.SpellBook:GetSpell(33891)
|
|
local Ironbark = Bastion.SpellBook:GetSpell(102342)
|
|
local Lifebloom = Bastion.SpellBook:GetSpell(33763)
|
|
local LifebloomBuff = Bastion.SpellBook:GetSpell(188550)
|
|
local NaturesCure = Bastion.SpellBook:GetSpell(88423)
|
|
local NaturesSwiftness = Bastion.SpellBook:GetSpell(132158)
|
|
local Revitalize = Bastion.SpellBook:GetSpell(212040)
|
|
local Tranquility = Bastion.SpellBook:GetSpell(740)
|
|
local AdaptiveSwarm = Bastion.SpellBook:GetSpell(391888)
|
|
local AdaptiveSwarmBuff = Bastion.SpellBook:GetSpell(391891)
|
|
local ClearCasting = Bastion.SpellBook:GetSpell(16870)
|
|
local ConvokeTheSpirits = Bastion.SpellBook:GetSpell(391528)
|
|
local Flourish = Bastion.SpellBook:GetSpell(197721)
|
|
local SoulOfTheForest = Bastion.SpellBook:GetSpell(114108)
|
|
local Rake = Bastion.SpellBook:GetSpell(1822)
|
|
local RakeDebuff = Bastion.SpellBook:GetSpell(155722)
|
|
local Starsurge = Bastion.SpellBook:GetSpell(197626)
|
|
local NaturesVigil = Bastion.SpellBook:GetSpell(124974)
|
|
local SpringBlossoms = Bastion.SpellBook:GetSpell(207386)
|
|
|
|
-- Define Units
|
|
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
|
|
if not lowest then
|
|
lowest = Player
|
|
end
|
|
end)
|
|
return lowest
|
|
end)
|
|
|
|
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 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(NaturesCure) 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 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 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 RejuvUnit = Bastion.UnitManager:CreateCustomUnit('rejuv', 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(Rejuvenation):IsUp() or unit:GetAuras():FindMy(Rejuvenation):GetRemainingTime() <= 3.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 SwiftmendUnit = Bastion.UnitManager:CreateCustomUnit('swiftmend', 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:GetAuras():FindMy(Regrowth):IsUp()) or (unit:GetAuras():FindMy(Rejuvenation):IsUp() and not unit:GetAuras():FindMy(WildGrowth):IsUp()))) 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 WildGrowthUnit = Bastion.UnitManager:CreateCustomUnit('wildgrowth', 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 ((Player:GetAuras():FindMy(SoulOfTheForest):IsUp() and (Player:GetAuras():FindMy(SoulOfTheForest):GetRemainingTime() <= 5 or unit:GetPartyHPAround(30, 90) >= 2)) or
|
|
(unit:GetPartyHPAround(30, 90) >= 3 or unit:GetPartyHPAround(30, 85) >= 2)) 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)
|
|
|
|
-- 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()
|
|
--Efflorescence
|
|
Efflorescence:Condition('Efflorescence', function()
|
|
return IsShiftKeyDown() and Player:Exists() and Efflorescence:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
end)
|
|
Efflorescence:Cast(None, 'Efflorescence')
|
|
local mx, my, mz = Tinkr.Common.ScreenToWorld(GetCursorPosition())
|
|
Efflorescence:OnCast(function(self)
|
|
Bastion:Print(mx,my,mz)
|
|
self:Click(mx, my, mz)
|
|
end)
|
|
end
|
|
|
|
local function Interrupt()
|
|
-- Skull Bash
|
|
SkullBash:Condition('SkullBash', function()
|
|
return SkullBash:IsKnownAndUsable() and InterruptTarget:Exists() and not Player:IsCastingOrChanneling()
|
|
end)
|
|
SkullBash:Cast(Target, 'SkullBash')
|
|
end
|
|
|
|
local function Healing()
|
|
DefaultAPL:AddSpell(
|
|
Efflorescence:CastableIf(function(self)
|
|
return PLACE_EFFLO and Player:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
end):SetTarget(None):OnCast(function(self)
|
|
local loc = Bastion.UnitManager:FindFriendsCentroid(10, 40)
|
|
PLACE_EFFLO = false
|
|
self:Click(loc)
|
|
end)
|
|
)
|
|
|
|
CatForm:OnCast(function(self)
|
|
if not Player:GetAuras():FindMy(Prowl):IsUp() and not Player:IsAffectingCombat() then
|
|
Prowl:Cast(Player)
|
|
end
|
|
end)
|
|
|
|
DefaultAPL:AddAction(
|
|
'cat_form_shift',
|
|
function()
|
|
if (IsShiftKeyDown() or not Player:IsAffectingCombat()) and not Player:IsMounted() and
|
|
not Player:GetAuras():FindMy(CatForm):IsUp() and
|
|
not Player:IsCastingOrChanneling() then
|
|
CatForm:Cast(Player)
|
|
elseif (not IsShiftKeyDown() and Player:IsAffectingCombat()) and Player:GetAuras():FindMy(CatForm):IsUp() then
|
|
CancelShapeshiftForm()
|
|
end
|
|
end
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
NaturesCure:CastableIf(function(self)
|
|
return DispelTarget:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and
|
|
self:IsInRange(DispelTarget) and DispelTarget:GetAuras():HasAnyDispelableAura(NaturesCure)
|
|
end):SetTarget(DispelTarget)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Soothe: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(
|
|
NaturesSwiftness:CastableIf(function(self)
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(Lowest) and Lowest:GetHP() < 70
|
|
end):SetTarget(Lowest)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
ConvokeTheSpirits:CastableIf(function(self)
|
|
return Player:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and
|
|
self:IsInRange(Player) and (Player:GetPartyHPAround(40, 70) >= 2 or Player:GetPartyHPAround(40, 75) >= 3)
|
|
and (Flourish:IsKnownAndUsable() or Flourish:GetTimeSinceLastCast() > 10)
|
|
end):SetTarget(Player)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Flourish:CastableIf(function(self)
|
|
return Player:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and
|
|
self:IsInRange(Player) and (Player:GetPartyHPAround(40, 70) >= 2 or Player:GetPartyHPAround(40, 75) >= 3) and
|
|
(not ConvokeTheSpirits:IsKnownAndUsable() and ConvokeTheSpirits:GetTimeSinceLastCast() > 10) and
|
|
WildGrowth:GetTimeSinceLastCast() <= 6
|
|
end):SetTarget(Player)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
NaturesVigil:CastableIf(function(self)
|
|
return Player:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and
|
|
self:IsInRange(Player) and Flourish:GetTimeSinceLastCast() <= 5
|
|
end):SetTarget(Player)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
AdaptiveSwarm:CastableIf(function(self)
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(Lowest)
|
|
end):SetTarget(Lowest)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Swiftmend:CastableIf(function(self)
|
|
return SwiftmendUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(SwiftmendUnit) and
|
|
(
|
|
SwiftmendUnit:GetHP() <= 60 or
|
|
(
|
|
Lowest:GetPartyHPAround(30, 90) >= 3 or Lowest:GetPartyHPAround(30, 85) >= 2
|
|
)
|
|
)
|
|
end):SetTarget(SwiftmendUnit)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
WildGrowth:CastableIf(function(self)
|
|
return WildGrowthUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(WildGrowthUnit) and
|
|
(
|
|
Player:GetAuras():FindMy(SoulOfTheForest):IsUp()
|
|
or
|
|
(WildGrowthUnit:GetPartyHPAround(30, 90) >= 3 or WildGrowthUnit:GetPartyHPAround(30, 85) >= 2)
|
|
) and
|
|
not Player:IsMoving()
|
|
end):SetTarget(WildGrowthUnit)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Regrowth:CastableIf(function(self)
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(Lowest) and Lowest:GetHP() < 65 and
|
|
Player:GetAuras():FindMy(SoulOfTheForest):IsUp() and not Player:IsMoving()
|
|
end):SetTarget(Lowest)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Regrowth:CastableIf(function(self)
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(Lowest) and Lowest:GetHP() < 70 and
|
|
(
|
|
NaturesSwiftness:GetTimeSinceLastCast() < 2 or Player:GetAuras():FindMy(NaturesSwiftness):IsUp() or
|
|
NaturesSwiftness:IsKnownAndUsable()) and not Player:IsMoving() and
|
|
not Player:GetAuras():FindMy(SoulOfTheForest):IsUp()
|
|
end):SetTarget(Lowest)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
CenarionWard:CastableIf(function(self)
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(Lowest) and Lowest:GetHP() <= 90
|
|
end):SetTarget(Lowest)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Ironbark:CastableIf(function(self)
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(Lowest) and Lowest:GetHP() <= 70 and not Lowest:GetAuras():FindMy(CenarionWard):IsUp()
|
|
end):SetTarget(Lowest)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Rejuvenation:CastableIf(function(self)
|
|
return RejuvUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(RejuvUnit) and (RejuvUnit:GetHP() <= 94) and
|
|
not Player:GetAuras():FindMy(SoulOfTheForest):IsUp()
|
|
end):SetTarget(RejuvUnit)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Lifebloom:CastableIf(function(self)
|
|
return Player:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and
|
|
(
|
|
not Player:GetAuras():FindMy(LifebloomAura):IsUp() or
|
|
Player:GetAuras():FindMy(LifebloomAura):GetRemainingTime() <= 4.5) and Player:IsAffectingCombat()
|
|
end):SetTarget(Player)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Lifebloom:CastableIf(function(self)
|
|
return Tank:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and
|
|
(
|
|
not Tank:GetAuras():FindMy(LifebloomAura):IsUp() or
|
|
Tank:GetAuras():FindMy(LifebloomAura):GetRemainingTime() <= 4.5) and Tank:IsAffectingCombat()
|
|
end):SetTarget(Tank)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Regrowth:CastableIf(function(self)
|
|
return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(Lowest) and
|
|
(
|
|
not Player:GetAuras():FindMy(Regrowth):IsUp() and Lowest:GetHP() < 70 or
|
|
(Lowest:GetHP() <= 85 and Player:GetAuras():FindMy(ClearCasting):IsUp())) and
|
|
not Player:GetAuras():FindMy(SoulOfTheForest):IsUp() and
|
|
not Player:IsMoving()
|
|
end):SetTarget(Lowest)
|
|
)
|
|
|
|
DefaultAPL:AddSpell(
|
|
Rejuvenation:CastableIf(function(self)
|
|
return RejuvUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling()
|
|
and Player:CanSee(RejuvUnit) and (RejuvUnit:GetHP() <= 94 or Player:GetPartyHPAround(40, 90) >= 2) and
|
|
not Player:GetAuras():FindMy(SoulOfTheForest):IsUp()
|
|
end):SetTarget(RejuvUnit)
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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')
|
|
-- Tiger's Fury
|
|
TigersFury:Condition('Tigers Fury', function()
|
|
return TigersFury:IsKnownAndUsable() and not Player:GetAuras():FindMy(TigersFury):IsUp()
|
|
end)
|
|
TigersFury:Cast(Player, 'Tigers Fury')
|
|
-- Primal Wrath
|
|
PrimalWrath:Condition('Primal Wrath', function()
|
|
return PrimalWrath:IsKnownAndUsable() and Player:InMelee(Target) and Player:GetComboPoints(Target) >= 4
|
|
and not Target:GetAuras():FindMy(Rip):IsUp()
|
|
end)
|
|
PrimalWrath:Cast(Target, 'Primal Wrath')
|
|
-- Ferocious Bite
|
|
FerociousBite:Condition('Ferocious Bite', function()
|
|
return FerociousBite:IsKnownAndUsable() and Player:InMelee(Target) and Player:GetComboPoints(Target) >= 4
|
|
end)
|
|
FerociousBite:Cast(Target, 'Ferocious Bite')
|
|
-- Thrash
|
|
Thrash:Condition('Thrash', function()
|
|
return Thrash:IsKnownAndUsable() and not Target:GetAuras():FindMy(ThrashDebuff):IsUp() and Player:InMelee(Target)
|
|
and Player:GetEnemies(8) >= 2
|
|
end)
|
|
Thrash:Cast(Target, 'Thrash')
|
|
-- Rake
|
|
Rake:Condition('Rake', function()
|
|
return Rake:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:InMelee(Target)
|
|
and not Target:GetAuras():FindMy(RakeDebuff):IsUp()
|
|
end)
|
|
Rake:Cast(Target, 'Rake')
|
|
-- Swipe
|
|
Swipe:Condition('Swipe', function()
|
|
return Swipe:IsKnownAndUsable() and Player:InMelee(Target) and Player:GetEnemies(8) >= 2
|
|
end)
|
|
Swipe:Cast(Target, 'Swipe')
|
|
-- Shred
|
|
Shred:Condition('Shred', function()
|
|
return Shred:IsKnownAndUsable() and Player:InMelee(Target)
|
|
end)
|
|
Shred:Cast(Target, 'Shred')
|
|
end
|
|
|
|
-- Module that dictates workflow
|
|
RestoModule: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(RestoModule)
|
|
|
|
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 restoconfig = {
|
|
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(restoconfig, 'Resto 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 |