Module:Skill List/Header: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 7: Line 7:
local exampleSkill = args[2]:lower()
local exampleSkill = args[2]:lower()
local getSkill = require('Module:Data/Skill/' .. game)
local getSkill = require('Module:Data/Skill/' .. game)
local possibleColumns = {
local columnIds = { "name", "rpname", "battlename", "skilltype", "damagetype", "cost", "powerlvl", "target", "range", "hit", "power", "crit", "acc", "rank", "description", "rpdescription", "effect" }
name = "Name",
local columnLabels = {
rpname = frame:expandTemplate{ title = "tt", args = { "RP Name", "''Revelations: Persona'' Name" } },
"Name",
battlename = "Battle Name",
frame:expandTemplate{ title = "tt", args = { "RP Name", "''Revelations: Persona'' Name" } },
skilltype = frame:expandTemplate{ title = "tt", args = { "S. Type", "Skill Type" } },
"Battle Name",
damagetype = frame:expandTemplate{ title = "tt", args = { "D. Type", "Damage Type" } },
frame:expandTemplate{ title = "tt", args = { "S. Type", "Skill Type" } },
cost = "Cost",
frame:expandTemplate{ title = "tt", args = { "D. Type", "Damage Type" } },
powerlvl = frame:expandTemplate{ title = "tt", args = { "P. Level", "Power Level" } },
"Cost",
target = "Target",
frame:expandTemplate{ title = "tt", args = { "P. Level", "Power Level" } },
range = "Range",
"Target",
hit = "Hits",
"Range",
power = frame:expandTemplate{ title = "tt", args = { "B. Power", "Base Power" } },
"Hits",
crit = frame:expandTemplate{ title = "tt", args = { "C. Rate", "Critical Hit Rate" } },
frame:expandTemplate{ title = "tt", args = { "B. Power", "Base Power" } },
acc = "Accuracy",
frame:expandTemplate{ title = "tt", args = { "C. Rate", "Critical Hit Rate" } },
rank = "Rank",
"Accuracy",
description = "Description",
"Rank",
rpdescription = frame:expandTemplate{ title = "tt", args = { "RP Description", "''Revelations: Persona'' Description" } },
"Description",
effect = "Effect"
frame:expandTemplate{ title = "tt", args = { "RP Description", "''Revelations: Persona'' Description" } },
"Effect"
}
}
local usedColumns = ""
local usedColumns = ""
for columnId, columnLabel in pairs(possibleColumns) do
for i, columnId in ipairs(columnIds) do
if getSkill.skill[exampleSkill][columnId] then
if getSkill.skill[exampleSkill][columnId] then
usedColumns = usedColumns .. "! " .. columnLabel .. "\n"
usedColumns = usedColumns .. "! " .. columnLabels[i] .. "\n"
end
end
end
end

Navigation menu