2023年政策修订增补工作正在进行中,欢迎参与!
Module:FGOData
跳转到导航
跳转到搜索
本模块记录了Fate/Grand Order的一些通用游戏数据。不直接用于任何模板,而是作为其他数据模块的require包。
-- Originally designed and coded by Maya (U:MJH)
local FGOData = {}
-- Start general utilities
FGOData.getFromDefaultedTable = function (tbl, i)
if tbl then return tbl[i] or tbl[-1] else return end
end
FGOData.getFromDefaultedTable2d = function (tbl, i, j)
return FGOData.getFromDefaultedTable(tbl[i], j) or
FGOData.getFromDefaultedTable(tbl[-1], j)
end
-- Might reconstruct this into something recursive if I need to
FGOData.getGetGeneralStyle = function (vfunc)
local innerFunc = function (v)
if (tonumber(v)) then
v = tonumber(v)
if vfunc then vcomp = vfunc(v) else vcomp = v end
if vcomp == 1 then
return ''
elseif vcomp < 1 then
return 'style="background:rgb(' ..
math.floor(255 - 153 * (1 - vcomp)) .. ',' ..
math.floor(255 - 51 * (1 - vcomp)) ..
',255)" |'
else
return 'style="background:rgb(255,' ..
math.floor(255 - 102 * (vcomp - 1)) .. ',' ..
math.floor(255 - 102 * (vcomp - 1)) ..
')" |'
end
else
return 'style="background:#CCC" |'
end
end
return innerFunc
end
-- End general utilities
-- Start hidden alignment dependent data
FGOData.hiddenAlignNamesChinese = {
[1] = '天',
[2] = '地',
[3] = '人',
[4] = '星',
[5] = '兽'
}
FGOData.hiddenAlignMultFromTo = {
[-1] = { [-1] = 1.0 },
[1] = { [2] = 1.1, [3] = 0.9 },
[2] = { [1] = 0.9, [3] = 1.1 },
[3] = { [1] = 1.1, [2] = 0.9 },
[4] = { [5] = 1.1 },
[5] = { [4] = 1.1 }
}
FGOData.getHiddenAlignMultStyle = FGOData.getGetGeneralStyle(function(v) return 1 + 5 * (v - 1) end)
-- End hidden alignment dependent data
-- Start class dependent data
FGOData.classKeys = {1,2,3,4,5,6,7,10,11,12,14,13,15,16,17,101,102,103,104,105,106,107,108,109,110,111,112}
FGOData.classNames = {
[1] = 'Saber',
[2] = 'Archer',
[3] = 'Lancer',
[4] = 'Rider',
[5] = 'Caster',
[6] = 'Assassin',
[7] = 'Berserker',
[10] = 'Shielder',
[11] = 'Ruler',
[12] = 'Avenger',
[13] = 'Alterego',
[14] = 'MoonCancer',
[15] = 'Foreigner',
[16] = 'Pretender',
[17] = 'Beast', -- 所多玛之兽/德拉科
[101] = 'BeastⅠ',
[102] = 'BeastⅡ',
[103] = 'BeastⅢ/R', -- 杀生院祈荒、失落之人(黑A)
[104] = 'BeastⅢ/L',
[105] = 'BeastⅣ', -- 玩赏之兽、BeastⅣ:L
[106] = 'UOlgaMarieAlienGod', -- U-奥尔加玛丽(兽阶图标)
[107] = 'UOlgaMarie', -- U-奥尔加玛丽(彩虹问号图标)
[108] = 'BeastⅠLost', -- 卡玛佐茨
[109] = 'BeastⅥ', -- ?
[110] = 'BeastⅥBoss', -- 魔兽赫
[111] = 'UOlgaMarieFlare', -- 火之玛丽
[112] = 'UOlgaMarieAqua', -- 水之玛丽
[200] = 'BeastIcon' -- only for icon, not for tables
}
FGOData.classNamesInverse = {
['Saber'] = 1,
['Archer'] = 2,
['Lancer'] = 3,
['Rider'] = 4,
['Caster'] = 5,
['Assassin'] = 6,
['Berserker'] = 7,
['Shielder'] = 10,
['Ruler'] = 11,
['Avenger'] = 12,
['Alterego'] = 13,
['MoonCancer'] = 14,
['Foreigner'] = 15,
['Pretender'] = 16,
['Beast'] = 17,
['BeastⅠ'] = 101,
['BeastⅡ'] = 102,
['BeastⅢ/R'] = 103,
['BeastⅢ/L'] = 104,
['BeastⅣ'] = 105,
['UOlgaMarieAlienGod'] = 106,
['UOlgaMarie'] = 107,
['BeastⅠLost'] = 108,
['BeastⅥ'] = 109,
['BeastⅥBoss'] = 110,
['UOlgaMarieFlare'] = 111,
['UOlgaMarieAqua'] = 112,
['BeastIcon'] = 200
}
FGOData.classNamesDisplay = { -- 为了解决重名,需要将内部命名与外部显示分开
[106] = 'Beast?',
[107] = 'Unknown',
[108] = 'Beast<del>Ⅰ</del>',
[110] = 'BeastⅥ',
[111] = 'Beast?',
[112] = 'Beast?',
[200] = 'Beast' -- only for icon, not for tables
}
FGOData.classNamesInfo = { -- 说明文本
[-1] = '',
[106] = '(U-奥尔加玛丽)',
[107] = '(U-奥尔加玛丽)',
[110] = '(魔兽赫)',
[111] = '恒热'.. mw.getCurrentFrame():expandTemplate{ title = 'ruby', args = {'遗分体','异闻带'} },
[112] = '零潮'.. mw.getCurrentFrame():expandTemplate{ title = 'ruby', args = {'遗分体','异闻带'} }
}
FGOData.classNamesJapanese = {
[1] = 'セイバー',
[2] = 'アーチャー',
[3] = 'ランサー',
[4] = 'ライダー',
[5] = 'キャスター',
[6] = 'アサシン',
[7] = 'バーサーカー',
[10] = 'シールダー',
[11] = 'ルーラー',
[12] = 'アヴェンジャー',
[13] = 'アルターエゴ',
[14] = 'ムーンキャンサー',
[15] = 'フォーリナー',
[16] = 'プリテンダー',
[17] = 'ビースト',
[101] = 'ビーストⅠ',
[102] = 'ビーストⅡ',
[103] = 'ビーストⅢ/R',
[104] = 'ビーストⅢ/L',
[105] = 'ビーストⅣ',
[106] = 'ビースト?(U-オルガマリー)',
[107] = '?(U-オルガマリー)',
[108] = 'ビースト<del>Ⅰ</del>',
[109] = 'ビーストⅥ',
[110] = 'ビーストⅥ(魔獣赫)',
[111] = 'フレアマリー',
[112] = 'アクアマリー',
[200] = 'ビースト'
}
FGOData.classNamesChinese = {
[1] = '剑士',
[2] = '弓兵',
[3] = '枪兵',
[4] = '骑兵',
[5] = '魔术师',
[6] = '暗匿者',
[7] = '狂战士',
[10] = '盾兵',
[11] = '裁定者',
[12] = '复仇者',
[13] = '他人格',
[14] = '月之癌',
[15] = '降临者',
[16] = '身披角色者',
[17] = '兽',
[101] = '兽Ⅰ',
[102] = '兽Ⅱ',
[103] = '兽Ⅲ/R',
[104] = '兽Ⅲ/L',
[105] = '兽Ⅳ',
[106] = '兽?',
[107] = '未知',
[108] = '兽<del>Ⅰ</del>',
[109] = '兽Ⅵ',
[110] = '兽Ⅵ',
[111] = '兽?',
[112] = '兽?',
[200] = '兽'
}
FGOData.classLinks = {
[-1] = '境界记录带',
[1] = 'Saber(Fate)',
[2] = 'Archer',
[3] = 'Lancer(Fate)',
[4] = 'Rider',
[5] = 'Caster',
[6] = 'Assassin',
[7] = 'Berserker',
[10] = 'Shielder',
[11] = 'Ruler(Fate)',
[12] = 'Avenger',
[13] = 'Alterego',
[14] = 'MoonCancer',
[15] = 'Foreigner',
[16] = 'Pretender(Fate)',
[17] = '人类恶',
[101] = '盖提亚(Fate)',
[102] = '提亚马特(Fate)',
[103] = '杀生院祈荒',
[104] = '迦摩',
[105] = '高扬斯卡娅',
[106] = '异星之神',
[107] = '异星之神',
[108] = '卡玛佐茨',
[109] = '尼禄·克劳狄乌斯(Fate)#所多玛之兽/德拉科',
[110] = '魔兽赫',
[111] = 'E-奥尔加玛丽',
[112] = 'E-奥尔加玛丽',
[200] = '人类恶'
}
FGOData.classCardTabTitles = {
[-1] = {'金卡背', '银卡背', '铜卡背'},
[12] = {'金卡背', '银卡背', '铜卡背', '黑卡背'},
[14] = {'金卡背', '银卡背', '铜卡背', '杀生院祈荒', 'Archetype: Earth'},
[101] = {},
[102] = {},
[103] = {},
[104] = {},
[105] = {},
[106] = {},
[107] = {},
[108] = {},
[109] = {},
[110] = {},
[111] = {},
[112] = {}
}
FGOData.classCardFilenameSuffixes = {
[-1] = {'金卡背', '银卡背', '铜卡背'},
[12] = {'金卡背', '银卡背', '铜卡背', '黑卡背'},
[14] = {'金卡背', '银卡背', '铜卡背', '(杀生院祈荒)', '(ArchetypeEarth)'},
[101] = {},
[102] = {},
[103] = {},
[104] = {},
[105] = {},
[106] = {},
[107] = {},
[108] = {},
[109] = {},
[110] = {},
[111] = {},
[112] = {}
}
FGOData.classTextStyle = {
[-1] = '',
[101] = 'color:red;',
[102] = 'color:red;',
[103] = 'color:red;',
[104] = 'color:red;',
[105] = 'color:red;',
[106] = 'color:red;',
[108] = 'color:red;',
[109] = 'color:red;',
[110] = 'color:red;',
[111] = 'color:red;',
[112] = 'color:red;'
}
FGOData.classImageFileNameGetters = { -- 谁把图标命名规范化了记得回来改
[-1] = function(s) return '金卡'..s end,
[101] = function(s) return 'BeastⅠ' end,
[102] = function(s) return 'BeastⅡ' end,
[103] = function(s) return 'BeastⅢ' end,
[104] = function(s) return 'BeastⅢ' end,
[105] = function(s) return 'BeastⅣ' end,
[106] = function(s) return 'Class_Beast' end,
[107] = function(s) return '彩卡Unknown' end,
[108] = function(s) return 'BeastⅠ:L' end,
[109] = function(s) return 'BeastⅥ' end,
[110] = function(s) return 'BeastⅥ' end,
[111] = function(s) return 'Class_Beast' end,
[112] = function(s) return 'Class_Beast' end
}
FGOData.getClassIconCore = function (name, link, size)
return [=[[[文件:]=] .. (name or FGOData.classImageFileNameGetters[-1]('All')) ..
'.png|' .. (size or 25) .. 'px|link=' .. (link or FGOData.classLinks[-1]) .. [=[]]]=]
end
FGOData.getClassIcon = function (i, size, link)
if (link == "false") then return FGOData.getClassIconCore(
FGOData.getFromDefaultedTable(FGOData.classImageFileNameGetters, i)(FGOData.classNames[i]),
'',
size)
else return FGOData.getClassIconCore(
FGOData.getFromDefaultedTable(FGOData.classImageFileNameGetters, i)(FGOData.classNames[i]),
(link or FGOData.getFromDefaultedTable(FGOData.classLinks, i)),
size)
end
end
FGOData.getClassTitle = function (i, size, link)
if (i == 107) then return FGOData.getClassIcon(i, size, link) -- 放在classTextStyle会导致表格本身变为白色
.. '<span style="background-image:-webkit-linear-gradient(left top,lime,red,orange,gold,lime,violet);-webkit-background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone;">'
.. '<br>' .. (FGOData.classNamesDisplay[i] or FGOData.classNames[i])
.. '<br>' .. FGOData.classNamesChinese[i]
.. '<br>' .. FGOData.getFromDefaultedTable(FGOData.classNamesInfo, i)
.. '</span>'
else return FGOData.getClassIcon(i, size, link)
.. '<br>' .. (FGOData.classNamesDisplay[i] or FGOData.classNames[i])
.. '<br>' .. FGOData.classNamesChinese[i]
.. '<br>' .. FGOData.getFromDefaultedTable(FGOData.classNamesInfo, i)
end
end
FGOData.classMultFromTo = {
[-1] = { [-1] = 1.0, [7] = 2.0 },
[1] = { [2] = 0.5, [3] = 2.0, [11] = 0.5, [17] = 0.5, [109] = 0.5, [110] = 0.5 },
[2] = { [1] = 2.0, [3] = 0.5, [11] = 0.5, [17] = 0.5, [109] = 0.5, [110] = 0.5, [112] = 2.0 },
[3] = { [1] = 0.5, [2] = 2.0, [11] = 0.5, [17] = 0.5, [109] = 0.5, [110] = 0.5, [112] = 0.5 },
[4] = { [5] = 2.0, [6] = 0.5, [11] = 0.5, [17] = 0.5, [101] = 2.0, [108] = 2.0 , [109] = 0.5, [110] = 0.5, [111] = 0.5, [112] = 2.0 },
[5] = { [4] = 0.5, [6] = 2.0, [11] = 0.5, [17] = 0.5, [101] = 2.0, [108] = 2.0, [109] = 0.5, [110] = 0.5, [112] = 0.5 },
[6] = { [4] = 2.0, [5] = 0.5, [11] = 0.5, [17] = 0.5, [101] = 2.0, [108] = 2.0, [109] = 0.5, [110] = 0.5, [111] = 2.0 },
[7] = { [-1] = 1.5, [15] = 0.5, [10] = 1.0, [17] = 0.5,
[102] = 1.0, [103] = 1.0, [104] = 1.0, [105] = 1.0, [109] = 0.5, [110] = 0.5, [112] = 1.0 },
[10] = { [-1] = 1.0 },
[11] = { [12] = 0.5, [14] = 2.0, [17] = 2.0, [109] = 2.0, [110] = 0.5 },
[12] = { [11] = 2.0, [14] = 0.5, [17] = 2.0, [109] = 2.0, [110] = 0.5, [112] = 2.0 },
[13] = { [1] = 0.5, [2] = 0.5, [3] = 0.5, [4] = 1.5, [5] = 1.5, [6] = 1.5,
[15] = 2.0, [16] = 0.5, [17] = 2.0, [103] = 1.2, [104] = 1.2, [109] = 2.0, [110] = 0.5, [111] = 2.0, [112] = 0.5 },
[14] = { [11] = 0.5, [12] = 2.0, [17] = 2.0, [103] = 1.2, [108] = 2.0, [109] = 2.0, [110] = 0.5, [111] = 0.5 },
[15] = { [13] = 0.5, [15] = 2.0, [16] = 2.0, [17] = 2.0, [104] = 1.2, [109] = 2.0, [110] = 0.5, [111] = 0.5 },
[16] = { [1] = 1.5, [2] = 1.5, [3] = 1.5, [4] = 0.5, [5] = 0.5, [6] = 0.5,
[13] = 2.0, [15] = 0.5, [17] = 2.0, [109] = 2.0, [110] = 0.5 },
[17] = { [1] = 1.5, [2] = 1.5, [3] = 1.5, [4] = 1.5, [5] = 1.5, [6] = 1.5, [11] = 0.5, [12] = 0.5, [13] = 0.5, [14] = 0.5, [15] = 0.5, [16] = 0.5, [110] = 2.0 },
[101] = { [1] = 2.0, [2] = 2.0, [3] = 2.0, [12] = 0.5 },
[102] = { [-1] = 1.0 },
[103] = { [-1] = 1.0 },
[104] = { [-1] = 1.0 },
[105] = { [-1] = 1.0, [5] = 0.5 },
[106] = { [-1] = 1.0 },
[107] = { [-1] = 1.0 },
[108] = { [1] = 2.0, [2] = 2.0, [3] = 2.0, [12] = 0.5, [14] = 0.5, [15] = 2.0 },
[109] = { [1] = 1.5, [2] = 1.5, [3] = 1.5, [4] = 1.5, [5] = 1.5, [6] = 1.5, [11] = 0.5, [12] = 0.5, [13] = 0.5, [14] = 0.5, [15] = 0.5, [16] = 0.5 },
[110] = { [1] = 2.0, [2] = 2.0, [3] = 2.0, [4] = 2.0, [5] = 2.0, [6] = 2.0, [11] = 2.0, [12] = 2.0, [13] = 2.0, [14] = 2.0, [15] = 2.0, [16] = 2.0, [17] = 0.5 },
[111] = { [4] = 0.5, [6] = 1.5, [10] = 0.5, [13] = 1.5, [14] = 0.5, [15] = 0.5 },
[112] = { [2] = 1.5, [3] = 0.5, [4] = 1.5, [5] = 0.5, [10] = 0.5, [12] = 1.5, [13] = 0.5 }
}
FGOData.getClassMultStyle = FGOData.getGetGeneralStyle()
FGOData.classAtkCoeff = {
[-1] = 1.0,
[2] = 0.95,
[3] = 1.05,
[5] = 0.9,
[6] = 0.9,
[7] = 1.1,
[11] = 1.1,
[12] = 1.1
}
FGOData.getClassAtkCoeffStyle = FGOData.getGetGeneralStyle(function(v) return 1 + 5 * (v - 1) end)
FGOData.baseStarDropRate = {
[-1] = 10,
[2] = 8,
[3] = 12,
[4] = 9,
[5] = 11,
[6] = 25,
[7] = 5,
[12] = 6,
[14] = 15,
[15] = 15,
[16] = 20,
[101] = 0,
[102] = 9.9,
[104] = 10.2,
[105] = '?'
}
FGOData.getBaseStarDropRateStyle = FGOData.getGetGeneralStyle(function (v) return v/10 end)
FGOData.baseStarWeight = {
[-1] = 100,
[2] = 150,
[3] = 90,
[4] = 200,
[5] = 50,
[7] = 10,
[12] = 30,
[14] = 50,
[15] = 150,
[17] = 150,
[101] = 0,
[102] = 104,
[103] = 102,
[105] = '?'
}
FGOData.getBaseStarWeightStyle = FGOData.getGetGeneralStyle(function (v) return v/100 end)
FGOData.baseInstakillRate = {
[-1] = 35,
[2] = 45,
[3] = 40,
[4] = 50,
[5] = 60,
[6] = 55,
[7] = 65,
[12] = 10,
[13] = 50,
[14] = 1,
[15] = 10,
[16] = 30,
[17] = 1,
[101] = '>174',
[102] = 20,
[103] = 0,
[104] = 0,
[105] = 0
}
FGOData.getBaseInstakillRateStyle = function (v)
if v == '>174' then
return FGOData.getGetGeneralStyle()(3)
else
return FGOData.getGetGeneralStyle(function (v_) return v_ / 35 end)(v)
end
end
FGOData.baseChargeLength = {
[-1] = 4,
[2] = 3,
[4] = 5,
[5] = 5,
[6] = 3,
[7] = 5,
[12] = 5,
[13] = 3,
[14] = 3,
[15] = 5,
[17] = 5,
[103] = 5,
[104] = 5,
[105] = 5,
[108] = 5,
[109] = '?',
[110] = '?'
}
FGOData.getBaseChargeLengthStyle = FGOData.getGetGeneralStyle(function (v) return 1 - (v/4 - 1) end)
FGOData.baseActionCount = {
[-1] = 3,
[5] = 2,
[7] = 2
}
FGOData.getBaseActionCountStyle = FGOData.getGetGeneralStyle(function (v) return v/3 end)
FGOData.baseActionPriority = {
[-1] = 50,
[3] = 150,
[5] = 25,
[6] = 100,
[12] = 200,
[13] = 100,
[14] = 20,
[15] = 25,
[101] = '?',
[102] = '?',
[103] = '?',
[105] = '?',
[106] = '?',
[107] = '?',
[108] = '?',
[109] = '?',
[110] = '?',
[111] = '?',
[112] = '?'
}
FGOData.getBaseActionPriorityStyle = FGOData.getGetGeneralStyle(function (v) return 1 + (v - 50) / 100 end)
FGOData.baseHpCoeff = {
[-1] = 1.00,
[1] = 1.01,
[2] = 0.98,
[3] = 1.02,
[4] = 0.96,
[5] = 0.98,
[6] = 0.95,
[7] = 0.90,
[11] = 1.00,
[12] = 0.88,
[13] = 0.95,
[14] = 1.05,
[15] = 1.00,
[16] = 0.95,
[17] = 0.97,
[10] = 1.01
}
FGOData.baseAtkCoeff = {
[-1] = 1.00,
[1] = 1.01,
[2] = 1.02,
[3] = 0.98,
[4] = 0.97,
[5] = 0.94,
[6] = 0.96,
[7] = 1.03,
[11] = 0.95,
[12] = 1.05,
[13] = 1.02,
[14] = 0.94,
[15] = 1.00,
[16] = 1.02,
[17] = 1.03,
[10] = 0.99
}
-- End class dependent data
-- Start rarity dependent data
FGOData.eqvRarity = {
[0] = 2,
[1] = 1,
[2] = 2,
[3] = 3,
[4] = 4,
[5] = 5
}
FGOData.maxLv = {60, 65, 70, 80, 90}
FGOData.baseLvHp = {1500, 1600, 1800, 2000, 2200}
FGOData.baseLvAtk = {1000, 1100, 1300, 1500, 1700}
FGOData.maxLvHp = {7500, 8500, 10000, 12500, 15000}
FGOData.maxLvAtk = {5500, 6200, 7000, 9000, 11000}
-- End rarity dependent data
-- Start rank dependent data
FGOData.rankToBasic = {
['E-'] = 1, ['E'] = 1, ['E+'] = 1, ['E++'] = 1, ['E+++'] = 1,
['D-'] = 2, ['D'] = 2, ['D+'] = 2, ['D++'] = 2, ['D+++'] = 2,
['C-'] = 3, ['C'] = 3, ['C+'] = 3, ['C++'] = 3, ['C+++'] = 3,
['B-'] = 4, ['B'] = 4, ['B+'] = 4, ['B++'] = 4, ['B+++'] = 4,
['A-'] = 5, ['A'] = 5, ['A+'] = 5, ['A++'] = 5, ['A+++'] = 5,
['EX'] = 6
}
FGOData.rankToExtra = {
['E-'] = -1, ['E'] = 0, ['E+'] = 1, ['E++'] = 2, ['E+++'] = 3,
['D-'] = -1, ['D'] = 0, ['D+'] = 1, ['D++'] = 2, ['D+++'] = 3,
['C-'] = -1, ['C'] = 0, ['C+'] = 1, ['C++'] = 2, ['C+++'] = 3,
['B-'] = -1, ['B'] = 0, ['B+'] = 1, ['B++'] = 2, ['B+++'] = 3,
['A-'] = -1, ['A'] = 0, ['A+'] = 1, ['A++'] = 2, ['A+++'] = 3,
['EX'] = 0
}
FGOData.rankBasic = {0.97, 0.98, 0.99, 1.00, 1.02, 1.04}
FGOData.rankExtra = {0.0025, 0.0025, 0.0025, 0.005, 0.005, 0}
FGOData.rankAgiBasic = {0.985, 0.990, 0.995, 1.000, 1.010, 1.020}
FGOData.rankAgiExtra = {0.00125, 0.00125, 0.00125, 0.0025, 0.0025, 0}
FGOData.rankInstakillBasic = {1, 0.9, 0.8, 0.7, 0.6, 0.5}
FGOData.rankInstakillExtra = {-0.025, -0.025, -0.025, -0.025, -0.025, 0}
-- End rank dependent data
return FGOData