pokemon-io-core 0.0.109 → 0.0.110
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.
|
@@ -158,14 +158,6 @@ export const resolveDamageMove = (state, playerKey, action) => {
|
|
|
158
158
|
effectiveness,
|
|
159
159
|
defenderBeforeHp: opponent.currentHp,
|
|
160
160
|
});
|
|
161
|
-
events.push({
|
|
162
|
-
...createBaseEvent(state.turnNumber, "move_hit", `${self.fighterId} acierta ${move.name}`),
|
|
163
|
-
actorId: self.fighterId,
|
|
164
|
-
moveId: move.id,
|
|
165
|
-
targetId: opponent.fighterId,
|
|
166
|
-
isCritical,
|
|
167
|
-
effectiveness,
|
|
168
|
-
});
|
|
169
161
|
dbg("MOVE_EFFECTS", {
|
|
170
162
|
moveId: move.id,
|
|
171
163
|
moveName: move.name,
|
|
@@ -174,6 +166,14 @@ export const resolveDamageMove = (state, playerKey, action) => {
|
|
|
174
166
|
// Apply Effects
|
|
175
167
|
const { actor: finalSelf, target: finalOpp, events: extraEvents, } = applyEffectsOnTarget(state, updatedSelf, updatedOpponent, move.typeId, isCritical, move.effects);
|
|
176
168
|
events.push(...extraEvents);
|
|
169
|
+
events.push({
|
|
170
|
+
...createBaseEvent(state.turnNumber, "move_hit", `${self.fighterId} acierta ${move.name}`),
|
|
171
|
+
actorId: self.fighterId,
|
|
172
|
+
moveId: move.id,
|
|
173
|
+
targetId: opponent.fighterId,
|
|
174
|
+
isCritical,
|
|
175
|
+
effectiveness,
|
|
176
|
+
});
|
|
177
177
|
let newState = updateFightersInState(state, playerKey, finalSelf, finalOpp);
|
|
178
178
|
// --- FORCED SWITCH (Roar) ---
|
|
179
179
|
const hasForceSwitch = move.effects.some((e) => e.kind === "force_switch");
|