[Bug] Fix level 100 moves being skipped if leveled past 100 (#3040)

This commit is contained in:
mcmontag 2024-07-16 22:16:57 -04:00 committed by GitHub
parent d96b553dc2
commit 514c6a196c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -4587,7 +4587,7 @@ export class LevelUpPhase extends PlayerPartyMemberPokemonPhase {
// we still want to display the stats if activated
this.scene.ui.getMessageHandler().promptLevelUpStats(this.partyMemberIndex, prevStats, false).then(() => this.end());
}
if (this.level <= 100) {
if (this.lastLevel < 100) { // this feels like an unnecessary optimization
const levelMoves = this.getPokemon().getLevelMoves(this.lastLevel + 1);
for (const lm of levelMoves) {
this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, lm[1]));