From 46c84155b3a881e0bb6f5b97a340b7b2d82c03cd Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Thu, 3 Oct 2024 11:53:35 -0700 Subject: [PATCH] [Beta P1] Fix rare candy crashing (#4561) --- src/modifier/modifier.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 4f1f9833602..b8905bc9bf1 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -2204,7 +2204,7 @@ export class PokemonLevelIncrementModifier extends ConsumablePokemonModifier { * @param levelCount The amount of levels to increment * @returns always `true` */ - override apply(playerPokemon: PlayerPokemon, levelCount: NumberHolder): boolean { + override apply(playerPokemon: PlayerPokemon, levelCount: NumberHolder = new NumberHolder(1)): boolean { playerPokemon.scene.applyModifiers(LevelIncrementBoosterModifier, true, levelCount); playerPokemon.level += levelCount.value;