pokemon-io-core 0.0.119 → 0.0.121

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.
@@ -0,0 +1,6 @@
1
+ import { BattleActions, BattleState } from "../core/index.js";
2
+ export declare const createPokemonBattle: (fighter1Id: string, fighter2Id: string) => BattleState;
3
+ export declare const runPokemonTurn: (state: BattleState, actions: BattleActions) => {
4
+ newState: BattleState;
5
+ events: import("../index.js").BattleEvent[];
6
+ };
@@ -0,0 +1,32 @@
1
+ import { POKEMON_FIGHTERS, POKEMON_MOVES, POKEMON_TYPE_MATRIX, POKEMON_TYPES, } from "../skins/pokemon";
2
+ import { createInitialBattleState, resolveTurn, } from "../core/engine.js";
3
+ const findPokemon = (id) => POKEMON_FIGHTERS.find((p) => p.id === id);
4
+ const findMove = (id) => POKEMON_MOVES.find((m) => m.id === id);
5
+ export const createPokemonBattle = (fighter1Id, fighter2Id) => {
6
+ const f1 = findPokemon(fighter1Id);
7
+ const f2 = findPokemon(fighter2Id);
8
+ const config = {
9
+ types: POKEMON_TYPES,
10
+ typeEffectiveness: POKEMON_TYPE_MATRIX,
11
+ moves: POKEMON_MOVES,
12
+ items: [], // MVP: sin items
13
+ amulets: [],
14
+ statuses: [],
15
+ player1: {
16
+ fighter: f1,
17
+ maxHp: f1.baseStats.defense + f1.baseStats.offense,
18
+ moves: POKEMON_MOVES.filter((m) => (f1.recommendedMoves ?? []).includes(m.id)),
19
+ items: [],
20
+ amulet: null,
21
+ },
22
+ player2: {
23
+ fighter: f2,
24
+ maxHp: f2.baseStats.defense + f1.baseStats.offense,
25
+ moves: POKEMON_MOVES.filter((m) => (f2.recommendedMoves ?? []).includes(m.id)),
26
+ items: [],
27
+ amulet: null,
28
+ },
29
+ };
30
+ return createInitialBattleState(config);
31
+ };
32
+ export const runPokemonTurn = (state, actions) => resolveTurn(state, actions);
@@ -0,0 +1 @@
1
+ export * from './resolveTurn.js';
@@ -0,0 +1 @@
1
+ export * from './resolveTurn.js';
@@ -0,0 +1,609 @@
1
+ [
2
+ {
3
+ "id": "overheat",
4
+ "name": "Sofoco Ígneo",
5
+ "typeId": "fire",
6
+ "accuracy": 66,
7
+ "maxPP": 3,
8
+ "priority": 0,
9
+ "effects": [
10
+ {
11
+ "kind": "damage",
12
+ "basePower": 40
13
+ },
14
+ {
15
+ "kind": "damage",
16
+ "flatAmount": 10,
17
+ "target": "self"
18
+ }
19
+ ]
20
+ },
21
+ {
22
+ "id": "flamethrower",
23
+ "name": "Lanzallamas",
24
+ "typeId": "fire",
25
+ "accuracy": 65,
26
+ "maxPP": 8,
27
+ "priority": 0,
28
+ "effects": [
29
+ {
30
+ "kind": "damage",
31
+ "basePower": 30
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "id": "ember",
37
+ "name": "Ascuas",
38
+ "typeId": "fire",
39
+ "accuracy": 65,
40
+ "maxPP": 15,
41
+ "priority": 0,
42
+ "effects": [
43
+ {
44
+ "kind": "damage",
45
+ "basePower": 20
46
+ },
47
+ {
48
+ "kind": "apply_status",
49
+ "statusId": "burn"
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "id": "purifying_flame",
55
+ "name": "Llama Purificadora",
56
+ "typeId": "fire",
57
+ "accuracy": 100,
58
+ "maxPP": 5,
59
+ "priority": 0,
60
+ "effects": [
61
+ {
62
+ "kind": "heal",
63
+ "target": "self",
64
+ "amount": 22
65
+ },
66
+ {
67
+ "kind": "clear_status",
68
+ "target": "self",
69
+ "kinds": [
70
+ "soft"
71
+ ]
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ "id": "fire_claw",
77
+ "name": "Garra Ígnea",
78
+ "typeId": "fire",
79
+ "accuracy": 100,
80
+ "maxPP": 10,
81
+ "priority": 0,
82
+ "effects": [
83
+ {
84
+ "kind": "damage",
85
+ "basePower": 15
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "id": "healing_warmth",
91
+ "name": "Calor Reconfortante",
92
+ "typeId": "fire",
93
+ "accuracy": 100,
94
+ "maxPP": 8,
95
+ "priority": 0,
96
+ "effects": [
97
+ {
98
+ "kind": "heal",
99
+ "target": "self",
100
+ "amount": 18
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "id": "hydro_cannon",
106
+ "name": "Cañón Hidro",
107
+ "typeId": "water",
108
+ "accuracy": 85,
109
+ "maxPP": 3,
110
+ "priority": 0,
111
+ "effects": [
112
+ {
113
+ "kind": "damage",
114
+ "basePower": 40
115
+ },
116
+ {
117
+ "kind": "modify_stats",
118
+ "offenseDelta": -15
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "id": "surf",
124
+ "name": "Surf",
125
+ "typeId": "water",
126
+ "accuracy": 100,
127
+ "maxPP": 8,
128
+ "priority": 0,
129
+ "effects": [
130
+ {
131
+ "kind": "damage",
132
+ "basePower": 30
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "id": "scald",
138
+ "name": "Escaldar",
139
+ "typeId": "water",
140
+ "accuracy": 100,
141
+ "maxPP": 10,
142
+ "priority": 0,
143
+ "effects": [
144
+ {
145
+ "kind": "damage",
146
+ "basePower": 20
147
+ },
148
+ {
149
+ "kind": "apply_status",
150
+ "statusId": "scalded"
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "id": "aqua_purify",
156
+ "name": "Aguas Purificadoras",
157
+ "typeId": "water",
158
+ "accuracy": 100,
159
+ "maxPP": 5,
160
+ "priority": 0,
161
+ "effects": [
162
+ {
163
+ "kind": "heal",
164
+ "target": "self",
165
+ "amount": 22
166
+ },
167
+ {
168
+ "kind": "clear_status",
169
+ "target": "self",
170
+ "kinds": [
171
+ "soft"
172
+ ]
173
+ }
174
+ ]
175
+ },
176
+ {
177
+ "id": "wave_crash",
178
+ "name": "Oleada Feroz",
179
+ "typeId": "water",
180
+ "accuracy": 100,
181
+ "maxPP": 10,
182
+ "priority": 0,
183
+ "effects": [
184
+ {
185
+ "kind": "damage",
186
+ "basePower": 15
187
+ }
188
+ ]
189
+ },
190
+ {
191
+ "id": "healing_rain",
192
+ "name": "Lluvia Curativa",
193
+ "typeId": "water",
194
+ "accuracy": 100,
195
+ "maxPP": 8,
196
+ "priority": 0,
197
+ "effects": [
198
+ {
199
+ "kind": "heal",
200
+ "target": "self",
201
+ "amount": 18
202
+ }
203
+ ]
204
+ },
205
+ {
206
+ "id": "leaf_storm",
207
+ "name": "Tormenta de Hojas",
208
+ "typeId": "grass",
209
+ "accuracy": 90,
210
+ "maxPP": 3,
211
+ "priority": 0,
212
+ "effects": [
213
+ {
214
+ "kind": "damage",
215
+ "basePower": 40
216
+ },
217
+ {
218
+ "kind": "modify_stats",
219
+ "offenseDelta": -20
220
+ }
221
+ ]
222
+ },
223
+ {
224
+ "id": "energy_ball",
225
+ "name": "Energibola",
226
+ "typeId": "grass",
227
+ "accuracy": 100,
228
+ "maxPP": 8,
229
+ "priority": 0,
230
+ "effects": [
231
+ {
232
+ "kind": "damage",
233
+ "basePower": 30
234
+ }
235
+ ]
236
+ },
237
+ {
238
+ "id": "leech_seed",
239
+ "name": "Drenadoras",
240
+ "typeId": "grass",
241
+ "accuracy": 100,
242
+ "maxPP": 10,
243
+ "priority": 0,
244
+ "effects": [
245
+ {
246
+ "kind": "damage",
247
+ "basePower": 20
248
+ },
249
+ {
250
+ "kind": "apply_status",
251
+ "statusId": "entangled"
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "id": "nature_purify",
257
+ "name": "Purificación Natural",
258
+ "typeId": "grass",
259
+ "accuracy": 100,
260
+ "maxPP": 5,
261
+ "priority": 0,
262
+ "effects": [
263
+ {
264
+ "kind": "heal",
265
+ "target": "self",
266
+ "amount": 22
267
+ },
268
+ {
269
+ "kind": "clear_status",
270
+ "target": "self",
271
+ "kinds": [
272
+ "soft"
273
+ ]
274
+ }
275
+ ]
276
+ },
277
+ {
278
+ "id": "power_whip",
279
+ "name": "Látigo Poderoso",
280
+ "typeId": "grass",
281
+ "accuracy": 100,
282
+ "maxPP": 10,
283
+ "priority": 0,
284
+ "effects": [
285
+ {
286
+ "kind": "damage",
287
+ "basePower": 15
288
+ }
289
+ ]
290
+ },
291
+ {
292
+ "id": "regrowth",
293
+ "name": "Rebrote",
294
+ "typeId": "grass",
295
+ "accuracy": 100,
296
+ "maxPP": 8,
297
+ "priority": 0,
298
+ "effects": [
299
+ {
300
+ "kind": "heal",
301
+ "target": "self",
302
+ "amount": 18
303
+ }
304
+ ]
305
+ },
306
+ {
307
+ "id": "psycho_boost",
308
+ "name": "Psicoimpulso",
309
+ "typeId": "psychic",
310
+ "accuracy": 90,
311
+ "maxPP": 3,
312
+ "priority": 0,
313
+ "effects": [
314
+ {
315
+ "kind": "damage",
316
+ "basePower": 40
317
+ },
318
+ {
319
+ "kind": "modify_stats",
320
+ "offenseDelta": -20
321
+ }
322
+ ]
323
+ },
324
+ {
325
+ "id": "psychic",
326
+ "name": "Psíquico",
327
+ "typeId": "psychic",
328
+ "accuracy": 100,
329
+ "maxPP": 8,
330
+ "priority": 0,
331
+ "effects": [
332
+ {
333
+ "kind": "damage",
334
+ "basePower": 30
335
+ }
336
+ ]
337
+ },
338
+ {
339
+ "id": "mind_spike",
340
+ "name": "Puñal Mental",
341
+ "typeId": "psychic",
342
+ "accuracy": 100,
343
+ "maxPP": 8,
344
+ "priority": 0,
345
+ "effects": [
346
+ {
347
+ "kind": "damage",
348
+ "basePower": 20
349
+ },
350
+ {
351
+ "kind": "apply_status",
352
+ "statusId": "mind_break"
353
+ }
354
+ ]
355
+ },
356
+ {
357
+ "id": "aura_cleanse",
358
+ "name": "Limpieza Áurica",
359
+ "typeId": "psychic",
360
+ "accuracy": 100,
361
+ "maxPP": 5,
362
+ "priority": 0,
363
+ "effects": [
364
+ {
365
+ "kind": "heal",
366
+ "target": "self",
367
+ "amount": 22
368
+ },
369
+ {
370
+ "kind": "clear_status",
371
+ "target": "self",
372
+ "kinds": [
373
+ "soft"
374
+ ]
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ "id": "psyshock",
380
+ "name": "Psicocarga",
381
+ "typeId": "psychic",
382
+ "accuracy": 100,
383
+ "maxPP": 10,
384
+ "priority": 0,
385
+ "effects": [
386
+ {
387
+ "kind": "damage",
388
+ "basePower": 15
389
+ }
390
+ ]
391
+ },
392
+ {
393
+ "id": "healing_mind",
394
+ "name": "Mente Serena",
395
+ "typeId": "psychic",
396
+ "accuracy": 100,
397
+ "maxPP": 8,
398
+ "priority": 0,
399
+ "effects": [
400
+ {
401
+ "kind": "heal",
402
+ "target": "self",
403
+ "amount": 18
404
+ }
405
+ ]
406
+ },
407
+ {
408
+ "id": "rock_wrecker",
409
+ "name": "Destroza Rocas",
410
+ "typeId": "rock",
411
+ "accuracy": 85,
412
+ "maxPP": 3,
413
+ "priority": 0,
414
+ "effects": [
415
+ {
416
+ "kind": "damage",
417
+ "basePower": 40
418
+ },
419
+ {
420
+ "kind": "modify_stats",
421
+ "offenseDelta": -20
422
+ }
423
+ ]
424
+ },
425
+ {
426
+ "id": "stone_edge",
427
+ "name": "Roca Afilada",
428
+ "typeId": "rock",
429
+ "accuracy": 90,
430
+ "maxPP": 5,
431
+ "priority": 0,
432
+ "effects": [
433
+ {
434
+ "kind": "damage",
435
+ "basePower": 30
436
+ }
437
+ ]
438
+ },
439
+ {
440
+ "id": "rock_slide",
441
+ "name": "Avalancha",
442
+ "typeId": "rock",
443
+ "accuracy": 100,
444
+ "maxPP": 8,
445
+ "priority": 0,
446
+ "effects": [
447
+ {
448
+ "kind": "damage",
449
+ "basePower": 15
450
+ },
451
+ {
452
+ "kind": "apply_status",
453
+ "statusId": "petrified"
454
+ }
455
+ ]
456
+ },
457
+ {
458
+ "id": "sand_cleanse",
459
+ "name": "Purga de Arena",
460
+ "typeId": "rock",
461
+ "accuracy": 100,
462
+ "maxPP": 5,
463
+ "priority": 0,
464
+ "effects": [
465
+ {
466
+ "kind": "heal",
467
+ "target": "self",
468
+ "amount": 22
469
+ },
470
+ {
471
+ "kind": "clear_status",
472
+ "target": "self",
473
+ "kinds": [
474
+ "soft"
475
+ ]
476
+ }
477
+ ]
478
+ },
479
+ {
480
+ "id": "power_gem",
481
+ "name": "Joya de Luz",
482
+ "typeId": "rock",
483
+ "accuracy": 100,
484
+ "maxPP": 10,
485
+ "priority": 0,
486
+ "effects": [
487
+ {
488
+ "kind": "damage",
489
+ "basePower": 15
490
+ }
491
+ ]
492
+ },
493
+ {
494
+ "id": "healing_mineral",
495
+ "name": "Mineral Curativo",
496
+ "typeId": "rock",
497
+ "accuracy": 100,
498
+ "maxPP": 8,
499
+ "priority": 0,
500
+ "effects": [
501
+ {
502
+ "kind": "heal",
503
+ "target": "self",
504
+ "amount": 18
505
+ }
506
+ ]
507
+ },
508
+ {
509
+ "id": "bolt_strike",
510
+ "name": "Impacto Voltio",
511
+ "typeId": "electric",
512
+ "accuracy": 85,
513
+ "maxPP": 3,
514
+ "priority": 0,
515
+ "effects": [
516
+ {
517
+ "kind": "damage",
518
+ "basePower": 40
519
+ },
520
+ {
521
+ "kind": "modify_stats",
522
+ "offenseDelta": -15
523
+ }
524
+ ]
525
+ },
526
+ {
527
+ "id": "thunderbolt",
528
+ "name": "Rayo",
529
+ "typeId": "electric",
530
+ "accuracy": 100,
531
+ "maxPP": 8,
532
+ "priority": 0,
533
+ "effects": [
534
+ {
535
+ "kind": "damage",
536
+ "basePower": 30
537
+ }
538
+ ]
539
+ },
540
+ {
541
+ "id": "thunder_wave",
542
+ "name": "Onda Trueno",
543
+ "typeId": "electric",
544
+ "accuracy": 100,
545
+ "maxPP": 10,
546
+ "priority": 0,
547
+ "effects": [
548
+ {
549
+ "kind": "damage",
550
+ "basePower": 20
551
+ },
552
+ {
553
+ "kind": "apply_status",
554
+ "statusId": "shocked"
555
+ }
556
+ ]
557
+ },
558
+ {
559
+ "id": "static_field",
560
+ "name": "Campo Estático",
561
+ "typeId": "electric",
562
+ "accuracy": 100,
563
+ "maxPP": 5,
564
+ "priority": 0,
565
+ "effects": [
566
+ {
567
+ "kind": "heal",
568
+ "target": "self",
569
+ "amount": 22
570
+ },
571
+ {
572
+ "kind": "clear_status",
573
+ "target": "self",
574
+ "kinds": [
575
+ "soft"
576
+ ]
577
+ }
578
+ ]
579
+ },
580
+ {
581
+ "id": "wild_charge",
582
+ "name": "Carga Salvaje",
583
+ "typeId": "electric",
584
+ "accuracy": 100,
585
+ "maxPP": 10,
586
+ "priority": 0,
587
+ "effects": [
588
+ {
589
+ "kind": "damage",
590
+ "basePower": 15
591
+ }
592
+ ]
593
+ },
594
+ {
595
+ "id": "healing_spark",
596
+ "name": "Chispa Sanadora",
597
+ "typeId": "electric",
598
+ "accuracy": 100,
599
+ "maxPP": 8,
600
+ "priority": 0,
601
+ "effects": [
602
+ {
603
+ "kind": "heal",
604
+ "target": "self",
605
+ "amount": 18
606
+ }
607
+ ]
608
+ }
609
+ ]
@@ -3,7 +3,6 @@
3
3
  // Core: 25 Power, 95 Acc, 8 PP. (10% Status Chance)
4
4
  // Utility/Heal: 100 Acc, 12 PP.
5
5
  export const POKEMON_MOVES = [
6
- // --- TYPELESS (Special Mechanics) ---
7
6
  {
8
7
  id: "phantom_step",
9
8
  name: "Paso Fantasma",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pokemon-io-core",
3
- "version": "0.0.119",
3
+ "version": "0.0.121",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",