mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Moving edge case for release option into processReleaseOption
This commit is contained in:
parent
b58b633b6f
commit
b3e6c20a35
@ -440,6 +440,10 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
const ui = this.getUi();
|
||||
this.clearOptions();
|
||||
ui.playSelect();
|
||||
if (this.partyUiMode === PartyUiMode.RELEASE) {
|
||||
this.doRelease(this.cursor);
|
||||
return true;
|
||||
}
|
||||
if (this.cursor >= globalScene.currentBattle.getBattlerCount() || !pokemon.isAllowedInBattle()) {
|
||||
this.blockInput = true;
|
||||
this.showText(
|
||||
@ -708,7 +712,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
return this.processRenameOption(pokemon);
|
||||
}
|
||||
// TODO: Figure out why we need this edge case
|
||||
if (option === PartyOption.RELEASE && this.partyUiMode !== PartyUiMode.RELEASE) {
|
||||
if (option === PartyOption.RELEASE) {
|
||||
return this.processReleaseOption(pokemon);
|
||||
}
|
||||
if (option === PartyOption.SELECT) {
|
||||
@ -764,10 +768,6 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
this.clearOptions();
|
||||
return true;
|
||||
}
|
||||
if (option === PartyOption.RELEASE) {
|
||||
this.doRelease(this.cursor);
|
||||
return true;
|
||||
}
|
||||
const selectCallback = this.selectCallback;
|
||||
this.selectCallback = null;
|
||||
selectCallback(this.cursor, option);
|
||||
|
Loading…
Reference in New Issue
Block a user