69,782
edits
(Removing unused code) Tags: Mobile edit Mobile web edit |
(blank class for whole tr) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
local game = args[1] or 'red' | local game = args[1] or 'red' | ||
local mode = args[2] or 'Base' | local mode = args[2] or 'Base' | ||
local monNum = args[3] or ' | local monNum = args[3] or '0' | ||
local level = args[4] or '-' | local level = args[4] or '-' | ||
local form = args['form'] and ' ' .. args['form'] or '' | |||
local formText = args['form'] and " (" .. args['form'] .. ")" or '' | |||
local rates = {} | local rates = {} | ||
if monNum == '0' then | |||
return '|- class="t_pkmn_wild_blank"\n| colspan="12" | \n' | |||
end | |||
for i = 1, rateCount[mode] do | for i = 1, rateCount[mode] do | ||
rates[i] = args[4 + i] or '' | rates[i] = args[4 + i] or '' | ||
Line 32: | Line 37: | ||
end | end | ||
local | local row = { | ||
"|-\n", | "|-\n", | ||
'| class="t_pkmn_wild_img" | ', '[[File:Pokemon ', game, ' ', monName, | '| class="t_pkmn_wild_img" | ', '[[File:Pokemon ', game, ' ', monName, form, '.png|40x40px|', monName, ']]', '\n', | ||
'| class="t_pkmn_wild_name" | ', bpLink, '\n', | '| class="t_pkmn_wild_name" | ', bpLink .. formText, '\n', | ||
'| ', level, '\n', | '| ', level, '\n', | ||
'| ', table.concat(rates, ' || ') | '| ', table.concat(rates, ' || ') | ||
} | } | ||
return table.concat( row ) | return table.concat( row ) | ||
end | end | ||
return p | return p |