pokemon-io-core 0.0.58 → 0.0.60
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/socketTypes.d.ts +8 -2
- package/dist/core/engine.js +2 -2
- package/package.json +1 -1
|
@@ -29,7 +29,13 @@ export interface ClientToServerEvents {
|
|
|
29
29
|
roomId: string;
|
|
30
30
|
itemIndex: number;
|
|
31
31
|
}) => void;
|
|
32
|
-
"
|
|
32
|
+
"battle:rematchSameLoadout": (payload: {
|
|
33
|
+
roomId: string;
|
|
34
|
+
}) => void;
|
|
35
|
+
"battle:rematchChangeLoadout": (payload: {
|
|
36
|
+
roomId: string;
|
|
37
|
+
}) => void;
|
|
38
|
+
ping: () => void;
|
|
33
39
|
}
|
|
34
40
|
export interface ServerToClientEvents {
|
|
35
41
|
"connection:state": (payload: {
|
|
@@ -42,5 +48,5 @@ export interface ServerToClientEvents {
|
|
|
42
48
|
message: string;
|
|
43
49
|
}) => void;
|
|
44
50
|
"battle:state": (payload: BattleView) => void;
|
|
45
|
-
|
|
51
|
+
pong: (msg: string) => void;
|
|
46
52
|
}
|
package/dist/core/engine.js
CHANGED
|
@@ -535,7 +535,7 @@ const resolveDamageMove = (state, playerKey, action) => {
|
|
|
535
535
|
return { state, events };
|
|
536
536
|
}
|
|
537
537
|
events.push({
|
|
538
|
-
...createBaseEvent(state.turnNumber, "action_declared", `${self.fighterId}
|
|
538
|
+
...createBaseEvent(state.turnNumber, "action_declared", `${self.fighterId} usó ${move.name}`),
|
|
539
539
|
actorId: self.fighterId,
|
|
540
540
|
});
|
|
541
541
|
const accuracy = move.accuracy ?? 100;
|
|
@@ -624,7 +624,7 @@ const resolveItemUse = (state, playerKey, action) => {
|
|
|
624
624
|
let updatedSelf = { ...self, items: updatedItems };
|
|
625
625
|
let updatedOpponent = { ...opponent };
|
|
626
626
|
events.push({
|
|
627
|
-
...createBaseEvent(state.turnNumber, "action_declared", `${self.fighterId}
|
|
627
|
+
...createBaseEvent(state.turnNumber, "action_declared", `${self.fighterId} usó ${itemDef.name}`),
|
|
628
628
|
actorId: self.fighterId,
|
|
629
629
|
});
|
|
630
630
|
const { actor: finalSelf, target: finalOpp, events: extraEvents, } = applyEffectsOnTarget(state, updatedSelf, updatedOpponent, null, // los items no usan fórmula de tipo por ahora
|