Documentation for this module may be created at Module:StyleClass/Data/doc
--[[Category:Lua modules]]
-- Has CSS-related data.
--<nowiki>
local p = {}
Utils = require('Module:Utils')
MiscData = require('Module:MiscData')
-- Relates in-game values to CSS classes.
p.attrToClass = {
[1] = "charAttrSlash",
[2] = "charAttrBlunt",
[3] = "charAttrPierce",
[4] = "charAttrMagic",
}
p.rarityToClass = {
[2] = "charRarity2",
[3] = "charRarity3",
[4] = "charRarity4",
[5] = "charRarity5",
[6] = "charRarity6",
e = "charRarityEvent",
o = "charRarityOther",
}
p.tierToClass = {
[1] = "charTier1",
[2] = "charTier2",
[3] = "charTier3",
[4] = "charTier4",
}
p.nationToClass = {
[1] = "charNationWR",
[2] = "charNationBO",
[3] = "charNationBH",
[4] = "charNationBV",
[5] = "charNationLW",
[7] = "charNationLL",
[8] = "charNationAL",
}
-- These are super-short characters for categorizing each skill type.
-- The keys are intended to be the output of the JSON -> character table.
-- Otherwise, the values are the CSS classes which we'd be using for the skills.
p.skillAbbrToClass = {
['?'] = 'charSkUNKNOWN',
['1'] = 'charSkOneTarget',
['2'] = 'charSkTwoTarget',
['3'] = 'charSkAllTarget',
['m'] = 'charSkMultTarget',
['d'] = 'charSkDrain',
['a'] = 'charSkAffection',
['r'] = 'charSkRemainEnemyDmg',
-- Cuz 3 + 1 targets = 4... Meh.
['4'] = 'charSkMultToAllTarget',
-- For Kirutansasu
['k'] = 'charSkAffDrain',
}
-- Skill type 108 can vary. Pass the skill's val1 to this list.
p.skillFlags108 = {
[1] = '1',
[2] = '2',
[3] = '3',
[4] = '3',
}
-- Affiliates base skill Ids to skillAbbrToClass
p.skillBaseIdToAbbr = {
[101] = '1',
[103] = 'd',
[104] = '3',
[107] = 'm',
[108] = p.skillFlags108, -- This is a TABLE.
[109] = 'a',
[110] = 'k',
[111] = '4',
[112] = 'r',
}
-- These are JSON tables that map shorthand words to CSS classes.
p.attrAcronymToClassJSON = Utils.tableToJSON(p.attrToClass)
p.rarityAcronymToClassJSON = Utils.tableToJSON(p.rarityToClass)
p.tierAcronymToClassJSON = Utils.tableToJSON(p.tierToClass)
p.nationAcronymToClassJSON = Utils.tableToJSON(p.nationToClass)
return p
--</nowiki>