Module:Monsters: Difference between revisions

Removed Weight from MonsterDropTable
(Added sorting to monsterDrop table)
(Removed Weight from MonsterDropTable)
Line 386: Line 386:
     result = result..'\r\n{|class="wikitable sortable"'
     result = result..'\r\n{|class="wikitable sortable"'
     result = result..'\r\n!Item!!Qty'
     result = result..'\r\n!Item!!Qty'
     if multiDrop then result = result..'!!Weight' end
     --if multiDrop then result = result..'!!Weight' end


     result = result..'!!Chance'
     result = result..'!!Chance'
Line 396: Line 396:
       if row[3] > 1 then result = result.. '1 - ' end
       if row[3] > 1 then result = result.. '1 - ' end
       result = result..row[3]
       result = result..row[3]
       if multiDrop then result = result..'||'..row[2]  end
       --if multiDrop then result = result..'||'..row[2]  end


       local dropChance = (row[2] / totalWt * lootChance)
       local dropChance = (row[2] / totalWt * lootChance)
Line 402: Line 402:
     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:||'..lootChance..'%'
     end
     end
     result = result..'\r\n|}'
     result = result..'\r\n|}'