pokemon-io-core 0.0.124 → 0.0.126
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/core/ids.d.ts +18 -6
- package/dist/core/ids.js +10 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.js +2 -1
- package/dist/core/randomEvents.d.ts +21 -5
- package/dist/core/randomEvents.js +4 -4
- package/dist/core/randomEventsList.d.ts +10 -4
- package/dist/core/randomEventsList.js +24 -163
- package/dist/core/status.d.ts +1 -0
- package/dist/core/validation.d.ts +21 -0
- package/dist/core/validation.js +183 -0
- package/dist/engine/combat/damage.js +2 -1
- package/dist/engine/events/applyRandomEvent.js +13 -6
- package/dist/engine/turn/resolveTurn.js +3 -2
- package/dist/skins/CombatSkin.d.ts +1 -0
- package/dist/skins/cliches/clicheSkin.d.ts +2 -1
- package/dist/skins/cliches/clicheSkin.js +3 -0
- package/dist/skins/cliches/constants.d.ts +135 -0
- package/dist/skins/cliches/constants.js +136 -0
- package/dist/skins/cliches/fighters.d.ts +1 -1
- package/dist/skins/cliches/fighters.js +165 -165
- package/dist/skins/cliches/items.js +45 -44
- package/dist/skins/cliches/moves.js +74 -69
- package/dist/skins/cliches/randomEvents.d.ts +7 -0
- package/dist/skins/cliches/randomEvents.js +1167 -0
- package/dist/skins/cliches/statuses.js +63 -36
- package/dist/skins/cliches/types.d.ts +12 -12
- package/dist/skins/cliches/types.js +12 -11
- package/dist/skins/pokemon/constants.d.ts +83 -0
- package/dist/skins/pokemon/constants.js +84 -0
- package/dist/skins/pokemon/fighters.js +55 -55
- package/dist/skins/pokemon/items.js +23 -22
- package/dist/skins/pokemon/moves.js +59 -58
- package/dist/skins/pokemon/pokemonSkin.d.ts +2 -1
- package/dist/skins/pokemon/pokemonSkin.js +3 -0
- package/dist/skins/pokemon/randomEvents.d.ts +6 -0
- package/dist/skins/pokemon/randomEvents.js +165 -0
- package/dist/skins/pokemon/statuses.js +5 -4
- package/dist/skins/pokemon/types.d.ts +6 -6
- package/dist/skins/pokemon/types.js +7 -6
- package/package.json +1 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// @pokemon-io/combat-core/src/skins/pokemon/randomEvents.ts
|
|
2
|
+
/**
|
|
3
|
+
* POKEMON-SPECIFIC Random Events
|
|
4
|
+
* These only appear when using the Pokemon skin
|
|
5
|
+
*/
|
|
6
|
+
export const POKEMON_RANDOM_EVENTS = [
|
|
7
|
+
// ==================== COMMON (3 events) ====================
|
|
8
|
+
{
|
|
9
|
+
id: "pokemon_center",
|
|
10
|
+
name: "🏥 Centro Pokémon Móvil",
|
|
11
|
+
description: "Una enfermera Joy aparece y cura a ambos Pokémon.",
|
|
12
|
+
narration: ["¡Suena una música familiar!", "¡La Enfermera Joy ha venido a ayudar!"],
|
|
13
|
+
rarity: "common",
|
|
14
|
+
effects: [
|
|
15
|
+
{
|
|
16
|
+
effectType: "heal_percent",
|
|
17
|
+
target: "both",
|
|
18
|
+
percentValue: 15,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "team_rocket",
|
|
24
|
+
name: "🚀 ¡Equipo Rocket!",
|
|
25
|
+
description: "¡Preparaos para los problemas! El ataque de ambos baja.",
|
|
26
|
+
narration: ["¡Prepárense para los problemas!", "¡Y más vale que teman!"],
|
|
27
|
+
rarity: "common",
|
|
28
|
+
effects: [
|
|
29
|
+
{
|
|
30
|
+
effectType: "stat_change",
|
|
31
|
+
target: "both",
|
|
32
|
+
statType: "offense",
|
|
33
|
+
statChange: -1,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "rare_candy",
|
|
39
|
+
name: "🍬 Caramelo Raro",
|
|
40
|
+
description: "Un Pokémon aleatorio encuentra un caramelo y se fortalece.",
|
|
41
|
+
narration: ["¡Un objeto brillante aparece!", "¡Es un Caramelo Raro!"],
|
|
42
|
+
rarity: "common",
|
|
43
|
+
effects: [
|
|
44
|
+
{
|
|
45
|
+
effectType: "stat_change",
|
|
46
|
+
target: "random_one",
|
|
47
|
+
statType: "offense",
|
|
48
|
+
statChange: 1,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
effectType: "stat_change",
|
|
52
|
+
target: "random_one",
|
|
53
|
+
statType: "defense",
|
|
54
|
+
statChange: 1,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
// ==================== RARE (4 events) ====================
|
|
59
|
+
{
|
|
60
|
+
id: "sandstorm",
|
|
61
|
+
name: "🌪️ Tormenta de Arena",
|
|
62
|
+
description: "Una tormenta de arena daña a todos los Pokémon.",
|
|
63
|
+
narration: ["¡El viento empieza a soplar con fuerza!", "¡Una tormenta de arena azota el combate!"],
|
|
64
|
+
rarity: "rare",
|
|
65
|
+
effects: [
|
|
66
|
+
{
|
|
67
|
+
effectType: "damage_percent",
|
|
68
|
+
target: "both",
|
|
69
|
+
percentValue: 8,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "professor_oak",
|
|
75
|
+
name: "👴 Profesor Oak",
|
|
76
|
+
description: "¡El Profesor Oak anima a tu Pokémon!",
|
|
77
|
+
narration: ["¡Un mensaje del laboratorio!", "¡El Profesor Oak envía sus ánimos!"],
|
|
78
|
+
rarity: "rare",
|
|
79
|
+
effects: [
|
|
80
|
+
{
|
|
81
|
+
effectType: "stat_change",
|
|
82
|
+
target: "random_one",
|
|
83
|
+
statType: "offense",
|
|
84
|
+
statChange: 2,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
effectType: "stat_change",
|
|
88
|
+
target: "random_one",
|
|
89
|
+
statType: "speed",
|
|
90
|
+
statChange: 1,
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "dawn_stone",
|
|
96
|
+
name: "💎 Piedra Alba",
|
|
97
|
+
description: "Una piedra evolutiva aumenta la defensa de un Pokémon.",
|
|
98
|
+
narration: ["¡Una extraña piedra emite luz!", "¡El poder de la Piedra Alba se manifiesta!"],
|
|
99
|
+
rarity: "rare",
|
|
100
|
+
effects: [
|
|
101
|
+
{
|
|
102
|
+
effectType: "stat_change",
|
|
103
|
+
target: "random_one",
|
|
104
|
+
statType: "defense",
|
|
105
|
+
statChange: 3,
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "potion_spray",
|
|
111
|
+
name: "💊 Lluvia de Pociones",
|
|
112
|
+
description: "Pociones caen del cielo curando a ambos Pokémon.",
|
|
113
|
+
narration: ["¡Empieza a llover... ¿medicina?!", "¡Una lluvia de pociones cubre el estadio!"],
|
|
114
|
+
rarity: "rare",
|
|
115
|
+
effects: [
|
|
116
|
+
{
|
|
117
|
+
effectType: "heal_percent",
|
|
118
|
+
target: "both",
|
|
119
|
+
percentValue: 12,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
// ==================== EPIC (2 events) ====================
|
|
124
|
+
{
|
|
125
|
+
id: "legendary_appearance",
|
|
126
|
+
name: "✨ Aparición Legendaria",
|
|
127
|
+
description: "Un Pokémon legendario otorga poder a un luchador aleatorio.",
|
|
128
|
+
narration: ["¡UNA PRESENCIA ABRUMADORA SE SIENTE!", "¡Un Pokémon Legendario observa el combate!"],
|
|
129
|
+
rarity: "epic",
|
|
130
|
+
effects: [
|
|
131
|
+
{
|
|
132
|
+
effectType: "stat_change",
|
|
133
|
+
target: "random_one",
|
|
134
|
+
statType: "offense",
|
|
135
|
+
statChange: 3,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
effectType: "stat_change",
|
|
139
|
+
target: "random_one",
|
|
140
|
+
statType: "defense",
|
|
141
|
+
statChange: 2,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
effectType: "stat_change",
|
|
145
|
+
target: "random_one",
|
|
146
|
+
statType: "speed",
|
|
147
|
+
statChange: 2,
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: "max_revive",
|
|
153
|
+
name: "⚡ Revivir Máximo",
|
|
154
|
+
description: "El Pokémon con menos vida recupera un 30% de HP.",
|
|
155
|
+
narration: ["¡Un cristal amarillo brilla con intensidad!", "¡El poder del Revivir Máximo restaura la energía!"],
|
|
156
|
+
rarity: "epic",
|
|
157
|
+
effects: [
|
|
158
|
+
{
|
|
159
|
+
effectType: "heal_percent",
|
|
160
|
+
target: "random_one", // TODO: Cambiar a "lowest_hp" cuando se implemente
|
|
161
|
+
percentValue: 30,
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { POKEMON_STATUS_IDS } from "./constants.js";
|
|
1
2
|
export const POKEMON_STATUSES = [
|
|
2
3
|
// --- BURN (Fuego) ---
|
|
3
4
|
// Effect: DoT + Halves Attack (Engine)
|
|
4
5
|
{
|
|
5
|
-
id:
|
|
6
|
+
id: POKEMON_STATUS_IDS.BURN,
|
|
6
7
|
name: "Quemado",
|
|
7
8
|
kind: "soft",
|
|
8
9
|
minDurationTurns: 3,
|
|
@@ -17,7 +18,7 @@ export const POKEMON_STATUSES = [
|
|
|
17
18
|
// --- PARALYSIS (Eléctrico) ---
|
|
18
19
|
// Effect: Halves Speed + 25% Chance to Skip Turn (Engine)
|
|
19
20
|
{
|
|
20
|
-
id:
|
|
21
|
+
id: POKEMON_STATUS_IDS.PARALYSIS,
|
|
21
22
|
name: "Paralizado",
|
|
22
23
|
kind: "soft",
|
|
23
24
|
minDurationTurns: 3,
|
|
@@ -29,7 +30,7 @@ export const POKEMON_STATUSES = [
|
|
|
29
30
|
// --- POISON (Planta/Toxic) ---
|
|
30
31
|
// Effect: DoT that scales each turn (Engine)
|
|
31
32
|
{
|
|
32
|
-
id:
|
|
33
|
+
id: POKEMON_STATUS_IDS.POISON,
|
|
33
34
|
name: "Envenenado",
|
|
34
35
|
kind: "soft",
|
|
35
36
|
minDurationTurns: 4,
|
|
@@ -44,7 +45,7 @@ export const POKEMON_STATUSES = [
|
|
|
44
45
|
// --- SLEEP (Psychic/Hypnosis) ---
|
|
45
46
|
// Effect: Hard CC. 30% Wake on Hit (Engine)
|
|
46
47
|
{
|
|
47
|
-
id:
|
|
48
|
+
id: POKEMON_STATUS_IDS.SLEEP,
|
|
48
49
|
name: "Dormido",
|
|
49
50
|
kind: "hard_cc",
|
|
50
51
|
minDurationTurns: 2,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { TypeDefinition, TypeEffectivenessMatrix, TypeId } from "../../core/index.js";
|
|
2
2
|
export declare const POKEMON_TYPE_IDS: {
|
|
3
|
-
readonly fire:
|
|
4
|
-
readonly water:
|
|
5
|
-
readonly grass:
|
|
6
|
-
readonly electric:
|
|
7
|
-
readonly psychic:
|
|
8
|
-
readonly rock:
|
|
3
|
+
readonly fire: TypeId;
|
|
4
|
+
readonly water: TypeId;
|
|
5
|
+
readonly grass: TypeId;
|
|
6
|
+
readonly electric: TypeId;
|
|
7
|
+
readonly psychic: TypeId;
|
|
8
|
+
readonly rock: TypeId;
|
|
9
9
|
};
|
|
10
10
|
export type PokemonTypeId = (typeof POKEMON_TYPE_IDS)[keyof typeof POKEMON_TYPE_IDS];
|
|
11
11
|
export declare const POKEMON_TYPES: TypeDefinition[];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { typeId } from "../../core/ids.js";
|
|
1
2
|
export const POKEMON_TYPE_IDS = {
|
|
2
|
-
fire: "fire",
|
|
3
|
-
water: "water",
|
|
4
|
-
grass: "grass",
|
|
5
|
-
electric: "electric",
|
|
6
|
-
psychic: "psychic",
|
|
7
|
-
rock: "rock",
|
|
3
|
+
fire: typeId("fire"),
|
|
4
|
+
water: typeId("water"),
|
|
5
|
+
grass: typeId("grass"),
|
|
6
|
+
electric: typeId("electric"),
|
|
7
|
+
psychic: typeId("psychic"),
|
|
8
|
+
rock: typeId("rock"),
|
|
8
9
|
};
|
|
9
10
|
export const POKEMON_TYPES = [
|
|
10
11
|
{
|