From 1a35b5c012db66e7c4e273c3ff6c614e1b19e5d9 Mon Sep 17 00:00:00 2001 From: Karthik <32044378+Karthik99999@users.noreply.github.com> Date: Sat, 16 Dec 2023 03:34:43 -0500 Subject: [PATCH] Teambuilder: Allow Tier filters on old gens (#2190) --- build-tools/build-indexes | 2 +- play.pokemonshowdown.com/js/search.js | 5 +++-- play.pokemonshowdown.com/src/battle-dex-search.ts | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-tools/build-indexes b/build-tools/build-indexes index 42666dca5..1e9e7a0b3 100755 --- a/build-tools/build-indexes +++ b/build-tools/build-indexes @@ -53,7 +53,7 @@ function requireNoCache(pathSpec) { index = index.concat(Object.keys(Dex.data.TypeChart).map(x => toID(x) + ' type')); index = index.concat(['physical', 'special', 'status'].map(x => toID(x) + ' category')); index = index.concat(['monster', 'water1', 'bug', 'flying', 'field', 'fairy', 'grass', 'humanlike', 'water3', 'mineral', 'amorphous', 'water2', 'ditto', 'dragon', 'undiscovered'].map(x => toID(x) + ' egggroup')); - index = index.concat(['ou', 'uu', 'ru', 'nu', 'pu', 'lc', 'nfe', 'uber', 'uubl', 'rubl', 'nubl', 'publ', 'cap', 'caplc', 'capnfe'].map(x => toID(x) + ' tier')); + index = index.concat(['ou', 'uu', 'ru', 'nu', 'pu', 'zu', 'lc', 'nfe', 'uber', 'uubl', 'rubl', 'nubl', 'publ', 'zubl', 'cap', 'caplc', 'capnfe'].map(x => toID(x) + ' tier')); let BattleArticleTitles = {}; diff --git a/play.pokemonshowdown.com/js/search.js b/play.pokemonshowdown.com/js/search.js index 13ff4ecb1..abecd6263 100644 --- a/play.pokemonshowdown.com/js/search.js +++ b/play.pokemonshowdown.com/js/search.js @@ -234,7 +234,7 @@ ru: "RU", nu: "NU", pu: "PU", - zu: "(PU)", + zu: "ZU", nfe: "NFE", lc: "LC", cap: "CAP", @@ -243,7 +243,8 @@ uubl: "UUBL", rubl: "RUBL", nubl: "NUBL", - publ: "PUBL" + publ: "PUBL", + zubl: "ZUBL" }; var tier = {name: tierTable[id]}; return this.renderTierRow(tier, matchStart, matchLength, errorMessage); diff --git a/play.pokemonshowdown.com/src/battle-dex-search.ts b/play.pokemonshowdown.com/src/battle-dex-search.ts index 2b9459fb0..0bf695396 100644 --- a/play.pokemonshowdown.com/src/battle-dex-search.ts +++ b/play.pokemonshowdown.com/src/battle-dex-search.ts @@ -358,7 +358,6 @@ class DexSearch { // For pokemon queries, accept types/tier/abilities/moves/eggroups as filters if (searchType === 'pokemon' && (typeIndex === 5 || typeIndex > 7)) continue; - if (searchType === 'pokemon' && typeIndex === 3 && this.dex.gen < 9) continue; // For move queries, accept types/categories as filters if (searchType === 'move' && ((typeIndex !== 8 && typeIndex > 4) || typeIndex === 3)) continue; // For move queries in the teambuilder, don't accept pokemon as filters