Fixed minor syntax error

This commit is contained in:
Bertie690 2025-07-29 22:56:09 -04:00
parent 7ceb601979
commit e7c37e7135

View File

@ -2,6 +2,7 @@ import { applyAbAttrs } from "#abilities/apply-ab-attrs";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import type { BattlerIndex } from "#enums/battler-index"; import type { BattlerIndex } from "#enums/battler-index";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { MoveId } from "#enums/move-id";
import type { Pokemon } from "#field/pokemon"; import type { Pokemon } from "#field/pokemon";
import { PokemonPhase } from "#phases/pokemon-phase"; 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. // Update the "last move used" counter for Copycat and co.
if (this.passedPreUsageChecks) { if (this.passedPreUsageChecks) {
// TODO: Make this check a move in flight instead of a hackjob // 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) // Remove effects which were set on a Pokemon which removes them on summon (i.e. via Mold Breaker)