From 5384f54b15a867c4eaa1cc49db9d7bd0dcaaf481 Mon Sep 17 00:00:00 2001 From: Ciscoh Bellic Date: Tue, 18 Jul 2023 23:53:49 -0400 Subject: [PATCH] added Dev Evoker --- .vscode/settings.json | 6 ++ scripts/1467-ciscoh-basic.lua | 72 --------------- scripts/1467_ciscoh_basic.lua | 161 ++++++++++++++++++++++++++++++++++ 3 files changed, 167 insertions(+), 72 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 scripts/1467-ciscoh-basic.lua create mode 100644 scripts/1467_ciscoh_basic.lua diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..eaee8e3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "Lua.diagnostics.globals": [ + "PlayerCastingBarFrame" + ], + "editor.acceptSuggestionOnEnter": "on" +} \ No newline at end of file diff --git a/scripts/1467-ciscoh-basic.lua b/scripts/1467-ciscoh-basic.lua deleted file mode 100644 index 47852db..0000000 --- a/scripts/1467-ciscoh-basic.lua +++ /dev/null @@ -1,72 +0,0 @@ -local Tinkr, Bastion = ... -_G.Bastion = Bastion -_G.Tinkr = Tinkr - -local CiscOH1467 = Bastion.Module:New('ciscoh_dev_evoker') -local Evaluator = Tinkr.Util.Evaluator -local Player = Bastion.UnitManager:Get('player') -local None = Bastion.UnitManager:Get('none') -local Target = Bastion.UnitManager:Get('target') - -local AerialHalt = Bastion.SpellBook:GetSpell(403216) -local AutoAttack = Bastion.SpellBook:GetSpell(6603) -local Glide = Bastion.SpellBook:GetSpell(358733) -local SkywardAscent = Bastion.SpellBook:GetSpell(376744) -local Soar = Bastion.SpellBook:GetSpell(369536) -local SurgeForward = Bastion.SpellBook:GetSpell(376743) -local TailSwipe = Bastion.SpellBook:GetSpell(368970) -local WingBuffet = Bastion.SpellBook:GetSpell(357214) -local ArmorSkills = Bastion.SpellBook:GetSpell(366522) -local Awakened = Bastion.SpellBook:GetSpell(365575) -local DiscerningEye = Bastion.SpellBook:GetSpell(366489) -local FamiliarSkies = Bastion.SpellBook:GetSpell(360009) -local Languages = Bastion.SpellBook:GetSpell(362633) -local MasterRiding = Bastion.SpellBook:GetSpell(90265) -local PrinciplesofSoaring = Bastion.SpellBook:GetSpell(381451) -local WeapoSkills = Bastion.SpellBook:GetSpell(352372) -local ActivateEmpowerment = Bastion.SpellBook:GetSpell(357857) -local BlessingofOhnara = Bastion.SpellBook:GetSpell(384522) -local ChampionAbility = Bastion.SpellBook:GetSpell(356550) -local CombatAlly = Bastion.SpellBook:GetSpell(211390) -local ConstructAbility = Bastion.SpellBook:GetSpell(347013) -local CovenantAbility = Bastion.SpellBook:GetSpell(313347) -local FlynnsPistol = Bastion.SpellBook:GetSpell(248082) -local GarrisonAbility = Bastion.SpellBook:GetSpell(161691) -local HeartEssence = Bastion.SpellBook:GetSpell(296208) -local HuntingCompanion = Bastion.SpellBook:GetSpell(376280) -local SanityRestorationOrb = Bastion.SpellBook:GetSpell(314955) -local SignatureAbility = Bastion.SpellBook:GetSpell(3265 -local SummonPocopoc = Bastion.SpellBook:GetSpell(360078) -local Throw = Bastion.SpellBook:GetSpell(385265) -local VenthyrAbility = Bastion.SpellBook:GetSpell(315594) -local WartimeAbility = Bastion.SpellBook:GetSpell(264739) -local PocopocZoneAbilitySkill = Bastion.SpellBook:GetSpell(363942) -local DragonridingBasics = Bastion.SpellBook:GetSpell(376777) -local LiftOff = Bastion.SpellBook:GetSpell(383363) -local ThrilloftheSkies = Bastion.SpellBook:GetSpell(383366) -local Vigor = Bastion.SpellBook:GetSpell(383359) -local AzureStrike = Bastion.SpellBook:GetSpell(362969) -local BlessingoftheBronze = Bastion.SpellBook:GetSpell(364342) -local DeepBreath = Bastion.SpellBook:GetSpell(357210) -local Disintegrate = Bastion.SpellBook:GetSpell(356995) -local EmeraldBlossom = Bastion.SpellBook:GetSpell(355913) -local FireBreath = Bastion.SpellBook:GetSpell(357208) -local FuryoftheAspects = Bastion.SpellBook:GetSpell(390386) -local Hover = Bastion.SpellBook:GetSpell(358267) -local Landslide = Bastion.SpellBook:GetSpell(358385) -local LivingFlame = Bastion.SpellBook:GetSpell(361469) -local Quell = Bastion.SpellBook:GetSpell(351338) -local Return = Bastion.SpellBook:GetSpell(361227) -local EnergizingFlame = Bastion.SpellBook:GetSpell(400006) -local TemperedScales = Bastion.SpellBook:GetSpell(396571) -local Pyre = Bastion.SpellBook:GetSpell(357211) -local EssenceBurst = Bastion.SpellBook:GetSpell(359565) -local MasteryGiantkiller = Bastion.SpellBook:GetSpell(362980) - -local DefaultAPL = Bastion.APL:New('default') - -CiscOH1467:Sync(function() - DefaultAPL:Execute() -end) - -Bastion:Register(CiscOH1467) \ No newline at end of file diff --git a/scripts/1467_ciscoh_basic.lua b/scripts/1467_ciscoh_basic.lua new file mode 100644 index 0000000..566c6af --- /dev/null +++ b/scripts/1467_ciscoh_basic.lua @@ -0,0 +1,161 @@ +local Tinkr, Bastion = ... + +local CiscOHSpec1467 = Bastion.Module:New("ciscoh_1467") +local Evaluator = Tinkr.Util.Evaluator +local Player = Bastion.UnitManager:Get('player') +local None = Bastion.UnitManager:Get('none') +local Target = Bastion.UnitManager:Get('target') + +local PowerType = Player:GetPowerType() +local BlessingOfTheBronze = Bastion.SpellBook:GetSpell(364342) +local BlessingOfTheBronzeBuff = Bastion.SpellBook:GetSpell(361748) +local Burnout = Bastion.SpellBook:GetSpell(357213) +local Disintegrate = Bastion.SpellBook:GetSpell(356995) +local DragonRage = Bastion.SpellBook:GetSpell(357213) +local EssenceBurst = Bastion.SpellBook:GetSpell(359618) +local EternitySurge = Bastion.SpellBook:GetSpell(359073) +local FireBreath = Bastion.SpellBook:GetSpell(357208) +local LivingFlame = Bastion.SpellBook:GetSpell(361469) +local ShatteringStar = Bastion.SpellBook:GetSpell(370452) + + + +local ClosestEnemy = Bastion.UnitManager:CreateCustomUnit('closestEnemy', function(unit) + local leastDist = math.huge + local closest = nil + + Bastion.UnitManager:EnumEnemies(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 dist = Player:GetDistance(unit) + if dist < leastDist then + closest = unit + leastDist = dist + end + end) + + if not closest then + closest = None + end + + return closest +end) + +local DefaultAPL = Bastion.APL:New("default") +local IdleAPL = Bastion.APL:New("idle") +local HealingAPL = Bastion.APL:New("healing") + +IdleAPL:AddSpell( + BlessingOfTheBronze:CastableIf(function(self) + return self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and not Player:GetAuras():FindMyAura(BlessingOfTheBronzeBuff):IsUp() + end):SetTarget(Player):PreCast(function(self) + Bastion.Notifications:AddNotification(BlessingOfTheBronze:GetIcon(), "BlessingOfTheBronze") + end) +) + +DefaultAPL:AddSpell( + DragonRage:CastableIf(function(self) + return Target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and Player:GetEnemies(25) > 2 + end):SetTarget(Player):PreCast(function(self) + Bastion.Notifications:AddNotification(DragonRage:GetIcon(), "DragonRage") + end) +) + + +DefaultAPL:AddSpell( + FireBreath:CastableIf(function(self) + return ClosestEnemy:Exists() and ClosestEnemy:IsHostile() and not ClosestEnemy:IsDead() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() + end):SetTarget(ClosestEnemy):PreCast(function(self) + Bastion.Notifications:AddNotification(FireBreath:GetIcon(), "FireBreath") + if not Player:IsWithinCone(ClosestEnemy, 90, 40) then + SetHeading(Player:GetAngle(ClosestEnemy)) + end + end) +) + +DefaultAPL:AddSpell( + ShatteringStar:CastableIf(function(self) + return ClosestEnemy:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() + end):SetTarget(ClosestEnemy):PreCast(function(self) + Bastion.Notifications:AddNotification(ShatteringStar:GetIcon(), "ShatteringStar") + if not Player:IsWithinCone(ClosestEnemy, 90, 40) then + SetHeading(Player:GetAngle(ClosestEnemy)) + end + end) +) + +DefaultAPL:AddSpell( + EssenceBurst:CastableIf(function(self) + return ClosestEnemy:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() + end):SetTarget(ClosestEnemy):PreCast(function(self) + Bastion.Notifications:AddNotification(EssenceBurst:GetIcon(), "EssenceBurst") + if not Player:IsWithinCone(ClosestEnemy, 90, 40) then + SetHeading(Player:GetAngle(ClosestEnemy)) + end + end) +) + +DefaultAPL:AddSpell( + EternitySurge:CastableIf(function(self) + return ClosestEnemy:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() + end):SetTarget(ClosestEnemy):PreCast(function(self) + Bastion.Notifications:AddNotification(EternitySurge:GetIcon(), "EternitySurger") + if not Player:IsWithinCone(ClosestEnemy, 90, 40) then + SetHeading(Player:GetAngle(ClosestEnemy)) + end + end) +) + +DefaultAPL:AddSpell( + LivingFlame:CastableIf(function(self) + return ClosestEnemy:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() and (Player:GetPower(PowerType) < Player:GetMaxPower(PowerType)) + end):SetTarget(ClosestEnemy):PreCast(function(self) + Bastion.Notifications:AddNotification(LivingFlame:GetIcon(), "LivingFlame") + if not Player:IsWithinCone(ClosestEnemy, 90, 40) then + SetHeading(Player:GetAngle(ClosestEnemy)) + end + end) +) + +DefaultAPL:AddSpell( + Disintegrate:CastableIf(function(self) + return ClosestEnemy:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() + end):SetTarget(ClosestEnemy):PreCast(function(self) + Bastion.Notifications:AddNotification(Disintegrate:GetIcon(), "Disintegrate") + if not Player:IsWithinCone(ClosestEnemy, 90, 40) then + SetHeading(Player:GetAngle(ClosestEnemy)) + end + end) +) + + +CiscOHSpec1467:Sync(function() + if Player:GetCastingOrChannelingSpell() == FireBreath and Player:GetEmpoweredStage() == 2 then + Bastion.Notifications:AddNotification(FireBreath:GetIcon(), "FireBreath Empowered Release") + FireBreath:ForceCast(None) + end + + if Player:GetCastingOrChannelingSpell() == EternitySurge and Player:GetEmpoweredStage() == 1 then + Bastion.Notifications:AddNotification(EternitySurge:GetIcon(), "EternitySurge Empowered Release") + EternitySurge:ForceCast(Target) + end + + if Target:Exists() and Target:IsHostile() and not Target:IsDead() then + SetHeading(Player:GetAngle(Target)) + DefaultAPL:Execute() + end + IdleAPL:Execute() + +end) + +Bastion:Register(CiscOHSpec1467) \ No newline at end of file