mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Remove banned Pokemon from DPP PU teambuilder
This commit is contained in:
parent
ae69319e63
commit
35be5515f9
|
|
@ -302,6 +302,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
|
|||
const monotypeBans = {};
|
||||
const nonstandardMoves = [];
|
||||
const gen5zuBans = {};
|
||||
const gen4puBans = {};
|
||||
for (const id of pokemon) {
|
||||
const species = Dex.mod(gen).species.get(id);
|
||||
const baseSpecies = Dex.mod(gen).species.get(species.baseSpecies);
|
||||
|
|
@ -448,6 +449,12 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
|
|||
monotypeBans[species.id] = 1;
|
||||
}
|
||||
}
|
||||
if (genNum === 4) {
|
||||
const gen4pu = Dex.formats.get(gen + 'pu');
|
||||
if (gen4pu.exists && Dex.formats.getRuleTable(gen4pu).isBannedSpecies(species)) {
|
||||
gen4puBans[species.id] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nonstandardMoves.push(...Object.keys(Dex.data.Moves).filter(id => {
|
||||
|
|
@ -540,6 +547,9 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
|
|||
if (genNum === 5) {
|
||||
BattleTeambuilderTable[gen].gen5zuBans = gen5zuBans;
|
||||
}
|
||||
if (genNum === 4) {
|
||||
BattleTeambuilderTable[gen].gen4puBans = gen4puBans;
|
||||
}
|
||||
BattleTeambuilderTable[gen].overrideTier = overrideTier;
|
||||
BattleTeambuilderTable[gen].tiers = tiers;
|
||||
BattleTeambuilderTable[gen].items = items;
|
||||
|
|
|
|||
|
|
@ -1150,6 +1150,12 @@ class BattlePokemonSearch extends BattleTypedSearch<'pokemon'> {
|
|||
return true;
|
||||
});
|
||||
}
|
||||
if (format === 'pu' && dex.gen === 4 && table.gen4puBans) {
|
||||
tierSet = tierSet.filter(([type, id]) => {
|
||||
if (id in table.gen4puBans) return false;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
// Filter out Gmax Pokemon from standard tier selection
|
||||
if (!(/^(battlestadium|vgc|doublesubers)/g.test(format) || (format === 'doubles' && this.formatType === 'natdex'))) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user