mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-08-22 00:54:31 -05:00
Fix Min Source Gen calcuation
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user