From 5e26b776ebfa78d69cb24bcc1b8e765ef762e362 Mon Sep 17 00:00:00 2001 From: Jrc13245 Date: Wed, 26 Nov 2025 13:32:23 -0500 Subject: [PATCH] fix negated conditionals using multi and fix revenge proc from reactive --- Conditionals.lua | 16 +++++++++------- Utility.lua | 6 ++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Conditionals.lua b/Conditionals.lua index 2069815..daad207 100644 --- a/Conditionals.lua +++ b/Conditionals.lua @@ -76,9 +76,11 @@ local function Or(t,func) end -- Helper to choose And() or Or() based on operator metadata --- For negated conditionals: --- - If operator is OR (or not specified), use Or() -> any negation matches --- - If operator is AND, use And() -> all negations must match +-- For negated conditionals (nomybuff, nozone, etc.): +-- - OR separator (/) uses And() logic -> ALL negations must match (e.g., missing ALL buffs) +-- - AND separator (&) uses Or() logic -> ANY negation can match (e.g., missing ANY buff) +-- This is inverted from positive conditionals due to De Morgan's law: +-- NOT(A OR B OR C) = (NOT A) AND (NOT B) AND (NOT C) local function NegatedMulti(t, func, conditionals, condition) if type(func) ~= "function" then return false end if type(t) ~= "table" then @@ -92,11 +94,11 @@ local function NegatedMulti(t, func, conditionals, condition) end if operatorType == "AND" then - -- AND operator: ALL values must fail the check (original And behavior) - return And(t, func) - else - -- OR operator (default): ANY value can fail the check + -- AND separator (&): ANY negation can match return Or(t, func) + else + -- OR separator (/) [default]: ALL negations must match + return And(t, func) end end diff --git a/Utility.lua b/Utility.lua index 36f8f45..9d7b061 100644 --- a/Utility.lua +++ b/Utility.lua @@ -2592,10 +2592,12 @@ local reactivePatterns = { }, Revenge = { -- Procs when YOU block, dodge, or parry an enemy attack (any stance) + -- Does NOT require targeting the triggering mob - can use on any target patterns = { "You block", -- English: "You block X's Y" "You dodge", -- English: "You dodge X's Y" "You parry", -- English: "You parry X's Y" + " blocked%)", -- English: "X hits you for Y (Z blocked)" "Ihr blockt", -- German block "Ihr weicht aus", -- German dodge "Ihr pariert", -- German parry @@ -2613,8 +2615,8 @@ local reactivePatterns = { "你招架了", -- Chinese Traditional parry }, type = "player_avoid", - requiresTargetGUID = true, -- Track which enemy triggered it - duration = 4.0 -- 4 second proc window + requiresTargetGUID = false, -- Revenge usable on any target once procced + duration = 5.0 -- 5 second proc window } }