diff --git a/src/phases.ts b/src/phases.ts index 9f069a60dc5..8732faedb9c 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -4890,7 +4890,11 @@ export class AttemptCapturePhase extends PokemonPhase { }); } }, - onComplete: () => this.catch() + onComplete: () => { + this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex)); + this.scene.gameData.setPokemonCaught(pokemon); + this.catch(); + } }); }; @@ -4985,12 +4989,18 @@ export class AttemptCapturePhase extends PokemonPhase { } }); }; - Promise.all([pokemon.hideInfo(), this.scene.gameData.setPokemonCaught(pokemon)]).then(() => { + Promise.all([pokemon.hideInfo()]).then(() => { if (this.scene.getParty().length === 6) { const promptRelease = () => { this.scene.ui.showText(i18next.t("battle:partyFull", { pokemonName: pokemon.name }), null, () => { - this.scene.pokemonInfoContainer.makeRoomForConfirmUi(); + this.scene.pokemonInfoContainer.makeRoomForConfirmUi(1, true); this.scene.ui.setMode(Mode.CONFIRM, () => { + const newPokemon = this.scene.addPlayerPokemon(pokemon.species, pokemon.level, pokemon.abilityIndex, pokemon.formIndex, pokemon.gender, pokemon.shiny, pokemon.variant, pokemon.ivs, pokemon.nature, pokemon); + this.scene.ui.setMode(Mode.SUMMARY, newPokemon).then(() => { + this.catch(); + return; + }); + }, () => { this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: integer, _option: PartyOption) => { this.scene.ui.setMode(Mode.MESSAGE).then(() => { if (slotIndex < 6) {