From d73bea8ef268cc38bba899182d6e7dd25068d28a Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Mon, 4 Mar 2019 10:49:53 -0600 Subject: [PATCH] Fix crash in EV guesser --- .eslintrc.js | 2 +- src/battle-tooltips.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 40f5ad8c888..f7930300c35 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,7 +23,7 @@ module.exports = { "BattleFormats": false, "BattleFormatsData": false, "BattleLearnsets": false, "BattleItems": false, "BattleMoveAnims": false, "BattleMovedex": false, "BattleNatures": false, "BattleOtherAnims": false, "BattlePokedex": false,"BattlePokemonSprites": false, "BattlePokemonSpritesBW": false, "BattleSearchCountIndex": false, "BattleSearchIndex": false, "BattleArticleTitles": false, "BattleSearchIndexOffset": false, "BattleSearchIndexType": false, "BattleStatIDs": false, "BattleStatNames": false, "BattleStats": false, "BattleStatusAnims": false, "BattleStatuses": false, "BattleTeambuilderTable": false, - "ModifiableValue": false, + "ModifiableValue": false, "BattleStatGuesser": false, // Generic global variables "Config": false, "BattleSearch": false, "soundManager": false, "Storage": false, "Dex": false, diff --git a/src/battle-tooltips.ts b/src/battle-tooltips.ts index a7f0e02d0a5..e0ebaf459df 100644 --- a/src/battle-tooltips.ts +++ b/src/battle-tooltips.ts @@ -1886,6 +1886,7 @@ class BattleStatGuesser { } guessEVs(set: PokemonSet, role: string): Partial & {plusStat?: StatName | '', minusStat?: StatName | ''} { if (!set) return {}; + if (role === '?') return {}; var template = this.dex.getTemplate(set.species || set.name); var stats = template.baseStats;