mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-25 07:22:09 -05:00
Pokemoves: Make Allowed Pokemoves actually work
This commit is contained in:
parent
52698d9a84
commit
e03bee0aeb
|
|
@ -1593,8 +1593,12 @@ export const Formats: import('../sim/dex-formats').FormatList = [
|
|||
set.moves.splice(i, 1);
|
||||
}
|
||||
}
|
||||
if (pokemoves > 1) {
|
||||
problems.push(`${set.species} has ${pokemoves} Pokemoves.`, `(Pok\u00e9mon can only have 1 Pokemove each.)`);
|
||||
const allowedPokemoves = this.ruleTable.valueRules.get('allowedpokemoves') || 1;
|
||||
if (pokemoves > Number(allowedPokemoves)) {
|
||||
problems.push(
|
||||
`${set.species} has ${pokemoves} Pokemoves.`,
|
||||
`(Pok\u00e9mon can only have ${allowedPokemoves} Pokemove${allowedPokemoves + '' === '1' ? '' : 's'} each.)`
|
||||
);
|
||||
}
|
||||
if (this.validateSet(set, teamHas)) {
|
||||
return this.validateSet(set, teamHas);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user