pokemon-showdown/mods/gen3/scripts.js
Guangcong Luo a39fdd6006 Split off team validation to team-validator.js
This is the first step in a refactor to split team validation into
its own process.
2014-01-09 17:35:19 -08:00

17 lines
488 B
JavaScript

exports.BattleScripts = {
inherit: 'gen5',
gen: 3,
init: function() {
for (var i in this.data.Pokedex) {
delete this.data.Pokedex[i].abilities['H'];
}
},
getCategory: function(move) {
move = this.getMove(move);
if (!(move.category in {'Special':1,'Physical':1})) return move.category;
// overwrite categories
var specialTypes = {Fire:1, Water:1, Grass:1, Ice:1, Electric:1, Dark:1, Psychic:1, Dragon:1};
return specialTypes[move.type]? 'Special' : 'Physical';
}
};