Module:Stock

local p = {} local CHARACTERS = {"Ganondorf", "Link", "Sheik", "Toon Link", "Young Link", "Zelda", "Alex", "Alph", "Banjo & Kazooie", "Bayonetta", "Bowser", "Bowser Jr.", "Byleth", "Captain Falcon", "Charizard", "Chrom", "Cloud", "Corrin", "Daisy", "Dark Pit", "Dark Samus", "Diddy Kong", "Donkey Kong", "Dr. Mario", "Duck Hunt", "Enderman", "Falco", "Fox", "Greninja", "Hero", "Ice Climbers", "Ike", "Iggy", "Incineroar", "Inkling", "Isabelle", "Ivysaur", "Jigglypuff", "Joker", "Kazuya", "Ken", "King Dedede", "King K. Rool", "Kirby", "Larry", "Lemmy", "Little Mac", "Lucario", "Lucas", "Lucina", "Ludwig", "Luigi", "Mario", "Marth", "Mega Man", "Meta Knight", "Mewtwo", "Mii Brawler", "Mii Gunner", "Mii Swordfighter", "Min Min", "Morton", "Mr. Game & Watch", "Mythra", "Ness", "Olimar", "Pac-man", "Palutena", "Peach", "Pichu", "Pikachu", "Piranha Plant", "Pit", "Pokémon Trainer", "Pyra", "Richter", "Ridley", "R.O.B.", "Robin", "Rosalina & Luma", "Roy", "Roy Koopa", "Ryu", "Samus", "Sephiroth", "Shulk", "Simon", "Snake", "Sonic", "Sora", "Squirtle", "Steve", "Terry", "Villager", "Wario", "Wendy", "Wii Fit Trainer ", "Wolf", "Yoshi", "Zero Suit Samus", "Zombie"} local COSTUMES = 8

function p.Documentation local costumeRow = mw.html.create("tr") local counter = 1 while counter <= COSTUMES do		costumeRow:node(mw.html.create("th")			:wikitext(counter)) counter = counter + 1 end local result = mw.html.create("table") :addClass("wikitable") :node(mw.html.create("tr")						:node(mw.html.create("th") :attr("rowspan", 2) :wikitext("Character"))						:node(mw.html.create("th") :attr("colspan", COSTUMES) :wikitext("Costume"))) :node(costumeRow) for key, character in ipairs(CHARACTERS) do		result:node(p.CreateCharacterCostumeRow(character, COSTUMES)) end return result end

function p.CreateCharacterCostumeRow(character, costumes) local result = mw.html.create("tr") :node(mw.html.create("td")						:wikitext(character)) local counter = 1 while counter <= COSTUMES do		result:node(mw.html.create("td")			:wikitext(mw.getCurrentFrame:expandTemplate{title = "Stock", args = {"SSBU", character, counter}})) counter = counter + 1 end return result end

return p