Teambuilder: Allow Tier filters on old gens (#2190)

This commit is contained in:
Karthik 2023-12-16 03:34:43 -05:00 committed by GitHub
parent 43966190c6
commit 1a35b5c012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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 = {};

View File

@ -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);

View File

@ -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