From 5579d63c28b644500e54dd6d12f76216e1fa75a4 Mon Sep 17 00:00:00 2001 From: SmhMyHead <191356399+SmhMyHead@users.noreply.github.com> Date: Sat, 31 May 2025 01:28:34 +0200 Subject: [PATCH] [UI/UIX] Prevents the player from forgetting a move by mistake --- src/phases/learn-move-phase.ts | 2 +- src/ui/summary-ui-handler.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index c585679ba4f..68c35c2ab40 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -106,7 +106,7 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase { * > Which move should be forgotten? * * The game then goes `Mode.SUMMARY` to select a move to be forgotten. - * If a player does not select a move or chooses the new move (`moveIndex === 4`), the game goes to `this.rejectMoveAndEnd()`. + * If a player does not select a move, the game goes to `this.rejectMoveAndEnd()`. * If an old move is selected, the function then passes the `moveIndex` to `this.learnMove()` * @param move The Move to be learned * @param Pokemon The Pokemon learning the move diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 24e790f7c61..e15ba54a149 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -551,7 +551,7 @@ export default class SummaryUiHandler extends UiHandler { } } success = true; - } else if (this.moveCursor === 4) { + } else if (this.moveCursor === 4 && this.summaryUiMode !== SummaryUiMode.LEARN_MOVE) { return this.processInput(Button.CANCEL); } else { error = true; @@ -1239,7 +1239,7 @@ export default class SummaryUiHandler extends UiHandler { this.moveSelect = true; this.extraMoveRowContainer.setVisible(true); this.selectedMoveIndex = -1; - this.setCursor(0); + this.setCursor(this.summaryUiMode === SummaryUiMode.LEARN_MOVE ? 4 : 0); this.showMoveEffect(); }