Module:Pokemon/Ranger: Difference between revisions

From StrategyWiki, the video game walkthrough and strategy guide wiki
Added multiple Icon images if rating is greater than 1
(Template renaming)
Tags: Mobile edit Mobile web edit
(Added multiple Icon images if rating is greater than 1)
Tags: Mobile edit Mobile web edit
Line 10: Line 10:


local function _capture( args, frame )
local function _capture( args, frame )
     local guide = "Pokémon Ranger"
     local guide = mw.title.getCurrentTitle().rootText
local root = mw.html.create( 'table' )
local root = mw.html.create( 'table' )
:addClass( 'wikitable mid-table' )
:addClass( 'wikitable mid-table' )
Line 30: Line 30:
move = "None"
move = "None"
elseif monData.rating == "1" then
elseif monData.rating == "1" then
move = monData.move
move = "[[File:" .. shortname[ guide ] .. ' ' .. monDatamove .. ' ' .. "Icon" .. ".png|" .. monData.move .. "]]"
else
elseif monData.rating == "2" then
move = monData.move .. " " .. monData.rating
move = "[[File:" .. shortname[ guide ] .. ' ' .. monDatamove .. ' ' .. "Icon" .. ".png|" .. monData.move .. "]]" .. " " .. "[[File:" .. shortname[ guide ] .. ' ' .. monDatamove .. ' ' .. "Icon" .. ".png|" .. monData.move .. "]]"
        else
          move = "[[File:" .. shortname[ guide ] .. ' ' .. monDatamove .. ' ' .. "Icon" .. ".png|" .. monData.move .. "]]" .. " " .. "[[File:" .. shortname[ guide ] .. ' ' .. monDatamove .. ' ' .. "Icon" .. ".png|" .. monData.move .. "]]" .. " ".. "[[File:" .. shortname[ guide ] .. ' ' .. monDatamove .. ' ' .. "Icon" .. ".png|" .. monData.move .. "]]"
end
end
row:tag( 'td' ):wikitext( "[[File:" .. shortname[ guide ] .. ' ' .. move .. ' ' .. "Icon" .. ".png|" .. move .. "]]")
row:tag( 'td' ):wikitext( move )
row:tag( 'td' ):wikitext( monData.assist )
row:tag( 'td' ):wikitext( monData.assist )
row:tag( 'td' ):wikitext( monData.loops )
row:tag( 'td' ):wikitext( monData.loops )
4,548

edits