Johnny C. Lam [04-27-14 - 04:39]
diff --git a/Ovale.toc b/Ovale.toc
index 9c5e9a8..9790818 100644
--- a/Ovale.toc
+++ b/Ovale.toc
@@ -61,6 +61,7 @@ OvaleEclipse.lua
OvaleEnemies.lua
OvaleRecount.lua
OvaleRunes.lua
+OvaleShadowWordDeath.lua
OvaleSkada.lua
OvaleSpellDamage.lua
OvaleSteadyFocus.lua
diff --git a/OvaleShadowWordDeath.lua b/OvaleShadowWordDeath.lua
new file mode 100644
index 0000000..6d44de0
--- /dev/null
+++ b/OvaleShadowWordDeath.lua
@@ -0,0 +1,96 @@
+--[[--------------------------------------------------------------------
+ Ovale Spell Priority
+ Copyright (C) 2014 Johnny C. Lam
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License in the LICENSE
+ file accompanying this program.
+--]]-------------------------------------------------------------------
+
+local _, Ovale = ...
+local OvaleShadowWordDeath = Ovale:NewModule("OvaleShadowWordDeath", "AceEvent-3.0")
+Ovale.OvaleShadowWordDeath = OvaleShadowWordDeath
+
+--[[
+ Shadow Word: Death description from wowhead.com:
+
+ If the target does not die, the cooldown is reset, but this additional
+ Shadow Word: Death does not grant a Shadow Orb. This effect has a 9 second
+ cooldown.
+
+ Add a hidden buff when the player casts Shadow Word: Death and the target does
+ not die.
+--]]
+
+--<private-static-properties>
+-- Forward declarations for module dependencies.
+local OvaleAura = nil
+
+local API_GetTime = GetTime
+local API_UnitClass = UnitClass
+local API_UnitGUID = UnitGUID
+
+-- Player's class.
+local _, self_class = API_UnitClass("player")
+-- Player's GUID.
+local self_guid = nil
+
+-- Shadow Word: Death spell IDs.
+local SHADOW_WORD_DEATH = {
+ [ 32379] = true,
+ [129176] = true,
+}
+--</private-static-properties>
+
+--<public-static-properties>
+OvaleShadowWordDeath.name = "Shadow Word: Death Reset Cooldown"
+OvaleShadowWordDeath.spellId = 157218 -- spell ID to use for the hidden buff
+OvaleShadowWordDeath.start = 0
+OvaleShadowWordDeath.ending = 0
+OvaleShadowWordDeath.duration = 9
+OvaleShadowWordDeath.stacks = 0
+--</public-static-properties>
+
+--<public-static-methods>
+function OvaleShadowWordDeath:OnInitialize()
+ -- Resolve module dependencies.
+ OvaleAura = Ovale.OvaleAura
+end
+
+function OvaleShadowWordDeath:OnEnable()
+ if self_class == "OvaleShadowWordDeath" then
+ self_guid = API_UnitGUID("player")
+ self:RegisterMessage("Ovale_SpecializationChanged")
+ end
+end
+
+function OvaleShadowWordDeath:OnDisable()
+ if self_class == "OvaleShadowWordDeath" then
+ self:UnregisterMessage("Ovale_SpecializationChanged")
+ end
+end
+
+function OvaleShadowWordDeath:Ovale_SpecializationChanged(event, specialization, previousSpecialization)
+ if specialization == "shadow" then
+ self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
+ else
+ self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
+ end
+end
+
+function OvaleShadowWordDeath:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, cleuEvent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
+ local arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23 = ...
+ if sourceGUID == self_guid then
+ if cleuEvent == "SPELL_DAMAGE" then
+ local spellId, overkill = arg12, arg16
+ if SHADOW_WORD_DEATH[spellId] and not (overkill and overkill > 0) then
+ local now = API_GetTime()
+ self.start = atTime
+ self.ending = atTime + self.duration
+ self.stacks = 1
+ OvaleAura:GainedAuraOnGUID(self_guid, self.start, self.spellId, self_guid, "HELPFUL", nil, nil, self.stacks, nil, self.duration, self.ending, nil, self.name, nil, nil, nil)
+ end
+ end
+ end
+end
+--</public-static-methods>
diff --git a/OvaleSimulationCraft.lua b/OvaleSimulationCraft.lua
index 41e8011..a8e7d29 100644
--- a/OvaleSimulationCraft.lua
+++ b/OvaleSimulationCraft.lua
@@ -274,6 +274,11 @@ do
["guardian_of_ancient_kings"] = "guardian_of_ancient_kings_melee",
},
},
+ priest = {
+ shadow = {
+ ["arcane_torrent"] = "arcane_torrent_mana",
+ },
+ },
shaman = {
elemental = {
["ascendance"] = "ascendance_caster",
@@ -450,6 +455,7 @@ do
or scriptLine.sync
or action == "focus_fire" and scriptLine.five_stacks == 1
or action == "kill_command"
+ or action == "mind_flay_insanity"
or action == "stance" and scriptLine.choose
or scriptLine.weapon
then
@@ -483,15 +489,19 @@ do
end
tinsert(scriptLine, "BuffStacks(frenzy_buff any=1) == 5")
needAnd = true
- end
- if action == "kill_command" then
+ elseif action == "kill_command" then
if needAnd then
tinsert(scriptLine, "and")
end
tinsert(scriptLine, "pet.Present()")
needAnd = true
- end
- if action == "stance" and scriptLine.choose then
+ elseif action == "mind_flay_insanity" then
+ if needAnd then
+ tinsert(scriptLine, "and")
+ end
+ tinsert(scriptLine, "target.DebuffPresent(devouring_plague_debuff)")
+ needAnd = true
+ elseif action == "stance" and scriptLine.choose then
if needAnd then
tinsert(scriptLine, "and")
end
diff --git a/scripts/files.xml b/scripts/files.xml
index f9b7dd0..24c6070 100644
--- a/scripts/files.xml
+++ b/scripts/files.xml
@@ -10,6 +10,8 @@
<Script file="ovale_monk_spells.lua" />
<Script file="ovale_paladin.lua" />
<Script file="ovale_paladin_spells.lua" />
+ <Script file="ovale_priest.lua" />
+ <Script file="ovale_priest_spells.lua" />
<Script file="ovale_shaman.lua" />
<Script file="ovale_shaman_spells.lua" />
diff --git a/scripts/ovale_priest.lua b/scripts/ovale_priest.lua
new file mode 100644
index 0000000..29b0de7
--- /dev/null
+++ b/scripts/ovale_priest.lua
@@ -0,0 +1,229 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "Ovale"
+ local desc = "[5.4] Ovale: Shadow"
+ local code = [[
+# Ovale shadow script based on SimulationCraft.
+# Last updated: 2014-04-25
+
+Include(ovale_items)
+Include(ovale_racials)
+Include(ovale_priest_spells)
+
+AddCheckBox(opt_aoe L(AOE) default)
+AddCheckBox(opt_icons_left "Left icons")
+AddCheckBox(opt_icons_right "Right icons")
+
+###
+### Shadow
+###
+# Based on SimulationCraft profile "Priest_Shadow_T16H".
+# class=priest
+# spec=shadow
+# talents=http://us.battle.net/wow/en/tool/talent-calculator#Xb!002202
+# glyphs=inner_sanctum/mind_flay/dark_archangel/shadowy_friends/shadow_ravens
+
+AddFunction ShadowDefaultActions
+{
+ #shadowform
+ if not Stance(priest_shadowform) Spell(shadowform)
+ #shadow_word_death,if=buff.shadow_word_death_reset_cooldown.stack=1&active_enemies<=5
+ if BuffStacks(shadow_word_death_reset_cooldown_buff) == 1 Spell(shadow_word_death usable=1)
+ #devouring_plague,if=shadow_orb=3&(cooldown.mind_blast.remains<1.5|target.health.pct<20&cooldown.shadow_word_death.remains<1.5)
+ if ShadowOrbs() == 3 and { SpellCooldown(mind_blast) < 1.5 or target.HealthPercent() < 20 and SpellCooldown(shadow_word_death) < 1.5 } Spell(devouring_plague)
+ #mind_blast,if=active_enemies<=5&cooldown_react
+ Spell(mind_blast)
+ #shadow_word_death,if=buff.shadow_word_death_reset_cooldown.stack=0&active_enemies<=5
+ if BuffStacks(shadow_word_death_reset_cooldown_buff) == 0 Spell(shadow_word_death usable=1)
+ #mind_flay_insanity,if=target.dot.devouring_plague_tick.ticks_remain=1,chain=1
+ if target.DebuffPresent(devouring_plague_debuff) and target.TicksRemain(devouring_plague_debuff) == 1 Spell(mind_flay)
+ #mind_flay_insanity,interrupt=1,chain=1,if=active_enemies<=5
+ if target.DebuffPresent(devouring_plague_debuff) Spell(mind_flay)
+ #shadow_word_pain,cycle_targets=1,max_cycle_targets=5,if=miss_react&!ticking
+ if True(miss_react) and not target.DebuffPresent(shadow_word_pain_debuff) Spell(shadow_word_pain)
+ #vampiric_touch,cycle_targets=1,max_cycle_targets=5,if=remains<cast_time&miss_react
+ if target.DebuffRemains(vampiric_touch_debuff) < CastTime(vampiric_touch) and True(miss_react) Spell(vampiric_touch)
+ #shadow_word_pain,cycle_targets=1,max_cycle_targets=5,if=miss_react&ticks_remain<=1
+ if True(miss_react) and target.TicksRemain(shadow_word_pain_debuff) <= 1 Spell(shadow_word_pain)
+ #vampiric_touch,cycle_targets=1,max_cycle_targets=5,if=remains<cast_time+tick_time&miss_react
+ if target.DebuffRemains(vampiric_touch_debuff) < CastTime(vampiric_touch) + target.TickTime(vampiric_touch_debuff) and True(miss_react) Spell(vampiric_touch)
+ #devouring_plague,if=shadow_orb=3&ticks_remain<=1
+ if ShadowOrbs() == 3 and target.TicksRemain(devouring_plague_debuff) <= 1 Spell(devouring_plague)
+ #mind_spike,if=active_enemies<=5&buff.surge_of_darkness.react=2
+ if BuffStacks(surge_of_darkness_buff) == 2 Spell(mind_spike)
+ #cascade_damage,if=talent.cascade.enabled
+ if TalentPoints(cascade_talent) Spell(cascade_damage)
+ #wait,sec=cooldown.shadow_word_death.remains,if=target.health.pct<20&cooldown.shadow_word_death.remains<0.5&active_enemies<=1
+ if target.HealthPercent() < 20 Spell(shadow_word_death wait=0.5)
+ #wait,sec=cooldown.mind_blast.remains,if=cooldown.mind_blast.remains<0.5&active_enemies<=1
+ Spell(mind_blast wait=0.5)
+ #mind_spike,if=buff.surge_of_darkness.react&active_enemies<=5
+ if BuffPresent(surge_of_darkness_buff) Spell(mind_spike)
+ #mind_flay,chain=1,interrupt=1
+ Spell(mind_flay)
+}
+
+AddFunction ShadowDefaultMovingActions
+{
+ #shadowform
+ if not Stance(priest_shadowform) Spell(shadowform)
+ #shadow_word_death,if=buff.shadow_word_death_reset_cooldown.stack=1&active_enemies<=5
+ if BuffStacks(shadow_word_death_reset_cooldown_buff) == 1 and Enemies() <= 5 Spell(shadow_word_death usable=1)
+ #devouring_plague,if=shadow_orb=3&(cooldown.mind_blast.remains<1.5|target.health.pct<20&cooldown.shadow_word_death.remains<1.5)
+ if ShadowOrbs() == 3 and { SpellCooldown(mind_blast) < 1.5 or target.HealthPercent() < 20 and SpellCooldown(shadow_word_death) < 1.5 } Spell(devouring_plague)
+ #shadow_word_death,if=buff.shadow_word_death_reset_cooldown.stack=0&active_enemies<=5
+ if BuffStacks(shadow_word_death_reset_cooldown_buff) == 0 and Enemies() <= 5 Spell(shadow_word_death usable=1)
+ #shadow_word_pain,cycle_targets=1,max_cycle_targets=5,if=miss_react&!ticking
+ if True(miss_react) and not target.DebuffPresent(shadow_word_pain_debuff) Spell(shadow_word_pain)
+ #shadow_word_pain,cycle_targets=1,max_cycle_targets=5,if=miss_react&ticks_remain<=1
+ if True(miss_react) and target.TicksRemain(shadow_word_pain_debuff) <= 1 Spell(shadow_word_pain)
+ #devouring_plague,if=shadow_orb=3&ticks_remain<=1
+ if ShadowOrbs() == 3 and target.TicksRemain(devouring_plague_debuff) <= 1 Spell(devouring_plague)
+ #mind_spike,if=active_enemies<=5&buff.surge_of_darkness.react=2
+ if Enemies() <= 5 and BuffStacks(surge_of_darkness_buff) == 2 Spell(mind_spike)
+ #cascade_damage,if=talent.cascade.enabled
+ if TalentPoints(cascade_talent) Spell(cascade_damage)
+ #wait,sec=cooldown.shadow_word_death.remains,if=target.health.pct<20&cooldown.shadow_word_death.remains<0.5&active_enemies<=1
+ if target.HealthPercent() < 20 Spell(shadow_word_death wait=0.5 usable=1)
+ #mind_spike,if=buff.surge_of_darkness.react&active_enemies<=5
+ if BuffPresent(surge_of_darkness_buff) and Enemies() <= 5 Spell(mind_spike)
+ #shadow_word_death,moving=1
+ Spell(shadow_word_death usable=1)
+ #mind_blast,moving=1,if=buff.divine_insight_shadow.react&cooldown_react
+ if BuffPresent(divine_insight_shadow_buff) and Spell(mind_blast) Spell(mind_blast)
+ #shadow_word_pain,moving=1
+ Spell(shadow_word_pain)
+}
+
+AddFunction ShadowDefaultShortCdActions
+{
+ #mindbender,if=talent.mindbender.enabled
+ if TalentPoints(mindbender_talent) Spell(mindbender)
+ #shadowfiend,if=!talent.mindbender.enabled
+ if not TalentPoints(mindbender_talent) Spell(shadowfiend)
+
+ unless { BuffStacks(shadow_word_death_reset_cooldown_buff) == 1 Spell(shadow_word_death usable=1) }
+ or { ShadowOrbs() == 3 and { SpellCooldown(mind_blast) < 1.5 or target.HealthPercent() < 20 and SpellCooldown(shadow_word_death) < 1.5 } }
+ or Spell(mind_blast)
+ or { BuffStacks(shadow_word_death_reset_cooldown_buff) == 0 and Spell(shadow_word_death usable=1) }
+ or { target.DebuffPresent(devouring_plague_debuff) and target.TicksRemain(devouring_plague_debuff) == 1 }
+ or target.DebuffPresent(devouring_plague_debuff)
+ or { True(miss_react) and not target.DebuffPresent(shadow_word_pain_debuff) }
+ or { target.DebuffRemains(vampiric_touch_debuff) < CastTime(vampiric_touch) and True(miss_react) }
+ or { True(miss_react) and target.TicksRemain(shadow_word_pain_debuff) <= 1 }
+ or target.DebuffRemains(vampiric_touch_debuff) < CastTime(vampiric_touch) + target.TickTime(vampiric_touch_debuff) and True(miss_react) Spell(vampiric_touch)
+ or { ShadowOrbs() == 3 and target.TicksRemain(devouring_plague_debuff) <= 1 }
+ or { BuffStacks(surge_of_darkness_buff) == 2 }
+ {
+ #halo,if=talent.halo.enabled
+ if TalentPoints(halo_talent) Spell(halo)
+ #divine_star,if=talent.divine_star.enabled
+ if TalentPoints(divine_star_talent) Spell(divine_star)
+
+ unless { target.HealthPercent() < 20 and SpellCooldown(shadow_word_death) < 0.5 and Enemies() <= 1 }
+ or { SpellCooldown(mind_blast) < 0.5 and Enemies() <= 1 }
+ or { BuffPresent(surge_of_darkness_buff) and Enemies() <= 5 }
+ {
+ #mind_sear,chain=1,interrupt=1,if=active_enemies>=3
+ if Enemies() >= 3 Spell(mind_sear)
+ }
+ }
+}
+
+AddFunction ShadowDefaultCdActions
+{
+ unless not Stance(priest_shadowform)
+ {
+ #use_item,slot=hands
+ UseItemActions()
+ #jade_serpent_potion,if=buff.bloodlust.react|target.time_to_die<=40
+ if BuffPresent(burst_haste any=1) or target.TimeToDie() <= 40 UsePotionIntellect()
+
+ unless { TalentPoints(mindbender_talent) and Spell(mindbender) }
+ or { not TalentPoints(mindbender_talent) and Spell(shadowfiend) }
+ {
+ #power_infusion,if=talent.power_infusion.enabled
+ if TalentPoints(power_infusion_talent) Spell(power_infusion)
+ #blood_fury
+ Spell(blood_fury)
+ #berserking
+ Spell(berserking)
+ #arcane_torrent
+ Spell(arcane_torrent_mana)
+ }
+ }
+}
+
+AddFunction ShadowPrecombatActions
+{
+ #flask,type=warm_sun
+ #food,type=mogu_fish_stew
+ #power_word_fortitude,if=!aura.stamina.up
+ if not BuffPresent(stamina any=1) Spell(power_word_fortitude)
+ #inner_fire
+ if BuffExpires(inner_fire_buff) Spell(inner_fire)
+ #shadowform
+ if not Stance(priest_shadowform) Spell(shadowform)
+ #snapshot_stats
+}
+
+AddFunction ShadowPrecombatCdActions
+{
+ #jade_serpent_potion
+ UsePotionIntellect()
+}
+
+### Feral Icons
+
+AddIcon mastery=shadow help=cd size=small checkboxon=opt_icons_left
+{
+ if TalentPoints(desperate_prayer_talent) Spell(desperate_prayer)
+ Spell(dispersion)
+}
+
+AddIcon mastery=shadow size=small checkboxon=opt_icons_left
+{
+ Spell(vampiric_embrace)
+ Spell(hymn_of_hope)
+}
+
+AddIcon mastery=shadow help=shortcd
+{
+ ShadowDefaultShortCdActions()
+}
+
+AddIcon mastery=shadow help=main
+{
+ if InCombat(no) ShadowPrecombatActions()
+ ShadowDefaultActions()
+}
+
+AddIcon mastery=shadow help=moving
+{
+ if InCombat(no) ShadowPrecombatActions()
+ ShadowDefaultMovingActions()
+}
+
+AddIcon mastery=shadow help=cd
+{
+ if InCombat(no) ShadowPrecombatCdActions()
+ Interrupt()
+ UseRacialInterruptActions()
+ ShadowDefaultCdActions()
+}
+
+AddIcon mastery=shadow help=cd size=small checkboxon=opt_icons_right
+{
+ Spell(mass_dispel)
+}
+
+AddIcon mastery=shadow help=cd size=small checkboxon=opt_icons_right
+{
+ UseItemActions()
+}
+]]
+
+ OvaleScripts:RegisterScript("PRIEST", name, desc, code)
+end
diff --git a/scripts/ovale_priest_spells.lua b/scripts/ovale_priest_spells.lua
new file mode 100644
index 0000000..02bad71
--- /dev/null
+++ b/scripts/ovale_priest_spells.lua
@@ -0,0 +1,91 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+ local name = "ovale_priest_spells"
+ local desc = "[5.4.7] Ovale: Priest spells"
+ local code = [[
+# Priest spells and functions.
+# Last updated: 2014-04-19
+
+Define(cascade_damage 121135)
+ SpellInfo(cascade_damage cd=25)
+Define(cascade_talent 16)
+Define(desperate_prayer 19236)
+ SpellInfo(desperate_prayer cd=120)
+Define(desperate_prayer_talent 10)
+Define(devouring_plague 2944)
+ SpellInfo(devouring_plague shadoworbs=finisher)
+ SpellAddTargetDebuff(devouring_plague devouring_plague_debuff=1)
+Define(devouring_plague_debuff 2944)
+ SpellInfo(devouring_plague_debuff duration=6 haste=spell tick=1)
+Define(dispersion 47585)
+ SpellInfo(dispersion cd=120)
+ SpellInfo(dispersion addcd=-15 glyph=glyph_of_dispersion)
+Define(divine_insight_shadow_buff 124430)
+ SpellInfo(divine_insight_shadow_buff duration=12)
+Define(divine_insight_talent 15)
+Define(divine_star 110744)
+ SpellInfo(divine_star cd=15)
+Define(divine_star_talent 17)
+Define(from_darkness_comes_light_talent 7)
+Define(glyph_of_dispersion 63229)
+Define(halo 120517)
+ SpellInfo(halo cd=40)
+Define(halo_talent 18)
+Define(hymn_of_hope 64901)
+ SpellInfo(hymn_of_hope cd=360)
+Define(inner_fire 588)
+ SpellAddBuff(inner_fire inner_fire_buff=1)
+Define(inner_fire_buff 588)
+Define(mass_dispel 32375)
+ SpellInfo(mass_dispel cd=15)
+Define(mind_blast 8092)
+ SpellInfo(mind_blast cd=8 shadoworbs=-1)
+ SpellAddBuff(mind_blast divine_insight_shadow_buff=0 talent=divine_insight_talent)
+Define(mind_flay 15407)
+ SpellInfo(mind_flay canStopChannelling=3 duration=3 haste=spell tick=1)
+Define(mind_sear 48045)
+ SpellInfo(mind_sear canStopChannelling=5 duration=5 haste=spell tick=1)
+Define(mind_spike 73510)
+ SpellAddBuff(mind_spike surge_of_darkness_buff=0 mastery=shadow talent=from_darkness_comes_light_talent)
+Define(mindbender 123040)
+ SpellInfo(mindbender cd=60)
+Define(mindbender_talent 8)
+Define(power_infusion 10060)
+ SpellInfo(power_infusion cd=120)
+Define(power_infusion_talent 14)
+Define(power_word_fortitude 21562)
+Define(shadow_word_death 32379)
+ SpellInfo(shadow_word_death cd=8)
+ SpellInfo(shadow_word_death buff_shadoworbs=shadow_word_death_reset_cooldown_buff buff_shadoworbs_amount=1 shadoworbs=-1)
+Define(shadow_word_death_reset_cooldown_buff 157218) # OvaleShadowWordDeath
+ SpellInfo(shadow_word_death_reset_cooldown_buff duration=9)
+Define(shadow_word_pain 589)
+ SpellAddTargetDebuff(shadow_word_pain shadow_word_pain_debuff=1)
+Define(shadow_word_pain_debuff 589)
+ SpellInfo(shadow_word_pain_debuff duration=18 haste=spell tick=3)
+ SpellInfo(shadow_word_pain_debuff addduration=3 itemset=T14_caster itemcount=4)
+Define(shadowfiend 34433)
+ SpellInfo(shadowfiend cd=180)
+Define(shadowform 15473)
+Define(silence 15487)
+ SpellInfo(silence cd=45)
+Define(surge_of_darkness_buff 87160)
+ SpellInfo(surge_of_darkness_buff duration=10)
+Define(vampiric_embrace 15286)
+ SpellInfo(vampiric_embrace cd=180)
+Define(vampiric_touch 34914)
+ SpellAddTargetDebuff(vampiric_touch vampiric_touch_debuff=1)
+Define(vampiric_touch_debuff 34914)
+ SpellInfo(vampiric_touch_debuff duration=15 haste=spell tick=3)
+ SpellInfo(vampiric_touch_debuff addduration=3 itemset=T14_caster itemcount=4)
+
+AddFunction Interrupt
+{
+ if target.IsFriend(no) and target.IsInterruptible() Spell(silence)
+}
+]]
+
+ OvaleScripts:RegisterScript("PRIEST", name, desc, code, "include")
+end