mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-23 08:16:16 -05:00
Gen 3's getDamage is a clone of an older Gen 5's version. Delete it for now, since it has no reason to exist until differences in that function have to be added for gen 3.
27 lines
886 B
JavaScript
27 lines
886 B
JavaScript
exports.BattleScripts = {
|
|
gen: 3,
|
|
init: function() {
|
|
for (var i in this.data.Learnsets) {
|
|
this.modData('Learnsets', i);
|
|
var learnset = this.data.Learnsets[i].learnset;
|
|
for (var moveid in learnset) {
|
|
if (typeof learnset[moveid] === 'string') learnset[moveid] = [learnset[moveid]];
|
|
learnset[moveid] = learnset[moveid].filter(function(source) {
|
|
return source[0] === '3';
|
|
});
|
|
if (!learnset[moveid].length) delete learnset[moveid];
|
|
}
|
|
}
|
|
for (var i in this.data.Pokedex) {
|
|
delete this.data.Pokedex[i].abilities['DW'];
|
|
}
|
|
},
|
|
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';
|
|
}
|
|
};
|