Prevent replacing learnset when species is overridden

pull/197/head
Flashfyre 2024-04-14 20:23:51 -04:00
parent 208279ce77
commit 99aa7854c0
1 changed files with 2 additions and 2 deletions

View File

@ -850,10 +850,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return true;
});
} else
levelMoves = this.getSpeciesForm().getLevelMoves();
levelMoves = this.getSpeciesForm(true).getLevelMoves();
if (this.fusionSpecies) {
const evolutionLevelMoves = levelMoves.slice(0, Math.max(levelMoves.findIndex(lm => !!lm[0]), 0));
const fusionLevelMoves = this.getFusionSpeciesForm().getLevelMoves();
const fusionLevelMoves = this.getFusionSpeciesForm(true).getLevelMoves();
const newLevelMoves: LevelMoves = [];
while (levelMoves.length && levelMoves[0][0] < startingLevel)
levelMoves.shift();