From 8ad08edd53ca58d2d4daaff74c4b5f6e5a85935a Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 24 Nov 2023 08:31:52 -0500 Subject: [PATCH] Fix level up moves not working for spliced Pokemon --- src/pokemon.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pokemon.ts b/src/pokemon.ts index 412d57357..8d61a3818 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -562,6 +562,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (this.fusionSpecies) { const fusionLevelMoves = this.getFusionSpeciesForm().getLevelMoves(); const newLevelMoves: LevelMoves = []; + while (levelMoves[0][0] < startingLevel) + levelMoves.shift(); + while (fusionLevelMoves[0][0] < startingLevel) + fusionLevelMoves.shift(); for (let l = startingLevel; l <= this.level; l++) { while (levelMoves.length && levelMoves[0][0] === l) { const levelMove = levelMoves.shift();