pokemon-io-core 0.0.93 → 0.0.94

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.
@@ -1,6 +1,9 @@
1
1
  import { BattleView } from "./battle.js";
2
2
  import { RoomView } from "./room.js";
3
3
  export interface ClientToServerEvents {
4
+ "player:hello": (payload: {
5
+ playerKey: string;
6
+ }) => void;
4
7
  "room:create": (payload: {
5
8
  nickname: string;
6
9
  roomName: string;
@@ -16,7 +19,7 @@ export interface ClientToServerEvents {
16
19
  }) => void;
17
20
  "room:reconnect": (payload: {
18
21
  roomId: string;
19
- oldPlayerId: string;
22
+ playerKey: string;
20
23
  }) => void;
21
24
  "room:setLoadout": (payload: {
22
25
  roomId: string;
@@ -107,7 +107,7 @@ export const resolveDamageMove = (state, playerKey, action) => {
107
107
  ...newState,
108
108
  forcedSwitch: {
109
109
  targetPlayer,
110
- reason: "roar",
110
+ reason: { kind: "move", moveId: move.id, actorFighterId: self.fighterId },
111
111
  },
112
112
  };
113
113
  events.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pokemon-io-core",
3
- "version": "0.0.93",
3
+ "version": "0.0.94",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",