Module:BonusMalus

function BonusMalus(number,mode) temp = "" if number == 0 then if mode == "TEXT" or mode == "TEXT_PERC" then temp = "\'\'No bonus\'\'" end elseif number < 0 then if mode == "PERC" or mode == "TEXT_PERC" then temp = "\'\'\'" .. number .. "% "		else temp = "\'\'\'" .. number .. " "	end else if mode == "PERC" or mode == "TEXT_PERC" then temp = "\'\'\'+" .. number .. "% "		else temp = "\'\'\'+" .. number .. " "	end end return temp end

local p = {} function p.main(frame) return BonusMalus(frame.args[1],frame.args[2]) end