Stop showing stats for Transformed Pokémon

This commit is contained in:
Guangcong Luo
2019-03-06 13:48:09 -06:00
parent a9b8155b5d
commit c88d2a2ecb

View File

@@ -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 '<p><small>Spe</small> ' + min + ' to ' + max + ' <small>(before items/abilities/modifiers)</small></p>';