Guest User

PS! Linked moves.js

a guest
Jul 13th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* mods/linked/moves.js */
  2.  
  3. 'use strict';
  4.  
  5. exports.BattleMovedex = {
  6.     /**
  7.      * Artificial priority
  8.      *
  9.      */
  10.     pursuit: {
  11.         inherit: true,
  12.         beforeTurnCallback: function (pokemon, target) {
  13.             let linkedMoves = pokemon.getLinkedMoves();
  14.             if (linkedMoves.length && !linkedMoves.disabled) {
  15.                 if (linkedMoves[0] === 'pursuit' && linkedMoves[1] !== 'pursuit') return;
  16.                 if (linkedMoves[0] !== 'pursuit' && linkedMoves[1] === 'pursuit') return;
  17.             }
  18.  
  19.             target.side.addSideCondition('pursuit', pokemon);
  20.             if (!target.side.sideConditions['pursuit'].sources) {
  21.                 target.side.sideConditions['pursuit'].sources = [];
  22.             }
  23.             target.side.sideConditions['pursuit'].sources.push(pokemon);
  24.         },
  25.     },
  26.     mefirst: {
  27.         inherit: true,
  28.         onHit: function (target, pokemon) {
  29.             let decision = this.willMove(target);
  30.             if (!decision) return false;
  31.             let noMeFirst = {
  32.                 chatter:1, counter:1, covet:1, focuspunch:1, mefirst:1, metalburst:1, mirrorcoat:1, struggle:1, thief:1,
  33.             };
  34.             // Mod-specific: Me First copies the first move in the link
  35.             let move = this.getMove(decision.linked ? decision.linked[0] : decision.move);
  36.             if (move.category !== 'Status' && !noMeFirst[move]) {
  37.                 pokemon.addVolatile('mefirst');
  38.                 this.useMove(move, pokemon);
  39.                 return;
  40.             }
  41.             return false;
  42.         },
  43.     },
  44.     quash: {
  45.         inherit: true,
  46.         // Mod-specific: default mechanics
  47.     },
  48.  
  49.     /**
  50.      *  Sucker Punch
  51.      *  Will miss on two linked Status moves
  52.      *
  53.      */
  54.  
  55.     suckerpunch: {
  56.         inherit: true,
  57.         onTry: function (source, target) {
  58.             let decision = this.willMove(target);
  59.             if (!decision || decision.choice !== 'move') {
  60.                 this.add('-fail', source);
  61.                 return false;
  62.             }
  63.             if (target.volatiles['mustrecharge'] && target.volatiles['mustrecharge'].duration < 2) {
  64.                 // Duration may not be lower than 2 if Sucker Punch is used as a low-priority move
  65.                 // i.e. if Sucker Punch is linked with a negative priority move
  66.                 this.add('-fail', source);
  67.                 return false;
  68.             }
  69.             if (!decision.linked) {
  70.                 if (decision.move.category !== 'Status' || decision.move.id === 'mefirst') return;
  71.                 this.add('-fail', source);
  72.                 return false;
  73.             }
  74.  
  75.             for (let i = 0; i < decision.linked.length; i++) {
  76.                 let linkedMove = this.getMove(decision.linked[i]);
  77.                 if (linkedMove.category !== 'Status' || linkedMove.id === 'mefirst') return;
  78.             }
  79.             this.add('-fail', source);
  80.             return false;
  81.         },
  82.     },
  83.  
  84.  
  85.     /**
  86.      * Pledges
  87.      * If two Pledge moves are linked, the joint effect is triggered
  88.      *
  89.      **/
  90.  
  91.     firepledge: {
  92.         inherit: true,
  93.         // Mod-specific: default mechanics
  94.     },
  95.     grasspledge: {
  96.         inherit: true,
  97.         // Mod-specific: default mechanics
  98.     },
  99.     waterpledge: {
  100.         inherit: true,
  101.         // Mod-specific: default mechanics
  102.     },
  103.  
  104.     /**
  105.      * Mimic and Sketch
  106.      * When any of them is linked, the link will get updated for the new move
  107.      * They will copy the last absolute single move used by the foe.
  108.      *
  109.      **/
  110.  
  111.     sketch: {
  112.         inherit: true,
  113.         onHit: function (target, source) {
  114.             let disallowedMoves = {chatter:1, sketch:1, struggle:1};
  115.             let lastMove = target.getLastMoveAbsolute();
  116.             if (source.transformed || !lastMove || disallowedMoves[lastMove] || source.moves.indexOf(lastMove) !== -1) return false;
  117.             let moveslot = source.moves.indexOf('sketch');
  118.             if (moveslot === -1) return false;
  119.             let move = Tools.getMove(lastMove);
  120.             let sketchedMove = {
  121.                 move: move.name,
  122.                 id: move.id,
  123.                 pp: move.pp,
  124.                 maxpp: move.pp,
  125.                 target: move.target,
  126.                 disabled: false,
  127.                 used: false,
  128.             };
  129.             source.moveset[moveslot] = sketchedMove;
  130.             source.baseMoveset[moveslot] = sketchedMove;
  131.             source.moves[moveslot] = toId(move.name);
  132.             this.add('-activate', source, 'move: Sketch', move.name);
  133.         },
  134.     },
  135.     mimic: {
  136.         inherit: true,
  137.         onHit: function (target, source) {
  138.             let disallowedMoves = {chatter:1, mimic:1, sketch:1, struggle:1, transform:1};
  139.             let lastMove = target.getLastMoveAbsolute();
  140.             if (source.transformed || !lastMove || disallowedMoves[lastMove] || source.moves.indexOf(lastMove) !== -1) return false;
  141.             let moveslot = source.moves.indexOf('mimic');
  142.             if (moveslot === -1) return false;
  143.             let move = Tools.getMove(lastMove);
  144.             source.moveset[moveslot] = {
  145.                 move: move.name,
  146.                 id: move.id,
  147.                 pp: move.pp,
  148.                 maxpp: move.pp,
  149.                 target: move.target,
  150.                 disabled: false,
  151.                 used: false,
  152.             };
  153.             source.moves[moveslot] = toId(move.name);
  154.             this.add('-start', source, 'Mimic', move.name);
  155.         },
  156.     },
  157.  
  158.     /**
  159.      * Copycat and Mirror Move
  160.      * Copy/call the last absolute move used by the target
  161.      *
  162.      */
  163.  
  164.     copycat: {
  165.         inherit: true,
  166.         onHit: function (pokemon) {
  167.             let noCopycat = {assist:1, bestow:1, chatter:1, circlethrow:1, copycat:1, counter:1, covet:1, destinybond:1, detect:1, dragontail:1, endure:1, feint:1, focuspunch:1, followme:1, helpinghand:1, mefirst:1, metronome:1, mimic:1, mirrorcoat:1, mirrormove:1, naturepower:1, protect:1, ragepowder:1, roar:1, sketch:1, sleeptalk:1, snatch:1, struggle:1, switcheroo:1, thief:1, transform:1, trick:1, whirlwind:1};
  168.             let lastMove = pokemon.getLastMoveAbsolute();
  169.             if (!lastMove || noCopycat[lastMove]) return false;
  170.             this.useMove(lastMove, pokemon);
  171.         },
  172.     },
  173.     mirrormove: {
  174.         inherit: true,
  175.         onTryHit: function (target) {
  176.             let lastMove = target.getLastMoveAbsolute();
  177.             if (!lastMove || !this.getMove(lastMove).flags['mirror']) {
  178.                 return false;
  179.             }
  180.         },
  181.         onHit: function (target, source) {
  182.             this.useMove(target.getLastMoveAbsolute(), source);
  183.         },
  184.     },
  185.  
  186.     /**
  187.      * Disable, Encore and Torment
  188.      * Disabling effects
  189.      *
  190.      */
  191.  
  192.     disable: {
  193.         inherit: true,
  194.         effect: {
  195.             duration: 4,
  196.             noCopy: true, // doesn't get copied by Baton Pass
  197.             onStart: function (pokemon) {
  198.                 let lastMove = pokemon.getLastMoveAbsolute();
  199.                 if (!this.willMove(pokemon)) {
  200.                     this.effectData.duration++;
  201.                 }
  202.                 if (!lastMove) {
  203.                     this.debug('pokemon hasn\'t moved yet');
  204.                     return false;
  205.                 }
  206.                 let moves = pokemon.moveset;
  207.                 for (let i = 0; i < moves.length; i++) {
  208.                     if (moves[i].id === lastMove) {
  209.                         if (!moves[i].pp) {
  210.                             this.debug('Move out of PP');
  211.                             return false;
  212.                         } else {
  213.                             this.add('-start', pokemon, 'Disable', moves[i].move);
  214.                             this.effectData.move = lastMove;
  215.                             return;
  216.                         }
  217.                     }
  218.                 }
  219.                 this.debug('Move doesn\'t exist ???');
  220.                 return false;
  221.             },
  222.             onResidualOrder: 14,
  223.             onEnd: function (pokemon) {
  224.                 this.add('-end', pokemon, 'Disable');
  225.             },
  226.             onBeforeMovePriority: 7,
  227.             onBeforeMove: function (attacker, defender, move) {
  228.                 if (move.id === this.effectData.move) {
  229.                     this.add('cant', attacker, 'Disable', move);
  230.                     return false;
  231.                 }
  232.             },
  233.             onDisableMove: function (pokemon) {
  234.                 let moves = pokemon.moveset;
  235.                 for (let i = 0; i < moves.length; i++) {
  236.                     if (moves[i].id === this.effectData.move) {
  237.                         pokemon.disableMove(moves[i].id);
  238.                     }
  239.                 }
  240.             },
  241.         },
  242.     },
  243.     encore: {
  244.         inherit: true,
  245.         effect: {
  246.             duration: 3,
  247.             onStart: function (target) {
  248.                 let noEncore = {encore:1, mimic:1, mirrormove:1, sketch:1, struggle:1, transform:1};
  249.                 let lastMove = target.getLastMoveAbsolute();
  250.                 let moveIndex = target.moves.indexOf(lastMove);
  251.                 if (!lastMove) {
  252.                     // it failed
  253.                     delete target.volatiles['encore'];
  254.                     return false;
  255.                 }
  256.                 if (target.hasLinkedMove(lastMove)) {
  257.                     // TODO: Check instead whether the last executed move was linked
  258.                     let linkedMoves = target.getLinkedMoves();
  259.                     if (noEncore[linkedMoves[0]] || noEncore[linkedMoves[1]] || target.moveset[0].pp <= 0 || target.moveset[1].pp <= 0) {
  260.                         // it failed
  261.                         delete target.volatiles['encore'];
  262.                         return false;
  263.                     }
  264.                     this.effectData.move = linkedMoves;
  265.                 } else {
  266.                     if (noEncore[lastMove] || (target.moveset[moveIndex] && target.moveset[moveIndex].pp <= 0)) {
  267.                         // it failed
  268.                         delete target.volatiles['encore'];
  269.                         return false;
  270.                     }
  271.                     this.effectData.move = lastMove;
  272.                 }
  273.                 this.effectData.turnsActivated = {};
  274.                 this.add('-start', target, 'Encore');
  275.                 if (!this.willMove(target)) {
  276.                     this.effectData.duration++;
  277.                 }
  278.             },
  279.             onOverrideDecision: function (pokemon, target, move) {
  280.                 if (!this.effectData.turnsActivated[this.turn]) {
  281.                     // Initialize Encore effect for this turn
  282.                     this.effectData.turnsActivated[this.turn] = 0;
  283.                 } else if (this.effectData.turnsActivated[this.turn] >= (Array.isArray(this.effectData.move) ? this.effectData.move.length : 1)) {
  284.                     // Finish Encore effect for this turn
  285.                     return;
  286.                 }
  287.                 this.effectData.turnsActivated[this.turn]++;
  288.                 if (!Array.isArray(this.effectData.move)) {
  289.                     let nextDecision = this.willMove(pokemon);
  290.                     if (nextDecision) this.queue.splice(this.queue.indexOf(nextDecision), 1);
  291.                     if (move.id !== this.effectData.move) return this.effectData.move;
  292.                     return;
  293.                 }
  294.  
  295.                 // Locked into a link
  296.                 switch (this.effectData.turnsActivated[this.turn]) {
  297.                 case 1: {
  298.                     if (!this.willMove(pokemon)) {
  299.                         let pseudoDecision = {choice: 'move', move: this.effectData.move[1], targetLoc: this.currentDecision.targetLoc, pokemon: this.currentDecision.pokemon, targetPosition: this.currentDecision.targetPosition, targetSide: this.currentDecision.targetSide};
  300.                         this.queue.unshift(pseudoDecision);
  301.                     }
  302.                     if (this.effectData.move[0] !== move.id) return this.effectData.move[0];
  303.                     return;
  304.                 }
  305.  
  306.                 case 2:
  307.                     if (this.effectData.move[1] !== move.id) return this.effectData.move[1];
  308.                     return;
  309.                 }
  310.             },
  311.             onResidualOrder: 13,
  312.             onResidual: function (target) {
  313.                 // early termination if you run out of PP
  314.                 let lastMove = target.getLastMoveAbsolute();
  315.  
  316.                 let index = target.moves.indexOf(lastMove);
  317.                 if (index === -1) return; // no last move
  318.  
  319.                 if (target.hasLinkedMove(lastMove)) {
  320.                     // TODO: Check instead whether the last executed move was linked
  321.                     if (target.moveset[0].pp <= 0 || target.moveset[1].pp <= 0) {
  322.                         delete target.volatiles.encore;
  323.                         this.add('-end', target, 'Encore');
  324.                     }
  325.                 } else {
  326.                     if (target.moveset[index].pp <= 0) {
  327.                         delete target.volatiles.encore;
  328.                         this.add('-end', target, 'Encore');
  329.                     }
  330.                 }
  331.             },
  332.             onEnd: function (target) {
  333.                 this.add('-end', target, 'Encore');
  334.             },
  335.             onDisableMove: function (pokemon) {
  336.                 if (!this.effectData.move) return; // ??
  337.                 if (!Array.isArray(this.effectData.move)) {
  338.                     if (!pokemon.hasMove(this.effectData.move)) return;
  339.                     for (let i = 0; i < pokemon.moveset.length; i++) {
  340.                         if (pokemon.moveset[i].id !== this.effectData.move) {
  341.                             pokemon.disableMove(pokemon.moveset[i].id);
  342.                         }
  343.                     }
  344.                 } else {
  345.                     for (let i = 0; i < this.effectData.move.length; i++) {
  346.                         if (!pokemon.hasMove(this.effectData.move[i])) return;
  347.                     }
  348.                     for (let i = this.effectData.move.length; i < pokemon.moveset.length; i++) {
  349.                         if (this.effectData.move.indexOf(pokemon.moveset[i].id) >= 0) continue;
  350.                         pokemon.disableMove(pokemon.moveset[i].id);
  351.                     }
  352.                 }
  353.             },
  354.         },
  355.     },
  356.     torment: {
  357.         inherit: true,
  358.         effect: {
  359.             onStart: function (pokemon) {
  360.                 this.add('-start', pokemon, 'Torment');
  361.             },
  362.             onEnd: function (pokemon) {
  363.                 this.add('-end', pokemon, 'Torment');
  364.             },
  365.             onDisableMove: function (pokemon) {
  366.                 let lastMove = pokemon.lastMove;
  367.                 if (lastMove === 'struggle') return;
  368.  
  369.                 if (Array.isArray(lastMove)) {
  370.                     for (let i = 0; i < lastMove.length; i++) {
  371.                         pokemon.disableMove(lastMove[i]);
  372.                     }
  373.                 } else {
  374.                     pokemon.disableMove(lastMove);
  375.                 }
  376.             },
  377.         },
  378.     },
  379.  
  380.     /**
  381.      * Spite and Grudge
  382.      * Decrease the PP of the last absolute move used by the target
  383.      * Also, Grudge's effect won't be removed by its linked move, if any
  384.      *
  385.      */
  386.  
  387.     grudge: {
  388.         inherit: true,
  389.         effect: {
  390.             onStart: function (pokemon) {
  391.                 this.add('-singlemove', pokemon, 'Grudge');
  392.             },
  393.             onFaint: function (target, source, effect) {
  394.                 this.debug('Grudge detected fainted pokemon');
  395.                 if (!source || !effect) return;
  396.                 if (effect.effectType === 'Move') {
  397.                     let lastMove = source.getLastMoveAbsolute();
  398.                     for (let i = 0; i < source.moveset.length; i++) {
  399.                         if (source.moveset[i].id === lastMove) {
  400.                             source.moveset[i].pp = 0;
  401.                             this.add('-activate', source, 'Grudge', this.getMove(lastMove).name);
  402.                         }
  403.                     }
  404.                 }
  405.             },
  406.             onBeforeMovePriority: 100,
  407.             onBeforeMove: function (pokemon) {
  408.                 if (pokemon.moveThisTurn) return; // Second stage of a Linked move
  409.                 this.debug('removing Grudge before attack');
  410.                 pokemon.removeVolatile('grudge');
  411.             },
  412.         },
  413.     },
  414.     spite: {
  415.         inherit: true,
  416.         onHit: function (target) {
  417.             let lastMove = target.getLastMoveAbsolute();
  418.             if (target.deductPP(lastMove, 4)) {
  419.                 this.add("-activate", target, 'move: Spite', lastMove, 4);
  420.                 return;
  421.             }
  422.             return false;
  423.         },
  424.     },
  425.  
  426.     /**
  427.      * Rollout and Ice Ball
  428.      *
  429.      */
  430.  
  431.     rollout: {
  432.         inherit: true,
  433.         // Mod-specific: default mechanics
  434.     },
  435.     iceball: {
  436.         inherit: true,
  437.         // Mod-specific: default mechanics
  438.     },
  439.  
  440.     /**
  441.      * Other moves that check `pokemon.lastMove`
  442.      * (may behave counter-intuitively if left unmodded)
  443.      *
  444.      **/
  445.  
  446.     conversion2: {
  447.         inherit: true,
  448.         onHit: function (target, source) {
  449.             let lastMove = target.getLastMoveAbsolute();
  450.             if (!lastMove) return false;
  451.             let possibleTypes = [];
  452.             let attackType = this.getMove(lastMove).type;
  453.             for (let type in this.data.TypeChart) {
  454.                 if (source.hasType(type) || target.hasType(type)) continue;
  455.                 let typeCheck = this.data.TypeChart[type].damageTaken[attackType];
  456.                 if (typeCheck === 2 || typeCheck === 3) {
  457.                     possibleTypes.push(type);
  458.                 }
  459.             }
  460.             if (!possibleTypes.length) {
  461.                 return false;
  462.             }
  463.             let type = possibleTypes[this.random(possibleTypes.length)];
  464.  
  465.             if (!source.setType(type)) return false;
  466.             this.add('-start', source, 'typechange', type);
  467.         },
  468.     },
  469.     destinybond: {
  470.         inherit: true,
  471.         effect: {
  472.             onStart: function (pokemon) {
  473.                 this.add('-singlemove', pokemon, 'Destiny Bond');
  474.             },
  475.             onFaint: function (target, source, effect) {
  476.                 if (!source || !effect) return;
  477.                 if (effect.effectType === 'Move' && !effect.isFutureMove) {
  478.                     this.add('-activate', target, 'Destiny Bond');
  479.                     source.faint();
  480.                 }
  481.             },
  482.             onBeforeMovePriority: 100,
  483.             onBeforeMove: function (pokemon, target, move) {
  484.                 // Second stage of a Linked move does not remove Destiny Bond
  485.                 if (pokemon.moveThisTurn) return;
  486.                 this.debug('removing Destiny Bond before attack');
  487.                 pokemon.removeVolatile('destinybond');
  488.             },
  489.         },
  490.     },
  491.     trumpcard: {
  492.         inherit: true,
  493.         basePowerCallback: function (pokemon) {
  494.             let move = pokemon.getMoveData(pokemon.getLastMoveAbsolute()); // Account for calling Trump Card via other moves
  495.             switch (move.pp) {
  496.             case 0:
  497.                 return 200;
  498.             case 1:
  499.                 return 80;
  500.             case 2:
  501.                 return 60;
  502.             case 3:
  503.                 return 50;
  504.             default:
  505.                 return 40;
  506.             }
  507.         },
  508.     },
  509.     uproar: {
  510.         inherit: true,
  511.         // Mod-specific: default mechanics
  512.     },
  513.  
  514.     /**
  515.      * Moves that check `pokemon.moveThisTurn`
  516.      * (may behave counter-intuitively if left unmodded)
  517.      *
  518.      **/
  519.  
  520.      fusionbolt: {
  521.         inherit: true,
  522.         onBasePower: function (basePower, pokemon) {
  523.             let actives = pokemon.side.active;
  524.             for (let i = 0; i < actives.length; i++) {
  525.                 if (actives[i] && actives[i].checkMoveThisTurn('fusionflare')) {
  526.                     this.debug('double power');
  527.                     return this.chainModify(2);
  528.                 }
  529.             }
  530.         },
  531.      },
  532.      fusionflare: {
  533.         inherit: true,
  534.         onBasePower: function (basePower, pokemon) {
  535.             let actives = pokemon.side.active;
  536.             for (let i = 0; i < actives.length; i++) {
  537.                 if (actives[i] && actives[i].checkMoveThisTurn('fusionbolt')) {
  538.                     this.debug('double power');
  539.                     return this.chainModify(2);
  540.                 }
  541.             }
  542.         },
  543.      },
  544.  
  545.     /**
  546.      * Moves that should clean the house after running
  547.      * (but aren't doing so in standard for whatever reason)
  548.      */
  549.  
  550.     beatup: {
  551.         inherit: true,
  552.         onAfterMove: function (pokemon) {
  553.             pokemon.removeVolatile('beatup');
  554.         },
  555.     },
  556.     triplekick: {
  557.         inherit: true,
  558.         onAfterMove: function (pokemon) {
  559.             pokemon.removeVolatile('triplekick');
  560.         },
  561.     },
  562.  
  563.     /**
  564.      * Moves that should clean the house if they aren't run
  565.      *
  566.      */
  567.  
  568.      furycutter: {
  569.         inherit: true,
  570.         effect: {
  571.             duration: 2,
  572.             onStart: function () {
  573.                 this.effectData.multiplier = 1;
  574.             },
  575.             onRestart: function () {
  576.                 if (this.effectData.multiplier < 4) {
  577.                     this.effectData.multiplier <<= 1;
  578.                 }
  579.                 this.effectData.duration = 2;
  580.             },
  581.             onBeforeMove: function (pokemon, target, move) {
  582.                 if (move.id !== 'furycutter') pokemon.removeVolatile('furycutter');
  583.             },
  584.         },
  585.      },
  586.  
  587.     /**
  588.      * First Law of Pokémon Simulation:
  589.      * Always make sure that Sky Drop works
  590.      *
  591.      */
  592.  
  593.      skydrop: {
  594.         inherit: true,
  595.         effect: {
  596.             duration: 2,
  597.             onDragOut: false,
  598.             onSourceDragOut: false,
  599.             onFoeModifyPokemon: function (defender) {
  600.                 if (defender !== this.effectData.source) return;
  601.                 defender.trapped = true;
  602.             },
  603.             onFoeBeforeMovePriority: 11,
  604.             onFoeBeforeMove: function (attacker, defender, move) {
  605.                 if (attacker === this.effectData.source) {
  606.                     this.debug('Sky drop nullifying.');
  607.                     return null;
  608.                 }
  609.             },
  610.             onRedirectTarget: function (target, source, source2) {
  611.                 if (source !== this.effectData.target) return;
  612.                 if (this.effectData.source.fainted) return;
  613.                 return this.effectData.source;
  614.             },
  615.             onAnyAccuracy: function (accuracy, target, source, move) {
  616.                 // both user and target of Sky Drop avoid moves, yet
  617.                 // not moves targetting themselves (Linked)
  618.  
  619.                 if (target !== this.effectData.target && target !== this.effectData.source) {
  620.                     return;
  621.                 }
  622.                 if (source === this.effectData.target && target === this.effectData.source) {
  623.                     return;
  624.                 }
  625.                 if (source === target) return;
  626.  
  627.                 if (move.id === 'gust' || move.id === 'twister') {
  628.                     return;
  629.                 }
  630.                 if (move.id === 'skyuppercut' || move.id === 'thunder' || move.id === 'hurricane' || move.id === 'smackdown' || move.id === 'thousandarrows' || move.id === 'helpinghand') {
  631.                     return;
  632.                 }
  633.                 if (source.hasAbility('noguard') || target.hasAbility('noguard')) {
  634.                     return;
  635.                 }
  636.                 if (source.volatiles['lockon'] && target === source.volatiles['lockon'].source) return;
  637.                 return 0;
  638.             },
  639.             onAnyBasePower: function (basePower, target, source, move) {
  640.                 if (target !== this.effectData.target && target !== this.effectData.source) {
  641.                     return;
  642.                 }
  643.                 if (source === this.effectData.target && target === this.effectData.source) {
  644.                     return;
  645.                 }
  646.                 if (move.id === 'gust' || move.id === 'twister') {
  647.                     return this.chainModify(2);
  648.                 }
  649.             },
  650.             onFaint: function (target) {
  651.                 if (target.volatiles['skydrop'] && target.volatiles['twoturnmove'].source) {
  652.                     this.add('-end', target.volatiles['twoturnmove'].source, 'Sky Drop', '[interrupt]');
  653.                 }
  654.             },
  655.         },
  656.     },
  657. };
Add Comment
Please, Sign In to add comment