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 1/2] [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; From af51c1f2f0b6eb1ccebe6183833c2693ec2b8172 Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Thu, 3 Oct 2024 11:56:35 -0700 Subject: [PATCH 2/2] [Move] Unique message for heal block, taunt, torment, and imprison (#4530) Co-authored-by: frutescens --- src/data/battler-tags.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index d8094f96368..42775775ac4 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -2267,7 +2267,7 @@ export class HealBlockTag extends MoveRestrictionBattlerTag { * Uses DisabledTag's selectionDeniedText() message */ override selectionDeniedText(pokemon: Pokemon, move: Moves): string { - return i18next.t("battle:moveDisabled", { moveName: allMoves[move].name }); + return i18next.t("battle:moveDisabledHealBlock", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name, healBlockName: allMoves[Moves.HEAL_BLOCK].name }); } /** @@ -2277,7 +2277,7 @@ export class HealBlockTag extends MoveRestrictionBattlerTag { * @returns {string} text to display when the move is interrupted */ override interruptedText(pokemon: Pokemon, move: Moves): string { - return i18next.t("battle:disableInterruptedMove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); + return i18next.t("battle:moveDisabledHealBlock", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name, healBlockName: allMoves[Moves.HEAL_BLOCK].name }); } override onRemove(pokemon: Pokemon): void { @@ -2530,8 +2530,8 @@ export class TormentTag extends MoveRestrictionBattlerTag { return false; } - override selectionDeniedText(_pokemon: Pokemon, move: Moves): string { - return i18next.t("battle:moveCannotBeSelected", { moveName: allMoves[move].name }); + override selectionDeniedText(pokemon: Pokemon, _move: Moves): string { + return i18next.t("battle:moveDisabledTorment", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }); } } @@ -2559,12 +2559,12 @@ export class TauntTag extends MoveRestrictionBattlerTag { return allMoves[move].category === MoveCategory.STATUS; } - override selectionDeniedText(_pokemon: Pokemon, move: Moves): string { - return i18next.t("battle:moveCannotBeSelected", { moveName: allMoves[move].name }); + override selectionDeniedText(pokemon: Pokemon, move: Moves): string { + return i18next.t("battle:moveDisabledTaunt", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); } override interruptedText(pokemon: Pokemon, move: Moves): string { - return i18next.t("battle:disableInterruptedMove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); + return i18next.t("battle:moveDisabledTaunt", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); } } @@ -2609,12 +2609,12 @@ export class ImprisonTag extends MoveRestrictionBattlerTag { return false; } - override selectionDeniedText(_pokemon: Pokemon, move: Moves): string { - return i18next.t("battle:moveCannotBeSelected", { moveName: allMoves[move].name }); + override selectionDeniedText(pokemon: Pokemon, move: Moves): string { + return i18next.t("battle:moveDisabledImprison", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); } override interruptedText(pokemon: Pokemon, move: Moves): string { - return i18next.t("battle:disableInterruptedMove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); + return i18next.t("battle:moveDisabledImprison", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); } }