Anonymous

Module:Mazunki/Monsters: Difference between revisions

From Melvor Idle
m
actually this is not reliable due to ieee754 so let's format with gsheets
m (rounding the normalised value (we already have the precise denominator if we need it))
m (actually this is not reliable due to ieee754 so let's format with gsheets)
Line 170: Line 170:
local numerator = droppable[2]
local numerator = droppable[2]
table.insert(itemWeights, numerator)
table.insert(itemWeights, numerator)
local norm = itemDenominator/(numerator*monster.lootChance)
table.insert(itemNormalised, 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