Skip to content

Commit

Permalink
Teambuilder: Allow Tier filters on old gens (#2190)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik99999 authored Dec 16, 2023
1 parent 4396619 commit 1a35b5c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build-tools/build-indexes
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};

Expand Down
5 changes: 3 additions & 2 deletions play.pokemonshowdown.com/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
ru: "RU",
nu: "NU",
pu: "PU",
zu: "(PU)",
zu: "ZU",
nfe: "NFE",
lc: "LC",
cap: "CAP",
Expand All @@ -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);
Expand Down
1 change: 0 additions & 1 deletion play.pokemonshowdown.com/src/battle-dex-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a35b5c

Please sign in to comment.