[Beta P1] Fix rare candy crashing (#4561)

This commit is contained in:
flx-sta 2024-10-03 11:53:35 -07:00 committed by GitHub
parent 76e25a6d6f
commit 46c84155b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;