mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +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();
|
const ui = this.getUi();
|
||||||
this.clearOptions();
|
this.clearOptions();
|
||||||
ui.playSelect();
|
ui.playSelect();
|
||||||
|
if (this.partyUiMode === PartyUiMode.RELEASE) {
|
||||||
|
this.doRelease(this.cursor);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (this.cursor >= globalScene.currentBattle.getBattlerCount() || !pokemon.isAllowedInBattle()) {
|
if (this.cursor >= globalScene.currentBattle.getBattlerCount() || !pokemon.isAllowedInBattle()) {
|
||||||
this.blockInput = true;
|
this.blockInput = true;
|
||||||
this.showText(
|
this.showText(
|
||||||
@ -708,7 +712,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
return this.processRenameOption(pokemon);
|
return this.processRenameOption(pokemon);
|
||||||
}
|
}
|
||||||
// TODO: Figure out why we need this edge case
|
// 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);
|
return this.processReleaseOption(pokemon);
|
||||||
}
|
}
|
||||||
if (option === PartyOption.SELECT) {
|
if (option === PartyOption.SELECT) {
|
||||||
@ -764,10 +768,6 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
this.clearOptions();
|
this.clearOptions();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (option === PartyOption.RELEASE) {
|
|
||||||
this.doRelease(this.cursor);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
const selectCallback = this.selectCallback;
|
const selectCallback = this.selectCallback;
|
||||||
this.selectCallback = null;
|
this.selectCallback = null;
|
||||||
selectCallback(this.cursor, option);
|
selectCallback(this.cursor, option);
|
||||||
|
Loading…
Reference in New Issue
Block a user