miao-plugin/resources/meta-sr/artifact/index.js

36 lines
872 B
JavaScript
Raw Normal View History

import { Data } from '#miao'
import lodash from 'lodash'
import artisBuffs from './calc.js'
let data = Data.readJSON('/resources/meta-sr/artifact/data.json', 'miao')
let meta = Data.readJSON('/resources/meta-sr/artifact/meta.json', 'miao')
let artiMap = {}
let idMap = {}
let artiSetMap = {}
lodash.forEach(data, (setData) => {
let artiSet = {
name: setData.name,
effect: setData.skill,
sets: {}
}
artiSetMap[setData.name] = artiSet
lodash.forEach(setData.idxs, (ds, idx) => {
artiMap[ds.name] = {
...ds,
set: setData.name,
setId: setData.id,
idx
}
idMap[ds.name] = artiMap[ds.name]
lodash.forEach(ds.ids, (star, id) => {
idMap[id] = artiMap[ds.name]
})
artiSet.sets[idx] = ds.name
})
})
2023-05-21 18:13:38 +00:00
export const metaData = meta
2023-05-21 18:13:38 +00:00
export { artiMap, idMap, artisBuffs, artiSetMap }
export * from './meta.js'