@@ -697,6 +697,8 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
697697 end
698698 elseif k == " range" then
699699 modLine .range = tonumber (val )
700+ elseif k == " corruptedRange" then
701+ modLine .corruptedRange = tonumber (val )
700702 elseif lineFlags [k ] then
701703 modLine [k ] = true
702704 end
@@ -888,13 +890,13 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
888890 modLine .range = bestPrecisionRange
889891 end
890892 end
891- local rangedLine = itemLib .applyRange (line , 1 , catalystScalar )
893+ local rangedLine = itemLib .applyRange (line , 1 , catalystScalar , modLine . corruptedRange )
892894 local modList , extra = modLib .parseMod (rangedLine )
893895 if (not modList or extra ) and self .rawLines [l + 1 ] then
894896 -- Try to combine it with the next line
895897 local nextLine = self .rawLines [l + 1 ]:gsub (" %b{}" , " " ):gsub (" ?%(%l+%)" ," " )
896898 local combLine = line .. " " .. nextLine
897- rangedLine = itemLib .applyRange (combLine , 1 , catalystScalar )
899+ rangedLine = itemLib .applyRange (combLine , 1 , catalystScalar , modLine . corruptedRange )
898900 modList , extra = modLib .parseMod (rangedLine , true )
899901 if modList and not extra then
900902 line = line .. " \n " .. nextLine
@@ -1262,6 +1264,9 @@ function ItemClass:BuildRaw()
12621264 if modLine .range and line :match (" %(%-?[%d%.]+%-%-?[%d%.]+%)" ) then
12631265 line = " {range:" .. round (modLine .range , 3 ) .. " }" .. line
12641266 end
1267+ if modLine .corruptedRange then
1268+ line = " {corruptedRange:" .. round (modLine .corruptedRange , 2 ) .. " }" .. line
1269+ end
12651270 if modLine .crafted then
12661271 line = " {crafted}" .. line
12671272 end
@@ -1863,7 +1868,7 @@ function ItemClass:BuildModList()
18631868 local strippedModeLine = modLine .line :gsub (" \n " ," " )
18641869 local catalystScalar = getCatalystScalar (self .catalyst , modLine , self .catalystQuality )
18651870 -- Put the modified value into the string
1866- local line = itemLib .applyRange (strippedModeLine , modLine .range , catalystScalar )
1871+ local line = itemLib .applyRange (strippedModeLine , modLine .range , catalystScalar , modLine . corruptedRange )
18671872 -- Check if we can parse it before adding the mods
18681873 local list , extra = modLib .parseMod (line )
18691874 if list and not extra then
0 commit comments