[UI/UX] Baton shows on top, De/Activate form shows on bottom (#6104)

[UI/UX] Batton shows on top, De/Activate form shows on bottom
This commit is contained in:
SmhMyHead 2025-07-18 05:36:53 +02:00 committed by GitHub
parent a6e4459ecd
commit def80f2e10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1284,17 +1284,18 @@ export class PartyUiHandler extends MessageUiHandler {
const allowBatonModifierSwitch = this.allowBatonModifierSwitch(); const allowBatonModifierSwitch = this.allowBatonModifierSwitch();
const isBatonPassMove = this.isBatonPassMove(); const isBatonPassMove = this.isBatonPassMove();
if (allowBatonModifierSwitch && !isBatonPassMove) {
// the BATON modifier gives an extra switch option for
// pokemon-command switches, allowing buffs to be optionally passed
this.options.push(PartyOption.PASS_BATON);
}
// isBatonPassMove and allowBatonModifierSwitch shouldn't ever be true // isBatonPassMove and allowBatonModifierSwitch shouldn't ever be true
// at the same time, because they both explicitly check for a mutually // at the same time, because they both explicitly check for a mutually
// exclusive partyUiMode. But better safe than sorry. // exclusive partyUiMode. But better safe than sorry.
this.options.push( this.options.push(
isBatonPassMove && !allowBatonModifierSwitch ? PartyOption.PASS_BATON : PartyOption.SEND_OUT, isBatonPassMove && !allowBatonModifierSwitch ? PartyOption.PASS_BATON : PartyOption.SEND_OUT,
); );
if (allowBatonModifierSwitch && !isBatonPassMove) {
// the BATON modifier gives an extra switch option for
// pokemon-command switches, allowing buffs to be optionally passed
this.options.push(PartyOption.PASS_BATON);
}
} }
this.addCommonOptions(pokemon); this.addCommonOptions(pokemon);
if (this.partyUiMode === PartyUiMode.SWITCH) { if (this.partyUiMode === PartyUiMode.SWITCH) {
@ -1334,13 +1335,13 @@ export class PartyUiHandler extends MessageUiHandler {
this.addCommonOptions(pokemon); this.addCommonOptions(pokemon);
break; break;
case PartyUiMode.CHECK: case PartyUiMode.CHECK:
this.addCommonOptions(pokemon);
if (globalScene.phaseManager.getCurrentPhase()?.is("SelectModifierPhase")) { if (globalScene.phaseManager.getCurrentPhase()?.is("SelectModifierPhase")) {
const formChangeItemModifiers = this.getFormChangeItemsModifiers(pokemon); const formChangeItemModifiers = this.getFormChangeItemsModifiers(pokemon);
for (let i = 0; i < formChangeItemModifiers.length; i++) { for (let i = 0; i < formChangeItemModifiers.length; i++) {
this.options.push(PartyOption.FORM_CHANGE_ITEM + i); this.options.push(PartyOption.FORM_CHANGE_ITEM + i);
} }
} }
this.addCommonOptions(pokemon);
break; break;
case PartyUiMode.SELECT: case PartyUiMode.SELECT:
this.options.push(PartyOption.SELECT); this.options.push(PartyOption.SELECT);