Fix crash

This commit is contained in:
Flashfyre 2024-04-02 23:12:30 -04:00
parent 84f6456972
commit 785840fdf4
1 changed files with 7 additions and 7 deletions

View File

@ -154,18 +154,18 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.gender = Gender.FEMALE;
}
}
if (this.formIndex === undefined)
this.formIndex = this.scene.getSpeciesFormIndex(species, this.gender, this.nature, this.isPlayer());
if (this.shiny === undefined)
this.trySetShiny();
if (nature !== undefined)
this.setNature(nature);
else
this.generateNature();
if (this.formIndex === undefined)
this.formIndex = this.scene.getSpeciesFormIndex(species, this.gender, this.getNature(), this.isPlayer());
if (this.shiny === undefined)
this.trySetShiny();
this.friendship = species.baseFriendship;
this.metLevel = level;
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;