Minor change to party UI

pull/1/head
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() { start() {
super.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) if (slotIndex && slotIndex < 6)
this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, slotIndex, this.doReturn)); this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, slotIndex, this.doReturn));
this.scene.ui.setMode(Mode.MESSAGE); this.scene.ui.setMode(Mode.MESSAGE);

View File

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