2023-10-20 08:59:06 +00:00
|
|
|
import { Data, Meta } from '#miao'
|
2022-09-24 12:19:59 +00:00
|
|
|
import lodash from 'lodash'
|
2022-09-24 22:42:48 +00:00
|
|
|
import calc from './calc.js'
|
2023-10-25 19:03:33 +00:00
|
|
|
import { mainAttr, subAttr, attrMap, attrNameMap, mainIdMap, attrIdMap } from './extra.js'
|
|
|
|
import { setAlias, setAbbr } from './alias.js'
|
2023-10-21 18:54:45 +00:00
|
|
|
import { usefulAttr } from './artis-mark.js'
|
2022-09-24 12:19:59 +00:00
|
|
|
|
2023-10-21 18:54:45 +00:00
|
|
|
let setMeta = Meta.create('gs', 'artiSet')
|
|
|
|
let artiMeta = Meta.create('gs', 'arti')
|
2023-10-20 08:59:06 +00:00
|
|
|
|
2023-10-24 19:34:36 +00:00
|
|
|
let artis = Data.readJSON('resources/meta-gs/artifact/data.json', 'miao')
|
2023-11-07 21:01:31 +00:00
|
|
|
let setIds = {}
|
2022-09-24 12:19:59 +00:00
|
|
|
|
|
|
|
lodash.forEach(artis, (ds) => {
|
|
|
|
let artiSet = {
|
|
|
|
name: ds.name,
|
|
|
|
effect: ds.effect,
|
2023-11-07 21:01:31 +00:00
|
|
|
idxs: {}
|
2022-09-24 12:19:59 +00:00
|
|
|
}
|
2023-10-20 08:59:06 +00:00
|
|
|
setMeta.addDataItem(ds.name, artiSet)
|
|
|
|
|
2023-11-07 21:01:31 +00:00
|
|
|
lodash.forEach(ds.idxs, (as, idx) => {
|
2022-09-24 12:19:59 +00:00
|
|
|
if (as.name) {
|
2023-10-20 08:59:06 +00:00
|
|
|
let tmp = {
|
2022-09-24 12:19:59 +00:00
|
|
|
set: ds.name,
|
2023-05-16 05:04:43 +00:00
|
|
|
name: as.name,
|
2022-09-24 12:19:59 +00:00
|
|
|
idx
|
|
|
|
}
|
2023-11-07 21:01:31 +00:00
|
|
|
artiSet.idxs[idx] = as.name
|
2023-10-20 08:59:06 +00:00
|
|
|
artiMeta.addDataItem(as.name, tmp)
|
2023-11-07 21:01:31 +00:00
|
|
|
|
|
|
|
setIds[artiSet.name] = setIds[artiSet.name] || as.id.toString().slice(0, 2)
|
2022-09-24 12:19:59 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
2023-10-25 19:03:33 +00:00
|
|
|
setMeta.addAbbr(setAbbr)
|
|
|
|
setMeta.addAlias(setAlias)
|
2023-11-07 21:01:31 +00:00
|
|
|
setMeta.addAlias(setIds)
|
2023-10-21 18:54:45 +00:00
|
|
|
artiMeta.addMeta({
|
2023-10-25 19:03:33 +00:00
|
|
|
mainAttr, subAttr, attrMap, attrNameMap, mainIdMap, attrIdMap,
|
2023-10-21 18:54:45 +00:00
|
|
|
artiBuffs: calc,
|
|
|
|
usefulAttr
|
2023-10-20 08:59:06 +00:00
|
|
|
})
|
2023-10-21 18:54:45 +00:00
|
|
|
|
|
|
|
setMeta.addMeta({
|
|
|
|
artiBuffs: calc
|
|
|
|
})
|
|
|
|
|