mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-22 15:30:29 -05:00
Rules that affect validation are now typed ValidatorRule and rule names are no longer affected by Tools.getFormat input.
20 lines
540 B
JavaScript
20 lines
540 B
JavaScript
'use strict';
|
|
|
|
exports.BattleFormats = {
|
|
pokemon: {
|
|
inherit: true,
|
|
onValidateSet: function (set) {
|
|
let template = this.getTemplate(set.species);
|
|
let item = this.getItem(set.item);
|
|
if (item && item.id === 'griseousorb' && template.num !== 487) {
|
|
return ['Griseous Orb can only be held by Giratina in Generation 4.'];
|
|
}
|
|
if (template.num === 493 && set.evs) {
|
|
for (let stat in set.evs) {
|
|
if (set.evs[stat] > 100) return ["Arceus may not have more than 100 of any EVs in Generation 4."];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|