Skip to content

Commit

Permalink
Pokemoves: Prevent 5 move sets (smogon#10476)
Browse files Browse the repository at this point in the history
  • Loading branch information
HisuianZoroark authored Aug 5, 2024
1 parent d71cb04 commit 0f1c974
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,10 @@ export const Formats: import('../sim/dex-formats').FormatList = [
const problems: string[] = [];
const moves = [];
if (set.moves?.length) {
if (set.moves.length > this.ruleTable.maxMoveCount) {
problems.push(`${set.name} has ${set.moves.length} moves, which is more than the limit of ${this.ruleTable.maxMoveCount}.`);
return problems;
}
for (const [i, moveid] of set.moves.entries()) {
const pokemove = this.dex.species.get(moveid);
if (!pokemove.exists) continue;
Expand Down

0 comments on commit 0f1c974

Please sign in to comment.