Module:Mazunki/Monsters: Difference between revisions

m
rounding the normalised value (we already have the precise denominator if we need it)
m (nil values can't be stringed)
m (rounding the normalised value (we already have the precise denominator if we need it))
Line 170: Line 170:
local numerator = droppable[2]
local numerator = droppable[2]
table.insert(itemWeights, numerator)
table.insert(itemWeights, numerator)
table.insert(itemNormalised, itemDenominator/(numerator*monster.lootChance))
local norm = itemDenominator/(numerator*monster.lootChance)
table.insert(itemNormalised, string.format("%.3f", norm))
table.insert(itemQtyMins, 1)
table.insert(itemQtyMins, 1)
table.insert(itemQtyMaxs, droppable[3])
table.insert(itemQtyMaxs, droppable[3])
892

edits