@@ -11,21 +11,25 @@ local m_max = math.max
1111local m_floor = math.floor
1212
1313local dmgTypeList = {" Physical" , " Lightning" , " Cold" , " Fire" , " Chaos" }
14- local catalystList = {" Abrasive" , " Accelerating" , " Fertile" , " Imbued" , " Intrinsic" , " Noxious" , " Prismatic" , " Tempering" , " Turbulent" , " Unstable" }
14+ local catalystList = {" Abrasive" , " Accelerating" , " Dextral " , " Fertile" , " Imbued" , " Intrinsic" , " Noxious" , " Prismatic" , " Sinistral " , " Tempering" , " Turbulent" , " Unstable" }
1515local catalystTags = {
1616 { " attack" },
1717 { " speed" },
18+ { " suffix" },
1819 { " life" , " mana" , " resource" },
1920 { " caster" },
2021 { " jewellery_attribute" , " attribute" },
2122 { " physical_damage" , " chaos_damage" },
2223 { " jewellery_resistance" , " resistance" },
24+ { " prefix" },
2325 { " jewellery_defense" , " defences" },
2426 { " jewellery_elemental" ," elemental_damage" },
2527 { " critical" },
2628}
2729
28- local function getCatalystScalar (catalystId , tags , quality )
30+ local function getCatalystScalar (catalystId , mod , quality )
31+ local tags = mod .modTags
32+ local affixType = mod .type
2933 if not catalystId or type (catalystId ) ~= " number" or not catalystTags [catalystId ] or not tags or type (tags ) ~= " table" or # tags == 0 then
3034 return 1
3135 end
@@ -38,6 +42,9 @@ local function getCatalystScalar(catalystId, tags, quality)
3842 for _ , curTag in ipairs (tags ) do
3943 tagLookup [curTag ] = true ;
4044 end
45+ if affixType == " Prefix" or affixType == " Suffix" then -- Sinistral/Dextral
46+ tagLookup [affixType :lower ()] = true
47+ end
4148
4249 -- Find if any of the catalyst's tags match the provided tags
4350 for _ , catalystTag in ipairs (catalystTags [catalystId ]) do
@@ -732,7 +739,7 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
732739 foundImplicit = true
733740 gameModeStage = " IMPLICIT"
734741 end
735- local catalystScalar = getCatalystScalar (self .catalyst , modLine . modTags , self .catalystQuality )
742+ local catalystScalar = getCatalystScalar (self .catalyst , modLine , self .catalystQuality )
736743 local rangedLine = itemLib .applyRange (line , 1 , catalystScalar )
737744 local modList , extra = modLib .parseMod (rangedLine )
738745 if (not modList or extra ) and self .rawLines [l + 1 ] then
@@ -1275,7 +1282,7 @@ function ItemClass:Craft()
12751282 self .nameSuffix = self .nameSuffix .. " " .. mod .affix
12761283 end
12771284 self .requirements .level = m_max (self .requirements .level or 0 , m_floor (mod .level * 0.8 ))
1278- local rangeScalar = getCatalystScalar (self .catalyst , mod . modTags , self .catalystQuality )
1285+ local rangeScalar = getCatalystScalar (self .catalyst , mod , self .catalystQuality )
12791286 for i , line in ipairs (mod ) do
12801287 line = itemLib .applyRange (line , affix .range or 0.5 , rangeScalar )
12811288 local order = mod .statOrder [i ]
@@ -1703,7 +1710,7 @@ function ItemClass:BuildModList()
17031710 -- Check if line actually has a range
17041711 if modLine .line :find (" %((%-?%d+%.?%d*)%-(%-?%d+%.?%d*)%)" ) then
17051712 local strippedModeLine = modLine .line :gsub (" \n " ," " )
1706- local catalystScalar = getCatalystScalar (self .catalyst , modLine . modTags , self .catalystQuality )
1713+ local catalystScalar = getCatalystScalar (self .catalyst , modLine , self .catalystQuality )
17071714 -- Put the modified value into the string
17081715 local line = itemLib .applyRange (strippedModeLine , modLine .range , catalystScalar )
17091716 -- Check if we can parse it before adding the mods
0 commit comments