From 838e9a738a54240b0033dca949266fd94b36a24c Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Sat, 7 Jun 2025 07:53:00 -0400 Subject: [PATCH] Applied reviewwww --- src/phases/switch-summon-phase.ts | 37 +++++++++++++++++-------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index ad102ee8869..3fedb47ebed 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -262,22 +262,25 @@ export class SwitchSummonPhase extends SummonPhase { * @returns The text to display. */ private getSendOutText(switchedInPokemon: Pokemon): string { - return this.switchType === SwitchType.FORCE_SWITCH - ? // "XYZ was forced out!" - i18next.t("battle:pokemonDraggedOut", { - pokemonName: getPokemonNameWithAffix(switchedInPokemon), - }) - : // "Go! XYZ!" - this.player - ? i18next.t("battle:playerGo", { - pokemonName: getPokemonNameWithAffix(switchedInPokemon), - }) - : // "Trainer sent out XYZ!" - i18next.t("battle:trainerGo", { - trainerName: globalScene.currentBattle.trainer?.getName( - !(this.fieldIndex % 2) ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER, - ), - pokemonName: this.getPokemon().getNameToRender(), - }); + if (this.switchType === SwitchType.FORCE_SWITCH) { + // "XYZ was dragged out!" + return i18next.t("battle:pokemonDraggedOut", { + pokemonName: getPokemonNameWithAffix(switchedInPokemon), + }); + } + if (this.player) { + // "Go! XYZ!" + return i18next.t("battle:playerGo", { + pokemonName: getPokemonNameWithAffix(switchedInPokemon), + }); + } + + // "Trainer sent out XYZ!" + return i18next.t("battle:trainerGo", { + trainerName: globalScene.currentBattle.trainer?.getName( + !(this.fieldIndex % 2) ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER, + ), + pokemonName: this.getPokemon().getNameToRender(), + }); } }