Add null handling for pokemon in move-end phase

This commit is contained in:
Sirz Benjie 2025-02-07 01:22:40 -06:00
parent 676222744c
commit ec06c0f666
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -14,7 +14,7 @@ export class MoveEndPhase extends PokemonPhase {
super.start();
const pokemon = this.getPokemon();
if (!this.wasFollowUp && pokemon.isActive(true)) {
if (!this.wasFollowUp && pokemon?.isActive(true)) {
pokemon.lapseTags(BattlerTagLapseType.AFTER_MOVE);
}