mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-03 00:01:29 -05:00
Fix NatDex Teambuilder Table for UUBL (#1773)
This commit is contained in:
@@ -20,6 +20,7 @@ child_process.execSync('npm run build', {cwd: 'data/pokemon-showdown'});
|
||||
console.log("DONE");
|
||||
|
||||
const Dex = require('../data/pokemon-showdown/.sim-dist/dex').Dex;
|
||||
const Tags = require('../data/pokemon-showdown/.data-dist/tags').Tags;
|
||||
const toID = Dex.toID;
|
||||
process.stdout.write("Loading gen 6 data... ");
|
||||
Dex.includeData();
|
||||
@@ -353,20 +354,10 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
|
||||
if (unobtainables.includes(species.id)) return 'Illegal';
|
||||
const uu = Dex.formats.get('gen8nationaldexuu');
|
||||
const ou = Dex.formats.get('gen8nationaldex');
|
||||
const uublIndex = uu.banlist.map(toID).indexOf('nduubl');
|
||||
if (Dex.formats.getRuleTable(ou).isBannedSpecies(species)) return 'Uber';
|
||||
if (Dex.formats.getRuleTable(ou).has('dynamaxclause') && species.name.endsWith('Gmax')) return '(Uber)';
|
||||
if (Dex.formats.getRuleTable(uu).isBannedSpecies(species)) {
|
||||
if (
|
||||
uu.banlist.map(toID).indexOf(species.id) >= uublIndex ||
|
||||
uu.banlist.map(toID).indexOf(species.id + 'base') >= uublIndex ||
|
||||
uu.banlist.map(toID).indexOf(toID(species.baseSpecies)) >= uublIndex
|
||||
) {
|
||||
return 'UUBL';
|
||||
} else {
|
||||
return 'OU';
|
||||
}
|
||||
}
|
||||
if (Dex.formats.getRuleTable(uu).isBannedSpecies(species)) return 'OU';
|
||||
if (Tags.nduubl.speciesFilter(species)) return 'UUBL';
|
||||
if (Dex.formats.getRuleTable(uu).isRestrictedSpecies(species)) {
|
||||
return 'UU';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user