hella-types 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,937 +1,933 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OperatorIO = exports.StageIO = exports.SkinIO = exports.SkillIO = exports.SandboxActIO = exports.RogueThemeIO = exports.ParadoxIO = exports.ModuleIO = exports.ItemIO = exports.GameEventIO = exports.EnemyIO = exports.DefinitionIO = exports.CCStageIO = exports.BaseIO = exports.SandboxStageIO = exports.RogueVariationIO = exports.RogueStageIO = exports.RogueRelicIO = exports.StageDataIO = exports.StageEffectIO = exports.StageDefinesIO = exports.LevelUpCostCondIO = exports.OperatorUnlockCondIO = exports.WorkshopFormulaIO = exports.ManufactFormulaIO = exports.LevelUpCostIO = exports.GridRangeIO = exports.EnemySpDataIO = exports.EnemySkillsIO = exports.EnemyAttributesIO = exports.BlackboardIO = exports.AttributesKeyFrameIO = void 0;
4
- var t = require("io-ts");
5
- exports.AttributesKeyFrameIO = t.type({
6
- level: t.number,
7
- data: t.type({
8
- maxHp: t.number,
9
- atk: t.number,
10
- def: t.number,
11
- magicResistance: t.number,
12
- cost: t.number,
13
- blockCnt: t.number,
14
- moveSpeed: t.number,
15
- attackSpeed: t.number,
16
- baseAttackTime: t.number,
17
- respawnTime: t.number,
18
- hpRecoveryPerSec: t.number,
19
- spRecoveryPerSec: t.number,
20
- maxDeployCount: t.number,
21
- maxDeckStackCnt: t.number,
22
- tauntLevel: t.number,
23
- massLevel: t.number,
24
- baseForceLevel: t.number,
25
- stunImmune: t.boolean,
26
- silenceImmune: t.boolean,
27
- sleepImmune: t.boolean,
28
- frozenImmune: t.boolean,
29
- levitateImmune: t.boolean,
30
- }),
31
- });
32
- exports.BlackboardIO = t.type({
33
- key: t.string,
34
- value: t.union([t.number, t.undefined]),
35
- valueStr: t.union([t.string, t.undefined]),
36
- });
37
- exports.EnemyAttributesIO = t.type({
38
- maxHp: t.type({
39
- m_defined: t.boolean,
40
- m_value: t.number,
41
- }),
42
- atk: t.type({
43
- m_defined: t.boolean,
44
- m_value: t.number,
45
- }),
46
- def: t.type({
47
- m_defined: t.boolean,
48
- m_value: t.number,
49
- }),
50
- magicResistance: t.type({
51
- m_defined: t.boolean,
52
- m_value: t.number,
53
- }),
54
- cost: t.type({
55
- m_defined: t.boolean,
56
- m_value: t.number,
57
- }),
58
- blockCnt: t.type({
59
- m_defined: t.boolean,
60
- m_value: t.number,
61
- }),
62
- moveSpeed: t.type({
63
- m_defined: t.boolean,
64
- m_value: t.number,
65
- }),
66
- attackSpeed: t.type({
67
- m_defined: t.boolean,
68
- m_value: t.number,
69
- }),
70
- baseAttackTime: t.type({
71
- m_defined: t.boolean,
72
- m_value: t.number,
73
- }),
74
- respawnTime: t.type({
75
- m_defined: t.boolean,
76
- m_value: t.number,
77
- }),
78
- hpRecoveryPerSec: t.type({
79
- m_defined: t.boolean,
80
- m_value: t.number,
81
- }),
82
- spRecoveryPerSec: t.type({
83
- m_defined: t.boolean,
84
- m_value: t.number,
85
- }),
86
- maxDeployCount: t.type({
87
- m_defined: t.boolean,
88
- m_value: t.number,
89
- }),
90
- massLevel: t.type({
91
- m_defined: t.boolean,
92
- m_value: t.number,
93
- }),
94
- baseForceLevel: t.type({
95
- m_defined: t.boolean,
96
- m_value: t.number,
97
- }),
98
- tauntLevel: t.type({
99
- m_defined: t.boolean,
100
- m_value: t.number,
101
- }),
102
- stunImmune: t.type({
103
- m_defined: t.boolean,
104
- m_value: t.boolean,
105
- }),
106
- silenceImmune: t.type({
107
- m_defined: t.boolean,
108
- m_value: t.boolean,
109
- }),
110
- sleepImmune: t.type({
111
- m_defined: t.boolean,
112
- m_value: t.boolean,
113
- }),
114
- frozenImmune: t.type({
115
- m_defined: t.boolean,
116
- m_value: t.boolean,
117
- }),
118
- levitateImmune: t.type({
119
- m_defined: t.boolean,
120
- m_value: t.boolean,
121
- }),
122
- });
123
- exports.EnemySkillsIO = t.type({
124
- prefabKey: t.string,
125
- priority: t.number,
126
- cooldown: t.number,
127
- initCooldown: t.number,
128
- spCost: t.number,
129
- blackboard: t.array(exports.BlackboardIO),
130
- });
131
- exports.EnemySpDataIO = t.type({
132
- spType: t.number,
133
- maxSp: t.number,
134
- initSp: t.number,
135
- increment: t.number,
136
- });
137
- exports.GridRangeIO = t.type({
138
- id: t.string,
139
- direction: t.number,
140
- grids: t.array(t.type({
141
- row: t.number,
142
- col: t.number,
143
- })),
144
- });
145
- exports.LevelUpCostIO = t.type({
146
- id: t.string,
147
- count: t.number,
148
- type: t.string,
149
- });
150
- exports.ManufactFormulaIO = t.type({
151
- formulaId: t.string,
152
- itemId: t.string,
153
- count: t.number,
154
- weight: t.number,
155
- costPoint: t.number,
156
- formulaType: t.string,
157
- buffType: t.string,
158
- costs: t.array(exports.LevelUpCostIO),
159
- requireRooms: t.array(t.type({
160
- roomId: t.string,
161
- roomLevel: t.number,
162
- roomCount: t.number,
3
+ exports.OperatorZod = exports.StageZod = exports.SkinZod = exports.SkillZod = exports.SandboxActZod = exports.RogueThemeZod = exports.ParadoxZod = exports.ModuleZod = exports.ItemZod = exports.GridRangeZod = exports.GameEventZod = exports.EnemyZod = exports.DefinitionZod = exports.CCStageZod = exports.BaseZod = void 0;
4
+ var z = require("zod");
5
+ var DefinedStringZod = z.strictObject({
6
+ m_defined: z.boolean(),
7
+ m_value: z.union([z.string(), z.null()]),
8
+ });
9
+ var DefinedStringArrayZod = z.strictObject({
10
+ m_defined: z.boolean(),
11
+ m_value: z.union([z.array(z.string()), z.null()]),
12
+ });
13
+ var DefinedNumberZod = z.strictObject({
14
+ m_defined: z.boolean(),
15
+ m_value: z.union([z.number(), z.null()]),
16
+ });
17
+ var DefinedBooleanZod = z.strictObject({
18
+ m_defined: z.boolean(),
19
+ m_value: z.boolean(),
20
+ });
21
+ var AttributesKeyFrameZod = z.strictObject({
22
+ level: z.number(),
23
+ data: z.strictObject({
24
+ maxHp: z.number(),
25
+ atk: z.number(),
26
+ def: z.number(),
27
+ magicResistance: z.number(),
28
+ cost: z.number(),
29
+ blockCnt: z.number(),
30
+ moveSpeed: z.number(),
31
+ attackSpeed: z.number(),
32
+ baseAttackTime: z.number(),
33
+ respawnTime: z.number(),
34
+ hpRecoveryPerSec: z.number(),
35
+ spRecoveryPerSec: z.number(),
36
+ maxDeployCount: z.number(),
37
+ maxDeckStackCnt: z.number(),
38
+ tauntLevel: z.number(),
39
+ massLevel: z.number(),
40
+ baseForceLevel: z.number(),
41
+ stunImmune: z.boolean(),
42
+ silenceImmune: z.boolean(),
43
+ sleepImmune: z.boolean(),
44
+ frozenImmune: z.boolean(),
45
+ levitateImmune: z.boolean(),
46
+ }),
47
+ });
48
+ var BlackboardZod = z.strictObject({
49
+ key: z.string(),
50
+ value: z.union([z.number(), z.null()]),
51
+ valueStr: z.union([z.string(), z.null(), z.undefined()]),
52
+ });
53
+ var EnemyAttributesZod = z.strictObject({
54
+ maxHp: DefinedNumberZod,
55
+ atk: DefinedNumberZod,
56
+ def: DefinedNumberZod,
57
+ magicResistance: DefinedNumberZod,
58
+ cost: DefinedNumberZod,
59
+ blockCnt: DefinedNumberZod,
60
+ moveSpeed: DefinedNumberZod,
61
+ attackSpeed: DefinedNumberZod,
62
+ baseAttackTime: DefinedNumberZod,
63
+ respawnTime: DefinedNumberZod,
64
+ hpRecoveryPerSec: DefinedNumberZod,
65
+ spRecoveryPerSec: DefinedNumberZod,
66
+ maxDeployCount: DefinedNumberZod,
67
+ massLevel: DefinedNumberZod,
68
+ baseForceLevel: DefinedNumberZod,
69
+ tauntLevel: z.union([DefinedNumberZod, z.undefined()]), // legacy
70
+ epDamageResistance: z.union([DefinedNumberZod, z.undefined()]), // legacy
71
+ epResistance: z.union([DefinedNumberZod, z.undefined()]), // ~
72
+ stunImmune: DefinedBooleanZod,
73
+ silenceImmune: DefinedBooleanZod,
74
+ sleepImmune: z.union([DefinedBooleanZod, z.undefined()]),
75
+ frozenImmune: z.union([DefinedBooleanZod, z.undefined()]), // legacy
76
+ levitateImmune: z.union([DefinedBooleanZod, z.undefined()]), // legacy
77
+ });
78
+ var EnemySkillsZod = z.strictObject({
79
+ prefabKey: z.string(),
80
+ priority: z.number(),
81
+ cooldown: z.number(),
82
+ initCooldown: z.number(),
83
+ spCost: z.number(),
84
+ blackboard: z.union([z.array(BlackboardZod), z.null()]),
85
+ });
86
+ var EnemySpDataZod = z.strictObject({
87
+ spType: z.string(),
88
+ maxSp: z.number(),
89
+ initSp: z.number(),
90
+ increment: z.number(),
91
+ });
92
+ var EnemyDataZod = z.strictObject({
93
+ name: DefinedStringZod,
94
+ description: DefinedStringZod,
95
+ prefabKey: DefinedStringZod,
96
+ attributes: EnemyAttributesZod,
97
+ applyWay: z.union([DefinedStringZod, z.undefined()]), // legacy
98
+ motion: z.union([DefinedStringZod, z.undefined()]), // legacy
99
+ enemyTags: z.union([DefinedStringArrayZod, z.undefined()]), // legacy
100
+ lifePointReduce: DefinedNumberZod,
101
+ levelType: z.union([DefinedStringZod, DefinedNumberZod, z.undefined()]), // legacy
102
+ rangeRadius: DefinedNumberZod,
103
+ numOfExtraDrops: z.union([DefinedNumberZod, z.undefined()]), // legacy
104
+ viewRadius: z.union([DefinedNumberZod, z.undefined()]), // legacy
105
+ notCountInTotal: z.union([DefinedBooleanZod, z.undefined()]), // legacy
106
+ talentBlackboard: z.union([z.array(BlackboardZod), z.null()]),
107
+ skills: z.union([z.array(EnemySkillsZod), z.null()]),
108
+ spData: z.union([EnemySpDataZod, z.null()]),
109
+ });
110
+ var LevelUpCostZod = z.strictObject({
111
+ id: z.string(),
112
+ count: z.number(),
113
+ type: z.string(),
114
+ });
115
+ var ManufactFormulaZod = z.strictObject({
116
+ formulaId: z.string(),
117
+ itemId: z.string(),
118
+ count: z.number(),
119
+ weight: z.number(),
120
+ costPoint: z.number(),
121
+ formulaType: z.string(),
122
+ buffType: z.string(),
123
+ costs: z.array(LevelUpCostZod),
124
+ requireRooms: z.array(z.strictObject({
125
+ roomId: z.string(),
126
+ roomLevel: z.number(),
127
+ roomCount: z.number(),
163
128
  })),
164
- requireStages: t.array(t.type({
165
- stageId: t.string,
166
- rank: t.number,
129
+ requireStages: z.array(z.strictObject({
130
+ stageId: z.string(),
131
+ rank: z.number(),
167
132
  })),
168
133
  });
169
- exports.WorkshopFormulaIO = t.type({
170
- sortId: t.number,
171
- formulaId: t.string,
172
- rarity: t.number,
173
- itemId: t.string,
174
- count: t.number,
175
- goldCost: t.number,
176
- apCost: t.number,
177
- formulaType: t.string,
178
- buffType: t.string,
179
- extraOutcomeRate: t.number,
180
- extraOutcomeGroup: t.array(t.type({
181
- weight: t.number,
182
- itemId: t.string,
183
- itemCount: t.number,
134
+ var WorkshopFormulaZod = z.strictObject({
135
+ sortId: z.number(),
136
+ formulaId: z.string(),
137
+ rarity: z.number(),
138
+ itemId: z.string(),
139
+ count: z.number(),
140
+ goldCost: z.number(),
141
+ apCost: z.number(),
142
+ formulaType: z.string(),
143
+ buffType: z.string(),
144
+ extraOutcomeRate: z.number(),
145
+ extraOutcomeGroup: z.array(z.strictObject({
146
+ weight: z.number(),
147
+ itemId: z.string(),
148
+ itemCount: z.number(),
184
149
  })),
185
- costs: t.array(exports.LevelUpCostIO),
186
- requireRooms: t.array(t.type({
187
- roomId: t.string,
188
- roomLevel: t.number,
189
- roomCount: t.number,
150
+ costs: z.array(LevelUpCostZod),
151
+ requireRooms: z.array(z.strictObject({
152
+ roomId: z.string(),
153
+ roomLevel: z.number(),
154
+ roomCount: z.number(),
190
155
  })),
191
- requireStages: t.array(t.type({
192
- stageId: t.string,
193
- rank: t.number,
156
+ requireStages: z.array(z.strictObject({
157
+ stageId: z.string(),
158
+ rank: z.number(),
194
159
  })),
195
160
  });
196
- exports.OperatorUnlockCondIO = t.type({
197
- phase: t.string,
198
- level: t.number,
199
- });
200
- exports.LevelUpCostCondIO = t.type({
201
- unlockCond: exports.OperatorUnlockCondIO,
202
- lvlUpTime: t.number,
203
- levelUpCost: t.array(exports.LevelUpCostIO),
204
- });
205
- exports.StageDefinesIO = t.type({
206
- characterInsts: t.array(t.any),
207
- tokenInsts: t.array(t.type({
208
- position: t.type({
209
- row: t.number,
210
- col: t.number,
161
+ var OperatorUnlockCondZod = z.strictObject({
162
+ phase: z.union([z.string(), z.number()]),
163
+ level: z.number(),
164
+ });
165
+ var LevelUpCostCondZod = z.strictObject({
166
+ unlockCond: OperatorUnlockCondZod,
167
+ lvlUpTime: z.number(),
168
+ levelUpCost: z.union([z.array(LevelUpCostZod), z.null()]),
169
+ });
170
+ var StageDefinesZod = z.strictObject({
171
+ characterInsts: z.array(z.any()),
172
+ tokenInsts: z.array(z.strictObject({
173
+ position: z.strictObject({
174
+ row: z.number(),
175
+ col: z.number(),
211
176
  }),
212
- direction: t.number,
213
- hidden: t.boolean,
214
- alias: t.string,
215
- uniEquipIds: t.array(t.type({
216
- key: t.string,
217
- level: t.number,
218
- })),
219
- inst: t.type({
220
- characterKey: t.string,
221
- level: t.number,
222
- phase: t.number,
223
- favorPoint: t.number,
224
- potentialRank: t.number,
177
+ direction: z.union([z.string(), z.number()]), // legacy
178
+ hidden: z.boolean(),
179
+ alias: z.union([z.string(), z.null()]),
180
+ uniEquipIds: z.union([
181
+ z.array(z.strictObject({
182
+ key: z.string(),
183
+ level: z.number(),
184
+ })),
185
+ z.null(), z.undefined()
186
+ ] // legacy
187
+ ),
188
+ inst: z.strictObject({
189
+ characterKey: z.string(),
190
+ level: z.number(),
191
+ phase: z.union([z.string(), z.number()]), // legacy
192
+ favorPoint: z.number(),
193
+ potentialRank: z.number(),
225
194
  }),
226
- skillIndex: t.number,
227
- mainSkillLvl: t.number,
228
- skinId: t.string,
229
- tmplId: t.string,
230
- overrideSkillBlackboard: t.array(exports.BlackboardIO),
195
+ skillIndex: z.number(),
196
+ mainSkillLvl: z.number(),
197
+ skinId: z.union([z.string(), z.null()]),
198
+ tmplId: z.union([z.string(), z.null(), z.undefined()]),
199
+ overrideSkillBlackboard: z.union([z.array(BlackboardZod), z.null(), z.undefined()]),
231
200
  })),
232
- characterCards: t.array(t.any),
233
- tokenCards: t.array(t.any),
234
- });
235
- exports.StageEffectIO = t.type({
236
- key: t.string,
237
- offset: t.type({
238
- x: t.number,
239
- y: t.number,
240
- z: t.number,
241
- }),
242
- direction: t.number,
243
- });
244
- exports.StageDataIO = t.type({
245
- options: t.type({
246
- characterLimit: t.number,
247
- maxLifePoint: t.number,
248
- initialCost: t.number,
249
- maxCost: t.number,
250
- costIncreaseTime: t.number,
251
- moveMultiplier: t.number,
252
- steeringEnabled: t.boolean,
253
- isTrainingLevel: t.boolean,
254
- isHardTrainingLevel: t.boolean,
255
- functionDisableMask: t.number,
256
- }),
257
- levelId: t.string,
258
- mapId: t.string,
259
- bgmEvent: t.string,
260
- environmentSe: t.string,
261
- mapData: t.type({
262
- map: t.array(t.array(t.number)),
263
- tiles: t.array(t.type({
264
- tileKey: t.string,
265
- heightType: t.number,
266
- buildableType: t.number,
267
- passableMask: t.number,
268
- playerSideMask: t.number,
269
- blackboard: exports.BlackboardIO,
270
- effects: t.array(exports.StageEffectIO),
201
+ characterCards: z.array(z.any()),
202
+ tokenCards: z.array(z.any()),
203
+ });
204
+ var StageEffectZod = z.strictObject({
205
+ key: z.string(),
206
+ offset: z.strictObject({
207
+ x: z.number(),
208
+ y: z.number(),
209
+ z: z.number(),
210
+ }),
211
+ direction: z.union([z.string(), z.number()]), // legacy
212
+ });
213
+ var StageActionZod = z.strictObject({
214
+ actionType: z.union([z.string(), z.number()]), // legacy
215
+ managedByScheduler: z.boolean(),
216
+ key: z.string(),
217
+ count: z.number(),
218
+ preDelay: z.number(),
219
+ interval: z.number(),
220
+ routeIndex: z.number(),
221
+ blockFragment: z.boolean(),
222
+ autoPreviewRoute: z.boolean(),
223
+ autoDisplayEnemyInfo: z.union([z.boolean(), z.undefined()]), // legacy
224
+ isUnharmfulAndAlwaysCountAsKilled: z.boolean(),
225
+ hiddenGroup: z.union([z.string(), z.null()]),
226
+ randomSpawnGroupKey: z.union([z.string(), z.null(), z.undefined()]), // legacy
227
+ randomSpawnGroupPackKey: z.union([z.string(), z.null(), z.undefined()]), // ~
228
+ randomType: z.union([z.string(), z.number(), z.undefined()]), // ~
229
+ weight: z.union([z.number(), z.undefined()]), // ~
230
+ dontBlockWave: z.union([z.boolean(), z.undefined()]), // ~
231
+ isValid: z.union([z.boolean(), z.undefined()]), // ~
232
+ extraMeta: z.union([z.null(), z.undefined()]), // ~
233
+ });
234
+ var StageDataZod = z.strictObject({
235
+ options: z.strictObject({
236
+ characterLimit: z.number(),
237
+ maxLifePoint: z.number(),
238
+ initialCost: z.number(),
239
+ maxCost: z.number(),
240
+ costIncreaseTime: z.number(),
241
+ moveMultiplier: z.number(),
242
+ steeringEnabled: z.boolean(),
243
+ isTrainingLevel: z.boolean(),
244
+ isHardTrainingLevel: z.union([z.boolean(), z.undefined()]), // legacy
245
+ isPredefinedCardsSelectable: z.union([z.boolean(), z.undefined()]), // legacy
246
+ maxPlayTime: z.union([z.number(), z.undefined()]), // legacy
247
+ functionDisableMask: z.union([z.string(), z.number()]),
248
+ configBlackBoard: z.union([z.array(BlackboardZod), z.null(), z.undefined()]), // legacy
249
+ }),
250
+ levelId: z.union([z.string(), z.null()]),
251
+ mapId: z.union([z.string(), z.null()]),
252
+ bgmEvent: z.union([z.string(), z.null()]),
253
+ environmentSe: z.union([z.string(), z.null()]),
254
+ mapData: z.strictObject({
255
+ map: z.array(z.array(z.number())),
256
+ tiles: z.array(z.strictObject({
257
+ tileKey: z.string(),
258
+ heightType: z.union([z.string(), z.number()]), // keep number for legacy stages (monster hunter, vignettes, etc.)
259
+ buildableType: z.union([z.string(), z.number()]), // ~
260
+ passableMask: z.union([z.string(), z.number()]), // ~
261
+ playerSideMask: z.union([z.string(), z.number(), z.undefined()]), // ~
262
+ blackboard: z.union([z.array(BlackboardZod), z.null()]),
263
+ effects: z.union([z.array(StageEffectZod), z.null()]),
271
264
  })),
272
- blockEdges: t.null,
273
- tags: t.array(t.string),
274
- effects: t.array(exports.StageEffectIO),
275
- layerRects: t.array(t.string),
276
- width: t.number,
277
- height: t.number,
278
- }),
279
- tilesDisallowToLocate: t.array(t.any),
280
- runes: t.array(t.type({
281
- difficultyMask: t.number,
282
- key: t.string,
283
- professionMask: t.number,
284
- buildableMask: t.number,
285
- blackboard: t.array(exports.BlackboardIO),
286
- })),
287
- globalBuffs: t.array(t.type({
288
- prefabKey: t.string,
289
- blackboard: t.array(exports.BlackboardIO),
290
- overrideCameraEffect: t.null,
291
- passProfessionMaskFlag: t.boolean,
292
- professionMask: t.number,
293
- })),
294
- routes: t.array(t.type({
295
- motionMode: t.number,
296
- startPosition: t.type({
297
- row: t.number,
298
- col: t.number,
299
- }),
300
- endPosition: t.type({
301
- row: t.number,
302
- col: t.number,
303
- }),
304
- spawnRandomRange: t.type({
305
- x: t.number,
306
- y: t.number,
307
- }),
308
- spawnOffset: t.type({
309
- x: t.number,
310
- y: t.number,
311
- }),
312
- checkpoints: t.array(t.type({
313
- type: t.number,
314
- time: t.number,
315
- position: t.type({
316
- row: t.number,
317
- col: t.number,
318
- }),
319
- reachOffset: t.type({
320
- x: t.number,
321
- y: t.number,
322
- }),
323
- randomizeReachOffset: t.boolean,
324
- reachDistance: t.number,
265
+ blockEdges: z.union([z.array(z.any()), z.null()]),
266
+ tags: z.union([z.array(z.string()), z.null()]),
267
+ effects: z.union([z.array(StageEffectZod), z.null()]),
268
+ layerRects: z.union([z.null(), z.undefined()]),
269
+ width: z.number().optional(),
270
+ height: z.number().optional(),
271
+ }),
272
+ tilesDisallowToLocate: z.array(z.any()),
273
+ runes: z.union([
274
+ z.array(z.strictObject({
275
+ difficultyMask: z.union([z.string(), z.number()]), // legacy
276
+ key: z.string(),
277
+ professionMask: z.union([z.string(), z.number(), z.undefined()]), // legacy
278
+ buildableMask: z.union([z.string(), z.number()]), // legacy
279
+ blackboard: z.array(BlackboardZod),
325
280
  })),
326
- allowDiagonalMove: t.boolean,
327
- visitEveryTileCenter: t.boolean,
328
- visitEveryNodeCenter: t.boolean,
329
- visitEveryCheckPoint: t.boolean,
330
- })),
331
- extraRoutes: t.array(t.any),
332
- enemies: t.array(t.any),
333
- enemyDbRefs: t.array(t.type({
334
- useDb: t.boolean,
335
- id: t.string,
336
- level: t.number,
337
- overwrittenData: t.type({
338
- name: t.type({
339
- m_defined: t.boolean,
340
- m_value: t.number,
341
- }),
342
- description: t.type({
343
- m_defined: t.boolean,
344
- m_value: t.number,
281
+ z.null()
282
+ ]),
283
+ globalBuffs: z.union([
284
+ z.array(z.strictObject({
285
+ prefabKey: z.string(),
286
+ blackboard: z.union([z.array(BlackboardZod), z.null()]),
287
+ overrideCameraEffect: z.null(),
288
+ passProfessionMaskFlag: z.union([z.boolean(), z.undefined()]),
289
+ professionMask: z.union([z.string(), z.number(), z.undefined()]),
290
+ useExtraData: z.boolean().optional(),
291
+ })),
292
+ z.null()
293
+ ]),
294
+ routes: z.array(z.union([
295
+ z.strictObject({
296
+ motionMode: z.union([z.string(), z.number()]), // keep number for legacy
297
+ startPosition: z.strictObject({
298
+ row: z.number(),
299
+ col: z.number(),
345
300
  }),
346
- prefabKey: t.type({
347
- m_defined: t.boolean,
348
- m_value: t.number,
301
+ endPosition: z.strictObject({
302
+ row: z.number(),
303
+ col: z.number(),
349
304
  }),
350
- attributes: exports.EnemyAttributesIO,
351
- lifePointReduce: t.type({
352
- m_defined: t.boolean,
353
- m_value: t.number,
305
+ spawnRandomRange: z.strictObject({
306
+ x: z.number(),
307
+ y: z.number(),
354
308
  }),
355
- rangeRadius: t.type({
356
- m_defined: t.boolean,
357
- m_value: t.number,
309
+ spawnOffset: z.strictObject({
310
+ x: z.number(),
311
+ y: z.number(),
358
312
  }),
359
- talentBlackboard: t.array(exports.BlackboardIO),
360
- skills: t.array(exports.EnemySkillsIO),
361
- spData: exports.EnemySpDataIO,
313
+ checkpoints: z.union([
314
+ z.array(z.strictObject({
315
+ type: z.union([z.string(), z.number()]), // keep number for legacy
316
+ time: z.number(),
317
+ position: z.strictObject({
318
+ row: z.number(),
319
+ col: z.number(),
320
+ }),
321
+ reachOffset: z.strictObject({
322
+ x: z.number(),
323
+ y: z.number(),
324
+ }),
325
+ randomizeReachOffset: z.boolean(),
326
+ reachDistance: z.number(),
327
+ })),
328
+ z.null()
329
+ ]),
330
+ allowDiagonalMove: z.boolean(),
331
+ visitEveryTileCenter: z.boolean(),
332
+ visitEveryNodeCenter: z.boolean(),
333
+ visitEveryCheckPoint: z.union([z.boolean(), z.undefined()]), // legacy
362
334
  }),
335
+ z.null() // legacy
336
+ ])),
337
+ extraRoutes: z.union([z.array(z.any()), z.undefined()]),
338
+ enemies: z.array(z.any()),
339
+ enemyDbRefs: z.array(z.strictObject({
340
+ useDb: z.boolean(),
341
+ id: z.string(),
342
+ level: z.number(),
343
+ overwrittenData: z.union([EnemyDataZod, z.null()]),
363
344
  })),
364
- waves: t.array(t.type({
365
- preDelay: t.number,
366
- postDelay: t.number,
367
- maxTimeWaitingForNextWave: t.number,
368
- fragments: t.array(t.type({
369
- preDelay: t.number,
370
- actions: t.array(t.type({
371
- actionType: t.number,
372
- managedByScheduler: t.boolean,
373
- key: t.string,
374
- count: t.number,
375
- preDelay: t.number,
376
- interval: t.number,
377
- routeIndex: t.number,
378
- blockFragment: t.boolean,
379
- autoPreviewRoute: t.boolean,
380
- isUnharmfulAndAlwaysCountAsKilled: t.boolean,
381
- hiddenGroup: t.string,
382
- randomSpawnGroupKey: t.string,
383
- weight: t.number,
384
- dontBlockWave: t.boolean,
385
- })),
386
- name: t.string,
345
+ waves: z.array(z.strictObject({
346
+ preDelay: z.number(),
347
+ postDelay: z.number(),
348
+ maxTimeWaitingForNextWave: z.number(),
349
+ fragments: z.array(z.strictObject({
350
+ preDelay: z.number(),
351
+ actions: z.array(StageActionZod),
352
+ name: z.string().nullable().optional(),
387
353
  })),
354
+ advancedWaveTag: z.union([z.string(), z.null(), z.undefined()]), // legacy
355
+ name: z.string().nullable().optional(),
388
356
  })),
389
- branches: t.type({
390
- frosts: t.type({
391
- phases: t.array(t.type({
392
- preDelay: t.number,
393
- actions: t.array(t.type({
394
- actionType: t.number,
395
- managedByScheduler: t.boolean,
396
- key: t.string,
397
- count: t.number,
398
- preDelay: t.number,
399
- interval: t.number,
400
- routeIndex: t.number,
401
- blockFragment: t.boolean,
402
- autoPreviewRoute: t.boolean,
403
- isUnharmfulAndAlwaysCountAsKilled: t.boolean,
404
- hiddenGroup: t.string,
405
- randomSpawnGroupKey: t.string,
406
- weight: t.number,
407
- weightValue: t.number,
408
- })),
357
+ branches: z.union([
358
+ z.record(z.string(), z.strictObject({
359
+ phases: z.array(z.strictObject({
360
+ preDelay: z.number(),
361
+ actions: z.array(StageActionZod),
362
+ m_randomActionGroups: z.null().optional(),
363
+ m_actionWithRandomSpawn: z.null().optional(),
364
+ m_validActionPackKeys: z.null().optional(),
409
365
  })),
410
- }),
411
- }),
412
- predefines: exports.StageDefinesIO,
413
- hardPredefines: exports.StageDefinesIO,
414
- excludeCharIdList: t.null,
415
- randomSeed: t.number,
416
- operaConfig: t.string,
417
- });
418
- exports.RogueRelicIO = t.type({
419
- id: t.string,
420
- name: t.string,
421
- description: t.string,
422
- usage: t.string,
423
- obtainApproach: t.string,
424
- iconId: t.string,
425
- type: t.string,
426
- subType: t.string,
427
- rarity: t.string,
428
- value: t.number,
429
- sortId: t.number,
430
- canSacrifice: t.boolean,
431
- unlockCondDesc: t.string,
432
- });
433
- exports.RogueStageIO = t.type({
434
- excel: t.type({
435
- id: t.string,
436
- linkedStageId: t.string,
437
- levelId: t.string,
438
- code: t.string,
439
- name: t.string,
440
- loadingPicId: t.string,
441
- description: t.string,
442
- eliteDesc: t.string,
443
- isBoss: t.number,
444
- isElite: t.number,
445
- difficulty: t.string,
446
- capsulePool: t.string,
447
- capsuleProb: t.number,
448
- vutresProb: t.array(t.number),
449
- boxProb: t.array(t.number),
450
- }),
451
- levels: exports.StageDataIO,
452
- });
453
- exports.RogueVariationIO = t.type({
454
- id: t.string,
455
- type: t.string,
456
- outerName: t.string,
457
- innerName: t.string,
458
- functionDesc: t.string,
459
- desc: t.string,
460
- iconId: t.string,
461
- sound: t.string,
462
- });
463
- exports.SandboxStageIO = t.type({
464
- excel: t.type({
465
- stageId: t.string,
466
- levelId: t.string,
467
- code: t.string,
468
- name: t.string,
469
- loadingPicId: t.string,
470
- description: t.string,
471
- actionCost: t.number,
472
- powerCost: t.number,
473
- }),
474
- levels: exports.StageDataIO,
475
- });
476
- exports.BaseIO = t.type({
477
- buffId: t.string,
478
- buffName: t.string,
479
- buffIcon: t.string,
480
- skillIcon: t.string,
481
- sortId: t.number,
482
- buffColor: t.string,
483
- textColor: t.string,
484
- buffCategory: t.string,
485
- roomType: t.string,
486
- description: t.string,
487
- });
488
- exports.CCStageIO = t.type({
489
- const: t.type({
490
- levelId: t.string,
491
- location: t.string,
492
- name: t.string,
493
- description: t.string,
494
- }),
495
- levels: exports.StageDataIO,
496
- });
497
- exports.DefinitionIO = t.type({
498
- termId: t.string,
499
- termName: t.string,
500
- description: t.string,
501
- });
502
- exports.EnemyIO = t.type({
503
- excel: t.type({
504
- enemyId: t.string,
505
- enemyIndex: t.string,
506
- enemyTags: t.array(t.string),
507
- sortId: t.number,
508
- name: t.string,
509
- enemyRace: t.string,
510
- enemyLevel: t.string,
511
- description: t.string,
512
- attackType: t.string,
513
- endure: t.string,
514
- attack: t.string,
515
- defence: t.string,
516
- resistance: t.string,
517
- ability: t.string,
518
- isInvalidKilled: t.boolean,
519
- overrideKillCntInfos: t.record(t.string, t.any),
520
- hideInHandbook: t.boolean,
521
- }),
522
- levels: t.type({
523
- Key: t.string,
524
- Value: t.array(t.type({
525
- level: t.number,
526
- enemyData: t.type({
527
- name: t.type({
528
- m_defined: t.boolean,
529
- m_value: t.string,
530
- }),
531
- description: t.type({
532
- m_defined: t.boolean,
533
- m_value: t.string,
534
- }),
535
- prefabKey: t.type({
536
- m_defined: t.boolean,
537
- m_value: t.string,
538
- }),
539
- attributes: exports.EnemyAttributesIO,
540
- lifePointReduce: t.type({
541
- m_defined: t.boolean,
542
- m_value: t.number,
543
- }),
544
- levelType: t.type({
545
- m_defined: t.boolean,
546
- m_value: t.number,
547
- }),
548
- rangeRadius: t.type({
549
- m_defined: t.boolean,
550
- m_value: t.number,
551
- }),
552
- numOfExtraDrops: t.type({
553
- m_defined: t.boolean,
554
- m_value: t.number,
555
- }),
556
- talentBlackboard: t.array(exports.BlackboardIO),
557
- skills: t.array(exports.EnemySkillsIO),
558
- spData: exports.EnemySpDataIO,
559
- }),
366
+ })),
367
+ z.null()
368
+ ]),
369
+ predefines: z.union([StageDefinesZod, z.null()]),
370
+ hardPredefines: z.union([StageDefinesZod, z.null(), z.undefined()]),
371
+ excludeCharIdList: z.null(),
372
+ randomSeed: z.number(),
373
+ operaConfig: z.union([z.string(), z.null(), z.undefined()]),
374
+ runtimeData: z.union([z.null(), z.undefined()]), // legacy
375
+ });
376
+ var RogueRelicZod = z.strictObject({
377
+ id: z.string(),
378
+ name: z.string(),
379
+ description: z.union([z.string(), z.null()]),
380
+ usage: z.string(),
381
+ obtainApproach: z.string(),
382
+ iconId: z.string(),
383
+ type: z.string(),
384
+ subType: z.string(),
385
+ rarity: z.string(),
386
+ value: z.number(),
387
+ sortId: z.number(),
388
+ canSacrifice: z.boolean(),
389
+ unlockCondDesc: z.union([z.string(), z.null()]),
390
+ });
391
+ var RogueStageZod = z.strictObject({
392
+ excel: z.strictObject({
393
+ id: z.string(),
394
+ linkedStageId: z.string(),
395
+ levelId: z.string(),
396
+ code: z.string(),
397
+ name: z.string(),
398
+ loadingPicId: z.string(),
399
+ description: z.string(),
400
+ eliteDesc: z.union([z.string(), z.null()]),
401
+ isBoss: z.number(),
402
+ isElite: z.number(),
403
+ difficulty: z.string(),
404
+ capsulePool: z.union([z.string(), z.null()]),
405
+ capsuleProb: z.number(),
406
+ vutresProb: z.array(z.number()),
407
+ boxProb: z.array(z.number()),
408
+ specialNodeId: z.string().nullable(),
409
+ }),
410
+ levels: StageDataZod,
411
+ });
412
+ var RogueVariationZod = z.strictObject({
413
+ id: z.string(),
414
+ type: z.string(),
415
+ outerName: z.string(),
416
+ innerName: z.string(),
417
+ functionDesc: z.string(),
418
+ desc: z.string(),
419
+ iconId: z.union([z.string(), z.null()]),
420
+ sound: z.union([z.string(), z.null()]),
421
+ });
422
+ var SandboxStageZod = z.strictObject({
423
+ excel: z.strictObject({
424
+ stageId: z.string(),
425
+ levelId: z.string(),
426
+ code: z.string(),
427
+ name: z.string(),
428
+ loadingPicId: z.string(),
429
+ description: z.string(),
430
+ actionCost: z.number(),
431
+ powerCost: z.number(),
432
+ }),
433
+ levels: StageDataZod,
434
+ });
435
+ exports.BaseZod = z.strictObject({
436
+ buffId: z.string(),
437
+ buffName: z.string(),
438
+ buffIcon: z.string(),
439
+ skillIcon: z.string(),
440
+ sortId: z.number(),
441
+ buffColor: z.string(),
442
+ textColor: z.string(),
443
+ buffCategory: z.string(),
444
+ roomType: z.string(),
445
+ description: z.string(),
446
+ });
447
+ exports.CCStageZod = z.strictObject({
448
+ const: z.strictObject({
449
+ levelId: z.string(),
450
+ location: z.string(),
451
+ name: z.string(),
452
+ description: z.string(),
453
+ }),
454
+ levels: StageDataZod,
455
+ });
456
+ exports.DefinitionZod = z.strictObject({
457
+ termId: z.string(),
458
+ termName: z.string(),
459
+ description: z.string(),
460
+ });
461
+ exports.EnemyZod = z.strictObject({
462
+ excel: z.strictObject({
463
+ enemyId: z.string(),
464
+ enemyIndex: z.string(),
465
+ enemyTags: z.union([z.array(z.string()), z.null()]),
466
+ sortId: z.number(),
467
+ name: z.string(),
468
+ enemyLevel: z.enum(['NORMAL', 'ELITE', 'BOSS']),
469
+ description: z.string(),
470
+ attackType: z.null(),
471
+ ability: z.null(),
472
+ isInvalidKilled: z.boolean(),
473
+ overrideKillCntInfos: z.record(z.string(), z.any()),
474
+ hideInHandbook: z.boolean(),
475
+ abilityList: z.array(z.strictObject({
476
+ text: z.string(),
477
+ textFormat: z.enum(['NORMAL', 'SILENCE', 'TITLE'])
478
+ })),
479
+ linkEnemies: z.array(z.string()),
480
+ damageType: z.array(z.enum(['PHYSIC', 'MAGIC', 'NO_DAMAGE', 'HEAL'])),
481
+ invisibleDetail: z.boolean(),
482
+ }),
483
+ levels: z.strictObject({
484
+ Key: z.string(),
485
+ Value: z.array(z.strictObject({
486
+ level: z.number(),
487
+ enemyData: EnemyDataZod,
560
488
  })),
561
489
  }),
562
490
  });
563
- exports.GameEventIO = t.type({
564
- id: t.string,
565
- type: t.string,
566
- displayType: t.string,
567
- name: t.string,
568
- startTime: t.number,
569
- endTime: t.number,
570
- rewardEndTime: t.number,
571
- displayOnHome: t.boolean,
572
- hasStage: t.boolean,
573
- templateShopId: t.string,
574
- medalGroupId: t.string,
575
- isReplicate: t.boolean,
576
- });
577
- exports.ItemIO = t.type({
578
- data: t.type({
579
- itemId: t.string,
580
- name: t.string,
581
- description: t.string,
582
- rarity: t.number,
583
- iconId: t.string,
584
- overrideBkg: t.null,
585
- stackIconId: t.string,
586
- sortId: t.number,
587
- usage: t.string,
588
- obtainApproach: t.string,
589
- classifyType: t.string,
590
- itemType: t.string,
591
- stageDropList: t.array(t.type({
592
- stageId: t.string,
593
- occPer: t.string,
491
+ exports.GameEventZod = z.strictObject({
492
+ id: z.string(),
493
+ type: z.string(),
494
+ displayType: z.string(),
495
+ name: z.string(),
496
+ startTime: z.number(),
497
+ endTime: z.number(),
498
+ rewardEndTime: z.number(),
499
+ displayOnHome: z.boolean(),
500
+ hasStage: z.boolean(),
501
+ templateShopId: z.union([z.string(), z.null()]),
502
+ medalGroupId: z.union([z.string(), z.null()]),
503
+ ungroupedMedalIds: z.array(z.string()).nullable(),
504
+ isReplicate: z.boolean(),
505
+ needFixedSync: z.boolean(),
506
+ });
507
+ exports.GridRangeZod = z.strictObject({
508
+ id: z.string(),
509
+ direction: z.number(),
510
+ grids: z.array(z.strictObject({
511
+ row: z.number(),
512
+ col: z.number(),
513
+ })),
514
+ });
515
+ exports.ItemZod = z.strictObject({
516
+ data: z.strictObject({
517
+ itemId: z.string(),
518
+ name: z.string(),
519
+ description: z.union([z.string(), z.null()]),
520
+ rarity: z.string(),
521
+ iconId: z.string(),
522
+ overrideBkg: z.null(),
523
+ stackIconId: z.union([z.string(), z.null()]),
524
+ sortId: z.number(),
525
+ usage: z.union([z.string(), z.null()]),
526
+ obtainApproach: z.union([z.string(), z.null()]),
527
+ hideInItemGet: z.boolean(),
528
+ classifyType: z.string(),
529
+ itemType: z.string(),
530
+ stageDropList: z.array(z.strictObject({
531
+ stageId: z.string(),
532
+ occPer: z.string(),
594
533
  })),
595
- buildingProductList: t.array(t.type({
596
- roomType: t.string,
597
- formulaId: t.string,
534
+ buildingProductList: z.array(z.strictObject({
535
+ roomType: z.string(),
536
+ formulaId: z.string(),
598
537
  })),
599
538
  }),
600
- formula: t.union([exports.ManufactFormulaIO, exports.WorkshopFormulaIO]),
601
- });
602
- exports.ModuleIO = t.type({
603
- info: t.type({
604
- uniEquipId: t.string,
605
- uniEquipName: t.string,
606
- uniEquipIcon: t.string,
607
- uniEquipDesc: t.string,
608
- typeIcon: t.string,
609
- typeName1: t.string,
610
- typeName2: t.string,
611
- equipShiningColor: t.string,
612
- showEvolvePhase: t.number,
613
- unlockEvolvePhase: t.number,
614
- charId: t.string,
615
- tmplId: t.string,
616
- showLevel: t.number,
617
- unlockLevel: t.number,
618
- unlockFavorPoint: t.number,
619
- missionList: t.array(t.string),
620
- itemCost: t.record(t.string, t.array(exports.LevelUpCostIO)),
621
- type: t.string,
622
- uniEquipGetTime: t.number,
623
- charEquipOrder: t.number,
624
- }),
625
- data: t.type({
626
- phases: t.array(t.type({
627
- equipLevel: t.number,
628
- parts: t.array(t.type({
629
- resKey: t.string,
630
- target: t.string,
631
- isToken: t.boolean,
632
- addOrOverrideTalentDataBundle: t.type({
633
- candidates: t.array(t.type({
634
- displayRangeId: t.boolean,
635
- upgradeDescription: t.string,
636
- talentIndex: t.number,
637
- unlockCondition: exports.OperatorUnlockCondIO,
638
- requiredPotentialRank: t.number,
639
- prefabKey: t.string,
640
- name: t.string,
641
- description: t.string,
642
- rangeId: t.string,
643
- blackboard: t.array(exports.BlackboardIO),
644
- })),
645
- }),
646
- overrideTraitDataBundle: t.type({
647
- candidates: t.array(t.type({
648
- additionalDescription: t.string,
649
- unlockCondition: exports.OperatorUnlockCondIO,
650
- requiredPotentialRank: t.number,
651
- blackboard: t.array(exports.BlackboardIO),
652
- overrideDescripton: t.string,
653
- prefabKey: t.string,
654
- rangeId: t.string,
655
- })),
656
- }),
539
+ formula: z.union([ManufactFormulaZod, WorkshopFormulaZod, z.null()]),
540
+ });
541
+ exports.ModuleZod = z.strictObject({
542
+ info: z.strictObject({
543
+ uniEquipId: z.string(),
544
+ uniEquipName: z.string(),
545
+ uniEquipIcon: z.string(),
546
+ uniEquipDesc: z.string(),
547
+ typeIcon: z.string(),
548
+ typeName1: z.string(),
549
+ typeName2: z.union([z.string(), z.null()]),
550
+ equipShiningColor: z.string(),
551
+ showEvolvePhase: z.string(),
552
+ unlockEvolvePhase: z.string(),
553
+ charId: z.string(),
554
+ tmplId: z.union([z.string(), z.null()]),
555
+ showLevel: z.number(),
556
+ unlockLevel: z.number(),
557
+ unlockFavorPoint: z.number(),
558
+ missionList: z.array(z.string()),
559
+ itemCost: z.union([z.record(z.string(), z.array(LevelUpCostZod)), z.null()]),
560
+ type: z.string(),
561
+ uniEquipGetTime: z.number(),
562
+ charEquipOrder: z.number(),
563
+ }),
564
+ data: z.union([
565
+ z.strictObject({
566
+ phases: z.array(z.strictObject({
567
+ equipLevel: z.number(),
568
+ parts: z.array(z.strictObject({
569
+ resKey: z.union([z.string(), z.null()]),
570
+ target: z.string(),
571
+ isToken: z.boolean(),
572
+ addOrOverrideTalentDataBundle: z.strictObject({
573
+ candidates: z.union([
574
+ z.array(z.strictObject({
575
+ displayRangeId: z.boolean(),
576
+ upgradeDescription: z.string(),
577
+ talentIndex: z.number(),
578
+ unlockCondition: OperatorUnlockCondZod,
579
+ requiredPotentialRank: z.number(),
580
+ prefabKey: z.string(),
581
+ name: z.union([z.string(), z.null()]),
582
+ description: z.union([z.string(), z.null()]),
583
+ rangeId: z.union([z.string(), z.null()]),
584
+ blackboard: z.array(BlackboardZod),
585
+ tokenKey: z.string().optional(),
586
+ })),
587
+ z.null()
588
+ ]),
589
+ }),
590
+ overrideTraitDataBundle: z.strictObject({
591
+ candidates: z.union([
592
+ z.array(z.strictObject({
593
+ additionalDescription: z.union([z.string(), z.null()]),
594
+ unlockCondition: OperatorUnlockCondZod,
595
+ requiredPotentialRank: z.number(),
596
+ blackboard: z.array(BlackboardZod),
597
+ overrideDescripton: z.union([z.string(), z.null()]),
598
+ prefabKey: z.union([z.string(), z.null()]),
599
+ rangeId: z.union([z.string(), z.null()]),
600
+ })),
601
+ z.null()
602
+ ]),
603
+ }),
604
+ })),
605
+ attributeBlackboard: z.array(BlackboardZod),
606
+ tokenAttributeBlackboard: z.record(z.string(), z.array(BlackboardZod)),
657
607
  })),
658
- attributeBlackboard: t.array(exports.BlackboardIO),
659
- tokenAttributeBlackboard: t.record(t.string, t.array(exports.BlackboardIO)),
660
- })),
661
- }),
662
- });
663
- exports.ParadoxIO = t.type({
664
- excel: t.type({
665
- charId: t.string,
666
- stageId: t.string,
667
- levelId: t.string,
668
- zoneId: t.string,
669
- code: t.string,
670
- name: t.string,
671
- loadingPicId: t.string,
672
- description: t.string,
673
- unlockParam: t.array(t.type({
674
- unlockType: t.number,
675
- unlockParam1: t.string,
676
- unlockParam2: t.string,
677
- unlockParam3: t.null,
608
+ }),
609
+ z.null()
610
+ ]),
611
+ });
612
+ exports.ParadoxZod = z.strictObject({
613
+ excel: z.strictObject({
614
+ charId: z.string(),
615
+ stageId: z.string(),
616
+ levelId: z.string(),
617
+ zoneId: z.string(),
618
+ code: z.string(),
619
+ name: z.string(),
620
+ loadingPicId: z.string(),
621
+ description: z.string(),
622
+ unlockParam: z.array(z.strictObject({
623
+ unlockType: z.string(),
624
+ unlockParam1: z.string(),
625
+ unlockParam2: z.string(),
626
+ unlockParam3: z.null(),
678
627
  })),
679
- rewardItem: t.array(t.type({
680
- id: t.string,
681
- count: t.number,
682
- type: t.string,
628
+ rewardItem: z.array(z.strictObject({
629
+ id: z.string(),
630
+ count: z.number(),
631
+ type: z.string(),
683
632
  })),
684
- stageNameForShow: t.string,
685
- zoneNameForShow: t.string,
686
- picId: t.string,
687
- stageGetTime: t.number,
688
- }),
689
- levels: exports.StageDataIO,
690
- });
691
- exports.RogueThemeIO = t.type({
692
- name: t.string,
693
- stageDict: t.record(t.string, exports.RogueStageIO),
694
- toughStageDict: t.record(t.string, exports.RogueStageIO),
695
- relicDict: t.record(t.string, exports.RogueRelicIO),
696
- variationDict: t.record(t.string, exports.RogueVariationIO),
697
- });
698
- exports.SandboxActIO = t.type({
699
- stageDict: t.record(t.string, exports.SandboxStageIO),
700
- });
701
- exports.SkillIO = t.type({
702
- skillId: t.string,
703
- iconId: t.string,
704
- hidden: t.boolean,
705
- levels: t.array(t.type({
706
- name: t.string,
707
- rangeId: t.string,
708
- description: t.string,
709
- skillType: t.string,
710
- durationType: t.number,
711
- spData: t.type({
712
- spType: t.string,
713
- levelUpCost: t.null,
714
- maxChargeTime: t.number,
715
- spCost: t.number,
716
- initSp: t.number,
717
- increment: t.number,
633
+ stageNameForShow: z.string(),
634
+ zoneNameForShow: z.string(),
635
+ picId: z.string(),
636
+ stageGetTime: z.number(),
637
+ }),
638
+ levels: StageDataZod,
639
+ });
640
+ exports.RogueThemeZod = z.strictObject({
641
+ name: z.string(),
642
+ stageDict: z.record(z.string(), RogueStageZod),
643
+ toughStageDict: z.record(z.string(), RogueStageZod),
644
+ relicDict: z.record(z.string(), RogueRelicZod),
645
+ variationDict: z.record(z.string(), RogueVariationZod),
646
+ });
647
+ exports.SandboxActZod = z.strictObject({
648
+ stageDict: z.record(z.string(), SandboxStageZod),
649
+ });
650
+ exports.SkillZod = z.strictObject({
651
+ skillId: z.string(),
652
+ iconId: z.union([z.string(), z.null()]),
653
+ hidden: z.boolean(),
654
+ levels: z.array(z.strictObject({
655
+ name: z.string(),
656
+ rangeId: z.union([z.string(), z.null()]),
657
+ description: z.union([z.string(), z.null()]),
658
+ skillType: z.string(),
659
+ durationType: z.string(),
660
+ spData: z.strictObject({
661
+ spType: z.union([z.string(), z.number()]),
662
+ levelUpCost: z.null(),
663
+ maxChargeTime: z.number(),
664
+ spCost: z.number(),
665
+ initSp: z.number(),
666
+ increment: z.number(),
718
667
  }),
719
- prefabId: t.string,
720
- duration: t.number,
721
- blackboard: t.array(exports.BlackboardIO),
668
+ prefabId: z.union([z.string(), z.null()]),
669
+ duration: z.number(),
670
+ blackboard: z.array(BlackboardZod),
722
671
  })),
723
672
  });
724
- exports.SkinIO = t.type({
725
- skinId: t.string,
726
- charId: t.string,
727
- tokenSkinMap: t.array(t.type({
728
- tokenId: t.string,
729
- tokenSkinId: t.string,
730
- })),
731
- illustId: t.string,
732
- dynIllustId: t.string,
733
- avatarId: t.string,
734
- portraitId: t.string,
735
- dynPortraitId: t.string,
736
- dynEntranceId: t.string,
737
- buildingId: t.string,
738
- battleSkin: t.type({
739
- overwritePrefab: t.boolean,
740
- skinOrPrefabId: t.string,
741
- }),
742
- isBuySkin: t.boolean,
743
- tmplId: t.string,
744
- voiceId: t.string,
745
- voiceType: t.string,
746
- displaySkin: t.type({
747
- skinName: t.string,
748
- colorList: t.tuple([t.string, t.string, t.string, t.string, t.string]),
749
- titleList: t.tuple([t.string, t.string]),
750
- modelName: t.string,
751
- drawerList: t.array(t.string),
752
- skinGroupId: t.string,
753
- skinGroupName: t.string,
754
- skinGroupSortIndex: t.number,
755
- content: t.string,
756
- dialog: t.string,
757
- usage: t.string,
758
- description: t.string,
759
- obtainApproach: t.string,
760
- sortId: t.number,
761
- displayTagId: t.string,
762
- getTime: t.number,
763
- onYear: t.number,
764
- onPeriod: t.number,
765
- }),
766
- });
767
- exports.StageIO = t.type({
768
- excel: t.type({
769
- stageType: t.string,
770
- difficulty: t.string,
771
- performanceStageFlag: t.string,
772
- diffGroup: t.string,
773
- unlockCondition: t.array(t.type({
774
- stageId: t.string,
775
- completeState: t.number,
673
+ exports.SkinZod = z.strictObject({
674
+ skinId: z.string(),
675
+ charId: z.string(),
676
+ tokenSkinMap: z.union([
677
+ z.array(z.strictObject({
678
+ tokenId: z.string(),
679
+ tokenSkinId: z.string(),
776
680
  })),
777
- stageId: t.string,
778
- levelId: t.string,
779
- zoneId: t.string,
780
- code: t.string,
781
- name: t.string,
782
- description: t.string,
783
- hardStagedId: t.string,
784
- dangerLevel: t.string,
785
- dangerPoint: t.number,
786
- loadingPicId: t.string,
787
- canPractice: t.boolean,
788
- canBattleReplay: t.boolean,
789
- apCost: t.number,
790
- apFailReturn: t.number,
791
- etItemId: t.string,
792
- etCost: t.number,
793
- etFailReturn: t.number,
794
- etButtonStyle: t.string,
795
- apProtectTimes: t.number,
796
- diamondOnceDrop: t.number,
797
- practiceTicketCost: t.number,
798
- dailyStageDifficulty: t.number,
799
- expGain: t.number,
800
- goldGain: t.number,
801
- loseExpGain: t.number,
802
- loseGoldGain: t.number,
803
- passFavor: t.number,
804
- completeFavor: t.number,
805
- slProgress: t.number,
806
- displayMainItem: t.string,
807
- hilightMark: t.boolean,
808
- bossMark: t.boolean,
809
- isPredefined: t.boolean,
810
- isHardPredefined: t.boolean,
811
- isSkillSelectablePredefined: t.boolean,
812
- isStoryOnly: t.boolean,
813
- appearanceStyle: t.number,
814
- stageDropInfo: t.type({
815
- firstPassRewards: t.null,
816
- firstCompleteRewards: t.null,
817
- passRewards: t.null,
818
- completeRewards: t.null,
819
- displayRewards: t.array(t.type({
820
- type: t.string,
821
- id: t.string,
822
- dropType: t.string,
681
+ z.null()
682
+ ]),
683
+ illustId: z.union([z.string(), z.null()]),
684
+ dynIllustId: z.union([z.string(), z.null()]),
685
+ avatarId: z.string(),
686
+ portraitId: z.union([z.string(), z.null()]),
687
+ dynPortraitId: z.union([z.string(), z.null()]),
688
+ dynEntranceId: z.union([z.string(), z.null()]),
689
+ buildingId: z.union([z.string(), z.null()]),
690
+ battleSkin: z.strictObject({
691
+ overwritePrefab: z.boolean(),
692
+ skinOrPrefabId: z.union([z.string(), z.null()]),
693
+ }),
694
+ isBuySkin: z.boolean(),
695
+ tmplId: z.union([z.string(), z.null()]),
696
+ voiceId: z.union([z.string(), z.null()]),
697
+ voiceType: z.string(),
698
+ displaySkin: z.strictObject({
699
+ skinName: z.union([z.string(), z.null()]),
700
+ colorList: z.union([z.array(z.string()), z.null()]),
701
+ titleList: z.array(z.string()).nullable(),
702
+ modelName: z.union([z.string(), z.null()]),
703
+ drawerList: z.union([z.array(z.string()), z.null()]),
704
+ designerList: z.array(z.string()).nullable(),
705
+ skinGroupId: z.union([z.string(), z.null()]),
706
+ skinGroupName: z.union([z.string(), z.null()]),
707
+ skinGroupSortIndex: z.number(),
708
+ content: z.union([z.string(), z.null()]),
709
+ dialog: z.union([z.string(), z.null()]),
710
+ usage: z.union([z.string(), z.null()]),
711
+ description: z.union([z.string(), z.null()]),
712
+ obtainApproach: z.union([z.string(), z.null()]),
713
+ sortId: z.number(),
714
+ displayTagId: z.union([z.string(), z.null()]),
715
+ getTime: z.number(),
716
+ onYear: z.number(),
717
+ onPeriod: z.number(),
718
+ }),
719
+ });
720
+ exports.StageZod = z.strictObject({
721
+ excel: z.strictObject({
722
+ stageType: z.string(),
723
+ difficulty: z.string(),
724
+ performanceStageFlag: z.string(),
725
+ diffGroup: z.string(),
726
+ unlockCondition: z.array(z.union([
727
+ z.strictObject({
728
+ stageId: z.string(),
729
+ completeState: z.string(),
730
+ }),
731
+ z.null()
732
+ ])),
733
+ stageId: z.string(),
734
+ levelId: z.string(),
735
+ zoneId: z.string(),
736
+ code: z.string(),
737
+ name: z.string(),
738
+ description: z.string(),
739
+ hardStagedId: z.union([z.string(), z.null()]),
740
+ dangerLevel: z.union([z.string(), z.null()]),
741
+ dangerPoint: z.number(),
742
+ loadingPicId: z.string(),
743
+ canPractice: z.boolean(),
744
+ canBattleReplay: z.boolean(),
745
+ apCost: z.number(),
746
+ apFailReturn: z.number(),
747
+ etItemId: z.union([z.string(), z.null()]),
748
+ etCost: z.number(),
749
+ etFailReturn: z.number(),
750
+ etButtonStyle: z.union([z.string(), z.null()]),
751
+ apProtectTimes: z.number(),
752
+ diamondOnceDrop: z.number(),
753
+ practiceTicketCost: z.number(),
754
+ dailyStageDifficulty: z.number(),
755
+ expGain: z.number(),
756
+ goldGain: z.number(),
757
+ loseExpGain: z.number(),
758
+ loseGoldGain: z.number(),
759
+ passFavor: z.number(),
760
+ completeFavor: z.number(),
761
+ slProgress: z.number(),
762
+ displayMainItem: z.union([z.string(), z.null()]),
763
+ hilightMark: z.boolean(),
764
+ bossMark: z.boolean(),
765
+ isPredefined: z.boolean(),
766
+ isHardPredefined: z.boolean(),
767
+ isSkillSelectablePredefined: z.boolean(),
768
+ isStoryOnly: z.boolean(),
769
+ appearanceStyle: z.string(),
770
+ stageDropInfo: z.strictObject({
771
+ firstPassRewards: z.null(),
772
+ firstCompleteRewards: z.null(),
773
+ passRewards: z.null(),
774
+ completeRewards: z.null(),
775
+ displayRewards: z.array(z.strictObject({
776
+ type: z.string(),
777
+ id: z.string(),
778
+ dropType: z.string(),
823
779
  })),
824
- displayDetailRewards: t.array(t.type({
825
- occPercent: t.number,
826
- type: t.string,
827
- id: t.string,
828
- dropType: t.string,
780
+ displayDetailRewards: z.array(z.strictObject({
781
+ occPercent: z.string(),
782
+ type: z.string(),
783
+ id: z.string(),
784
+ dropType: z.string(),
829
785
  })),
830
786
  }),
831
- startButtonOverrideId: t.string,
832
- isStagePatch: t.boolean,
833
- mainStageId: t.string,
834
- }),
835
- levels: exports.StageDataIO,
836
- });
837
- exports.OperatorIO = t.type({
838
- id: t.string,
839
- recruit: t.number,
840
- archetype: t.string,
841
- range: exports.GridRangeIO,
842
- skills: t.array(exports.SkillIO),
843
- modules: t.array(exports.ModuleIO),
844
- skins: t.array(exports.SkinIO),
845
- bases: t.array(t.type({
846
- condition: t.type({
847
- buffId: t.string,
848
- cond: exports.OperatorUnlockCondIO,
849
- }),
850
- skill: exports.BaseIO,
851
- })),
852
- paradox: exports.ParadoxIO,
853
- data: t.type({
854
- name: t.string,
855
- description: t.string,
856
- canUseGeneralPotentialItem: t.boolean,
857
- potentialItemId: t.string,
858
- nationId: t.string,
859
- groupId: t.string,
860
- teamId: t.string,
861
- displayNumber: t.string,
862
- tokenKey: t.string,
863
- appellation: t.string,
864
- position: t.string,
865
- tagList: t.array(t.string),
866
- itemUsage: t.string,
867
- itemDesc: t.string,
868
- itemObtainApproach: t.string,
869
- isNotObtainable: t.boolean,
870
- isSpChar: t.boolean,
871
- maxPotentialLevel: t.number,
872
- rarity: t.string,
873
- profession: t.string,
874
- subProfessionId: t.string,
875
- trait: t.type({
876
- candidates: t.array(t.type({
877
- unlockCondition: exports.OperatorUnlockCondIO,
878
- requiredPotentialRank: t.number,
879
- blackboard: t.array(exports.BlackboardIO),
880
- overrideDescripton: t.string,
881
- prefabKey: t.string,
882
- rangeId: t.string,
787
+ canUseCharm: z.boolean(),
788
+ canUseTech: z.boolean(),
789
+ canUseTrapTool: z.boolean(),
790
+ canUseBattlePerformance: z.boolean(),
791
+ startButtonOverrideId: z.union([z.string(), z.null()]),
792
+ isStagePatch: z.boolean(),
793
+ mainStageId: z.union([z.string(), z.null()]),
794
+ extraCondition: z.union([
795
+ z.array(z.strictObject({
796
+ index: z.number(),
797
+ template: z.string(),
798
+ unlockParam: z.array(z.string()),
883
799
  })),
800
+ z.null()
801
+ ]),
802
+ extraInfo: z.union([
803
+ z.array(z.strictObject({
804
+ stageId: z.string(),
805
+ rewards: z.array(z.strictObject({
806
+ id: z.string(),
807
+ count: z.number(),
808
+ type: z.string(),
809
+ })),
810
+ progressInfo: z.strictObject({
811
+ progressType: z.string(),
812
+ descList: z.record(z.string(), z.string()),
813
+ })
814
+ })),
815
+ z.null()
816
+ ])
817
+ }),
818
+ levels: StageDataZod,
819
+ });
820
+ exports.OperatorZod = z.strictObject({
821
+ id: z.string(),
822
+ recruit: z.number(),
823
+ archetype: z.string(),
824
+ range: exports.GridRangeZod,
825
+ skills: z.array(exports.SkillZod),
826
+ modules: z.array(exports.ModuleZod),
827
+ skins: z.array(exports.SkinZod),
828
+ bases: z.array(z.strictObject({
829
+ condition: z.strictObject({
830
+ buffId: z.string(),
831
+ cond: OperatorUnlockCondZod,
884
832
  }),
885
- phases: t.array(t.type({
886
- characterPrefabKey: t.string,
887
- rangeId: t.string,
888
- maxLevel: t.number,
889
- attributesKeyFrames: t.array(exports.AttributesKeyFrameIO),
890
- evolveCost: t.array(exports.LevelUpCostIO),
833
+ skill: exports.BaseZod,
834
+ })),
835
+ paradox: z.union([exports.ParadoxZod, z.null()]),
836
+ data: z.strictObject({
837
+ name: z.string(),
838
+ description: z.string(),
839
+ canUseGeneralPotentialItem: z.boolean(),
840
+ canUseActivityPotentialItem: z.boolean(),
841
+ potentialItemId: z.union([z.string(), z.null()]),
842
+ activityPotentialItemId: z.string().nullable(),
843
+ classicPotentialItemId: z.string().nullable(),
844
+ nationId: z.union([z.string(), z.null()]),
845
+ groupId: z.union([z.string(), z.null()]),
846
+ teamId: z.union([z.string(), z.null()]),
847
+ displayNumber: z.union([z.string(), z.null()]),
848
+ appellation: z.string(),
849
+ position: z.string(),
850
+ tagList: z.array(z.string()),
851
+ itemUsage: z.union([z.string(), z.null()]),
852
+ itemDesc: z.union([z.string(), z.null()]),
853
+ itemObtainApproach: z.union([z.string(), z.null()]),
854
+ isNotObtainable: z.boolean(),
855
+ isSpChar: z.boolean(),
856
+ maxPotentialLevel: z.number(),
857
+ rarity: z.string(),
858
+ profession: z.string(),
859
+ subProfessionId: z.string(),
860
+ trait: z.union([
861
+ z.strictObject({
862
+ candidates: z.array(z.strictObject({
863
+ unlockCondition: OperatorUnlockCondZod,
864
+ requiredPotentialRank: z.number(),
865
+ blackboard: z.array(BlackboardZod),
866
+ overrideDescripton: z.union([z.string(), z.null()]),
867
+ prefabKey: z.union([z.string(), z.null()]),
868
+ rangeId: z.union([z.string(), z.null()]),
869
+ })),
870
+ }),
871
+ z.null()
872
+ ]),
873
+ phases: z.array(z.strictObject({
874
+ characterPrefabKey: z.string(),
875
+ rangeId: z.string(),
876
+ maxLevel: z.number(),
877
+ attributesKeyFrames: z.array(AttributesKeyFrameZod),
878
+ evolveCost: z.union([z.array(LevelUpCostZod), z.null()]),
891
879
  })),
892
- skills: t.array(t.type({
893
- skillId: t.string,
894
- overridePrefabKey: t.string,
895
- overrideTokenKey: t.string,
896
- levelUpCostCond: t.array(exports.LevelUpCostCondIO),
897
- unlockCond: exports.OperatorUnlockCondIO,
880
+ skills: z.array(z.strictObject({
881
+ skillId: z.string(),
882
+ overridePrefabKey: z.union([z.string(), z.null()]),
883
+ overrideTokenKey: z.union([z.string(), z.null()]),
884
+ levelUpCostCond: z.array(LevelUpCostCondZod),
885
+ unlockCond: OperatorUnlockCondZod,
898
886
  })),
899
- talents: t.array(t.type({
900
- candidates: t.array(t.type({
901
- unlockCondition: exports.OperatorUnlockCondIO,
902
- requiredPotentialRank: t.number,
903
- prefabKey: t.string,
904
- name: t.string,
905
- description: t.string,
906
- rangeId: t.string,
907
- blackboard: t.array(exports.BlackboardIO),
887
+ displayTokenDict: z.record(z.boolean()).nullable(),
888
+ talents: z.union([
889
+ z.array(z.strictObject({
890
+ candidates: z.array(z.strictObject({
891
+ unlockCondition: OperatorUnlockCondZod,
892
+ requiredPotentialRank: z.number(),
893
+ prefabKey: z.string(),
894
+ name: z.string(),
895
+ description: z.string(),
896
+ rangeId: z.union([z.string(), z.null()]),
897
+ blackboard: z.array(BlackboardZod),
898
+ tokenKey: z.string().nullable(),
899
+ })),
908
900
  })),
909
- })),
910
- potentialRanks: t.array(t.type({
911
- type: t.number,
912
- description: t.string,
913
- buff: t.type({
914
- attributes: t.type({
915
- abnormalFlags: t.null,
916
- abnormalImmunes: t.null,
917
- abnormalAntis: t.null,
918
- abnormalCombos: t.null,
919
- abnormalComboImmunes: t.null,
920
- attributeModifiers: t.array(t.type({
921
- attributeType: t.number,
922
- formulaItem: t.number,
923
- value: t.number,
924
- loadFromBlackboard: t.boolean,
925
- fetchBaseValueFromSourceEntity: t.boolean,
926
- })),
901
+ z.null()
902
+ ]),
903
+ potentialRanks: z.array(z.strictObject({
904
+ type: z.string(),
905
+ description: z.string(),
906
+ buff: z.union([
907
+ z.strictObject({
908
+ attributes: z.strictObject({
909
+ abnormalFlags: z.null(),
910
+ abnormalImmunes: z.null(),
911
+ abnormalAntis: z.null(),
912
+ abnormalCombos: z.null(),
913
+ abnormalComboImmunes: z.null(),
914
+ attributeModifiers: z.array(z.strictObject({
915
+ attributeType: z.string(),
916
+ formulaItem: z.string(),
917
+ value: z.number(),
918
+ loadFromBlackboard: z.boolean(),
919
+ fetchBaseValueFromSourceEntity: z.boolean(),
920
+ })),
921
+ }),
927
922
  }),
928
- }),
929
- equivalentCost: t.null,
923
+ z.null()
924
+ ]),
925
+ equivalentCost: z.null(),
930
926
  })),
931
- favorKeyFrames: t.array(exports.AttributesKeyFrameIO),
932
- allSkillLvlup: t.array(t.type({
933
- unlockCond: exports.OperatorUnlockCondIO,
934
- lvlUpCost: t.array(exports.LevelUpCostIO),
927
+ favorKeyFrames: z.array(AttributesKeyFrameZod),
928
+ allSkillLvlup: z.array(z.strictObject({
929
+ unlockCond: OperatorUnlockCondZod,
930
+ lvlUpCost: z.union([z.array(LevelUpCostZod), z.null()]),
935
931
  })),
936
932
  }),
937
933
  });