[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
This commit is contained in:
Fabi 2025-10-18 04:52:25 +02:00 committed by GitHub
parent d49e6c6f09
commit bcc79a6118
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -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);

View File

@ -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