Adding a new key determining whether the command cursor resets at the beginning of each new battle.

This commit is contained in:
Wlowscha 2024-12-21 16:42:09 +01:00
parent 90c8c97437
commit b8bc8c43fa
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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());