From 81a835f0fe6e290bde5a0da357a82b3931a4da0a Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Wed, 16 Jul 2014 14:40:50 -0400 Subject: [PATCH] Check every requirement instead of only the first matched requirement. When checking whether requirements for a spell are met for it to be usable, check every requirement instead of allowing the first met requirement and falling through. --- OvaleBestAction.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua index aac04fd..8336648 100644 --- a/OvaleBestAction.lua +++ b/OvaleBestAction.lua @@ -263,14 +263,16 @@ local function GetActionSpellInfo(element, state, target) if si.stance and not OvaleStance:IsStance(si.stance) then Ovale:Logf("Spell ID '%s' requires the player to be in stance '%s'", spellId, si.stance) meetsRequirements = false - elseif si.combo then + end + if meetsRequirements and si.combo then -- Spell requires combo points. local cost = state:ComboPointCost(spellId) if cost > 0 and state.combo < cost then Ovale:Logf("Spell ID '%s' requires at least %d combo points.", spellId, cost) meetsRequirements = false end - else + end + if meetsRequirements then for powerType in pairs(OvalePower.SECONDARY_POWER) do if si[powerType] then -- Spell requires "secondary" resources, e.g., chi, focus, rage, etc., -- 1.7.9.5