FANDOM


-- <pre>
-- Utilizado por [[Plantilla:Keyword color]] y [[Plantilla:Skin tier]]
local p = {}
local lib = require('Módulo:Feature')
 
local keywordcolor = {
    --Es                                Color        En  /  Es 
    {"vida",                          "#C03300"}, --Health
    {"pv",                            "#C03300"},
    {"hp",                            "#C03300"},
    {"daño de ataque",                "#FFA500"}, --Attack Damage
    {"da",                            "#FFA500"},
    {"ad",                            "#FFA500"},
    {"daño físico",                   "#FF8C34"},
    {"df",                            "#FF8C34"},
    {"pd",                            "#FF8C34"},
    {"poder de habilidad",            "#97FC97"}, --Ability Power
    {"ph",                            "#97FC97"},
    {"ap",                            "#97FC97"},
    {"daño mágico",                   "#00B0F0"}, --Magic Damage
    {"dm",                            "#00B0F0"},
    {"md",                            "#00B0F0"},
    {"daño verdadero",                "#F9966B"}, --True Damage
    {"dv",                            "#F9966B"}, --used to dodge percent/utilizado para el porcentaje de evasión
    {"td",                            "#F9966B"},    
    {"armadura",                      "#FFFF00"}, --Armor
    {"armor",                         "#FFFF00"},
    {"penetración de armadura",       "#FFFF00"},
    {"letalidad",                     "#FF6347"}, --Lethality
    {"resistencia mágica",            "#CA1F7B"}, --Magic Resist
    {"rm",                            "#CA1F7B"},
    {"mr",                            "#CA1F7B"},
    {"resistencia",                   "#CA1F7B"},
    {"penetración de magia",          "#40E0D0"}, --Magic Penetration
    {"maná",                          "#0099CC"}, --Mana
    {"energía",                       "#FFFF00"}, --Energy
    {"probabilidad de golpe crítico", "#E56013"}, --Critical Change
    {"probabilidad de crítico",       "#E56013"},
    {"daño de golpe crítico",         "#944B00"}, --Critical Damage
    {"daño crítico",                  "#944B00"},
    {"crítico",                       "#944B00"},    
    {"velocidad de movimiento",       "#F5EE99"}, --Movement Speed
    {"vm",                            "#F5EE99"},
    {"ms",                            "#F5EE99"},
    {"experiencia",                   "#883FD1"}, --Experience
    {"exp",                           "#883FD1"},
    {"xp",                            "#883FD1"},
    {"oro",                           "#FFD700"}, --Gold
    {"gold",                          "#FFD700"},
    {"golpe absorbente",              "#5C58C9"}, --Siphoning Strike
    {"buzzword3",                     "#E34D4C"},
    {"buzzword2",                     "#56C456"},
    {"buzzword",                      "#A01D7A"},
    {"salvaje",                       "#A01D7A"}, --Wild
    {"colocado",                      "#883FD1"}, --Placed
    {"velocidad de ataque",           "#C93B08"}, --Attack Speed
    {"va",                            "#FF4500"},
    {"as",                            "#FF4500"},
    {"furia",                         "#FA6533"}, --Fury
    {"río",                           "#43D9FB"}, --River
    {"agua",                          "#43D9FB"},
    {"terreno",                       "#B36F21"}, --Terrain
    {"maleza",                        "#96FB97"}, --Brush
    {"punto de vida",                 "#56C456"}  --Life point
 
}
 
local skincolor = {
    {"definitivo",                    "#FFA500"}, -- naranja
    {"3250",                          "#FFA500"}, -- naranja
    {"2775",                          "#FFA500"}, -- naranja
    {"legendario",                    "#FF3232"},
    {"1820",                          "#FF3232"},
    {"botin",                         "#7943ED"},
    {"gema",                          "#7943ED"},
    {"mítico",                        "#7943ED"},
    {"2450",                          "#7943ED"},
    {"10",                            "#7943ED"},
    {"épico",                         "#00C8FF"},
    {"1350",                          "#00C8FF"},
    {"estandar",                      "#228B22"}, -- verde bosque
    {"superior",                      "#228B22"}, -- verde bosque
    {"975",                           "#228B22"}, -- verde bosque
    {"presupuesto",                   "#FFFFFF"}, -- blanco
    {"deluxe",                        "#FFFFFF"}, -- blanco
    {"750",                           "#FFFFFF"}, -- blanco
    {"clásico",                       "#808080"}, -- gris
    {"desgastado",                    "#808080"}, -- gris
    {"520",                           "#808080"}, -- gris
    {"460",                           "#808080"}, -- gris
    {"390",                           "#808080"}, -- gris
    {"chroma",                        "#FFFFFF"}, -- blanco
    {"290",                           "#FFFFFF"}, -- blanco
    {"195",                           "#FFFFFF"}, -- blanco
    {"prestigioso",                      "#FFFFFF"}, -- blanco
    {"100",                           "#FFFFFF"}  -- blanco
}
 
function p.keyword(frame)
    local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
 
    for _, color in ipairs(keywordcolor) do 
        result = mw.ustring.find(mw.ustring.lower(args[1]), color[1])
        if result ~= nil then
            return color[2]
        end
    end
    return "inherit"
end
 
function p.skin(frame)
    local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
 
    for _, color in ipairs(skincolor) do 
        result = mw.ustring.find(mw.ustring.lower(args[1]), color[1])
        if result ~= nil then
            return color[2]
        end
    end
    return "inherit"
end
 
return p
 
-- </pre>
-- [[Categoría:Lua]]
El contenido de la comunidad está disponible bajo CC-BY-SA a menos que se indique lo contrario.