Fix DPP Doubles teambuilder (#1504)

This commit is contained in:
Kris Johnson 2020-05-05 16:22:36 -06:00 committed by GitHub
parent d2e076c44f
commit 27f04e48ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -369,7 +369,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
if (species.tier === 'CAP' || species.tier === 'CAP NFE' || species.tier === 'CAP LC') {
return species.tier;
}
if (isDoubles) {
if (isDoubles && genNum > 4) {
return species.doublesTier;
}
return species.tier;
@ -484,7 +484,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
if (isVGC) {
return ["Mythical", "Restricted Legendary", "Regular", "NFE", "LC"];
}
if (isDoubles) {
if (isDoubles && genNum > 4) {
return ["DUber", "(DUber)", "DOU", "DBL", "(DOU)", "DUU", "(DUU)", "New", "NFE", "LC Uber", "LC"];
}
if (gen === 'gen1' || gen === 'gen2' || gen === 'gen3') {

View File

@ -829,7 +829,7 @@
} else if (this.gen === 7 && requirePentagon) {
table = table['gen' + this.gen + 'vgc'];
isDoublesOrBS = true;
} else if (table['gen' + this.gen + 'doubles'] && (format.includes('doubles') || format.includes('vgc') || format.includes('triples') || format.endsWith('lc') || format.endsWith('lcuu')) && !isLetsGo) {
} else if (table['gen' + this.gen + 'doubles'] && this.gen > 4 && (format.includes('doubles') || format.includes('vgc') || format.includes('triples') || format.endsWith('lc') || format.endsWith('lcuu')) && !isLetsGo) {
table = table['gen' + this.gen + 'doubles'];
isDoublesOrBS = true;
} else if (this.gen < 8) {
@ -870,7 +870,7 @@
else if (format.startsWith('lc') || format.endsWith('lc')) tierSet = tierSet.slice(slices["LC Uber"]);
else if (format === 'anythinggoes' || format === 'ag') tierSet = tierSet.slice(slices.AG || slices.Uber);
else if (format === 'balancedhackmons' || format === 'bh') tierSet = tierSet.slice(slices.AG || slices.Uber);
else if (format === 'doublesou') tierSet = tierSet.slice(slices.DOU);
else if (format === 'doublesou' && this.gen > 4) tierSet = tierSet.slice(slices.DOU);
else if (format === 'doublesuu') tierSet = tierSet.slice(slices.DUU);
else if (format === 'doublesnu') tierSet = tierSet.slice(slices.DNU || slices.DUU);
else if (isLetsGo) tierSet = tierSet.slice(slices.Uber);

View File

@ -795,7 +795,7 @@ class BattlePokemonSearch extends BattleTypedSearch<'pokemon'> {
} else if (dex.gen === 7 && requirePentagon) {
table = table['gen' + dex.gen + 'vgc'];
isDoublesOrBS = true;
} else if (table['gen' + dex.gen + 'doubles'] && !this.isLetsGo && (
} else if (table['gen' + dex.gen + 'doubles'] && dex.gen > 4 && !this.isLetsGo && (
format.includes('doubles') || format.includes('vgc') || format.includes('triples') ||
format.endsWith('lc') || format.endsWith('lcuu')
)) {
@ -836,7 +836,7 @@ class BattlePokemonSearch extends BattleTypedSearch<'pokemon'> {
else if (format.startsWith('lc') || format.endsWith('lc')) tierSet = tierSet.slice(slices["LC Uber"]);
else if (format === 'anythinggoes' || format === 'ag') tierSet = agTierSet.concat(tierSet.slice(slices.Uber));
else if (format === 'balancedhackmons' || format === 'bh') tierSet = agTierSet.concat(tierSet.slice(slices.Uber));
else if (format === 'doublesou') tierSet = tierSet.slice(slices.DOU);
else if (format === 'doublesou' && dex.gen > 4) tierSet = tierSet.slice(slices.DOU);
else if (format === 'doublesuu') tierSet = tierSet.slice(slices.DUU);
else if (format === 'doublesnu') tierSet = tierSet.slice(slices.DNU || slices.DUU);
else if (this.isLetsGo) tierSet = tierSet.slice(slices.Uber);