-- Debuff Counter Kitty.ComboManager.targetEffectCounter = function(self, condition) local result = false; local counter = 0; for index, value in ipairs(condition) do for i=1,100,1 do if(value.effectType == "name") then local a,b,c,d,e = UnitDebuff("target",i); if(a == value.name) then local duration = UnitDebuffLeftTime("target", i); if(duration >= 0.6) then counter = counter + 1; end end elseif(value.effectType == "id") then local a,b,c,d,e = UnitDebuff("target",i); if(tonumber(d) == tonumber(value.name)) then local duration = UnitDebuffLeftTime("target", i); if(duration >= 0.6) then counter = counter + 1; end end end end if(counter >= value.threshold) then result = true; end end return result; end; Kitty.ComboManager.targetEffectCounterHelp = function(self, condition) local resultList = {}; for index, value in ipairs(condition) do local str = ""; if(index ~= 1) then str = str .. "and "; end if(value.threshold and value.threshold > 0.0) then str = str .. Kitty.colorCyan(value.name .. Kitty.T("message", "OverDuration", value.threshold)); else str = str .. Kitty.colorCyan(value.name); end table.insert(resultList, str); end if(#resultList > 1) then table.insert(resultList, 1, Kitty.T("message", "TargetEffect1")); elseif(#resultList == 1) then resultList[1] = Kitty.T("message", "TargetEffect2", resultList[1]); end return resultList; end; Kitty.ComboManager.targetEffectCounterDescribe = function(self, condition) return { Kitty.T("message", "targetEffectCounterDescription1"), Kitty.T("message", "targetEffectCounterDescription2"), Kitty.T("message", "targetEffectCounterDescription3"), }; end; Kitty.ComboManager.targetEffectCounterType = function(self, condition) return Kitty.ComboManager.TYPE_EFFECT; end;