Edit the documentation or categories for this module.
If you are an editor wanting to update the list of champions, see {{Championnames}}m
local p = {}
function p.Champion ( frame )
local args = frame
if frame == mw.getCurrentFrame() then
args = require( 'Module:ProcessArgs' ).merge( true )
else
frame = mw.getCurrentFrame()
end
local Styles = require('Module:Championstyles')
local Names = mw.loadData( 'Module:Championnames' )
local input = args[1] or 'Unknown'
local inputlc = string.lower(input)
local style = string.lower(args[2] or 'default')
local link = Names[inputlc] or input
local display = args.display or link
if args.size then
if string.sub(args.size,-2) == "px" then
args.size = string.sub(args.size,1,-3)
end
end
local text = Styles[style](link, display, args['size'])
return text
end
function p.name ( frame )
local args = frame
if frame == mw.getCurrentFrame() then
args = require( 'Module:ProcessArgs').norm()
end
if not args[1] then
args[1] = ''
end
local names = mw.loadData( 'Module:Championnames' )
local output = names[mw.ustring.lower( args[1] )] or args[1]
return output
end
return p