Fix crash
This commit is contained in:
parent
84f6456972
commit
785840fdf4
|
@ -155,17 +155,17 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
if (nature !== undefined)
|
||||||
this.setNature(nature);
|
this.setNature(nature);
|
||||||
else
|
else
|
||||||
this.generateNature();
|
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.friendship = species.baseFriendship;
|
||||||
this.metLevel = level;
|
this.metLevel = level;
|
||||||
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;
|
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;
|
||||||
|
|
Loading…
Reference in New Issue