[BUG] fix #5038 update shedinja's gender to genderless on evolution (#5039)

* update shedinja's gender to genderless

* update unit test
This commit is contained in:
Asuka Kuwahara 2024-12-29 21:09:11 -05:00 committed by GitHub
parent 10e0f9f0de
commit 8f884a7ef0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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);
});