Show Genesect forme in Team Preview

This commit is contained in:
The Immortal 2020-10-23 20:51:16 +04:00
parent 8d7b72c606
commit 24afc0f57e
2 changed files with 13 additions and 2 deletions

View File

@ -26,4 +26,15 @@ export const Formats: {[k: string]: ModdedFormatData} = {
this.add('rule', 'Gravity Sleep Clause: The combination of Gravity and sleep-inducing moves with imperfect accuracy are banned');
},
},
teampreview: {
inherit: true,
onBegin() {
this.add('clearpoke');
for (const pokemon of this.getAllPokemon()) {
const details = pokemon.details.replace(', shiny', '')
.replace(/(Arceus|Gourgeist|Genesect|Pumpkaboo|Silvally|Urshifu)(-[a-zA-Z?-]+)?/g, '$1-*');
this.add('poke', pokemon.side.id, details, pokemon.item ? 'item' : '');
}
},
},
};

View File

@ -307,8 +307,8 @@ export const Formats: {[k: string]: FormatData} = {
this.add('clearpoke');
for (const pokemon of this.getAllPokemon()) {
const details = pokemon.details.replace(', shiny', '')
.replace(/(Arceus|Gourgeist|Genesect|Pumpkaboo|Silvally|Urshifu)(-[a-zA-Z?-]+)?/g, '$1-*');
this.add('poke', pokemon.side.id, details, this.gen < 8 && pokemon.item ? 'item' : '');
.replace(/(Arceus|Gourgeist|Pumpkaboo|Silvally|Urshifu)(-[a-zA-Z?-]+)?/g, '$1-*');
this.add('poke', pokemon.side.id, details, '');
}
},
onTeamPreview() {