refactor(batchSetting): 更新 SpecialRing.config 配置
- 在 batchSetting.js 中添加新的值和间隔 - 更新 SpecialRingConfig.json 中的配置项 - 移除不必要的属性和冗余代码
This commit is contained in:
@@ -1,68 +1,15 @@
|
||||
const fs = require('fs')
|
||||
const key = "SpecialRing.config"
|
||||
const values = [56, 100]
|
||||
const interval = [1, 100]
|
||||
const values = [56, 100, 500] // 登记,伤害加倍,元宝花费
|
||||
const interval = [1, 100, 50]
|
||||
const num = 45
|
||||
const start = () => {
|
||||
const template = ` "S1": {
|
||||
"attr": [
|
||||
{
|
||||
"value": S2,
|
||||
"type": 75
|
||||
},
|
||||
{
|
||||
"value": 10000,
|
||||
"type": 5
|
||||
},
|
||||
{
|
||||
"value": 428,
|
||||
"type": 76
|
||||
},
|
||||
{
|
||||
"value": 536,
|
||||
"type": 77
|
||||
},
|
||||
{
|
||||
"value": 55,
|
||||
"type": 21
|
||||
},
|
||||
{
|
||||
"value": 55,
|
||||
"type": 23
|
||||
},
|
||||
{
|
||||
"value": 55,
|
||||
"type": 25
|
||||
},
|
||||
{
|
||||
"value": 55,
|
||||
"type": 27
|
||||
},
|
||||
{
|
||||
"value": 5000,
|
||||
"type": 83
|
||||
}
|
||||
],
|
||||
"lv": S1,
|
||||
"cost": [
|
||||
{
|
||||
"id": 2,
|
||||
"type": 2,
|
||||
"count": 300000
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": 4,
|
||||
"count": 500
|
||||
},
|
||||
{
|
||||
"id": 1018,
|
||||
"type": 0,
|
||||
"count": 1000
|
||||
}
|
||||
],
|
||||
"pos": 4
|
||||
}`
|
||||
const template = `[S1] = {
|
||||
pos = 4,
|
||||
lv = S1,
|
||||
cost = {{type=4,id=4,count=S3},{type=0,id=1018,count=1000}},
|
||||
attr = {{type=75,value=S2},{type=76,value=428},{type=77,value=536},{type=21,value=55},{type=23,value=55},{type=25,value=55},{type=27,value=55},{type=83,value=5000},},
|
||||
}`
|
||||
const getStr = (index) => {
|
||||
let str = template
|
||||
values.forEach((v, i) => {
|
||||
@@ -71,7 +18,7 @@ const start = () => {
|
||||
})
|
||||
return str
|
||||
}
|
||||
const content = Array(num).fill(1).map((e,i)=>`${getStr(i)}`).join(',')
|
||||
const content = Array(num).fill(1).map((e, i) => `${getStr(i)}`).join(',')
|
||||
fs.writeFileSync(`./dist/${key}.txt`, content)
|
||||
}
|
||||
start()
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user