[UI/UIX] Prevents the player from forgetting a move by mistake

This commit is contained in:
SmhMyHead 2025-05-31 01:28:34 +02:00
parent e1be360e74
commit 5579d63c28
2 changed files with 3 additions and 3 deletions

View File

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

View File

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