Skip to content

Commit d6e17eb

Browse files
committed
Fix -All Pokemon overriding Min Source Gen
1 parent c90643e commit d6e17eb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

sim/dex-formats.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export class RuleTable extends Map<string, string> {
230230
this.evLimit = Number(this.valueRules.get('evlimit'));
231231
if (isNaN(this.evLimit)) this.evLimit = null;
232232
if (!this.minSourceGen) {
233-
if (dex.gen >= 9 && this.has('obtainable') && !this.has('+past')) {
233+
if (dex.gen >= 9 && this.has('obtainable') && !this.has('natdexmod')) {
234234
this.minSourceGen = dex.gen;
235235
} else {
236236
this.minSourceGen = 1;

test/sim/team-validator/custom-rules.js

+5
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ describe("Custom Rules", () => {
8787
];
8888
assert.legalTeam(team, 'gen9ou@@@-allpokemon,+pikachu');
8989
assert.throws(() => Dex.formats.validate('gen9ou@@@+pikachu,-allpokemon'));
90+
91+
team = [
92+
{ species: 'zygarde-10', ability: 'aurabreak', moves: ['bodyslam'], evs: { hp: 1 } },
93+
];
94+
assert.legalTeam(team, 'gen9nationaldex@@@-allpokemon,+zygarde10');
9095
});
9196

9297
it('should warn when rules do nothing', () => {

0 commit comments

Comments
 (0)