Module:Pokemon/Shop

local getArgs = require('Module:Arguments').getArgs

local p = {}

function p.row( frame ) local args = getArgs( frame, { wrappers = 'Template:Pokemon/Shop row' } ) local itemList = mw.loadJsonData( 'Module:Pokemon/ShopPricing.json' )

local itemName = args[1] or 'Potion' local itemPrice = itemList[itemName]

local row={ "|-\n", '| ', itemName, '\n', '| ', '',           itemPrice }  return table.concat( row ) end

return p