Skip to content

Commit 479aab9

Browse files
authored
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.
1 parent a831fb7 commit 479aab9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Modules/CalcTools.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ function calcLib.gemIsType(gem, type, includeTransfigured)
113113
(type == "trap or mine" and (gem.tags.trap or gem.tags.mine)) or
114114
((type == "active skill" or type == "grants_active_skill" or type == "skill") and gem.tags.grants_active_skill and not gem.tags.support) or
115115
(type == "non-vaal" and not gem.tags.vaal) or
116+
(type == "non-exceptional" and not gem.tags.exceptional) or
116117
(type == gem.name:lower()) or
117118
(type == gem.name:lower():gsub("^vaal ", "")) or
118119
(includeTransfigured and calcLib.isGemIdSame(gem.name, type, true)) or

src/Modules/ModParser.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2873,7 +2873,7 @@ local specialModList = {
28732873
return { mod("GemProperty", "LIST", {keyword = skill, key = "level", value = num }) }
28742874
end
28752875
local wordList = {}
2876-
for tag in skill:gmatch("%w+") do
2876+
for tag in skill:gmatch("%S+") do
28772877
table.insert(wordList, tag)
28782878
end
28792879
return { mod("GemProperty", "LIST", {keywordList = wordList, key = property, value = num }) }

0 commit comments

Comments
 (0)