diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index ce16d7d6c69..3ed1c6bc9e5 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1414,15 +1414,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler { starterData.candyCount -= sameSpeciesEggCost; } this.pokemonCandyCountText.setText(`x${starterData.candyCount}`); + + const egg = new Egg({scene: this.scene, species: this.lastSpecies.speciesId, sourceType: EggSourceType.SAME_SPECIES_EGG}); + egg.addEggToGameData(this.scene); + this.scene.gameData.saveSystem().then(success => { if (!success) { return this.scene.reset(true); } }); - - const egg = new Egg({scene: this.scene, species: this.lastSpecies.speciesId, sourceType: EggSourceType.SAME_SPECIES_EGG}); - egg.addEggToGameData(this.scene); - ui.setMode(Mode.STARTER_SELECT); this.scene.playSound("buy");