mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-15 06:15:20 +01:00
[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:
parent
d49e6c6f09
commit
bcc79a6118
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user