Advertisement
Guest User

Ghoul King's Pet Mod Moves

a guest
Feb 3rd, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exports.BattleMovedex = {
  2. willowisp: {
  3.         inherit: true,
  4.         accuracy: 100
  5.     },
  6. leechseed: {
  7.         inherit: true,
  8.         accuracy: 100
  9.     },
  10. magmastorm: {
  11.         inherit: true,
  12.         accuracy: 100,
  13.         basePower: 80
  14.     },
  15. hyperfang: {
  16.         inherit: true,
  17.         accuracy: 100,
  18.         basePower: 100
  19.     },
  20. skydrop: {
  21.         inherit: true,
  22.         basePower: 75
  23.     },
  24. dragontail: {
  25.         inherit: true,
  26.         accuracy: true
  27.     },
  28. circlethrow: {
  29.         inherit: true,
  30.         accuracy: true
  31.     },
  32. outrage: {
  33.         inherit: true,
  34.         target: "Normal",
  35.         basePower: 150,
  36.         pp: 5,
  37.         self: {
  38.             boosts: {
  39.                 spe: -1,
  40.                 def: -1,
  41.                 spd: -1
  42.             }
  43.         },
  44.     },
  45. petaldance: {
  46.         inherit: true,
  47.         target: "Normal",
  48.         basePower: 150,
  49.         pp: 5,
  50.         self: {
  51.             boosts: {
  52.                 spe: -1,
  53.                 def: -1,
  54.                 spd: -1
  55.             }
  56.         },
  57.     },
  58. thrash: {
  59.         inherit: true,
  60.         target: "Normal",
  61.         basePower: 150,
  62.         pp: 5,
  63.         self: {
  64.             boosts: {
  65.                 spe: -1,
  66.                 def: -1,
  67.                 spd: -1
  68.             }
  69.         },
  70.     },
  71. rage: {
  72.         inherit: true,
  73.         Type: "Dark"
  74.         basePower: 80,
  75.         pp: 20,
  76.         self: {
  77.             boosts: {
  78.                 atk: 1,
  79.                 def: -1,
  80.                 spd: -1
  81.             }
  82.         },
  83.     },
  84. megapunch: {
  85.         inherit: true,
  86.         priority: 1,
  87.         accuracy: 100,
  88.         self: {
  89.             boosts: {
  90.                 def: -1,
  91.                 spd: -1
  92.             }
  93.         },
  94.     },
  95. megakick: {
  96.         inherit: true,
  97.         priority: 1,
  98.         accuracy: 100,
  99.         self: {
  100.             volatileStatus: 'mustrecharge'
  101.         },
  102.     },
  103. crushgrip: {
  104.         inherit: true,
  105.         basePowerCallback: function (pokemon, target) {
  106.             return Math.floor(Math.floor((150 * (100 * Math.floor(target.hp * 4096 / target.maxhp)) + 2048 - 1) / 4096) / 100) || 1;
  107.         },
  108.     },
  109. crushclaw: {
  110.         inherit: true,
  111.         accuracy: 100,
  112.         secondary: {
  113.             chance: 100,
  114.             boosts: {
  115.                 def: -1
  116.             }
  117.         },
  118.     },
  119. stealthrock: {
  120.         inherit: true
  121.         effect: {
  122.             // this is a side condition
  123.             onStart: function (side) {
  124.                 this.add('-sidestart', side, 'move: Stealth Rock');
  125.             },
  126.             onSwitchIn: function (pokemon) {
  127.                 var typeMod = this.clampIntRange(pokemon.runEffectiveness('Rock'), -6, 6);
  128.                 this.damage(pokemon.maxhp * Math.pow(2, typeMod) / 12);
  129.             }
  130.         },
  131.     },
  132. hyperbeam: {
  133.         inherit: true
  134.         accuracy: 100,
  135.         forceSwitch: true
  136.         },
  137. gigaimpact: {
  138.         inherit: true
  139.         accuracy: 100,
  140.         forceSwitch: true
  141.         },
  142. rockwrecker: {
  143.         inherit: true
  144.         accuracy: 100,
  145.         forceSwitch: true
  146.         },
  147. roaroftime: {
  148.         inherit: true
  149.         accuracy: 100,
  150.         forceSwitch: true
  151.         },
  152. hydrocannon: {
  153.         inherit: true
  154.         accuracy: 100,
  155.         forceSwitch: true
  156.         },
  157. blastburn: {
  158.         inherit: true
  159.         accuracy: 100,
  160.         forceSwitch: true
  161.         },
  162. frenzyplant: {
  163.         inherit: true
  164.         accuracy: 100,
  165.         forceSwitch: true
  166.         },
  167. dreameater: {
  168.         inherit: true
  169.         basePower: 120
  170.         },
  171. rockslide: {
  172.         inherit: true
  173.         accuracy: 100
  174.         basePower: 70
  175.         },
  176. airslash: {
  177.         inherit: true
  178.         accuracy: 100
  179.         },
  180. wringout: {
  181.         inherit: true
  182.         type: "Grass"
  183.         },
  184. psychoboost: {
  185.         inherit: true
  186.         accuracy: 100
  187.         },
  188. leafstorm: {
  189.         inherit: true
  190.         accuracy: 100
  191.         },
  192. overheat: {
  193.         inherit: true
  194.         accuracy: 100
  195.         },
  196. dracometeor: {
  197.         inherit: true
  198.         accuracy: 100
  199.         },
  200. spacialrend: {
  201.         inherit: true
  202.         accuracy: 100
  203.         },
  204. firespin: {
  205.         inherit: true
  206.         accuracy: 100
  207.         },
  208. wrap: {
  209.         inherit: true
  210.         accuracy: 100
  211.         },
  212. clamp: {
  213.         inherit: true
  214.         accuracy: 100
  215.         },
  216. bind: {
  217.         inherit: true
  218.         accuracy: 100
  219.         },
  220. whirlpool: {
  221.         inherit: true
  222.         accuracy: 100
  223.         },
  224. sandtomb: {
  225.         inherit: true
  226.         accuracy: 100
  227.         },
  228. crabhammer: {
  229.         inherit: true
  230.         accuracy: 100
  231.         },
  232. superfang: {
  233.         inherit: true
  234.         accuracy: 100
  235.         },
  236. sacredfire: {
  237.         inherit: true
  238.         accuracy: 100
  239.         },
  240. aeroblast: {
  241.         inherit: true
  242.         accuracy: 100
  243.         },
  244. dynamicpunch: {
  245.         inherit: true
  246.         basePower: 110
  247.         },
  248. meteormash: {
  249.         inherit: true
  250.         accuracy: 100
  251.         },
  252. firefang: {
  253.         inherit: true
  254.         accuracy: 100
  255.         },
  256. thunderfang: {
  257.         inherit: true
  258.         accuracy: 100
  259.         },
  260. icefang: {
  261.         inherit: true
  262.         accuracy: 100
  263.         },
  264. zenheadbutt: {
  265.         inherit: true
  266.         accuracy: 100
  267.         },
  268. drillrun: {
  269.         inherit: true
  270.         accuracy: 100
  271.         },
  272. aircutter: {
  273.         inherit: true
  274.         accuracy: 100
  275.         },
  276. snarl: {
  277.         inherit: true
  278.         accuracy: 100
  279.         },
  280. cometpunch: {
  281.         inherit: true
  282.         accuracy: 100,
  283.         basePower: 25
  284.         },
  285. hypervoice: {
  286.         inherit: true
  287.         basePower: 100
  288.         },
  289. playrough: {
  290.         inherit: true
  291.         accuracy: 100,
  292.         basePower: 85
  293.         },
  294. iciclecrash: {
  295.         inherit: true
  296.         accuracy: 100,
  297.         basePower: 80
  298.         },
  299. spikecannon: {
  300.         inherit: true
  301.         priority: 1
  302.         },
  303. paraboliccharge: {
  304.         inherit: true
  305.         basepower: 65
  306.         },
  307. belch: {
  308.         inherit: true
  309.         accuracy: 100,
  310.         basePower: 135
  311.         },
  312. selfdestruct: {
  313.         inherit: true
  314.         basePower: 180
  315.         type: "Fire"
  316.         },
  317. octazooka: {
  318.         inherit: true
  319.         accuracy: 100,
  320.         priority: 1,
  321.         basePower: 80,
  322.         self: {
  323.             boosts: {
  324.             spa: -2
  325.             }
  326.         },
  327.     },
  328. quash: {
  329.         inherit: true
  330.         priority: 1
  331.         },
  332. blazekick: {
  333.     inherit: true
  334.     onEffectiveness: function (typeMod, type, move) {
  335.             return typeMod + this.getEffectiveness('Fighting', type);
  336.         },
  337.     },
  338. skullbash: {
  339.         inherit: true
  340.         secondary: {
  341.         boosts: {
  342.         def: -2
  343.         }
  344.     },
  345. },
  346. razorwind: {
  347.         inherit: true
  348.         basePower: 120,
  349.         accuracy: 100,
  350.         onHit: function (target) {
  351.             target.clearBoosts();
  352.             this.add('-clearboost', target);
  353.         },
  354.     },
  355. quickguard: {
  356.         inherit: true
  357.         priority: 4
  358.         },
  359. craftyshield :{
  360.         inherit: true
  361.         sideCondition: 'craftyshield',
  362.         onTryHitSide: function (side, source) {
  363.             return !!this.willAct();
  364.         },
  365.         effect: {
  366.             duration: 3,
  367.             onStart: function (target, source) {
  368.                 this.add('-singleturn', source, 'Crafty Shield');
  369.             },
  370.             onTryHitPriority: 3,
  371.             onTryHit: function (target, source, move) {
  372.                 if (move.breaksProtect) {
  373.                     target.side.removeSideCondition('craftyshield');
  374.                     return;
  375.                 }
  376.                 if (move && (move.target === 'self' || move.category !== 'Status')) return;
  377.                 this.add('-activate', target, 'Crafty Shield');
  378.                 return null;
  379.             }
  380.         },
  381.     },
  382. iondeluge: {
  383.         inherit: true
  384.         pseudoWeather: 'iondeluge',
  385.         effect: {
  386.             duration: 4,
  387.             onStart: function (target) {
  388.                 this.add('-fieldactivate', 'move: Ion Deluge');
  389.             },
  390.             onModifyMovePriority: -2,
  391.             onModifyMove: function (move) {
  392.                 if (move.type === 'Normal') {
  393.                     move.type = 'Electric';
  394.                     this.debug(move.name + "'s type changed to Electric");
  395.                 }
  396.             }
  397.         },
  398.     },
  399. bonemerang: {
  400.         inherit: true
  401.         accuracy: 100,
  402.         basePower: 45,
  403.         onEffectiveness: function (typeMod, type) {
  404.             if (type === 'Flying') return 1;
  405.             if (move.type !== 'Ground') return;
  406.             var target = this.activeTarget;
  407.             // only the attack that grounds the target ignores effectiveness
  408.             // if called from a chat plugin, don't ignore effectiveness
  409.             if (!this.runEvent || !this.runEvent('NegateImmunity', target, 'Ground')) return;
  410.             if (!this.getImmunity('Ground', target)) return 0;
  411.         },
  412.     },
  413. bonerush: {
  414.         inherit: true
  415.         accuracy: 100,
  416.         onEffectiveness: function (typeMod, type, move) {
  417.             if (move.type !== 'Ground') return;
  418.             var target = this.activeTarget;
  419.             // only the attack that grounds the target ignores effectiveness
  420.             // if called from a chat plugin, don't ignore effectiveness
  421.             if (!this.runEvent || !this.runEvent('NegateImmunity', target, 'Ground')) return;
  422.             if (!this.getImmunity('Ground', target)) return 0;
  423.         },
  424.     },
  425. boneclub: {
  426.         inherit: true
  427.         accuracy: 100,
  428.         onEffectiveness: function (typeMod, type, move) {
  429.             if (move.type !== 'Ground') return;
  430.             var target = this.activeTarget;
  431.             // only the attack that grounds the target ignores effectiveness
  432.             // if called from a chat plugin, don't ignore effectiveness
  433.             if (!this.runEvent || !this.runEvent('NegateImmunity', target, 'Ground')) return;
  434.             if (!this.getImmunity('Ground', target)) return 0;
  435.         },
  436.         volatileStatus: 'smackdown',
  437.         effect: {
  438.             onStart: function (pokemon) {
  439.                 var applies = false;
  440.                 if (pokemon.hasType('Flying') || pokemon.hasAbility('levitate')) applies = true;
  441.                 if (pokemon.hasItem('ironball') || pokemon.volatiles['ingrain'] || this.getPseudoWeather('gravity')) applies = false;
  442.                 if (pokemon.removeVolatile('fly') || pokemon.removeVolatile('bounce')) {
  443.                     applies = true;
  444.                     this.cancelMove(pokemon);
  445.                     pokemon.removeVolatile('twoturnmove');
  446.                 }
  447.                 if (pokemon.volatiles['magnetrise']) {
  448.                     applies = true;
  449.                     delete pokemon.volatiles['magnetrise'];
  450.                 }
  451.                 if (pokemon.volatiles['telekinesis']) {
  452.                     applies = true;
  453.                     delete pokemon.volatiles['telekinesis'];
  454.                 }
  455.                 if (!applies) return false;
  456.                 this.add('-start', pokemon, 'Smack Down');
  457.             },
  458.             onRestart: function (pokemon) {
  459.                 if (pokemon.removeVolatile('fly') || pokemon.removeVolatile('bounce')) {
  460.                     this.cancelMove(pokemon);
  461.                     this.add('-start', pokemon, 'Smack Down');
  462.                 }
  463.             },
  464.             onNegateImmunity: function (pokemon, type) {
  465.                 if (type === 'Ground') return false;
  466.             }
  467.         },
  468.     },
  469. acidspray: {
  470.         inherit: true
  471.         onEffectiveness: function (typeMod, type) {
  472.             if (type === 'Steel') return 1;
  473.         },
  474.     },
  475. acid: {
  476.         inherit: true
  477.         basePower: 65,
  478.         secondary: {
  479.             chance: 20,
  480.             boosts: {
  481.                 spd: -1
  482.             }
  483.         },
  484.         onEffectiveness: function (typeMod, type) {
  485.             if (type === 'Steel') return 1;
  486.         },
  487.     },
  488. waterspout: {
  489.         inherit: true
  490.         basePower: 140,
  491.         basePowerCallback: function (pokemon) {
  492.             return 140 * pokemon.hp / pokemon.maxhp;
  493.         },
  494.     },
  495. eruption: {
  496.         inherit: true
  497.         basePower: 140,
  498.         basePowerCallback: function (pokemon) {
  499.             return 140 * pokemon.hp / pokemon.maxhp;
  500.         },
  501.     },
  502. chargebeam: {
  503.         inherit: true
  504.         accuracy: 100,
  505.         basePower: 40,
  506.         self: {
  507.             boost: {
  508.             spa: 1
  509.             }
  510.         },
  511.     },
  512. slash: {
  513.         inherit: true
  514.         basePower: 65,
  515.         willCrit: true
  516.         },
  517. muddywater: {
  518.         inherit: true
  519.         basePower: 80,
  520.         accuracy: 100,
  521.         secondary: {
  522.             chance: 100,
  523.             boosts: {
  524.                 spe: -1
  525.             }
  526.         },
  527.     },
  528. nightdaze: {
  529.         inherit: true
  530.         basePower: 80,
  531.         accuracy: 100,
  532.         selfSwitch: true,
  533.         secondary: false
  534.         },
  535. relicsong: {
  536.         inherit: true
  537.         basePower: 60,
  538.         volatileStatus: 'yawn',
  539.         onTryHit: function (target) {
  540.             if (target.status || !target.runImmunity('slp')) {
  541.                 return false;
  542.             }
  543.         },
  544.         effect: {
  545.             noCopy: true, // doesn't get copied by Baton Pass
  546.             duration: 2,
  547.             onStart: function (target, source) {
  548.                 this.add('-start', target, 'move: Yawn', '[of] ' + source);
  549.             },
  550.             onEnd: function (target) {
  551.                 this.add('-end', target, 'move: Yawn', '[silent]');
  552.                 target.trySetStatus('slp');
  553.             }
  554.         },
  555.     },
  556. mysticalfire: {
  557.         inherit: true
  558.         secondary: {
  559.             chance: 100,
  560.             boosts: {
  561.                 spa: -1
  562.                 spd: -1
  563.             }
  564.         },
  565.     },
  566. drillpeck: {
  567.         inherit: true
  568.         critRatio: 2
  569.         },
  570. rocksmash: {
  571.         inherit: true
  572.         secondary: {
  573.             chance: 100,
  574.             boosts: {
  575.                 def: -1
  576.             }
  577.         },
  578.     },
  579. poisontail: {
  580.         inherit: true
  581.         basePower: 60
  582.         secondary: {
  583.             chance: 30
  584.             status: psn
  585.             },
  586.         },
  587. payback: {
  588.         inherit: true
  589.         basePower: 65,
  590.         basePowerCallback: function (pokemon, target) {
  591.             if (target.newlySwitched) {
  592.                 this.debug('Payback NOT boosted on a switch');
  593.                 return 65;
  594.             }
  595.             if (this.willMove(target)) {
  596.                 this.debug('Payback NOT boosted');
  597.                 return 65;
  598.             }
  599.             this.debug('Payback damage boost');
  600.             return 130;
  601.         },
  602.     },
  603. punishment: {
  604.         inherit: true
  605.         basePower: 0,
  606.         basePowerCallback: function (pokemon, target) {
  607.             return 60 + 30 * target.positiveBoosts();
  608.         },
  609.     },
  610. razorshell: {
  611.         inherit: true
  612.         accuracy: 100,
  613.         secondary: {
  614.             chance: 100,
  615.             boosts: {
  616.                 def: -1
  617.             }
  618.         },
  619.         },
  620. diamondstorm: {
  621.         inherit: true
  622.         accuracy: 100,
  623.         secondary: {
  624.         self:
  625.             chance: 100
  626.             boosts: {
  627.             def: 1
  628.         }
  629.     }
  630. },
  631. fellstinger: {
  632.         inherit: true
  633.         basePower: 20,
  634.         priority: 1
  635.         },
  636. landswrath: {
  637.         inherit: true
  638.         onHit: function (target) {
  639.             target.clearBoosts();
  640.             this.add('-clearboost', target);
  641.         },
  642.     },
  643. mistball: {
  644.         inherit: true
  645.         secondary: {
  646.             chance: 100,
  647.             boosts: {
  648.                 spa: -1
  649.             }
  650.         },
  651.     },
  652. lusterpurge: {
  653.         inherit: true
  654.         secondary: {
  655.             chance: 100,
  656.             boosts: {
  657.                 spd: -1
  658.             }
  659.         },
  660.     },
  661. wideguard: {
  662.         inherit: true
  663.         effect: {
  664.             duration: 1,
  665.             onStart: function (target, source) {
  666.                 this.add('-singleturn', source, 'Wide Guard');
  667.             },
  668.             onTryHitPriority: 4,
  669.             onTryHit: function (target, source, effect) {
  670.                 // Wide Guard blocks damaging spread moves
  671.                 if (effect && (effect.target !== 'allAdjacent' && effect.target !== 'allAdjacentFoes')) {
  672.                     return;
  673.                 }
  674.                 this.add('-activate', target, 'Wide Guard');
  675.                 var lockedmove = source.getVolatile('lockedmove');
  676.                 if (lockedmove) {
  677.                     // Outrage counter is reset
  678.                     if (source.volatiles['lockedmove'].duration === 2) {
  679.                         delete source.volatiles['lockedmove'];
  680.                     }
  681.                 }
  682.                 return null;
  683.             }
  684.         },
  685.     },
  686. grassyterrain: {
  687.         inherit: true
  688.         effect: {
  689.             duration: 5,
  690.             onBasePower: function (basePower, attacker, defender, move) {
  691.                 var weakenedMoves = {'earthquake':1, 'bulldoze':1, 'magnitude':1};
  692.                 if (move.id in weakenedMoves) {
  693.                     this.debug('move weakened by grassy terrain');
  694.                     return this.chainModify(0.5);
  695.                 }
  696.                 if (Pokemon.hasType === ('Grass') && attacker.isGrounded()) {
  697.                     this.debug('grassy terrain boost');
  698.                     return this.chainModify(1.3);
  699.                 }
  700.             },
  701.             onStart: function (target, source) {
  702.                 this.add('-fieldstart', 'move: Grassy Terrain');
  703.             },
  704.             onResidualOrder: 5,
  705.             onResidualSubOrder: 2,
  706.             onResidual: function (battle) {
  707.                 this.debug('onResidual battle');
  708.                 var pokemon;
  709.                 for (var s in battle.sides) {
  710.                     for (var p in battle.sides[s].active) {
  711.                         pokemon = battle.sides[s].active[p];
  712.                         if (pokemon.isGrounded() && !pokemon.isSemiInvulnerable()) {
  713.                             this.debug('Pokemon is grounded, healing through Grassy Terrain.');
  714.                             this.heal(pokemon.maxhp / 8, pokemon, pokemon);
  715.                         }
  716.                     }
  717.                 }
  718.             },
  719.             onEnd: function () {
  720.                 this.add('-fieldend', 'move: Grassy Terrain');
  721.             }
  722.         },
  723.     },
  724. mistyterrain: {
  725.         inherit: true
  726.         effect: {
  727.             duration: 5,
  728.             onSetStatus: function (status, target, source, effect) {
  729.                 if (!target.isGrounded() || target.isSemiInvulnerable()) return;
  730.                 this.debug('misty terrain preventing status');
  731.                 return false;
  732.             },
  733.             onBasePower: function (basePower, attacker, defender, move) {
  734.                 if (pokemon.hasType === ('Dragon') && defender.isGrounded() && !defender.isSemiInvulnerable()) {
  735.                     this.debug('misty terrain weaken');
  736.                     return this.chainModify(0.5);
  737.                 }
  738.             },
  739.             onStart: function (side) {
  740.                 this.add('-fieldstart', 'Misty Terrain');
  741.             },
  742.             onResidualOrder: 21,
  743.             onResidualSubOrder: 2,
  744.             onEnd: function (side) {
  745.                 this.add('-fieldend', 'Misty Terrain');
  746.             }
  747.         },
  748.     },
  749. electricterrain: {
  750.         inherit: true
  751.         effect: {
  752.             duration: 5,
  753.             onSetStatus: function (status, target, source, effect) {
  754.                 if (status.id === 'slp' && target.isGrounded() && !target.isSemiInvulnerable()) {
  755.                     this.debug('Interrupting sleep from Electric Terrain');
  756.                     return false;
  757.                 }
  758.             },
  759.             onTryHit: function (target, source, move) {
  760.                 if (!target.isGrounded() || target.isSemiInvulnerable()) return;
  761.                 if (move && move.id === 'yawn') {
  762.                     return false;
  763.                 }
  764.             },
  765.             onBasePower: function (basePower, attacker, defender, move) {
  766.                 if (pokemon.hasType === ('Electric') && attacker.isGrounded() && !attacker.isSemiInvulnerable()) {
  767.                     this.debug('electric terrain boost');
  768.                     return this.chainModify(1.3);
  769.                 }
  770.             },
  771.             onUpdate: function (pokemon) {
  772.             if (pokemon.status === 'slp'&& target.isGrounded() && !target.isSemiInvulnerable()) {
  773.                 pokemon.cureStatus();
  774.             }
  775.         },
  776.             onStart: function () {
  777.                 this.add('-fieldstart', 'move: Electric Terrain');
  778.             },
  779.             onResidualOrder: 21,
  780.             onResidualSubOrder: 2,
  781.             onEnd: function () {
  782.                 this.add('-fieldend', 'move: Electric Terrain');
  783.             }
  784.         },
  785.     },
  786. teleport: {
  787.         inherit: true
  788.         onTryHit: function (pokemon, target, move) {
  789.             if (move.id === 'pursuit') {
  790.                 this.add('-immune', pokemon, '[msg]');
  791.                 return null;
  792.             },
  793.         },
  794.         priority: 1,
  795.         selfSwitch: true,
  796.         },
  797. present: {
  798.         inherit: true
  799.         category: "Status",
  800.         priority: 3,
  801.         effect: {
  802.             duration: 1,
  803.             onStart: function (target) {
  804.                 this.add('-start', target, 'Present');
  805.             },
  806.             onTryMove: function (pokemon, target, move) {
  807.                 if (move.category === 'Status') {
  808.                     this.add('-activate', pokemon, 'Present');
  809.                     this.damage(this.clampIntRange(Math.round(pokemon.maxhp / 2), 1));
  810.                     return false;
  811.                 }
  812.             }
  813.         },
  814.     },
  815. ominouswind: {
  816.         inherit: true
  817.         priority: -3,
  818.         beforeTurnCallback: function (pokemon) {
  819.             pokemon.addVolatile('ominouswind');
  820.         },
  821.         beforeMoveCallback: function (pokemon) {
  822.             if (!pokemon.removeVolatile('ominouswind')) {
  823.                 return false;
  824.             }
  825.             if (pokemon.lastAttackedBy && pokemon.lastAttackedBy.thisTurn && pokemon.lastAttackedBy.damage > 0 && this.getMove(pokemon.lastAttackedBy.move).category !== 'Status') {
  826.                 this.add('cant', pokemon, 'Ominous Wind', 'Ominous Wind');
  827.                 return true;
  828.             }
  829.         },
  830.         effect: {
  831.             duration: 1,
  832.             onStart: function (pokemon) {
  833.                 this.add('-singleturn', pokemon, 'move: Ominous Wind');
  834.             }
  835.         },
  836.     secondary: {
  837.             chance: 100,
  838.             self: {
  839.                 boosts: {
  840.                     atk: 1,
  841.                     def: 1,
  842.                     spa: 1,
  843.                     spd: 1,
  844.                     spe: 1
  845.                 }
  846.             },
  847.         },
  848.     },
  849. silverwind: {
  850.         inherit: true
  851.         priority: -3,
  852.         beforeTurnCallback: function (pokemon) {
  853.             pokemon.addVolatile('silverwind');
  854.         },
  855.         beforeMoveCallback: function (pokemon) {
  856.             if (!pokemon.removeVolatile('silverwind')) {
  857.                 return false;
  858.             }
  859.             if (pokemon.lastAttackedBy && pokemon.lastAttackedBy.thisTurn && pokemon.lastAttackedBy.damage > 0 && this.getMove(pokemon.lastAttackedBy.move).category !== 'Status') {
  860.                 this.add('cant', pokemon, 'Silver Wind', 'Silver Wind');
  861.                 return true;
  862.             }
  863.         },
  864.         effect: {
  865.             duration: 1,
  866.             onStart: function (pokemon) {
  867.                 this.add('-singleturn', pokemon, 'move: Silver Wind');
  868.             }
  869.         },
  870.     secondary: {
  871.             chance: 100,
  872.             self: {
  873.                 boosts: {
  874.                     atk: 1,
  875.                     def: 1,
  876.                     spa: 1,
  877.                     spd: 1,
  878.                     spe: 1
  879.                 }
  880.             },
  881.         },
  882.     },
  883. ancientpower: {
  884.         inherit: true
  885.         priority: -3
  886.         beforeTurnCallback: function (pokemon) {
  887.             pokemon.addVolatile('ancientpower');
  888.         },
  889.         beforeMoveCallback: function (pokemon) {
  890.             if (!pokemon.removeVolatile('ancientpower')) {
  891.                 return false;
  892.             }
  893.             if (pokemon.lastAttackedBy && pokemon.lastAttackedBy.thisTurn && pokemon.lastAttackedBy.damage > 0 && this.getMove(pokemon.lastAttackedBy.move).category !== 'Status') {
  894.                 this.add('cant', pokemon, 'Ancient Power', 'Ancient Power');
  895.                 return true;
  896.             }
  897.         },
  898.         effect: {
  899.             duration: 1,
  900.             onStart: function (pokemon) {
  901.                 this.add('-singleturn', pokemon, 'move: Ancient Power');
  902.             }
  903.         },
  904.     secondary: {
  905.             chance: 100,
  906.             self: {
  907.                 boosts: {
  908.                     atk: 1,
  909.                     def: 1,
  910.                     spa: 1,
  911.                     spd: 1,
  912.                     spe: 1
  913.                 }
  914.             },
  915.         },
  916.     },
  917. endure: {
  918.         inherit: true
  919.         onTryHit: function (pokemon) {
  920.             return this.willAct() && this.runEvent('StallMove', pokemon);
  921.         },
  922.         onHit: function (pokemon) {
  923.             pokemon.addVolatile('stall');
  924.         },
  925.         effect: {
  926.             duration: 1,
  927.             onStart: function (target) {
  928.                 this.add('-singleturn', target, 'move: Endure');
  929.             },
  930.             onDamagePriority: -10,
  931.             onDamage: function (damage, target, source, effect) {
  932.                 if (effect && effect.effectType === 'Move' && damage >= target.hp) {
  933.                     this.add('-activate', target, 'move: Endure');
  934.                     return target.hp - 1;
  935.                     this.boost({spe:1});
  936.                 }
  937.             }
  938.         },
  939.     },
  940. charge: {
  941.         inherit: true
  942.         effect: {
  943.             onBasePowerPriority: 3,
  944.             onBasePower: function (basePower, attacker, defender, move) {
  945.                 if (move.type === 'Electric') {
  946.                     this.debug('charge boost');
  947.                     return this.chainModify(2);
  948.                 }
  949.             }
  950.         },
  951.     },
  952. aromaticmist: {
  953.         inherit: true
  954.         target: "AllySide",
  955.         },
  956. uproar: {
  957.         inherit: true
  958.         basePower: 80,
  959.         sleepUsable: true,
  960.         target: "Normal",
  961.         onBasePower: function (basePower, pokemon) {
  962.             if (pokemon.status && pokemon.status == 'slp') {
  963.                 return this.chainModify(2);
  964.             }
  965.         },
  966.     },
  967. swallow: {
  968.         inherit: true
  969.         onTryHit: true,
  970.         onHit: function (pokemon) {
  971.             var healAmount = [0.20, 0.40, 0.60, 0.80];
  972.             this.heal(this.modify(pokemon.maxhp, healAmount[(pokemon.volatiles['stockpile'].layers)]));
  973.         },
  974.     },
  975. spitup: {
  976.         inherit: true
  977.         basePower: 0,
  978.         basePowerCallback: function (pokemon) {
  979.             return 50 + pokemon.volatiles['stockpile'].layers * 50
  980.         },
  981.         onTry: true,
  982.         onAfterMove: false,
  983.     },
  984. flyingpress: {
  985.         inherit: true
  986.         accuracy: 100,
  987.         onEffectiveness: function (typeMod, type) {
  988.             if (type === 'Bug') return 1;
  989.             if (type === 'Grass') return 1;
  990.             if (type === 'Fighting') return 1;
  991.         },
  992.     },
  993. nightmare: {
  994.         inherit: true
  995.         effect: {
  996.             duration: 5,
  997.         onResidualOrder: 26,
  998.         onResidualSubOrder: 1,
  999.         onResidual: function (pokemon) {
  1000.             if (!pokemon.hp) return;
  1001.             for (var i = 0; i < pokemon.side.foe.active.length; i++) {
  1002.                 var target = pokemon.side.foe.active[i];
  1003.                 if (!target || !target.hp) continue;
  1004.                 if (target.status === 'slp') {
  1005.                     this.damage(target.maxhp / 4, target);
  1006.                 }
  1007.             }
  1008.         },
  1009.     onStart: function (side) {
  1010.                 this.add('-sidestart', side, 'move: Nightmare');
  1011.             },
  1012.             onResidualOrder: 21,
  1013.             onResidualSubOrder: 1,
  1014.             onEnd: function (side) {
  1015.                 this.add('-sideend', side, 'move: Nightmare');
  1016.             }
  1017.         },
  1018.     },
  1019. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement