gotchi-battler-game-logic 3.0.0 → 4.0.0
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/.cursor/rules/cursor-rules.mdc +67 -0
- package/.cursor/rules/directory-structure.mdc +63 -0
- package/.cursor/rules/self-improvement.mdc +64 -0
- package/.cursor/rules/tech-stack.mdc +99 -0
- package/README.md +4 -0
- package/eslint.config.js +31 -0
- package/game-logic/index.js +2 -6
- package/game-logic/v1.4/constants.js +0 -23
- package/game-logic/v1.4/index.js +64 -56
- package/game-logic/v1.5/constants.js +0 -23
- package/game-logic/v1.5/index.js +27 -21
- package/game-logic/v1.6/constants.js +0 -23
- package/game-logic/v1.6/index.js +27 -21
- package/game-logic/v1.7/constants.js +0 -23
- package/game-logic/v1.7/helpers.js +2 -2
- package/game-logic/v1.7/index.js +24 -18
- package/game-logic/v1.8/constants.js +0 -23
- package/game-logic/v1.8/helpers.js +2 -2
- package/game-logic/v1.8/index.js +25 -19
- package/game-logic/v2.0/constants.js +112 -0
- package/game-logic/v2.0/helpers.js +713 -0
- package/game-logic/v2.0/index.js +782 -0
- package/game-logic/v2.0/statuses.json +439 -0
- package/package.json +11 -4
- package/schemas/crystal.js +14 -0
- package/schemas/effect.js +25 -0
- package/schemas/gotchi.js +53 -0
- package/schemas/ingameteam.js +14 -0
- package/schemas/item.js +13 -0
- package/schemas/leaderskill.js +15 -0
- package/schemas/leaderskillstatus.js +12 -0
- package/schemas/special.js +22 -0
- package/schemas/team.js +24 -0
- package/schemas/team.json +252 -114
- package/scripts/balancing/createTrainingGotchis.js +44 -44
- package/scripts/balancing/extractOnchainTraits.js +3 -3
- package/scripts/balancing/fixTrainingGotchis.js +41 -41
- package/scripts/balancing/processSims.js +5 -5
- package/scripts/balancing/sims.js +8 -15
- package/scripts/balancing/v1.7/setTeamPositions.js +2 -2
- package/scripts/balancing/v1.7.1/setTeamPositions.js +2 -2
- package/scripts/balancing/v1.7.2/setTeamPositions.js +2 -2
- package/scripts/balancing/v1.7.3/setTeamPositions.js +2 -2
- package/scripts/data/dungeon_mob_1.json +87 -0
- package/scripts/data/dungeon_mob_2.json +87 -0
- package/scripts/data/immaterialTeam1.json +374 -0
- package/scripts/data/immaterialTeam2.json +365 -0
- package/scripts/generateAllSpecialsLogs.js +93 -0
- package/scripts/generateSpecialLogs.js +94 -0
- package/scripts/runCampaignBattles.js +41 -0
- package/scripts/runLocalBattle.js +6 -3
- package/scripts/runLocalDungeon.js +52 -0
- package/scripts/runPvPBattle.js +16 -0
- package/scripts/runRealBattle.js +8 -8
- package/scripts/simRealBattle.js +8 -8
- package/scripts/validateBattle.js +12 -14
- package/scripts/validateTournament.js +9 -9
- package/tests/getModifiedStats.test.js +78 -0
- package/utils/errors.js +13 -13
- package/utils/transforms.js +2 -8
- package/scripts/output/.gitkeep +0 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
{
|
|
2
|
+
"formation": {
|
|
3
|
+
"front": [
|
|
4
|
+
null,
|
|
5
|
+
{
|
|
6
|
+
"id": 2,
|
|
7
|
+
"onchainId": 22892,
|
|
8
|
+
"name": "Chonk",
|
|
9
|
+
"type": "gotchi",
|
|
10
|
+
"visualCode": "Polygon-POLYGON-Uncommon_High-310-216-262-309-312-311-261",
|
|
11
|
+
"level": 72,
|
|
12
|
+
"speed": 187,
|
|
13
|
+
"health": 864,
|
|
14
|
+
"attack": 176,
|
|
15
|
+
"defense": 157,
|
|
16
|
+
"criticalRate": 38.6,
|
|
17
|
+
"criticalDamage": 158.2,
|
|
18
|
+
"resist": 182,
|
|
19
|
+
"focus": 182,
|
|
20
|
+
"createdAt": "2025-11-24T16:54:05.342Z",
|
|
21
|
+
"updatedAt": "2025-11-24T16:54:05.342Z",
|
|
22
|
+
"gotchiClass": "tank",
|
|
23
|
+
"special": "fortress_stance",
|
|
24
|
+
"leaderSkill": "dig_in",
|
|
25
|
+
"item": null,
|
|
26
|
+
"crystalSlot1": null,
|
|
27
|
+
"crystalSlot2": null,
|
|
28
|
+
"crystalSlot3": null,
|
|
29
|
+
"crystalSlot4": null,
|
|
30
|
+
"crystalSlot5": null,
|
|
31
|
+
"crystalSlot6": null,
|
|
32
|
+
"specialExpanded": {
|
|
33
|
+
"code": "fortress_stance",
|
|
34
|
+
"name": "Fortress Stance",
|
|
35
|
+
"initialCooldown": 1,
|
|
36
|
+
"cooldown": 3,
|
|
37
|
+
"actionType": "none",
|
|
38
|
+
"actionMultiplier": null,
|
|
39
|
+
"monstersOnly": false,
|
|
40
|
+
"notes": "Self Taunt; 50% chance for each of two +DEF stacks.",
|
|
41
|
+
"gotchiClass": "tank",
|
|
42
|
+
"target": "self",
|
|
43
|
+
"effects": [
|
|
44
|
+
{
|
|
45
|
+
"id": 37,
|
|
46
|
+
"effectType": "status",
|
|
47
|
+
"value": null,
|
|
48
|
+
"chance": 1,
|
|
49
|
+
"special": "fortress_stance",
|
|
50
|
+
"target": "self",
|
|
51
|
+
"status": "taunt"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": 38,
|
|
55
|
+
"effectType": "status",
|
|
56
|
+
"value": null,
|
|
57
|
+
"chance": 0.5,
|
|
58
|
+
"special": "fortress_stance",
|
|
59
|
+
"target": "self",
|
|
60
|
+
"status": "def_up"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": 39,
|
|
64
|
+
"effectType": "status",
|
|
65
|
+
"value": null,
|
|
66
|
+
"chance": 0.5,
|
|
67
|
+
"special": "fortress_stance",
|
|
68
|
+
"target": "self",
|
|
69
|
+
"status": "def_up"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"leaderSkillExpanded": {
|
|
74
|
+
"code": "dig_in",
|
|
75
|
+
"name": "Dig In",
|
|
76
|
+
"description": "Your team gets -FOC, +DEF and +CRD.",
|
|
77
|
+
"monstersOnly": false,
|
|
78
|
+
"gotchiClass": "tank",
|
|
79
|
+
"statuses": [
|
|
80
|
+
{
|
|
81
|
+
"leaderSkill": "dig_in",
|
|
82
|
+
"status": "foc_down",
|
|
83
|
+
"stackCount": 1
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"leaderSkill": "dig_in",
|
|
87
|
+
"status": "def_up",
|
|
88
|
+
"stackCount": 1
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"leaderSkill": "dig_in",
|
|
92
|
+
"status": "crd_up",
|
|
93
|
+
"stackCount": 1
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
null,
|
|
99
|
+
{
|
|
100
|
+
"id": 4,
|
|
101
|
+
"onchainId": 13536,
|
|
102
|
+
"name": "Bearded",
|
|
103
|
+
"type": "gotchi",
|
|
104
|
+
"visualCode": "wBTC-Common1-Mythical_High-50-384-49-48-217-51-261",
|
|
105
|
+
"level": 71,
|
|
106
|
+
"speed": 190,
|
|
107
|
+
"health": 853,
|
|
108
|
+
"attack": 175,
|
|
109
|
+
"defense": 132,
|
|
110
|
+
"criticalRate": 45.7,
|
|
111
|
+
"criticalDamage": 172.7,
|
|
112
|
+
"resist": 151,
|
|
113
|
+
"focus": 176,
|
|
114
|
+
"createdAt": "2025-11-24T16:54:05.343Z",
|
|
115
|
+
"updatedAt": "2025-11-24T16:54:05.343Z",
|
|
116
|
+
"gotchiClass": "ninja",
|
|
117
|
+
"special": "precise_shuriken",
|
|
118
|
+
"leaderSkill": "known_vulnerability",
|
|
119
|
+
"item": null,
|
|
120
|
+
"crystalSlot1": null,
|
|
121
|
+
"crystalSlot2": null,
|
|
122
|
+
"crystalSlot3": null,
|
|
123
|
+
"crystalSlot4": null,
|
|
124
|
+
"crystalSlot5": null,
|
|
125
|
+
"crystalSlot6": null,
|
|
126
|
+
"specialExpanded": {
|
|
127
|
+
"code": "precise_shuriken",
|
|
128
|
+
"name": "Precise Shuriken",
|
|
129
|
+
"initialCooldown": 1,
|
|
130
|
+
"cooldown": 2,
|
|
131
|
+
"actionType": "attack",
|
|
132
|
+
"actionMultiplier": 0.8,
|
|
133
|
+
"monstersOnly": false,
|
|
134
|
+
"notes": "Ninja may gain +CRT (75%).",
|
|
135
|
+
"gotchiClass": "ninja",
|
|
136
|
+
"target": "enemy_random",
|
|
137
|
+
"effects": [
|
|
138
|
+
{
|
|
139
|
+
"id": 3,
|
|
140
|
+
"effectType": "status",
|
|
141
|
+
"value": null,
|
|
142
|
+
"chance": 0.75,
|
|
143
|
+
"special": "precise_shuriken",
|
|
144
|
+
"target": "self",
|
|
145
|
+
"status": "crt_up"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"leaderSkillExpanded": {
|
|
150
|
+
"code": "known_vulnerability",
|
|
151
|
+
"name": "Known Vulnerability",
|
|
152
|
+
"description": "Your team gets +CRT.",
|
|
153
|
+
"monstersOnly": false,
|
|
154
|
+
"gotchiClass": "ninja",
|
|
155
|
+
"statuses": [
|
|
156
|
+
{
|
|
157
|
+
"leaderSkill": "known_vulnerability",
|
|
158
|
+
"status": "crt_up",
|
|
159
|
+
"stackCount": 1
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
null
|
|
165
|
+
],
|
|
166
|
+
"back": [
|
|
167
|
+
{
|
|
168
|
+
"id": 1,
|
|
169
|
+
"onchainId": 16559,
|
|
170
|
+
"name": "Immaterial",
|
|
171
|
+
"type": "gotchi",
|
|
172
|
+
"visualCode": "USDT-MythicalLow2_H2-Rare_Low-366-260-385-52-113-17-35",
|
|
173
|
+
"level": 108,
|
|
174
|
+
"speed": 217,
|
|
175
|
+
"health": 1096,
|
|
176
|
+
"attack": 200,
|
|
177
|
+
"defense": 172,
|
|
178
|
+
"criticalRate": 47.8,
|
|
179
|
+
"criticalDamage": 184.6,
|
|
180
|
+
"resist": 199,
|
|
181
|
+
"focus": 233,
|
|
182
|
+
"createdAt": "2025-11-24T16:54:05.340Z",
|
|
183
|
+
"updatedAt": "2025-11-24T16:54:05.340Z",
|
|
184
|
+
"gotchiClass": "mage",
|
|
185
|
+
"special": "tornado",
|
|
186
|
+
"leaderSkill": "obsessive_studies",
|
|
187
|
+
"item": null,
|
|
188
|
+
"crystalSlot1": null,
|
|
189
|
+
"crystalSlot2": null,
|
|
190
|
+
"crystalSlot3": null,
|
|
191
|
+
"crystalSlot4": null,
|
|
192
|
+
"crystalSlot5": null,
|
|
193
|
+
"crystalSlot6": null,
|
|
194
|
+
"specialExpanded": {
|
|
195
|
+
"code": "tornado",
|
|
196
|
+
"name": "Tornado",
|
|
197
|
+
"initialCooldown": 2,
|
|
198
|
+
"cooldown": 3,
|
|
199
|
+
"actionType": "none",
|
|
200
|
+
"actionMultiplier": null,
|
|
201
|
+
"monstersOnly": false,
|
|
202
|
+
"notes": "Each enemy has a 25 % chance to be Feared.",
|
|
203
|
+
"gotchiClass": "mage",
|
|
204
|
+
"target": "all_enemies",
|
|
205
|
+
"effects": [
|
|
206
|
+
{
|
|
207
|
+
"id": 87,
|
|
208
|
+
"effectType": "status",
|
|
209
|
+
"value": null,
|
|
210
|
+
"chance": 0.25,
|
|
211
|
+
"special": "tornado",
|
|
212
|
+
"target": "same_as_attack",
|
|
213
|
+
"status": "fear"
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"leaderSkillExpanded": {
|
|
218
|
+
"code": "obsessive_studies",
|
|
219
|
+
"name": "Obsessive Studies",
|
|
220
|
+
"description": "Your team gets -DEF and +2 FOC.",
|
|
221
|
+
"monstersOnly": false,
|
|
222
|
+
"gotchiClass": "mage",
|
|
223
|
+
"statuses": [
|
|
224
|
+
{
|
|
225
|
+
"leaderSkill": "obsessive_studies",
|
|
226
|
+
"status": "def_down",
|
|
227
|
+
"stackCount": 1
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"leaderSkill": "obsessive_studies",
|
|
231
|
+
"status": "foc_up",
|
|
232
|
+
"stackCount": 2
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
null,
|
|
238
|
+
{
|
|
239
|
+
"id": 3,
|
|
240
|
+
"onchainId": 22249,
|
|
241
|
+
"name": "575 Zoomer",
|
|
242
|
+
"type": "gotchi",
|
|
243
|
+
"visualCode": "USDC-RareLow1-Uncommon_Low-310-384-262-309-311-32-417",
|
|
244
|
+
"level": 71,
|
|
245
|
+
"speed": 190,
|
|
246
|
+
"health": 858,
|
|
247
|
+
"attack": 201,
|
|
248
|
+
"defense": 156,
|
|
249
|
+
"criticalRate": 38.3,
|
|
250
|
+
"criticalDamage": 172.7,
|
|
251
|
+
"resist": 152,
|
|
252
|
+
"focus": 152,
|
|
253
|
+
"createdAt": "2025-11-24T16:54:05.342Z",
|
|
254
|
+
"updatedAt": "2025-11-24T16:54:05.342Z",
|
|
255
|
+
"gotchiClass": "ninja",
|
|
256
|
+
"special": "precise_shuriken",
|
|
257
|
+
"leaderSkill": "known_vulnerability",
|
|
258
|
+
"item": null,
|
|
259
|
+
"crystalSlot1": null,
|
|
260
|
+
"crystalSlot2": null,
|
|
261
|
+
"crystalSlot3": null,
|
|
262
|
+
"crystalSlot4": null,
|
|
263
|
+
"crystalSlot5": null,
|
|
264
|
+
"crystalSlot6": null,
|
|
265
|
+
"specialExpanded": {
|
|
266
|
+
"code": "precise_shuriken",
|
|
267
|
+
"name": "Precise Shuriken",
|
|
268
|
+
"initialCooldown": 1,
|
|
269
|
+
"cooldown": 2,
|
|
270
|
+
"actionType": "attack",
|
|
271
|
+
"actionMultiplier": 0.8,
|
|
272
|
+
"monstersOnly": false,
|
|
273
|
+
"notes": "Ninja may gain +CRT (75%).",
|
|
274
|
+
"gotchiClass": "ninja",
|
|
275
|
+
"target": "enemy_random",
|
|
276
|
+
"effects": [
|
|
277
|
+
{
|
|
278
|
+
"id": 3,
|
|
279
|
+
"effectType": "status",
|
|
280
|
+
"value": null,
|
|
281
|
+
"chance": 0.75,
|
|
282
|
+
"special": "precise_shuriken",
|
|
283
|
+
"target": "self",
|
|
284
|
+
"status": "crt_up"
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
"leaderSkillExpanded": {
|
|
289
|
+
"code": "known_vulnerability",
|
|
290
|
+
"name": "Known Vulnerability",
|
|
291
|
+
"description": "Your team gets +CRT.",
|
|
292
|
+
"monstersOnly": false,
|
|
293
|
+
"gotchiClass": "ninja",
|
|
294
|
+
"statuses": [
|
|
295
|
+
{
|
|
296
|
+
"leaderSkill": "known_vulnerability",
|
|
297
|
+
"status": "crt_up",
|
|
298
|
+
"stackCount": 1
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
null,
|
|
304
|
+
{
|
|
305
|
+
"id": 5,
|
|
306
|
+
"onchainId": 236,
|
|
307
|
+
"name": "Terry",
|
|
308
|
+
"type": "gotchi",
|
|
309
|
+
"visualCode": "Dai-RareLow2-Common-0-0-0-0-0-0-0",
|
|
310
|
+
"level": 40,
|
|
311
|
+
"speed": 166,
|
|
312
|
+
"health": 652,
|
|
313
|
+
"attack": 155,
|
|
314
|
+
"defense": 116,
|
|
315
|
+
"criticalRate": 38.1,
|
|
316
|
+
"criticalDamage": 160.1,
|
|
317
|
+
"resist": 110,
|
|
318
|
+
"focus": 132,
|
|
319
|
+
"createdAt": "2025-11-24T16:54:05.343Z",
|
|
320
|
+
"updatedAt": "2025-11-24T16:54:05.343Z",
|
|
321
|
+
"gotchiClass": "ninja",
|
|
322
|
+
"special": "precise_shuriken",
|
|
323
|
+
"leaderSkill": "known_vulnerability",
|
|
324
|
+
"item": null,
|
|
325
|
+
"crystalSlot1": null,
|
|
326
|
+
"crystalSlot2": null,
|
|
327
|
+
"crystalSlot3": null,
|
|
328
|
+
"crystalSlot4": null,
|
|
329
|
+
"crystalSlot5": null,
|
|
330
|
+
"crystalSlot6": null,
|
|
331
|
+
"specialExpanded": {
|
|
332
|
+
"code": "precise_shuriken",
|
|
333
|
+
"name": "Precise Shuriken",
|
|
334
|
+
"initialCooldown": 1,
|
|
335
|
+
"cooldown": 2,
|
|
336
|
+
"actionType": "attack",
|
|
337
|
+
"actionMultiplier": 0.8,
|
|
338
|
+
"monstersOnly": false,
|
|
339
|
+
"notes": "Ninja may gain +CRT (75%).",
|
|
340
|
+
"gotchiClass": "ninja",
|
|
341
|
+
"target": "enemy_random",
|
|
342
|
+
"effects": [
|
|
343
|
+
{
|
|
344
|
+
"id": 3,
|
|
345
|
+
"effectType": "status",
|
|
346
|
+
"value": null,
|
|
347
|
+
"chance": 0.75,
|
|
348
|
+
"special": "precise_shuriken",
|
|
349
|
+
"target": "self",
|
|
350
|
+
"status": "crt_up"
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"leaderSkillExpanded": {
|
|
355
|
+
"code": "known_vulnerability",
|
|
356
|
+
"name": "Known Vulnerability",
|
|
357
|
+
"description": "Your team gets +CRT.",
|
|
358
|
+
"monstersOnly": false,
|
|
359
|
+
"gotchiClass": "ninja",
|
|
360
|
+
"statuses": [
|
|
361
|
+
{
|
|
362
|
+
"leaderSkill": "known_vulnerability",
|
|
363
|
+
"status": "crt_up",
|
|
364
|
+
"stackCount": 1
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
"leader": 1,
|
|
372
|
+
"name": "Immaterial Team 1",
|
|
373
|
+
"owner": "0xfe698c212526f15cc25af671beba14aac309457f"
|
|
374
|
+
}
|