From 234d617464f409004422f6334bfe81c806e1ba7a Mon Sep 17 00:00:00 2001 From: ckincaid17 Date: Mon, 2 Sep 2024 19:10:33 -0700 Subject: [PATCH] [Bug] Let Shedinja relearn egg moves when evolved from a starter (#3915) * [Bug] Let Shedinja relearn egg moves when evolved from a starter * Copy met level as well --- src/field/pokemon.ts | 3 +++ src/test/evolution.test.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 9c4a290d7a5..e303b599973 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -3647,6 +3647,9 @@ export class PlayerPokemon extends Pokemon { newPokemon.moveset = this.moveset.slice(); newPokemon.moveset = this.copyMoveset(); newPokemon.luck = this.luck; + newPokemon.metLevel = this.metLevel; + newPokemon.metBiome = this.metBiome; + newPokemon.metSpecies = this.metSpecies; newPokemon.fusionSpecies = this.fusionSpecies; newPokemon.fusionFormIndex = this.fusionFormIndex; newPokemon.fusionAbilityIndex = this.fusionAbilityIndex; diff --git a/src/test/evolution.test.ts b/src/test/evolution.test.ts index 5844e92ab8d..9f0806b8e24 100644 --- a/src/test/evolution.test.ts +++ b/src/test/evolution.test.ts @@ -79,12 +79,15 @@ describe("Evolution", () => { const nincada = game.scene.getPlayerPokemon()!; nincada.abilityIndex = 2; + nincada.metBiome = -1; nincada.evolve(pokemonEvolutions[Species.NINCADA][0], nincada.getSpeciesForm()); const ninjask = game.scene.getParty()[0]; const shedinja = game.scene.getParty()[1]; expect(ninjask.abilityIndex).toBe(2); expect(shedinja.abilityIndex).toBe(1); + // Regression test for https://github.com/pagefaultgames/pokerogue/issues/3842 + expect(shedinja.metBiome).toBe(-1); }, TIMEOUT); it("should set wild delay to NONE by default", () => {