Fix crash on catching a Pokemon

pull/16/head
Flashfyre 2024-02-18 10:53:32 -05:00
parent c92f108fe3
commit 29ba51ef34
1 changed files with 1 additions and 1 deletions

View File

@ -3390,7 +3390,7 @@ export class AttemptCapturePhase extends PokemonPhase {
this.end();
};
const removePokemon = () => {
this.scene.getPlayerField().filter(p => p.isActive()).forEach(playerPokemon => playerPokemon.removeTagsBySourceId(pokemon.id));
this.scene.getPlayerField().filter(p => p.isActive(true)).forEach(playerPokemon => playerPokemon.removeTagsBySourceId(pokemon.id));
pokemon.hp = 0;
pokemon.trySetStatus(StatusEffect.FAINT);
this.scene.clearEnemyHeldItemModifiers();