- 修改了 batchSetting.js 脚本,更新了配置参数和生成逻辑 - 调整了 StdItems.json 中多件装备的属性,包括法师、道士和战士的传说级武器 - 优化了装备描述和效果,提高了部分装备的攻击力和防御力
66 lines
1.4 KiB
JavaScript
66 lines
1.4 KiB
JavaScript
const fs = require('fs')
|
|
const key = "UpstarConfig"
|
|
const values = [0, 1387, 10, 500, 10000, 5, 0] // 等级,物品ID,属性调整,元宝花费,升级概率
|
|
const interval = [1, 0, 15, 50, -450, 10, 1]
|
|
const num = 21
|
|
const start = () => {
|
|
const template = `"S1": {
|
|
"consume": [
|
|
{
|
|
"id": 4,
|
|
"type": 4,
|
|
"count": S4
|
|
},
|
|
{
|
|
"id": 845,
|
|
"type": 0,
|
|
"count": S6
|
|
},
|
|
{
|
|
"id": 852,
|
|
"type": 0,
|
|
"count": S3
|
|
}
|
|
],
|
|
"id": S2,
|
|
"level": S1,
|
|
"attribute": [
|
|
{
|
|
"value": S7,
|
|
"type": 9
|
|
},
|
|
{
|
|
"value": S7,
|
|
"type": 11
|
|
},
|
|
{
|
|
"value": S7,
|
|
"type": 13
|
|
},
|
|
{
|
|
"value": S7,
|
|
"type": 15
|
|
},
|
|
{
|
|
"value": S7,
|
|
"type": 17
|
|
},
|
|
{
|
|
"value": S7,
|
|
"type": 19
|
|
}
|
|
],
|
|
"rate": S5
|
|
}`
|
|
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() |