Skip to content

Commit

Permalink
Teambuilder: Support Reg H bans (#2271)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik99999 authored Aug 1, 2024
1 parent d497a2e commit d060c39
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions play.pokemonshowdown.com/src/battle-dex-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,15 @@ class BattlePokemonSearch extends BattleTypedSearch<'pokemon'> {
} else {
tierSet = tierSet.slice(slices.Regular);
}

if (format.endsWith('regh')) {
tierSet = tierSet.filter(([type, id]) => {
const tags = Dex.species.get(Dex.species.get(id).baseSpecies).tags;
return !tags.includes('Sub-Legendary') && !tags.includes('Paradox') &&
// The game does not classify these as Paradox Pokemon (Booster Energy can be knocked off)
!['gougingfire', 'ironboulder', 'ironcrown', 'ragingbolt'].includes(id);
});
}
} else if (format === 'ou') tierSet = tierSet.slice(slices.OU);
else if (format === 'uu' || (format === 'ru' && dex.gen === 3)) tierSet = tierSet.slice(slices.UU);
else if (format === 'ru') tierSet = tierSet.slice(slices.RU || slices.UU);
Expand Down

0 comments on commit d060c39

Please sign in to comment.