Module:Monsters: Difference between revisions

Right-aligning drop chance numbers
(Slight formatting tweaks to drop tables)
(Right-aligning drop chance numbers)
Line 399: Line 399:


       local dropChance = (row[2] / totalWt * lootChance)
       local dropChance = (row[2] / totalWt * lootChance)
       result = result..'||'..Shared.round(dropChance, 2, 0)..'%'
       result = result..'||style="text-align:right"|'..Shared.round(dropChance, 2, 0)..'%'
     end
     end
     if multiDrop then
     if multiDrop then
       --result = result..'\r\n|-\r\n|colspan="2"|Total:||'..Shared.formatnum(totalWt)..'||'..lootChance..'%'
       --result = result..'\r\n|-\r\n|colspan="2"|Total:||'..Shared.formatnum(totalWt)..'||'..lootChance..'%'
       result = result..'\r\n|-\r\n!colspan="2"|Total:\r\n|'..lootChance..'%'
       result = result..'\r\n|-\r\n!colspan="2"|Total:\r\n|style="text-align:right"'..lootChance..'%'
     end
     end
     result = result..'\r\n|}'
     result = result..'\r\n|}'