Files
chuanqi-client-config/batchSetting.js
aixianling 8ba5295356 refactor(configs): 更新 Monster 配置
- 将 Monster 配置中的 id 从 67 修改为 79
2024-12-26 14:35:43 +08:00

68 lines
1.8 KiB
JavaScript

const fs = require('fs')
const key = "SpecialRing.config"
const values = [71, 100, 500] // 登记,伤害加倍,元宝花费
const interval = [1, 50, 50]
const num = 130
const start = () => {
const template = `"S1": {
"attr": [
{
"value": S2,
"type": 75
},
{
"value": 585,
"type": 76
},
{
"value": 1115,
"type": 77
},
{
"value": 70,
"type": 21
},
{
"value": 70,
"type": 23
},
{
"value": 70,
"type": 25
},
{
"value": 70,
"type": 27
},
{
"value": 3400,
"type": 79
}
],
"lv": S1,
"cost": [
{
"id": 1022,
"type": 0,
"count": 1600
},
{
"id":4,
"type": 4,
"count": S3
}
],
"pos": 5
}`
const getStr = (index) => {
let str = template
values.forEach((v, i) => {
const reg = new RegExp(`S${i + 1}`, 'g')
str = str.replace(reg, v + index * interval[i])
})
return str
}
const content = Array(num).fill(1).map((e, i) => `${getStr(i)}`).join(',')
fs.writeFileSync(`./dist/${key}.txt`, content)
}
start()