Adding a new key determining whether the command cursor resets at the beginning of each new battle.
This commit is contained in:
parent
90c8c97437
commit
b8bc8c43fa
|
@ -147,6 +147,7 @@ export default class BattleScene extends SceneBase {
|
|||
public damageNumbersMode: integer = 0;
|
||||
public reroll: boolean = false;
|
||||
public shopCursorTarget: number = ShopCursorTarget.REWARDS;
|
||||
public commandCursorReset: boolean = true;
|
||||
public showMovesetFlyout: boolean = true;
|
||||
public showArenaFlyout: boolean = true;
|
||||
public showTimeOfDayWidget: boolean = true;
|
||||
|
|
|
@ -35,8 +35,14 @@ export class CommandPhase extends FieldPhase {
|
|||
this.scene.updateGameInfo();
|
||||
|
||||
const commandUiHandler = this.scene.ui.handlers[Mode.COMMAND];
|
||||
|
||||
// If one of these conditions is true, we always reset the cursor to Command.FIGHT
|
||||
const cursorResetBattle = this.scene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER ||
|
||||
this.scene.currentBattle.battleType === BattleType.TRAINER ||
|
||||
this.scene.arena.biomeType === Biome.END;
|
||||
|
||||
if (commandUiHandler) {
|
||||
if (this.scene.currentBattle.turn === 1 || commandUiHandler.getCursor() === Command.POKEMON) {
|
||||
if ((this.scene.currentBattle.turn === 1 && (this.scene.commandCursorReset || cursorResetBattle)) || commandUiHandler.getCursor() === Command.POKEMON) {
|
||||
commandUiHandler.setCursor(Command.FIGHT);
|
||||
} else {
|
||||
commandUiHandler.setCursor(commandUiHandler.getCursor());
|
||||
|
|
Loading…
Reference in New Issue