diff --git a/build-tools/build-indexes b/build-tools/build-indexes index 2a0de9ca0..9ab529193 100755 --- a/build-tools/build-indexes +++ b/build-tools/build-indexes @@ -361,19 +361,19 @@ process.stdout.write("Building `data/teambuilder-tables.js`... "); return ["Uber", "OU", "BL", "UU", "BL2", "NU", "NFE", "LC Uber", "LC"]; } if (gen === 'gen4') { - return ["CAP", "CAP LC", "CAP NFE", "Uber", "OU", "BL", "UU", "BL2", "NU", "NFE", "LC Uber", "LC"]; + return ["CAP", "CAP NFE", "CAP LC", "Uber", "OU", "BL", "UU", "BL2", "NU", "NFE", "LC Uber", "LC"]; } if (gen === 'gen5') { - return ["CAP", "CAP LC", "CAP NFE", "Uber", "OU", "BL", "UU", "BL2", "RU", "BL3", "NU", "NFE", "LC Uber", "LC"]; + return ["CAP", "CAP NFE", "CAP LC", "Uber", "OU", "BL", "UU", "BL2", "RU", "BL3", "NU", "NFE", "LC Uber", "LC"]; } if (gen === 'gen7') { - return ["CAP", "CAP LC", "CAP NFE", "Uber", "OU", "BL", "(OU)", "UU", "BL2", "RU", "BL3", "NU", "BL4", "PU", "New", "Unreleased", "NFE", "LC Uber", "LC"]; + return ["CAP", "CAP NFE", "CAP LC", "Uber", "OU", "BL", "(OU)", "UU", "BL2", "RU", "BL3", "NU", "BL4", "PU", "New", "Unreleased", "NFE", "LC Uber", "LC"]; } - return ["CAP", "CAP LC", "CAP NFE", "Uber", "OU", "BL", "(OU)", "UU", "BL2", "RU", "BL3", "NU", "BL4", "PU", "NFE", "LC Uber", "LC"]; + return ["CAP", "CAP NFE", "CAP LC", "Uber", "OU", "BL", "(OU)", "UU", "BL2", "RU", "BL3", "NU", "BL4", "PU", "NFE", "LC Uber", "LC"]; })(); for (const tier of tierOrder) { - if (tier in {OU:1, Uber:1, UU:1, RU:1, NU:1, PU:1, LC:1, DOU:1, DUU:1, DNU:1, "(PU)":1, New:1, Legal:1, Regular:1, "Restricted Legendary":1}) { + if (tier in {OU:1, Uber:1, UU:1, RU:1, NU:1, PU:1, LC:1, DOU:1, DUU:1, DNU:1, "(PU)":1, New:1, Legal:1, Regular:1, "Restricted Legendary":1, "CAP LC":1}) { formatSlices[tier === "(PU)" ? "FU" : tier] = tiers.length; } if (!tierTable[tier]) continue; diff --git a/js/search.js b/js/search.js index efff0a2bc..0cfe6b58b 100644 --- a/js/search.js +++ b/js/search.js @@ -804,7 +804,12 @@ case 'pokemon': var table = BattleTeambuilderTable; var isDoublesOrBS = false; - if (this.gen === 7 && requirePentagon) { + if (format.endsWith('cap') || format.endsWith('caplc')) { + // CAP formats always use the singles table + if (this.gen < 7) { + table = table['gen' + this.gen]; + } + } 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'))) { @@ -838,6 +843,7 @@ else if (format === 'pu') tierSet = tierSet.slice(slices.PU); else if (format === 'lc' || format === 'lcuu') tierSet = tierSet.slice(slices.LC); else if (format === 'cap') tierSet = tierSet.slice(0, slices.Uber).concat(tierSet.slice(slices.OU)); + else if (format === 'caplc') tierSet = tierSet.slice(slices['CAP LC'], slices.Uber).concat(tierSet.slice(slices.LC)); 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);