FIX: incorrect parsing of non-exceptional keyword (#8575)

Parsing of the Gem-lined Cap Ascendancy Notable mod "+3 to Level on all non-Exceptional Support Gems" was incorrect due to faulty handling of the hyphen causing "non-exceptional" to be split into two keywords: "non" and "exceptional". This caused the mod to not apply as there does not exist a gem tag called "non". This commit fixes this by improving handling of non space characters in the keyword string and implementing handling for the negation part in "non-exceptional" inside of calcLib.gemIsType function.
This commit is contained in:
Paliak
2025-06-06 15:11:33 +02:00
committed by GitHub
parent a831fb79e1
commit 479aab9ef7
2 changed files with 2 additions and 1 deletions

View File

@@ -113,6 +113,7 @@ function calcLib.gemIsType(gem, type, includeTransfigured)
(type == "trap or mine" and (gem.tags.trap or gem.tags.mine)) or
((type == "active skill" or type == "grants_active_skill" or type == "skill") and gem.tags.grants_active_skill and not gem.tags.support) or
(type == "non-vaal" and not gem.tags.vaal) or
(type == "non-exceptional" and not gem.tags.exceptional) or
(type == gem.name:lower()) or
(type == gem.name:lower():gsub("^vaal ", "")) or
(includeTransfigured and calcLib.isGemIdSame(gem.name, type, true)) or

View File

@@ -2873,7 +2873,7 @@ local specialModList = {
return { mod("GemProperty", "LIST", {keyword = skill, key = "level", value = num }) }
end
local wordList = {}
for tag in skill:gmatch("%w+") do
for tag in skill:gmatch("%S+") do
table.insert(wordList, tag)
end
return { mod("GemProperty", "LIST", {keywordList = wordList, key = property, value = num }) }