|
|
@ -35,7 +35,7 @@ local GetFrostOption = Tinkr:require("scripts/bastion/scripts/frost/frost-gui", |
|
|
|
local function isUnitFrozen(unit) |
|
|
|
local function isUnitFrozen(unit) |
|
|
|
if not unit:Exists() then return false end |
|
|
|
if not unit:Exists() then return false end |
|
|
|
|
|
|
|
|
|
|
|
if unit:GetAuras():FindMy(IceNova):IsUp() or unit:GetAuras():FindMy(FrostNova):IsUp() or unit:GetAuras():FindMy(WintersChill):IsUp() then |
|
|
|
if unit:GetAuras():FindMy(IceNova):IsUp() or unit:GetAuras():FindMy(FrostNova):IsUp() then |
|
|
|
return true |
|
|
|
return true |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -84,7 +84,7 @@ local IceLanceTarget = Bastion.UnitManager:CreateCustomUnit('icelance', function |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
local FrozenOrbTarget = Bastion.UnitManager:CreateCustomUnit('frozen_orb', function() |
|
|
|
local FrozenOrbTarget = Bastion.UnitManager:CreateCustomUnit('frozen_orb', function() |
|
|
|
local unit = Bastion.UnitManager:GetEnemyWithMostEnemies(11) |
|
|
|
local unit = Bastion.UnitManager:GetEnemyWithMostEnemies(40, 10) |
|
|
|
|
|
|
|
|
|
|
|
if not unit then |
|
|
|
if not unit then |
|
|
|
if Target:Exists() and Target:GetDistance(Player) <= 40 then |
|
|
|
if Target:Exists() and Target:GetDistance(Player) <= 40 then |
|
|
@ -97,31 +97,66 @@ local FrozenOrbTarget = Bastion.UnitManager:CreateCustomUnit('frozen_orb', funct |
|
|
|
return unit |
|
|
|
return unit |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local HasRotatedForOrb = false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FrozenOrb:OnCast(function() |
|
|
|
|
|
|
|
HasRotatedForOrb = false |
|
|
|
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
---@return boolean |
|
|
|
---@return boolean |
|
|
|
local function CombatRotation() |
|
|
|
local function CombatRotation() |
|
|
|
local targetCount = GetRangedTargetCount(40) |
|
|
|
local targetCount = GetRangedTargetCount(40) |
|
|
|
|
|
|
|
|
|
|
|
if GetFrostOption("CdsEnabled") and IcyVeins:IsKnown() and not Player:IsCastingOrChanneling() and not Player:IsMoving() then |
|
|
|
if GetFrostOption("CdsEnabled") and IcyVeins:IsKnownAndUsable() and not Player:IsMoving() and Target:Exists() then |
|
|
|
IcyVeins:Cast(Player) |
|
|
|
return IcyVeins:Cast(Player) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if GetFrostOption("CdsEnabled") and RuneOfPower:IsKnownAndUsable() and not Player:GetAuras():FindMy(RuneOfPower):IsUp() and not Player:IsMoving() then |
|
|
|
if GetFrostOption("CdsEnabled") and RuneOfPower:IsKnownAndUsable() and not Player:GetAuras():FindMy(RuneOfPower):IsUp() and not Player:IsMoving() and Target:Exists() and IcyVeins:GetLastCastTime() ~= false and GetTime() - IcyVeins:GetLastCastTime() > 5 then |
|
|
|
return RuneOfPower:Cast(Player) |
|
|
|
return RuneOfPower:Cast(Player) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if FrozenOrb:IsKnownAndUsable() and GetFrostOption("FrozenOrbEnabled") and FrozenOrbTarget:Exists() then |
|
|
|
if FrozenOrb:IsKnownAndUsable() and GetFrostOption("FrozenOrbEnabled") and FrozenOrbTarget:Exists() then |
|
|
|
|
|
|
|
if not HasRotatedForOrb then |
|
|
|
|
|
|
|
print("TURNING TO ORB TARGET") |
|
|
|
FaceObject(FrozenOrbTarget:GetGUID()) |
|
|
|
FaceObject(FrozenOrbTarget:GetGUID()) |
|
|
|
|
|
|
|
SendMovementHeartbeat() |
|
|
|
|
|
|
|
HasRotatedForOrb = true |
|
|
|
|
|
|
|
else |
|
|
|
return FrozenOrb:Cast(Player) |
|
|
|
return FrozenOrb:Cast(Player) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if IceLance:IsKnownAndUsable() and IceLanceTarget:Exists() then |
|
|
|
if IceLanceTarget:Exists() then |
|
|
|
return IceLance:Cast(IceLanceTarget) |
|
|
|
return IceLance:Cast(IceLanceTarget) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if Target:Exists() and Player:CanSee(Target) and IceLance:IsKnownAndUsable() and IceLance:IsInRange(Target) and (isUnitFrozen(Target) or Player:GetAuras():FindMy(FingersOfFrost):IsUp()) then |
|
|
|
if Target:Exists() and Player:CanSee(Target) and IceLance:IsKnownAndUsable() and IceLance:IsInRange(Target) then |
|
|
|
|
|
|
|
-- Winters Chill |
|
|
|
|
|
|
|
if Target:GetAuras():FindMy(WintersChill):IsUp() then |
|
|
|
|
|
|
|
local winters_chill_stacks = Target:GetAuras():FindMy(WintersChill):GetCount() |
|
|
|
|
|
|
|
print("WC STACKS: ", winters_chill_stacks) |
|
|
|
|
|
|
|
if winters_chill_stacks == 1 and not IceLance:IsInFlightToUnit(Target) then |
|
|
|
|
|
|
|
return IceLance:Cast(Target) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if winters_chill_stacks > 1 then |
|
|
|
|
|
|
|
return IceLance:Cast(Target) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Fingers of Frost |
|
|
|
|
|
|
|
if Player:GetAuras():FindMy(FingersOfFrost):IsUp() then |
|
|
|
|
|
|
|
local fof_stacks = Player:GetAuras():FindMy(FingersOfFrost):GetCount() |
|
|
|
|
|
|
|
print("FOF STACKS: ", fof_stacks) |
|
|
|
|
|
|
|
if fof_stacks == 1 and not IceLance:IsInFlightToUnit(Target) then |
|
|
|
|
|
|
|
return IceLance:Cast(Target) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if fof_stacks > 1 then |
|
|
|
return IceLance:Cast(Target) |
|
|
|
return IceLance:Cast(Target) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if Target:Exists() and Player:CanSee(Target) and Flurry:IsKnownAndUsable() and Player:GetAuras():FindMy(BrainFreeze):IsUp() then |
|
|
|
if Target:Exists() and Player:CanSee(Target) and Flurry:IsKnownAndUsable() and Player:GetAuras():FindMy(BrainFreeze):IsUp() then |
|
|
|
local CastingSpell = Player:GetCastingOrChannelingSpell() |
|
|
|
local CastingSpell = Player:GetCastingOrChannelingSpell() |
|
|
|