pokemon-showdown/mods/gen4/rulesets.js
Quinton Lee 55fa6c630e Rulesets: standardize types and names (#2838)
Rules that affect validation are now typed ValidatorRule and rule
names are no longer affected by Tools.getFormat input.
2016-10-12 14:24:53 -05:00

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."];
}
}
},
},
};