Module:Skills

local p = {} local function getFrame local pframe = frame:getParent local config = frame.args local args = pframe.args return pframe, config, args end local styles = { ['skill'] = '\n|-\n!style="background:#000; color:#fff;"|', ['skillc'] = '\n!style="background:#000; color:#fff;"|', ['cost2'] = '\n|style="background:#282828"|', ['effect1'] = '\n|style="text-align:left"|', ['effect2'] = '\n|style="background:#282828;text-align:left"|', ['effect1p'] = '\n|colspan=2 style="text-align:left"|', ['effect2p'] = '\n|colspan=2 style="background:#282828;text-align:left"|', ['order'] = '\n|style="background:#000;text-align:left"|', } local p,q={},{} function p.row( frame ) local getFrame local row = frame.args[1] local game = frame.args[2] local code = frame.args[3] if not code or code ==  then return  end local level = frame.args[4] 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 'Invalid parameter 3 of ' .. '"' .. code .. '". You may correct the skill name or modify module:Skills/' .. game .. ' if needed. '		end end if skill.name then code = skill.name end local skillcell = string.format(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 = string.format(styles['cost2']) .. cost local effect1 = string.format(styles['effect1']) .. skill.effect local effect2 = string.format(styles['effect2']) .. skill.effect local order = string.format(styles['order']) .. skill.cost local element1, element2 if skill.element then element1 = '\n||' .. skill.element or '' element2 = string.format(styles['cost2']) .. skill.element or '' end local level1, level2 if level then level1 = '\n||' .. level or '' level2 = string.format(styles['cost2']) .. level or '' elseif skill.pre then level1 = '\n||' .. skill.pre level2 = string.format(styles['cost2']) .. skill.pre end if row == 'r01' then return skillcell .. effect1 -- Odd number row for enemy whose skill cost is irrelevant. elseif row == 'r02' then return skillcell .. effect2 -- Even number row for enemy whose skill cost is irrelevant. elseif row == 'r11' then if game == 'SMT3' and skill.phy then return skillcell .. string.format(styles['effect1p']) .. skill.effect -- Odd number row for enemy whose physical skills cost no HP. else return 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 return skillcell .. string.format(styles['effect2p']) .. skill.effect -- Even number row for enemy whose physical skills cost no HP. else return skillcell .. cost2 .. effect2 -- Even number row for demon which does not learn new skill on level gain. end return skillcell .. cost2 .. effect2 -- Even number row for demon which does not learn new skill on level gain. elseif row == 'r21' then return skillcell .. cost1 .. effect1 .. level1 -- Odd number row for demon/persona which learn new skill on level gain. elseif row == 'r22' then return skillcell .. cost2 .. effect2 .. level2 -- Even number row for demon/persona which learn new skill on level gain. elseif row == 'r31' then return skillcell .. effect1 .. level1 -- Odd number row for guest who learn new skill on level gain. elseif row == 'r32' then return skillcell .. effect2 .. level2 -- Even number row for guest who learn new skill on level gain. elseif row == 'p12' then return string.format(styles['skill']) .. level .. string.format(styles['skillc']) .. code .. effect1 -- Row for Persona 1 and 2 persona elseif row == 'rf' then return skillcell .. effect1 .. order -- Row for Persona-specific fusion spell. elseif row == 'dk1' then return skillcell .. element1 .. cost1 .. effect1 -- Odd number row for DemiKids stats skill list. elseif row == 'dk2' then return skillcell .. element2 .. cost2 .. effect2 -- Odd number row for DemiKids stats skill list. elseif row == 'dkc1' then return skillcell .. level1 .. element1 .. cost1 .. effect1 -- Odd number row for DemiKids stats combo skill list. elseif row == 'dkc2' then return skillcell .. level2 .. element2 .. cost2 .. effect2 -- Odd number row for DemiKids stats combo skill list. else return 'Invalid parameter 1 of ' .. '"' .. row .. '". '	end end return p --