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!style="background:#000;color:#fff;width:33%;',	['skill3m'] = '\n!style="background:transparent;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"|', ['quote'] = '\n|-\n|style="background:#000;color:#fff;text-align:center;border-radius:3.5px;',	} 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 cost = 'Convo ' elseif skill.cost == 'Interrupt' then cost = 'Interrupt ' 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 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

local function getRace(race,game) local result if not race or race == '' or race == '-' or race == 'Unclassified' or race == 'None' or race == 'none' then result = '-' elseif game == 'ddsaga1' or game == 'ddsaga2' then if race == 'Deity' then result =  .. race ..  elseif race == 'Evil' or race == 'Icon' then result =  .. race ..  elseif race == 'Fiend' or race == 'Nether' then result =  .. race ..  elseif race == 'Aerial' then result =  .. race ..  elseif race == 'Aerial2' then result = 'Aerial' elseif race == 'Dragon' then result =  .. race ..  elseif race == 'Demon' or race == 'Brute' then result =  .. race ..  elseif race == 'Beast' then result =  .. race ..  elseif race == 'Device' then result =  .. race ..  else result = race end elseif game == 'raidou1' or game == 'raidou2' then if race == 'Element' then result = 'Element' .. cate1 .. 'Element Race' .. cate2 elseif race == 'Spirit' then result = 'Spirit' .. cate1 .. 'Mitama Race' .. cate2 elseif race == 'Soldier Bug' then result = 'Soldier Bug' elseif race == 'Destroyer' then result = 'Destroyer' elseif race == 'Fiend' then result = 'Fiend' .. cate1 .. 'Fiend Race' .. cate2 elseif race == 'General' then result = 'General' .. cate1 .. 'General Race' .. cate2 elseif race == 'Pyro' or race == 'Frost' or race == 'Volt' or race == 'Wind' or race == 'Fury' or race == 'Pagan' or race == 'Skill' or race == 'Evil' then result =  .. race ..  .. cate1 .. race .. ' Race' .. cate2 else result = race end elseif race == 'Omega' then result = 'Omega' .. cate1 .. 'Fury Race' .. cate2 elseif race == 'Seraph' then result = 'Seraph' .. cate1 .. 'Herald Race' .. cate2 elseif race == 'Geist' then result = 'Geist' .. cate1 .. 'Entity Race' .. cate2 elseif race == 'Nocturne' then result = 'Nocturne' .. cate1 .. 'Night Race' .. cate2 elseif race == 'Prime' then result = 'Prime' .. cate1 .. 'Element Race' .. cate2 elseif race == 'Summoner' then result = 'Summoner' .. cate1 .. 'Summoner Race' .. cate2 elseif race == 'Ghost' then if game == 'sh' then result = 'Ghost' .. cate1 .. 'Ghost Race' .. cate2 else result = 'Ghost' .. cate1 .. 'Haunt Race' .. cate2 end elseif race == 'Gaean' or result == 'Gaian' then race = 'Gaean' .. cate1 .. 'Ring of Gaea' .. cate2 elseif race == 'Messian' then result = 'Messian'.. cate1 .. 'Order of Messiah' .. cate2 elseif race == 'Star' then result = 'Star' .. cate1 .. 'Star Race' .. cate2 else result =  .. race ..  .. cate1 .. race .. ' Race' .. cate2 end return result end

local function getArcana(arcana) local result if not arcana or arcana == '' or arcana == '-' or arcana == 'Unclassified' or arcana == 'None' or arcana == 'none' then result = '-' elseif arcana == 'Coin' or arcana == 'Coins' then result = 'Coin' .. cate1 .. 'Coin Arcana' .. cate2 elseif arcana == 'Pentacle' then result = 'Pentacle' .. cate1 .. 'Coin Arcana' .. cate2 elseif arcana == 'Sword' or arcana == 'Swords' then result = 'Sword' .. cate1 .. 'Sword Arcana' .. cate2 elseif arcana == 'Cup' or arcana == 'Cups' then result = 'Cup' .. cate1 .. 'Cup Arcana' .. cate2 elseif arcana == 'Wand' or arcana == 'Wands' then result = 'Wand' .. cate1 .. 'Wand Arcana' .. cate2 elseif arcana == 'Rod' then result = 'Rod' .. cate1 .. 'Wand Arcana' .. cate2 else result =  .. arcana ..  .. cate1 .. arcana .. ' Arcana' .. cate2 end return result end -- Not enough local vairables (limited at 200 per function) so some terms have to share the same var like MP and SP. p.stats = makeInvokeFunction('_stats') function p._stats(args) local game = args[1] or args.game or args.Game or '' if args.FES then game = 'p3f' end if args.P3P then game = 'p3p' end if args.P4G then game = 'p4g' end if args.BR or args.RB then game = 'desu2rb' end 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 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 == 'childps' then gamed = 'CHILDRED' 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) local image = args.Image or args.image local quote = args.Quote or args.quote or args.FusedQuote or args.fusedquote or args.fquote1 local profile = args.Profile or args.profile or args.FusingQuote or args.fusingquote or args.fquote2 or args.Password or args.password local enemy = args.Enemy or args.enemy local boss = args.Boss or args.boss local guest = args.Guest or args.guest or args.Guest1 or args.guest1 or args.Guest2 or args.guest2 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 or 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 or args['type'] or args.species or args.Order or args.order local arcana = args.Arcana or args.arcana local class = args.Class or args.class local etype = args['Type'] or args.etype or args.Affinity or args.affinity or args.Element or args.element or args.align local element =	args.Element or args.element or args.Subtype or args.subtype local bonus = args.Bonus or args.bonus local normal = args.Normal or args.normal or args.Drops or args.drops or args.Drop or args.drop local rare = args.Rare or args.rare local drop1 = args.Drop1 or args.drop1 local drop2 = args.Drop2 or args.drop2 local drop3 = args.Drop3 or args.drop3 local dropc = args.DropC or args.Dropc or args.dropc local condition = args.Condition or args.condition or args.Conditional or args.conditional or args['MAG Cost'] or args.Cost local preturn = args['Return'] or args['Return Item'] or args.Heart or args.heart local card = args.Cards or args.cards or args.Card or args.card or args.Tarot or args.tarot or args['Extract'] or args['extract'] local fragment = args.Fragment or args.fragment local totem = args.Totem or args.totem local material = args.Material or args.material 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 or args.type1 local type2 = args.Type2 or args.type2 local type3 = args.Type3 or args.type3 local desc1 = args.Description1 or args.description1 local desc2 = args.Description2 or args.description2 local desc3 = args.Description3 or args.description3 local unknown = args['Unknown Power'] or args.unknown local investigate = args.Investigate or args.investigate 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 args.matk or '' local mdef = args.MDefense or args.mDefense or args.MDEF or args.MDef or args.Mdef or args.mdef or '' local mpw = args.MPower or args.mpower or args.MPW or args.MPw or args.Mpw or '' local mef = args.MEffect or args.meffect or args.MEF 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 dvnprt = 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 args.Ailmentresistance or args.ailmentresistance or '' local call = args.Call or args.CALL or args.call or '' local spell = 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 exclusive = args.Exclusive or args.exclusive or args.Affinity or args.affinity local traits = args.Traits or args.traits or args.Trait or args.trait or args.Personality or args.personality local convo = args['special conversation'] or args.Conver or args.conver or args.Conbo or args.convo or args.PTalk or args.Ptalk or args.ptalk local recruit = args.Recruit or args.recruit or args.Confine or args.confine or '' local turnicon = args.Turnicon or args.turnicon or args.turn or args.icon local noa = args.NOA or args.NOH or args.noa or args.noh or args.Normalattack or args.Basicattack or args.Regularattack or args.normalattack or args.basicattack or args.regularattack or args.AttackType or args.attacktype 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 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 args.Endurance or args.endurance or args.EN or args.En or args.en or args.ENDU or args.Endu or args.endu or args.Stamina or args.stamina or args.STM or args.Stm or args.stm 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 args.Technicality or args.technicality or args.TEC or args.Tec or args.tec 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 args.Speed or args.speed or args.SPD or args.Spd or args.spd or '' local quick = args.Quick or args.quick or args.QCK or args.Qck or args.qck 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 or args.Weakness or args.weakness local frail = args.Frail or args.frail local almres = args.Almightyresistance or args.almightyresistance local phys = args.Phys or args.Physical or args.phys or args.physical local pierce = args.Pierce or args.pierce or args.Stab or args.stab or args.Gun or args.gun local onehand = args['1h'] local twohand = args['2h'] local sword = args.Sword or args.sword or args.SW or args.Sw or args.sw or args.Cut or args.cut or args.Slash or args.slash local spear = args.Spear or args.spear or args.Sp or args.sp	local axe = args.Axe or args.axe or args.AX or args.Ax or args.ax	local whip = args.Whip or args.whip or args.WP or args.Wp or args.wp	local thrown = args.Thrown or args.thrown or args.Throw or args.throw or args.TH or args.Th or args.th	local arrow = args.Arrows or args.Arrow or args.arrows or args.arrow or args.AR or args.Ar or args.ar	local fist = args.Fist or args.fist or args.FS or args.Fs or args.fs	local ranged = args.Ranged or args.ranged or args.RN or args.Rn or args.rn	local handgun = args.Handgun or args.handgun or args.HG or args.Hg or args.hg	local machinegun = args.Machinegun or args.machinegun or args.MG or args.Mg or args.mg	local shotgun = args.Shotgun or args.shotgun or args.SG or args.Sg or args.sg	local rifle = args.Rifle or args.rifle or args.RI or args.Ri or args.ri	local strike = args.Strike or args.strike or args.SK or args.Sk or args.sk or args.Bash or args.bash local tech = args.Tech or args.TECH or args.tech or args.TE or args.Te or args.te	local rush = args.Rush or args.rush or args.RU or args.Ru or args.ru or args.Havoc or args.havoc or args.HV or args.Hv or args.hv	local fire = args.Fire or args.fire or args.FI or args.Fi or args.fi	local water = args.Water or args.water or args.WT or args.Wt or args.wt	local earth = args.Earth or args.earth or args.ER or args.Er or args.er	local ice = args.Ice or args.ice or args.IC or args.Ic or args.ic	local elec = args.Electricity or args.electricity or args.ELEC or args.Elec or args.elec or args.EL or args.El or args.el or args.Lightning or args.lightning or args.LIT or args.Lit or args.lit local wind = args.Wind or args.wind or args.WI or args.Wi or args.wi	local force = args.Force or args.force local nuclear = args.Nuclear or args.nuclear or args.NC or args.Nc or args.nc	local blast = args.Blast or args.blast or args.BL or args.Bl or args.bl	local gravity = args.Gravity or args.gravity or args.GR or args.Gr or args.gr	local expel = args.Expel or args.expel or args.EX or args.Ex or args.ex or args.Light or args.light or args.LI or args.Li or args.li or args.Holy or args.holy local miracle = args.Miracle or args.miracle or args.MI or args.Mi or args.mi	local death = args.Death or args.death or args.DE or args.De or args.de	local dark = args.Darkness or args.darkness or args.Dark or args.dark or args.DK or args.Dk or args.dk	local curse = args.Curse or args.curse or args.CU or args.Cu or args.cu	local nerve = args.Nerve or args.nerve or args.NR or args.Nr or args.nr	local mind = args.Mind or args.mind or args.MN or args.Mn or args.mn	local hiero = args['???'] or args.hiero local mystic = args.Mystic or args.mystic or args.mys local poison = args.Poison or args.poison local paralyze = args.Paralyze or args.paralyze or args.Paralysis or args.paralysis or args.Para or args.para or args.Stun or args.stun local stone = args.Stone or args.stone or args.Petrify or args.petrify or args.Petrification or args.petrification or args.Petra or args.petra local strain = args.Strain or args.strain local sleep = args.Sleep or args.sleep or args.Asleep or args.asleep local charm = args.Charm or args.charm local mute = args.Mute or args.mute or args.Seal or args.seal local fear = args.Fear or args.fear local bomb = args.Bomb or args.bomb local rage = args.Rage or args.rage local ko = args.KO or args.ko or args.instkill or args.kill local panic = args.Panic or args.panic or args.Confusion or args.confusion or args.Confuse or args.confuse local down = args.Down or args.down local stbind = args['St Bind'] or args.stbind local mabind = args['Ma Bind'] or args.mabind local agbind = args['Ag Bind'] or args.agbind local racial = args.Racial or args.racial local alm = args.Almighty or args.almighty or args.ALM or args.Alm or args.alm or args.AL or args.Al or args.al	local inherit = args.Inherit or args.inherit local wild = args['Wild Effects'] or args.wild local yen = args.Yen or args.yen or args.Money or args.money local xp = args.EXP or args.Exp or args.exp or args.Karma or args.karma or args.XP or args.Xp or args.xp	local skills = args.Skills or args.Skill1 or args['Skill 1'] or args.skills or args.Skill or args.skill local fskill = args.FSkill or args.FSkill1 or args.Fskill or args. fskill or args.FSkills or args.Fskills or args. fskills local pskill = args.Passive or args.Passive1 or args.passive or args.pskill or args.pskills or args['D-Skill1'] or args['D-Skill'] or args['D-Skills'] or args.dskills or args.dskill local askill = args.AucSkill or args.AucSkill1 or args.aucskill or args.askill or args.askills or args.Item1 or args.Items or args.items or args.Item or args.item local apskill = args.AucPassive or args.AucPassive1 or args.aucpassive or args.apskill or args.apskills local colorb = getGames.games[gameg].colorb local table2b = '\n{|cellpadding=0 cellspacing=0 style="width:100%;background:transparent" ' 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:10px; font-size:75%; font-family:verdana;"\n|-\n|' .. table2b	if image then result = result .. '\n|-\n!style="width:20px;background:transparent"|' .. image end	result = result .. '\n|'	if gameg == 'raidou1' or gameg == 'raidou2' then		if not level then level = '?' end		if not str then str = '-' end		if not magic then magic = '-' end		if not vit then vit = '-' end		if not luc then luc = '-' end		if not condition then condition = '-' end		if not convo then convo = '-' end		if not investigate then investigate = '-' end		if not recruit then recruit = '?' elseif boss then recruit = 'No' 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			if gameg == 'raidou1' then				weak = ' ' .. weak .. ' '			else weak = ' ' .. weak .. ' '			end		end		if not frail then frail = '-' else frail = ' ' .. frail .. ' ' end result = result .. table2hc .. styleh .. '|' .. spanc .. 'Order ' .. styleh .. '|Level' .. styleh .. '|HP' if gameg == 'raidou1' then result =result .. styleh .. '|MP' end result =result .. styleh .. 'title="Strength"|ST' .. styleh .. 'title="Magic"|MA' .. styleh .. 'title="Vitality"|VI' .. styleh .. 'title="Luck"|LU' .. styleh if gameg == 'raidou1' then result = result .. '|MAG Cost' else result = result .. 'title="Conversation skill of the demon"| Conversation ' end result = result .. styleh .. 'title="Demon' .. "'s" .. ' Investigation Skill"| Investigation \n|-' .. styles['statlow'] .. getRace(race,gameg) .. styles['statlow'] .. level .. styles['statlow'] .. hp if gameg == 'raidou1' then result = result .. styles['statlow'] .. mp end result = result .. styles['statlow'] .. str .. styles['statlow'] .. magic .. styles['statlow'] .. vit .. styles['statlow'] .. luc .. styles['statlow'] if gameg == 'raidou1' then result = result .. condition else result = result .. convo end result = result .. styles['statlow'] .. investigate .. '\n|}' .. table2hc if gameg == 'raidou1' then result = result .. styleh .. 'title="Whether the demon can be subdued as ally or not."|Confinable' end result =result .. styleh .. '|Resist' .. styleh .. '|Block' .. styleh .. '|Absorbs' .. styleh .. '|Reflects' .. styleh if gameg == 'raidou2' then result = result .. 'title="Unit takes extra damage without being staggered."| Weak ' .. styleh .. 'title="Unit will be staggered by the said element(s). Whether the element does extra damage or not varies."| Frail \n|-' else result = result .. '|Weak\n|-' .. styles['statlow'] .. recruit end result = result .. styles['statlow'] .. resist .. styles['statlow'] .. block .. styles['statlow'] .. absorb .. styles['statlow'] .. reflect .. styles['statlow'] .. weak if gameg == 'raidou2' then result = result .. styles['statlow'] .. frail end result = result .. '\n|}' if boss then result = result .. cate1 .. gamen .. ' Bosses' .. cate2 else result = result .. cate1 .. gamen .. ' Demons' .. cate2 end end if gameg == 'p1' then result = result .. table2hc .. styleh if boss or enemy or hp then result = result .. '|' .. spanc .. 'Order ' .. styleh .. '|Type' .. styleh .. '|Subtype' .. styleh .. '|Level' .. styleh .. '|HP' .. styleh .. '|SP\n|-' .. styles['statlow'] .. getRace(race,gameg) .. styles['statlow'] .. level .. styles['statlow'] .. etype .. styles['statlow'] .. element .. styles['statlow'] .. hp .. styles['statlow'] .. mp .. '\n|}' if matk ==  and mdef ==  and str ==  and vit ==  and dex ==  and agl ==  and luc == '' then else result = result .. table2hc .. styleh .. 'width=14.3% title="Magical Power"|MAtk' .. styleh .. 'width=14.3% title="Magical Defense"|MDef' .. styleh .. 'width=14.3% title="Strength"|St' .. styleh .. 'width=14.3% title="Vitality"|Vi' .. styleh .. 'width=14.3% title="Dexterity"|Dx' .. styleh .. 'width=14.3% title="Agility"|Ag' .. styleh .. 'title="Luck"|Lu\n|-' .. styles['statlow'] .. matk .. styles['statlow'] .. mdef .. styles['statlow'] .. str .. styles['statlow'] .. vit .. styles['statlow'] .. dex .. styles['statlow'] .. agl .. styles['statlow'] .. luc .. '\n|}' end if not traits and not normal and not convo then else result = result .. table2hc if trait then result = result .. styleh .. 'width=90px|' .. spanc .. 'Traits ' .. styles['order'] .. traits end if normal then result = result .. styleh .. 'width=90px|' .. spanc .. 'Drops ' .. styles['order'] .. normal end if convo then result = result .. styleh .. 'width=90px title="If equipped with the listed Persona, there is a chance it will talk to this demon if encountered."| ' .. spanc .. 'Ptalk ' .. styles['order'] .. convo end end end else result = result .. '\n|}' end if (gameg == 'p2is' or gameg == 'p2ep') and quote then result = result .. table2b .. styles['quote'] .. 'font-style:italic"|' .. string.gsub(quote, '!!', '‼') .. '\n|}'	end -- replace exclamation mark otherwise it will be interpreted as wiki table seperator.	if gameg == 'p2is' or gameg == 'p2ep' then		result = result .. table2hc .. styleh .. '|' .. spanc .. 'Arcana ' .. styleh .. '|Level'		if enemy or boss then			if etype then result = result .. styleh .. '|Type' end			if normal then result = result .. styleh .. '|' .. spanc .. 'Normal Drop' end			if rare then result = result .. styleh .. 'style="background:#8E283D"|Rare Drop' end			result = result .. '\n|-' .. styles['statlow'] .. getArcana(arcana) .. styles['statlow'] .. level			if etype then result = result .. styles['statlow'] .. etype end			if normal then result = result .. styles['statlow'] .. normal end			if rare then result = result .. styles['statlow'] .. rare end			result = result .. cate1 .. gamegn if boss then result = result .. ' Bosses' .. cate2 else result = result .. ' Demons' .. cate2 end else result = result .. styleh .. '|Type' .. styleh .. 'title="Extra stats that are conferred upon every level up with the Persona equipped"|Bonus' .. styleh .. '|' .. spanc .. 'Returns ' .. '' .. spanc .. '° ' .. '\n|-' .. styles['statlow'] .. getArcana(arcana) .. styles['statlow'] .. level .. styles['statlow'] .. etype .. styles['statlow'] .. bonus .. styles['statlow'] .. preturn .. cate1 .. gamegn .. ' Personas' .. cate2 end result = result .. '\n|}' end if gameg == 'p3' or gameg == 'p4' then result = result .. table2hc .. styleh .. '|' .. spanc .. 'Arcana ' .. styleh .. 'width=10%|Level' if hp then result = result .. styleh .. 'width=10%|HP' end if mp then result = result .. styleh .. 'width=10%|SP' end result = result .. styleh .. 'width=10% title="Strength"|St' .. styleh .. 'width=10% title="Magic"|Ma' .. styleh .. 'width=10% title="Endurance"|En' .. styleh .. 'width=10% title="Agility"|Ag' .. styleh .. 'width=10% title="Luck"|Lu\n|-\n' .. styles['statlow'] .. getArcana(arcana) result = result .. styles['statlow'] .. level if hp then result = result .. styles['statlow'] .. hp end if mp then result = result .. styles['statlow'] .. mp end result = result .. styles['statlow'] .. str .. styles['statlow'] .. magic .. styles['statlow'] .. vit .. styles['statlow'] .. agl .. styles['statlow'] .. luc .. '\n|}' result = result .. cate1 if gameg == 'p3' then if hp then if boss then if game == 'p3p' then result = result .. gamen .. ' Bosses' .. cate2 else result = result .. gamegn .. ' Bosses' .. cate2 .. cate1 .. 'Persona 3 Portable Bosses' .. cate2 end else result = result .. gamegn .. ' Shadows' .. cate2 end else if game == 'p3p' then result = result .. gamen .. ' Personas' .. cate2 elseif game == 'p3f' then result = result .. gamen .. ' Personas' .. cate2 else result = result .. gamegn .. ' Personas' .. cate2 .. cate1 .. 'Persona 3 FES Personas' .. cate2 .. cate1 .. 'Persona 3 Portable Personas' .. cate2 end end end if gameg == 'p4' then if hp then if boss then if game == 'p4g' then result = result .. gamen .. ' Bosses' .. cate2 else result = result .. gamegn .. ' Bosses' .. cate2 .. cate1 .. 'Persona 4 Golden Bosses' .. cate2 end else if game == 'p4g' then result = result .. gamen .. ' Shadows' .. cate2 else result = result .. gamegn .. ' Shadows' .. cate2 .. cate1 .. 'Persona 4 Golden Shadows' .. cate2 end end else if game == 'p4g' then result = result .. gamen .. ' Personas' .. cate2 else result = result .. gamegn .. ' Personas' .. cate2 .. cate1 .. 'Persona 4 Golden Personas' .. cate2 end end end end if gameg == 'pq' then if not arcana then if not drop1 then drop1 = '-' end if not drop2 then drop2 = '-' end if not drop3 then drop3 = '-' end result = result .. table2hc .. styleh .. 'width=11.11%|Level' .. styleh .. 'width=11.11%|HP' .. styleh .. 'width=11.11%|Attack' .. styleh .. 'width=11.11%|Defense' .. styleh .. 'width=11.11% title="Strength"|St' .. styleh .. 'width=11.11% title="Magic"|Ma' .. styleh .. 'width=11.11% title="Endurance"|En' .. styleh .. 'width=11.11% title="Agility"|Ag' .. styleh .. 'width=11.11% title="Luck"|Lu\n|-\n' .. styles['statlow'] .. level .. styles['statlow'] .. hp .. styles['statlow'] .. atk .. styles['statlow'] .. def .. styles['statlow'] .. str .. styles['statlow'] .. magic .. styles['statlow'] .. vit .. styles['statlow'] .. agl .. styles['statlow'] .. luc .. '\n|}' result = result .. table2hc .. styleh .. '|Exp' .. styleh .. '|Drop 1' .. styleh .. '|Drop 2' .. styleh if dropc and condition then result = result .. '|Conditional' else result = result .. '|Drop 3' end result = result .. '\n|-\n' .. styles['statlow'] .. xp .. styles['statlow'] .. drop1 .. styles['statlow'] .. drop2 .. styles['statlow'] if dropc and condition then result = result .. '' .. dropc .. ' '			else result = result .. drop3 end result = result .. cate1 .. gamegn if boss then result = result .. ' Bosses' .. cate2 else result = result .. ' Shadows' .. cate2 end elseif hp or mp then -- sub-persona result = result .. table2hc .. styleh .. '|' .. spanc .. 'Arcana ' .. styleh .. 'width=10%|Level' .. styleh .. 'title="HP bonus. Replenishes after battle." width=10%|HP +' .. styleh .. 'title="SP bonus. Replenishes after battle." width=10%|SP +' .. styleh .. '|Inherit' .. styleh .. '|' .. spanc .. 'Extract ' .. styleh .. '|' .. spanc .. 'Fragment\n|-\n' if not inherit then inherit = '-' end if not card then card = '-' end if not fragment then fragment = '-' end result = result .. styles['statlow'] .. getArcana(arcana) .. styles['statlow'] .. level .. styles['statlow'] .. hp .. styles['statlow'] .. mp .. styles['statlow'] .. inherit .. styles['statlow'] .. card .. styles['statlow'] .. fragment .. cate1 .. gamegn .. ' Personas' .. cate2 else -- main persona result = result .. table2hc .. styleh .. '|' .. spanc .. 'Arcana ' .. styleh .. 'width=10%|Level' .. styleh .. 'width=11.11% title="Strength"|St' .. styleh .. 'width=11.11% title="Magic"|Ma' .. styleh .. 'width=11.11% title="Endurance"|En' .. styleh .. 'width=11.11% title="Agility"|Ag' .. styleh .. 'width=11.11% title="Luck"|Lu\n|-\n' result = result .. styles['statlow'] .. getArcana(arcana) .. styles['statlow'] .. level .. styles['statlow'] .. str .. styles['statlow'] .. magic .. styles['statlow'] .. vit .. styles['statlow'] .. agl .. styles['statlow'] .. luc .. cate1 .. gamegn .. ' Personas' .. cate2 end result = result .. '\n|}' end if gameg == 'ddsaga1' or gameg == 'ddsaga2' then if not mp then mp = '-' end if not normal then normal = '-' end result = result .. table2hc .. styleh .. '|' .. spanc .. 'Race ' .. styleh .. '|Level' .. styleh .. '|HP' .. styleh .. '|MP' .. styleh .. '|Drops\n|-\n' .. styles['statlow'] .. getRace(race,gameg) .. styles['statlow'] .. level .. styles['statlow'] .. hp .. styles['statlow'] .. mp .. styles['statlow'] .. normal .. '\n|}' if boss then result = result .. cate1 .. gamegn .. ' Bosses' .. cate2 else result = result .. cate1 .. gamegn .. ' Demons' .. cate2 end end if gameg == 'desu1' or gameg == 'desu2' then result = result .. table2hc .. styleh .. '|' .. spanc .. 'Race ' .. styleh .. 'width=10%|Level' .. styleh .. 'width=10%|HP' .. styleh .. 'width=10%|MP' .. styleh .. 'width=10% title="Strength"|ST' .. styleh .. 'width=10% title="Magic"|MA' .. styleh .. 'width=10% title="Vitality"|VI' .. styleh .. 'width=10% title="Agility"|AG\n|-\n' .. styles['statlow'] .. getRace(race,gameg) .. styles['statlow'] .. level .. styles['statlow'] .. hp .. styles['statlow'] .. mp .. styles['statlow'] .. str .. styles['statlow'] .. magic .. styles['statlow'] .. vit .. styles['statlow'] .. agl .. '\n|}' if boss then if gameg == 'desu2' and game ~= 'desu2rb' then result = result .. cate1 .. gamegn .. ' Bosses' .. cate2 .. cate1 .. 'Devil Survivor 2 Record Breaker Bosses' .. cate2 else result = result .. cate1 .. gamen .. ' Bosses' .. cate2 end else if gameg == 'desu2' and game ~= 'desu2rb' then result = result .. cate1 .. gamegn .. ' Demons' .. cate2 .. cate1 .. 'Devil Survivor 2 Record Breaker Demons' .. cate2 else result = result .. cate1 .. gamen .. ' Demons' .. cate2 end end end if gameg == 'childred' or gameg == 'childblack' or gameg == 'childps' or gameg == 'childwhite' or gameg == 'childfire' or gameg == 'childice' or gameg == 'dk' or gameg == 'dmk' or gameg == 'childlight' or gameg == 'childdark' then result = result .. table2hc .. styleh .. '|Class' .. styleh .. '|Element' .. styleh .. '|' .. spanc .. 'Type' .. styleh .. '|Exp' .. styleh .. '|Level' .. styleh .. '|HP' .. styleh .. '|MP\n|-\n' .. styles['statlow'] .. class .. styles['statlow'] .. etype .. styles['statlow'] .. race .. styles['statlow'] .. xp .. styles['statlow'] .. level .. styles['statlow'] .. hp .. styles['statlow'] .. mp .. '\n|}' result = result .. table2hc .. styleh .. 'width=16.67% title="Attack Power"|ATK' .. styleh .. 'width=16.67% title="Defense"|DEF' .. styleh .. 'width=16.67% title="Magic"|MGC' .. styleh .. 'width=16.67% title="Resistance"|RES' .. styleh .. 'width=16.67% title="Speed"|SPD' .. styleh .. 'width=16.67% title="Luck"|LCK\n|-\n' .. styles['statlow'] .. atk .. styles['statlow'] .. def .. styles['statlow'] .. magic .. styles['statlow'] .. res .. styles['statlow'] .. agl .. styles['statlow'] .. luc .. '\n|}' if boss or race == 'Boss' then result = result .. cate1 .. gamen .. ' Bosses' .. cate2 else result = result .. cate1 .. gamegn .. ' Demons' .. cate2 end result = result .. cate1 .. race .. ' Type' .. cate2 end if gameg == 'childmessiah' then if not number then number = '-' end if not element then element = '-' end if not weak then weak = '-' end if not race then race = '-' end if not level then level = '-' end if not hp then hp = '-' end if not mp then mp = '-' end if not call then call = '-' end if not spell then spell = '-' else if not data.skills[spell] then spell = spell else spell = '' .. spell .. ' '			end end if not spell then spell = spell end result = result .. table2hc .. styleh .. '|Number' .. styleh .. '|Element' .. styleh .. '|Weakness' .. styleh .. '|Type' .. styleh .. '|Level' .. styleh .. '|HP' .. styleh .. '|MP\n|-' .. styles['statlow'] .. number .. styles['statlow'] .. element .. styles['statlow'] .. weak .. styles['statlow'] .. race .. styles['statlow'] .. level .. styles['statlow'] .. hp .. styles['statlow'] .. mp .. '\n|}' result = result .. table2hc .. styleh .. 'title="Attack"|ATK' .. styleh .. 'title="Magic"|MGC' .. styleh .. 'title="Defense"|DEF' .. styleh .. 'title="Resistance"|RES' .. styleh .. 'title="Speed"|SPD' .. styleh .. '|Quick' .. styleh .. '|Call' .. styleh .. '|Spell\n|-' .. styles['statlow'] .. atk .. styles['statlow'] .. magic .. styles['statlow'] .. def .. styles['statlow'] .. res .. styles['statlow'] .. agl .. styles['statlow'] .. quick .. styles['statlow'] .. call .. styles['statlow'] .. spell .. '\n|}' .. cate1 .. race .. ' Type' .. cate2 if race == 'Boss' then result = result .. cate1 .. 'Messiah Riser Bosses' .. cate2 else result = result .. cate1 .. 'Messiah Riser Demons' .. cate2 end end if gameg == 'smtsj' then if not noa then noa = '-' end if not phys then phys = '-' end if not gun then gun = '-' 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 expel then expel = '-' end if not curse then curse = '-' end if not alm then alm = '-' end if not poison then poison = '-' end if not paralyze then paralyze = '-' end if not stone then stone = '-' end if not strain then strain = '-' end if not sleep then sleep = '-' end if not charm then charm = '-' end if not mute then mute = '-' end if not fear then fear = '-' end if not bomb then bomb = '-' end if not rage then rage = '-' end result = result .. table2hc .. styleh .. '|Attack Type' .. styleh .. 'title="Physical"|' .. styleh .. 'title="Gun"|' .. styleh .. 'title="Fire"|' .. styleh .. 'title="Ice"|' .. styleh .. 'title="Electricity"|' .. styleh .. 'title="Wind"|' .. styleh .. 'title="Expel"|' .. styleh .. 'title="Curse"|' .. styleh .. 'title="Almighty"|\n|-\n' result = result .. styles['statlow'] .. noa .. styles['statlow'] .. phys .. styles['statlow'] .. gun .. styles['statlow'] .. fire .. styles['statlow'] .. ice .. styles['statlow'] .. elec .. styles['statlow'] .. wind .. styles['statlow'] .. expel .. styles['statlow'] .. curse .. styles['statlow'] .. alm .. '\n|}' result = result .. table2hc .. styleh .. '|Poison' .. styleh .. '|Paralyze' .. styleh .. '|Stone' .. styleh .. '|Strain' .. styleh .. '|Sleep' .. styleh .. '|Charm' .. styleh .. '|Mute' .. styleh .. '|Fear' .. styleh .. '|Bomb' .. styleh .. '|Rage\n|-\n' result = result .. styles['statlow'] .. poison .. styles['statlow'] .. paralyze .. styles['statlow'] .. stone .. styles['statlow'] .. strain .. styles['statlow'] .. sleep .. styles['statlow'] .. charm .. styles['statlow'] .. mute .. styles['statlow'] .. fear .. styles['statlow'] .. bomb .. styles['statlow'] .. rage .. '\n|}' end if gameg == 'smt4' then if not phys then phys = '-' end if not gun then gun = '-' end if not fire then fire = '-' end if not ice then ice = '-' end if not elec then elec = '-' end if not force then force = '-' end if not expel then expel = '-' end if not dark then dark = '-' end local styleh = '\n!style="background: ' .. getGames.games[gameg].colorbg2 .. ';color: ' .. getGames.games[gameg].font .. '" ' local statlow = '\n|style="background:' .. getGames.games[gameg].colorbg2 .. ';color:#000"|' result = result .. table2hc .. styleh .. 'title="Physical"| Phys' .. styleh .. 'title="Gun"| Gun' .. styleh .. 'title="Fire"| Fire' .. styleh .. 'title="Ice"| Ice' .. styleh .. 'title="Electricity"| Elec' .. styleh .. 'title="Force"| Force' .. styleh .. 'title="Light"| Light' .. styleh .. 'title="Dark"| Dark\n|-\n' .. statlow .. phys .. statlow .. gun .. statlow .. fire .. statlow .. ice .. statlow .. elec .. statlow .. force .. statlow .. expel .. statlow .. dark .. '\n|}' end if gameg == 'desu1' or gameg == 'desu2' then if not racial then racial = '-' end 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 force then force = '-' end if not mystic then mystic = '-' end if not mystic then mystic = '-' end result = result .. table2hc .. styleh .. '|Racial / Auto Skill' .. styleh .. 'width=12% title="Physical"| Phys' .. styleh .. 'width=12% title="Fire"| Fire' .. styleh .. 'width=12% title="Ice"| Ice' .. styleh .. 'width=12% title="Electricity"| Elec' .. styleh .. 'width=12% title="Force"| Force' .. styleh .. 'width=12% title=' if gameg == 'desu1' then result = result .. '"Mystic"| Mystic' elseif gameg == 'desu2' then result = result .. '"Curse"| Curse' end result = result .. '\n|-\n' .. styles['statlow'] .. racial .. styles['statlow'] .. phys .. styles['statlow'] .. fire .. styles['statlow'] .. ice .. styles['statlow'] .. elec .. styles['statlow'] .. force .. styles['statlow'] .. mystic .. '\n|}' end if gameg == 'p3' or gameg == 'p4' then if sword or strike or pierce or phys or fire or ice or elec or wind or expel or dark or alm or xp or yen then result = result .. table2hc if not sword then sword = '-' end if not strike then strike = '-' end if not pierce then pierce = '-' end 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 expel then expel = '-' 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' if gameg == 'p4' then result = result .. styleh .. '|EXP' .. styleh .. '|Yen' end result = result .. '\n|-\n' if gameg == 'p3' then result = result .. styles['statlow'] .. sword .. 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'] .. expel .. styles['statlow'] .. dark .. styles['statlow'] .. alm if gameg == 'p4' then result = result .. styles['statlow'] .. xp .. styles['statlow'] .. yen end result = result .. '\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' and (card or preturn) then result = result .. table2hc if card then result = result .. styleh .. 'width=100px|' .. spanc .. 'Skill Card ' .. styles['order'] .. '' .. card .. ' '		end if preturn then result = result .. styleh .. 'width=100px|' .. spanc .. 'Heart Item ' .. styles['order'] .. preturn end result = result .. '\n|}' end if (gameg == 'p2is' or gameg == 'p2ep') and (exclusive or traits or convo) then result = result .. table2hc if exclusive then result = result .. styleh .. 'width=90px|Exclusive to' .. styles['order'] .. exclusive end if traits then result = result .. styleh .. 'width=50px|' .. spanc .. 'Traits ' .. styles['order'] .. traits end if convo then result = result .. styleh .. 'width=50px|' .. spanc .. 'Ptalk ' .. styles['order'] .. convo end result = result .. '\n|}' end if (gameg == 'p2is' or gameg == 'p2ep') and profile then result = result .. table2b .. styles['quote'] .. '"|' .. mw.text.nowiki(profile) .. '\n|}'	end	result = result .. '\n|}\n'	if gameg == 'p1' and (onehand or twohand or spear or axe or whip or thrown or arrow or fist or handgun or machinegun or shotgun or rifle or tech or rush or fire or ice or wind or earth or elec or nuclear or blast or gravity or expel or miracle or death or curse or nerve or hiero) then		if not onehand then onehand = '-' end		if not twohand then twohand = '-' end		if not spear then spear = '-' end		if not axe then axe = '-' end		if not whip then whip = '-' end		if not thrown then thrown = '-' end		if not arrow then arrow = '-' end		if not fist then fist = '-' end		if not handgun then handgun = '-' end		if not machinegun then machinegun = '-' end		if not shotgun then shotgun = '-' end		if not rifle then rifle = '-' end		if not tech then tech = '-' end		if not rush then rush = '-' end		if not fire then fire = '-' end		if not ice then ice = '-' end if not wind then wind = '-' end if not earth then earth = '-' end if not elec then elec = '-' end if not nuclear then nuclear = '-' end if not blast then blast = '-' end if not gravity then gravity = '-' end if not expel then expel = '-' end if not miracle then miracle = '-' end if not death then death = '-' end if not curse then curse = '-' end if not nerve then nerve = '-' end if not hiero then hiero = '-' end result = result .. table2hc .. '\n!style="background:#a9a9a9" title="Weapons" colspan="8"|\n!title="Firearms" style="background:#898989" colspan="4"|\n!style="background:#a9a9a9" title="Havoc" colspan="2"|\n|-' .. styleh .. 'title="Weapons"|1h ' .. styleh .. 'title="Weapons"|2h ' .. styleh .. 'title="Weapons"|Sp ' .. styleh .. 'title="Weapons"|Ax ' .. styleh .. 'title="Weapons"|Wp ' .. styleh .. 'title="Weapons"|Th ' .. styleh .. 'title="Weapons"|<abbr title="Arrows">Ar ' .. styleh .. 'title="Weapons"|<abbr title="Fist">Fs ' .. styleh .. 'title="Firearms" style="background:#898989;width:7.12%"|<abbr title="Handgun">HG ' .. styleh .. 'title="Firearms" style="background:#898989;width:7.12%"|<abbr title="Machinegun">MG ' .. styleh .. 'title="Firearms" style="background:#898989;width:7.12%"|<abbr title="Shotgun">SG ' .. styleh .. 'title="Firearms" style="background:#898989;width:7.12%"|<abbr title="Rifle">Ri ' .. styleh .. 'title="Havoc"|<abbr title="Tech">Te ' .. styleh .. 'title="Havoc"|<abbr title="Rush">Ru \n|-\n' .. styles['statlow'] .. onehand .. styles['statlow'] .. twohand .. styles['statlow'] .. spear .. styles['statlow'] .. axe .. styles['statlow'] .. whip .. styles['statlow'] .. thrown .. styles['statlow'] .. arrow .. styles['statlow'] .. fist .. styles['statlow'] .. handgun .. styles['statlow'] .. machinegun .. styles['statlow'] .. shotgun .. styles['statlow'] .. rifle .. styles['statlow'] .. tech .. styles['statlow'] .. rush result = result .. '\n|-\n!style="background:#a9a9a9" title="Element" colspan="4"|\n!style="background:#898989" title="Force" colspan="4"|\n!style="background:#a9a9a9" title="Light" colspan="2"|\n!style="background:#898989" title="Dark" colspan="3"|\n!style="background:#a9a9a9" title="Special" colspan="1"|\n|-' .. styleh .. 'width="7.12%" title="Element"|<abbr title="Fire">Fi ' .. styleh .. 'width="7.12%" title="Element"|<abbr title="Ice">Ic ' .. styleh .. 'width="7.12%" title="Element"|<abbr title="Wind">Wi ' .. styleh .. 'width="7.12%" title="Element"|<abbr title="Earth">Er ' .. styleh .. 'style="background:#898989;width:7.12%" title="Force"|<abbr title="Electricity">El ' .. styleh .. 'style="background:#898989;width:7.12%" title="Force"|<abbr title="Nuclear">Nc ' .. styleh .. 'style="background:#898989;width:7.12%" title="Force"|<abbr title="Blast">Bl ' .. styleh .. 'style="background:#898989;width:7.12%" title="Force"|<abbr title="Gravity">Gr ' .. styleh .. 'title="Light"|<abbr title="Expel">Ex ' .. styleh .. 'title="Light"|<abbr title="Miracle">Mi ' .. styleh .. 'style="background:#898989" title="Dark"|<abbr title="Death">De ' .. styleh .. 'style="background:#898989" title="Dark"|<abbr title="Curse">Cu ' .. styleh .. 'style="background:#898989;width:7.12%" title="Dark (Ailments)"|<abbr title="Nerve">Nr ' .. styleh .. 'width="7.12%" title="Special"|<abbr title="Resistance to Hieroglyphein">??? \n|-\n' .. styles['statlow'] .. fire .. styles['statlow'] .. ice .. styles['statlow'] .. wind .. styles['statlow'] .. earth .. styles['statlow'] .. elec .. styles['statlow'] .. nuclear .. styles['statlow'] .. blast .. styles['statlow'] .. gravity .. styles['statlow'] .. expel .. styles['statlow'] .. miracle .. styles['statlow'] .. death .. styles['statlow'] .. curse .. styles['statlow'] .. nerve .. styles['statlow'] .. hiero .. '\n|}' end if (gameg == 'p2is' or gameg == 'p2ep') and (hp or sp or atk or def or matk or mdef or str or vit or dex or agl or luc) then result = result .. table2hc local styleh = styleh .. 'width=10% ' local st = styleh .. 'title="Strength"|' local vi = styleh .. 'title="Vitality"|' local dx = styleh .. 'title="'		local ag = styleh .. 'title="Agility"|'		local lu = styleh .. 'title="Luck"|'		if gameg == 'p2is' then			st = st .. 'St'			vi = vi .. 'Vi'			dx = dx .. 'Dexterity"|Dx' ag = ag .. 'Ag' lu = lu .. 'Lu' elseif gameg == 'p2ep' then st = st .. 'STR' vi = vi .. 'VIT' dx = dx .. 'Technicality"|TEC'			ag = ag .. 'AGI'			lu = lu .. 'LUC'		end		local c1h = styleh .. '|'		if enemy or boss then c1h = c1h .. 'HP' else c1h = c1h .. 'SP cost' end		result = result .. c1h .. styleh .. 'title="Physical Attack Power"|Atk' .. styleh .. 'title="Physical Defense"|Def' .. styleh .. 'title="Magical Power"|Matk' .. styleh .. 'title="Magical Defense"|Mdef' .. st .. vi .. dx .. ag .. lu .. '\n|-\n'		local c1d = styles['statlow']		if enemy or boss then c1d = c1d .. hp else c1d = c1d .. mp end		result = result .. c1d .. styles['statlow'] .. atk .. styles['statlow'] .. def .. styles['statlow'] .. matk .. styles['statlow'] .. mdef .. styles['statlow'] .. str .. styles['statlow'] .. vit .. styles['statlow'] .. dex .. styles['statlow'] .. agl .. styles['statlow'] .. luc .. '\n|}'	end	if (gameg == 'smt3' or gameg == 'sh' or gameg == 'p2is' or gameg == 'p2ep' or gameg == 'pq' or gameg == 'ddsaga1' or gameg == 'ddsaga2') and (resist or block or absorb or reflect or weak or boost or wild) then result = result .. table2hc 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 .. '|Resists' .. styleh .. '|Block' .. styleh .. '|Absorbs' .. styleh .. '|Reflects' .. styleh .. '|Weak' if boost then result = result .. styleh .. '|Boost' elseif wild then result = result .. styleh .. '|Wild Effect' end result = result .. '\n|-\n' .. styles['statlow'] .. resist .. styles['statlow'] .. block .. styles['statlow'] .. absorb .. styles['statlow'] .. reflect .. styles['statlow'] .. weak if boost then result = result .. styles['statlow'] .. boost elseif wild then result = result .. styles['statlow'] .. wild end result = result .. '\n|}' end if (gameg == 'p2is' or gameg == 'p2ep') and (sword or ranged or strike or thrown or rush or fire or water or wind or earth or ice or elec or nuclear or expel or dark or alm or nerve or mind) then result = result .. table2hc if not sword then sword = '-' end if not ranged then ranged = '-' end if not strike then strike = '-' end if not thrown then thrown = '-' end if not rush then rush = '-' end if not fire then fire = '-' end if not water then water = '-' end if not wind then wind = '-' end if not earth then earth = '-' end if not ice then ice = '-' end if not elec then elec = '-' end if not nuclear then nuclear = '-' end if not expel then expel = '-' end if not dark then dark = '-' end if not alm then alm = '-' end if not nerve then nerve = '-' end if not mind then mind = '-' end local Fi, Wt, Wi, Er		if etype == 'Fire' then Fi = ' Fi ' else Fi = 'Fi' end if etype == 'Water' then Wt = ' Wt ' else Wt = 'Wt' end if etype == 'Wind' then Wi = ' Wi ' else Wi = 'Wi' end if etype == 'Earth' then Er = ' Er ' else Er = 'Er' end result = result .. styleh .. 'title="Sword"|Sw' .. styleh .. 'title="Ranged"|Rn' .. styleh .. 'title="Strike"|Sk' .. styleh .. 'title="Thrown"|Th' .. styleh .. 'title="Havoc"|Hv' .. styleh .. 'style="background:#8E283D" title="Fire"|' .. Fi .. styleh .. 'style="background:#8E283D" title="Water"|' .. Wt .. styleh .. 'style="background:#8E283D" title="Wind"|' .. Wi .. styleh .. 'style="background:#8E283D" title="Earth"|' .. Er .. styleh .. 'title="Ice"|Ic' .. styleh .. 'title="Electricity"|El' .. styleh .. 'title="Nuclear"|Nc' .. styleh .. 'title="Light"|Li' .. styleh .. 'title="Dark"|Dk' .. styleh .. 'title="Almighty"|Al' .. styleh .. 'title="Nerve"|Nr' .. styleh .. 'title="Mind"|Mn\n|-\n' result = result .. styles['statlow'] .. sword .. styles['statlow'] .. ranged .. styles['statlow'] .. strike .. styles['statlow'] .. thrown .. styles['statlow'] .. rush .. styles['statlow'] .. fire .. styles['statlow'] .. water .. styles['statlow'] .. wind .. styles['statlow'] .. earth .. styles['statlow'] .. ice .. styles['statlow'] .. elec .. styles['statlow'] .. nuclear .. styles['statlow'] .. expel .. styles['statlow'] .. dark .. styles['statlow'] .. alm .. styles['statlow'] .. nerve .. styles['statlow'] .. mind .. '\n|}' end if gameg == 'pq' and (sword or pierce or strike or fire or water or elec or wind or expel or dark or alm or ko or sleep or panic or poison or paralyze or down or stbind or mabind or agbind) then result = result .. table2hc if not sword then sword = '-' end if not pierce then pierce = '-' end if not strike then strike = '-' 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 expel then expel = '-' end if not dark then dark = '-' end if not alm then alm = '-' end if not sleep then sleep = '-' end if not panic then panic = '-' end if not poison then poison = '-' end if not curse then curse = '-' end if not paralyze then paralyze = '-' end if not stbind then stbind = '-' end if not mabind then mabind = '-' end if not agbind then agbind = '-' end if not down then down = '-' end if not ko then ko = '-' end result = result .. styleh .. '|Cut' .. styleh .. '|Stab' .. styleh .. '|Bash' .. styleh .. '|Fire' .. styleh .. '|Ice' .. styleh .. 'title="Electricity"|Elec' .. styleh .. '|Wind' .. styleh .. '|Light' .. styleh .. '|Dark' .. styleh .. 'title="Almighty"|Alm\n|-\n' .. styles['statlow'] .. sword .. styles['statlow'] .. pierce .. styles['statlow'] .. strike .. styles['statlow'] .. fire .. styles['statlow'] .. ice .. styles['statlow'] .. elec .. styles['statlow'] .. wind .. styles['statlow'] .. expel .. styles['statlow'] .. dark .. styles['statlow'] .. alm .. '\n|}' result = result .. table2hc .. styleh .. '|Sleep' .. styleh .. '|Panic' .. styleh .. '|Poison' .. styleh .. '|Curse' .. styleh .. '|Paralysis' .. styleh .. 'title="Strength Bind"|St Bind' .. styleh .. 'title="Magic Bind"|Ma Bind' .. styleh .. 'title="Agility Bind"|Ag Bind' .. styleh .. '|Down' .. styleh .. 'title="Instant Kill"|KO\n|-' .. styles['statlow'] .. sleep .. styles['statlow'] .. panic .. styles['statlow'] .. poison .. styles['statlow'] .. curse .. styles['statlow'] .. paralyze .. styles['statlow'] .. stbind .. styles['statlow'] .. mabind .. styles['statlow'] .. agbind .. styles['statlow'] .. down .. styles['statlow'] .. ko .. '\n|}' end if gameg == 'p2is' or gameg == 'p2ep' then if card or material or type1 or type2 or type3 then result = result .. table2hc .. styleh .. 'colspan=4|Summon Information\n|-' if material then result = result .. styles['skill'] .. '' .. spanc .. 'Material Card ' .. styles['effect1'] .. ' ' .. material .. ' Card' end if card then result = result .. styles['skillc'] .. '' .. spanc .. 'Tarot Cards ' .. styles['effect1'] .. ' ' .. card .. ' ' .. arcana .. ' Cards' end local effect1 if material then effect1 = '\n|colspan=3 style="background:#222;text-align:left"|' else effect1 = styles['effect1'] end if type1 then result = result .. styles['skill'] .. type1 .. effect1 .. desc1 end if type2 then result = result .. styles['skill'] .. type2 .. effect1 .. desc2 end if type3 then result = result .. styles['skill'] .. type3 .. effect1 .. desc3 end result = result .. '\n|}' end end if skills then result = result .. table2hc if game == 'mt1' or game == 'mt2' or game == 'kmt1' or game == 'kmt2' then result = result .. styleh .. 'colspan=4|' .. spanc .. 'List of Spells ' elseif 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 == 'smtsj' then			result = result .. styleh .. 'colspan=3|' .. spanc .. 'Natural 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 == 'smt4' and guest == '2') or ((gameg == 'p3' or gameg == 'p4') and hp) or gameg == 'ddsaga1' or gameg == 'ddsaga2' or (gameg == 'pq' and xp) 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 == 'giten' or gameg == 'smtsj' or gameg == 'smtds' or gameg == 'sh' or gameg == 'childred' or gameg == 'childblack' or gameg == 'childps' or gameg == 'childblack' or gameg == 'childwhite' or gameg == 'childfire' or gameg == 'childice' 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 = styles['skill3'] .. '"|' .. v					else						if skill.name then v = skill.name end						skillcell = styles['skill3'] .. '" title="Cost: ' .. skill.cost .. '; ' .. string.gsub(string.gsub(skill.effect, '%[%[', ), '%]%]', ) .. '"|' .. v					end if (k == 7) then result = result .. '\n|-' .. styles['skill3m'] .. skillcell .. styles['skill3m'] 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' if not (gameg == 'smt4' and guest == '1') then result = result .. styles['skillc'] .. 'Cost' .. styles['skillc'] .. 'Effect' .. styles['skillc'] .. 'Level' else result = result .. styles['skillc'] .. 'Effect' .. styles['skillc'] .. 'Level' end 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 = '<abbr title="Active conversational skill without HP or MP cost. Ineffective to Corpus, Haunt, Wilder, Foul, Light-tendency demons, bosses and all enemies in Labyrinth of Amala.">Convo ' elseif skill.cost == 'Interrupt' then cost = '<abbr title="Interruption skill is only triggered when certain conversational effect occurs.">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 if not (gameg == 'smt4' and guest == '1') then result = result .. skillcell .. cost .. effect else result = result .. skillcell .. effect end 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 <abbr title="Persona 3 and FES only; Portable uses items and does not require the participating personas to be in stock">* ' .. 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 if gameg == 'smtsj' then result = result .. table2hc .. styleh .. 'colspan=3|D-Source Skills' else result = result .. table2hc .. styleh .. 'colspan=3|' .. spanc .. 'Passive Skills ' end 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 = styles['skill3'] .. '"|' .. v			else				if skill.name then v = skill.name end				skillcell = styles['skill3'] .. '" 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 if gameg == 'smtsj' then result = result .. table2hc .. styleh .. 'colspan=3|Item Drops' else result = result .. table2hc .. styleh .. 'colspan=3|List of Auction Skills' end 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 = styles['skill3'] .. '"|' .. v				else					if skill.name then v = skill.name end					skillcell = styles['skill3'] .. '" 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 = styles['skill3'] .. '"|' .. v				else					if skill.name then v = skill.name end					skillcell = styles['skill3'] .. '" 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 if gameg == 'p2ep' and unknown then result = result .. table2hc .. styleh .. 'colspan="2"|' .. spanc .. 'Unknown Power ' .. styles['skill'] if unknown == 'attack type' or unknown == 'attack-type' or unknown == 'attack' or unknown == 'Attack' or unknown == 'Attack-type' or unknown == 'Attack-Type' then result = result .. 'Attack Type' .. styles['cost1'] .. 'Deals <abbr title="Equipper has ' .. "'Great'" .. ' affinity with the Persona">500 or <abbr title="Equipper has ' .. "'Good'" .. ' affinity with the Persona">250 non-elemental damage to all enemies.' elseif unknown == 'defense type' or unknown == 'defense-type' or unknown == 'defense' or unknown == 'Defense' or unknown == 'Defense-type' or unknown == 'Defense-Type' then result = result .. 'Defense Type' .. styles['cost1'] .. '<abbr title="Equipper has ' .. "'Great'" .. ' affinity with the Persona">Reflects or <abbr title="Equipper has ' .. "'Good'" .. ' affinity with the Persona">nullifies the incoming attack.' elseif unknown == 'assist type' or unknown == 'assist-type' or unknown == 'assist' or unknown == 'Assist' or unknown == 'Assist-type' or unknown == 'Assist-Type' then result = result .. 'Assist Type' .. styles['cost1'] .. 'Bestows Tarukaja + Makakaja <abbr title="Only applicable when the equipper has ' .. "'Great'" .. ' affinity with the Persona">(or Rakukaja + Samakaja in addition) ' elseif unknown == 'recovery type' or unknown == 'recovery-type' or unknown == 'recovery' or unknown == 'Recovery' or unknown == 'Recovery-type' or unknown == 'Recovery-Type' then result = result .. 'Recovery Type' .. styles['cost1'] .. 'Fully recovers HP <abbr title="Only applicable when the equipper has ' .. "'Great'" .. ' affinity with the Persona">(or removes ailment in addition) .' elseif unknown == 'revival type' or unknown == 'revival-type' or unknown == 'revival' or unknown == 'Revival' or unknown == 'Revival-type' or unknown == 'Revival-Type' then result = result .. 'Revival Type' .. styles['cost1'] .. 'Revives from unconscious with <abbr title="Equipper has ' .. "'Great'" .. ' affinity with the Persona">full or <abbr title="Equipper has ' .. "'Good'" .. ' affinity with the Persona">1/4 HP.' elseif unknown == 'special type' or unknown == 'special-type' or unknown == 'special' or unknown == 'Special' or unknown == 'Special-type' or unknown == 'Special-Type' then result = result .. 'Special Type' .. styles['cost1'] .. 'Eliminates all enemies when the user is unconscious.' end result = result .. '\n|}' end if (game == 'desu1' or game == 'desu2') and (quote or profile) then result = result .. table2hc if quote then result = result .. styles['quote'] .. 'font-style:italic"|' .. string.gsub(quote, '!!', '‼') end		if profile then result = result .. '\n|-' .. styles['quote'] .. 'font-style:italic"|' .. string.gsub(profile, '!!', '‼') end result = result .. '\n|}' end if game == 'smtsj' and profile then result = result .. table2hc .. styleh .. '|Password' .. styles['quote'] .. 'font-weight:bold;font-family:Courier New,sans-serif;font-size:1.6em"|' .. profile .. '\n|}' end	result = result .. '\n|}'	return result end return p -- --