From c88d2a2ecbef3c29dae50267fadb6b5b266a9eeb Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Wed, 6 Mar 2019 13:48:09 -0600 Subject: [PATCH] =?UTF-8?q?Stop=20showing=20stats=20for=20Transformed=20Po?= =?UTF-8?q?k=C3=A9mon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/battle-tooltips.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle-tooltips.ts b/src/battle-tooltips.ts index 162c69ef2..f9f2784fd 100644 --- a/src/battle-tooltips.ts +++ b/src/battle-tooltips.ts @@ -953,7 +953,8 @@ class BattleTooltips { } renderStats(clientPokemon: Pokemon | null, serverPokemon?: ServerPokemon | null, short?: boolean) { - if (!serverPokemon) { + const isTransformed = clientPokemon && clientPokemon.volatiles.transform; + if (!serverPokemon || isTransformed) { if (!clientPokemon) throw new Error('Must pass either clientPokemon or serverPokemon'); let [min, max] = this.getSpeedRange(clientPokemon); return '

Spe ' + min + ' to ' + max + ' (before items/abilities/modifiers)

';