mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-24 08:46:26 -05:00
The init script will set the battle generation to 5 and delete mod the Learnsets so no moves from gen 6 are used.
17 lines
477 B
JavaScript
17 lines
477 B
JavaScript
exports.BattleScripts = {
|
|
gen: 5,
|
|
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] !== '6';
|
|
});
|
|
if (!learnset[moveid].length) delete learnset[moveid];
|
|
}
|
|
}
|
|
}
|
|
};
|