Import old MoP 5.2 scripts for warrior, warlock and death knight.
Johnny C. Lam [05-08-14 - 17:27]
Import old MoP 5.2 scripts for warrior, warlock and death knight.
These are for completeness until proper MoP 5.4.7 scripts can be created
for warriors, warlocks and death knights.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1404 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/scripts/files.xml b/scripts/files.xml
index a1487e8..11b8383 100644
--- a/scripts/files.xml
+++ b/scripts/files.xml
@@ -2,6 +2,8 @@
<Script file="ovale_items.lua" />
<Script file="ovale_racials.lua" />
+ <Script file="ovale_deathknight.lua" />
+ <Script file="ovale_deathknight_spells.lua" />
<Script file="ovale_druid.lua" />
<Script file="ovale_druid_spells.lua" />
<Script file="ovale_hunter.lua" />
@@ -18,6 +20,10 @@
<Script file="ovale_rogue_spells.lua" />
<Script file="ovale_shaman.lua" />
<Script file="ovale_shaman_spells.lua" />
+ <Script file="ovale_warlock.lua" />
+ <Script file="ovale_warlock_spells.lua" />
+ <Script file="ovale_warrior.lua" />
+ <Script file="ovale_warrior_spells.lua" />
<Script file="leafkiller_druid.lua" />
<Script file="wiljo_mage.lua" />
diff --git a/scripts/ovale_deathknight.lua b/scripts/ovale_deathknight.lua
new file mode 100644
index 0000000..75a43d8
--- /dev/null
+++ b/scripts/ovale_deathknight.lua
@@ -0,0 +1,153 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "Ovale"
+ local desc = "[5.2] Ovale: Frost, Unholy"
+ local code = [[
+# Ovale death knight script by Sidoine for WoW 5.2.
+
+Include(ovale_items)
+Include(ovale_racials)
+Include(ovale_deathknight_spells)
+
+AddCheckBox(opt_aoe L(AOE) default)
+AddCheckBox(opt_icons_left "Left icons")
+AddCheckBox(opt_icons_right "Right icons")
+
+### Frost icons.
+
+AddIcon mastery=frost size=small checkboxon=opt_icons_left {}
+AddIcon mastery=frost size=small checkboxon=opt_icons_left {}
+
+AddIcon mastery=frost help=offgcd
+{
+ if not InCombat()
+ {
+ Spell(pillar_of_frost)
+ }
+ Spell(pillar_of_frost)
+ if TalentPoints(blood_tap_talent) and BuffStacks(blood_charge) >10 and {RunicPower() >76 or {RunicPower() >=20 and BuffStacks(killing_machine) } } Spell(blood_tap)
+ if TalentPoints(blood_tap_talent) and {target.HealthPercent() -{3 *target.HealthPercent() /target.DeadIn() } <=35 and SpellCooldown(soul_reaper_frost) ==0 } Spell(blood_tap)
+ if TalentPoints(blood_tap_talent) and {target.HealthPercent() -{3 *target.HealthPercent() /target.DeadIn() } >35 or BuffStacks(blood_charge) >=8 } Spell(blood_tap)
+}
+
+AddIcon mastery=frost help=main
+{
+ if not InCombat()
+ {
+ unless Stance(2) Spell(frost_presence)
+ Spell(horn_of_winter)
+ }
+ if BuffStacks(killing_machine) or RunicPower() >88 Spell(frost_strike)
+ if TalentPoints(plague_leech_talent) and {target.DebuffRemains(blood_plague) <3 or target.DebuffRemains(frost_fever) <3 or SpellCooldown(outbreak) <1 } Spell(plague_leech)
+ if target.DebuffRemains(frost_fever) <3 or target.DebuffRemains(blood_plague) <3 Spell(outbreak)
+ if target.HealthPercent() -{3 *target.HealthPercent() /target.DeadIn() } <=35 Spell(soul_reaper_frost)
+ if not target.DebuffPresent(frost_fever) Spell(howling_blast)
+ if not target.DebuffPresent(blood_plague) Spell(plague_strike)
+ if BuffStacks(rime) Spell(howling_blast)
+ if RunicPower() >76 Spell(frost_strike)
+ if RuneCount(unholy) >1 Spell(obliterate)
+ if RuneCount(death) >1 or RuneCount(frost) >1 Spell(howling_blast)
+ Spell(horn_of_winter)
+ if RuneCount(unholy) >0 Spell(obliterate)
+ Spell(howling_blast)
+ if TalentPoints(runic_empowerment_talent) and {RuneCount(frost) ==0 or RuneCount(blood) ==0 } Spell(frost_strike)
+ if TalentPoints(runic_corruption_talent) and BuffExpires(runic_corruption) Spell(frost_strike)
+ Spell(death_and_decay)
+ if RunicPower() >=40 Spell(frost_strike)
+}
+
+AddIcon mastery=frost help=aoe checkboxon=opt_aoe {}
+
+AddIcon mastery=frost help=cd
+{
+ if not InCombat()
+ {
+ Spell(army_of_the_dead)
+ Spell(blood_fury)
+ Spell(raise_dead)
+ }
+ if target.DeadIn() <=60 and {BuffPresent(mogu_power_potion_aura) or BuffPresent(golems_strength) } Spell(empower_rune_weapon)
+ if BuffPresent(pillar_of_frost) UseItemActions()
+ Spell(blood_fury)
+ Spell(raise_dead)
+ if TalentPoints(unholy_blight_talent) and {target.DebuffRemains(frost_fever) <3 or target.DebuffRemains(blood_plague) <3 } Spell(unholy_blight)
+ Spell(empower_rune_weapon)
+}
+
+AddIcon mastery=frost size=small checkboxon=opt_icons_right {}
+
+AddIcon mastery=frost size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+
+### Unholy icons.
+
+AddIcon mastery=frost size=small checkboxon=opt_icons_left {}
+AddIcon mastery=frost size=small checkboxon=opt_icons_left {}
+
+AddIcon mastery=unholy help=offgcd
+{
+ if TalentPoints(blood_tap_talent) and BuffStacks(blood_charge) >10 and RunicPower() >=32 Spell(blood_tap)
+ if TalentPoints(blood_tap_talent) and {target.HealthPercent() -{3 *target.HealthPercent() /target.DeadIn() } <=35 and SpellCooldown(soul_reaper_unholy) ==0 } Spell(blood_tap)
+ if TalentPoints(blood_tap_talent) and BuffStacks(shadow_infusion) ==5 Spell(blood_tap)
+ if TalentPoints(blood_tap_talent) and RuneCount(unholy) ==2 and SpellCooldown(death_and_decay) ==0 Spell(blood_tap)
+ if TalentPoints(blood_tap_talent) and SpellCooldown(death_and_decay) ==0 Spell(blood_tap)
+ if TalentPoints(blood_tap_talent) and BuffStacks(blood_charge) >=8 Spell(blood_tap)
+}
+
+AddIcon mastery=unholy help=main
+{
+ if not InCombat()
+ {
+ unless Stance(3) Spell(unholy_presence)
+ Spell(horn_of_winter)
+ }
+ if AttackPower() >{LastSpellAttackPower(blood_plague) +5000 } and TimeInCombat() >15 and not {SpellCooldown(unholy_blight) >49 } Spell(outbreak)
+ if AttackPower() >{LastSpellAttackPower(blood_plague) +5000 } and TimeInCombat() >15 and not {SpellCooldown(unholy_blight) >49 } Spell(plague_strike)
+ if target.DebuffRemains(frost_fever) <3 or target.DebuffRemains(blood_plague) <3 Spell(outbreak)
+ if target.HealthPercent() -{3 *target.HealthPercent() /target.DeadIn() } <=35 Spell(soul_reaper_unholy)
+ if not target.DebuffPresent(blood_plague) or not target.DebuffPresent(frost_fever) Spell(plague_strike)
+ if BuffStacks(shadow_infusion) ==5 Spell(dark_transformation)
+ if RunicPower() >90 Spell(death_coil)
+ if RuneCount(unholy) ==2 Spell(death_and_decay)
+ if RuneCount(unholy) ==2 Spell(scourge_strike)
+ if RuneCount(blood) ==2 and RuneCount(frost) ==2 Spell(festering_strike)
+ Spell(death_and_decay)
+ if BuffStacks(sudden_doom) or {BuffExpires(dark_transformation) and RuneCount(unholy) <=1 } Spell(death_coil)
+ Spell(scourge_strike)
+ if TalentPoints(plague_leech_talent) and SpellCooldown(outbreak) <1 Spell(plague_leech)
+ Spell(festering_strike)
+ Spell(horn_of_winter)
+ if BuffExpires(dark_transformation) or {SpellCooldown(summon_gargoyle) >8 and BuffRemains(dark_transformation) >8 } Spell(death_coil)
+}
+
+AddIcon mastery=unholy help=aoe checkboxon=opt_aoe {}
+
+AddIcon mastery=unholy help=cd
+{
+ if not InCombat()
+ {
+ Spell(army_of_the_dead)
+ Spell(blood_fury)
+ Spell(raise_dead)
+ }
+ if TimeInCombat() >=2 Spell(blood_fury)
+ if TimeInCombat() >=4 Spell(unholy_frenzy)
+ if TimeInCombat() >=4 UseItemActions()
+ if TalentPoints(unholy_blight_talent) and {target.DebuffRemains(frost_fever) <3 or target.DebuffRemains(blood_plague) <3 } Spell(unholy_blight)
+ Spell(summon_gargoyle)
+ Spell(empower_rune_weapon)
+}
+
+AddIcon mastery=unholy size=small checkboxon=opt_icons_right {}
+
+AddIcon mastery=unholy size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+]]
+ OvaleScripts:RegisterScript("DEATHKNIGHT", name, desc, code)
+end
diff --git a/scripts/ovale_deathknight_spells.lua b/scripts/ovale_deathknight_spells.lua
new file mode 100644
index 0000000..5fb7d35
--- /dev/null
+++ b/scripts/ovale_deathknight_spells.lua
@@ -0,0 +1,97 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "ovale_deathknight_spells"
+ local desc = "[5.2] Ovale: Death Knight spells"
+ local code = [[
+# Death Knight spells and functions.
+
+Define(army_of_the_dead 42650)
+ SpellInfo(army_of_the_dead duration=4 frost=1 blood=1 unholy=1 runicpower=-300 cd=600)
+ SpellAddBuff(army_of_the_dead army_of_the_dead=1)
+Define(blood_charge 114851)
+ SpellInfo(blood_charge duration=25)
+ SpellAddBuff(blood_charge blood_charge=1)
+Define(blood_plague 55078)
+ SpellInfo(blood_plague duration=30 tick=3)
+ SpellAddTargetDebuff(blood_plague blood_plague=1)
+Define(blood_tap 45529)
+Define(blood_tap_talent 13)
+Define(dark_transformation 63560)
+ SpellInfo(dark_transformation duration=30 unholy=1 runicpower=-100)
+ SpellAddBuff(dark_transformation dark_transformation=1)
+Define(death_and_decay 43265)
+ SpellInfo(death_and_decay duration=10 unholy=1 runicpower=-100 cd=30)
+ SpellAddBuff(death_and_decay death_and_decay=1)
+Define(death_coil 47541)
+ SpellInfo(death_coil runicpower=400)
+Define(empower_rune_weapon 47568)
+ SpellInfo(empower_rune_weapon runicpower=-250 cd=300)
+Define(festering_strike 85948)
+ SpellInfo(festering_strike frost=1 blood=1 runicpower=-200)
+Define(frost_fever 55095)
+ SpellInfo(frost_fever duration=30 tick=3)
+ SpellAddTargetDebuff(frost_fever frost_fever=1)
+Define(frost_presence 48266)
+ SpellAddBuff(frost_presence frost_presence=1)
+Define(frost_strike 49143)
+ SpellInfo(frost_strike runicpower=350)
+Define(golems_strength 79634)
+ SpellInfo(golems_strength duration=25 cd=1)
+ SpellAddBuff(golems_strength golems_strength=1)
+Define(horn_of_winter 57330)
+ SpellInfo(horn_of_winter duration=300 runicpower=-100 cd=20)
+ SpellAddBuff(horn_of_winter horn_of_winter=1)
+Define(howling_blast 49184)
+ SpellInfo(howling_blast frost=1 runicpower=-100)
+Define(killing_machine 51128)
+Define(mogu_power_potion_aura 105706)
+ SpellInfo(mogu_power_potion_aura duration=25 cd=1)
+ SpellAddBuff(mogu_power_potion_aura mogu_power_potion_aura=1)
+Define(obliterate 49020)
+ SpellInfo(obliterate frost=1 unholy=1 runicpower=-200)
+Define(outbreak 77575)
+ SpellInfo(outbreak runicpower=0 cd=60)
+Define(pillar_of_frost 51271)
+ SpellInfo(pillar_of_frost duration=20 frost=1 runicpower=-100 cd=60)
+ SpellAddBuff(pillar_of_frost pillar_of_frost=1)
+Define(plague_leech 123693)
+ SpellInfo(plague_leech cd=25)
+Define(plague_leech_talent 2)
+Define(plague_strike 45462)
+ SpellInfo(plague_strike unholy=1 runicpower=-100)
+Define(raise_dead 46584)
+ SpellInfo(raise_dead cd=120)
+ SpellAddBuff(raise_dead raise_dead=1)
+Define(rime 59057)
+Define(runic_corruption 51460)
+ SpellInfo(runic_corruption duration=3)
+ SpellAddBuff(runic_corruption runic_corruption=1)
+Define(runic_corruption_talent 15)
+Define(runic_empowerment_talent 14)
+Define(scourge_strike 55090)
+ SpellInfo(scourge_strike unholy=1 runicpower=-100)
+Define(shadow_infusion 91342)
+Define(soul_reaper_blood 114866)
+ SpellInfo(soul_reaper_blood blood=1 runicpower=-200 cd=6)
+Define(soul_reaper_frost 130735)
+ SpellInfo(soul_reaper_frost frost=1 runicpower=-200 cd=6)
+Define(soul_reaper_unholy 130736)
+ SpellInfo(soul_reaper_unholy unholy=1 runicpower=-200 cd=6)
+Define(sudden_doom 49530)
+Define(summon_gargoyle 49206)
+ SpellInfo(summon_gargoyle duration=40 cd=180)
+ SpellAddBuff(summon_gargoyle summon_gargoyle=1)
+Define(unholy_blight 115989)
+ SpellInfo(unholy_blight duration=10 cd=90)
+ SpellAddBuff(unholy_blight unholy_blight=1)
+Define(unholy_blight_talent 3)
+Define(unholy_frenzy 49016)
+ SpellInfo(unholy_frenzy duration=30 cd=180)
+ SpellAddBuff(unholy_frenzy unholy_frenzy=1)
+Define(unholy_presence 48265)
+ SpellAddBuff(unholy_presence unholy_presence=1)
+]]
+ OvaleScripts:RegisterScript("DEATHKNIGHT", name, desc, code, "include")
+end
diff --git a/scripts/ovale_warlock.lua b/scripts/ovale_warlock.lua
new file mode 100644
index 0000000..221eca8
--- /dev/null
+++ b/scripts/ovale_warlock.lua
@@ -0,0 +1,224 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "Ovale"
+ local desc = "[5.2] Ovale: Affliction, Demonology, Destruction"
+ local code = [[
+# Ovale warlock script by Sidoine for WoW 5.2.
+
+Include(ovale_items)
+Include(ovale_racials)
+Include(ovale_warlock_spells)
+
+AddCheckBox(opt_aoe L(AOE) default)
+AddCheckBox(opt_icons_left "Left icons")
+AddCheckBox(opt_icons_right "Right icons")
+
+### Affliction icons.
+
+AddIcon mastery=affliction size=small checkboxon=opt_icons_left {}
+AddIcon mastery=affliction size=small checkboxon=opt_icons_left {}
+
+AddIcon mastery=affliction help=offgcd
+{
+ if not InCombat()
+ {
+ if TalentPoints(grimoire_of_sacrifice_talent) Spell(grimoire_of_sacrifice)
+ }
+ if BuffPresent(dark_soul_misery) and {target.TicksRemain(agony) <=Ticks(agony) /2 or target.TicksRemain(corruption_debuff) <=Ticks(corruption_debuff) /2 or target.TicksRemain(unstable_affliction) <=Ticks(unstable_affliction) /2 } and SoulShards() Spell(soulburn)
+ if {target.TicksRemain(unstable_affliction) <=1 or target.TicksRemain(corruption_debuff) <=1 or target.TicksRemain(agony) <=1 } and SoulShards() and target.HealthPercent() <=20 Spell(soulburn)
+ if SpellPower() >LastSpellSpellPower(unstable_affliction) and target.TicksRemain(unstable_affliction) <=Ticks(unstable_affliction) /2 and SoulShards() and target.HealthPercent() <=20 Spell(soulburn)
+}
+
+AddIcon mastery=affliction help=main
+{
+ if not InCombat()
+ {
+ if not BuffPresent(spell_power_multiplier any=1) Spell(dark_intent)
+ if not TalentPoints(grimoire_of_sacrifice_talent) or BuffExpires(grimoire_of_sacrifice) unless pet.CreatureFamily(Felhunter) Spell(summon_felhunter)
+ if TalentPoints(grimoire_of_service_talent) Spell(service_felhunter)
+ }
+ if target.DebuffExpires(magic_vulnerability any=1) Spell(curse_of_the_elements)
+ if TalentPoints(grimoire_of_service_talent) Spell(service_felhunter)
+ if BuffPresent(soulburn) Spell(soul_swap)
+ if not InFlightToTarget(haunt) and target.DebuffRemains(haunt) <CastTime(haunt) +1 +TickTime(haunt) and SoulShards() and target.HealthPercent() <=20 Spell(haunt)
+ if BuffExpires(dark_soul_misery) and BuffExpires(bloodlust any=1) and ManaPercent() <10 and target.HealthPercent() <=20 Spell(life_tap)
+ if target.HealthPercent() <=20 Spell(drain_soul)
+ if target.HealthPercent() <=20 Spell(life_tap)
+ if target.DebuffRemains(agony) <GCD() and target.DebuffRemains(agony) +2 <SpellCooldown(dark_soul_misery) Spell(agony)
+ if not InFlightToTarget(haunt) and target.DebuffRemains(haunt) <CastTime(haunt) +1 +TickTime(haunt) and {SoulShards() >2 or SpellCooldown(dark_soul_misery) >35 or {SoulShards() >1 and SpellCooldown(dark_soul_misery) <CastTime(haunt) } } and SoulShards() Spell(haunt)
+ if target.DebuffRemains(corruption_debuff) <GCD() and target.DebuffRemains(corruption_debuff) <SpellCooldown(dark_soul_misery) Spell(corruption)
+ if target.DebuffRemains(unstable_affliction) <GCD() +CastTime(unstable_affliction) and target.DebuffRemains(unstable_affliction) <SpellCooldown(dark_soul_misery) Spell(unstable_affliction)
+ if target.TicksRemain(agony) <=2 and target.DebuffRemains(agony) +2 <SpellCooldown(dark_soul_misery) Spell(agony)
+ if target.TicksRemain(corruption_debuff) <=2 and target.DebuffRemains(corruption_debuff) <SpellCooldown(dark_soul_misery) Spell(corruption)
+ if {target.DebuffRemains(unstable_affliction) -CastTime(unstable_affliction) } /{BuffDuration(unstable_affliction) /Ticks(unstable_affliction) } <=2 and target.DebuffRemains(unstable_affliction) <SpellCooldown(dark_soul_misery) Spell(unstable_affliction)
+ if SpellPower() >LastSpellSpellPower(agony) and target.TicksRemain(agony) <Ticks(agony) /2 and target.DebuffRemains(agony) +2 <SpellCooldown(dark_soul_misery) Spell(agony)
+ if SpellPower() >LastSpellSpellPower(corruption_debuff) and target.TicksRemain(corruption_debuff) <Ticks(corruption_debuff) /2 and target.DebuffRemains(corruption_debuff) <SpellCooldown(dark_soul_misery) Spell(corruption)
+ if SpellPower() >LastSpellSpellPower(unstable_affliction) and target.TicksRemain(unstable_affliction) <Ticks(unstable_affliction) /2 and target.DebuffRemains(unstable_affliction) <SpellCooldown(dark_soul_misery) Spell(unstable_affliction)
+ if BuffExpires(dark_soul_misery) and BuffExpires(bloodlust any=1) and ManaPercent() <50 Spell(life_tap)
+ Spell(malefic_grasp)
+ Spell(life_tap)
+}
+
+AddIcon mastery=affliction help=aoe checkboxon=opt_aoe
+{
+ if BuffExpires(soulburn) and not target.DebuffPresent(soulburn_seed_of_corruption) and not InFlightToTarget(soulburn_seed_of_corruption) and SoulShards() Spell(soulburn)
+ if BuffPresent(soulburn) and not target.DebuffPresent(agony) and not target.DebuffPresent(corruption_debuff) Spell(soul_swap)
+ if BuffPresent(soulburn) and target.DebuffPresent(corruption_debuff) and not target.DebuffPresent(agony) Spell(soul_swap)
+ if {BuffExpires(soulburn) and not InFlightToTarget(seed_of_corruption) and not target.DebuffPresent(seed_of_corruption) } or {BuffPresent(soulburn) and not target.DebuffPresent(soulburn_seed_of_corruption) and not InFlightToTarget(soulburn_seed_of_corruption) } Spell(seed_of_corruption)
+ if not InFlightToTarget(haunt) and target.DebuffRemains(haunt) <CastTime(haunt) +1 and SoulShards() Spell(haunt)
+ if ManaPercent() <70 Spell(life_tap)
+ if not InFlightToTarget(fel_flame) Spell(fel_flame)
+}
+
+AddIcon mastery=affliction help=cd
+{
+ UseItemActions()
+ Spell(blood_fury)
+ Spell(dark_soul_misery)
+ Spell(summon_doomguard)
+}
+
+AddIcon mastery=affliction size=small checkboxon=opt_icons_right {}
+
+AddIcon mastery=affliction size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+
+### Demonology icons.
+
+AddIcon mastery=demonology size=small checkboxon=opt_icons_left {}
+AddIcon mastery=demonology size=small checkboxon=opt_icons_left {}
+
+AddIcon mastery=demonology help=offgcd
+{
+ if not InCombat()
+ {
+ if TalentPoints(grimoire_of_sacrifice_talent) Spell(grimoire_of_sacrifice)
+ }
+ Spell(melee)
+ Spell(felstorm)
+ Spell(wrathstorm)
+ if {BuffPresent(dark_soul_knowledge) and DemonicFury() /32 >BuffRemains(dark_soul_knowledge) } or target.DebuffRemains(corruption_debuff) <5 or not target.DebuffPresent(doom) or DemonicFury() >=950 or DemonicFury() /32 >target.DeadIn() unless Stance(1) Spell(metamorphosis)
+}
+
+AddIcon mastery=demonology help=main
+{
+ if not InCombat()
+ {
+ if not BuffPresent(spell_power_multiplier any=1) Spell(dark_intent)
+ if not TalentPoints(grimoire_of_sacrifice_talent) or BuffExpires(grimoire_of_sacrifice) unless pet.CreatureFamily(Felguard) Spell(summon_felguard)
+ if TalentPoints(grimoire_of_service_talent) Spell(service_felguard)
+ }
+ if target.DebuffExpires(magic_vulnerability any=1) Spell(curse_of_the_elements)
+ if TalentPoints(grimoire_of_service_talent) Spell(service_felguard)
+ if BuffPresent(metamorphosis) and target.DebuffPresent(corruption_debuff) and target.DebuffRemains(corruption_debuff) <1.5 Spell(touch_of_chaos)
+ if BuffPresent(metamorphosis) and {target.TicksRemain(doom) <=1 or {target.TicksRemain(doom) +1 <Ticks(doom) and BuffPresent(dark_soul_knowledge) } } and target.DeadIn() >=30 Spell(doom)
+ if BuffPresent(metamorphosis) and target.DebuffPresent(corruption_debuff) and target.DebuffRemains(corruption_debuff) <20 Spell(touch_of_chaos)
+ if BuffPresent(metamorphosis) and BuffExpires(dark_soul_knowledge) and DemonicFury() <=650 and target.DeadIn() >30 if Stance(1) cancel.Texture(Spell_shadow_demonform)
+ if BuffPresent(metamorphosis) and BuffStacks(molten_core) and {BuffRemains(dark_soul_knowledge) <CastTime(shadow_bolt) or BuffRemains(dark_soul_knowledge) >CastTime(soul_fire) } Spell(soul_fire)
+ if BuffPresent(metamorphosis) Spell(touch_of_chaos)
+ if not target.DebuffPresent(corruption_debuff) and target.DeadIn() >=6 Spell(corruption)
+ if not InFlightToTarget(hand_of_guldan) and target.DebuffRemains(shadowflame) <1 +CastTime(shadow_bolt) Spell(hand_of_guldan)
+ if BuffStacks(molten_core) and {BuffRemains(dark_soul_knowledge) <CastTime(shadow_bolt) or BuffRemains(dark_soul_knowledge) >CastTime(soul_fire) } Spell(soul_fire)
+ if ManaPercent() <60 Spell(life_tap)
+ Spell(shadow_bolt)
+ Spell(life_tap)
+}
+
+AddIcon mastery=demonology help=aoe checkboxon=opt_aoe
+{
+ if BuffPresent(metamorphosis) and target.DebuffRemains(corruption_debuff) >10 and DemonicFury() <=650 and BuffExpires(dark_soul_knowledge) and not target.DebuffPresent(immolation_aura) if Stance(1) cancel.Texture(Spell_shadow_demonform)
+ if BuffPresent(metamorphosis) Spell(immolation_aura)
+ if BuffPresent(metamorphosis) and target.DebuffRemains(corruption_debuff) <10 Spell(void_ray)
+ if BuffPresent(metamorphosis) and {not target.DebuffPresent(doom) or target.DebuffRemains(doom) <TickTime(doom) or {target.TicksRemain(doom) +1 <Ticks(doom) and BuffPresent(dark_soul_knowledge) } } and target.DeadIn() >=30 Spell(doom)
+ if BuffPresent(metamorphosis) Spell(void_ray)
+ if not target.DebuffPresent(corruption_debuff) and target.DeadIn() >30 Spell(corruption)
+ Spell(hand_of_guldan)
+ if target.DebuffRemains(corruption_debuff) <10 or BuffPresent(dark_soul_knowledge) or DemonicFury() >=950 or DemonicFury() /32 >target.DeadIn() unless Stance(1) Spell(metamorphosis)
+ Spell(hellfire)
+ Spell(life_tap)
+}
+
+AddIcon mastery=demonology help=cd
+{
+ UseItemActions()
+ Spell(blood_fury)
+ Spell(dark_soul_knowledge)
+ Spell(summon_doomguard)
+}
+
+AddIcon mastery=demonology size=small checkboxon=opt_icons_right {}
+
+AddIcon mastery=demonology size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+
+### Destruction icons.
+
+AddIcon mastery=destruction size=small checkboxon=opt_icons_left {}
+AddIcon mastery=destruction size=small checkboxon=opt_icons_left {}
+
+AddIcon mastery=destruction help=offgcd
+{
+ if not InCombat()
+ {
+ if TalentPoints(grimoire_of_sacrifice_talent) Spell(grimoire_of_sacrifice)
+ }
+}
+
+AddIcon mastery=destruction help=main
+{
+ if not InCombat()
+ {
+ if not BuffPresent(spell_power_multiplier any=1) Spell(dark_intent)
+ if not TalentPoints(grimoire_of_sacrifice_talent) or BuffExpires(grimoire_of_sacrifice) unless pet.CreatureFamily(Felhunter) Spell(summon_felhunter)
+ if TalentPoints(grimoire_of_service_talent) Spell(service_felhunter)
+ }
+ if target.DebuffExpires(magic_vulnerability any=1) Spell(curse_of_the_elements)
+ if TalentPoints(grimoire_of_service_talent) Spell(service_felhunter)
+ if BurningEmbers() if target.HealthPercent(less 20) Spell(shadowburn)
+ if {target.TicksRemain(immolate_debuff) <Ticks(immolate_debuff) /2 or target.DebuffExpires(immolate_debuff) } and target.DeadIn() >=5 Spell(immolate)
+ if Charges(conflagrate) ==2 Spell(conflagrate)
+ if not target.DebuffPresent(rain_of_fire_aftermath) and not InFlightToTarget(rain_of_fire_aftermath) Spell(rain_of_fire_aftermath)
+ if BurningEmbers() and {BuffStacks(backdraft) <3 or Level() <86 } and {{BurningEmbers() / 10} >3.5 or BuffRemains(dark_soul_instability) >CastTime(chaos_bolt) or BuffRemains(skull_banner) >CastTime(chaos_bolt) } Spell(chaos_bolt)
+ Spell(conflagrate)
+ Spell(incinerate)
+}
+
+AddIcon mastery=destruction help=aoe checkboxon=opt_aoe
+{
+ if not target.DebuffPresent(rain_of_fire_aftermath) and not InFlightToTarget(rain_of_fire_aftermath) Spell(rain_of_fire_aftermath)
+ if {BurningEmbers() / 10} >=3.5 and BurningEmbers() and target.HealthPercent() <=20 focus.Spell(havoc)
+ if {BurningEmbers() / 10} >=3.5 and BurningEmbers() and BuffStacks(havoc) >=1 if target.HealthPercent(less 20) Spell(shadowburn)
+ if BurningEmbers() and BuffExpires(fire_and_brimstone) Spell(fire_and_brimstone)
+ if BuffPresent(fire_and_brimstone) and not target.DebuffPresent(immolate_debuff) Spell(immolate)
+ if BuffPresent(fire_and_brimstone) Spell(conflagrate)
+ if BuffPresent(fire_and_brimstone) Spell(incinerate)
+ if not target.DebuffPresent(immolate_debuff) Spell(immolate)
+
+ if not target.DebuffPresent(rain_of_fire_aftermath) and not InFlightToTarget(rain_of_fire_aftermath) Spell(rain_of_fire_aftermath)
+ focus.Spell(havoc)
+}
+
+AddIcon mastery=destruction help=cd
+{
+ UseItemActions()
+ Spell(blood_fury)
+ Spell(dark_soul_instability)
+ Spell(summon_doomguard)
+}
+
+AddIcon mastery=destruction size=small checkboxon=opt_icons_right {}
+
+AddIcon mastery=destruction size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+]]
+
+ OvaleScripts:RegisterScript("WARLOCK", name, desc, code)
+end
diff --git a/scripts/ovale_warlock_spells.lua b/scripts/ovale_warlock_spells.lua
new file mode 100644
index 0000000..9649027
--- /dev/null
+++ b/scripts/ovale_warlock_spells.lua
@@ -0,0 +1,140 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "ovale_warlock_spells"
+ local desc = "[5.2] Ovale: Warlock spells"
+ local code = [[
+# Warlock spells and functions.
+
+Define(agony 980)
+ SpellInfo(agony duration=24 tick=2 haste=spell)
+ SpellAddTargetDebuff(agony agony=1)
+Define(backdraft 117896)
+Define(chaos_bolt 116858)
+ SpellInfo(chaos_bolt burningembers=10 tick=1 haste=spell)
+ SpellAddTargetDebuff(chaos_bolt chaos_bolt=1)
+Define(conflagrate 17962)
+ SpellInfo(conflagrate duration=5)
+ SpellAddBuff(conflagrate conflagrate=1)
+Define(corruption 172)
+ SpellAddTargetDebuff(corruption corruption_debuff=1)
+Define(corruption_debuff 146739)
+ SpellInfo(corruption_debuff duration=18 tick=2 haste=spell)
+Define(curse_of_the_elements 1490)
+ SpellInfo(curse_of_the_elements duration=300)
+ SpellAddTargetDebuff(curse_of_the_elements aura_of_the_elements=1)
+Define(dark_intent 109773)
+ SpellInfo(dark_intent duration=3600)
+ SpellAddBuff(dark_intent dark_intent=1)
+Define(dark_soul_instability 113858)
+ SpellInfo(dark_soul_instability duration=20 cd=120)
+ SpellAddBuff(dark_soul_instability dark_soul_instability=1)
+Define(dark_soul_knowledge 113861)
+ SpellInfo(dark_soul_knowledge duration=20 cd=120)
+ SpellAddBuff(dark_soul_knowledge dark_soul_knowledge=1)
+Define(dark_soul_misery 113860)
+ SpellInfo(dark_soul_misery duration=20 cd=120)
+ SpellAddBuff(dark_soul_misery dark_soul_misery=1)
+Define(doom 603)
+ SpellInfo(doom duration=60 demonicfury=60 tick=15 haste=spell stance=1)
+ SpellAddTargetDebuff(doom doom=1)
+Define(drain_soul 1120)
+ SpellInfo(drain_soul channel=6 haste=spell)
+ SpellAddTargetDebuff(drain_soul drain_soul=1)
+Define(fel_flame 77799)
+Define(felstorm 89751)
+ SpellInfo(felstorm duration=6 energy=60 cd=45)
+ SpellAddBuff(felstorm felstorm=1)
+Define(fire_and_brimstone 108683)
+ SpellInfo(fire_and_brimstone burningembers=10 cd=1)
+ SpellAddBuff(fire_and_brimstone fire_and_brimstone=1)
+Define(grimoire_of_sacrifice 108503)
+ SpellInfo(grimoire_of_sacrifice duration=3600 cd=30)
+ SpellAddBuff(grimoire_of_sacrifice grimoire_of_sacrifice=1)
+Define(grimoire_of_sacrifice_talent 15)
+Define(grimoire_of_service_talent 14)
+Define(hand_of_guldan 105174)
+ SpellInfo(hand_of_guldan stance=0)
+Define(haunt 48181)
+ SpellInfo(haunt duration=8 tick=2 shards=1)
+ SpellAddBuff(haunt haunt=1)
+Define(havoc 80240)
+ SpellInfo(havoc duration=15 cd=25)
+ SpellAddBuff(havoc havoc=1)
+Define(hellfire 1949)
+ SpellInfo(hellfire channel=14 haste=spell)
+ SpellAddTargetDebuff(hellfire hellfire=1)
+Define(immolate 348)
+ SpellInfo(immolate duration=15 tick=3 haste=spell)
+ SpellAddTargetDebuff(immolate immolate=1)
+Define(immolate_aoe 108686)
+ SpellInfo(immolate_aoe duration=15 tick=3 haste=spell)
+SpellList(immolate_debuff immolate immolate_aoe)
+Define(immolation_aura 104025)
+ SpellInfo(immolation_aura duration=10 demonicfury=0 stance=1)
+ SpellAddBuff(immolation_aura immolation_aura=1)
+Define(incinerate 29722)
+Define(life_tap 1454)
+ SpellInfo(life_tap mana=-15)
+ SpellAddBuff(life_tap life_tap=1)
+Define(malefic_grasp 103103)
+ SpellInfo(malefic_grasp channel=4 haste=spell)
+ SpellAddTargetDebuff(malefic_grasp malefic_grasp=1)
+Define(melee 103988)
+ SpellInfo(melee stance=1)
+Define(metamorphosis 103958)
+ SpellInfo(metamorphosis demonicfury=0 cd=10)
+ SpellAddBuff(metamorphosis metamorphosis=1)
+Define(molten_core 122355)
+ SpellInfo(molten_core duration=30)
+ SpellAddBuff(molten_core molten_core=1)
+Define(rain_of_fire 5740)
+ SpellInfo(rain_of_fire duration=6)
+ SpellAddBuff(rain_of_fire rain_of_fire=1)
+Define(rain_of_fire_aftermath 104232)
+Define(seed_of_corruption 27243)
+ SpellInfo(seed_of_corruption duration=18 tick=3 haste=spell)
+ SpellAddTargetDebuff(seed_of_corruption seed_of_corruption=1)
+Define(service_felguard 111898)
+ SpellInfo(service_felguard cd=120)
+Define(service_felhunter 111897)
+ SpellInfo(service_felhunter cd=120)
+Define(shadow_bolt 686)
+ SpellInfo(shadow_bolt demonicfury=40 stance=0)
+Define(shadowburn 17877)
+ SpellInfo(shadowburn burningembers=10)
+Define(shadowflame 47960)
+ SpellInfo(shadowflame duration=6 tick=1 haste=spell)
+ SpellAddTargetDebuff(shadowflame shadowflame=1)
+Define(skull_banner 114207)
+ SpellInfo(skull_banner duration=10 cd=180)
+Define(soul_fire 6353)
+ SpellAddBuff(soul_fire molten_core=-1)
+Define(soul_swap 86121)
+Define(soulburn 74434)
+ SpellInfo(soulburn duration=30 shards=1 cd=1)
+ SpellAddBuff(soulburn soulburn=1)
+Define(soulburn_seed_of_corruption 86664)
+Define(summon_doomguard 18540)
+ SpellInfo(summon_doomguard cd=600)
+Define(summon_felguard 30146)
+ SpellInfo(summon_felguard demonicfury=0)
+Define(summon_felhunter 691)
+ SpellInfo(summon_felhunter demonicfury=0)
+Define(summon_infernal 1122)
+ SpellInfo(summon_infernal cd=600)
+Define(touch_of_chaos 103964)
+ SpellInfo(touch_of_chaos demonicfury=40 stance=1)
+Define(unstable_affliction 30108)
+ SpellInfo(unstable_affliction duration=14 tick=2 haste=spell)
+ SpellAddTargetDebuff(unstable_affliction unstable_affliction=1)
+Define(void_ray 115422)
+ SpellInfo(void_ray demonicfury=40)
+Define(wrathstorm 115831)
+ SpellInfo(wrathstorm duration=6 energy=60 cd=45)
+ SpellAddBuff(wrathstorm wrathstorm=1)
+]]
+
+ OvaleScripts:RegisterScript("WARLOCK", name, desc, code, "include")
+end
diff --git a/scripts/ovale_warrior.lua b/scripts/ovale_warrior.lua
new file mode 100644
index 0000000..b6b883e
--- /dev/null
+++ b/scripts/ovale_warrior.lua
@@ -0,0 +1,208 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "Ovale"
+ local desc = "[5.2] Ovale: Arms, Fury, Protection"
+ local code = [[
+# Ovale warrior script by Sidoine for WoW 5.2.
+
+Include(ovale_items)
+Include(ovale_racials)
+Include(ovale_warrior_spells)
+
+AddCheckBox(opt_aoe L(AOE) default)
+AddCheckBox(opt_icons_left "Left icons")
+AddCheckBox(opt_icons_right "Right icons")
+
+AddCheckBox(heroic_leap_check SpellName(heroic_leap))
+AddCheckBox(sunder_armor_check SpellName(sunder_armor))
+AddCheckBox(showwait L(showwait) mastery=fury default)
+
+### Arms icons.
+
+AddIcon mastery=arms size=small checkboxon=opt_icons_left {}
+AddIcon mastery=arms size=small checkboxon=opt_icons_left {}
+
+AddIcon mastery=arms help=offgcd
+{
+ if target.IsInterruptible() Spell(pummel)
+ if TalentPoints(bloodbath_talent) and {target.DeadIn() <=18 or BuffPresent(recklessness) or target.DeadIn() >=75 } Spell(bloodbath)
+ if BuffExpires(enrage) and Rage() <=Rage() -10 Spell(berserker_rage)
+ if target.DebuffPresent(colossus_smash) if CheckBoxOn(heroic_leap_check) Spell(heroic_leap)
+ if {target.DebuffPresent(colossus_smash) and Rage() >=Rage() -40 and target.HealthPercent() >=20 } or Rage() >=Rage() -15 Spell(heroic_strike)
+}
+
+AddIcon mastery=arms help=main
+{
+ if not InCombat()
+ {
+ unless Stance(1) Spell(battle_stance)
+ }
+ if target.DebuffStacks(weakened_armor any=1) <3 or target.DebuffRemains(weakened_armor any=1) <3 if CheckBoxOn(sunder_armor_check) Spell(sunder_armor)
+ Spell(mortal_strike)
+ if TalentPoints(dragon_roar_talent) and TalentPoints(bloodbath_talent) and BuffPresent(bloodbath) and target.DebuffExpires(colossus_smash) and target.HealthPercent() >=20 Spell(dragon_roar)
+ if TalentPoints(storm_bolt_talent) and target.DebuffPresent(colossus_smash) Spell(storm_bolt)
+ if target.DebuffRemains(colossus_smash) <1 Spell(colossus_smash)
+ if target.DebuffPresent(colossus_smash) or BuffPresent(recklessness) or Rage() >=Rage() -25 if target.HealthPercent(less 20) Spell(execute)
+ if TalentPoints(dragon_roar_talent) and {TalentPoints(bloodbath_talent) and BuffPresent(bloodbath) and target.HealthPercent() >=20 } or {target.DebuffExpires(colossus_smash) and target.HealthPercent() <20 } Spell(dragon_roar)
+ if target.DebuffPresent(colossus_smash) and {target.DebuffRemains(colossus_smash) <1 or BuffPresent(recklessness) } and target.HealthPercent() >=20 Spell(slam)
+ if BuffStacks(taste_for_blood) >=3 and target.HealthPercent() >=20 Spell(overpower usable=1)
+ if target.DebuffPresent(colossus_smash) and target.DebuffRemains(colossus_smash) <2.5 and target.HealthPercent() >=20 Spell(slam)
+ if BuffExpires(sudden_execute) if target.HealthPercent(less 20) Spell(execute)
+ if target.HealthPercent() >=20 or BuffPresent(sudden_execute) Spell(overpower usable=1)
+ if Rage() >=40 and target.HealthPercent() >=20 Spell(slam)
+ Spell(battle_shout)
+ Spell(heroic_throw)
+}
+
+AddIcon mastery=arms help=aoe checkboxon=opt_aoe
+{
+ Spell(dragon_roar)
+ Spell(shockwave)
+ Spell(whirlwind)
+ Spell(sweeping_strikes)
+ if Rage() >=90 Spell(cleave)
+ Spell(bloodthirst)
+}
+
+AddIcon mastery=arms help=cd
+{
+ if target.DeadIn() <=18 or {{target.DeadIn() >=186 or {target.HealthPercent() <20 and {target.DebuffRemains(colossus_smash) >=5 or SpellCooldown(colossus_smash) <=1.5 } } } and {not TalentPoints(bloodbath_talent) or not SpellCooldown(bloodbath) } } Spell(recklessness)
+ if TalentPoints(avatar_talent) and {BuffPresent(recklessness) or target.DeadIn() <=25 } Spell(avatar)
+ if BuffPresent(recklessness) Spell(skull_banner)
+ if TalentPoints(bloodbath_talent) and BuffPresent(bloodbath) UseItemActions()
+}
+
+AddIcon mastery=arms size=small checkboxon=opt_icons_right {}
+
+AddIcon mastery=arms size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+
+### Fury icons.
+
+AddIcon mastery=fury size=small checkboxon=opt_icons_left {}
+AddIcon mastery=fury size=small checkboxon=opt_icons_left {}
+
+AddIcon mastery=fury help=offgcd
+{
+ if target.IsInterruptible() Spell(pummel)
+ if TalentPoints(bloodbath_talent) and {SpellCooldown(colossus_smash) <2 or target.DebuffRemains(colossus_smash) >=5 or target.DeadIn() <=20 } Spell(bloodbath)
+ if not {BuffStacks(enrage) or {BuffStacks(raging_blow_aura) ==2 and target.HealthPercent() >=20 } } or {BuffRemains(recklessness) >=10 and not BuffStacks(raging_blow_aura) } Spell(berserker_rage)
+ if target.DebuffPresent(colossus_smash) if CheckBoxOn(heroic_leap_check) Spell(heroic_leap)
+ if {{target.DebuffPresent(colossus_smash) and Rage() >=40 } and target.HealthPercent() >=20 } or Rage() >=110 Spell(heroic_strike)
+}
+
+AddIcon mastery=fury help=main
+{
+ if not InCombat()
+ {
+ unless Stance(1) Spell(battle_stance)
+ }
+ if target.DebuffStacks(weakened_armor any=1) <3 or target.DebuffRemains(weakened_armor any=1) <3 if CheckBoxOn(sunder_armor_check) Spell(sunder_armor)
+ if BuffStacks(raging_blow_aura) ==2 and target.DebuffPresent(colossus_smash) and target.HealthPercent() >=20 Spell(raging_blow)
+ if not {target.HealthPercent() <20 and target.DebuffPresent(colossus_smash) and Rage() >=30 } Spell(bloodthirst)
+ if BuffStacks(bloodsurge) and target.HealthPercent() >=20 and SpellCooldown(bloodthirst) <=1 Spell(wild_strike)
+ if not {target.HealthPercent() <20 and target.DebuffPresent(colossus_smash) and Rage() >=30 } and SpellCooldown(bloodthirst) <=1 and SpellCooldown(bloodthirst) if CheckBoxOn(showwait) Texture(Spell_nature_timestop)
+ if TalentPoints(dragon_roar_talent) and {not target.DebuffPresent(colossus_smash) and {BuffPresent(bloodbath) or not TalentPoints(bloodbath_talent) } } Spell(dragon_roar)
+ Spell(colossus_smash)
+ if BuffPresent(enrage) or target.DebuffPresent(colossus_smash) or Rage() >90 or target.DeadIn() <12 or BuffPresent(recklessness) if target.HealthPercent(less 20) Spell(execute)
+ if TalentPoints(storm_bolt_talent) Spell(storm_bolt)
+ if BuffStacks(raging_blow_aura) ==2 or {BuffPresent(raging_blow_aura) and {target.DebuffPresent(colossus_smash) or SpellCooldown(colossus_smash) >=3 or {SpellCooldown(bloodthirst) >=1 and BuffRemains(raging_blow_aura) <=3 } } } Spell(raging_blow)
+ if BuffStacks(bloodsurge) Spell(wild_strike)
+ if TalentPoints(shockwave_talent) Spell(shockwave)
+ if target.DebuffExpires(colossus_smash) Spell(heroic_throw)
+ if Rage() <70 and not target.DebuffPresent(colossus_smash) Spell(battle_shout)
+ if target.DebuffPresent(colossus_smash) and target.HealthPercent() >=20 Spell(wild_strike)
+ if TalentPoints(impending_victory_talent) and target.HealthPercent() >=20 Spell(impending_victory)
+ if SpellCooldown(colossus_smash) >=2 and Rage() >=80 and target.HealthPercent() >=20 Spell(wild_strike)
+ if Rage() <70 Spell(battle_shout)
+}
+
+AddIcon mastery=fury help=aoe checkboxon=opt_aoe
+{
+
+ Spell(dragon_roar)
+ Spell(shockwave)
+ if BuffStacks(meat_cleaver) and BuffStacks(raging_blow_aura) Spell(raging_blow)
+ Spell(whirlwind)
+ if Rage() >=90 Spell(cleave)
+ Spell(bloodthirst)
+
+}
+
+AddIcon mastery=fury help=cd
+{
+ if {TalentPoints(avatar_talent) and {SpellCooldown(colossus_smash) <2 or target.DebuffRemains(colossus_smash) >=5 } } or {TalentPoints(bloodbath_talent) and {BuffPresent(bloodbath) and {target.DeadIn() >192 or target.HealthPercent() <20 } } } or target.DeadIn() <=12 Spell(recklessness)
+ if BuffPresent(recklessness) and TalentPoints(avatar_talent) Spell(avatar)
+ if BuffPresent(recklessness) Spell(skull_banner)
+ if {not TalentPoints(bloodbath_talent) and target.DebuffPresent(colossus_smash) } or {TalentPoints(bloodbath_talent) and BuffPresent(bloodbath) } UseItemActions()
+}
+
+AddIcon mastery=fury size=small checkboxon=opt_icons_right {}
+
+AddIcon mastery=fury size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+
+### Protection icons.
+
+AddIcon mastery=protection size=small checkboxon=opt_icons_left {}
+AddIcon mastery=protection size=small checkboxon=opt_icons_left {}
+
+AddIcon mastery=protection help=offgcd
+{
+ if target.IsInterruptible() Spell(pummel)
+ if {BuffPresent(ultimatum) and target.HealthPercent() >=20 } Spell(heroic_strike)
+ if Rage() <90 Spell(berserker_rage)
+ if BuffExpires(shield_block_aura) Spell(shield_block)
+ if BuffExpires(shield_barrier) and Rage() >80 Spell(shield_barrier)
+ Spell(demoralizing_shout)
+}
+
+AddIcon mastery=protection help=main
+{
+ if not InCombat()
+ {
+ unless Stance(2) Spell(defensive_stance)
+ }
+ if Rage() <80 Spell(shield_slam)
+ if Rage() <85 Spell(revenge)
+ if Rage() <90 Spell(battle_shout)
+ if target.DebuffExpires(weakened_blows) Spell(thunder_clap)
+ if target.HealthPercent(less 20) Spell(execute)
+ Spell(devastate)
+}
+
+AddIcon mastery=protection help=aoe checkboxon=opt_aoe
+{
+ Spell(dragon_roar)
+ Spell(shockwave)
+ Spell(thunder_clap)
+ if BuffPresent(ultimatum) Spell(cleave)
+ if Rage() >=90 Spell(cleave)
+ Spell(shield_slam)
+}
+
+AddIcon mastery=protection help=cd
+{
+ if Health() <130000 Spell(last_stand)
+ if TalentPoints(avatar_talent) Spell(avatar)
+ Spell(recklessness)
+ if BuffExpires(shield_block_aura) Spell(shield_wall)
+ UseItemActions()
+}
+
+AddIcon mastery=protection size=small checkboxon=opt_icons_right {}
+
+AddIcon mastery=protection size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+]]
+
+ OvaleScripts:RegisterScript("WARRIOR", name, desc, code)
+end
diff --git a/scripts/ovale_warrior_spells.lua b/scripts/ovale_warrior_spells.lua
new file mode 100644
index 0000000..7c1bd78
--- /dev/null
+++ b/scripts/ovale_warrior_spells.lua
@@ -0,0 +1,143 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "ovale_warrior_spells"
+ local desc = "[5.2] Ovale: Warrior spells"
+ local code = [[
+# Warrior spells and functions.
+
+Define(avatar 107574)
+ SpellInfo(avatar duration=24 cd=180)
+ SpellAddBuff(avatar avatar=1)
+Define(avatar_talent 16)
+Define(battle_shout 6673)
+ SpellInfo(battle_shout duration=300 cd=60)
+ SpellAddBuff(battle_shout battle_shout=1)
+Define(battle_stance 2457)
+ SpellInfo(battle_stance cd=3)
+Define(berserker_rage 18499)
+ SpellInfo(berserker_rage duration=6 cd=30)
+ SpellAddBuff(berserker_rage berserker_rage=1)
+Define(bladestorm 46924)
+ SpellInfo(bladestorm duration=6 cd=90)
+ SpellAddBuff(bladestorm bladestorm=1)
+Define(bloodbath 113344)
+ SpellInfo(bloodbath duration=6 tick=1)
+ SpellAddTargetDebuff(bloodbath bloodbath=1)
+Define(bloodbath_talent 17)
+Define(bloodsurge 46916)
+ SpellInfo(bloodsurge duration=10)
+Define(bloodthirst 23881)
+ SpellInfo(bloodthirst rage=-10 cd=4.5)
+Define(cleave 845)
+ SpellInfo(cleave rage=30 cd=1.5)
+Define(colossus_smash 86346)
+ SpellInfo(colossus_smash duration=6.5 cd=20)
+ SpellAddTargetDebuff(colossus_smash colossus_smash=1)
+Define(defensive_stance 71)
+ SpellInfo(defensive_stance cd=3)
+Define(demoralizing_shout 1160)
+ SpellInfo(demoralizing_shout duration=10 cd=60)
+ SpellAddTargetDebuff(demoralizing_shout demoralizing_shout=1)
+Define(devastate 20243)
+Define(dragon_roar 118000)
+ SpellInfo(dragon_roar cd=60)
+Define(dragon_roar_talent 12)
+Define(enrage 5229)
+ SpellInfo(enrage duration=10 rage=-20 cd=60)
+ SpellAddBuff(enrage enrage=1)
+Define(execute 5308)
+ SpellInfo(execute rage=30)
+Define(heroic_leap 6544)
+ SpellInfo(heroic_leap duration=1 cd=45)
+Define(heroic_strike 78)
+ SpellInfo(heroic_strike rage=30 cd=1.5)
+Define(heroic_throw 57755)
+ SpellInfo(heroic_throw cd=30)
+Define(impending_victory 103840)
+ SpellInfo(impending_victory rage=10 cd=30)
+Define(impending_victory_talent 6)
+Define(last_stand 12975)
+ SpellInfo(last_stand duration=20 cd=180)
+ SpellAddBuff(last_stand last_stand=1)
+Define(meat_cleaver 85739)
+ SpellInfo(meat_cleaver duration=10)
+ SpellAddBuff(meat_cleaver meat_cleaver=1)
+Define(mortal_strike 12294)
+ SpellInfo(mortal_strike duration=10 rage=-10 cd=6)
+ SpellAddTargetDebuff(mortal_strike mortal_wounds=1)
+Define(overpower 7384)
+ SpellInfo(overpower rage=10)
+ SpellAddBuff(overpower taste_for_blood=-1)
+Define(pummel 6552)
+ SpellInfo(pummel duration=4 cd=15)
+Define(raging_blow 85288)
+ SpellInfo(raging_blow rage=10)
+ SpellAddBuff(raging_blow raging_blow_aura=-1)
+Define(raging_blow_aura 131116)
+ SpellInfo(raging_blow_aura duration=12)
+ SpellAddBuff(raging_blow_aura raging_blow_aura=1)
+Define(recklessness 1719)
+ SpellInfo(recklessness duration=12 cd=180)
+ SpellAddBuff(recklessness recklessness=1)
+Define(revenge 6572)
+ SpellInfo(revenge rage=-15 cd=9)
+Define(shield_barrier 112048)
+ SpellInfo(shield_barrier duration=6 rage=20 cd=1.5)
+ SpellAddBuff(shield_barrier shield_barrier=1)
+Define(shield_block 2565)
+ SpellInfo(shield_block rage=60 cd=1.5)
+ SpellAddTargetDebuff(shield_block shield_block_aura=1)
+Define(shield_block_aura 132404)
+ SpellInfo(shield_block_aura duration=6)
+ SpellAddBuff(shield_block_aura shield_block_aura=1)
+Define(shield_slam 23922)
+ SpellInfo(shield_slam rage=-20 cd=6)
+Define(shield_wall 871)
+ SpellInfo(shield_wall duration=12 cd=300)
+ SpellAddBuff(shield_wall shield_wall=1)
+Define(shockwave 46968)
+ SpellInfo(shockwave cd=40)
+ SpellAddBuff(shockwave shockwave=1)
+Define(shockwave_talent 11)
+Define(skull_banner 114207)
+ SpellInfo(skull_banner duration=10 cd=180)
+Define(slam 1464)
+ SpellInfo(slam rage=20)
+Define(storm_bolt 107570)
+ SpellInfo(storm_bolt cd=30)
+ SpellAddBuff(storm_bolt storm_bolt=1)
+Define(storm_bolt_talent 18)
+Define(sudden_execute 139958)
+ SpellInfo(sudden_execute duration=10)
+ SpellAddBuff(sudden_execute sudden_execute=1)
+Define(sunder_armor 7386)
+ SpellInfo(sunder_armor rage=15)
+ SpellAddTargetDebuff(sunder_armor weakened_armor=1)
+Define(sweeping_strikes 12328)
+ SpellInfo(sweeping_strikes duration=10 rage=30 cd=10)
+ SpellAddBuff(sweeping_strikes sweeping_strikes=1)
+Define(taste_for_blood 56636)
+Define(thunder_clap 6343)
+ SpellInfo(thunder_clap rage=20 cd=6)
+ SpellAddTargetDebuff(thunder_clap weakened_blows=1)
+Define(ultimatum 122510)
+ SpellInfo(ultimatum duration=10)
+ SpellAddBuff(ultimatum ultimatum=1)
+Define(weakened_armor 113746)
+ SpellInfo(weakened_armor duration=30)
+ SpellAddBuff(weakened_armor weakened_armor=1)
+Define(weakened_blows 115798)
+ SpellInfo(weakened_blows duration=30)
+ SpellAddBuff(weakened_blows weakened_blows=1)
+Define(whirlwind 1680)
+ SpellInfo(whirlwind rage=30)
+Define(wild_strike 100130)
+ SpellInfo(wild_strike rage=30)
+ SpellAddBuff(wild_strike bloodsurge=-1)
+ SpellAddTargetDebuff(wild_strike wild_strike=1)
+]]
+
+ OvaleScripts:RegisterScript("WARRIOR", name, desc, code, "include")
+end