diff --git a/src/phases.ts b/src/phases.ts index d0c0804541b..15fd1975d1c 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -5039,7 +5039,7 @@ export class AttemptCapturePhase extends PokemonPhase { this.scene.ui.setMode(Mode.MESSAGE).then(() => { promptRelease(); }); - }); + }, false); }, () => { this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: integer, _option: PartyOption) => { this.scene.ui.setMode(Mode.MESSAGE).then(() => { diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 882bc42220f..405429fcd3f 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -93,6 +93,8 @@ export default class SummaryUiHandler extends UiHandler { private moveCursorBlinkTimer: Phaser.Time.TimerEvent; private pokemon: PlayerPokemon; + private playerParty: boolean; + /**This is set to false when checking the summary of a freshly caught Pokemon as it is not part of a player's party yet but still needs to display its items**/ private newMove: Move; private moveSelectFunction: Function; private transitioning: boolean; @@ -270,9 +272,16 @@ export default class SummaryUiHandler extends UiHandler { show(args: any[]): boolean { super.show(args); + /* args[] information + * args[0] : the Pokemon displayed in the Summary-UI + * args[1] : the summaryUiMode (defaults to 0) + * args[2] : the start page (defaults to Page.PROFILE) + * args[3] : contains the function executed when the user exits out of Summary UI + * args[4] : optional boolean used to determine if the Pokemon is part of the player's party or not (defaults to true, necessary for PR #2921 to display all relevant information) + */ this.pokemon = args[0] as PlayerPokemon; this.summaryUiMode = args.length > 1 ? args[1] as SummaryUiMode : SummaryUiMode.DEFAULT; - + this.playerParty = args[4] ?? true; this.scene.ui.bringToTop(this.summaryContainer); this.summaryContainer.setVisible(true); @@ -853,7 +862,7 @@ export default class SummaryUiHandler extends UiHandler { }); const itemModifiers = (this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier - && m.pokemonId === this.pokemon.id, true) as PokemonHeldItemModifier[]) + && m.pokemonId === this.pokemon.id, this.playerParty) as PokemonHeldItemModifier[]) .sort(modifierSortFunc); itemModifiers.forEach((item, i) => {