From 0f1c9747d80b187efc287b154f21da0a061ea1b6 Mon Sep 17 00:00:00 2001 From: HiZo <96159984+HisuianZoroark@users.noreply.github.com> Date: Mon, 5 Aug 2024 11:05:27 -0400 Subject: [PATCH] Pokemoves: Prevent 5 move sets (#10476) --- config/formats.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/formats.ts b/config/formats.ts index 5616f9b24418..f03556ae34e2 100644 --- a/config/formats.ts +++ b/config/formats.ts @@ -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;