From e7c37e7135ee71e0215c3e267c36567e286aa3f2 Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Tue, 29 Jul 2025 22:56:09 -0400 Subject: [PATCH] Fixed minor syntax error --- src/phases/move-end-phase.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/phases/move-end-phase.ts b/src/phases/move-end-phase.ts index 843d14ee26c..d24207c0539 100644 --- a/src/phases/move-end-phase.ts +++ b/src/phases/move-end-phase.ts @@ -2,6 +2,7 @@ import { applyAbAttrs } from "#abilities/apply-ab-attrs"; import { globalScene } from "#app/global-scene"; import type { BattlerIndex } from "#enums/battler-index"; import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; +import { MoveId } from "#enums/move-id"; import type { Pokemon } from "#field/pokemon"; import { PokemonPhase } from "#phases/pokemon-phase"; @@ -40,7 +41,7 @@ export class MoveEndPhase extends PokemonPhase { // Update the "last move used" counter for Copycat and co. if (this.passedPreUsageChecks) { // TODO: Make this check a move in flight instead of a hackjob - globalScene.currentBattle.lastMove = pokemon.getLastXMoves()[0].move; + globalScene.currentBattle.lastMove = pokemon.getLastXMoves()[0]?.move ?? MoveId.NONE; } // Remove effects which were set on a Pokemon which removes them on summon (i.e. via Mold Breaker)