Advertisement
Guest User

Untitled

a guest
Dec 21st, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. /mods/godsamongus/scripts.js
  2. Code:
  3. 'use strict';
  4.  
  5. exports.BattleScripts = {
  6. init: function () {
  7. for (let i in this.data.Pokedex) {
  8. let tier = null;
  9. let adjust = false;
  10. if (this.data.FormatsData[i]) tier = this.data.FormatsData[i].tier;
  11. if (!tier && this.data.Pokedex[i].baseSpecies) tier = this.data.FormatsData[toId(this.data.Pokedex[i].species)].tier;
  12.  
  13. switch (tier) {
  14. case 'Uber':
  15. adjust = true;
  16. break;
  17. }
  18.  
  19. if (adjust) {
  20. for (let j in this.data.Pokedex[i].baseStats) {
  21. if (this.data.Pokedex[i].baseStats["hp"] === j && this.data.Pokedex[i].formeLetter === 'M') {
  22. pass;
  23. } else {
  24. this.modData('Pokedex', i).baseStats[j] = this.clampIntRange(this.data.Pokedex[i].baseStats[j] / 2 + 40, 1, 255);
  25. }
  26. }
  27. }
  28. }
  29. }
  30. };
  31. config/formats.js
  32. Code:
  33. {
  34.  
  35. name: "Gods Among Us",
  36. desc: ["&bullet; <a href=\"http://www.smogon.com/forums/threads/3549611/\">Gods Among Us</a>"],
  37. section: "Other Metagames",
  38.  
  39. mod: 'godsamongus',
  40. ruleset: ['Pokemon', 'Standard', 'Baton Pass Clause', 'Swagger Clause', 'Same Type Clause', 'Team Preview', 'Mega Rayquaza Clause'],
  41. banlist: ['Soul Dew'],
  42. onValidateTeam: (team, format) [
  43. let megasnum = 0;
  44. for (let i = 0; i < team.length; i++) {
  45. let item = Tools.getItem(team[i].item);
  46. if (item.megaStone || item.id === "redorb" || item.id === "blueorb") megasnum++;
  47. }
  48. if (megasnum.length > 1) return ["Primal Clause limits you to a maximum one Mega Evolution or Primal Devolution per team."];
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement