Module:Hissatsu

local p = {} local data = mw.loadData('Module:Hissatsu/data')

function p.hissatsu(frame) local args = frame.args local type = args[1] local typetext = type if type == 'MX' then typetext = 'MIXIMAX' elseif type == 'SL' then typetext = 'SOUL' elseif type == 'MXKH' then typetext = 'MIMAKH' end local link = args[2] local exists = 1 local text = args[3] or link if text == '' then text = link end if tonumber(args[4]) == 1 then exists = 0 end local b = mw.html.create('b') local span = mw.html.create('span') span :css({           ['color'] = data[type] or 'inherit',            ['font-weight'] = 'bold'        }) :wikitext('[' .. typetext .. ']') local a   if exists == 1 then a =  .. text ..  else a = text end b       :node(span) :wikitext(' ' .. a)   return tostring(b) end

return p