pokemon-io-core 0.0.111 → 0.0.112

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.
Files changed (86) hide show
  1. package/dist/core/battleState.d.ts +1 -1
  2. package/dist/core/fighters.d.ts +1 -1
  3. package/dist/engine/actions/move.js +5 -1
  4. package/dist/engine/combat/damage.js +17 -11
  5. package/dist/engine/events/applyRandomEvent.js +1 -3
  6. package/dist/engine/fighters/fighter.js +1 -1
  7. package/dist/skins/cliches/fighters.js +18 -18
  8. package/dist/skins/pokemon/fighters.js +18 -18
  9. package/package.json +2 -2
  10. package/dist/api/battle.d.ts +0 -90
  11. package/dist/api/room.d.ts +0 -29
  12. package/dist/api/socketTypes.d.ts +0 -96
  13. package/dist/core/actions.d.ts +0 -22
  14. package/dist/core/amulets.d.ts +0 -18
  15. package/dist/core/battleRuntime.d.ts +0 -46
  16. package/dist/core/emotes.d.ts +0 -13
  17. package/dist/core/engine.d.ts +0 -53
  18. package/dist/core/engine.js +0 -1046
  19. package/dist/core/events.d.ts +0 -142
  20. package/dist/core/ids.d.ts +0 -6
  21. package/dist/core/index.d.ts +0 -16
  22. package/dist/core/items.d.ts +0 -12
  23. package/dist/core/moves.d.ts +0 -87
  24. package/dist/core/randomEvents.d.ts +0 -28
  25. package/dist/core/randomEventsList.d.ts +0 -11
  26. package/dist/core/status.d.ts +0 -11
  27. package/dist/core/types.d.ts +0 -14
  28. package/dist/engine/actions/forcedSwitch.d.ts +0 -5
  29. package/dist/engine/actions/index.d.ts +0 -5
  30. package/dist/engine/actions/item.d.ts +0 -6
  31. package/dist/engine/actions/move.d.ts +0 -7
  32. package/dist/engine/actions/priority.d.ts +0 -6
  33. package/dist/engine/actions/switch.d.ts +0 -6
  34. package/dist/engine/combat/crit.d.ts +0 -2
  35. package/dist/engine/combat/damage.d.ts +0 -20
  36. package/dist/engine/combat/heal.d.ts +0 -6
  37. package/dist/engine/combat/index.d.ts +0 -5
  38. package/dist/engine/combat/stages.d.ts +0 -5
  39. package/dist/engine/combat/typeEffectiveness.d.ts +0 -3
  40. package/dist/engine/combat/winner.d.ts +0 -2
  41. package/dist/engine/debug.d.ts +0 -1
  42. package/dist/engine/effects/applyEffects.d.ts +0 -7
  43. package/dist/engine/effects/index.d.ts +0 -2
  44. package/dist/engine/effects/target.d.ts +0 -6
  45. package/dist/engine/engine.d.ts +0 -53
  46. package/dist/engine/engine.js +0 -1046
  47. package/dist/engine/events/applyRandomEvent.d.ts +0 -11
  48. package/dist/engine/events/index.d.ts +0 -2
  49. package/dist/engine/events/randomEventTrigger.d.ts +0 -16
  50. package/dist/engine/events.d.ts +0 -8
  51. package/dist/engine/fighters/fighter.d.ts +0 -4
  52. package/dist/engine/fighters/index.d.ts +0 -3
  53. package/dist/engine/fighters/selectors.d.ts +0 -13
  54. package/dist/engine/fighters/update.d.ts +0 -3
  55. package/dist/engine/index.d.ts +0 -12
  56. package/dist/engine/pokemonBattleService.d.ts +0 -6
  57. package/dist/engine/pokemonBattleService.js +0 -32
  58. package/dist/engine/rng.d.ts +0 -2
  59. package/dist/engine/rules.d.ts +0 -6
  60. package/dist/engine/runtime.d.ts +0 -7
  61. package/dist/engine/status/apply.d.ts +0 -6
  62. package/dist/engine/status/clear.d.ts +0 -6
  63. package/dist/engine/status/endOfTurn.d.ts +0 -6
  64. package/dist/engine/status/hardCc.d.ts +0 -3
  65. package/dist/engine/status/index.d.ts +0 -4
  66. package/dist/engine/turn/index.d.ts +0 -1
  67. package/dist/engine/turn/index.js +0 -1
  68. package/dist/engine/turn/resolveTurn.d.ts +0 -5
  69. package/dist/index.d.ts +0 -6
  70. package/dist/skins/CombatSkin.d.ts +0 -21
  71. package/dist/skins/cliches/clicheSkin.d.ts +0 -14
  72. package/dist/skins/cliches/fighters.d.ts +0 -2
  73. package/dist/skins/cliches/index.d.ts +0 -5
  74. package/dist/skins/cliches/items.d.ts +0 -2
  75. package/dist/skins/cliches/moves.d.ts +0 -2
  76. package/dist/skins/cliches/statuses.d.ts +0 -2
  77. package/dist/skins/cliches/types.d.ts +0 -13
  78. package/dist/skins/index.d.ts +0 -3
  79. package/dist/skins/pokemon/data/pokemon-moves.json +0 -609
  80. package/dist/skins/pokemon/fighters.d.ts +0 -2
  81. package/dist/skins/pokemon/index.d.ts +0 -6
  82. package/dist/skins/pokemon/items.d.ts +0 -2
  83. package/dist/skins/pokemon/moves.d.ts +0 -2
  84. package/dist/skins/pokemon/pokemonSkin.d.ts +0 -14
  85. package/dist/skins/pokemon/statuses.d.ts +0 -2
  86. package/dist/skins/pokemon/types.d.ts +0 -13
@@ -1,22 +0,0 @@
1
- export type ActionKind = "use_move" | "use_item" | "switch_fighter" | "no_action";
2
- export interface UseMoveAction {
3
- kind: "use_move";
4
- moveIndex: number;
5
- }
6
- export interface UseItemAction {
7
- kind: "use_item";
8
- itemIndex: number;
9
- }
10
- export interface SwitchFighterAction {
11
- kind: "switch_fighter";
12
- newIndex: number;
13
- forced?: boolean;
14
- }
15
- export interface NoAction {
16
- kind: "no_action";
17
- }
18
- export type PlayerAction = UseMoveAction | UseItemAction | SwitchFighterAction | NoAction;
19
- export interface BattleActions {
20
- player1: PlayerAction;
21
- player2: PlayerAction;
22
- }
@@ -1,18 +0,0 @@
1
- import type { AmuletId, TypeId, StatusId } from "./ids.js";
2
- import type { EffectDefinition } from "./moves.js";
3
- export type PassiveTriggerKind = "always" | "on_hit" | "on_damage_taken" | "on_below_hp_threshold";
4
- export interface PassiveTriggerCondition {
5
- kind: PassiveTriggerKind;
6
- hpThresholdPercent?: number;
7
- }
8
- export interface PassiveEffectDefinition {
9
- trigger: PassiveTriggerCondition;
10
- effects: EffectDefinition[];
11
- appliedStatusId?: StatusId;
12
- }
13
- export interface AmuletDefinition {
14
- id: AmuletId;
15
- name: string;
16
- classId: TypeId | null;
17
- passiveEffects: PassiveEffectDefinition[];
18
- }
@@ -1,46 +0,0 @@
1
- import { AmuletDefinition } from "./amulets.js";
2
- import { FighterDefinition } from "./fighters.js";
3
- import { ItemDefinition } from "./items.js";
4
- import { MoveDefinition } from "./moves.js";
5
- import { StatusDefinition } from "./status.js";
6
- import { TypeDefinition, TypeEffectivenessMatrix } from "./types.js";
7
- import { ItemId, MoveId, StatusId, TypeId } from "./ids.js";
8
- export interface BattleRules {
9
- baseCritChance: number;
10
- critPerStat: number;
11
- critMultiplier: number;
12
- stabMultiplier: number;
13
- randomMinDamageFactor: number;
14
- randomMaxDamageFactor: number;
15
- }
16
- export interface BattleRuntime {
17
- rules: BattleRules;
18
- typesById: Record<TypeId, TypeDefinition>;
19
- movesById: Record<MoveId, MoveDefinition>;
20
- itemsById: Record<ItemId, ItemDefinition>;
21
- amuletsById: Record<string, AmuletDefinition>;
22
- statusesById: Record<StatusId, StatusDefinition>;
23
- typeEffectiveness: TypeEffectivenessMatrix;
24
- }
25
- export interface PlayerFighterBattleConfig {
26
- fighter: FighterDefinition;
27
- maxHp: number;
28
- moves: MoveDefinition[];
29
- amulet: AmuletDefinition | null;
30
- }
31
- export interface PlayerBattleConfig {
32
- fighters: PlayerFighterBattleConfig[];
33
- items: ItemDefinition[];
34
- amulet: AmuletDefinition | null;
35
- }
36
- export interface BattleConfig {
37
- types: TypeDefinition[];
38
- typeEffectiveness: TypeEffectivenessMatrix;
39
- moves: MoveDefinition[];
40
- items: ItemDefinition[];
41
- amulets: AmuletDefinition[];
42
- statuses: StatusDefinition[];
43
- player1: PlayerBattleConfig;
44
- player2: PlayerBattleConfig;
45
- rules?: Partial<BattleRules>;
46
- }
@@ -1,13 +0,0 @@
1
- export type EmoteCategory = "emotional" | "strategic" | "social";
2
- export type EmoteId = string;
3
- export interface EmoteDefinition {
4
- id: EmoteId;
5
- category: EmoteCategory;
6
- emoji: string;
7
- label: string;
8
- description?: string;
9
- }
10
- export declare const EMOTES: EmoteDefinition[];
11
- export declare const getEmoteById: (id: EmoteId) => EmoteDefinition | undefined;
12
- export declare const getEmotesByCategory: (category: EmoteCategory) => EmoteDefinition[];
13
- export declare const isValidEmoteId: (id: string) => id is EmoteId;
@@ -1,53 +0,0 @@
1
- import { type BattleState, type FighterDefinition, type MoveDefinition, type ItemDefinition, type AmuletDefinition, type StatusDefinition, type TypeDefinition, type TypeEffectivenessMatrix, type BattleActions, type BattleEvent, type MoveId, type ItemId, type StatusId, type TypeId } from "../core/index.js";
2
- interface BattleRules {
3
- baseCritChance: number;
4
- critPerStat: number;
5
- critMultiplier: number;
6
- stabMultiplier: number;
7
- randomMinDamageFactor: number;
8
- randomMaxDamageFactor: number;
9
- }
10
- export interface BattleRuntime {
11
- rules: BattleRules;
12
- typesById: Record<TypeId, TypeDefinition>;
13
- movesById: Record<MoveId, MoveDefinition>;
14
- itemsById: Record<ItemId, ItemDefinition>;
15
- amuletsById: Record<string, AmuletDefinition>;
16
- statusesById: Record<StatusId, StatusDefinition>;
17
- typeEffectiveness: TypeEffectivenessMatrix;
18
- }
19
- export interface PlayerFighterBattleConfig {
20
- fighter: FighterDefinition;
21
- maxHp: number;
22
- moves: MoveDefinition[];
23
- amulet: AmuletDefinition | null;
24
- }
25
- export interface PlayerBattleConfig {
26
- fighters: PlayerFighterBattleConfig[];
27
- items: ItemDefinition[];
28
- amulet: AmuletDefinition | null;
29
- }
30
- export interface BattleConfig {
31
- types: TypeDefinition[];
32
- typeEffectiveness: TypeEffectivenessMatrix;
33
- moves: MoveDefinition[];
34
- items: ItemDefinition[];
35
- amulets: AmuletDefinition[];
36
- statuses: StatusDefinition[];
37
- player1: PlayerBattleConfig;
38
- player2: PlayerBattleConfig;
39
- rules?: Partial<BattleRules>;
40
- }
41
- export interface RuntimeBattleState extends BattleState {
42
- runtime: BattleRuntime;
43
- }
44
- export declare const createInitialBattleState: (config: BattleConfig) => BattleState;
45
- export declare const applyForcedSwitchChoice: (state: BattleState, targetPlayer: "player1" | "player2", newIndex: number) => {
46
- state: BattleState;
47
- events: BattleEvent[];
48
- };
49
- export declare const resolveTurn: (state: BattleState, actions: BattleActions) => {
50
- newState: BattleState;
51
- events: BattleEvent[];
52
- };
53
- export {};