pokemon-io-core 0.0.51 → 0.0.53
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/package.json +4 -6
- package/dist/api/battle.js +0 -2
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.js +0 -3
- package/dist/core/battleState.d.ts +0 -39
- package/dist/core/battleState.js +0 -1
- package/dist/core/engine.d.ts +0 -45
- package/dist/core/engine.js +0 -869
- package/dist/core/index.d.ts +0 -11
- package/dist/core/index.js +0 -11
- package/dist/engine/engine.d.ts +0 -45
- package/dist/engine/engine.js +0 -869
- package/dist/engine/index.d.ts +0 -1
- package/dist/engine/index.js +0 -1
- package/dist/engine/pokemonBattleService.d.ts +0 -6
- package/dist/engine/pokemonBattleService.js +0 -32
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -6
- package/dist/skins/CombatSkin.d.ts +0 -18
- package/dist/skins/CombatSkin.js +0 -1
- package/dist/skins/index.d.ts +0 -2
- package/dist/skins/index.js +0 -2
- package/dist/skins/pokemon/fighters.js +0 -174
- package/dist/skins/pokemon/index.d.ts +0 -6
- package/dist/skins/pokemon/index.js +0 -6
- package/dist/skins/pokemon/items.js +0 -143
- package/dist/skins/pokemon/moves.js +0 -459
- package/dist/skins/pokemon/pokemonSkin.js +0 -91
- package/dist/skins/pokemon/statuses.js +0 -85
- package/dist/skins/pokemon/types.js +0 -97
package/dist/engine/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./pokemonBattleService.js";
|
package/dist/engine/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./pokemonBattleService.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BattleActions, BattleState } from "../core";
|
|
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("..").BattleEvent[];
|
|
6
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { POKEMON_FIGHTERS, POKEMON_MOVES, POKEMON_TYPE_MATRIX, POKEMON_TYPES } from "../skins/pokemon";
|
|
2
|
-
import { createInitialBattleState, resolveTurn } from "../core/engine";
|
|
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: 100,
|
|
18
|
-
moves: POKEMON_MOVES.filter((m) => (f1.recommendedMoves ?? []).includes(m.id)),
|
|
19
|
-
items: [],
|
|
20
|
-
amulet: null
|
|
21
|
-
},
|
|
22
|
-
player2: {
|
|
23
|
-
fighter: f2,
|
|
24
|
-
maxHp: 100,
|
|
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);
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { TypeDefinition, TypeEffectivenessMatrix, MoveDefinition, ItemDefinition, AmuletDefinition, StatusDefinition } from "../core";
|
|
2
|
-
import type { PlayerBattleConfig } from "../core/engine";
|
|
3
|
-
export interface FighterLoadout {
|
|
4
|
-
fighterId: string | null;
|
|
5
|
-
itemIds: string[];
|
|
6
|
-
amuletId: string | null;
|
|
7
|
-
moveIds: string[];
|
|
8
|
-
}
|
|
9
|
-
export interface CombatSkin {
|
|
10
|
-
readonly id: string;
|
|
11
|
-
getTypes(): TypeDefinition[];
|
|
12
|
-
getTypeEffectiveness(): TypeEffectivenessMatrix;
|
|
13
|
-
getMoves(): MoveDefinition[];
|
|
14
|
-
getItems(): ItemDefinition[];
|
|
15
|
-
getAmulets(): AmuletDefinition[];
|
|
16
|
-
getStatuses(): StatusDefinition[];
|
|
17
|
-
buildPlayerConfig(loadout: FighterLoadout): PlayerBattleConfig;
|
|
18
|
-
}
|
package/dist/skins/CombatSkin.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/skins/index.d.ts
DELETED
package/dist/skins/index.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { POKEMON_TYPE_IDS } from "./types";
|
|
2
|
-
const makeStats = (offense, defense, speed, crit) => ({
|
|
3
|
-
offense,
|
|
4
|
-
defense,
|
|
5
|
-
speed,
|
|
6
|
-
crit,
|
|
7
|
-
});
|
|
8
|
-
export const POKEMON_FIGHTERS = [
|
|
9
|
-
// --- TIER 1: AZUL (Suma Atk + Def < 100) ---
|
|
10
|
-
{
|
|
11
|
-
id: "pikachu",
|
|
12
|
-
name: "Pikachu",
|
|
13
|
-
description: "Rápido y ágil, confía en su velocidad y golpes críticos.",
|
|
14
|
-
img: "pikachu",
|
|
15
|
-
classId: POKEMON_TYPE_IDS.electric,
|
|
16
|
-
baseStats: makeStats(55, 35, 90, 15), // Suma: 90
|
|
17
|
-
recommendedMoves: ["tackle", "thunder_shock"],
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: "cyndaquil",
|
|
21
|
-
name: "Cyndaquil",
|
|
22
|
-
description: "Pequeño volcán en erupción, ofensivo pero frágil.",
|
|
23
|
-
img: "cyndaquil",
|
|
24
|
-
classId: POKEMON_TYPE_IDS.fire,
|
|
25
|
-
baseStats: makeStats(52, 38, 75, 10), // Suma: 90
|
|
26
|
-
recommendedMoves: ["tackle", "ember"],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: "squirtle",
|
|
30
|
-
name: "Squirtle",
|
|
31
|
-
description: "Caparazón resistente, ideal para resistir el daño inicial.",
|
|
32
|
-
img: "squirtle",
|
|
33
|
-
classId: POKEMON_TYPE_IDS.water,
|
|
34
|
-
baseStats: makeStats(40, 58, 45, 5), // Suma: 98
|
|
35
|
-
recommendedMoves: ["tackle", "water_gun"],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: "chikorita",
|
|
39
|
-
name: "Chikorita",
|
|
40
|
-
description: "Soporte natural, destaca por su defensa y persistencia.",
|
|
41
|
-
img: "chikorita",
|
|
42
|
-
classId: POKEMON_TYPE_IDS.grass,
|
|
43
|
-
baseStats: makeStats(35, 60, 40, 5), // Suma: 95
|
|
44
|
-
recommendedMoves: ["tackle", "vine_whip"],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: "psyduck",
|
|
48
|
-
name: "Psyduck",
|
|
49
|
-
description: "Dolor de cabeza constante que desata ráfagas psíquicas.",
|
|
50
|
-
img: "psyduck",
|
|
51
|
-
classId: POKEMON_TYPE_IDS.psychic,
|
|
52
|
-
baseStats: makeStats(50, 40, 60, 12), // Suma: 90
|
|
53
|
-
recommendedMoves: ["confusion"],
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: "geodude",
|
|
57
|
-
name: "Geodude",
|
|
58
|
-
description: "Roca sólida, muy duro de derribar pero extremadamente lento.",
|
|
59
|
-
img: "geodude",
|
|
60
|
-
classId: POKEMON_TYPE_IDS.rock,
|
|
61
|
-
baseStats: makeStats(40, 58, 20, 5), // Suma: 98
|
|
62
|
-
recommendedMoves: ["tackle", "rock_throw"],
|
|
63
|
-
},
|
|
64
|
-
// --- TIER 2: AMBER (Suma Atk + Def >= 100 y < 120) ---
|
|
65
|
-
{
|
|
66
|
-
id: "electabuzz",
|
|
67
|
-
name: "Electabuzz",
|
|
68
|
-
description: "Duelista eléctrico balanceado con gran capacidad ofensiva.",
|
|
69
|
-
img: "electabuzz",
|
|
70
|
-
classId: POKEMON_TYPE_IDS.electric,
|
|
71
|
-
baseStats: makeStats(65, 45, 95, 10), // Suma: 110
|
|
72
|
-
recommendedMoves: ["tackle", "thunder_shock"],
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: "magmortar",
|
|
76
|
-
name: "Magmortar",
|
|
77
|
-
description: "Artillería pesada de fuego, daño masivo a media distancia.",
|
|
78
|
-
img: "magmortar",
|
|
79
|
-
classId: POKEMON_TYPE_IDS.fire,
|
|
80
|
-
baseStats: makeStats(70, 45, 60, 8), // Suma: 115
|
|
81
|
-
recommendedMoves: ["tackle", "ember"],
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
id: "blastoise",
|
|
85
|
-
name: "Blastoise",
|
|
86
|
-
description: "Tanque con cañones hidráulicos, una muralla ofensiva.",
|
|
87
|
-
img: "blastoise",
|
|
88
|
-
classId: POKEMON_TYPE_IDS.water,
|
|
89
|
-
baseStats: makeStats(50, 65, 55, 5), // Suma: 115
|
|
90
|
-
recommendedMoves: ["tackle", "water_gun"],
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
id: "sceptile",
|
|
94
|
-
name: "Sceptile",
|
|
95
|
-
description: "Depredador de la selva, golpea letalmente desde las sombras.",
|
|
96
|
-
img: "sceptile",
|
|
97
|
-
classId: POKEMON_TYPE_IDS.grass,
|
|
98
|
-
baseStats: makeStats(68, 40, 100, 12), // Suma: 108
|
|
99
|
-
recommendedMoves: ["tackle", "vine_whip"],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: "alakazam",
|
|
103
|
-
name: "Alakazam",
|
|
104
|
-
description: "Coeficiente intelectual de 5000, poder mental puro sin defensa física.",
|
|
105
|
-
img: "alakazam",
|
|
106
|
-
classId: POKEMON_TYPE_IDS.psychic,
|
|
107
|
-
baseStats: makeStats(75, 30, 95, 8), // Suma: 105
|
|
108
|
-
recommendedMoves: ["tackle", "confusion"],
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: "onix",
|
|
112
|
-
name: "Onix",
|
|
113
|
-
description: "Serpiente de roca gigante, defensa física casi impenetrable.",
|
|
114
|
-
img: "onix",
|
|
115
|
-
classId: POKEMON_TYPE_IDS.rock,
|
|
116
|
-
baseStats: makeStats(35, 80, 30, 5), // Suma: 115
|
|
117
|
-
recommendedMoves: ["tackle", "rock_slide"],
|
|
118
|
-
},
|
|
119
|
-
// --- TIER 3: RED (Suma Atk + Def >= 120) ---
|
|
120
|
-
{
|
|
121
|
-
id: "zapdos",
|
|
122
|
-
name: "Zapdos",
|
|
123
|
-
description: "Ave legendaria del trueno, domina los cielos con poder bruto.",
|
|
124
|
-
img: "zapdos",
|
|
125
|
-
classId: POKEMON_TYPE_IDS.electric,
|
|
126
|
-
baseStats: makeStats(70, 55, 85, 10), // Suma: 125
|
|
127
|
-
recommendedMoves: ["peck", "thunderbolt"],
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: "charizard",
|
|
131
|
-
name: "Charizard",
|
|
132
|
-
description: "Dragón de fuego icónico, arrasa con todo a su paso.",
|
|
133
|
-
img: "charizard",
|
|
134
|
-
classId: POKEMON_TYPE_IDS.fire,
|
|
135
|
-
baseStats: makeStats(75, 50, 85, 10), // Suma: 125
|
|
136
|
-
recommendedMoves: ["tackle", "ember"],
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: "kyogre",
|
|
140
|
-
name: "Kyogre",
|
|
141
|
-
description: "Leviatán mítico capaz de inundar el mundo entero.",
|
|
142
|
-
img: "kyogre",
|
|
143
|
-
classId: POKEMON_TYPE_IDS.water,
|
|
144
|
-
baseStats: makeStats(75, 65, 60, 8), // Suma: 140
|
|
145
|
-
recommendedMoves: ["tackle", "water_gun"],
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
id: "venusaur",
|
|
149
|
-
name: "Venusaur",
|
|
150
|
-
description: "Coloso de la jungla, combina toxicidad y fuerza bruta.",
|
|
151
|
-
img: "venusaur",
|
|
152
|
-
classId: POKEMON_TYPE_IDS.grass,
|
|
153
|
-
baseStats: makeStats(62, 63, 60, 6), // Suma: 125
|
|
154
|
-
recommendedMoves: ["tackle", "vine_whip"],
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
id: "mew",
|
|
158
|
-
name: "Mew",
|
|
159
|
-
description: "El ancestro de todos los Pokémon, versátil y místico.",
|
|
160
|
-
img: "mew",
|
|
161
|
-
classId: POKEMON_TYPE_IDS.psychic,
|
|
162
|
-
baseStats: makeStats(65, 65, 80, 10), // Suma: 130
|
|
163
|
-
recommendedMoves: ["tackle", "confusion"], // Corregido vine_whip
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
id: "groudon",
|
|
167
|
-
name: "Groudon",
|
|
168
|
-
description: "Creador de continentes, poder terrestre devastador.",
|
|
169
|
-
img: "groudon",
|
|
170
|
-
classId: POKEMON_TYPE_IDS.rock,
|
|
171
|
-
baseStats: makeStats(80, 70, 50, 6), // Suma: 150
|
|
172
|
-
recommendedMoves: ["tackle", "rock_slide"], // Corregido vine_whip
|
|
173
|
-
},
|
|
174
|
-
];
|
|
@@ -1,143 +0,0 @@
|
|
|
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
|
-
];
|