fix multi and negated multi conditionals using / and &

This commit is contained in:
Jrc13245
2025-11-28 15:06:42 -05:00
parent 04297598e9
commit 6486c87798
2 changed files with 331 additions and 4 deletions
+5 -4
View File
@@ -1358,10 +1358,11 @@ function CleveRoids.ParseMsg(msg)
local final_amount_str, num_replacements = string.gsub(amount, "#", "")
local should_check_stacks = (num_replacements == 1)
-- SPECIAL HANDLING FOR STAT CONDITIONALS WITH MULTIPLE COMPARISONS
-- Detect if this is a stat conditional with multiple operators
-- Example: "ap>1800/<2200" should create comparisons for both >1800 and <2200
if (condition == "stat" or condition == "nostat") and string.find(processed_arg, "[>~=<]+%d+[^%d]+[>~=<]") then
-- SPECIAL HANDLING FOR CONDITIONALS WITH MULTIPLE COMPARISONS
-- Detect if this conditional has multiple operators
-- Example: "ap>1800/<2200" or "Recently_Bandaged>0&<10" or "health>50&<80"
-- Works with ANY conditional that supports numeric operators
if string.find(processed_arg, "[>~=<]+%d+[^%d]+[>~=<]") then
-- This arg has multiple comparisons, parse them all
local stat_name = name_to_use
local comparisons = {}