pokemon-io-core 0.0.2 → 0.0.4
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/index.d.ts +2 -2
- package/dist/api/index.js +2 -2
- package/dist/core/engine.js +0 -2
- package/dist/core/index.d.ts +11 -10
- package/dist/core/index.js +11 -10
- package/dist/engine/index.d.ts +1 -0
- package/dist/engine/index.js +1 -0
- package/dist/engine/pokemonBattleService.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/skins/index.d.ts +2 -0
- package/dist/skins/index.js +2 -0
- package/dist/skins/pokemon/index.d.ts +4 -3
- package/dist/skins/pokemon/index.js +4 -3
- package/dist/skins/pokemon/pokemonSkin.d.ts +2 -2
- package/package.json +14 -2
package/dist/api/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./room";
|
|
2
|
-
export * from "./battle";
|
|
1
|
+
export * from "./room.js";
|
|
2
|
+
export * from "./battle.js";
|
package/dist/api/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./room";
|
|
2
|
-
export * from "./battle";
|
|
1
|
+
export * from "./room.js";
|
|
2
|
+
export * from "./battle.js";
|
package/dist/core/engine.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// src/domain/combat/engine/battleEngine.ts
|
|
2
|
-
import { logger } from "../utils/logger";
|
|
3
2
|
const DEFAULT_RULES = {
|
|
4
3
|
baseCritChance: 0.05,
|
|
5
4
|
critPerStat: 0.002,
|
|
@@ -21,7 +20,6 @@ const cloneStats = (stats) => ({
|
|
|
21
20
|
crit: stats.crit,
|
|
22
21
|
});
|
|
23
22
|
const createBattleFighter = (cfg) => {
|
|
24
|
-
logger.info(`Creating fighter ${JSON.stringify(cfg)}`);
|
|
25
23
|
if (cfg.moves.length !== 4) {
|
|
26
24
|
throw new Error("Each fighter must have exactly 4 moves in MVP");
|
|
27
25
|
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
1
|
+
export * from "./actions.js";
|
|
2
|
+
export * from "./amulets.js";
|
|
3
|
+
export * from "./battleState.js";
|
|
4
|
+
export * from "./engine.js";
|
|
5
|
+
export * from "./events.js";
|
|
6
|
+
export * from "./fighters.js";
|
|
7
|
+
export * from "./ids.js";
|
|
8
|
+
export * from "./items.js";
|
|
9
|
+
export * from "./moves.js";
|
|
10
|
+
export * from "./status.js";
|
|
11
|
+
export * from "./types.js";
|
package/dist/core/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
1
|
+
export * from "./actions.js";
|
|
2
|
+
export * from "./amulets.js";
|
|
3
|
+
export * from "./battleState.js";
|
|
4
|
+
export * from "./engine.js";
|
|
5
|
+
export * from "./events.js";
|
|
6
|
+
export * from "./fighters.js";
|
|
7
|
+
export * from "./ids.js";
|
|
8
|
+
export * from "./items.js";
|
|
9
|
+
export * from "./moves.js";
|
|
10
|
+
export * from "./status.js";
|
|
11
|
+
export * from "./types.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./pokemonBattleService.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./pokemonBattleService.js";
|
|
@@ -2,5 +2,5 @@ import { BattleActions, BattleState } from "../core";
|
|
|
2
2
|
export declare const createPokemonBattle: (fighter1Id: string, fighter2Id: string) => BattleState;
|
|
3
3
|
export declare const runPokemonTurn: (state: BattleState, actions: BattleActions) => {
|
|
4
4
|
newState: BattleState;
|
|
5
|
-
events: import("
|
|
5
|
+
events: import("..").BattleEvent[];
|
|
6
6
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./core";
|
|
2
|
-
export * from "./api/battle";
|
|
3
|
-
export * from "./api/room";
|
|
4
|
-
export * from "./skins/CombatSkin";
|
|
5
|
-
export * from "./engine/pokemonBattleService";
|
|
1
|
+
export * from "./core/index.js";
|
|
2
|
+
export * from "./api/battle.js";
|
|
3
|
+
export * from "./api/room.js";
|
|
4
|
+
export * from "./skins/CombatSkin.js";
|
|
5
|
+
export * from "./engine/pokemonBattleService.js";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./core";
|
|
2
|
-
export * from "./api/battle";
|
|
3
|
-
export * from "./api/room";
|
|
4
|
-
export * from "./skins/CombatSkin";
|
|
5
|
-
export * from "./engine/pokemonBattleService";
|
|
1
|
+
export * from "./core/index.js";
|
|
2
|
+
export * from "./api/battle.js";
|
|
3
|
+
export * from "./api/room.js";
|
|
4
|
+
export * from "./skins/CombatSkin.js";
|
|
5
|
+
export * from "./engine/pokemonBattleService.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from "./types";
|
|
2
|
-
export * from "./moves";
|
|
3
|
-
export * from "./fighters";
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./moves.js";
|
|
3
|
+
export * from "./fighters.js";
|
|
4
|
+
export * from "./pokemonSkin.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from "./types";
|
|
2
|
-
export * from "./moves";
|
|
3
|
-
export * from "./fighters";
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./moves.js";
|
|
3
|
+
export * from "./fighters.js";
|
|
4
|
+
export * from "./pokemonSkin.js";
|
|
@@ -3,8 +3,8 @@ import type { MoveDefinition } from "../../core";
|
|
|
3
3
|
import { PlayerBattleConfig } from "../../core/engine";
|
|
4
4
|
export declare class PokemonSkin implements CombatSkin {
|
|
5
5
|
readonly id = "pokemon";
|
|
6
|
-
getTypes(): import("
|
|
7
|
-
getTypeEffectiveness(): import("
|
|
6
|
+
getTypes(): import("../..").TypeDefinition[];
|
|
7
|
+
getTypeEffectiveness(): import("../..").TypeEffectivenessMatrix;
|
|
8
8
|
getMoves(): MoveDefinition[];
|
|
9
9
|
getItems(): never[];
|
|
10
10
|
getAmulets(): never[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pokemon-io-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -20,6 +20,18 @@
|
|
|
20
20
|
"./core": {
|
|
21
21
|
"import": "./dist/core/index.js",
|
|
22
22
|
"types": "./dist/core/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./skins": {
|
|
25
|
+
"import": "./dist/skins/index.js",
|
|
26
|
+
"types": "./dist/skins/index.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./api": {
|
|
29
|
+
"import": "./dist/api/index.js",
|
|
30
|
+
"types": "./dist/api/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./engine": {
|
|
33
|
+
"import": "./dist/engine/index.js",
|
|
34
|
+
"types": "./dist/engine/index.d.ts"
|
|
23
35
|
}
|
|
24
36
|
},
|
|
25
37
|
"typesVersions": {
|
|
@@ -52,4 +64,4 @@
|
|
|
52
64
|
"devDependencies": {
|
|
53
65
|
"typescript": "^5.8.3"
|
|
54
66
|
}
|
|
55
|
-
}
|
|
67
|
+
}
|