Changed condition on switch for clarity

This commit is contained in:
Wlowscha 2025-05-15 00:41:12 +02:00
parent 9425a877d7
commit 82dfe01576
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -807,8 +807,11 @@ export default class PartyUiHandler extends MessageUiHandler {
return true;
}
// This is used when switching out using the Pokemon command (possibly holding a Baton held item).
if ((option === PartyOption.PASS_BATON || option === PartyOption.SEND_OUT) && !this.selectCallback) {
// This is used when switching out using the Pokemon command (possibly holding a Baton held item). In this case there is no callback.
if (
(option === PartyOption.PASS_BATON || option === PartyOption.SEND_OUT) &&
this.partyUiMode === PartyUiMode.SWITCH
) {
this.clearOptions();
(globalScene.getCurrentPhase() as CommandPhase).handleCommand(
Command.POKEMON,