Advertisement
Guest User

Untitled

a guest
Mar 5th, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* config/formats.js */
  2. {
  3.         name: "Anti-Vaxxers",
  4.         desc: ["All type-based immunities cease to apply."],
  5.         section: "Other Metagames",
  6.         mod: "antivaxxers",
  7.         ruleset: ["OU"],
  8. },
  9. /*mods/antivaxxers/typechart.js*/
  10. 'use strict';
  11.  
  12. exports.BattleTypeChart = {
  13.     "Bug": {
  14.         damageTaken: {
  15.             "Bug": 0,
  16.             "Dark": 0,
  17.             "Dragon": 0,
  18.             "Electric": 0,
  19.             "Fairy": 0,
  20.             "Fighting": 2,
  21.             "Fire": 1,
  22.             "Flying": 1,
  23.             "Ghost": 0,
  24.             "Grass": 2,
  25.             "Ground": 2,
  26.             "Ice": 0,
  27.             "Normal": 0,
  28.             "Poison": 0,
  29.             "Psychic": 0,
  30.             "Rock": 1,
  31.             "Steel": 0,
  32.             "Water": 0,
  33.         },
  34.         HPivs: {"atk":30, "def":30, "spd":30},
  35.         HPdvs: {"atk":13, "def":13},
  36.     },
  37.     "Dark": {
  38.         damageTaken: {
  39.             "Bug": 1,
  40.             "Dark": 2,
  41.             "Dragon": 0,
  42.             "Electric": 0,
  43.             "Fairy": 1,
  44.             "Fighting": 1,
  45.             "Fire": 0,
  46.             "Flying": 0,
  47.             "Ghost": 2,
  48.             "Grass": 0,
  49.             "Ground": 0,
  50.             "Ice": 0,
  51.             "Normal": 0,
  52.             "Poison": 0,
  53.             "Psychic": 0,
  54.             "Rock": 0,
  55.             "Steel": 0,
  56.             "Water": 0,
  57.         },
  58.         HPivs: {},
  59.     },
  60.     "Dragon": {
  61.         damageTaken: {
  62.             "Bug": 0,
  63.             "Dark": 0,
  64.             "Dragon": 1,
  65.             "Electric": 2,
  66.             "Fairy": 1,
  67.             "Fighting": 0,
  68.             "Fire": 2,
  69.             "Flying": 0,
  70.             "Ghost": 0,
  71.             "Grass": 2,
  72.             "Ground": 0,
  73.             "Ice": 1,
  74.             "Normal": 0,
  75.             "Poison": 0,
  76.             "Psychic": 0,
  77.             "Rock": 0,
  78.             "Steel": 0,
  79.             "Water": 2,
  80.         },
  81.         HPivs: {"atk":30},
  82.         HPdvs: {"def":14},
  83.     },
  84.     "Electric": {
  85.         damageTaken: {
  86.             "Bug": 0,
  87.             "Dark": 0,
  88.             "Dragon": 0,
  89.             "Electric": 2,
  90.             "Fairy": 0,
  91.             "Fighting": 0,
  92.             "Fire": 0,
  93.             "Flying": 2,
  94.             "Ghost": 0,
  95.             "Grass": 0,
  96.             "Ground": 1,
  97.             "Ice": 0,
  98.             "Normal": 0,
  99.             "Poison": 0,
  100.             "Psychic": 0,
  101.             "Rock": 0,
  102.             "Steel": 2,
  103.             "Water": 0,
  104.         },
  105.         HPivs: {"spa":30},
  106.         HPdvs: {"atk":14},
  107.     },
  108.     "Fairy": {
  109.         damageTaken: {
  110.             "Bug": 2,
  111.             "Dark": 2,
  112.             "Dragon": 0,
  113.             "Electric": 0,
  114.             "Fairy": 0,
  115.             "Fighting": 2,
  116.             "Fire": 0,
  117.             "Flying": 0,
  118.             "Ghost": 0,
  119.             "Grass": 0,
  120.             "Ground": 0,
  121.             "Ice": 0,
  122.             "Normal": 0,
  123.             "Poison": 1,
  124.             "Psychic": 0,
  125.             "Rock": 0,
  126.             "Steel": 1,
  127.             "Water": 0,
  128.         },
  129.     },
  130.     "Fighting": {
  131.         damageTaken: {
  132.             "Bug": 2,
  133.             "Dark": 2,
  134.             "Dragon": 0,
  135.             "Electric": 0,
  136.             "Fairy": 1,
  137.             "Fighting": 0,
  138.             "Fire": 0,
  139.             "Flying": 1,
  140.             "Ghost": 0,
  141.             "Grass": 0,
  142.             "Ground": 0,
  143.             "Ice": 0,
  144.             "Normal": 0,
  145.             "Poison": 0,
  146.             "Psychic": 1,
  147.             "Rock": 2,
  148.             "Steel": 0,
  149.             "Water": 0,
  150.         },
  151.         HPivs: {"def":30, "spa":30, "spd":30, "spe":30},
  152.         HPdvs: {"atk":12, "def":12},
  153.     },
  154.     "Fire": {
  155.         damageTaken: {
  156.             "Bug": 2,
  157.             "Dark": 0,
  158.             "Dragon": 0,
  159.             "Electric": 0,
  160.             "Fairy": 2,
  161.             "Fighting": 0,
  162.             "Fire": 2,
  163.             "Flying": 0,
  164.             "Ghost": 0,
  165.             "Grass": 2,
  166.             "Ground": 1,
  167.             "Ice": 2,
  168.             "Normal": 0,
  169.             "Poison": 0,
  170.             "Psychic": 0,
  171.             "Rock": 1,
  172.             "Steel": 2,
  173.             "Water": 1,
  174.         },
  175.         HPivs: {"atk":30, "spa":30, "spe":30},
  176.         HPdvs: {"atk":14, "def":12},
  177.     },
  178.     "Flying": {
  179.         damageTaken: {
  180.             "Bug": 2,
  181.             "Dark": 0,
  182.             "Dragon": 0,
  183.             "Electric": 1,
  184.             "Fairy": 0,
  185.             "Fighting": 2,
  186.             "Fire": 0,
  187.             "Flying": 0,
  188.             "Ghost": 0,
  189.             "Grass": 2,
  190.             "Ground": 0,
  191.             "Ice": 1,
  192.             "Normal": 0,
  193.             "Poison": 0,
  194.             "Psychic": 0,
  195.             "Rock": 1,
  196.             "Steel": 0,
  197.             "Water": 0,
  198.         },
  199.         HPivs: {"hp":30, "atk":30, "def":30, "spa":30, "spd":30},
  200.         HPdvs: {"atk":12, "def":13},
  201.     },
  202.     "Ghost": {
  203.         damageTaken: {
  204.             "Bug": 2,
  205.             "Dark": 1,
  206.             "Dragon": 0,
  207.             "Electric": 0,
  208.             "Fairy": 0,
  209.             "Fighting": 0,
  210.             "Fire": 0,
  211.             "Flying": 0,
  212.             "Ghost": 1,
  213.             "Grass": 0,
  214.             "Ground": 0,
  215.             "Ice": 0,
  216.             "Normal": 0,
  217.             "Poison": 2,
  218.             "Psychic": 0,
  219.             "Rock": 0,
  220.             "Steel": 0,
  221.             "Water": 0,
  222.         },
  223.         HPivs: {"def":30, "spd":30},
  224.         HPdvs: {"atk":13, "def":14},
  225.     },
  226.     "Grass": {
  227.         damageTaken: {
  228.             "Bug": 1,
  229.             "Dark": 0,
  230.             "Dragon": 0,
  231.             "Electric": 2,
  232.             "Fairy": 0,
  233.             "Fighting": 0,
  234.             "Fire": 1,
  235.             "Flying": 1,
  236.             "Ghost": 0,
  237.             "Grass": 2,
  238.             "Ground": 2,
  239.             "Ice": 1,
  240.             "Normal": 0,
  241.             "Poison": 1,
  242.             "Psychic": 0,
  243.             "Rock": 0,
  244.             "Steel": 0,
  245.             "Water": 2,
  246.         },
  247.         HPivs: {"atk":30, "spa":30},
  248.         HPdvs: {"atk":14, "def":14},
  249.     },
  250.     "Ground": {
  251.         damageTaken: {
  252.             "Bug": 0,
  253.             "Dark": 0,
  254.             "Dragon": 0,
  255.             "Electric": 0,
  256.             "Fairy": 0,
  257.             "Fighting": 0,
  258.             "Fire": 0,
  259.             "Flying": 0,
  260.             "Ghost": 0,
  261.             "Grass": 1,
  262.             "Ground": 0,
  263.             "Ice": 1,
  264.             "Normal": 0,
  265.             "Poison": 2,
  266.             "Psychic": 0,
  267.             "Rock": 2,
  268.             "Steel": 0,
  269.             "Water": 1,
  270.         },
  271.         HPivs: {"spa":30, "spd":30},
  272.         HPdvs: {"atk":12},
  273.     },
  274.     "Ice": {
  275.         damageTaken: {
  276.             "Bug": 0,
  277.             "Dark": 0,
  278.             "Dragon": 0,
  279.             "Electric": 0,
  280.             "Fairy": 0,
  281.             "Fighting": 1,
  282.             "Fire": 1,
  283.             "Flying": 0,
  284.             "Ghost": 0,
  285.             "Grass": 0,
  286.             "Ground": 0,
  287.             "Ice": 2,
  288.             "Normal": 0,
  289.             "Poison": 0,
  290.             "Psychic": 0,
  291.             "Rock": 1,
  292.             "Steel": 1,
  293.             "Water": 0,
  294.         },
  295.         HPivs: {"atk":30, "def":30},
  296.         HPdvs: {"def":13},
  297.     },
  298.     "Normal": {
  299.         damageTaken: {
  300.             "Bug": 0,
  301.             "Dark": 0,
  302.             "Dragon": 0,
  303.             "Electric": 0,
  304.             "Fairy": 0,
  305.             "Fighting": 1,
  306.             "Fire": 0,
  307.             "Flying": 0,
  308.             "Ghost": 0,
  309.             "Grass": 0,
  310.             "Ground": 0,
  311.             "Ice": 0,
  312.             "Normal": 0,
  313.             "Poison": 0,
  314.             "Psychic": 0,
  315.             "Rock": 0,
  316.             "Steel": 0,
  317.             "Water": 0,
  318.         },
  319.     },
  320.     "Poison": {
  321.         damageTaken: {
  322.             "Bug": 2,
  323.             "Dark": 0,
  324.             "Dragon": 0,
  325.             "Electric": 0,
  326.             "Fairy": 2,
  327.             "Fighting": 2,
  328.             "Fire": 0,
  329.             "Flying": 0,
  330.             "Ghost": 0,
  331.             "Grass": 2,
  332.             "Ground": 1,
  333.             "Ice": 0,
  334.             "Normal": 0,
  335.             "Poison": 2,
  336.             "Psychic": 1,
  337.             "Rock": 0,
  338.             "Steel": 0,
  339.             "Water": 0,
  340.         },
  341.         HPivs: {"def":30, "spa":30, "spd":30},
  342.         HPdvs: {"atk":12, "def":14},
  343.     },
  344.     "Psychic": {
  345.         damageTaken: {
  346.             "Bug": 1,
  347.             "Dark": 1,
  348.             "Dragon": 0,
  349.             "Electric": 0,
  350.             "Fairy": 0,
  351.             "Fighting": 2,
  352.             "Fire": 0,
  353.             "Flying": 0,
  354.             "Ghost": 1,
  355.             "Grass": 0,
  356.             "Ground": 0,
  357.             "Ice": 0,
  358.             "Normal": 0,
  359.             "Poison": 0,
  360.             "Psychic": 2,
  361.             "Rock": 0,
  362.             "Steel": 0,
  363.             "Water": 0,
  364.         },
  365.         HPivs: {"atk":30, "spe":30},
  366.         HPdvs: {"def":12},
  367.     },
  368.     "Rock": {
  369.         damageTaken: {
  370.             "Bug": 0,
  371.             "Dark": 0,
  372.             "Dragon": 0,
  373.             "Electric": 0,
  374.             "Fairy": 0,
  375.             "Fighting": 1,
  376.             "Fire": 2,
  377.             "Flying": 2,
  378.             "Ghost": 0,
  379.             "Grass": 1,
  380.             "Ground": 1,
  381.             "Ice": 0,
  382.             "Normal": 2,
  383.             "Poison": 2,
  384.             "Psychic": 0,
  385.             "Rock": 0,
  386.             "Steel": 1,
  387.             "Water": 1,
  388.         },
  389.         HPivs: {"def":30, "spd":30, "spe":30},
  390.         HPdvs: {"atk":13, "def":12},
  391.     },
  392.     "Steel": {
  393.         damageTaken: {
  394.             "Bug": 2,
  395.             "Dark": 0,
  396.             "Dragon": 2,
  397.             "Electric": 0,
  398.             "Fairy": 2,
  399.             "Fighting": 1,
  400.             "Fire": 1,
  401.             "Flying": 2,
  402.             "Ghost": 0,
  403.             "Grass": 2,
  404.             "Ground": 1,
  405.             "Ice": 2,
  406.             "Normal": 2,
  407.             "Poison": 0,
  408.             "Psychic": 2,
  409.             "Rock": 2,
  410.             "Steel": 2,
  411.             "Water": 0,
  412.         },
  413.         HPivs: {"spd":30},
  414.         HPdvs: {"atk":13},
  415.     },
  416.     "Water": {
  417.         damageTaken: {
  418.             "Bug": 0,
  419.             "Dark": 0,
  420.             "Dragon": 0,
  421.             "Electric": 1,
  422.             "Fairy": 0,
  423.             "Fighting": 0,
  424.             "Fire": 2,
  425.             "Flying": 0,
  426.             "Ghost": 0,
  427.             "Grass": 1,
  428.             "Ground": 0,
  429.             "Ice": 2,
  430.             "Normal": 0,
  431.             "Poison": 0,
  432.             "Psychic": 0,
  433.             "Rock": 0,
  434.             "Steel": 2,
  435.             "Water": 2,
  436.         },
  437.         HPivs: {"atk":30, "def":30, "spa":30},
  438.         HPdvs: {"atk":14, "def":13},
  439.     },
  440. };
  441. /*mods/antivaxxers/abilities.js*/
  442. 'use strict';
  443.  
  444. exports.BattleAbilities = {
  445. "arenatrap": {
  446.         inherit: true,
  447.         onFoeTrapPokemon: function (pokemon) {
  448.             if (!this.isAdjacent(pokemon, this.effectData.target)) return;
  449.             if (pokemon.isGrounded() || pokemon.hasType('Flying')) {
  450.                 pokemon.tryTrap(true);
  451.             }
  452.         },
  453.         onFoeMaybeTrapPokemon: function (pokemon, source) {
  454.             if (!source) source = this.effectData.target;
  455.             if (!this.isAdjacent(pokemon, source)) return;
  456.             if (pokemon.isGrounded() || pokemon.hasType('Flying')) {
  457.                 pokemon.maybeTrapped = true;
  458.             }
  459.         },
  460.     },
  461. };
  462. /*mods/antivaxxers/moves.js*/
  463. 'use strict';
  464.  
  465. exports.BattleMovedex = {
  466. skydrop: {
  467.         inherit: true,
  468.         onTryHit: function (target, source, move) {
  469.             if (target.fainted) return false;
  470.             if (source.removeVolatile(move.id)) {
  471.                 if (target !== source.volatiles['twoturnmove'].source) return false;
  472.             } else {
  473.                 if (target.volatiles['substitute'] || target.side === source.side) {
  474.                     return false;
  475.                 }
  476.                 if (target.getWeight() >= 200) {
  477.                     this.add('-fail', target, 'move: Sky Drop', '[heavy]');
  478.                     return null;
  479.                 }
  480.  
  481.                 this.add('-prepare', source, move.name, target);
  482.                 source.addVolatile('twoturnmove', target);
  483.                 return null;
  484.             }
  485.         },
  486.     },
  487. spikes: {
  488.         inherit: true,
  489.         effect: {
  490.             // this is a side condition
  491.             onStart: function (side) {
  492.                 this.add('-sidestart', side, 'Spikes');
  493.                 this.effectData.layers = 1;
  494.             },
  495.             onRestart: function (side) {
  496.                 if (this.effectData.layers >= 3) return false;
  497.                 this.add('-sidestart', side, 'Spikes');
  498.                 this.effectData.layers++;
  499.             },
  500.             onSwitchIn: function (pokemon) {
  501.                 if (!pokemon.isGrounded() && !pokemon.hasType('Flying')) return;
  502.                 let damageAmounts = [0, 3, 4, 6]; // 1/8, 1/6, 1/4
  503.                 this.damage(damageAmounts[this.effectData.layers] * pokemon.maxhp / 24);
  504.             },
  505.         },
  506. },
  507. toxicspikes: {
  508.         inherit: true,
  509.         effect: {
  510.             // this is a side condition
  511.             onStart: function (side) {
  512.                 this.add('-sidestart', side, 'move: Toxic Spikes');
  513.                 this.effectData.layers = 1;
  514.             },
  515.             onRestart: function (side) {
  516.                 if (this.effectData.layers >= 2) return false;
  517.                 this.add('-sidestart', side, 'move: Toxic Spikes');
  518.                 this.effectData.layers++;
  519.             },
  520.             onSwitchIn: function (pokemon) {
  521.                 if (!pokemon.isGrounded() && !pokemon.hasType('Flying')) return;
  522.                 if (!pokemon.runImmunity('Poison')) return;
  523.                 if (pokemon.hasType('Poison')) {
  524.                     this.add('-sideend', pokemon.side, 'move: Toxic Spikes', '[of] ' + pokemon);
  525.                     pokemon.side.removeSideCondition('toxicspikes');
  526.                 } else if (this.effectData.layers >= 2) {
  527.                     pokemon.trySetStatus('tox', pokemon.side.foe.active[0]);
  528.                 } else {
  529.                     pokemon.trySetStatus('psn', pokemon.side.foe.active[0]);
  530.                 }
  531.             },
  532.         },
  533. },
  534. stickyweb: {
  535.         inherit: true,
  536.         effect: {
  537.             onStart: function (side) {
  538.                 this.add('-sidestart', side, 'move: Sticky Web');
  539.             },
  540.             onSwitchIn: function (pokemon) {
  541.                 if (!pokemon.isGrounded() && !pokemon.hasType('Flying')) return;
  542.                 this.add('-activate', pokemon, 'move: Sticky Web');
  543.                 this.boost({spe: -1}, pokemon, pokemon.side.foe.active[0], this.getMove('stickyweb'));
  544.             },
  545.         },
  546. },
  547. leechseed: {
  548.         inherit: true,
  549.         onTryHit: function (target) {
  550.             return undefined;
  551.         },
  552. },
  553. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement