mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
[UI/UIX] Prevents the player from forgetting a move by mistake
This commit is contained in:
parent
e1be360e74
commit
5579d63c28
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user