Module:Evolution

-- -- - Module:Evolution - - Used to generate evolution trees for hissatsu articles - See Template:E/doc for documentation - - author: User:.jun

local p = {} local data = mw.loadData('Module:Evolution/data')

function p.evolution(frame)

local args = frame:getParent.args local type = args[1] local n = tonumber(args[2]) local ext = args[3] or '' local ev = data[type] local str = 'Normal'

if ev and n <= 5 then

if type == 'K' and n == 3 and ev[4][ext] then ev[3] = '' ev[4] = ev[4][ext] else if type == 'V' and ev[4][ext] then ev[4] = ev[4][ext] end end

for _, i in ipairs(ev) do           str = str .. ' → ' .. i       end

end

return str

end

return p --