From b546203118816e342d34a31d25bf33615cd0b2a7 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 19 Apr 2024 01:01:57 -0400 Subject: [PATCH] Fix shiny eggs corrupting candy count --- src/system/game-data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 3278e590e26..3e2fd8e0a55 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1026,7 +1026,7 @@ export class GameData { } if (!hasPrevolution) - this.addStarterCandy(species, (1 * (pokemon.isShiny() ? 5 * Math.pow(2, pokemon.variant) : 1)) * (fromEgg || pokemon.isBoss() ? 2 : 1)); + this.addStarterCandy(species, (1 * (pokemon.isShiny() ? 5 * Math.pow(2, pokemon.variant || 0) : 1)) * (fromEgg || pokemon.isBoss() ? 2 : 1)); } const checkPrevolution = () => {