diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index fcfc2ff7536..30856ab416a 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -4484,6 +4484,7 @@ export class PlayerPokemon extends Pokemon { newPokemon.moveset = this.moveset.slice(); newPokemon.moveset = this.copyMoveset(); newPokemon.luck = this.luck; + newPokemon.gender = Gender.GENDERLESS; newPokemon.metLevel = this.metLevel; newPokemon.metBiome = this.metBiome; newPokemon.metSpecies = this.metSpecies; diff --git a/src/test/evolution.test.ts b/src/test/evolution.test.ts index 3046d103cbc..10748899d59 100644 --- a/src/test/evolution.test.ts +++ b/src/test/evolution.test.ts @@ -78,12 +78,15 @@ describe("Evolution", () => { const nincada = game.scene.getPlayerPokemon()!; nincada.abilityIndex = 2; nincada.metBiome = -1; + nincada.gender = 1; nincada.evolve(pokemonEvolutions[Species.NINCADA][0], nincada.getSpeciesForm()); const ninjask = game.scene.getPlayerParty()[0]; const shedinja = game.scene.getPlayerParty()[1]; expect(ninjask.abilityIndex).toBe(2); expect(shedinja.abilityIndex).toBe(1); + expect(ninjask.gender).toBe(1); + expect(shedinja.gender).toBe(-1); // Regression test for https://github.com/pagefaultgames/pokerogue/issues/3842 expect(shedinja.metBiome).toBe(-1); });