FANDOM


local p = {}
 
function p.restriccion(frame)
    for name, value in pairs(frame.args) do
        if name ~= '' then
 
            local restriccion = ''    
            local RdRestriccion = require('Módulo:RestriccionCarta')
 
            local r = RdRestriccion[p.normalize(value)]
            if r ~= nil then
                local str_restriccion = {'ocg', 'prohibida', 'limitada', 'semilimitada'}
                restriccion = str_restriccion[r]
            end
 
            return restriccion
        end
    end
end
 
function p.normalize (cardname)
    cardname = string.lower(cardname)
    cardname = string.gsub(cardname, 'Á', 'a')
    cardname = string.gsub(cardname, 'Ä', 'a')
    cardname = string.gsub(cardname, 'Â', 'a')
    cardname = string.gsub(cardname, 'É', 'e')
    cardname = string.gsub(cardname, 'Ë', 'e')
    cardname = string.gsub(cardname, 'Í', 'i')
    cardname = string.gsub(cardname, 'Ï', 'i')
    cardname = string.gsub(cardname, 'Ó', 'o')
    cardname = string.gsub(cardname, 'Ö', 'o')
    cardname = string.gsub(cardname, 'Ú', 'u')
    cardname = string.gsub(cardname, 'Ü', 'u')
 
    cardname = string.gsub(cardname, 'á', 'a')
    cardname = string.gsub(cardname, 'ä', 'a')
    cardname = string.gsub(cardname, 'â', 'a')
    cardname = string.gsub(cardname, 'é', 'e')
    cardname = string.gsub(cardname, 'ë', 'e')
    cardname = string.gsub(cardname, 'í', 'i')
    cardname = string.gsub(cardname, 'ï', 'i')
    cardname = string.gsub(cardname, 'ó', 'o')
    cardname = string.gsub(cardname, 'ö', 'o')
    cardname = string.gsub(cardname, 'ú', 'u')
    cardname = string.gsub(cardname, 'ü', 'u')
 
    cardname = string.upper(cardname)
    cardname = string.gsub(cardname, ' ', '')
    cardname = string.gsub(cardname, '"', '')
    cardname = string.gsub(cardname, "'", '')
    cardname = string.gsub(cardname, ',', '')
    cardname = string.gsub(cardname, '%.', '')
    cardname = string.gsub(cardname, '%-', '')
    cardname = string.gsub(cardname, '¡', '')
    cardname = string.gsub(cardname, '!', '')
    cardname = string.gsub(cardname, '¿', '')
    cardname = string.gsub(cardname, '%?', '')
    cardname = string.gsub(cardname, ':', '')
    cardname = string.gsub(cardname, 'º', '')
    cardname = string.gsub(cardname, '/', '')
    cardname = string.gsub(cardname, '#', '')
    cardname = string.gsub(cardname, '&', 'Y')
 
    cardname = string.gsub(cardname, 'ñ', 'Ñ')
    cardname = string.gsub(cardname, '·', '')
    cardname = string.gsub(cardname, '☆', '')
    cardname = string.gsub(cardname, 'β', 'B')
    return cardname
end
 
function p.convnombreimagen(filename)
    filename = string.lower(filename)
    filename = string.gsub(filename, 'Á', 'á')
    filename = string.gsub(filename, 'Ä', 'ä')
    filename = string.gsub(filename, 'Â', 'â')
    filename = string.gsub(filename, 'É', 'é')
    filename = string.gsub(filename, 'Ë', 'ë')
    filename = string.gsub(filename, 'Í', 'í')
    filename = string.gsub(filename, 'Ï', 'ï')
    filename = string.gsub(filename, 'Ó', 'ó')
    filename = string.gsub(filename, 'Ö', 'ö')
    filename = string.gsub(filename, 'Ú', 'ú')
    filename = string.gsub(filename, 'Ü', 'ü')
 
    filename = string.gsub(filename, '/', '-')
    filename = string.gsub(filename, ''', '')
    filename = string.gsub(filename, '\'', '')
    filename = string.gsub(filename, '"', '')
    filename = string.gsub(filename, '"', '')
    filename = string.gsub(filename, '"', '')
    filename = string.gsub(filename, '?', '')
    filename = string.gsub(filename, '&#3f;', '')
 
    return filename
end
 
return p

¡Interferencia de bloqueo de anuncios detectada!


Wikia es un sitio libre de uso que hace dinero de la publicidad. Contamos con una experiencia modificada para los visitantes que utilizan el bloqueo de anuncios

Wikia no es accesible si se han hecho aún más modificaciones. Si se quita el bloqueador de anuncios personalizado, la página cargará como se esperaba.

También en FANDOM

Wiki al azar