Mobius Final Fantasy Wiki
Advertisement

local p = {}
local getArgs = require("Module:Arguments").getArgs

function p.main( frame )
	local args = getArgs(frame, {
		wrappers = "Template:Orb"
	})
	return p._main(args)
end
function p._main( args )
	local element = string.lower(args[1] or "")
	local size = tonumber(args.size) or 20
	local icon, name
	
	if element == "fire" then
		icon = "Fire Icon.png"
		name = "[FIRE]"
	elseif element == "water" then
		icon = "Water Icon.png"
		name = "[WATER]"
	elseif element == "wind" then
		icon = "Wind Icon.png"
		name = "[WIND]"
	elseif element == "earth" then
		icon = "Earth Icon.png"
		name = "[EARTH]"
	elseif element == "light" then
		icon = "Light Icon.png"
		name = "[LIGHT]"
	elseif element == "dark" then
		icon = "Dark Icon.png"
		name = "[DARK]"
	elseif element == "restoration" or element == "life" then
		icon = "Life Icon.png"
		name = "[LIFE]"
	elseif element == "prismatic" then
		icon = "Prismatic Icon.png"
		name = "[PRISMATIC]"
	elseif element == "none" then
		icon = "None Icon.png"
		name = "[NONE]"
	else
		return ""
	end
	local fmt = "[[File:%s|link=|%spx|%s]]"
	return string.format(fmt, icon, size, name)
end

return p
Advertisement