Module:Skills/sandbox

local getArgs = require('Module:Arguments').getArgs local getGames = require('Module:Gamedata') local p = {} local function makeInvokeFunction(funcName) -- makes a function that can be returned from #invoke, using -- Module:Arguments. return function (frame) local args = getArgs(frame, {parentOnly = true}) return p[funcName](args) end end local styles = { ['skill'] = '\n|-\n!style="background:#000;color:#fff"|', ['skillc'] = '\n!style="background:#000;color:#fff"|', ['skill3'] = '\n|-\n!style="background:#000;color:#fff;width:33%"|', ['skill3c'] = '\n!style="background:#000;color:#fff;width:33%"|', ['cost1'] = '\n|style="background:#222"|', ['cost2'] = '\n|style="background:#282828"|', ['effect1'] = '\n|style="background:#222;text-align:left"|', ['effect2'] = '\n|style="background:#282828;text-align:left"|', ['effect1p'] = '\n|colspan=2 style="background:#222;text-align:left"|', ['effect2p'] = '\n|colspan=2 style="background:#282828;text-align:left"|', ['order'] = '\n|style="background:#000;color:#fff;text-align:left"|', ['table2h'] = '\n{|width="100%" class="customtable ',	['statlow'] = '\n|style="background:#000;color:#fff"|',	} local cate1 = ' ' if mw.title.getCurrentTitle:inNamespace('') then 		cate1 = cate1 .. '[[Category:'	else cate1 = cate1 end local cate2 = ']] ' local noskillcate = cate1 .. 'Articles with unrecognizable skill name for Module:Skills' .. cate2 local noskill1 = '\n|-\n!colspan=4 style="background:#300;width:600px"|Invalid skill name of "' local noskill2 = '". You may correct the skill name or modify module:Skills/' local noskill3 = ' if needed. ' .. noskillcate .. '\n|-style="display:none"\n' local noskill4 = '\n|-\n!colspan=4 style="background:#300;width:600px"|No empty line or empty skill name is allowed. You should either remove the empty line or add some proper skill name. ' .. noskillcate .. '\n|-style="display:none"\n' p.row = makeInvokeFunction('_row') function p._row(args)	local row = args[1]	local game = args[2]	local code = args[3]	if not code or code ==  then return  end	local level = args[4]	if not level then level = '' end	if level == 'innate' or level == 'default' or level == 'Default' then level = 'Innate' end	local data = require('Module:Skills/' .. game)	local skill = data.skills[code]	if not skill then		local alias = data.aliases[code]		if alias then			code = alias skill = data.skills[code] else return noskill1 .. code .. noskill2 .. game .. noskill3 end end if skill.name then code = skill.name end local skillcell = styles['skill'] .. code local cost = skill.cost if game == 'SMT3' then if cost == 'Convo' then cost = 'Convo ' elseif cost == 'Interrupt' then cost = 'Interrupt ' end end local cost1 = '\n||' .. cost local cost2 = styles['cost2'] .. cost local effect1 = styles['effect1'] .. skill.effect local effect2 = styles['effect2'] .. skill.effect local order = styles['order'] .. skill.cost local element1, element2 if skill.element then element1 = '\n||' .. skill.element or '' element2 = styles['cost2'] .. skill.element or '' end local level1, level2 if skill.pre then level1 = '\n||' .. skill.pre level2 = styles['cost2'] .. skill.pre elseif level == '' then level1 = '\n||' level2 = styles['cost2'] elseif level then level1 = '\n||' .. level level2 = styles['cost2'] .. level end local result if row == 'r01' then result = skillcell .. effect1 -- Odd number row for enemy whose skill cost is irrelevant. elseif row == 'r02' then result = skillcell .. effect2 -- Even number row for enemy whose skill cost is irrelevant. elseif row == 'r11' then if game == 'SMT3' and skill.phy then result = skillcell .. styles['effect1p'] .. skill.effect -- Odd number row for enemy whose physical skills cost no HP. else result = skillcell .. cost1 .. effect1 -- Odd number row for demon which does not learn new skill on level gain. end elseif row == 'r12' then if game == 'SMT3' and skill.phy then result = skillcell .. styles['effect2p'] .. skill.effect -- Even number row for enemy whose physical skills cost no HP. else result = skillcell .. cost2 .. effect2 -- Even number row for demon which does not learn new skill on level gain. end result = skillcell .. cost2 .. effect2 -- Even number row for demon which does not learn new skill on level gain. elseif row == 'r21' then result = skillcell .. cost1 .. effect1 .. level1 -- Odd number row for demon/persona which learn new skill on level gain. elseif row == 'r22' then result = skillcell .. cost2 .. effect2 .. level2 -- Even number row for demon/persona which learn new skill on level gain. elseif row == 'r31' then result = skillcell .. effect1 .. level1 -- Odd number row for guest who learn new skill on level gain. elseif row == 'r32' then result = skillcell .. effect2 .. level2 -- Even number row for guest who learn new skill on level gain. elseif row == 'p12' then result = styles['skill'] .. level .. styles['skillc'] .. code .. effect1 -- Row for Persona 1 and 2 persona elseif row == 'rf' then result = skillcell .. effect1 .. order -- Row for Persona-specific fusion spell. elseif row == 'dk1' then result = skillcell .. element1 .. cost1 .. effect1 -- Odd number row for DemiKids stats skill list. elseif row == 'dk2' then result = skillcell .. element2 .. cost2 .. effect2 -- Odd number row for DemiKids stats skill list. elseif row == 'dkc1' then result = skillcell .. level1 .. element1 .. cost1 .. effect1 -- Odd number row for DemiKids stats combo skill list. elseif row == 'dkc2' then result = skillcell .. level2 .. element2 .. cost2 .. effect2 -- Odd number row for DemiKids stats combo skill list. else result = 'Invalid parameter 1 of ' .. '"' .. row .. '". ' .. cate1 .. 'Templates with unrecognizable row value for Module:Skills' .. cate2 end return result end p.SMTstats = makeInvokeFunction('_SMTstats') function p._SMTstats(args) local boss = args.Boss local image = args.Image or '' local magdrop = args['Mag Drop'] or '' local race = args.Race or args.Clan or '' local alignment = args.Alignment or args.Align or '' local level = args.Level or '' local hp = args.HP or '' local mp = args.MP or '' local noa = args.NOA or args.NOH or '' local str = args.STR or args.st or '' local int = args.INT or args['in'] or '' local mgc = args.MGC or args.ma or '' local stm = args.STM or args.vi or '' local agl = args.AGL or args.ag or '' local lck = args.LCK or args.lu or '' local atk = args.Atk or '' local hit = args.Hit or '' local def = args.Def or '' local avd = args.Avd or args.Eva or '' local mpw = args.Mpw or '' local mef = args.Mef or '' local drop = args.Drop or '' local resist = args.Resist or args.Affinity local skills = args.Skills if image then image = styles['skill'] .. image elseif image ==  then image =  end local magt if magdrop~= or boss then magt = '| MAG ' elseif magdrop ==  or not boss then magt = 'Cost !!CP ' end if race == 'Seraph' then race = 'Seraph' .. cate1 .. 'Herald Race' .. cate2 elseif race == 'Ghost' then race = 'Ghost' .. cate1 .. 'Haunt Race' .. cate2 elseif race == 'Gaean' or race == 'Gaian' then race = 'Gaean' .. cate1 .. 'Ring of Gaea' .. cate2 elseif race == 'Messian' then race = 'Messian'.. cate1 .. 'Order of Messiah' .. cate2 else race =  .. race ..  .. cate1 .. race .. ' Race' .. cate2 end if resist then resist = styles['table2h'] .. 'smt1"\n!width=100|Resistances\n|style="background:#000;text-align:left;padding:0 5px"|' .. resist .. '\n|}'		else resist = 	end	local los = 	for k, v in ipairs(mw.text.split(skills, '\n')) do		local data = require('Module:Skills/SMT1')		local skill = data.skills[v]		if not skill then			local alias = data.aliases[v]			if alias then				v = alias				skill = data.skills[v]			else skill = v			end		end		local effect, cost		if skill ==  then			cost = 			effect = noskill4			elseif skill.effect then				cost = skill.cost				effect = skill.effect				if skill.name then v = skill.name end			else				cost = 				effect = noskill1 .. skill .. noskill2 .. 'SMT1' .. noskill3		end		local skillcell = styles['skill'] .. v		if magdrop ~=  or boss then			if (k % 2 == 0) then				los = los .. skillcell .. styles['effect2'] .. effect			else				los = los .. skillcell .. styles['effect1'] .. effect			end else if (k % 2 == 0) then los = los .. skillcell .. styles['cost2'] .. cost .. styles['effect2'] .. effect else los = los .. skillcell .. '\n||' .. cost .. styles['effect1'] .. effect end end end local categoryd, categorya if magdrop~='' or boss then categoryd = cate1 .. 'Shin Megami Tensei Bosses' .. cate2 else categoryd = cate1 .. 'Shin Megami Tensei Demons' .. cate2 end if alignment == 'Law' or alignment == 'Light-Law' or alignment == 'Neutral-Law' or alignment == 'Dark-Law' then categorya = cate1 .. 'Law Demons in Shin Megami Tensei' .. cate2 elseif alignment == 'Neutral' or alignment == 'Light-Neutral' or alignment == 'Neutral-Neutral' or alignment == 'Dark-Neutral' then categorya = cate1 .. 'Neutral Demons in Shin Megami Tensei' .. cate2 elseif alignment == 'Chaos' or alignment == 'Light-Chaos' or alignment == 'Neutral-Chaos' or alignment == 'Dark-Chaos' then categorya = cate1 .. 'Chaos Demons in Shin Megami Tensei' .. cate2 elseif not alignment or alignment ==  or '-' then categorya =  end local costt if magdrop == '' then costt = styles['skillc'] .. 'Cost' elseif magdrop~= then costt =  end if magdrop ~= '' or boss then magdrop = tonumber(level) * 20 else magdrop = tonumber(level) * 32 .. styles['statlow'] .. math.floor(tonumber(level) / 2) + 2 end local skillt if skills ~= '' then skillt = '\n!colspan="3"| List of Skills \n|-\n' .. styles['skillc'] .. 'Skill' .. costt .. styles['skillc'] .. 'Effect' else skillt = '' end local result result = '{|align="center" style="min-width:650px;text-align:center; background: #222222; border:2px solid ' .. getGames.games['smt1'].colorb .. ';border-radius:7px; font-size:75%; font-family:verdana;"\n|-\n|\n{|width=100% cellpadding=0 cellspacing=0\n' .. image .. '\n|' .. styles['table2h'] .. 'smt1"\n! Race \n! Alignment \n!Level\n!HP\n!MP\n!' .. magt .. '\n|-' .. styles['statlow'] .. race .. styles['statlow'] .. alignment .. styles['statlow'] .. level .. styles['statlow'] .. hp .. styles['statlow'] .. mp .. styles['statlow'] .. magdrop .. '\n|}' .. styles['table2h'] .. 'smt1"\n!NOH \n!Strength\n!Intelligence\n!Magic\n!Vitality\n!Agility\n!Luck\n|-' .. styles['statlow'] .. noa .. styles['statlow'] .. str .. styles['statlow'] .. int .. styles['statlow'] .. mgc .. styles['statlow'] .. stm .. styles['statlow'] .. agl .. styles['statlow'] .. lck .. '\n|}' .. styles['table2h'] .. 'smt1"\n!Attack\n!Hit\n!Defense\n!Evasion\n!MPower \n!MEffect \n! Drop \n|-' .. styles['statlow'] .. atk .. styles['statlow'] .. hit .. styles['statlow'] .. def .. styles['statlow'] .. avd .. styles['statlow'] .. mpw .. styles['statlow'] .. mef .. styles['statlow'] .. drop .. '\n|}\n|}' .. resist .. styles['table2h'] .. 'smt1"' .. skillt .. los .. '\n|}\n|}' .. categoryd .. categorya return result end p.P4stats = makeInvokeFunction('_P4stats') function p._P4stats(args) local boss = args.Boss local hp = args.HP	local sp = args.SP	local level = args.Level or '' local arcana = args.Arcana or '' local strength = args.Strength or args.st or '' local magic = args.Magic or args.ma or '' local endurance = args.Endurance or args.en or '' local agility = args.Agility or args.ag or '' local luck = args.Luck or args.lu or '' local resist = args.Resist or args.Resists local block = args.Block or args.Null or args.Immune local absorb = args.Absorb or args.Absorbs or args.Drain local reflect = args.Reflect or args.Reflects or args.Repel local weak = args.Weak local phys = args.Phys local fire = args.Fire local ice = args.Ice local elec = args.Lit or args.Elec local wind = args.Wind local light = args.Light local dark = args.Dark local alm = args.Alm or args.Almighty local inherit = args.Inherit local yen = args.Yen local xp = args.EXP local p4g = args.P4G local skills = args.Skills local result = '{|align="center" style="min-width:650px;text-align:center; background: #222; border:2px solid ' .. getGames.games['p4'].colorb .. '; border-radius:7px; font-size:75%; font-family:verdana;"\n|-\n|' .. styles['table2h'] .. 'p4"\n!Level\n! Arcana \n'	if hp or mp then		result = result .. '!HP\n!SP'	end	result = result .. '\n!title="Strength"|St\n!title="Magic"|Ma\n!title="Endurance"|En\n!title="Agility"|Ag\n!title="Luck"|Lu\n|-\n' .. styles['statlow'] .. level .. styles['statlow']	if arcana ==  or arcana == '-' or arcana == 'Unclassified' or arcana == 'None'		then result = result .. '-'		else result = result ..  .. arcana .. '' .. cate1 .. arcana .. ' Arcana' .. cate2	end	if hp or sp then		result = result .. styles['statlow'] .. hp .. styles['statlow'] .. sp	end	result = result .. styles['statlow'] .. strength .. styles['statlow'] .. magic .. styles['statlow'] .. endurance .. styles['statlow'] .. agility .. styles['statlow'] .. luck .. '\n|}' .. styles['table2h'] .. 'p4"' if phys or fire or ice or elec or wind or light or dark or alm or xp or yen then if not phys then phys = '' end if not fire then fire = '' end if not ice then ice = '' end if not elec then elec = '' end if not wind then wind = '' end if not light then light = '' end if not dark then dark = '' end if not alm then alm = '' end if not xp then xp = '' end if not yen then yen = '' end result = result .. '\n!Phys\n!Fire\n!Ice\n!title="Electricity"|Elec\n!Wind\n!Light\n!Dark\n!Almighty\n!EXP\n!Yen\n|-\n' .. styles['statlow'] .. phys .. styles['statlow'] .. fire .. styles['statlow'] .. ice .. styles['statlow'] .. elec .. styles['statlow'] .. wind .. styles['statlow'] .. light .. styles['statlow'] .. dark .. styles['statlow'] .. alm .. styles['statlow'] .. xp .. styles['statlow'] .. yen elseif inherit or resist or block or absorb or reflect or weak then if not inherit then inherit = '-' end if not resist then resist = '-' end if not block then block = '-' end if not absorb then absorb = '-' end if not reflect then reflect = '-' end if not weak then weak = '-' else weak = ' ' .. weak .. ' ' end result = result .. '\n!Inherit\n!Resists\n!Block\n!Absorbs\n!Reflects\n!Weak\n|-\n' .. styles['statlow'] .. inherit .. styles['statlow'] .. resist .. styles['statlow'] .. block .. styles['statlow'] .. absorb .. styles['statlow'] .. reflect .. styles['statlow'] .. weak end result = result .. '\n|}' local data = require('Module:Skills/P4') if skills then if hp or sp or boss then result = result .. styles['table2h'] .. 'p4"\n!colspan="2"| List of Skills ' .. styles['skill'] .. 'Skill' .. styles['skillc'] .. 'Effect'			for k, v in ipairs(mw.text.split(skills, '\n')) do				local skill = data.skills[v]				if not skill then					local alias = data.aliases[v]					if alias then						v = alias						skill = data.skills[v]					else skill = v					end				end				local effect				if skill == nil then effect = noskill4					elseif skill.effect then						effect = skill.effect						if skill.name then v = skill.name end					else 						effect = noskill1 .. skill .. noskill2 .. 'P4' .. noskill3				end				local skillcell = styles['skill'] .. v				if (k % 2 == 0) then					result = result .. skillcell .. styles['effect2'] .. effect				else					result = result .. skillcell .. styles['effect1'] .. effect				end			end		else			result = result .. styles['table2h'] .. 'p4"\n!colspan="4"| List of Skills ' .. styles['skill'] .. 'Skill' .. styles['skillc'] .. 'Cost' .. styles['skillc'] .. 'Effect' .. styles['skillc'] .. 'Level' for k1, v1 in ipairs(mw.text.split(skills, '\n')) do for k2, v2 in ipairs(mw.text.split(v1 .. '\\', '\\')) do					if k2 > 2 then break elseif (k2 % 2 == 0) then if v2 == 'innate' or v2 == 'default' or v2 == 'Default' then v2 = 'Innate' end if (k1 % 2 == 0) then result = result .. styles['cost2'] .. v2 else result = result .. styles['cost1'] .. v2							end else local skill = data.skills[v2] if not skill then local alias = data.aliases[v2] if alias then v2 = alias skill = data.skills[v2] else skill = v2							end end if skill == nil then cost = '' effect = noskill4 elseif skill.effect then cost = skill.cost effect = skill.effect if skill.name then v2 = skill.name end else cost = '' effect = noskill1 .. skill .. noskill2 .. 'P4' .. noskill3 end local skillcell = styles['skill'] .. v2						if (k1 % 2 == 0) then result = result .. skillcell .. styles['cost2'] .. cost .. styles['effect2'] .. effect else result = result .. skillcell .. styles['cost1'] .. cost .. styles['effect1'] .. effect end end end end end result = result .. '\n|}' end result = result .. '\n|}' if inherit or resist or block or absorb or reflect or weak then result = result .. cate1 .. 'Persona 4 Personas' .. cate2 .. cate1 .. 'Persona 4 Golden Personas' .. cate2 elseif p4g then result = result .. cate1 .. 'Persona 4 Golden Personas' .. cate2 end if boss then result = result .. cate1 .. 'Persona 4 Bosses' .. cate2 end if phys or fire or ice or elec or wind or light or dark or alm or xp or yen then result = result .. cate1 .. 'Persona 4 Shadows' .. cate2 end return result end p.P5stats = makeInvokeFunction('_P5stats') function p._P5stats(args) local persona = args.Persona local demon = args.Demon local boss = args.Boss local hp = args.HP	local sp = args.SP	local level = args.Level or '' local arcana = args.Arcana or '' local strength = args.Strength or args.st or '' local magic = args.Magic or args.ma or '' local endurance = args.Endurance or args.en or '' local agility = args.Agility or args.ag or '' local luck = args.Luck or args.lu or '' local resist = args.Resist or args.Resists local block = args.Block or args.Null or args.Immune local absorb = args.Absorb or args.Absorbs or args.Drain local reflect = args.Reflect or args.Reflects or args.Repel local weak = args.Weak local phys = args.Phys local fire = args.Fire local ice = args.Ice local elec = args.Lit or args.Elec local wind = args.Wind local light = args.Light local dark = args.Dark local alm = args.Alm or args.Almighty local inherit = args.Inherit local yen = args.Yen local xp = args.EXP local skills = args.Skills local result = '{|align="center" style="min-width:650px;text-align:center; background: #222; border:2px solid ' .. getGames.games['p5'].colorb .. '; border-radius:7px; font-size:75%; font-family:verdana;"\n|-\n|' .. styles['table2h'] .. 'p5"\n!Level\n! Arcana \n'	if hp or mp then		result = result .. '!HP\n!SP'	end	result = result .. '\n!title="Strength"|St\n!title="Magic"|Ma\n!title="Endurance"|En\n!title="Agility"|Ag\n!title="Luck"|Lu\n|-\n' .. styles['statlow'] .. level .. styles['statlow']	if arcana ==  or arcana == '-' or arcana == 'Unclassified' or arcana == 'None'		then result = result .. '-'		else result = result ..  .. arcana .. '' .. cate1 .. arcana .. ' Arcana' .. cate2	end	if hp or sp then		result = result .. styles['statlow'] .. hp .. styles['statlow'] .. sp	end	result = result .. styles['statlow'] .. strength .. styles['statlow'] .. magic .. styles['statlow'] .. endurance .. styles['statlow'] .. agility .. styles['statlow'] .. luck .. '\n|}' .. styles['table2h'] .. 'p5"' if phys or fire or ice or elec or wind or light or dark or alm or xp or yen then if not phys then phys = '' end if not fire then fire = '' end if not ice then ice = '' end if not elec then elec = '' end if not wind then wind = '' end if not light then light = '' end if not dark then dark = '' end if not alm then alm = '' end if not xp then xp = '' end if not yen then yen = '' end result = result .. '\n!Phys\n!Fire\n!Ice\n!title="Electricity"|Elec\n!Wind\n!Light\n!Dark\n!Almighty\n!EXP\n!Yen\n|-\n' .. styles['statlow'] .. phys .. styles['statlow'] .. fire .. styles['statlow'] .. ice .. styles['statlow'] .. elec .. styles['statlow'] .. wind .. styles['statlow'] .. light .. styles['statlow'] .. dark .. styles['statlow'] .. alm .. styles['statlow'] .. xp .. styles['statlow'] .. yen elseif inherit or resist or block or absorb or reflect or weak then if not inherit then inherit = '-' end if not resist then resist = '-' end if not block then block = '-' end if not absorb then absorb = '-' end if not reflect then reflect = '-' end if not weak then weak = '-' else weak = ' ' .. weak .. ' ' end result = result .. '\n!Inherit\n!Resists\n!Block\n!Absorbs\n!Reflects\n!Weak\n|-\n' .. styles['statlow'] .. inherit .. styles['statlow'] .. resist .. styles['statlow'] .. block .. styles['statlow'] .. absorb .. styles['statlow'] .. reflect .. styles['statlow'] .. weak end result = result .. '\n|}' local data = require('Module:Skills/P5') if skills then result = result .. styles['table2h'] .. 'p5"\n!colspan="4" style="background: linear-gradient(120deg, ' .. getGames.games['p5'].colorb .. ' 42%, #000 42.1%, #000 43%, #fff 43.1%, #fff 57%, #000 57.1%, #000 58%, ' .. getGames.games['p5'].colorb .. ' 58.1%"| List of Skills ' .. styles['skill'] .. 'Skill'		if hp or sp or boss or demon then			result = result .. styles['skillc'] .. 'Effect'			for k, v in ipairs(mw.text.split(skills, '\n')) do				local skill = data.skills[v]				if not skill then					local alias = data.aliases[v]					if alias then						v = alias						skill = data.skills[v]					else skill = v					end				end				local effect				if skill == nil then effect = noskill4					elseif skill.effect then						effect = skill.effect						if skill.name then v = skill.name end					else 						effect = noskill1 .. skill .. noskill2 .. 'P5' .. noskill3				end				local skillcell = styles['skill'] .. v				if (k % 2 == 0) then result = result .. skillcell .. styles['effect2'] .. effect else result = result .. skillcell .. styles['effect1'] .. effect end end else result = result .. styles['skillc'] .. 'Cost' .. styles['skillc'] .. 'Effect' .. styles['skillc'] .. 'Level' for k1, v1 in ipairs(mw.text.split(skills, '\n')) do for k2, v2 in ipairs(mw.text.split(v1 .. '\\', '\\')) do					if k2 > 2 then break elseif (k2 % 2 == 0) then if v2 == 'innate' or v2 == 'default' or v2 == 'Default' then v2 = 'Innate' end if (k1 % 2 == 0) then result = result .. styles['cost2'] .. v2 else result = result .. styles['cost1'] .. v2							end else local skill = data.skills[v2] if not skill then local alias = data.aliases[v2] if alias then v2 = alias skill = data.skills[v2] else skill = v2							end end if skill == nil then cost = '' effect = noskill4 elseif skill.effect then cost = skill.cost effect = skill.effect if skill.name then v2 = skill.name end else cost = '' effect = noskill1 .. skill .. noskill2 .. 'P5' .. noskill3 end local skillcell = styles['skill'] .. v2						if (k1 % 2 == 0) then result = result .. skillcell .. styles['cost2'] .. cost .. styles['effect2'] .. effect else result = result .. skillcell .. styles['cost1'] .. cost .. styles['effect1'] .. effect end end end end end result = result .. '\n|}' end result = result .. '\n|}' if persona then	result = result .. cate1 .. 'Persona 5 Personas' .. cate2 end if demon then result = result .. cate1 .. 'Persona 5 Demons' .. cate2 end if boss then result = result .. cate1 .. 'Persona 5 Bosses' .. cate2 end return result end p.stats = makeInvokeFunction('_stats') function p._stats(args) local game = args[1] or args.class or args.game or args.Game or '' local gameg -- Game general style if getGames.games[game].fallback then gameg = getGames.games[game].fallback -- e.g. 'p3f' and 'p3p' will fall back to 'p3' if applicable. else gameg = game end local gamen = getGames.games[game].name -- Full game name local gamegn = getGames.games[gameg].name -- e.g. 'Persona 3 FES' will fall back to 'Persona 3' if applicable. local image = args.Image or args.image local quote = args.Quote or args.quote local fquote1 = args.FusedQuote or args.fusedquote or args.fquote1 local fquote2 = args.FusingQuote or args.fusingquote or args.fquote2 local profile = args.Profile or args.profile local enemy = args.Enemy or args.enemy local boss = args.Boss or args.boss local persona = args.Persona or args.persona local magdrop = args['Mag Drop'] local alignment = args.Alignment or args.Align or args.alignment or args.align local hp = args.HP or args.hp or args.HitPoints local mp = args.MP or args.mp or args.ManaPoints local sp = args.SP or args.sp	local level = args.Level or args.level or args.Lv or args.lv or args.lvl or args.LV or args.LVL or '' local race = args.Race or args.Clan or args.race or args.clan local order = args.Order or args.order local arcana = args.Arcana or args.arcana local ptyle = args['Type'] local subtype = args.Subtype or args.subtype local bonus = args.Bonus or args.bonus local normal = args.Normal or args.normal local rare = args.Rare or args.rare local preturn = args['Return'] local card = args.Cards or args.cards or args.Card or args.card local totem = args.Totem or args.totem local material = args.Material or args.material local heart = args.Heart or args.heart local evolvef = args['evolved from'] or args.Evolvedfrom or args.evolvef local evolvefl = args.Evolvedfromlevel or args.evolvefl local evolvet = args['evolves into'] or args.Evolveinto or args.evolvet local evolvetl = args.Evolveintolevel or args.evolvetl local fusion = args.Fusion or args.Specialfusion or args['special fusion'] local requiredquest = args.Requiredquest or args.requiredquest local relatedquest = args.Relatedquest or args.relatedquest local type1 = args.Type1 local description1 = args.Description1 local unknown = args['Unknown Power'] local investigate = args.Investigate or args.investigate or '' local confine = args.Confine or args.confine or '' local normalattack = args.Normalattack or args.Basicattack or args.Regularattack or '' local atk = args.Attack or args.ATTACK or args.attack or args.ATK or args.Atk or args.atk or args.ATT or args.Att or args.att or '' local def = args.Defense or args.DEFENSE or args.defense or args.DEF or args.Def or args.def or '' local matk = args.MAttack or args.mAttack or args.MATK or args.Matk or args.matk or '' local mdef = args.MDefense or args.mDefense or args.MDEF or args.Mdef or args.mdef or '' local mpw = args.MPower or args.mpower or args.MPW or args.Mpw or '' local mef = args.MEffect or args.meffect or args.MEF or args.Mef or '' local itin = args.ITIN or args.itin or args.Intuition or args.intuition or '' local wllpow = args.WLLPOW or args.wllpow or args['Will Power'] or args['will power'] or '' local dnprt = args.DVNPRT or args.dvnprt or args['Divine Protestion'] or args['divine protestion'] or '' local avd = args.Avoid or args.avoid or args.Avd or args.Evasion or args.Eva or '' local res = args.Resistance or args.resistance or args.RES or args.Res or args.res or '' local spd = args.Speed or args.speed or args.SPD or args.Spd or args.spd or '' local qck = args.Quick or args.quick or args.QCK or args.Qck or args.qck or '' local call = args.Call or args.CALL or args.call or '' local spl = args.Spell or args.spell or args.SPL or args.Spl or args.spl or args.SP or args.Sp or args.sp or '' local number = args['NO'] or args['no'] or args.Number or args.number or '' local equip = args.Equip or args.equip or '' local move = args.Move or args.MOVE or args.move or '' local power = args.Power or args.POWER or args.power or args.Pwr or args.PWR or args.pwr or '' local might = args.Might or args.MIGHT or args.might or args.Mgt or args.MGT or args.mgt or '' local affinity = args.Affinity or args.affinity local exclusive = args.Exclusive or args.exclusive local traits = args.Traits or args.traits or args.Trait or args.trait local convo = args['special conversation'] or args.convo local ptalk = args.Ptalk or args.ptalk local recruit = args.Recruit or args.recruit local element = args.Element or args.element local turnicon = args.Turnicon or args.turnicon local noa = args.NOA or args.NOH or args.noa or args.noh or '' local hit = args.Hit or args.HIT or args.hit or '' local str = args.Strength or args.strength or args.STR or args.Str or args.str or args.ST or args.St or args.st or '' local int = args.Intelligence or args.intelligence or args.INT or args.Int or args.int or args['IN'] or args['In'] or args['in'] or '' local magic = args.Magic or args.magic or args.MGC or args.Mgc or args.mgc or args.MAG or args.Mag or args.mag or args.MA or args.Ma or args.ma or '' local stm = args.Stamina or args.stamina or args.STM or args.Stm or args.stm or '' local vit = args.Vitality or args.vitality or args.VIT or args.Vit or args.vit or args.VI or args.Vi or args.vi or '' local endu = args.Endurance or args.endurance or args.EN or args.En or args.en or args.ENDU or args.Endu or args.endu or '' local dex = args.Dexterity or args.dexterity or args.DEX or args.Dex or args.dex or args.DX or args.Dx or args.dx or '' local agl = args.Agility or args.agility or args.AGL or args.Agl or args.agl or args.AGI or args.Agi or args.agi or args.AG or args.Ag or args.ag or '' local luc = args.Luck or args.luck or args.LCK or args.Lck or args.lck or args.LUC or args.Luc or args.luc or args.LU or args.Lu or args.lu or '' local chm = args.CHM or args.chm or args.Charm or args.charm or '' local weapon = args.Weapon or args.WEAPON or args.weapon or '' local boost = args.Boost or args.boost local resist = args.Resist or args.Resists or args.resist or args.resists local block = args.Block or args.Null or args.Immune or args.Shield or args.block or args.null or args.immune or args.shield local absorb = args.Absorb or args.Absorbs or args.Drain or args.Drains or args.absorb or args.absorbs or args.drain or args.drains local reflect = args.Reflect or args.Reflects or args.Repel or args.Repels or args.reflect or args.reflects or args.repel or args.repels local weak = args.Weak or args.weak local frail = args.Frail or args.frail local ailmentres = args.Ailmentresistance or args.ailmentresistance local almres = args.Almightyresistance or args.almightyresistance local phys = args.Phys or args.Physical or args.phys or args.physical local slash = args.Slash or args.slash local pierce = args.Pierce or args.pierce local gun = args.Gun or args.gun local onehand = args['1h'] local twohand = args['2h'] local sword = args.Sword or args.Sw or args.sword or args.sw	local spear = args.Spear or args.Sp or args.spear or args.sp	local axe = args.Axe or args.Ax or args.axe or args.ax	local whip = args.Whip or args.Wp or args.whip or args.wp	local thrown = args.Thrown or args.Th or args.thrown or args.th	local arrow = args.Arrows or args.Arrow or args.Ar or args.arrows or args.arrow or args.ar	local fist = args.Fist or args.Fs or args.fist or args.fs	local ranged = args.Ranged or args.Rn or args.ranged or args.rn	local handgun = args.Handgun or args.HG or args.handgun or args.hg	local machinegun = args.Machinegun or args.MG or args.machinegun or args.mg	local shotgun = args.Shotgun or args.SG or args.shotgun or args.sg	local rifle = args.Rifle or args.Ri or args.rifle or args.ri	local strike = args.Strike or args.Sk or args.strike or args.sk	local tech = args.Tech or args.TECH or args.Te or args.tech or args.te	local havoc = args.Havoc or args.Hv or args.havoc or args.hv	local rush = args.Rush or args.Ru or args.rush or args.ru	local fire = args.Fire or args.Fi or args.fire or args.fi	local water = args.Water or args.water or args.Wt or args.wt	local earth = args.Earth or args.Er or args.earth or args.er	local ice = args.Ice or args.Ic or args.ice or args.ic	local elec = args.Lightning or args.Electricity or args.Lit or args.Elec or args.El or args.lightning or args.electricity or args.lit or args.elec or args.el	local wind = args.Wind or args.Wi or args.wind or args.wi	local force = args.Force or args.force local nuclear = args.Nuclear or args.Nc or args.nuclear or args.nc	local blast = args.Blast or args.Bl or args.blast or args.bl	local gravity = args.Gravity or args.Gr or args.gravity or args.gr	local expel = args.Expel or args.Ex or args.expel or args.ex	local miracle = args.Miracle or args.Mi or args.miracle or args.mi	local light = args.Light or args.Holy or args.Li or args.light or args.holy or args.li	local death = args.Death or args.De or args.death or args.de	local dark = args.Dark or args.Darkness or args.Dk or args.dark or args.darkness or args.dk	local curse = args.Curse or args.Cu or args.curse or args.cu	local nerve = args.Nerve or args.Nr or args.nerve or args.nr	local mind = args.Mind or args.Mn or args.mind or args.mn	local hiero = args['???'] or args.hiero local mys = args.Mystic or args.mystic or args.mys local racial = args.Racial or args.racial local alm = args.Almighty or args.Alm or args.Al	local inherit = args.Inherit or args.inherit local wild = args['Wild Effects'] local yen = args.Yen or args.yen or args.Money or args.money local xp = args.EXP or args.exp or args.Karma or args.karma or args.xp	local skills = args.Skills or args.skills or args.Skill or args.skill local fskill = args.FSkill or args.Fskill or args. fskill or args.FSkills or args.Fskills or args. fskills local pskill = args.Passive or args.passive or args.pskill local askill = args.AucSkill or args.aucskill or args.askill local apskill = args.AucPassive or args.aucpassive or args.apskill local colorb = getGames.games[gameg].colorb local table2hc = styles['table2h'] .. '"'	local styleh = '\n!style="background: ' .. getGames.games[gameg].colorbg .. ';color: ' .. getGames.games[gameg].font .. '" '	local spanc = ''	local result = '{|align="center" style="min-width:650px;text-align:center; background: #222; border:2px solid ' .. colorb .. '; border-radius:7px; font-size:75%; font-family:verdana;"\n|-\n|\n{|cellspacing=0 cellpadding=0 style="width:100%;border-radius:7px"'	if image then result = result .. '\n|-\n!style="width:20px;background:transparent"|' .. image end	result = result .. '\n|' .. table2hc .. styleh .. '|Level' .. styleh .. '|' .. spanc .. 'Arcana \n'	if hp or mp then		result = result .. styleh .. '|HP' .. styleh .. '|SP'	end	result = result .. styleh .. 'title="Strength"|St' .. styleh .. 'title="Magic"|Ma' .. styleh .. 'title="Endurance"|En' .. styleh .. 'title="Agility"|Ag' .. styleh .. 'title="Luck"|Lu\n|-\n' .. styles['statlow'] .. level .. styles['statlow']	if arcana ==  or arcana == '-' or arcana == 'Unclassified' or arcana == 'None'		then result = result .. '-'		elseif arcana then result = result ..  .. arcana ..  .. cate1 .. arcana .. ' Arcana' .. cate2		else arcana =  end if hp or sp then result = result .. styles['statlow'] .. hp .. styles['statlow'] .. sp	end result = result .. styles['statlow'] .. str .. styles['statlow'] .. magic .. styles['statlow'] .. endu .. styles['statlow'] .. agl .. styles['statlow'] .. luc .. '\n|}' if gameg == 'p3' or gameg == 'p4' then if phys or fire or ice or elec or wind or light or dark or alm or xp or yen then result = result .. table2hc if not phys then phys = '' end if not slash then slash = '' end if not strike then strike = '' end if not pierce then pierce = '' end if not fire then fire = '' end if not ice then ice = '' end if not elec then elec = '' end if not wind then wind = '' end if not light then light = '' end if not dark then dark = '' end if not alm then alm = '' end if not xp then xp = '' end if not yen then yen = '' end if gameg == 'p3' then result = result .. styleh .. '|Slash' .. styleh .. '|Strike' .. styleh .. '|Pierce' elseif gameg == 'p4' then result = result .. styleh .. '|Physical' end result = result .. styleh .. '|Fire' .. styleh .. '|Ice' .. styleh .. 'title="Electricity"|Elec' .. styleh .. '|Wind' .. styleh .. '|Light' .. styleh .. '|Dark' .. styleh .. '|Almighty' .. styleh .. '|EXP' .. styleh .. '|Yen\n|-\n' if gameg == 'p3' then result = result .. styles['statlow'] .. slash .. styles['statlow'] .. strike .. styles['statlow'] .. pierce elseif gameg == 'p4' then result = result .. styles['statlow'] .. phys end result = result .. styles['statlow'] .. fire .. styles['statlow'] .. ice .. styles['statlow'] .. elec .. styles['statlow'] .. wind .. styles['statlow'] .. light .. styles['statlow'] .. dark .. styles['statlow'] .. alm .. styles['statlow'] .. xp .. styles['statlow'] .. yen .. '\n|}' elseif inherit or resist or block or absorb or reflect or weak then result = result .. table2hc if not inherit then inherit = '-' end if not resist then resist = '-' end if not block then block = '-' end if not absorb then absorb = '-' end if not reflect then reflect = '-' end if not weak then weak = '-' else weak = ' ' .. weak .. ' ' end result = result .. styleh .. '|Inherit' .. styleh .. '|Resists' .. styleh .. '|Block' .. styleh .. '|Absorbs' .. styleh .. '|Reflects' .. styleh .. '|Weak\n|-\n' .. styles['statlow'] .. inherit .. styles['statlow'] .. resist .. styles['statlow'] .. block .. styles['statlow'] .. absorb .. styles['statlow'] .. reflect .. styles['statlow'] .. weak .. '\n|}' end end if gameg == 'p3' then if card or heart then result = result .. table2hc if card then result = result .. styleh .. 'width=100px|' .. spanc .. 'Skill Card ' .. styles['order'] .. '' .. card .. ' '			end if heart then result = result .. styleh .. 'width=100px|' .. spanc .. 'Heart Item ' .. styles['order'] .. heart end result = result .. '\n|}' end end result = result .. '\n|}\n' local gamed if gameg == 'mt1' or gameg == 'mt2' then gamed = 'KMT' elseif gameg == 'smtif' then gamed = 'if...' elseif gameg == 'raidou1' then gamed = 'DSRKSA' elseif gameg == 'raidou2' then gamed = 'DSRKKA' elseif gameg == 'dk' or gameg == 'childlight' or gameg == 'childdark' or gameg == 'dmk' then gamed = 'DMK' elseif gameg then gamed = string.upper(gameg) end local data = require('Module:Skills/' .. gamed) if skills then result = result .. table2hc if gameg == 'p5' then result = result .. '\n!colspan=4 style="background-color: ' .. colorb .. ';background: linear-gradient(120deg, ' .. colorb .. ' 42%, #000 42.1%, #000 43%, #fff 43.1%, #fff 57%, #000 57.1%, #000 58%, ' .. colorb .. ' 58.1%"| List of Skills '		elseif gameg == 'desu1' or gameg == 'desu2' then			result = result .. styleh .. 'colspan=3|' .. spanc .. 'Command Skills'		else			result = result .. styleh .. 'colspan=4|' .. spanc .. 'List of Skills '		end		if (game == 'kmt1' and not (enemy or boss)) or (game == 'kmt2' and not (enemy or boss)) or (gameg == 'smt1' and not (enemy or boss)) or (gameg == 'smt2' and not (enemy or boss)) or (gameg == 'smtif' and not (enemy or boss)) or (gameg == 'smt3' and (enemy or boss)) then -- skill - cost - effect			result = result .. styles['skill'] .. 'Skill' .. styles['skillc'] .. 'Cost' .. styles['skillc'] .. 'Effect' for k, v in ipairs(mw.text.split(skills, '\n')) do				local skill = data.skills[v] if not skill then local alias = data.aliases[v] if alias then v = alias skill = data.skills[v] end end local skillcell, cost, effect if v == '' then skillcell = '' cost = '' effect = noskill4 elseif not skill then skillcell = '' cost = '' effect = noskill1 .. v .. noskill2 .. gamed .. noskill3 elseif skill then if skill.phy then cost = 'none' else cost = skill.cost end effect = skill.effect if (k % 2 == 0) then cost = styles['cost2'] .. cost effect = styles['effect2'] .. effect else cost = styles['cost1'] .. cost effect = styles['effect1'] .. effect end if skill.name then v = skill.name end skillcell = styles['skill'] .. v				end result = result .. skillcell .. cost .. effect end elseif gameg == 'ddsaga1' or gameg == 'ddsaga2' or boss or enemy then -- skill - effect (optional: Inheritable Skill or Rumor Skill) result = result .. styles['skill'] .. 'Skill' .. styles['skillc'] .. 'Effect' for k1, v1 in ipairs(mw.text.split(skills, '\n')) do for k2, v2 in ipairs(mw.text.split(v1 .. '\\', '\\')) do					if k2 > 2 then break elseif (k2 % 2 == 1) then local skill = data.skills[v2] if not skill then local alias = data.aliases[v2] if alias then v2 = alias skill = data.skills[v2] end end local skillcell, effect if v2 == '' then skillcell = '' effect = noskill4 elseif not skill then skillcell = '' effect = noskill1 .. v2 .. noskill2 .. gamed .. noskill3 elseif skill then if (k1 % 2 == 0) then effect = styles['effect2'] .. skill.effect else effect = styles['effect1'] .. skill.effect end if skill.name then v2 = skill.name end skillcell = styles['skill'] .. v2						end result = result .. skillcell .. effect elseif (k2 % 2 == 0) then if v2 == 'I' or v2 == 'i' then result = result .. ' Inheritable Skill ' elseif v2 == 'R' or v2 == 'r' then result = result .. ' Rumor Skill  ' else result = result end end end end elseif gameg == 'dk' or gameg == 'childlight' or gameg == 'childdark' or gameg == 'dmk' then -- skill - element - cost - effect result = result .. styles['skill'] .. 'Skill' .. styles['skillc'] .. 'Element' .. styles['skillc'] .. 'Cost' .. styles['skillc'] .. 'Effect' for k, v in ipairs(mw.text.split(skills, '\n')) do				local skill = data.skills[v] if not skill then local alias = data.aliases[v] if alias then v = alias skill = data.skills[v] end end local skillcell, skille, cost, effect if v == '' then skillcell = '' skille = '' cost = '' effect = noskill4 elseif not skill then skillcell = '' skille = '' cost = '' effect = noskill1 .. v .. noskill2 .. gamed .. noskill3 elseif skill then if (k % 2 == 0) then effect = styles['effect2'] .. skill.effect skille = styles['cost2'] .. skill.element cost = styles['cost2'] .. skill.cost else effect = styles['effect1'] .. skill.effect skille = styles['cost1'] .. skill.element cost = styles['cost1'] .. skill.cost end if skill.name then v = skill.name end skillcell = styles['skill'] .. v				end result = result .. skillcell .. skille .. cost .. effect end else if gameg == 'p1' or gameg == 'p2is' or gameg == 'p2ep' then -- rank - skill - effect result = result .. styles['skill'] .. 'Rank' .. styles['skillc'] .. 'Skill' .. styles['skillc'] .. 'Effect' for k1, v1 in ipairs(mw.text.split(skills, '\n')) do for k2, v2 in ipairs(mw.text.split(v1 .. '\\', '\\')) do						if k2 > 2 then break elseif (k2 % 2 == 1) then if v2 == 'M' or v2 == 'm' then v2 = ' Mutation ' elseif v2 == 'R' or v2 == 'r' then v2 = ' Rumor ' else v2 = v2							end result = result .. styles['skill'] .. v2						elseif (k2 % 2 == 0) then local skill = data.skills[v2] if not skill then local alias = data.aliases[v2] if alias then v2 = alias skill = data.skills[v2] end end local skillcell, effect if v2 == '' then skillcell = '' effect = noskill4 elseif not skill then skillcell = '' effect = noskill1 .. v2 .. noskill2 .. gamed .. noskill3 elseif skill then if (k1 % 2 == 0) then effect = styles['effect2'] .. skill.effect else effect = styles['effect1'] .. skill.effect end if skill.name then v2 = skill.name end skillcell = styles['skillc'] .. v2							end result = result .. skillcell .. effect end end end elseif game == 'mt1' or game == 'mt2' or gameg == 'gmt' or gameg == 'smtds' or gameg == 'dssh' or gameg == 'desu1' or gameg == 'desu2' then for k, v in ipairs(mw.text.split(skills, '\n')) do					local skill = data.skills[v] if not skill then local alias = data.aliases[v] if alias then v = alias skill = data.skills[v] end end local skillcell if not skill then skillcell = '\n!width="33%"|' .. v					else if skill.name then v = skill.name end skillcell = '\n!width="33%" title="Cost: ' .. skill.cost .. '; ' .. skill.effect .. '"|' .. v					end if (k == 7) then result = result .. '\n|-\n!width="33%"|' .. skillcell .. '\n!width="33%"|' elseif (k % 3 == 1) then result = result .. '\n|-' .. skillcell else result = result .. skillcell end end else -- skill - cost - effect - level result = result .. styles['skill'] .. 'Skill' .. styles['skillc'] .. 'Cost' .. styles['skillc'] .. 'Effect' .. styles['skillc'] .. 'Level' for k1, v1 in ipairs(mw.text.split(skills, '\n')) do -- Any entry on new line within "Skills" parameter is treated as new skill name. for k2, v2 in ipairs(mw.text.split(v1 .. '\\', '\\')) do -- Entry after backslash after skill name is treated as "level" for learning new skill per level gain. Any entry starting from second backslash on the same line is ignored until a new line. if k2 > 2 then break elseif (k2 % 2 == 1) then -- this checks level (false) or skill name (true) divided by the backslash. local skill = data.skills[v2] -- now v2 represents skill name. if not skill then local alias = data.aliases[v2] if alias then v2 = alias skill = data.skills[v2] end end local skillcell, cost, effect if v2 == '' then skillcell = '' cost = '' effect = noskill4 elseif not skill then skillcell = '' cost = '' effect = noskill1 .. v2 .. noskill2 .. gamed .. noskill3 elseif skill then if gameg == 'smt3' then if skill.cost == 'Convo' then cost = 'Convo ' elseif skill.cost == 'Interrupt' then cost = 'Interrupt ' else cost = skill.cost end else cost = skill.cost end if (k1 % 2 == 0) then cost = styles['cost2'] .. cost effect = styles['effect2'] .. skill.effect else cost = styles['cost1'] .. cost effect = styles['effect1'] .. skill.effect end if skill.name then v2 = skill.name end skillcell = styles['skill'] .. v2							end result = result .. skillcell .. cost .. effect elseif (k2 % 2 == 0) then -- this checks level (ture) or skill name (false) divided by the backslash. if v2 == 'innate' or v2 == 'default' or v2 == 'Default' -- now v2 represents skill level. then v2 = 'Innate' end if (k1 % 2 == 0) then -- this checks even (true) or odd (false) number row. result = result .. styles['cost2'] .. v2 -- "v2" represents "Level" within "Skills" parameter on each new line after the backslash. else result = result .. styles['cost1'] .. v2							end end end end end end result = result .. '\n|}' end if fskill then result = result .. table2hc .. styleh .. 'colspan="4"' if gameg == 'p2is' or gameg == 'p2ep' then result = result .. '|' .. spanc .. 'Unique Fusion Spells ' .. styles['skill'] .. 'Skill' .. styles['skillc'] .. 'Effect' .. styles['skillc'] .. 'Order/Skill/Persona' for k, v in ipairs(mw.text.split(fskill, '\n')) do				local skill = data.skills[v] if not skill then local alias = data.aliases[v] if alias then v = alias skill = data.skills[v] end end local skillcell, effect, cost if v == '' then skillcell = '' cost = '' effect = noskill4 elseif not skill then skillcell = '' cost = '' effect = noskill1 .. v .. noskill2 .. gamed .. noskill3 elseif skill then if (k % 2 == 0) then effect = styles['effect2'] .. skill.effect else effect = styles['effect1'] .. skill.effect end if skill.name then v = skill.name end skillcell = styles['skill'] .. v cost = styles['order'] .. skill.cost end result = result .. skillcell .. effect .. cost end elseif gameg == 'p3' then local cost, effect, pre if not data.skills[fskill] then cost = '' effect = noskill1 .. fskill .. noskill2 .. gamed .. noskill3 pre = '' fskill = '' else cost = styles['cost1'] .. data.skills[fskill].cost effect = styles['effect1'] .. data.skills[fskill].effect pre = styles['cost1'] .. data.skills[fskill].pre fskill = styles['skill'] .. fskill end result = result .. '|' .. spanc .. 'Fusion Spell * ' .. styles['skill'] .. 'Skill' .. styles['skillc'] .. 'Cost' .. styles['skillc'] .. 'Effect' .. styles['skillc'] .. '<abbr title="Persona 3 and FES only">Prerequisite ' .. fskill .. cost .. effect .. pre end result = result .. '\n|}' end if pskill then result = result .. table2hc .. styleh .. 'colspan=3|' .. spanc .. 'Passive Skills ' for k, v in ipairs(mw.text.split(pskill, '\n')) do			local skill = data.skills[v] if not skill then local alias = data.aliases[v] if alias then v = alias skill = data.skills[v] end end local skillcell if not skill then skillcell = '\n!width="33%"|' .. v			else if skill.name then v = skill.name end skillcell = '\n!width="33%" title="Cost: ' .. skill.cost .. '; ' .. skill.effect .. '"|' .. v			end if (k % 3 == 1) then result = result .. '\n|-' .. skillcell else result = result .. skillcell end end result = result .. '\n|}' end if askill or apskill then result = result .. table2hc .. styleh .. 'colspan=3|List of Auction Skills' if askill then for k, v in ipairs(mw.text.split(askill, '\n')) do				local skill = data.skills[v] if not skill then local alias = data.aliases[v] if alias then v = alias skill = data.skills[v] end end local skillcell if not skill then skillcell = '\n!width="33%"|' .. v				else if skill.name then v = skill.name end skillcell = '\n!width="33%" title="Cost: ' .. skill.cost .. '; ' .. skill.effect .. '"|' .. v				end if (k % 3 == 1) then result = result .. '\n|-' .. skillcell else result = result .. skillcell end end end if apskill then for k, v in ipairs(mw.text.split(apskill, '\n')) do				local skill = data.skills[v] if not skill then local alias = data.aliases[v] if alias then v = alias skill = data.skills[v] end end local skillcell if not skill then skillcell = '\n!width="33%"|' .. v				else if skill.name then v = skill.name end skillcell = '\n!width="33%" title="Cost: ' .. skill.cost .. '; ' .. skill.effect .. '"|' .. v				end if (k % 3 == 1) then result = result .. '\n|-' .. skillcell else result = result .. skillcell end end end result = result .. '\n|}' end result = result .. '\n|}' if persona then	result = result .. cate1 .. gamen .. ' Personas' .. cate2 end if demon then result = result .. cate1 .. gamen .. ' Demons' .. cate2 end if boss then result = result .. cate1 .. gamen .. ' Bosses' .. cate2 end return result end return p -- --