Minor change to party UI

This commit is contained in:
Flashfyre 2023-04-06 00:15:33 -04:00
parent 56c776834f
commit 0287904371
5 changed files with 9 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -687,7 +687,7 @@ export class SwitchPhase extends BattlePhase {
start() {
super.start();
this.scene.ui.setMode(Mode.PARTY, this.isModal ? PartyUiMode.SWITCH : PartyUiMode.FORCE_SWITCH, (slotIndex: integer) => {
this.scene.ui.setMode(Mode.PARTY, this.isModal ? PartyUiMode.SWITCH : PartyUiMode.FAINT_SWITCH, (slotIndex: integer) => {
if (slotIndex && slotIndex < 6)
this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, slotIndex, this.doReturn));
this.scene.ui.setMode(Mode.MESSAGE);

View File

@ -10,7 +10,8 @@ const defaultMessage = 'Choose a Pokémon.';
export enum PartyUiMode {
SWITCH,
FORCE_SWITCH,
FAINT_SWITCH,
POST_BATTLE_SWITCH,
MODIFIER
}
@ -193,13 +194,13 @@ export default class PartyUiHandler extends MessageUiHandler {
if (this.cursor < 6) {
this.showOptions();
ui.playSelect();
} else if (this.partyUiMode === PartyUiMode.FORCE_SWITCH)
} else if (this.partyUiMode === PartyUiMode.FAINT_SWITCH)
ui.playError();
else
this.processInput(keyCodes.X);
return;
} else if (keyCode === keyCodes.X) {
if (this.partyUiMode !== PartyUiMode.FORCE_SWITCH) {
if (this.partyUiMode !== PartyUiMode.FAINT_SWITCH) {
if (this.selectCallback) {
const selectCallback = this.selectCallback;
this.selectCallback = null;
@ -305,8 +306,10 @@ export default class PartyUiHandler extends MessageUiHandler {
if (this.cursor)
this.options.push(PartyOption.SHIFT);
break;
case PartyUiMode.FORCE_SWITCH:
this.options.push(PartyOption.SEND_OUT);
case PartyUiMode.FAINT_SWITCH:
case PartyUiMode.POST_BATTLE_SWITCH:
if (this.cursor)
this.options.push(PartyOption.SEND_OUT);
break;
case PartyUiMode.MODIFIER:
this.options.push(PartyOption.APPLY);