mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-05 21:17:43 -05:00
Old Gens Random Battles: allow battle only formes to generate in Monotype battles (#9490)
This commit is contained in:
parent
480498a64e
commit
b17aae9aa5
|
|
@ -2406,14 +2406,14 @@ export class RandomGen8Teams {
|
|||
) {
|
||||
const exclude = pokemonToExclude.map(p => toID(p.species));
|
||||
const pokemonPool = [];
|
||||
for (let species of this.dex.species.all()) {
|
||||
for (const species of this.dex.species.all()) {
|
||||
if (species.gen > this.gen || exclude.includes(species.id)) continue;
|
||||
if (this.dex.currentMod === 'gen8bdsp' && species.gen > 4) continue;
|
||||
if (isMonotype) {
|
||||
if (!species.types.includes(type)) continue;
|
||||
if (typeof species.battleOnly === 'string') {
|
||||
species = this.dex.species.get(species.battleOnly);
|
||||
if (!species.types.includes(type)) continue;
|
||||
const baseSpecies = this.dex.species.get(species.battleOnly);
|
||||
if (!baseSpecies.types.includes(type)) continue;
|
||||
}
|
||||
}
|
||||
pokemonPool.push(species.id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user