Skip to content

Commit

Permalink
Fix Natdex learnsets bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaD173 committed Oct 4, 2024
1 parent 8ed7226 commit 9f61206
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions play.pokemonshowdown.com/src/battle-dex-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,6 @@ abstract class BattleTypedSearch<T extends SearchType> {
format = format.slice(7) as ID;
if (!format) format = 'ou' as ID;
}
if (format.startsWith('vgc')) {
this.formatType = 'doubles';
}
if (format.startsWith('vgc')) this.formatType = 'doubles';
if (format === 'vgc2020') this.formatType = 'ssdlc1doubles';
if (format === 'vgc2023regulationd') this.formatType = 'predlcdoubles';
Expand Down Expand Up @@ -1685,8 +1682,17 @@ class BattleMoveSearch extends BattleTypedSearch<'move'> {
continue;
}
if (
this.formatType?.includes('predlc') && this.formatType !== 'predlcnatdex' &&
BattleTeambuilderTable['gen9predlc']?.nonstandardMoves.includes(moveid)
!learnsetEntry.includes(gen) &&
(!isTradebacks ? true : !(move.gen <= dex.gen && learnsetEntry.includes('' + (dex.gen + 1))))
) {
continue;
}
if (this.formatType !== 'natdex' && move.isNonstandard === "Past") {
continue;
}
if (
this.formatType?.startsWith('dlc1') &&
BattleTeambuilderTable['gen8dlc1']?.nonstandardMoves.includes(moveid)
) {
continue;
}
Expand Down

0 comments on commit 9f61206

Please sign in to comment.