Module:Stock

local p = {} local CHARACTERS = {"Ganondorf", "Link", "Sheik", "Toon Link", "Young Link", "Zelda", "Alph", "Bayonetta", "Bowser", "Bowser Jr.", "Captain Falcon", "Charizard", "Chrom", "Cloud", "Corrin", "Daisy", "Dark Pit", "Dark Samus", "Diddy Kong", "Donkey Kong", "Dr. Mario", "Duck Hunt", "Falco", "Fox", "Greninja", "Ice Climbers", "Ike", "Iggy", "Incineroar", "Inkling", "Isabelle", "Ivysaur", "Jigglypuff", "Joker", "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", "Morton", "Mr. Game & Watch", "Ness", "Olimar", "Pac-man", "Palutena", "Peach", "Pichu", "Pikachu", "Piranha Plant", "Pit", "Pokémon Trainer", "Richter", "Ridley", "R.O.B.", "Robin", "Rosalina & Luma", "Roy", "Roy Koopa", "Ryu", "Samus", "Shulk", "Simon", "Snake", "Sonic", "Squirtle", "Villager", "Wario", "Wendy", "Wii Fit Trainer ", "Wolf", "Yoshi", "Zero Suit Samus"} 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