From 395fa6e33d18a1806bfb0f7be38d39c366cf3375 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Wed, 5 Jun 2024 07:36:42 -0700 Subject: [PATCH] [Bug] Allow second mon of a fusion to learn/remember on-evo moves (#1778) Fixes #520 --- src/field/pokemon.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 2b8f28c4826..b659923c47d 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1168,6 +1168,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (this.fusionSpecies) { const evolutionLevelMoves = levelMoves.slice(0, Math.max(levelMoves.findIndex(lm => !!lm[0]), 0)); const fusionLevelMoves = this.getFusionSpeciesForm(true).getLevelMoves(); + const fusionEvolutionLevelMoves = fusionLevelMoves.slice(0, Math.max(fusionLevelMoves.findIndex(flm => !!flm[0]), 0)); const newLevelMoves: LevelMoves = []; while (levelMoves.length && levelMoves[0][0] < startingLevel) { levelMoves.shift(); @@ -1179,6 +1180,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { for (const elm of evolutionLevelMoves.reverse()) { levelMoves.unshift(elm); } + for (const felm of fusionEvolutionLevelMoves.reverse()) { + fusionLevelMoves.unshift(felm); + } } for (let l = includeEvolutionMoves ? 0 : startingLevel; l <= this.level; l++) { if (l === 1 && startingLevel > 1) {