2023-10-20 08:59:06 +00:00
|
|
|
import { Data, Meta } from '#miao'
|
2023-05-16 05:04:43 +00:00
|
|
|
import lodash from 'lodash'
|
2023-10-21 18:54:45 +00:00
|
|
|
import artiBuffs from './calc.js'
|
2023-10-25 19:03:33 +00:00
|
|
|
import { mainAttr, subAttr, attrMap } from './meta.js'
|
|
|
|
import { artiSetAbbr, aliasCfg, artiAbbr } from './alias.js'
|
2023-05-16 05:04:43 +00:00
|
|
|
|
2023-10-21 18:54:45 +00:00
|
|
|
import { usefulAttr } from './artis-mark.js'
|
|
|
|
|
2023-05-16 05:04:43 +00:00
|
|
|
let data = Data.readJSON('/resources/meta-sr/artifact/data.json', 'miao')
|
2023-10-21 18:54:45 +00:00
|
|
|
let metaData = Data.readJSON('/resources/meta-sr/artifact/meta.json', 'miao')
|
2023-05-16 05:04:43 +00:00
|
|
|
|
2023-10-21 18:54:45 +00:00
|
|
|
let setMeta = Meta.create('sr', 'artiSet')
|
2023-10-23 02:56:47 +00:00
|
|
|
let artiMeta = Meta.create('sr', 'arti')
|
2023-10-20 08:59:06 +00:00
|
|
|
|
2023-05-16 05:04:43 +00:00
|
|
|
let idMap = {}
|
|
|
|
lodash.forEach(data, (setData) => {
|
2023-05-20 13:51:44 +00:00
|
|
|
let artiSet = {
|
|
|
|
name: setData.name,
|
|
|
|
effect: setData.skill,
|
2023-11-07 21:01:31 +00:00
|
|
|
idxs: {}
|
2023-05-20 13:51:44 +00:00
|
|
|
}
|
2023-10-20 08:59:06 +00:00
|
|
|
setMeta.addDataItem(artiSet.name, artiSet)
|
2023-05-20 13:51:44 +00:00
|
|
|
|
2023-05-16 05:04:43 +00:00
|
|
|
lodash.forEach(setData.idxs, (ds, idx) => {
|
2023-10-23 02:56:47 +00:00
|
|
|
artiMeta.addDataItem(ds.name, {
|
|
|
|
...ds,
|
|
|
|
set: setData.name,
|
|
|
|
setId: setData.id,
|
|
|
|
idx
|
2023-05-16 05:04:43 +00:00
|
|
|
})
|
2023-10-23 02:56:47 +00:00
|
|
|
idMap[ds.name] = lodash.keys(ds.ids).join(',')
|
2023-11-07 21:01:31 +00:00
|
|
|
artiSet.idxs[idx] = ds.name
|
2023-05-16 05:04:43 +00:00
|
|
|
})
|
|
|
|
})
|
2023-05-21 18:13:38 +00:00
|
|
|
|
2023-10-25 19:03:33 +00:00
|
|
|
setMeta.addAbbr(artiSetAbbr)
|
|
|
|
setMeta.addAlias(aliasCfg)
|
2023-10-20 08:59:06 +00:00
|
|
|
|
2023-10-25 19:03:33 +00:00
|
|
|
artiMeta.addAbbr(artiAbbr)
|
2023-10-23 02:56:47 +00:00
|
|
|
artiMeta.addAlias(idMap, true)
|
2023-10-21 18:54:45 +00:00
|
|
|
artiMeta.addMeta({
|
2023-10-25 19:03:33 +00:00
|
|
|
artiBuffs, metaData, usefulAttr, mainAttr, subAttr, attrMap
|
2023-10-20 08:59:06 +00:00
|
|
|
})
|