pokemon-io-core 0.0.54 → 0.0.56
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/api/battle.d.ts +26 -0
- package/dist/api/battle.js +2 -0
- package/dist/api/room.d.ts +21 -0
- package/dist/api/room.js +2 -0
- package/dist/api/socketTypes.d.ts +46 -0
- package/dist/api/socketTypes.js +1 -0
- package/dist/core/actions.d.ts +21 -0
- package/dist/core/actions.js +1 -0
- package/dist/core/amulets.d.ts +18 -0
- package/dist/core/amulets.js +1 -0
- package/dist/core/battleState.d.ts +39 -0
- package/dist/core/battleState.js +1 -0
- package/dist/core/engine.d.ts +45 -0
- package/dist/core/engine.js +869 -0
- package/dist/core/events.d.ts +67 -0
- package/dist/core/events.js +1 -0
- package/dist/core/fighters.d.ts +13 -0
- package/dist/core/fighters.js +1 -0
- package/dist/core/ids.d.ts +6 -0
- package/dist/core/ids.js +1 -0
- package/dist/core/index.d.ts +11 -0
- package/dist/core/index.js +11 -0
- package/dist/core/items.d.ts +12 -0
- package/dist/core/items.js +1 -0
- package/dist/core/moves.d.ts +73 -0
- package/dist/core/moves.js +2 -0
- package/dist/core/status.d.ts +11 -0
- package/dist/core/status.js +1 -0
- package/dist/core/types.d.ts +14 -0
- package/dist/core/types.js +1 -0
- package/dist/engine/index.d.ts +1 -0
- package/dist/engine/index.js +1 -0
- package/dist/engine/pokemonBattleService.d.ts +6 -0
- package/dist/engine/pokemonBattleService.js +32 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/skins/CombatSkin.d.ts +18 -0
- package/dist/skins/CombatSkin.js +1 -0
- package/dist/skins/index.d.ts +2 -0
- package/dist/skins/index.js +2 -0
- package/dist/skins/pokemon/fighters.d.ts +2 -0
- package/dist/skins/pokemon/fighters.js +174 -0
- package/dist/skins/pokemon/index.d.ts +6 -0
- package/dist/skins/pokemon/index.js +6 -0
- package/dist/skins/pokemon/items.d.ts +2 -0
- package/dist/skins/pokemon/items.js +143 -0
- package/dist/skins/pokemon/moves.d.ts +2 -0
- package/dist/skins/pokemon/moves.js +459 -0
- package/dist/skins/pokemon/pokemonSkin.d.ts +13 -0
- package/dist/skins/pokemon/pokemonSkin.js +91 -0
- package/dist/skins/pokemon/statuses.d.ts +2 -0
- package/dist/skins/pokemon/statuses.js +85 -0
- package/dist/skins/pokemon/types.d.ts +13 -0
- package/dist/skins/pokemon/types.js +97 -0
- package/package.json +7 -7
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export const POKEMON_ITEMS = [
|
|
2
|
+
{
|
|
3
|
+
id: "super_potion",
|
|
4
|
+
name: "Super Poción",
|
|
5
|
+
category: "heal_shield",
|
|
6
|
+
target: "self",
|
|
7
|
+
maxUses: 1,
|
|
8
|
+
effects: [{ kind: "heal", amount: 50 }],
|
|
9
|
+
image: "hiper-potion",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "potion",
|
|
13
|
+
name: "Poción",
|
|
14
|
+
category: "heal_shield",
|
|
15
|
+
target: "self",
|
|
16
|
+
maxUses: 2,
|
|
17
|
+
effects: [{ kind: "heal", amount: 25 }],
|
|
18
|
+
image: "potion",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "apple",
|
|
22
|
+
name: "Manzana",
|
|
23
|
+
category: "heal_shield",
|
|
24
|
+
target: "self",
|
|
25
|
+
maxUses: 3,
|
|
26
|
+
effects: [{ kind: "heal", amount: 17 }],
|
|
27
|
+
image: "fancy-apple",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "mushroom",
|
|
31
|
+
name: "Seta",
|
|
32
|
+
category: "heal_shield",
|
|
33
|
+
target: "self",
|
|
34
|
+
maxUses: 4,
|
|
35
|
+
effects: [{ kind: "heal", amount: 14 }],
|
|
36
|
+
image: "mushroom",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "shotgun",
|
|
40
|
+
name: "Escopeta",
|
|
41
|
+
target: "enemy",
|
|
42
|
+
category: "damage",
|
|
43
|
+
maxUses: 2,
|
|
44
|
+
effects: [
|
|
45
|
+
{ kind: "damage", flatAmount: 15 },
|
|
46
|
+
{ kind: "apply_status", statusId: "burn" },
|
|
47
|
+
],
|
|
48
|
+
image: "shotgun",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "pistol",
|
|
52
|
+
name: "Pistola",
|
|
53
|
+
category: "damage",
|
|
54
|
+
target: "enemy",
|
|
55
|
+
maxUses: 4,
|
|
56
|
+
effects: [
|
|
57
|
+
{ kind: "damage", flatAmount: 8 },
|
|
58
|
+
{ kind: "apply_status", statusId: "burn" },
|
|
59
|
+
],
|
|
60
|
+
image: "pistol",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "riffle",
|
|
64
|
+
name: "Rifle",
|
|
65
|
+
target: "enemy",
|
|
66
|
+
category: "damage",
|
|
67
|
+
maxUses: 3,
|
|
68
|
+
effects: [
|
|
69
|
+
{ kind: "damage", flatAmount: 10 },
|
|
70
|
+
{ kind: "apply_status", statusId: "burn" },
|
|
71
|
+
],
|
|
72
|
+
image: "riffle",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "sniper",
|
|
76
|
+
name: "Sniper",
|
|
77
|
+
target: "enemy",
|
|
78
|
+
category: "damage",
|
|
79
|
+
maxUses: 1,
|
|
80
|
+
effects: [
|
|
81
|
+
{ kind: "damage", flatAmount: 30 },
|
|
82
|
+
{ kind: "apply_status", statusId: "burn" },
|
|
83
|
+
],
|
|
84
|
+
image: "sniper",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "blue-berry",
|
|
88
|
+
name: "Baya azul",
|
|
89
|
+
category: "status_buff",
|
|
90
|
+
maxUses: 1,
|
|
91
|
+
target: "self",
|
|
92
|
+
effects: [
|
|
93
|
+
{
|
|
94
|
+
kind: "clear_status",
|
|
95
|
+
statusIds: ["burn"], // cura QUEMADURA
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
image: "blue-berry",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "pink-berry",
|
|
102
|
+
name: "Baya rosa",
|
|
103
|
+
category: "status_buff",
|
|
104
|
+
maxUses: 1,
|
|
105
|
+
target: "self",
|
|
106
|
+
effects: [
|
|
107
|
+
{
|
|
108
|
+
kind: "clear_status",
|
|
109
|
+
statusIds: ["poison"], // cura VENENO
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
image: "pink-berry",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "yellow-berry",
|
|
116
|
+
name: "Baya amarilla",
|
|
117
|
+
category: "status_buff",
|
|
118
|
+
maxUses: 1,
|
|
119
|
+
target: "self",
|
|
120
|
+
effects: [
|
|
121
|
+
{
|
|
122
|
+
kind: "clear_status",
|
|
123
|
+
statusIds: ["paralysis"], // cura PARÁLISIS
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
image: "yellow-berry",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "green-berry",
|
|
130
|
+
name: "Baya verde",
|
|
131
|
+
category: "status_buff",
|
|
132
|
+
maxUses: 1,
|
|
133
|
+
target: "self",
|
|
134
|
+
effects: [
|
|
135
|
+
{
|
|
136
|
+
kind: "clear_status",
|
|
137
|
+
statusIds: ["burn", "poison"], // por ejemplo: limpia quemadura o veneno
|
|
138
|
+
kinds: ["soft"], // redundante pero semántico
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
image: "green-berry",
|
|
142
|
+
},
|
|
143
|
+
];
|
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { POKEMON_TYPE_IDS } from "./types";
|
|
2
|
+
export const POKEMON_MOVES = [
|
|
3
|
+
// =====================================================
|
|
4
|
+
// FUEGO
|
|
5
|
+
// =====================================================
|
|
6
|
+
// 1) Nuke fuego
|
|
7
|
+
{
|
|
8
|
+
id: "overheat",
|
|
9
|
+
name: "Sofoco Ígneo",
|
|
10
|
+
typeId: POKEMON_TYPE_IDS.fire,
|
|
11
|
+
accuracy: 85,
|
|
12
|
+
maxPP: 5,
|
|
13
|
+
priority: 0,
|
|
14
|
+
effects: [
|
|
15
|
+
{ kind: "damage", basePower: 80 },
|
|
16
|
+
{ kind: "damage", flatAmount: 10, target: "self" }, // coste: se hace daño
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
// 2) Golpe estable fuerte fuego
|
|
20
|
+
{
|
|
21
|
+
id: "flamethrower",
|
|
22
|
+
name: "Lanzallamas",
|
|
23
|
+
typeId: POKEMON_TYPE_IDS.fire,
|
|
24
|
+
accuracy: 100,
|
|
25
|
+
maxPP: 15,
|
|
26
|
+
priority: 0,
|
|
27
|
+
effects: [{ kind: "damage", basePower: 60 }],
|
|
28
|
+
},
|
|
29
|
+
// 3) Daño bajo + quemar
|
|
30
|
+
{
|
|
31
|
+
id: "ember",
|
|
32
|
+
name: "Ascuas",
|
|
33
|
+
typeId: POKEMON_TYPE_IDS.fire,
|
|
34
|
+
accuracy: 100,
|
|
35
|
+
maxPP: 25,
|
|
36
|
+
priority: 0,
|
|
37
|
+
effects: [
|
|
38
|
+
{ kind: "damage", basePower: 40 },
|
|
39
|
+
{ kind: "apply_status", statusId: "burn" },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
// 4) Cura + limpia estados blandos
|
|
43
|
+
{
|
|
44
|
+
id: "purifying_flame",
|
|
45
|
+
name: "Llama Purificadora",
|
|
46
|
+
typeId: POKEMON_TYPE_IDS.fire,
|
|
47
|
+
accuracy: 100,
|
|
48
|
+
maxPP: 10,
|
|
49
|
+
priority: 0,
|
|
50
|
+
effects: [
|
|
51
|
+
{ kind: "heal", target: "self", amount: 22 },
|
|
52
|
+
{
|
|
53
|
+
kind: "clear_status",
|
|
54
|
+
target: "self",
|
|
55
|
+
kinds: ["soft"],
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
// 5) Golpe medio estable
|
|
60
|
+
{
|
|
61
|
+
id: "fire_claw",
|
|
62
|
+
name: "Garra Ígnea",
|
|
63
|
+
typeId: POKEMON_TYPE_IDS.fire,
|
|
64
|
+
accuracy: 100,
|
|
65
|
+
maxPP: 20,
|
|
66
|
+
priority: 0,
|
|
67
|
+
effects: [{ kind: "damage", basePower: 50 }],
|
|
68
|
+
},
|
|
69
|
+
// 6) Cura simple
|
|
70
|
+
{
|
|
71
|
+
id: "healing_warmth",
|
|
72
|
+
name: "Calor Reconfortante",
|
|
73
|
+
typeId: POKEMON_TYPE_IDS.fire,
|
|
74
|
+
accuracy: 100,
|
|
75
|
+
maxPP: 15,
|
|
76
|
+
priority: 0,
|
|
77
|
+
effects: [{ kind: "heal", target: "self", amount: 18 }],
|
|
78
|
+
},
|
|
79
|
+
// =====================================================
|
|
80
|
+
// AGUA
|
|
81
|
+
// =====================================================
|
|
82
|
+
// 1) Nuke agua
|
|
83
|
+
{
|
|
84
|
+
id: "hydro_cannon",
|
|
85
|
+
name: "Cañón Hidro",
|
|
86
|
+
typeId: POKEMON_TYPE_IDS.water,
|
|
87
|
+
accuracy: 85,
|
|
88
|
+
maxPP: 5,
|
|
89
|
+
priority: 0,
|
|
90
|
+
effects: [
|
|
91
|
+
{ kind: "damage", basePower: 80 },
|
|
92
|
+
{ kind: "modify_stats", offenseDelta: -15 },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
// 2) Golpe estable fuerte agua
|
|
96
|
+
{
|
|
97
|
+
id: "surf",
|
|
98
|
+
name: "Surf",
|
|
99
|
+
typeId: POKEMON_TYPE_IDS.water,
|
|
100
|
+
accuracy: 100,
|
|
101
|
+
maxPP: 15,
|
|
102
|
+
priority: 0,
|
|
103
|
+
effects: [{ kind: "damage", basePower: 60 }],
|
|
104
|
+
},
|
|
105
|
+
// 3) Daño bajo + escaldado
|
|
106
|
+
{
|
|
107
|
+
id: "scald",
|
|
108
|
+
name: "Escaldar",
|
|
109
|
+
typeId: POKEMON_TYPE_IDS.water,
|
|
110
|
+
accuracy: 100,
|
|
111
|
+
maxPP: 20,
|
|
112
|
+
priority: 0,
|
|
113
|
+
effects: [
|
|
114
|
+
{ kind: "damage", basePower: 40 },
|
|
115
|
+
{ kind: "apply_status", statusId: "scalded" },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
// 4) Curación + limpiar estados
|
|
119
|
+
{
|
|
120
|
+
id: "aqua_purify",
|
|
121
|
+
name: "Aguas Purificadoras",
|
|
122
|
+
typeId: POKEMON_TYPE_IDS.water,
|
|
123
|
+
accuracy: 100,
|
|
124
|
+
maxPP: 10,
|
|
125
|
+
priority: 0,
|
|
126
|
+
effects: [
|
|
127
|
+
{ kind: "heal", target: "self", amount: 22 },
|
|
128
|
+
{
|
|
129
|
+
kind: "clear_status",
|
|
130
|
+
target: "self",
|
|
131
|
+
kinds: ["soft"],
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
// 5) Golpe medio estable
|
|
136
|
+
{
|
|
137
|
+
id: "wave_crash",
|
|
138
|
+
name: "Oleada Feroz",
|
|
139
|
+
typeId: POKEMON_TYPE_IDS.water,
|
|
140
|
+
accuracy: 100,
|
|
141
|
+
maxPP: 20,
|
|
142
|
+
priority: 0,
|
|
143
|
+
effects: [{ kind: "damage", basePower: 50 }],
|
|
144
|
+
},
|
|
145
|
+
// 6) Curación simple
|
|
146
|
+
{
|
|
147
|
+
id: "healing_rain",
|
|
148
|
+
name: "Lluvia Curativa",
|
|
149
|
+
typeId: POKEMON_TYPE_IDS.water,
|
|
150
|
+
accuracy: 100,
|
|
151
|
+
maxPP: 15,
|
|
152
|
+
priority: 0,
|
|
153
|
+
effects: [{ kind: "heal", target: "self", amount: 18 }],
|
|
154
|
+
},
|
|
155
|
+
// =====================================================
|
|
156
|
+
// PLANTA
|
|
157
|
+
// =====================================================
|
|
158
|
+
// 1) Nuke planta
|
|
159
|
+
{
|
|
160
|
+
id: "leaf_storm",
|
|
161
|
+
name: "Tormenta de Hojas",
|
|
162
|
+
typeId: POKEMON_TYPE_IDS.grass,
|
|
163
|
+
accuracy: 90,
|
|
164
|
+
maxPP: 5,
|
|
165
|
+
priority: 0,
|
|
166
|
+
effects: [
|
|
167
|
+
{ kind: "damage", basePower: 80 },
|
|
168
|
+
{ kind: "modify_stats", offenseDelta: -20 },
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
// 2) Golpe estable fuerte planta
|
|
172
|
+
{
|
|
173
|
+
id: "energy_ball",
|
|
174
|
+
name: "Energibola",
|
|
175
|
+
typeId: POKEMON_TYPE_IDS.grass,
|
|
176
|
+
accuracy: 100,
|
|
177
|
+
maxPP: 15,
|
|
178
|
+
priority: 0,
|
|
179
|
+
effects: [{ kind: "damage", basePower: 60 }],
|
|
180
|
+
},
|
|
181
|
+
// 3) Daño bajo + enredado
|
|
182
|
+
{
|
|
183
|
+
id: "leech_seed",
|
|
184
|
+
name: "Drenadoras",
|
|
185
|
+
typeId: POKEMON_TYPE_IDS.grass,
|
|
186
|
+
accuracy: 100,
|
|
187
|
+
maxPP: 20,
|
|
188
|
+
priority: 0,
|
|
189
|
+
effects: [
|
|
190
|
+
{ kind: "damage", basePower: 40 },
|
|
191
|
+
{ kind: "apply_status", statusId: "entangled" },
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
// 4) Curación + limpiar estados
|
|
195
|
+
{
|
|
196
|
+
id: "nature_purify",
|
|
197
|
+
name: "Purificación Natural",
|
|
198
|
+
typeId: POKEMON_TYPE_IDS.grass,
|
|
199
|
+
accuracy: 100,
|
|
200
|
+
maxPP: 10,
|
|
201
|
+
priority: 0,
|
|
202
|
+
effects: [
|
|
203
|
+
{ kind: "heal", target: "self", amount: 22 },
|
|
204
|
+
{
|
|
205
|
+
kind: "clear_status",
|
|
206
|
+
target: "self",
|
|
207
|
+
kinds: ["soft"],
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
// 5) Golpe medio estable
|
|
212
|
+
{
|
|
213
|
+
id: "power_whip",
|
|
214
|
+
name: "Látigo Poderoso",
|
|
215
|
+
typeId: POKEMON_TYPE_IDS.grass,
|
|
216
|
+
accuracy: 100,
|
|
217
|
+
maxPP: 20,
|
|
218
|
+
priority: 0,
|
|
219
|
+
effects: [{ kind: "damage", basePower: 50 }],
|
|
220
|
+
},
|
|
221
|
+
// 6) Curación simple
|
|
222
|
+
{
|
|
223
|
+
id: "regrowth",
|
|
224
|
+
name: "Rebrote",
|
|
225
|
+
typeId: POKEMON_TYPE_IDS.grass,
|
|
226
|
+
accuracy: 100,
|
|
227
|
+
maxPP: 15,
|
|
228
|
+
priority: 0,
|
|
229
|
+
effects: [{ kind: "heal", target: "self", amount: 18 }],
|
|
230
|
+
},
|
|
231
|
+
// =====================================================
|
|
232
|
+
// PSÍQUICO
|
|
233
|
+
// =====================================================
|
|
234
|
+
// 1) Nuke psíquico
|
|
235
|
+
{
|
|
236
|
+
id: "psycho_boost",
|
|
237
|
+
name: "Psicoimpulso",
|
|
238
|
+
typeId: POKEMON_TYPE_IDS.psychic,
|
|
239
|
+
accuracy: 90,
|
|
240
|
+
maxPP: 5,
|
|
241
|
+
priority: 0,
|
|
242
|
+
effects: [
|
|
243
|
+
{ kind: "damage", basePower: 80 },
|
|
244
|
+
{ kind: "modify_stats", offenseDelta: -20 },
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
// 2) Golpe estable fuerte psíquico
|
|
248
|
+
{
|
|
249
|
+
id: "psychic",
|
|
250
|
+
name: "Psíquico",
|
|
251
|
+
typeId: POKEMON_TYPE_IDS.psychic,
|
|
252
|
+
accuracy: 100,
|
|
253
|
+
maxPP: 15,
|
|
254
|
+
priority: 0,
|
|
255
|
+
effects: [{ kind: "damage", basePower: 60 }],
|
|
256
|
+
},
|
|
257
|
+
// 3) Daño bajo + hard CC
|
|
258
|
+
{
|
|
259
|
+
id: "mind_spike",
|
|
260
|
+
name: "Puñal Mental",
|
|
261
|
+
typeId: POKEMON_TYPE_IDS.psychic,
|
|
262
|
+
accuracy: 100,
|
|
263
|
+
maxPP: 15,
|
|
264
|
+
priority: 0,
|
|
265
|
+
effects: [
|
|
266
|
+
{ kind: "damage", basePower: 40 },
|
|
267
|
+
{ kind: "apply_status", statusId: "mind_break" },
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
// 4) Curación + limpiar estados
|
|
271
|
+
{
|
|
272
|
+
id: "aura_cleanse",
|
|
273
|
+
name: "Limpieza Áurica",
|
|
274
|
+
typeId: POKEMON_TYPE_IDS.psychic,
|
|
275
|
+
accuracy: 100,
|
|
276
|
+
maxPP: 10,
|
|
277
|
+
priority: 0,
|
|
278
|
+
effects: [
|
|
279
|
+
{ kind: "heal", target: "self", amount: 22 },
|
|
280
|
+
{
|
|
281
|
+
kind: "clear_status",
|
|
282
|
+
target: "self",
|
|
283
|
+
kinds: ["soft"],
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
},
|
|
287
|
+
// 5) Golpe medio estable
|
|
288
|
+
{
|
|
289
|
+
id: "psyshock",
|
|
290
|
+
name: "Psicocarga",
|
|
291
|
+
typeId: POKEMON_TYPE_IDS.psychic,
|
|
292
|
+
accuracy: 100,
|
|
293
|
+
maxPP: 20,
|
|
294
|
+
priority: 0,
|
|
295
|
+
effects: [{ kind: "damage", basePower: 50 }],
|
|
296
|
+
},
|
|
297
|
+
// 6) Curación simple
|
|
298
|
+
{
|
|
299
|
+
id: "healing_mind",
|
|
300
|
+
name: "Mente Serena",
|
|
301
|
+
typeId: POKEMON_TYPE_IDS.psychic,
|
|
302
|
+
accuracy: 100,
|
|
303
|
+
maxPP: 15,
|
|
304
|
+
priority: 0,
|
|
305
|
+
effects: [{ kind: "heal", target: "self", amount: 18 }],
|
|
306
|
+
},
|
|
307
|
+
// =====================================================
|
|
308
|
+
// ROCA
|
|
309
|
+
// =====================================================
|
|
310
|
+
// 1) Nuke roca
|
|
311
|
+
{
|
|
312
|
+
id: "rock_wrecker",
|
|
313
|
+
name: "Destroza Rocas",
|
|
314
|
+
typeId: POKEMON_TYPE_IDS.rock,
|
|
315
|
+
accuracy: 85,
|
|
316
|
+
maxPP: 5,
|
|
317
|
+
priority: 0,
|
|
318
|
+
effects: [
|
|
319
|
+
{ kind: "damage", basePower: 80 },
|
|
320
|
+
{ kind: "modify_stats", offenseDelta: -20 },
|
|
321
|
+
],
|
|
322
|
+
},
|
|
323
|
+
// 2) Golpe estable fuerte roca
|
|
324
|
+
{
|
|
325
|
+
id: "stone_edge",
|
|
326
|
+
name: "Roca Afilada",
|
|
327
|
+
typeId: POKEMON_TYPE_IDS.rock,
|
|
328
|
+
accuracy: 90,
|
|
329
|
+
maxPP: 10,
|
|
330
|
+
priority: 0,
|
|
331
|
+
effects: [{ kind: "damage", basePower: 60 }],
|
|
332
|
+
},
|
|
333
|
+
// 3) Daño medio + petrificado
|
|
334
|
+
{
|
|
335
|
+
id: "rock_slide",
|
|
336
|
+
name: "Avalancha",
|
|
337
|
+
typeId: POKEMON_TYPE_IDS.rock,
|
|
338
|
+
accuracy: 100,
|
|
339
|
+
maxPP: 15,
|
|
340
|
+
priority: 0,
|
|
341
|
+
effects: [
|
|
342
|
+
{ kind: "damage", basePower: 50 },
|
|
343
|
+
{ kind: "apply_status", statusId: "petrified" },
|
|
344
|
+
],
|
|
345
|
+
},
|
|
346
|
+
// 4) Curación + limpiar estados
|
|
347
|
+
{
|
|
348
|
+
id: "sand_cleanse",
|
|
349
|
+
name: "Purga de Arena",
|
|
350
|
+
typeId: POKEMON_TYPE_IDS.rock,
|
|
351
|
+
accuracy: 100,
|
|
352
|
+
maxPP: 10,
|
|
353
|
+
priority: 0,
|
|
354
|
+
effects: [
|
|
355
|
+
{ kind: "heal", target: "self", amount: 22 },
|
|
356
|
+
{
|
|
357
|
+
kind: "clear_status",
|
|
358
|
+
target: "self",
|
|
359
|
+
kinds: ["soft"],
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
},
|
|
363
|
+
// 5) Golpe medio estable
|
|
364
|
+
{
|
|
365
|
+
id: "power_gem",
|
|
366
|
+
name: "Joya de Luz",
|
|
367
|
+
typeId: POKEMON_TYPE_IDS.rock,
|
|
368
|
+
accuracy: 100,
|
|
369
|
+
maxPP: 20,
|
|
370
|
+
priority: 0,
|
|
371
|
+
effects: [{ kind: "damage", basePower: 50 }],
|
|
372
|
+
},
|
|
373
|
+
// 6) Curación simple
|
|
374
|
+
{
|
|
375
|
+
id: "healing_mineral",
|
|
376
|
+
name: "Mineral Curativo",
|
|
377
|
+
typeId: POKEMON_TYPE_IDS.rock,
|
|
378
|
+
accuracy: 100,
|
|
379
|
+
maxPP: 15,
|
|
380
|
+
priority: 0,
|
|
381
|
+
effects: [{ kind: "heal", target: "self", amount: 18 }],
|
|
382
|
+
},
|
|
383
|
+
// =====================================================
|
|
384
|
+
// ELÉCTRICO
|
|
385
|
+
// =====================================================
|
|
386
|
+
// 1) Nuke eléctrico
|
|
387
|
+
{
|
|
388
|
+
id: "bolt_strike",
|
|
389
|
+
name: "Impacto Voltio",
|
|
390
|
+
typeId: POKEMON_TYPE_IDS.electric,
|
|
391
|
+
accuracy: 85,
|
|
392
|
+
maxPP: 5,
|
|
393
|
+
priority: 0,
|
|
394
|
+
effects: [
|
|
395
|
+
{ kind: "damage", basePower: 80 },
|
|
396
|
+
{ kind: "modify_stats", offenseDelta: -15 },
|
|
397
|
+
],
|
|
398
|
+
},
|
|
399
|
+
// 2) Golpe estable fuerte eléctrico
|
|
400
|
+
{
|
|
401
|
+
id: "thunderbolt",
|
|
402
|
+
name: "Rayo",
|
|
403
|
+
typeId: POKEMON_TYPE_IDS.electric,
|
|
404
|
+
accuracy: 100,
|
|
405
|
+
maxPP: 15,
|
|
406
|
+
priority: 0,
|
|
407
|
+
effects: [{ kind: "damage", basePower: 60 }],
|
|
408
|
+
},
|
|
409
|
+
// 3) Daño bajo + shocked
|
|
410
|
+
{
|
|
411
|
+
id: "thunder_wave",
|
|
412
|
+
name: "Onda Trueno",
|
|
413
|
+
typeId: POKEMON_TYPE_IDS.electric,
|
|
414
|
+
accuracy: 100,
|
|
415
|
+
maxPP: 20,
|
|
416
|
+
priority: 0,
|
|
417
|
+
effects: [
|
|
418
|
+
{ kind: "damage", basePower: 40 },
|
|
419
|
+
{ kind: "apply_status", statusId: "shocked" },
|
|
420
|
+
],
|
|
421
|
+
},
|
|
422
|
+
// 4) Curación + limpiar estados
|
|
423
|
+
{
|
|
424
|
+
id: "static_field",
|
|
425
|
+
name: "Campo Estático",
|
|
426
|
+
typeId: POKEMON_TYPE_IDS.electric,
|
|
427
|
+
accuracy: 100,
|
|
428
|
+
maxPP: 10,
|
|
429
|
+
priority: 0,
|
|
430
|
+
effects: [
|
|
431
|
+
{ kind: "heal", target: "self", amount: 22 },
|
|
432
|
+
{
|
|
433
|
+
kind: "clear_status",
|
|
434
|
+
target: "self",
|
|
435
|
+
kinds: ["soft"],
|
|
436
|
+
},
|
|
437
|
+
],
|
|
438
|
+
},
|
|
439
|
+
// 5) Golpe medio estable
|
|
440
|
+
{
|
|
441
|
+
id: "wild_charge",
|
|
442
|
+
name: "Carga Salvaje",
|
|
443
|
+
typeId: POKEMON_TYPE_IDS.electric,
|
|
444
|
+
accuracy: 100,
|
|
445
|
+
maxPP: 20,
|
|
446
|
+
priority: 0,
|
|
447
|
+
effects: [{ kind: "damage", basePower: 50 }],
|
|
448
|
+
},
|
|
449
|
+
// 6) Curación simple
|
|
450
|
+
{
|
|
451
|
+
id: "healing_spark",
|
|
452
|
+
name: "Chispa Sanadora",
|
|
453
|
+
typeId: POKEMON_TYPE_IDS.electric,
|
|
454
|
+
accuracy: 100,
|
|
455
|
+
maxPP: 15,
|
|
456
|
+
priority: 0,
|
|
457
|
+
effects: [{ kind: "heal", target: "self", amount: 18 }],
|
|
458
|
+
},
|
|
459
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ItemDefinition, MoveDefinition, PlayerBattleConfig } from "../../core";
|
|
2
|
+
import type { CombatSkin, FighterLoadout } from "../CombatSkin";
|
|
3
|
+
export declare class PokemonSkin implements CombatSkin {
|
|
4
|
+
readonly id = "pokemon";
|
|
5
|
+
getTypes(): import("../..").TypeDefinition[];
|
|
6
|
+
getTypeEffectiveness(): import("../..").TypeEffectivenessMatrix;
|
|
7
|
+
getMoves(): MoveDefinition[];
|
|
8
|
+
getItems(): ItemDefinition[];
|
|
9
|
+
getAmulets(): never[];
|
|
10
|
+
getStatuses(): import("../..").StatusDefinition[];
|
|
11
|
+
buildPlayerConfig(loadout: FighterLoadout): PlayerBattleConfig;
|
|
12
|
+
}
|
|
13
|
+
export declare const createPokemonSkin: () => CombatSkin;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// pokemon-io-core/src/skins/pokemon/pokemonSkin.ts
|
|
2
|
+
import { POKEMON_FIGHTERS, POKEMON_ITEMS, POKEMON_MOVES, POKEMON_STATUSES, POKEMON_TYPES, POKEMON_TYPE_MATRIX, } from "./index";
|
|
3
|
+
// --- helpers ---
|
|
4
|
+
const findPokemonById = (id) => {
|
|
5
|
+
const lower = id.toLowerCase();
|
|
6
|
+
return POKEMON_FIGHTERS.find((f) => f.id.toLowerCase() === lower) ?? null;
|
|
7
|
+
};
|
|
8
|
+
const findMoveById = (id) => {
|
|
9
|
+
return POKEMON_MOVES.find((m) => m.id === id) ?? null;
|
|
10
|
+
};
|
|
11
|
+
const findItemById = (id) => {
|
|
12
|
+
return POKEMON_ITEMS.find((i) => i.id === id) ?? null;
|
|
13
|
+
};
|
|
14
|
+
const FILLER_MOVE_ID = "tackle";
|
|
15
|
+
const buildMovesFromLoadout = (fighter, loadout) => {
|
|
16
|
+
const selectedMoveIds = loadout.moveIds ?? [];
|
|
17
|
+
const selectedMoves = selectedMoveIds
|
|
18
|
+
.map((id) => findMoveById(id))
|
|
19
|
+
.filter((m) => m !== null);
|
|
20
|
+
if (selectedMoves.length >= 4) {
|
|
21
|
+
return selectedMoves.slice(0, 4);
|
|
22
|
+
}
|
|
23
|
+
const result = [...selectedMoves];
|
|
24
|
+
const recommendedIds = fighter.recommendedMoves ?? [];
|
|
25
|
+
for (const recId of recommendedIds) {
|
|
26
|
+
if (result.length >= 4)
|
|
27
|
+
break;
|
|
28
|
+
const move = findMoveById(recId);
|
|
29
|
+
if (move && !result.some((m) => m.id === move.id)) {
|
|
30
|
+
result.push(move);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const filler = findMoveById(FILLER_MOVE_ID);
|
|
34
|
+
while (result.length < 4 && filler) {
|
|
35
|
+
result.push(filler);
|
|
36
|
+
}
|
|
37
|
+
if (result.length === 0 && filler) {
|
|
38
|
+
result.push(filler);
|
|
39
|
+
}
|
|
40
|
+
return result.slice(0, 4);
|
|
41
|
+
};
|
|
42
|
+
const buildItemsFromLoadout = (loadout) => {
|
|
43
|
+
const selectedItemIds = loadout.itemIds ?? [];
|
|
44
|
+
const selectedItems = selectedItemIds
|
|
45
|
+
.map((id) => findItemById(id))
|
|
46
|
+
.filter((i) => i !== null);
|
|
47
|
+
return selectedItems;
|
|
48
|
+
};
|
|
49
|
+
export class PokemonSkin {
|
|
50
|
+
id = "pokemon";
|
|
51
|
+
getTypes() {
|
|
52
|
+
return POKEMON_TYPES;
|
|
53
|
+
}
|
|
54
|
+
getTypeEffectiveness() {
|
|
55
|
+
return POKEMON_TYPE_MATRIX;
|
|
56
|
+
}
|
|
57
|
+
getMoves() {
|
|
58
|
+
return POKEMON_MOVES;
|
|
59
|
+
}
|
|
60
|
+
getItems() {
|
|
61
|
+
return POKEMON_ITEMS;
|
|
62
|
+
}
|
|
63
|
+
getAmulets() {
|
|
64
|
+
return []; // más adelante
|
|
65
|
+
}
|
|
66
|
+
getStatuses() {
|
|
67
|
+
return POKEMON_STATUSES; // más adelante
|
|
68
|
+
}
|
|
69
|
+
buildPlayerConfig(loadout) {
|
|
70
|
+
if (!loadout.fighterId) {
|
|
71
|
+
throw new Error("fighterId is required in FighterLoadout");
|
|
72
|
+
}
|
|
73
|
+
console.log("buildPlayerConfig", loadout.fighterId);
|
|
74
|
+
const fighter = findPokemonById(loadout.fighterId);
|
|
75
|
+
if (!fighter) {
|
|
76
|
+
throw new Error(`Unknown fighterId for Pokemon skin: ${loadout.fighterId}`);
|
|
77
|
+
}
|
|
78
|
+
const moves = buildMovesFromLoadout(fighter, loadout);
|
|
79
|
+
const items = buildItemsFromLoadout(loadout);
|
|
80
|
+
return {
|
|
81
|
+
fighter,
|
|
82
|
+
maxHp: fighter.baseStats.defense + fighter.baseStats.offense,
|
|
83
|
+
moves,
|
|
84
|
+
items,
|
|
85
|
+
amulet: null,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export const createPokemonSkin = () => {
|
|
90
|
+
return new PokemonSkin();
|
|
91
|
+
};
|