Fix Min Source Gen calcuation

This commit is contained in:
Guangcong Luo
2025-03-03 03:59:05 -08:00
parent ce6d5153fb
commit de7e0eddef
2 changed files with 3 additions and 3 deletions

View File

@@ -103,7 +103,7 @@ export const Rulesets: import('../sim/dex-formats').FormatDataTable = {
name: 'NatDex Mod',
desc: "Mechanics for National Dex formats",
ruleset: [
'+Unobtainable', '+Past', 'Sketch Post-Gen 7 Moves', 'Min Source Gen = 1',
'+Unobtainable', '+Past', 'Sketch Post-Gen 7 Moves',
],
onValidateSet(set) {
const species = this.dex.species.get(set.species);

View File

@@ -230,8 +230,8 @@ export class RuleTable extends Map<string, string> {
this.evLimit = Number(this.valueRules.get('evlimit'));
if (isNaN(this.evLimit)) this.evLimit = null;
if (!this.minSourceGen) {
if (format.gen >= 9 && this.has('obtainable') && !this.has('+past')) {
this.minSourceGen = format.gen;
if (dex.gen >= 9 && this.has('obtainable') && !this.has('+past')) {
this.minSourceGen = dex.gen;
} else {
this.minSourceGen = 1;
}