Module:BasadoEn

local p = {}

function p.normalizar(param) param = string.lower(param) -- Atributos if param == 'agua' or param == 'water' then return 'AGUA' elseif param == 'fuego' or param == 'fire' then return 'FUEGO' elseif param == 'luz' or param == 'light' then return 'LUZ' elseif param == 'oscuridad' or param == 'dark' then return 'OSCURIDAD' elseif param == 'tierra' or param == 'earth' then return 'TIERRA' elseif param == 'viento' or param == 'wind' then return 'VIENTO' elseif param == 'divinidad' or param == 'divino' or param == 'divine' then return 'DIVINIDAD' -- Tipos elseif param == 'aqua' then return 'Aqua' elseif param == 'bestia' or param == 'beast' then return 'Bestia' elseif param == 'bestia alada' or param == 'winged beast' then return 'Bestia Alada' elseif param == 'ciberso' or param == 'cyberse' then return 'Ciberso' elseif param == 'demonio' or param == 'fiend' then return 'Demonio' elseif param == 'dinosaurio' or param == 'dinosaur' then return 'Dinosaurio' elseif param == 'dragón' or param == 'dragon' then return 'Dragón' elseif param == 'guerrero' or param == 'warrior' then return 'Guerrero' elseif param == 'guerrero bestia' or param == 'guerrero-bestia' or param == 'beast warrior' or param == 'beast-warrior' then return 'Guerrero-Bestia' elseif param == 'hada' or param == 'fairy' then return 'Hada' elseif param == 'insecto' or param == 'insect' then return 'Insecto' elseif param == 'lanzador de conjuros' or param == 'spellcaster' then return 'Lanzador de Conjuros' elseif param == 'máquina' or param == 'maquina' or param == 'machine' then return 'Máquina' elseif param == 'pez' or param == 'fish' then return 'Pez' elseif param == 'planta' or param == 'plant' then return 'Planta' elseif param == 'psíquico' or param == 'psiquico' or param == 'psychic' then return 'Psíquico' elseif param == 'piro' or param == 'pyro' then return 'Piro' elseif param == 'reptil' or param == 'reptile' then return 'Reptil' elseif param == 'roca' or param == 'rock' then return 'Roca' elseif param == 'serpiente marina' or param == 'sea serpent' then return 'Serpiente Marina' elseif param == 'trueno' or param == 'thunder' then return 'Trueno' elseif param == 'wyrm' then return 'Wyrm' elseif param == 'zombi' or param == 'zombie' then return 'Zombi' elseif param == 'bestia divina' or param == 'divine beast' then return 'Bestia Divina' elseif param == 'dios creador' or param == 'Creator God' then return 'Dios Creador' -- Parámetro desconocido else return '' end end

function p.tipo(frame) local attr local cat = '' local text = '' local withtext = true if frame.args[2] ~= nil then if frame.args[2] == 'false' then withtext = false end end if frame.args[1] ~= nil then attr = p.normalizar(frame.args[1]) else attr = '' end if attr ~= '' then if attr == 'AGUA' or attr == 'FUEGO' or attr == 'LUZ' or attr == 'OSCURIDAD' or attr == 'TIERRA' or attr == 'OSCURIDAD' or attr == 'VIENTO' or attr == 'DIVINIDAD' then cat = 'atributo' else cat = 'tipo' end if withtext then text = ' ' end text = text .. ''       if withtext then text = text .. ' ' .. attr .. '' else text = text .. ' '       end return text else return '' end end

function p.norm(frame) return p.normalizar(frame.args[1]) end

return p