Module:Weights

local p = {}

function p.gamemode( frame ) local weights = { aleatoire = 5, alpha = 5, boreal = 5, charming = 5, classic = 0, default = 40, drunkfire = 0, evilvillage = 5, foolish = 5, guardian = 5, lycan = 5, mad = 5, maelstrom = 0, mudkip = 5, noreveal = 1, random = 0, rapidfire = 0, sleepy = 5, valentines = 0 }	local total = 0 for k, v in pairs(weights) do		total = total + v	end assert( frame.args[1], "Must specify a game mode" ) local ours = weights[frame.args[1]] or 0 if ours == 0 then return "0" end return string.format( "%d (%.2f%%)", ours, (ours / total) * 100 ) end

return p