From a561d0ed2008c0092a577dbd92f85b39aff413df Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Sun, 21 Jun 2026 02:36:04 -0500 Subject: [PATCH] Make cursor a [cursor] modifier instead of an @cursor token Per design preference, drop the @ and the ParseMsg special-casing: [cursor] is now a normal modifier keyword (added to ignoreKeywords, mirroring [mouseuse]) rather than a pseudo unit token. The cast/use dispatch still routes through ClassicAPI's CastAtCursor / UseAtCursor (checked via conditionals.cursor). Reverts the @cursor ParseMsg branch. --- Core.lua | 14 +++----------- Init.lua | 1 + 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Core.lua b/Core.lua index 2feaa06..38b4205 100644 --- a/Core.lua +++ b/Core.lua @@ -2041,15 +2041,7 @@ function CleveRoids.ParseMsg(msg) local _, _, target = string.find(conditionBlock, "(@[^%s,]+)") if target then conditionBlock = CleveRoids.Trim(string.gsub(conditionBlock, target, "")) - local tok = string.sub(target, 2) - -- @cursor is a ground-target directive, not a unit. Flag it so the cast - -- routes through ClassicAPI's CastAtCursor / UseAtCursor, and leave the - -- target at its default (CastAtCursor places at the cursor regardless). - if string.lower(tok) == "cursor" then - conditionals.atCursor = true - else - conditionals.target = tok - end + conditionals.target = string.sub(target, 2) end if conditionBlock and conditionals.action then @@ -2663,8 +2655,8 @@ function CleveRoids.DoWithConditionals(msg, hook, fixEmptyTargetFunc, targetBefo castMsg = msg .. "(" .. rank .. ")" end end - if conditionals.atCursor then - -- @cursor: place a ground-target spell/item at the cursor via + if conditionals.cursor then + -- [cursor]: place a ground-target spell/item at the cursor via -- ClassicAPI (no AoE-reticle click). Both functions fall back to a -- normal cast/use for non-ground actions. if action == CastSpellByName then diff --git a/Init.lua b/Init.lua index 070561d..5582022 100644 --- a/Init.lua +++ b/Init.lua @@ -188,6 +188,7 @@ CleveRoids.ignoreKeywords = { _groups = true, -- Grouped conditional values for AND/OR evaluation multiscan = true, -- Processed before Keywords loop (target resolution) mouseuse = true, -- Post-cast modifier: auto-click AOE targeting circle at cursor + cursor = true, -- Modifier: place ground-target spell/item at cursor (CastAtCursor) stopattack = true, -- Post-cast modifier: stop autoattack after cast (CheapShot pattern) }