From bcc79a6118d1be91eaecc1ec51a4bdf46532a69e Mon Sep 17 00:00:00 2001 From: Fabi <192151969+fabske0@users.noreply.github.com> Date: Sat, 18 Oct 2025 04:52:25 +0200 Subject: [PATCH] [UI/UX] Add option to release Pokemon in shop phase (#6665) * add `release` option to shop phase * Fix test * Don't show `release` option during switch --- src/ui/handlers/party-ui-handler.ts | 8 +++----- test/ui/item-manage-button.test.ts | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ui/handlers/party-ui-handler.ts b/src/ui/handlers/party-ui-handler.ts index d4014cc0288..7806a6111c1 100644 --- a/src/ui/handlers/party-ui-handler.ts +++ b/src/ui/handlers/party-ui-handler.ts @@ -1515,11 +1515,8 @@ export class PartyUiHandler extends MessageUiHandler { ); } this.addCommonOptions(pokemon); - if (this.partyUiMode === PartyUiMode.SWITCH) { - if (pokemon.isFusion()) { - this.options.push(PartyOption.UNSPLICE); - } - this.options.push(PartyOption.RELEASE); + if (this.partyUiMode === PartyUiMode.SWITCH && pokemon.isFusion()) { + this.options.push(PartyOption.UNSPLICE); } break; case PartyUiMode.REVIVAL_BLESSING: @@ -1554,6 +1551,7 @@ export class PartyUiHandler extends MessageUiHandler { case PartyUiMode.CHECK: this.addCommonOptions(pokemon); if (globalScene.phaseManager.getCurrentPhase().is("SelectModifierPhase")) { + this.options.push(PartyOption.RELEASE); const formChangeItemModifiers = this.getFormChangeItemsModifiers(pokemon); for (let i = 0; i < formChangeItemModifiers.length; i++) { this.options.push(PartyOption.FORM_CHANGE_ITEM + i); diff --git a/test/ui/item-manage-button.test.ts b/test/ui/item-manage-button.test.ts index c28cd9e802e..30c398f21a9 100644 --- a/test/ui/item-manage-button.test.ts +++ b/test/ui/item-manage-button.test.ts @@ -103,7 +103,7 @@ describe("UI - Transfer Items", () => { }); }); - expect(handlerLength).toHaveLength(6); // should select 2nd pokemon (length is 5 options + image) + expect(handlerLength).toHaveLength(7); // should select 2nd pokemon (length is 6 options + image) }); // Test that the manage button actually discards items, needs proofreading