Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. exports.BattleScripts = {
  2. init: function () {
  3. var specialTypes = {Fire:1, Water:1, Grass:1, Ice:1, Electric:1, Dark:1, Psychic:1, Dragon:1, Fairy:1};
  4. var newCategory = '';
  5. for (var i in this.data.Movedex) {
  6. if (this.data.Movedex[i].category === 'Status') continue;
  7. newCategory = specialTypes[this.data.Movedex[i].type] ? 'Special' : 'Physical';
  8. if (newCategory !== this.data.Movedex[i].category) {
  9. this.modData('Movedex', i).category = newCategory;
  10. }
  11. }
  12. }
  13. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement