Mage: Add Wiljo's frost mage script.
Johnny C. Lam [04-30-14 - 18:35]
Mage: Add Wiljo's frost mage script.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1348 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/scripts/files.xml b/scripts/files.xml
index 8515449..0bfbe66 100644
--- a/scripts/files.xml
+++ b/scripts/files.xml
@@ -18,4 +18,5 @@
<Script file="ovale_shaman_spells.lua" />
<Script file="leafkiller_druid.lua" />
+ <Script file="wiljo_mage.lua" />
</Ui>
diff --git a/scripts/ovale_mage_spells.lua b/scripts/ovale_mage_spells.lua
index 2374ba3..cd6c78b 100644
--- a/scripts/ovale_mage_spells.lua
+++ b/scripts/ovale_mage_spells.lua
@@ -61,10 +61,17 @@ Define(conjure_brilliant_mana_gem 119316)
Define(conjure_mana_gem 759)
Define(counterspell 2139)
SpellInfo(counterspell cd=24)
+Define(deep_freeze 44572)
+ SpellInfo(deep_freeze cd=30)
+ SpellAddBuff(deep_freeze fingers_of_frost_buff=-1)
Define(evocation 12051)
SpellInfo(evocation cd=120 channel=3 haste=spell)
SpellInfo(evocation cd=0 talent=invocation_talent)
+ SpellAddBuff(evocation evocation_buff=1)
SpellAddDebuff(evocation arcane_charge_debuff=0 if_spell=arcane_charge)
+Define(evocation_buff 12051)
+ SpellInfo(evocation_buff duration=6 haste=spell tick=2)
+ SpellInfo(evocation_buff duration=3 haste=spell tick=1 talent=invocation_talent)
Define(fingers_of_frost_buff 44544)
SpellInfo(fingers_of_frost_buff duration=15 maxstacks=2)
Define(fire_blast 2136)
@@ -100,6 +107,9 @@ Define(glyph_of_icy_veins 56364)
Define(glyph_of_mana_gem 56383)
Define(heating_up_buff 48107)
SpellInfo(heating_up_buff duration=10)
+Define(ice_barrier 11426)
+ SpellInfo(ice_barrier cd=25)
+Define(ice_barrier_talent 6)
Define(ice_floes 108839)
SpellAddBuff(ice_floes ice_floes_buff=1)
Define(ice_floes_buff 108839)
@@ -125,6 +135,12 @@ Define(ice_ward_buff 111264)
Define(ice_ward_talent 8)
Define(ignite_debuff 12654)
SpellInfo(ignite_debuff duration=4 tick=2)
+Define(incanters_ward 1463)
+ SpellInfo(incanters_ward cd=25)
+ SpellAddBuff(incanters_ward incanters_ward_buff=1)
+Define(incanters_ward_buff 1463)
+ SpellInfo(incanters_ward_buff duration=8)
+Define(incanters_ward_talent 18)
Define(inferno_blast 108853)
SpellInfo(inferno_blast cd=8)
SpellInfo(inferno_blast base=624.5 bonussp=0.6)
@@ -179,6 +195,10 @@ Define(rune_of_power_buff 116014)
SpellInfo(rune_of_power_buff duration=60)
Define(rune_of_power_talent 17)
Define(scorch 2948)
+Define(spellsteal 30449)
+Define(temporal_shield 115610)
+ SpellInfo(temporal_shield cd=25)
+Define(temporal_shield_talent 4)
Define(time_warp 80353)
SpellInfo(time_warp cd=300)
Define(water_elemental 31687)
diff --git a/scripts/wiljo_mage.lua b/scripts/wiljo_mage.lua
new file mode 100644
index 0000000..35a3af9
--- /dev/null
+++ b/scripts/wiljo_mage.lua
@@ -0,0 +1,243 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "Wiljo"
+ local desc = "[5.4] Wiljo: Frost"
+ local code = [[
+##
+##Please direct any questions, comments or suggestions to the Ovale mage forum:
+## http://wow.curseforge.com/addons/ovale/forum/mage/
+##
+##Last updated: 2013-12-18
+
+Include(ovale_items)
+Include(ovale_racials)
+Include(ovale_mage_spells)
+
+AddFunction BrainFreeze
+{
+ if BuffPresent(brain_freeze_buff) and BuffStacks(fingers_of_frost_buff more 1) Spell(ice_lance)
+ Spell(frostfire_bolt)
+}
+
+AddFunction BrainFreezeCD
+{
+ if BuffPresent(brain_freeze_buff) and BuffStacks(fingers_of_frost_buff more 1) Spell(ice_lance)
+ Spell(frostfire_bolt)
+}
+
+AddFunction FfbBeforeMageBombRefresh
+{
+ if TalentPoints(nether_tempest_talent)
+ {
+ if BuffPresent(brain_freeze_buff) and target.TicksRemain(nether_tempest_debuff less 2) Spell(frostfire_bolt)
+ }
+
+ if TalentPoints(living_bomb_talent)
+ {
+ if BuffPresent(brain_freeze_buff) and target.TicksRemain(living_bomb_debuff less 2) Spell(frostfire_bolt)
+ }
+
+ if TalentPoints(frost_bomb_talent)
+ {
+ if BuffPresent(brain_freeze_buff) and {target.TimeToDie() > {CastTime(frost_bomb) + target.TickTime(frost_bomb_debuff)}} Spell(frostfire_bolt)
+ }
+}
+
+AddFunction MageBomb
+{
+ if TalentPoints(nether_tempest_talent)
+ {
+ #/nether_tempest,if=(!ticking|remains<tick_time)&target.time_to_die>6
+ if {not target.DebuffPresent(nether_tempest_debuff) or target.TicksRemain(nether_tempest_debuff less 2)} and target.TimeToDie(more 6) Spell(nether_tempest)
+ }
+
+ if TalentPoints(living_bomb_talent)
+ {
+ #/living_bomb,if=(!ticking|remains<tick_time)&target.time_to_die>tick_time*3
+ if not target.DebuffPresent(living_bomb_debuff) Spell(living_bomb)
+ if {target.TicksRemain(living_bomb_debuff) < target.TickTime(living_bomb_debuff)} and {target.TimeToDie() > {target.TickTime(living_bomb_debuff) * 3}} Spell(living_bomb)
+ #if not target.DebuffPresent(living_bomb_debuff) or target.TicksRemain(living_bomb_debuff less 2) Spell(living_bomb)
+ }
+
+ if TalentPoints(frost_bomb_talent)
+ {
+ #/frost_bomb,if=target.time_to_die>cast_time+tick_time
+ if not target.DebuffPresent(frost_bomb_debuff) or {target.TimeToDie() > {CastTime(frost_bomb) + target.TickTime(frost_bomb_debuff)}} Spell(frost_bomb)
+ }
+}
+
+AddFunction TierTwoTalent
+{
+ if TalentPoints(temporal_shield_talent)
+ {
+ if SpellCooldown(temporal_shield more 0) SpellCooldown(temporal_shield)
+ if SpellCooldown(temporal_shield equal 0) Spell(temporal_shield)
+ }
+
+ if TalentPoints(ice_barrier_talent)
+ {
+ if SpellCooldown(ice_barrier more 0) SpellCooldown(ice_barrier)
+ if SpellCooldown(ice_barrier equal 0) Spell(ice_barrier)
+ }
+}
+
+AddFunction TierSixTalent
+{
+ if TalentPoints(invocation_talent)
+ {
+ #/evocation,if=(buff.invokers_energy.down|mana.pct<20)&buff.alter_time.down
+ unless BuffPresent(evocation_buff)
+ {
+ if BuffRemains(invokers_energy_buff atMost 4) and BuffExpires(alter_time_buff) Spell(evocation)
+ }
+ }
+
+ if TalentPoints(rune_of_power_talent)
+ {
+ #/rune_of_power,if=buff.rune_of_power.remains<cast_time&buff.alter_time.down
+ if RuneOfPowerRemains() < CastTime(rune_of_power) and BuffExpires(alter_time_buff) Spell(rune_of_power)
+ }
+
+ if TalentPoints(incanters_ward_talent)
+ {
+ #/incanters_ward,if=buff.incanters_ward.down&buff.alter_time.down
+ if BuffExpires(incanters_ward_buff) and BuffExpires(alter_time_buff) Spell(incanters_ward)
+ }
+}
+
+AddFunction UseItems
+{
+ Item(HandsSlot usable=1)
+ Item(Trinket0Slot usable=1)
+ Item(Trinket1Slot usable=1)
+}
+
+AddFunction UseRacialInterrupt
+{
+ if not target.Classification(worldboss) Spell(quaking_palm)
+ Spell(arcane_torrent_mana)
+}
+
+AddFunction Interrupt
+{
+ Spell(counterspell)
+ if not target.Classification(worldboss) Spell(deep_freeze usable=1)
+ UseRacialInterrupt()
+}
+
+AddIcon mastery=frost help=offgcd
+{
+ #/counterspell,if=target.debuff.casting.react
+ if not target.IsFriend() and target.IsInterruptible() Interrupt()
+
+ #/spellsteal
+ if target.BuffStealable() Spell(spellsteal)
+
+ #/water_elemental:freeze,if=buff.alter_time.down&buff.fingers_of_frost.stack<2
+ unless target.Classification(worldboss)
+ {
+ if BuffExpires(alter_time_buff) and BuffStacks(fingers_of_frost_buff less 2) Pet.Spell(water_elemental_freeze)
+ }
+
+ #/time_warp,if=target.health.pct<25|time>5
+ if InCombat() and {target.HealthPercent(less 25) or TimeInCombat(more 5)}
+ {
+ if BuffExpires(burst_haste any=1) and DebuffExpires(burst_haste_debuff) Spell(time_warp)
+ }
+
+ #/mana_gem,if=mana.pct<84&buff.alter_time.down
+ if ManaPercent(less 84) and BuffExpires(alter_time_buff) UseManaGem()
+}
+
+AddIcon mastery=frost help=main
+{
+ if not InCombat()
+ {
+ #/arcane_brilliance
+ unless BuffPresent(spell_power_multiplier any=1) or BuffPresent(critical_strike any=1) Spell(arcane_brilliance)
+
+ #/armor
+ unless BuffPresent(frost_armor) or BuffPresent(molten_armor) or BuffPresent(mage_armor) Spell(frost_armor)
+
+ #/water_elemental
+ if pet.Present(no) Spell(water_elemental)
+
+ #/conjure_mana_gem,if=mana_gem_charges<3&target.debuff.invulnerable.react
+ ConjureManaGem()
+ }
+
+ if TalentPoints(cold_snap_talent)
+ {
+ #cold_snap,if=health.pct<30
+ if HealthPercent(less 30) Spell(cold_snap)
+ }
+
+ #/frostfire_bolt,if=buff.alter_time.up&buff.brain_freeze.up # Also cast if proc present and has <=5 remaining
+ if BuffPresent(brain_freeze_buff)
+ {
+ if BuffPresent(alter_time_buff) or BuffRemains(brain_freeze_buff atMost 5) BrainFreezeCD()
+ }
+
+ #/ice_lance,if=buff.alter_time.up&buff.fingers_of_frost.up
+ if BuffPresent(fingers_of_frost_buff)
+ {
+ if BuffPresent(alter_time_buff) or BuffRemains(fingers_of_frost_buff atMost 5) Spell(ice_lance)
+ }
+
+ #Cast Frostfire if Brainfreeze is present before new bomb cast
+ FfbBeforeMageBombRefresh()
+
+ #/mage_bomb
+ MageBomb()
+
+ #/frostfire_bolt,if=buff.brain_freeze.react&cooldown.icy_veins.remains>2
+ if BuffPresent(brain_freeze_buff) BrainFreeze()
+
+ #/ice_lance,if=buff.fingers_of_frost.react&cooldown.icy_veins.remains>2
+ if BuffPresent(fingers_of_frost_buff) Spell(ice_lance)
+
+ #/frostbolt
+ Spell(frostbolt)
+}
+
+AddIcon mastery=frost help=cd
+{
+ #/evocation,if=mana.pct<20&buff.alter_time.down
+ if ManaPercent(less 20) and BuffExpires(alter_time_buff) Spell(evocation)
+
+ #/invocation
+ TierSixTalent()
+
+ #/frozen_orb,if=!buff.fingers_of_frost.react
+ unless BuffPresent(fingers_of_frost_buff) Spell(frozen_orb)
+
+ #/icy_veins,if=time_to_bloodlust>180&((buff.brain_freeze.react|buff.fingers_of_frost.react|target.time_to_die<22),moving=0
+ #if BuffPresent(brain_freeze_buff) or BuffPresent(fingers_of_frost_buff) or target.TimeToDie(atMost 22) Spell(icy_veins)
+ if BuffPresent(brain_freeze_buff) and BuffPresent(fingers_of_frost_buff) IcyVeins()
+ if target.TimeToDie(less 22) IcyVeins()
+
+ #/alter_time,if=buff.alter_time.down&buff.icy_veins.up
+ if BuffExpires(alter_time_buff) and BuffPresent(icy_veins_buff) Spell(alter_time_activate)
+
+ #/mirror_image
+ Spell(mirror_image)
+
+ #/use_item,name=gloves,sync=alter_time_activate,if=buff.alter_time.down
+ UseItems()
+}
+
+AddIcon help=cd size=small
+{
+ TierTwoTalent()
+}
+
+AddIcon help=cd size=small
+{
+ Spell(deep_freeze usable=1)
+}
+]]
+
+ OvaleScripts:RegisterScript("MAGE", name, desc, code)
+end