Skip to content

Commit e03bee0

Browse files
committed
Pokemoves: Make Allowed Pokemoves actually work
1 parent 52698d9 commit e03bee0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: config/formats.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1593,8 +1593,12 @@ export const Formats: import('../sim/dex-formats').FormatList = [
15931593
set.moves.splice(i, 1);
15941594
}
15951595
}
1596-
if (pokemoves > 1) {
1597-
problems.push(`${set.species} has ${pokemoves} Pokemoves.`, `(Pok\u00e9mon can only have 1 Pokemove each.)`);
1596+
const allowedPokemoves = this.ruleTable.valueRules.get('allowedpokemoves') || 1;
1597+
if (pokemoves > Number(allowedPokemoves)) {
1598+
problems.push(
1599+
`${set.species} has ${pokemoves} Pokemoves.`,
1600+
`(Pok\u00e9mon can only have ${allowedPokemoves} Pokemove${allowedPokemoves + '' === '1' ? '' : 's'} each.)`
1601+
);
15981602
}
15991603
if (this.validateSet(set, teamHas)) {
16001604
return this.validateSet(set, teamHas);

0 commit comments

Comments
 (0)