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