Fix issue with battle continuing after enemy faint

This commit is contained in:
Flashfyre committed 2023-05-19 12:35:06 -04:00
1 parent b9f7ba173d
commit b0112c5acb
3 files changed
+4 -3

No files matched your search

+1
View File
@@ -2299,6 +2299,7 @@ export class AttemptCapturePhase extends PokemonPhase {
Promise.all(modifiers.map(m => this.scene.addModifier(m))).then(() => {
this.scene.getPlayerField().forEach(playerPokemon => playerPokemon.removeTagsBySourceId(pokemon.id));
pokemon.hp = 0;
pokemon.trySetStatus(StatusEffect.FAINT);
this.scene.clearEnemyModifiers();
this.scene.field.remove(pokemon, true);
if (newPokemon)