mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 04:23:45 -05:00
Hackmons Cup: Stop banning all natures when there are custom bans (#9440)
* Hackmons Cup: Stop banning all natures when there are custom bans * remove logging * linter
This commit is contained in:
parent
b18aeca71c
commit
1031bea203
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user