@@ -96,28 +96,31 @@ local function setRadiusJewelStats(radiusJewel, radiusJewelStats)
96
96
local jewel = radiusJewel .item
97
97
if jewel .title == " Against the Darkness" then
98
98
radiusJewelStats .source = radiusJewel .data .modSource
99
- local range = jewel .explicitModLines [jewel .variant ].range
99
+
100
+ local variant = jewel .variant or 1
101
+ local range = jewel .explicitModLines [variant ].range
100
102
local value = 0
101
- jewel .explicitModLines [jewel . variant ].line :gsub (" %((%d+)%-(%d+)%)" ,
103
+ jewel .explicitModLines [variant ].line :gsub (" %((%d+)%-(%d+)%)" ,
102
104
function (num1 , num2 )
103
- value = round (( num1 + num2 ) * range )
105
+ value = round (num1 + ( num2 - num1 ) * range )
104
106
end
105
107
)
106
108
radiusJewelStats [1 ] = {
107
- isNotable = (jewel .explicitModLines [jewel . variant ].line :match (" ^(%S+)" ) == " Notable" ),
108
- sd = jewel .explicitModLines [jewel . variant ].line :gsub (" .*grant " , " " ):gsub (" %(.-%)" , value )
109
+ isNotable = (jewel .explicitModLines [variant ].line :match (" ^(%S+)" ) == " Notable" ),
110
+ sd = jewel .explicitModLines [variant ].line :gsub (" .*grant " , " " ):gsub (" %(.-%)" , value )
109
111
}
110
-
111
- local rangeAlt = jewel .explicitModLines [jewel .variant ].range
112
+
113
+ local variantAlt = jewel .variantAlt or 2
114
+ local rangeAlt = jewel .explicitModLines [variantAlt ].range
112
115
local valueAlt = 0
113
- jewel .explicitModLines [jewel . variantAlt ].line :gsub (" %((%d+)%-(%d+)%)" ,
116
+ jewel .explicitModLines [variantAlt ].line :gsub (" %((%d+)%-(%d+)%)" ,
114
117
function (num1 , num2 )
115
- valueAlt = round (( num1 + num2 ) * rangeAlt )
118
+ valueAlt = round (num1 + ( num2 - num1 ) * rangeAlt )
116
119
end
117
120
)
118
121
radiusJewelStats [2 ] = {
119
- isNotable = (jewel .explicitModLines [jewel . variantAlt ].line :match (" ^(%S+)" ) == " Notable" ),
120
- sd = jewel .explicitModLines [jewel . variantAlt ].line :gsub (" .*grant " , " " ):gsub (" %(.-%)" , valueAlt )
122
+ isNotable = (jewel .explicitModLines [variantAlt ].line :match (" ^(%S+)" ) == " Notable" ),
123
+ sd = jewel .explicitModLines [variantAlt ].line :gsub (" .*grant " , " " ):gsub (" %(.-%)" , valueAlt )
121
124
}
122
125
end
123
126
end
0 commit comments