fix FF Feral parsing

This commit is contained in:
Jrc13245
2025-12-28 19:08:24 -05:00
parent 5b6d8268e0
commit c0d4f88fe9
4 changed files with 122 additions and 22 deletions
+6 -2
View File
@@ -2235,7 +2235,9 @@ function CleveRoids.DoWithConditionals(msg, hook, fixEmptyTargetFunc, targetBefo
else
local castMsg = msg
-- FLEXIBLY check for any rank text like "(Rank 9)" before adding the highest rank
if action == CastSpellByName and not string.find(msg, "%(.*%)") then
-- Use specific "(Rank" check instead of any parentheses, so spells like
-- "Faerie Fire (Feral)" still get their rank appended automatically
if action == CastSpellByName and not string.find(msg, "%(Rank") then
local sp = CleveRoids.GetSpell(msg)
local rank = sp and (sp.rank or (sp.highest and sp.highest.rank))
if rank and rank ~= "" then
@@ -3145,7 +3147,9 @@ function CleveRoids.DoCastSequence(sequence)
local function cast_by_name(msg)
msg = msg or ""
if not string.find(msg, "%(%s*.-%s*%)%s*$") then
-- Check specifically for "(Rank" to allow spells like "Faerie Fire (Feral)"
-- to still get their rank appended automatically
if not string.find(msg, "%(Rank") then
local sp = CleveRoids.GetSpell(msg)
local r = (sp and sp.rank) or (sp and sp.highest and sp.highest.rank)
if r and r ~= "" then msg = msg .. "(" .. r .. ")" end