diff --git a/data/mods/gen8/random-teams.ts b/data/mods/gen8/random-teams.ts index cd5c1deab0..faeb7fc00a 100644 --- a/data/mods/gen8/random-teams.ts +++ b/data/mods/gen8/random-teams.ts @@ -745,28 +745,26 @@ export class RandomGen8Teams { let naturePool: Nature[] = []; if (doNaturesExist) { if (!hasCustomBans) { - if (!hasCustomBans) { - naturePool = [...this.dex.natures.all()]; - } else { - const hasAllNaturesBan = ruleTable.check('pokemontag:allnatures'); - for (const nature of this.dex.natures.all()) { - let banReason = ruleTable.check('nature:' + nature.id); - if (banReason) continue; - if (banReason !== '' && nature.id) { - if (hasAllNaturesBan) continue; - if (nature.isNonstandard) { - banReason = ruleTable.check('pokemontag:' + toID(nature.isNonstandard)); - if (banReason) continue; - if (banReason !== '' && nature.isNonstandard !== 'Unobtainable') { - if (hasNonexistentBan) continue; - if (!hasNonexistentWhitelist) continue; - } + naturePool = [...this.dex.natures.all()]; + } else { + const hasAllNaturesBan = ruleTable.check('pokemontag:allnatures'); + for (const nature of this.dex.natures.all()) { + let banReason = ruleTable.check('nature:' + nature.id); + if (banReason) continue; + if (banReason !== '' && nature.id) { + if (hasAllNaturesBan) continue; + if (nature.isNonstandard) { + banReason = ruleTable.check('pokemontag:' + toID(nature.isNonstandard)); + if (banReason) continue; + if (banReason !== '' && nature.isNonstandard !== 'Unobtainable') { + if (hasNonexistentBan) continue; + if (!hasNonexistentWhitelist) continue; } } - naturePool.push(nature); } - // There is no 'nature:nonature' rule so do not constrain pool size + naturePool.push(nature); } + // There is no 'nature:nonature' rule so do not constrain pool size } } diff --git a/data/random-teams.ts b/data/random-teams.ts index 25ff3572e4..ecb4a59a97 100644 --- a/data/random-teams.ts +++ b/data/random-teams.ts @@ -2004,28 +2004,26 @@ export class RandomTeams { let naturePool: Nature[] = []; if (doNaturesExist) { if (!hasCustomBans) { - if (!hasCustomBans) { - naturePool = [...this.dex.natures.all()]; - } else { - const hasAllNaturesBan = ruleTable.check('pokemontag:allnatures'); - for (const nature of this.dex.natures.all()) { - let banReason = ruleTable.check('nature:' + nature.id); - if (banReason) continue; - if (banReason !== '' && nature.id) { - if (hasAllNaturesBan) continue; - if (nature.isNonstandard) { - banReason = ruleTable.check('pokemontag:' + toID(nature.isNonstandard)); - if (banReason) continue; - if (banReason !== '' && nature.isNonstandard !== 'Unobtainable') { - if (hasNonexistentBan) continue; - if (!hasNonexistentWhitelist) continue; - } + naturePool = [...this.dex.natures.all()]; + } else { + const hasAllNaturesBan = ruleTable.check('pokemontag:allnatures'); + for (const nature of this.dex.natures.all()) { + let banReason = ruleTable.check('nature:' + nature.id); + if (banReason) continue; + if (banReason !== '' && nature.id) { + if (hasAllNaturesBan) continue; + if (nature.isNonstandard) { + banReason = ruleTable.check('pokemontag:' + toID(nature.isNonstandard)); + if (banReason) continue; + if (banReason !== '' && nature.isNonstandard !== 'Unobtainable') { + if (hasNonexistentBan) continue; + if (!hasNonexistentWhitelist) continue; } } - naturePool.push(nature); } - // There is no 'nature:nonature' rule so do not constrain pool size + naturePool.push(nature); } + // There is no 'nature:nonature' rule so do not constrain pool size } }