sparkychild

Untitled

Feb 11th, 2021 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.22 KB | None | 0 0
  1. illusiondouble: {
  2.         dssb: true,
  3.         accuracy: true,
  4.         basePower: 0,
  5.         category: "Status",
  6.         name: "Illusion Double",
  7.         pp: 10,
  8.         priority: 1,
  9.         flags: {snatch: 1, nonsky: 1},
  10.         volatileStatus: 'illusiondouble',
  11.         onTryHit(target) {
  12.             if (target.volatiles['illusiondouble']) {
  13.                 this.add('-fail', target, 'move: Illusion Double');
  14.                 return null;
  15.             }
  16.             if (target.hp <= target.maxhp / 2 || target.maxhp === 1) { // Shedinja clause
  17.                 this.add('-fail', target, 'move: Illusion Double', '[weak]');
  18.                 return null;
  19.             }
  20.         },
  21.         onHit(target) {
  22.             this.directDamage(target.maxhp / 2);
  23.         },
  24.         condition: {
  25.             onStart(target) {
  26.                 this.add('-start', target, 'Substitute');
  27.                 this.effectData.hp = Math.floor(target.maxhp / 2);
  28.                 if (target.volatiles['partiallytrapped']) {
  29.                     this.add('-end', target, target.volatiles['partiallytrapped'].sourceEffect, '[partiallytrapped]', '[silent]');
  30.                     delete target.volatiles['partiallytrapped'];
  31.                 }
  32.  
  33.                 // replace this move with moonlight slash
  34.                 const move = Moves.moonlightslash;
  35.                 const sketchedMove = {
  36.                     move: move.name,
  37.                     id: 'moonlightslash',
  38.                     pp: move.pp,
  39.                     maxpp: move.pp,
  40.                     target: move.target,
  41.                     disabled: false,
  42.                     disabledSource: '',
  43.                     used: false,
  44.                 };
  45.  
  46.                 const index = target.moves.indexOf('illusiondouble');
  47.                 if (index < 0) return;
  48.                 target.moveSlots[index] = sketchedMove;
  49.                 target.baseMoveSlots[index] = sketchedMove;
  50.             },
  51.             onTryPrimaryHitPriority: -1,
  52.             onTryPrimaryHit(target, source, move) {
  53.                 if (target === source || move.flags['authentic'] || move.infiltrates) {
  54.                     return;
  55.                 }
  56.                 let damage = this.getDamage(source, target, move);
  57.                 if (!damage && damage !== 0) {
  58.                     this.add('-fail', source);
  59.                     this.attrLastMove('[still]');
  60.                     return null;
  61.                 }
  62.                 damage = this.runEvent('SubDamage', target, source, move, damage);
  63.                 if (!damage) {
  64.                     return damage;
  65.                 }
  66.                 if (damage > target.volatiles['illusiondouble'].hp) {
  67.                     damage = target.volatiles['illusiondouble'].hp as number;
  68.                 }
  69.                 target.volatiles['illusiondouble'].hp -= damage;
  70.                 source.lastDamage = damage;
  71.                 if (target.volatiles['illusiondouble'].hp <= 0) {
  72.                     target.removeVolatile('illusiondouble');
  73.                 } else {
  74.                     this.add('-activate', target, 'move: Substitute', '[damage]');
  75.                 }
  76.                 if (move.recoil) {
  77.                     this.damage(this.calcRecoilDamage(damage, move), source, target, 'recoil');
  78.                 }
  79.                 if (move.drain) {
  80.                     this.heal(Math.ceil(damage * move.drain[0] / move.drain[1]), source, target, 'drain');
  81.                 }
  82.                 this.singleEvent('AfterSubDamage', move, null, target, source, move, damage);
  83.                 this.runEvent('AfterSubDamage', target, source, move, damage);
  84.                 return this.HIT_SUBSTITUTE;
  85.             },
  86.             onEnd(target) {
  87.                 this.add('-end', target, 'Substitute');
  88.  
  89.                 // replace moonlight slash with illusion double
  90.                 const move = Moves.illusiondouble;
  91.                 const sketchedMove = {
  92.                     move: move.name,
  93.                     id: 'illusiondouble',
  94.                     pp: move.pp,
  95.                     maxpp: move.pp,
  96.                     target: move.target,
  97.                     disabled: false,
  98.                     disabledSource: '',
  99.                     used: false,
  100.                 };
  101.  
  102.                 const index = target.moves.indexOf('moonlightslash');
  103.                 if (index < 0) return;
  104.                 target.moveSlots[index] = sketchedMove;
  105.                 target.baseMoveSlots[index] = sketchedMove;
  106.  
  107.             },
  108.  
  109.             onModifyMove(move) {
  110.                 if (move.category !== 'Status') move.multihit = (move.multihit || 1) * 2;
  111.                 if (move.name === 'Quiver Dance') move.boosts = {spa: 2, spd: 2, spe: 2};
  112.                 return move;
  113.             },
  114.         },
  115.         secondary: null,
  116.         target: "self",
  117.         type: "Normal",
  118.         zMove: {effect: 'clearnegativeboost'},
  119.         contestType: "Cute",
  120.     },
  121.  
  122.     moonlightslash: {
  123.         dssb: true,
  124.         accuracy: 100,
  125.         basePower: 60,
  126.         category: "Physical",
  127.         name: "Moonlight Slash",
  128.         pp: 10,
  129.         priority: 0,
  130.         flags: {protect: 1, mirror: 1},
  131.         willCrit: true,
  132.         secondary: null,
  133.         target: "normal",
  134.         type: "Fairy",
  135.         contestType: "Beautiful",
  136.     },
  137.  
  138.  
  139. "illusionrealm": {
  140.         isNonstandard: 'Custom',
  141.         name: 'Illusion Realm',
  142.         id: 'illusionrealm',
  143.  
  144.         onAnyModifyMove: function(move) {
  145.             if (move.category === 'Physical') move.category = 'Special';
  146.             return move;
  147.         },
  148.  
  149.         onModifySpD(def) {
  150.             return this.chainModify(1.75);
  151.         },
  152.  
  153.         onModifySpA(spa) {
  154.             return this.chainModify(1.75);
  155.         },
  156.  
  157.         onModifyMove: function(move) {
  158.             if (!move.drain || move.drain[0] / move.drain[1] < 1 / 3) {
  159.                 move.drain = [1, 3];
  160.             }
  161.         },
  162.     },
  163.  
  164.             '~sparkychild': {
  165.                 species: 'Delcatty', ability: 'Illusion Realm', item: 'Leftovers', gender: "F",
  166.                 moves: ['Quiver Dance', 'Boomburst', 'Shadow Ball'],
  167.                 signatureMove: "Illusion Double",
  168.                 evs: {spe: 4, hp: 252, spd: 252}, nature: 'Calm',
  169.             },
  170.  
  171.  
Add Comment
Please, Sign In to add comment