From a74ab6b875a690f98ec06f33477cb2f889060603 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Tue, 6 May 2014 14:21:47 +0000 Subject: [PATCH] Support SimC's max_cycle_targets=N expression for multi-dotting. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1388 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleSimulationCraft.lua | 8 ++++++++ scripts/ovale_priest.lua | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/OvaleSimulationCraft.lua b/OvaleSimulationCraft.lua index bcded24..aaacde9 100644 --- a/OvaleSimulationCraft.lua +++ b/OvaleSimulationCraft.lua @@ -483,6 +483,7 @@ do or action == "mind_flay_insanity" or action == "stance" and scriptLine.choose or scriptLine.weapon + or scriptLine.max_cycle_targets then local needAnd = false if action == "pool_resource" and not script.for_next then @@ -559,6 +560,13 @@ do end needAnd = true end + if scriptLine.max_cycle_targets then + if needAnd then + tinsert(scriptLine, "and") + end + tinsert(scriptLine, format("DebuffCountOnAny(%s_debuff) <= %d", action, scriptLine.max_cycle_targets)) + needAnd = true + end end if action ~= "pool_resource" then diff --git a/scripts/ovale_priest.lua b/scripts/ovale_priest.lua index f95cc87..0a8ceb1 100644 --- a/scripts/ovale_priest.lua +++ b/scripts/ovale_priest.lua @@ -41,13 +41,13 @@ AddFunction ShadowDefaultActions #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) + if True(miss_react) and not target.DebuffPresent(shadow_word_pain_debuff) and DebuffCountOnAny(shadow_word_pain_debuff) <= 5 Spell(shadow_word_pain) #vampiric_touch,cycle_targets=1,max_cycle_targets=5,if=remains