62 737
modifications
mAucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 41 : | Ligne 41 : | ||
local itemType = item.type | local itemType = item.type | ||
local itemMin = item.min or 1 | |||
local itemMax = item.max or 1 | |||
if itemMin > itemMax then | |||
return "<error> item : propriété 'min' > 'max'" | |||
end | |||
local itemChance | local itemChance | ||
if isAuto == true then | if isAuto == true then | ||
itemChance = ( | itemChance = ( itemMax - itemMin + 1 ) / numberOfItems | ||
else | else | ||
itemChance = item.chance | itemChance = item.chance | ||
end | end | ||
itemChance = itemChance * globalChance | |||
local itemQuantity = item.quantity | local itemQuantity = item.quantity | ||
Ligne 54 : | Ligne 63 : | ||
if itemQuantity then | if itemQuantity then | ||
suffix = suffix .. itemQuantity .. ', ' | suffix = suffix .. itemQuantity .. ', ' | ||
elseif itemMax > 1 then | |||
suffix = suffix .. itemMin .. '-' .. itemMax .. ', ' | |||
end | end | ||
modifications