diff --git a/scripts/restodruid.lua b/scripts/restodruid.lua index 9ef07a9..16e28b9 100644 --- a/scripts/restodruid.lua +++ b/scripts/restodruid.lua @@ -287,7 +287,7 @@ DefaultAPL:AddSpell( NaturesSwiftness:CastableIf(function(self) return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:CanSee(Lowest) and - (Lowest:GetHP() < 75 or (Player:GetPartyHPAround(40, 65) >= 2 or Player:GetPartyHPAround(40, 70)) + (Lowest:GetHP() < 70 or (Player:GetPartyHPAround(40, 65) >= 2 or Player:GetPartyHPAround(40, 70)) ) end):SetTarget(Lowest) ) @@ -320,7 +320,7 @@ DefaultAPL:AddSpell( return SwiftmendUnit:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:CanSee(SwiftmendUnit) and ( - SwiftmendUnit:GetHP() <= 85 or + SwiftmendUnit:GetHP() <= 80 or ( Lowest:GetPartyHPAround(30, 90) >= 3 or Lowest:GetPartyHPAround(30, 85) >= 2 ) @@ -338,29 +338,26 @@ DefaultAPL:AddSpell( ( Player:GetAuras():FindMy(SoulOfTheForest):GetRemainingTime() <= 5 or Lowest:GetPartyHPAround(30, 90) >= 2)) or - (Lowest:GetPartyHPAround(30, 90) >= 3 or Lowest:GetPartyHPAround(30, 85) >= 2) or - Lowest:GetHP() <= 55) and not Player:IsMoving() + (Lowest:GetPartyHPAround(30, 90) >= 3 or Lowest:GetPartyHPAround(30, 85) >= 2)) 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() < 75 and - ( - NaturesSwiftness:GetTimeSinceLastCast() < 2 or Player:GetAuras():FindMy(NaturesSwiftness):IsUp() or - NaturesSwiftness:IsKnownAndUsable()) and not Player:IsMoving() and - not Player:GetAuras():FindMy(SoulOfTheForest):IsUp() + and Player:CanSee(Lowest) and Lowest:GetHP() < 50 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 or (Lowest:GetHP() <= 85 and Player:GetAuras():FindMy(ClearCasting):IsUp())) and - not Player:GetAuras():FindMy(Regrowth):IsUp() and not Player:GetAuras():FindMy(SoulOfTheForest):IsUp() and - not Player:IsMoving() + 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) ) @@ -400,6 +397,16 @@ DefaultAPL:AddSpell( end):SetTarget(RejuvUnit) ) +DefaultAPL:AddSpell( + Regrowth:CastableIf(function(self) + return Lowest:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() + and Player:CanSee(Lowest) and + (Lowest:GetHP() < 70 or (Lowest:GetHP() <= 85 and Player:GetAuras():FindMy(ClearCasting):IsUp())) and + not Player:GetAuras():FindMy(Regrowth):IsUp() and not Player:GetAuras():FindMy(SoulOfTheForest):IsUp() and + not Player:IsMoving() + end):SetTarget(Lowest) +) + DefaultAPL:AddSpell( Sunfire:CastableIf(function(self) return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() diff --git a/src/MythicPlusUtils/MythicPlusUtils.lua b/src/MythicPlusUtils/MythicPlusUtils.lua index 4fadd9a..f0a5fa9 100644 --- a/src/MythicPlusUtils/MythicPlusUtils.lua +++ b/src/MythicPlusUtils/MythicPlusUtils.lua @@ -17,16 +17,18 @@ function MythicPlusUtils:New() return end - local addedAuras = auras.addedAuras - - if #addedAuras > 0 then - for i = 1, #addedAuras do - local aura = Bastion.Aura:CreateFromUnitAuraInfo(addedAuras[i]) - if not aura:IsBuff() then - WriteFile('bastion-MPlusDebuffs-' .. self.random .. '.lua', [[ + if auras.addedAuras then + local addedAuras = auras.addedAuras + + if #addedAuras > 0 then + for i = 1, #addedAuras do + local aura = Bastion.Aura:CreateFromUnitAuraInfo(addedAuras[i]) + if not aura:IsBuff() then + WriteFile('bastion-MPlusDebuffs-' .. self.random .. '.lua', [[ AuraName: ]] .. aura:GetName() .. [[ - AuraID: ]] .. aura:GetID() .. [[ - ]], true) + AuraID: ]] .. aura:GetSpell():GetID() .. "\n" .. [[ + ]] , true) + end end end end