Advertisement
Guest User

SSb(Unfinished V.1)

a guest
Aug 8th, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 131.67 KB | None | 0 0
  1. [You may want to replace all "    " with "      ".]
  2.  
  3.  
  4. data/scripts.js
  5. ------------------------------------------------------------------------------------
  6.     randomSerenityAuthTeam: function (side) {
  7.          var team = [];
  8.          var variant = this.random(5);
  9.          // Hardcoded sets of the available Pokémon.
  10.          var sets = {
  11.               //Admins.
  12.               '~hayleysworld': {
  13.                    species: 'Eevee', ability: 'Magic Guard', item: 'Eviolite', gender: 'M', shiny: true,
  14.                    moves: [['shiftgear', 'shiftgear', 'shiftgear', 'shiftgear', 'quiverdance', 'quiverdance', 'quiverdance', 'quiverdance', 'quiverdance'][this.random(9)], 'healorder', 'swift'],
  15.                    baseSignatureMove: 'quickattack', signatureMove: "War Crimes",
  16.                    evs: {hp:252, atk:88, spa:168}, nature: 'Relaxed'
  17.               },
  18.               '~carco11': {
  19.                    species: 'Togepi', ability: 'Simple', item: 'Eviolite', gender: 'M', shiny: true,
  20.                    moves: ['metronome', 'shell smash', 'rest'],
  21.                    baseSignatureMove: 'geomancy', signatureMove: "Meme Mime",
  22.                    evs: {hp:252, def:4, spe:252}, nature: 'Timid'
  23.               },
  24.               '~Yuuki X': {
  25.                    species: 'Latios', ability: 'Download', item: 'Leftovers', gender: 'M', shiny: true,
  26.                    moves: ['thunderbolt', 'hurricane', ['earthpower', 'roost', 'flamethrower', 'worryseed', 'haze', 'spore'][this.random(6)]],
  27.                    baseSignatureMove: 'milkdrink', signatureMove: "Red Bull Drink",
  28.                    evs: {hp:4, spa:252, spe:252}, nature: 'Modest'
  29.               },
  30.               //leaders
  31.               '&Audino Primal': {
  32.                    species: 'Audino', ability: 'Regenerator', item: 'Audinite', gender: 'M', shiny: true,
  33.                    moves: ['blueflare', 'hypervoice', 'calmmind'],
  34.                    baseSignatureMove: 'nightslash', signatureMove: "Light Storm",
  35.                    evs: {hp:248, def:252, spd:8}, ivs: {attk:0}, nature: 'Bold'
  36.               },
  37.               '&megas4ever': {
  38.                    species: 'Kangashkhan', ability: 'Parental Bond', item: 'Kangashkhanite', gender: 'M',
  39.                    moves: ['return', '', 'woodhammer'],
  40.                    baseSignatureMove: 'bravebird', signatureMove: "Glass Cannon",
  41.                    evs: {hp:252, atk:252, def:252, spd:252, spe:252}, nature: 'Jolly'
  42.               },
  43.               // Mods.
  44.               '@Pikeldeo': {
  45.                    species: 'Mr. Mime', ability: 'Poison Heal', item: 'Leftovers', gender: 'M',
  46.                    moves: [['partingshot','batonpass','voltswitch','uturn'][this.random(4)], 'topsyturvy', ['kingsshield','spikyshield'][this.random(2)], 'defog', 'stealthrock', 'willowisp', 'metalburst', 'destinybond'],
  47.                    baseSignatureMove: 'milkdrink', signatureMove: "Paranoid Stall",
  48.                    evs: {hp:248, def:252, spd:8}, ivs: {atk:0}, nature: 'Bold'
  49.               },
  50.               '@Order RG Princess': {
  51.                    species: 'Mew', ability: 'Iron Fist', item: 'Life Orb', gender: 'M',
  52.                    moves: [
  53.                         ['fakeout', 'icywind', 'trickroom', 'safeguard', 'thunderwave', 'tailwind', 'knockoff'][this.random(7)],
  54.                         ['sunnyday', 'moonlight', 'calmmind', 'protect', 'taunt'][this.random(5)],
  55.                         ['originpulse', 'heatwave', 'hypervoice', 'icebeam', 'moonblast'][this.random(5)]
  56.                    ],
  57.                    baseSignatureMove: 'psychoboost', signatureMove: "Doubles Purism",
  58.                    evs: {hp:252, def:120, spa:56, spd:80}, nature: 'Sassy'
  59.               },
  60.               //drivers
  61.               '%iFlexy': {
  62.                    species: 'Azumarill', ability: 'Poison Heal', item: 'Toxic Orb', gender: 'M',
  63.                    moves: ['protect', ['perishsong','knockoff','toxic'][this.random(3)], ['scald','whirlpool','moonblast'][this.random(3)]],
  64.                    baseSignatureMove: 'calmmind', signatureMove: "Drink's Up!",
  65.                    evs: {hp:252, def:252, spe:4}, nature: 'Bold'
  66.               },
  67.               '%DangMashedPotato': {
  68.                    species: 'Registeel', ability: 'Flash Fire', item: 'Leftovers', gender: 'M',
  69.                    moves: ['recover', 'ironhead', 'bellydrum'],
  70.                    baseSignatureMove: 'taunt', signatureMove: "Bot Mute",
  71.                    evs: {hp:252, atk:252, def:4}, nature: 'Adamant'
  72.               },
  73.               '%ChaosGallant6': {
  74.                    species: 'Lucario', ability: 'Simple', item: 'Lucarionite', gender: 'M',
  75.                    moves: ['jumpkick', ['flashcannon', 'bulletpunch'][this.random(2)], 'batonpass'],
  76.                    baseSignatureMove: 'detect', signatureMove: "Aura Parry",
  77.                    evs: {hp:4, atk:216, spa:36, spe:252}, nature: 'Naive'
  78.               },
  79.               //voices
  80.               '+Charizard-Primal': {
  81.                    species: 'Swirlix', ability: 'Run Away', item: 'Brightpowder', gender: 'M',
  82.                    moves: [['bodyslam', 'glare', 'bodyslam', 'bodyslam'][this.random(4)], ['playrough', 'foulplay'][this.random(2)], 'swagger'],
  83.                    baseSignatureMove: 'defensecurl', signatureMove: "Defense Swirl",
  84.                    evs: {hp:248, def:128, spd:128}, nature: 'Impish'
  85.               },
  86.               '+Shaquayquay': {
  87.                    species: 'Xerneas', ability: 'White Smoke', item: 'Weed', gender: 'M',
  88.                    moves: ['fusionflare', 'moonblast', 'synthesis'],
  89.                    baseSignatureMove: 'leafstorm', signatureMove: "dank kush",
  90.                    evs: {hp:248, spa:252, def:8}, nature: 'Rash'
  91.               },
  92.               '+LadyKayru': {
  93.                    species: 'Tyrantrum', ability: 'Tough Claws', item: 'Life Orb', gender: 'M',
  94.                    moves: ['outrage', 'extremespeed', 'stoneedge', 'closecombat'],
  95.                    baseSignatureMove: 'headcharge', signatureMove: "Land Before Time",
  96.                    evs: {hp:252, atk:252, def:4}, nature: 'Adamant'
  97.               },
  98.               '+Ransei': {
  99.                    species: 'Arceus', ability: 'Mold Breaker', item: 'Life Orb', gender: 'M',
  100.                    moves: ['flamethrower', 'extremespeed', 'sacredfire', 'knockoff', 'closecombat'],
  101.                    baseSignatureMove: 'frenzyplant', signatureMove: "Swag Plant",
  102.                    evs: {hp:252, atk:252, def:4}, nature: 'Adamant'
  103.               },
  104.               //shan
  105.               '$Extradeath': {
  106.                    species: 'Infernape', ability: 'Contrary', item: ['leftovers'], gender: 'M',
  107.                    moves: ['overheat', 'closecombat', 'energy ball'],
  108.                    baseSignatureMove: 'detect', signatureMove: "Sorry Sucker",
  109.                    evs: {hp:252, atk:4, spe:252}, nature: 'Jolly'
  110.  
  111.               }
  112.          };
  113.          // Generate the team randomly.
  114.          var pool = Object.keys(sets).randomize();
  115.          var ranks = {'~':'admins', '&':'leaders', '@':'mods', '%':'drivers', '+':'voices', '$':'shan'};
  116.          var levels = {'~':99, '#':99, '&':98, '@':97, '%':96, '+':95, ' ':94, '$':96};
  117.          for (var i = 0; i < 6; i++) {
  118.               var rank = pool[i].charAt(0);
  119.               var set = sets[pool[i]];
  120.               set.level = levels[rank];
  121.               set.name = pool[i];
  122.               if (!set.ivs) {
  123.                    set.ivs = {hp:31, atk:31, def:31, spa:31, spd:31, spe:31};
  124.               } else {
  125.                    for (var iv in {hp:31, atk:31, def:31, spa:31, spd:31, spe:31}) {
  126.                         set.ivs[iv] = set.ivs[iv] ? set.ivs[iv] : 31;
  127.                    }
  128.               }
  129.               // EVs may or may not be legal... but they probably are.
  130.               if (!set.evs) set.evs = {hp:84, atk:84, def:84, spa:84, spd:84, spe:84};
  131.               var moves = set.moves;
  132.               set.moves = (moves) ? set.moves.sample(3).concat(set.baseSignatureMove) : [set.baseSignatureMove];
  133.               team.push(set);
  134.          }
  135.  
  136.  
  137. ============================================================================================
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155. config/formats.js
  156. --------------------------------------------------------------------------------------------
  157.     {
  158.         name: "Super Staff Bros.: Serenity Edition",
  159.         section: "Scoli's Pet Mod",
  160.        
  161.         team: 'randomSerenityAuth',
  162.         ruleset: ['Sleep Clause Mod', 'HP Percentage Mod', 'Cancel Mod'],
  163.         onBegin: function () {
  164.             // This seasonal gets a bit from Super Smash Bros., that's where the initial message comes from.
  165.             this.add('message', "GET READY FOR THE NEXT BATTLE!");
  166.             // This link leads to a post where all signature moves can be found so the user can use this resource while battling.
  167.             this.add("raw|Shiny and new help for moves can be found <a href='http://www.smogon.com/forums/posts/6162953'>here.</a>");
  168.             // This variable saves the status of a spammy conversation to be played, so it's only played once.
  169.             this.convoPlayed = false;
  170.  
  171.             // This code here is used for the renaming of moves showing properly on client.
  172.             var globalRenamedMoves = {
  173.                 'defog': "Defrog"
  174.             };
  175.             var customRenamedMoves = {};
  176.             var allPokemon = this.p1.pokemon.concat(this.p2.pokemon);
  177.  
  178.             for (var i = 0, len = allPokemon.length; i < len; i++) {
  179.                 var pokemon = allPokemon[i];
  180.                 var last = pokemon.moves.length - 1;
  181.                 if (pokemon.moves[last]) {
  182.                     pokemon.moves[last] = toId(pokemon.set.signatureMove);
  183.                     pokemon.moveset[last].move = pokemon.set.signatureMove;
  184.                     pokemon.baseMoveset[last].move = pokemon.set.signatureMove;
  185.                 }
  186.                 for (var j = 0; j < pokemon.moveset.length; j++) {
  187.                     var moveData = pokemon.moveset[j];
  188.                     if (globalRenamedMoves[moveData.id]) {
  189.                         pokemon.moves[j] = toId(pokemon.set.signatureMove);
  190.                         moveData.move = globalRenamedMoves[moveData.id];
  191.                         pokemon.baseMoveset[j].move = globalRenamedMoves[moveData.id];
  192.                     }
  193.                     if (customRenamedMoves[pokemon.name] && customRenamedMoves[pokemon.name][moveData.id]) {
  194.                         pokemon.moves[j] = toId(pokemon.set.signatureMove);
  195.                         moveData.move = customRenamedMoves[pokemon.name][moveData.id];
  196.                         pokemon.baseMoveset[j].move = customRenamedMoves[pokemon.name][moveData.id];
  197.                     }
  198.                 }
  199.                 if (pokemon.name === '%Pikachuun') {
  200.                     var hprat = pokemon.hp/pokemon.maxhp;
  201.                     pokemon.baseStats = {atk:348, def:155, spa:266, spd:207, spe:419};
  202.                     pokemon.maxhp = 270;
  203.                     pokemon.hp = Math.floor(pokemon.maxhp*hprat);
  204.                     //This corresponds to 70 / 132 / 72 / 120 / 90 / 149 Stats, because I keep forgetting them...
  205.                 }
  206.                 if (pokemon.name === '+insanelegend') {
  207.                     var hprat = pokemon.hp/pokemon.maxhp;
  208.                     pokemon.baseStats = {atk:150, def:217, spa:129, spd:138, spe:108};
  209.                     pokemon.maxhp = 334;
  210.                     pokemon.hp = Math.floor(pokemon.maxhp*hprat);
  211.                 }
  212.                 if (pokemon.name === '+Other Metagames') {
  213.                     pokemon.battly = ['Hidden Type', 'Balanced Hackmons', '1v1', 'Tier Shift', 'Almost Any Ability', 'STABmons'][this.random(6)];
  214.                     pokemon.shift = 0;
  215.                     pokemon.activated = false;
  216.                 }
  217.                 if (pokemon.name === '+SpartanMalice') {
  218.                     pokemon.theory = ['STABmons', 'Almost Any Ability', 'Tier Shift', '1v1'][this.random(4)];
  219.                     pokemon.shift = 0;
  220.                     pokemon.baseStats = {atk:343, def:217, spa:226, spd:195, spe:284};
  221.                 }
  222.                 if (pokemon.name === '+TheBurgerKing99') {
  223.                     pokemon.statSwitch = false;
  224.                 }
  225.             }
  226.         },
  227.         // Here we add some flavour or design immunities.
  228.         onImmunity: function (type, pokemon) {
  229.             //stuff
  230.         },
  231.         // Hacks for megas changed abilities. This allow for their changed abilities.
  232.         onUpdate: function (pokemon, target) {
  233.             var name = toId(pokemon.name);
  234.  
  235.             if (pokemon.template.isMega) {
  236.                 if (name === 'snaquaza' && !pokemon.ascensionCount && !pokemon.ascended) {
  237.                     pokemon.ascensionCount = -1;
  238.                 }
  239.                 if (name === 'leafshield' && pokemon.getAbility().id === 'lightningrod') {
  240.                     pokemon.setAbility('chlorophyll');
  241.                     this.add('-ability', pokemon, pokemon.ability);
  242.                 }
  243.             }
  244.         },
  245.         // Here we treat many things, read comments inside for information.
  246.         onSwitchIn: function (pokemon) {
  247.             var name = toId(pokemon.illusion ? pokemon.illusion.name : pokemon.name);
  248.             if (pokemon.marked && pokemon.marked > 0) { //Pikachuun's 11th Moonspeak Move
  249.                 this.add('-message', "活性化されたマーキング!");
  250.                 if (pokemon.ability === 'sturdy' && pokemon.marked >= pokemon.maxhp && pokemon.hp === pokemon.maxhp) pokemon.ability = 'nullified';
  251.                 if ((pokemon.item === 'focussash' && pokemon.marked >= pokemon.maxhp && pokemon.hp === pokemon.maxhp) || pokemon.item === 'focusband') pokemon.item = 'nullified';
  252.                 this.moveHit(pokemon, pokemon, 'moonspeak', {damage: pokemon.marked});
  253.                 pokemon.marked = 0;
  254.             }
  255.             if (pokemon.side.ascensionBoost) {
  256.                 var aB = pokemon.side.ascensionBoost;
  257.                 if (aB > 1) {
  258.                     this.add('-message', "@Snaquaza couldn't have been stopped from ascending early!");
  259.                     aB = 1;
  260.                     var potato = 'ascended snek';
  261.                     this.boost({atk:aB, spa:aB, spe:aB, accuracy:aB}, pokemon, pokemon, potato);
  262.                 } else if (aB < 1) {
  263.                     this.add('-message', "@Snaquaza gets his revenge for not ascending on time!");
  264.                     aB = -2;
  265.                     var potato = 'banned snek';
  266.                     this.boost({atk:aB, def:aB, spa:aB, spd:aB, spe:aB, accuracy:aB}, pokemon, pokemon, potato);
  267.                 }
  268.                 pokemon.side.ascensionBoost = 0;
  269.             }
  270.             //Tour Win
  271.             if (pokemon.side.getSideCondition('tourwin')) {
  272.                 this.boost({spe:1}, pokemon, pokemon, 'tour win');
  273.                 pokemon.side.removeSideCondition('tourwin');
  274.             }
  275.             // No OP pls. Balance stuff, changing them upon switch in. Wonder Guard gets curse to minimise their turns out.
  276.             if (pokemon.getAbility().id === 'wonderguard') {
  277.                 this.add('-message', pokemon.name + "'s Wonder Guard has cursed it!");
  278.             }
  279.             // Weak Pokémon get a boost so they can fight amongst the other monsters.
  280.             // Ransei is just useless, so the boosts are a prank. Uselesscrab is legitimately useless.
  281.             if (name === 'megas4ever' && !pokemon.illusion) {
  282.                 this.boost({atk:1, spe:1}, pokemon, pokemon, 'MERGA EVOLVED');
  283.             }
  284.             if (name === 'iflexy' && !pokemon.illusion) {
  285.                 this.boost({spa:2, spe:2,}, pokemon, pokemon, 'SEXY FLEXY');
  286.             }
  287.  
  288.  
  289.             // Add here more hacky stuff for mega abilities.
  290.             // This happens when the mega switches in, as opposed to mega-evolving on the turn.
  291.             var oldAbility = pokemon.ability;
  292.             if (pokemon.template.isMega) {
  293.                 if (name === 'leafshield' && pokemon.getAbility().id !== 'chlorophyll') {
  294.                     pokemon.setAbility('chlorophyll');
  295.                     this.add('-ability', pokemon, pokemon.ability);
  296.                 }
  297.             } else {
  298.                 pokemon.canMegaEvo = this.canMegaEvo(pokemon); // Bypass one mega limit.
  299.  
  300.             // Add here special typings, done for flavour mainly.
  301.             if (name === 'piccolo' && !pokemon.illusion) {
  302.                 this.add('-start', pokemon, 'typechange', 'Fairy/Grass');
  303.                 pokemon.typesData = [
  304.                     {type: 'Fairy', suppressed: false,  isAdded: false},
  305.                     {type: 'Grass', suppressed: false,  isAdded: false}
  306.                 ];
  307.             }
  308.             if (name === 'adrianmarinbh' && !pokemon.illusion) {
  309.                 this.add('-start', pokemon, 'typechange', 'Dragon/Fairy');
  310.                 pokemon.typesData = [
  311.                     {type: 'Dragon', suppressed: false,  isAdded: false},
  312.                     {type: 'Fairy', suppressed: false,  isAdded: false}
  313.                 ];
  314.             }
  315.             if (name === 'dremz' && !pokemon.illusion) {
  316.                 this.add('-start', pokemon, 'typechange', 'Grass/Fire');
  317.                 pokemon.typesData = [
  318.                     {type: 'Grass', suppressed: false,  isAdded: false},
  319.                     {type: 'Fire', suppressed: false,  isAdded: false}
  320.                 ];
  321.             }
  322.             if (name === 'insanelegend' && !pokemon.illusion) {
  323.                 this.add('-start', pokemon, 'typechange', 'Normal/Water');
  324.                 pokemon.typesData = [
  325.                     {type: 'Normal', suppressed: false,  isAdded: false},
  326.                     {type: 'Water', suppressed: false,  isAdded: false}
  327.                 ];
  328.             }
  329.             if (name === 'misakamikoto' && !pokemon.illusion) {
  330.                 this.add('-start', pokemon, 'typechange', 'Normal/Fairy');
  331.                 pokemon.typesData = [
  332.                     {type: 'Normal', suppressed: false,  isAdded: false},
  333.                     {type: 'Fairy', suppressed: false,  isAdded: false}
  334.                 ];
  335.             }
  336.             if (name === 'othermetagames' && !pokemon.illusion && pokemon.battly === 'Hidden Type' && pokemon.activated) {
  337.                 this.add('-start', pokemon, 'typechange', 'Normal/Ghost');
  338.                 pokemon.typesData = [
  339.                     {type: 'Normal', suppressed: false,  isAdded: false},
  340.                     {type: 'Ghost', suppressed: false,  isAdded: false}
  341.                 ];
  342.             }
  343.             if (name === 'spartanmalice' && !pokemon.illusion) {
  344.                 this.add('-start', pokemon, 'typechange', 'Fire/Dragon');
  345.                 pokemon.typesData = [
  346.                     {type: 'Fire', suppressed: false,  isAdded: false},
  347.                     {type: 'Dragon', suppressed: false,  isAdded: false}
  348.                 ];
  349.             }
  350.            
  351.             //0Loyd0's custom moves go here
  352.             if (name === '0loyd0' && !pokemon.illusion && !pokemon.customs) {
  353.                 pokemon.customs = [Math.floor(Math.random()*3) + 1, Math.floor(Math.random()*3) + 1, Math.floor(Math.random()*3) + 1, Math.floor(Math.random()*3) + 1];
  354.                 this.add('-message', '0Loyd0\'s custom moveset is ' + pokemon.customs[0] + '/' + pokemon.customs[1] + '/' + pokemon.customs[2] + '/' + pokemon.customs[3] + '!');
  355.             }
  356.  
  357.             // Edgy switch-in sentences go here.
  358.             // Sentences vary in style and how they are presented, so each Pokémon has its own way of sending them.
  359.             var sentences = [];
  360.             var sentence = '';
  361.            
  362.             // Room Owners.
  363.             if (name === 'hayleysworld') {
  364.                 sentences = ['Eevee army assemble!', 'To the ramparts!', 'You and what army?'];
  365.                 this.add('c|#Eevee General|' + sentences[this.random(3)]);
  366.             }
  367.             if (name === 'carco11') {
  368.                 this.add('c|#hollywood|Kappa');
  369.             }
  370.             if (name === 'Yuuki X') {
  371.                 }
  372.             }
  373.             if (name === 'Audino Primal') {
  374.                 this.add('c|~The Immortal|Give me my robe, put on my crown!');
  375.             }
  376.  
  377.             // Global leaders who actually visit
  378.             if (name === 'megas4ever') {
  379.                 this.add('c|&megas4ever|Pineapples don't wear bathrobes');
  380.                 this.add('c|&megas4ever|/me merga-evolved');
  381.            }
  382.  
  383.            // Moderators
  384.            if (name === 'adrianmarinbh') { //is mime
  385.                sentences = ['tech me hao pla', 'i dun no hao pokeymanz', 'i am an aran maran http://i.imgur.com/KBNU2CUh.jpg prezz A 2 plai', 'heloz i am random personz', '**☆*・゜゚・*MIMEZ WAVE!!*・゜゚・*☆KEEP THE STALL GOING ☆*・゜゚・*LETS GO MIME !*・゜゚・*☆ \⌒(o°‿°o)⌒/**'];
  386.                 this.add('c|@Adrian Marin BH|' + sentences[this.random(5)]);
  387.             }
  388.             if (name === 'arcticblast') {
  389.                 sentences = ['BEAR MY ARCTIC BLAST', 'lmao what kind of team is this', 'guys guys guess what?!?!?!?!', 'Double battles are completely superior to single battles.', 'I miss the days when PS never broke 100 users and all the old auth were still around.'];
  390.                 this.add('c|@Arcticblast|' + sentences[this.random(5)]);
  391.             }
  392.             if (name === 'iFlexy') {
  393.                 this.add('c|@BetaHousing|SexyFlexy in tha house"');
  394.             }
  395.             if (name === 'bottt') {
  396.                 this.add('c|@boTTT|Welcome to boTTT!');
  397.             }
  398.             if (name === 'dell') {
  399.                 this.add('c|@Dell|<[~.~]> Next best furry besides Yoshi taking the stand!');
  400.             }
  401.             if (name === 'imas234') { //Swirlix
  402.                 this.add('c|@imas234|n_N'); //;_;
  403.             }
  404.             if (name === 'piccolo') { //Xerneas
  405.                 sentences = ['DANK', 'dank meme', 'imas needs pet'];
  406.                 this.add('c|@piccolo|' + sentences[this.random(3)]); //your memes were too dank for me
  407.             }
  408.             if (name === 'rekeri') {
  409.                 this.add('c|@rekeri|Get Rekeri\'d :]');
  410.             }
  411.             if (name === 'rosiethevenusaur') {
  412.                 sentences = ['!dt party', 'Are you Wifi whitelisted?', 'Read the roomintro!'];
  413.                 this.add('c|@RosieTheVenusaur|' + sentences[this.random(3)]);
  414.             }
  415.             if (name === 'snaquaza') { //Rayquaza + Dragon Ascent
  416.                 this.add('c|@Snaquaza|Terrorizing PS since 2012.') //ASK HIM
  417.             }
  418.             if (name === 'unfixable') {  //Cacnea duh
  419.                 this.add('c|@unfixable|no boo!') //ASK HIM
  420.             }
  421.             if (name === 'uselesscrab') {
  422.                 this.add('c|@uselesscrab|/me !'); //i played really badly anyway
  423.             }
  424.             if (name === 'xfix') {
  425.                 var hazards = {stealthrock: 1, spikes: 1, toxicspikes: 1, stickyweb: 1};
  426.                 var hasHazards = false;
  427.                 for (var hazard in hazards) {
  428.                     if (pokemon.side.getSideCondition(hazard)) {
  429.                         hasHazards = true;
  430.                         break;
  431.                     }
  432.                 }
  433.                 if (hasHazards) {
  434.                     this.add('c|@xfix|(no haz... too late)');
  435.                 } else {
  436.                     this.add('c|@xfix|(no hazards, attacks only, final destination)');
  437.                 }
  438.             }
  439.  
  440.             // Drivers.
  441.             if (name === 'e4flint') { //Something really offensive (get your mind out of the gutter)
  442.                 this.add('c|%E4 Flint|lel'); //*shrugs
  443.             }
  444.             if (name === 'kidwizard') {
  445.                 this.add('c|%Kid Wizard|I should be a mod by now.');
  446.             }
  447.             if (name === 'kl4ng') { //Probably Klang
  448.                 this.add('c|%Kl4ng|**praise**'); //>.>
  449.             }
  450.             if (name === 'manu11') { //Surskit
  451.                 this.add('c|%manu 11|yo'); //bs
  452.             }
  453.             if (name === 'peefrimgar') {
  454.                 this.add('c|%Peef Rimgar|I am Peef. Hear me Roar!');
  455.             }
  456.             if (name === 'pikachuun') { //Is Pikachu
  457.                 sentences = ['o3o', '.3.', '¥(°∀°)¥', '(´・ω・`)', '(.3.)/', 'soup', 'WELCOME TO THE SPACE JAM! HERE\'S YOUR CHANCE DO YOUR DANCE AT THE SPACE JAM, ALRIGHT!', '2hu is best animu', '⑨'];
  458.                 this.add('c|%Pikachuun|' + sentences[this.random(9)]);
  459.             }
  460.             if (name === 'quotecs') {
  461.                 this.add('c|%QuoteCS|Yeah, I know what you mean, but unfortunately I lack good answers to those because of my incredibly dry personality.');
  462.             }
  463.  
  464.             // Voices.
  465.        
  466.             if (name === 'aesf') {
  467.                 this.add('c|+aesf|I am completely balanced');
  468.             }
  469.             if (name === 'cactuscacti') {
  470.                 this.add('c|+CactusCacti|DICKS');
  471.             }
  472.             if (name === 'dreameatergengar') {
  473.                 this.add("c|+Dream Eater Gengar|Take it easy, I'm just a schoolgirl");
  474.             }
  475.             if (name === 'dremz') {
  476.                 this.add('c|+DreMZ|smoke');
  477.                 this.add('c|+DreMZ|weed');
  478.                 this.add('c|+DreMZ|every');
  479.                 this.add('c|+DreMZ|day!');
  480.             }
  481.             if (name === 'insanelegend') {
  482.                 this.add('c|+insanelegend|The OM mods are controlled by lizard people!');
  483.             }
  484.             if (name === 'illusio') { //Chatot
  485.                 this.add('c|+Illusio|Flying types rule!');
  486.             }
  487.             if (name === 'imanalt') {
  488.                 this.add('c|+imanalt|muh bulk');
  489.             }
  490.             if (name === 'kitkasai') {
  491.                 this.add('c|+Kit Kasai|spooky'); //Should've looked like Kyurem-Black
  492.             }
  493.             if (name === 'lcass4919') { //Xatu
  494.                 this.add('c|+lcass4919|the allmighty xatu warrior shall smite you')
  495.             }
  496.             if (name === 'leafshield') {
  497.                 this.add('c|+Leafshield|hi');
  498.             }
  499.             if (name === 'misakamikoto') {
  500.                 this.add('c|+Misaka Mikoto|Please take it nice and easy. I\'m a noob. (◡‿◡✿)');
  501.             }
  502.             if (name === 'mamp') {
  503.                 this.add('c|+Mamp|Hey everyone. Remember to vote Averagemons.');
  504.             }
  505.             if (name === 'othermetagames') {
  506.                 this.add('c|@piccolo|^scouting');
  507.                 this.add("c|+Other Metagames|**Scouting (joining other people's tournament battles while you are in the tour) is not allowed! Don't do it or you will be disqualified! If you see someone scouting, PM an auth!**");
  508.             }
  509.             if (name === 'ransei') {
  510.                 this.add('c|+Ransei|I am an innovamania clone and I am proud')
  511.             }
  512.             if (name === 'shaymin') {
  513.                 this.add('c|+shaymin|Ready for hax?');
  514.             }
  515.             if (name === 'spartanmalice') {
  516.                 this.add('c|+SpartanMalice|Hear me out.');
  517.             }
  518.             if (name === 'theburgerking99') {
  519.                 this.add('c| Stat Switch|Better not lose on this alt');
  520.             }
  521.             if (name === 'word') {
  522.                 var keys = '1234567890qwertyuiopasdfghjklzxcvbnm';
  523.                 var username = '';
  524.                 var rng = -8;
  525.                 var stillgoing = true;
  526.                 while (stillgoing) {
  527.                     username += keys[this.random(keys.length)];
  528.                     rng++;
  529.                     if (Math.floor(Math.random() * rng) > 0 || username.length === 19) stillgoing = false;
  530.                 }
  531.                 this.add('c|+word|//nick ' + username);
  532.             }
  533.             if (name === 'yoman5') {
  534.                 this.add('c|+yoman5|yolo'); //Shouldn't have tried to play dota at the same time
  535.             }
  536.             if (name === 'zodiax') {
  537.                 this.add('c|%Zodiax|fuck Eevee');
  538.             }
  539.        
  540.             //Regs
  541.             if (name === '0loyd0') {
  542.                 this.add('c| 0Loyd0|I shall end you. o.O');
  543.             }
  544.             if (name === 'choonbot') { //Pichu
  545.                 this.add('c| ChoonBot|Hello! This is a test command I made to see if the bot is working.');        
  546.                 /*ReferenceError: child_process is not defined*/
  547.             }
  548.        
  549.        
  550.             //Stat Change Messages
  551.             if (name === 'pikachuun' && !pokemon.illusion && !pokemon.baseStatChange) {
  552.                 this.add('-message', '%Pikachuun: Wait, I haven\'t been sent out yet? Well then...');
  553.                 this.add('-message', '%Pikachuun: BEHOLD DOOR, I SHALL NOW DEFEAT YOU WITH MY SUPERIOR MENTAL MIND POWERS! GRANT ME ACCESS, I COMMAND YOU!!!!');
  554.                 this.add('-anim', pokemon, "Geomancy", pokemon);
  555.                 this.add('-anim', pokemon, "Geomancy", pokemon);
  556.                 this.add('-message', '%Pikachuun has powered up! A door has opened somewhere!');
  557.                 pokemon.baseStatChange = true;
  558.             }
  559.             if (name === 'insanelegend' && !pokemon.illusion && !pokemon.baseStatChange) {
  560.                 this.add('-message', '+insanelegend has recieved buffs from Tier Shift!');
  561.                 pokemon.baseStatChange = true;
  562.             }
  563.             if (name === 'mamp' && !pokemon.illusion && !pokemon.baseStatChange) {
  564.                 this.add('-message', '+Mamp has become his Averagemons equivalent!');
  565.                 pokemon.baseStatChange = true;
  566.             }
  567.             if (name === 'spartanmalice' && !pokemon.illusion && !pokemon.broadcast) {
  568.                 this.add('-message', '+SpartanMalice is theorymonning about ' + pokemon.theory + '!');
  569.                 pokemon.broadcast = true;
  570.             }
  571.             if (name === 'othermetagames' && !pokemon.illusion && !pokemon.broadcast) {
  572.                 this.add('c|@piccolo|^battly');
  573.                 this.add('c|+Other Metagames|This battle\'s format is ' + pokemon.battly + '. It will start when I use the move "Battly Move"');
  574.                 pokemon.broadcast = true;
  575.             }
  576.         },
  577.         // Here we deal with some special mechanics due to custom sets and moves.
  578.         onBeforeMove: function (pokemon, target, move) {
  579.             var name = toId(pokemon.name);
  580.             // Special Shaymin forme change.
  581.             if (name === 'shaymin' && !pokemon.illusion) {
  582.                 var targetSpecies = (move.category === 'Status') ? 'Shaymin' : 'Shaymin-Sky';
  583.  
  584.                 if (targetSpecies !== pokemon.template.species) {
  585.                     this.add('message', pokemon.name + ((move.category === 'Status') ? ' has reverted to Land Forme!' : ' took to the sky once again!'));
  586.                     var template = this.getTemplate(targetSpecies);
  587.                     pokemon.formeChange(targetSpecies);
  588.                     pokemon.baseTemplate = template;
  589.                     pokemon.setAbility(template.abilities['0']);
  590.                     pokemon.baseAbility = template.ability;
  591.                     pokemon.details = template.species + (pokemon.level === 100 ? '' : ', L' + pokemon.level) + (pokemon.gender === '' ? '' : ', ' + pokemon.gender) + (pokemon.set.shiny ? ', shiny' : '');
  592.                     this.add('detailschange', pokemon, pokemon.details);
  593.                 }
  594.             }
  595.  
  596.             // Break the secondary of Dell's sig if an attack is attempted.
  597.             if (target.volatiles['parry'] && move.category !== 'Status') {
  598.                 target.removeVolatile('parry');
  599.             }
  600.  
  601.             if (pokemon.volatiles['needles']) {
  602.                 var dice = this.random(3);
  603.                 pokemon.removeVolatile('needles');
  604.                 if (dice === 2) {
  605.                     this.boost({atk:1, spe:1, def:-1}, pokemon, pokemon, 'used needles');
  606.                 } else if (dice === 1) {
  607.                     this.boost({def:1, spd:1, spe:-1}, pokemon, pokemon, 'used needles');
  608.                 } else {
  609.                     this.boost({atk:1, def:1, spe:-1}, pokemon, pokemon, 'used needles');
  610.                 }
  611.             }
  612.  
  613.             if (move.id === 'judgment' && name === 'shrang' && !pokemon.illusion) {
  614.                 this.add('-start', pokemon, 'typechange', 'Dragon/Fairy');
  615.                 pokemon.typesData = [
  616.                     {type: 'Dragon', suppressed: false,  isAdded: false},
  617.                     {type: 'Fairy', suppressed: false,  isAdded: false}
  618.                 ];
  619.             }
  620.         },
  621.         // Various
  622.         onModifyPriority: function (priority, pokemon, target, move) {
  623.             var name = toId(pokemon.name);
  624.             if (name === 'kl4ng' && target.name === '%E4 Flint' && move.id === 'geargrind') {
  625.                 return 1;
  626.             }
  627.             if (name === '0loyd0' && move.id === 'focuspunch') {
  628.                 if (move.name === 'Falcon Dash Punch' || pokemon.customs[0] === 2) return 0;
  629.                 if (move.name === 'Mighty Falcon Punch' || pokemon.customs[0] === 3) return -7;
  630.             } else if (name === '0loyd0' && move.id === 'skyuppercut') {
  631.                 if (move.name === 'Heavy Raptor Boost' || pokemon.customs[1] === 2) return -1;
  632.                 if (move.name === 'Wind-up Raptor Boost' || pokemon.customs[1] === 3) return 1;
  633.             } else if (name === '0loyd0' && move.id === 'dive') {
  634.                 if (move.name === 'Falcon Strike' || pokemon.customs[2] === 2) return 1;
  635.                 if (move.name === 'Explosive Falcon Dive' || pokemon.customs[2] === 3) return -1;
  636.             }
  637.             if (name === 'imas234' && move.id === 'swagger') {
  638.                 return 1;
  639.             }
  640.         },
  641.         // Add here salty tears, that is, custom faint phrases.
  642.         onFaint: function (pokemon) {
  643.             if (pokemon.illusioTransformed) {
  644.                 pokemon.name = '+Illusio';
  645.                 pokemon.illusioTransformed = false;
  646.             }
  647.             var name = toId(pokemon.name);
  648.             var sentences = [];
  649.             var sentence = '';
  650.  
  651.             // Admins.
  652.             if (name === 'hayleysworld') {
  653.                 this.add('c|#Eevee General|' + ['Retreat!', 'You may have won the battle, but you haven\'t won the war!'][this.random(2)]);
  654.             }
  655.             if (name === 'carco11') {
  656.                 this.add('c|#hollywood|BibleThump');
  657.             }
  658.             if (name === 'yuukix') {
  659.                 sentences = ['AVENGE ME, KIDS! AVEEEENGEEE MEEEEEE!!', '``This was a triumph, I\'m making a note here: HUGE SUCCESS.``', '``Remember when you tried to kill me twice? Oh how we laughed and laughed! Except I wasn\'t laughing.``', '``I\'m not even angry, I\'m being so sincere right now, even though you broke my heart and killed me. And tore me to pieces. And threw every piece into a fire.``'];
  660.                 this.add('c|#Joim|' + sentences[this.random(4)]);
  661.             }
  662.             if (name === 'theimmortal') {
  663.                 this.add('c|~The Immortal|Oh how wrong we were to think immortality meant never dying.');
  664.             }
  665.  
  666.             if (name === 'megas4ever') {
  667.                 this.add('c|&megas4ever|Pineapples don't wear bathrobes');
  668.                this.add('c|&megas4ever|/me de-mega evolved');
  669.            }
  670.  
  671.            // Mods.
  672.            if (name === 'pikeldeo') {
  673.                this.add('c|@Adrian Marin BH|imas saks');
  674.            }
  675.            if (name === 'arcticblast') {
  676.                sentences = ['totally had it but choked, gg', 'I would have won if it weren\'t for HAX', 'oh', 'Double battles are stil superior to single battles.', 'newfag'];
  677.                 this.add('c|@Arcticblast|' + sentences[this.random(5)]);
  678.             }
  679.             if (name === 'iflexy') {
  680.                 this.add('c|%iFlexy|SexyFlexy still here but...a...little...tire............');
  681.             }
  682.             if (name === 'bottt') {
  683.                 this.add('-message', '(Automated response: Your battle contained a banned outcome.)');
  684.             }
  685.             if (name === 'dell') {
  686.                 this.add('c|@Dell|All because I couldn\'t use Yoshi...');
  687.                 this.add('c|@Dell|───────────────████─███────────');
  688.                 this.add('c|@Dell|──────────────██▒▒▒█▒▒▒█───────');
  689.                 this.add('c|@Dell|─────────────██▒────────█──────');
  690.                 this.add('c|@Dell|─────────██████──██─██──█──────');
  691.                 this.add('c|@Dell|────────██████───██─██──█──────');
  692.                 this.add('c|@Dell|────────██▒▒▒█──────────███────');
  693.                 this.add('c|@Dell|────────██▒▒▒▒▒▒───▒──██████───');
  694.                 this.add('c|@Dell|───────██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███─');
  695.                 this.add('c|@Dell|──────██▒▒▒▒─────▒▒▒▒▒▒▒▒▒▒▒▒█─');
  696.                 this.add('c|@Dell|──────██▒▒▒───────▒▒▒▒▒▒▒█▒█▒██');
  697.                 this.add('c|@Dell|───────██▒▒───────▒▒▒▒▒▒▒▒▒▒▒▒█');
  698.                 this.add('c|@Dell|────────██▒▒─────█▒▒▒▒▒▒▒▒▒▒▒▒█');
  699.                 this.add('c|@Dell|────────███▒▒───██▒▒▒▒▒▒▒▒▒▒▒▒█');
  700.                 this.add('c|@Dell|─────────███▒▒───█▒▒▒▒▒▒▒▒▒▒▒█─');
  701.                 this.add('c|@Dell|────────██▀█▒▒────█▒▒▒▒▒▒▒▒██──');
  702.                 this.add('c|@Dell|──────██▀██▒▒▒────█████████────');
  703.                 this.add('c|@Dell|────██▀███▒▒▒▒────█▒▒██────────');
  704.                 this.add('c|@Dell|█████████▒▒▒▒▒█───██──██───────');
  705.                 this.add('c|@Dell|█▒▒▒▒▒▒█▒▒▒▒▒█────████▒▒█──────');
  706.                 this.add('c|@Dell|█▒▒▒▒▒▒█▒▒▒▒▒▒█───███▒▒▒█──────');
  707.                 this.add('c|@Dell|█▒▒▒▒▒▒█▒▒▒▒▒█────█▒▒▒▒▒█──────');
  708.                 this.add('c|@Dell|██▒▒▒▒▒█▒▒▒▒▒▒█───█▒▒▒███──────');
  709.                 this.add('c|@Dell|─██▒▒▒▒███████───██████────────');
  710.                 this.add('c|@Dell|──██▒▒▒▒▒██─────██─────────────');
  711.                 this.add('c|@Dell|───██▒▒▒██─────██──────────────');
  712.                 this.add('c|@Dell|────█████─────███──────────────');
  713.                 this.add('c|@Dell|────█████▄───█████▄────────────');
  714.                 this.add('c|@Dell|──▄█▓▓▓▓▓█▄─█▓▓▓▓▓█▄───────────');
  715.                 this.add('c|@Dell|──█▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓█──────────');
  716.                 this.add('c|@Dell|──█▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓█──────────');
  717.                 this.add('c|@Dell|──▀████████▀▀███████▀──────────');
  718.             }
  719.             if (name === 'imas234') {
  720.                 this.add('c|@imas234|;_;');
  721.             }
  722.             if (name === 'piccolo') {
  723.                 this.add('c|@piccolo|your memes were too dank for me');
  724.             }
  725.             if (name === 'rekeri') {
  726.                 this.add('c|@rekeri|lucky af :[');
  727.             }
  728.             if (name === 'rosiethevenusaur') {
  729.                 this.add('c|@RosieTheVenusaur|' + ['SD SKARM SHALL LIVE AGAIN!!!', 'Not my WiFi!'][this.random(2)]);
  730.             }
  731.             if (name === 'snaquaza') {
  732.                 this.add('c|@Snaquaza|You can\'t stop me anyway!');
  733.                 if (pokemon.ascended && pokemon.ascensionCount) {
  734.                     if (pokemon.ascensionCount < 0) {
  735.                         pokemon.side.ascensionBoost = 2;
  736.                     } else if (pokemon.ascended ) {
  737.                         pokemon.side.ascensionBoost = 3 - pokemon.ascensionCount;
  738.                     }
  739.                     pokemon.ascensionCount = 0;
  740.                 } else {
  741.                     pokemon.ascended = -2;
  742.                     pokemon.ascensionCount = 0;
  743.                 }
  744.             }
  745.             if (name === 'unfixable') {
  746.                 this.add('c|@unfixable|i may be dead but at least my eyebrows are better than yours');
  747.             }
  748.             if (name === 'uselesscrab') {
  749.                 this.add('c|@uselesscrab|i played really badly anyway');
  750.             }
  751.             if (name === 'xfix') {
  752.                 var foe = pokemon.side.foe.active[0];
  753.                 if (foe.name === '@xfix') {
  754.                     this.add('c|@xfix|(annoying Dittos...)');
  755.                 } else if (foe.ability === 'magicbounce') {
  756.                     this.add('c|@xfix|(why ' + foe.name + ' has Magic Bounce...)');
  757.                     this.add('c|@xfix|(gg... why...)');
  758.                 } else {
  759.                     this.add('c|@xfix|(gg... I guess)');
  760.                 }
  761.             }
  762.  
  763.             // Drivers.
  764.             if (name === 'e4flint') {
  765.                 this.add('c|%E4 Flint|*shrugs');
  766.             }
  767.             if (name === 'kidwizard') {
  768.                 this.add('c|%Kid Wizard|This room sucks.');
  769.             }
  770.             if (name === 'kl4ng') {
  771.                 this.add('c|%Kl4ng|>.>');
  772.             }
  773.             if (name === 'manu11') {
  774.                 this.add('c|%manu 11|bs');
  775.             }
  776.             if (name === 'peefrimgar') {
  777.                 this.add('c|%Peef Rimgar|Homophobe :(');
  778.             }
  779.             if (name === 'pikachuun') {
  780.                 sentences = ['*poof*', 'rib (;_;)7', 'sorsly', 'rest in potato', 'I TRIED SO HARD AND GOT SO FAR BUT IN THE END IT DOES\'NT EVEN MATTER', 'Remember kids, always wash your hands after washing your hands. ;^(', 'you\'re obviously cheating', 'for (var i in opponents) this.add(\'-message\', opponents[i] + \' is a nerd\')', 'YOU\'RE DUM N WEERD'];
  781.                 this.add('c|%Pikachuun|' + sentences[this.random(9)]);
  782.             }
  783.             if (name === 'quotecs') {
  784.                 this.add('c|%QuoteCS|#StillIrrelevant');
  785.             }
  786.  
  787.             // Ex-staff or honorary voice.
  788.             if (name === 'aesf') {
  789.                 this.add('c|+aesf|Now I\'m 33-1 :(');
  790.             }
  791.             if (name === 'cactuscacti') {
  792.                 this.add('c|+CactusCacti|oh my');
  793.             }
  794.             if (name === 'dreameatergengar' && !pokemon.archeops) {
  795.                 this.add("c|+Dream Eater Gengar|I'm still 200 Elo above you");
  796.             }
  797.             if (name === 'dremz') {
  798.                 this.add('c|+DreMZ|rip');
  799.                 this.add('c|+DreMZ|in');
  800.                 this.add('c|+DreMZ|pepperonis');
  801.                 this.add('c|+DreMZ|;-;');
  802.             }
  803.             if (name === 'insanelegend') {
  804.                 this.add('c|+insanelegend|ILLUMIMODI CONFIRMED');
  805.             }
  806.             if (name === 'illusio') {
  807.                 this.add('c|+Illusio|*poof*');
  808.             }
  809.             if (name === 'imanalt') {
  810.                 this.add('c|+imanalt|bshax imo');
  811.             }
  812.             if (name === 'kitkasai') {
  813.                 this.add('c|+Kit Kasai|Should\'ve been Kyurem-Black');
  814.             }
  815.             if (name === 'lcass4919') {
  816.                 this.add('c|+lcass4919|:<');
  817.             }
  818.             if (name === 'leafshield') {
  819.                 this.add('c|+Leafshield|hi');
  820.             }
  821.             if (name === 'misakamikoto') {
  822.                 this.add('c|+Misaka Mikoto|>////////////////////////////////////////>');
  823.             }
  824.             if (name === 'mamp') {
  825.                 this.add('c|+Mamp|VOTE FOR AVERAGEMONS!!!!');
  826.             }
  827.             if (name === 'othermetagames') {
  828.                 this.add('c|@piccolo|^forfeit');
  829.                 this.add("c|+Other Metagames|**Leaving tour battles does not count as forfeiting the match. You must type /forfeit in the battleroom to forfeit matches. If you have to go, leave the tour first by typing /tour leave.**");
  830.             }
  831.             if (name === 'ransei') {
  832.                 this.add('c|+Ransei|brb changing alts');
  833.             }
  834.             if (name === 'shaymin') {
  835.                 this.add('c|+shaymin|You\'ve done well, perhaps...too well, even beating the odds!');
  836.             }
  837.             if (name === 'spartanmalice') {
  838.                 this.add('c|+SpartanMalice|Gg, I\'ll go jogging.');
  839.             }
  840.             if (name === 'theburgerking99') {
  841.                 this.add('c|+TheBurgerKing99|I\'m going to go cry in a corner now');
  842.             }
  843.             if (name === 'word') {
  844.                 //Random Excuse Generator. Let's go.
  845.                 var keys = '`1234567890-=qwertyuiop[]\\asdfghjkl;' + "'" + 'zxcvbnm,./';
  846.                 var reason = ['My eyes are', 'My CPU is', 'My ' + keys[Math.floor(Math.random()*47)] + ' key is', 'I am', 'The simulator is', 'Your Pokemon is', 'The lag is', 'My skills are', 'My phone is', 'My nose is', 'My mouse is', 'The battle is', 'You are', 'The Sun is', 'This game is', 'My hands are', 'My fingers are', 'Your team is', 'My butt is', 'My fingernails are', 'My breakfast is', 'Pikachuun is', 'My machine is', 'Your machine is', 'Pokemon Red and Blue are', 'Pokemon Gold and Silver are', 'Pokemon Ruby and Sapphire are', 'Pokemon Diamond and Pearl are', 'Pokemon Black and White are', 'Pokemon X and Y are', 'The matchmaking system is', 'My drink is', 'Your rank is', 'My lenny face is'];
  847.                 var excuse = ['too sweaty', 'too small', 'in my eyes', 'tired', 'too bright', 'in pain', 'too big', 'too loud', 'too annoying', 'self-destructing', 'broken', 'overpowered', 'messing up my thoughts', 'testing something', 'spammy', 'haxy', 'skillful', 'too laggy', 'too dull', 'itchy', 'too cold', 'too warm', 'too hard to see', 'johning too much', 'third-party', 'sweaty', 'calling me', 'saving you', 'having 0 PP', 'really feeling it!', 'stealing my set!', 'counter-teaming me!', 'counter-teaming the ladder!'];
  848.                 this.add('c|+word|' + reason[this.random(reason.length)] + ' ' + excuse[this.random(excuse.length)] + '.');
  849.             }
  850.             if (name === 'yoman5') {
  851.                 this.add('c|+yoman5|Shouldn\'t have tried to play dota at the same time');
  852.             }
  853.             if (name === 'zodiax') {
  854.                 this.add('c|%Zodiax|nerd');
  855.             }
  856.        
  857.             //And ChoonBot is here too
  858.             if (name === '0loyd0') {
  859.                 this.add('c| 0Loyd0|IL, you shall pay for this...');
  860.             }
  861.             if (name === 'choonbot') {
  862.                 this.add('c| ChoonBot|ReferenceError: child_process is not defined');
  863.             }
  864.         },
  865.         // Special switch-out events for some mons.
  866.         onSwitchOut: function (pokemon) {
  867.             if (toId(pokemon.name) === 'hippopotas' && !pokemon.illusion) {
  868.                 this.add('-message', 'The sandstorm subsided.');
  869.             }
  870.             // Shaymin forme change.
  871.             if (toId(pokemon.name) === 'shaymin' && !pokemon.illusion) {
  872.                 if (pokemon.template.species === 'Shaymin') {
  873.                     var template = this.getTemplate('Shaymin-Sky');
  874.                     pokemon.formeChange('Shaymin-Sky');
  875.                     pokemon.baseTemplate = template;
  876.                     pokemon.setAbility(template.abilities['0']);
  877.                     pokemon.baseAbility = template.ability;
  878.                     pokemon.details = template.species + (pokemon.level === 100 ? '' : ', L' + pokemon.level) + (pokemon.gender === '' ? '' : ', ' + pokemon.gender) + (pokemon.set.shiny ? ', shiny' : '');
  879.                 }
  880.             }
  881.  
  882.             // Illusio's special transform.
  883.             if (pokemon.illusioTransformed) {
  884.                 pokemon.name = '+Illusio';
  885.                 pokemon.illusioTransformed = false;
  886.             }
  887.            
  888.             // Pikachuun is the only one who gets a switchout phrase, because he's very cool
  889.             if (toId(pokemon.name) === 'pikachuun' && !pokemon.illusion && !pokemon.fainted) {
  890.                 var sentences = ['QUICK LOOK AT THE DISTRACTION', 'gotta study ' + ['biology', 'math', 'metals', 'the economy', 'the sock ruse', 'MUGEN', 'thermodynamics'] + ' brb', 'oh noes I have been sp00ped', 'tiem 3 pray 2hu', '*honk* *honk*', 'BONUS DUCKS', 'The suction cups do nothing ;;', 'well time to code another meta I guess', 'Wheeeeeeeeee'];
  891.                 this.add('c|%Pikachuun|' + sentences[this.random(9)]);
  892.             }
  893.         },
  894.         onDragOut: function (pokemon) {
  895.             // Prevents qtrx from being red carded by chaos while in the middle of using sig move, which causes a visual glitch.
  896.             if (pokemon.isDuringAttack) {
  897.                 this.add('-message', "But the Unown Aura absorbed the effect!");
  898.                 return null;
  899.             }
  900.             /*if (pokemon.volatiles['inversebattle']) {
  901.                 pokemon.side.removeSideCondition('inversebattle');
  902.                 var side = 'p' + (1 + (pokemon.side === pokemon.battle.p1));
  903.                 pokemon.battle[side].removeSideCondition('inversebattle');
  904.                 this.add('-message', 'The inverted type chart returned to normal!');
  905.             }*/
  906.             if (pokemon.illusioTransformed) {
  907.                 pokemon.name = '+Illusio';
  908.                 pokemon.illusioTransformed = false;
  909.             }
  910.         },
  911.         onAfterMoveSelf: function (source, target, move) {
  912.             // Make Haunter not immune to Life Orb as a means to balance.
  913.             if (toId(source.name) === 'haunter') {
  914.                 this.damage(source.maxhp / 10, source, source, this.getItem('lifeorb'));
  915.             }
  916.         },
  917.         onModifyPokemon: function (pokemon) {
  918.             var name = toId(pokemon.name);
  919.             //pokemon.negateImmunity['Type'] = (pokemon.side.getSideCondition('inversebattle')) ? true : false;
  920.             // Enforce choice item locking on custom moves.
  921.             // qtrx only has one move anyway. This isn't implemented for Cathy since her moves are all custom. Don't trick her a Scarf!
  922.             if (name !== 'qtrx' && name !== 'Cathy') {
  923.                 var moves = pokemon.moveset;
  924.                 if (pokemon.getItem().isChoice && pokemon.lastMove === moves[3].id) {
  925.                     for (var i = 0; i < 3; i++) {
  926.                         if (!moves[i].disabled) {
  927.                             pokemon.disableMove(moves[i].id, false);
  928.                             moves[i].disabled = true;
  929.                         }
  930.                     }
  931.                 }
  932.             }
  933.             for (var p in pokemon.side.pokemon) {
  934.                 var pok = pokemon.side.pokemon[p];
  935.                 if (pok.name === '%Pikachuun') {
  936.                     pok.stats = pok.baseStats = {atk:348, def:155, spa:266, spd:207, spe:419};
  937.                     //This corresponds to 70 / 132 / 72 / 120 / 90 / 149 Stats, because I keep forgetting them...
  938.                 }
  939.                 if (pok.name === '+insanelegend') {
  940.                     pok.stats = pok.baseStats = {atk:150, def:217, spa:129, spd:138, spe:108};
  941.                 }
  942.                 if (pok.name === '+Mamp') {
  943.                     pok.stats = pok.baseStats = {atk:201, def:225, spa:284, spd:224, spe:312};
  944.                 }
  945.                 if (pok.name === '+Other Metagames' && pok.shift && pok.shift > 0) {
  946.                     pok.stats = pok.baseStats = {atk:175, def:261, spa:243, spd:262, spe:157};
  947.                     if (pok.maxhp !== 364) {
  948.                         var hprat = pok.hp/pok.maxhp;
  949.                         pok.maxhp = 364;
  950.                         pok.hp = Math.round(364*hprat);
  951.                         if (!pok.hp && hprat > 0) pok.hp = 1;
  952.                     }
  953.                 }
  954.                 if (pok.name === '+SpartanMalice') {
  955.                     var shift = (pok.shift) ? 0 : pok.shift;
  956.                     pok.stats = pok.baseStats = {atk:343+32*shift, def:217+29*shift, spa:226+26*shift, spd:195+29*shift, spe:284+29*shift};
  957.                     if (pok.maxhp !== 311 && shift > 0) {
  958.                         var hprat = pok.hp/pok.maxhp;
  959.                         pok.maxhp = 311;
  960.                         pok.hp = Math.round(311*hprat);
  961.                         if (!pok.hp && hprat > 0) pok.hp = 1;
  962.                     }
  963.                 }
  964.                 if (pok.name === '+TheBurgerKing99') {
  965.                     if (pok.statSwitch) {
  966.                         pok.stats = pok.baseStats = {atk:261, def:129, spa:379, spd:129, spe:416};
  967.                         if (pok.maxhp !== 419) {
  968.                             var hprat = pok.hp/pok.maxhp;
  969.                             pok.maxhp = 419;
  970.                             pok.hp = Math.round(419*hprat);
  971.                             if (!pok.hp && hprat > 0) pok.hp = 1;
  972.                         }
  973.                     } else {
  974.                         pok.stats = pok.baseStats = {atk:90, def:319, spa:189, spd:319, spe:207};
  975.                         if (pok.maxhp !== 229) {
  976.                             var hprat = pok.hp/pok.maxhp;
  977.                             pok.maxhp = 229;
  978.                             pok.hp = Math.round(229*hprat);
  979.                             if (!pok.hp && hprat > 0) pok.hp = 1;
  980.                         }
  981.                     }
  982.                 }
  983.             }
  984.         },
  985.         // Specific residual events for custom moves.
  986.         // This allows the format to have kind of custom side effects and volatiles.
  987.         onResidual: function (battle) {
  988.             for (var s in battle.sides) {
  989.                 var thisSide = battle.sides[s];
  990.                 if (thisSide.premonTimer > 4) {
  991.                     thisSide.premonTimer = 0;
  992.                     thisSide.premonEffect = true;
  993.                 } else if (thisSide.premonTimer > 0) {
  994.                     if (thisSide.premonTimer === 4) thisSide.addSideCondition('safeguard');
  995.                     thisSide.premonTimer++;
  996.                 }
  997.                 for (var p in thisSide.active) {
  998.                     var pokemon = thisSide.active[p];
  999.                     var name = toId(pokemon.name);
  1000.  
  1001.                     if (pokemon.side.premonEffect) {
  1002.                         pokemon.side.premonEffect = false;
  1003.                         this.add('c|@zdrup|...dary! __**LEGENDARY!**__');
  1004.                         this.boost({atk:1, def:1, spa:1, spd:1, spe:1, accuracy:1}, pokemon, pokemon, 'legendary premonition');
  1005.                         pokemon.addVolatile('aquaring');
  1006.                         pokemon.addVolatile('focusenergy');
  1007.                     }
  1008.                     if (pokemon.volatiles['unownaura'] && !pokemon.fainted && !pokemon.illusion) {
  1009.                         this.add('-message', "Your keyboard is reacting to " + pokemon.name + "'s Unown aura!");
  1010.                         if (this.random(2) === 1) {
  1011.                             this.useMove('trickroom', pokemon);
  1012.                         } else {
  1013.                             this.useMove('wonderroom', pokemon);
  1014.                         }
  1015.                     }
  1016.                     if (name === 'beowulf' && !pokemon.fainted && !pokemon.illusion) {
  1017.                         this.add('c|@Beowulf|/me buzzes loudly!');
  1018.                     }
  1019.                     if (name === 'cathy' && !pokemon.fainted && !pokemon.illusion) {
  1020.                         var messages = [
  1021.                             'kicking is hilarious!',
  1022.                             'flooding the chat log with kicks makes me lol',
  1023.                             'please don\'t stop me from having fun',
  1024.                             'having fun is great!',
  1025.                             'isn\'t this so much fun?',
  1026.                             'let\'s all have fun by spamming the channel!',
  1027.                             'FUN FUN FUN',
  1028.                             'SO MUCH FUN!',
  1029.                             '^_^ fun times ^_^',
  1030.                             '/me is having so much fun!',
  1031.                             'having fun is great!',
  1032.                             '/me thinks spam is fun!',
  1033.                             '/me loves spamming this channel, because it\'s completely inconsequential!',
  1034.                             'this is just the internet -- nothing matters!',
  1035.                             'let\'s have fun ALL NIGHT LONG!!!!!!!!!!!!!!!!!!!!!!'
  1036.                         ];
  1037.                         this.add('c|HappyFunTimes|' + messages[this.random(15)]);
  1038.                     }
  1039.                     if (pokemon.volatiles['parry']) {
  1040.                         // Dell hasn't been attacked.
  1041.                         pokemon.removeVolatile('parry');
  1042.                         this.add('-message', "Untouched, the Aura Parry grows stronger still!");
  1043.                         this.boost({def:1, spd:1}, pokemon, pokemon, 'Aura Parry');
  1044.                     }
  1045.                     if (pokemon.item === 'burger' && !pokemon.fainted && pokemon.hp < pokemon.maxhp) {
  1046.                         var burgers = ['Whopper', 'Big Mac', 'Five Guys Burger', 'Cheeseburger', 'Hamburger', 'Burger', "Double N' Cheese", "Shackburger", "Crunchburger", "Thurman Burger", "Slider", "Mustang Sally Burger", "Bistro Burger", "Le Pidgeon Burger", "Jalapeño Cream Burger", "Superburger", "Cozy Burger", "Original Solly Burger", "Steamed Cheeseburger", "Local Grass-Fed Burger", "Viagra", "Butter Burger", "Sirloin Beef Burger", "Double Chilli Cheeseburger", "Kuma Burger", "Country-Fried Bacon Burger", "Bill's Burger", "Griddled Burger", 'Double Winstead', 'Steak House Burger', "Dick's Deluxe", "Hell's Fury Burger", 'Original Burger', "Father's Office Burger", "Lurger Burger", "Truffled Cheeseburger", "Jucy Lucy", "Green Chile Cheeseburger", "Half-Pound Niman Ranch Cheeseburger", "Bacon Cheeseburger", "Big Devil", "Chargrilled Burger", "Black Label Burger", "Double Cheeseburger", "Bob's Burger"];
  1047.                         this.heal(pokemon.maxhp/16, pokemon, pokemon, burgers[this.random(burgers.length)]); //Too lazy to count >_>
  1048.                     }
  1049.                     if (name === 'snaquaza' && pokemon.template.isMega && !pokemon.ascended) {
  1050.                         if (pokemon.ascensionCount < 0) {
  1051.                             this.add('-message', "@Snaquaza is too powerful for this metagame, and needs to ascend to Anything Goes!");
  1052.                             this.add('-message', "@Snaquaza has 3 turns remaining before he faints automatically! Use Ascension to get him into Anything Goes as soon as possible!");
  1053.                             pokemon.ascensionCount = 1;
  1054.                         } else if (pokemon.ascensionCount !== 3) {
  1055.                             this.add('-message', "@Snaquaza has " + (3 - pokemon.ascensionCount) + " turns remaining before he faints automatically! Use Ascension to get him into Anything Goes as soon as possible!");
  1056.                             pokemon.ascensionCount++;
  1057.                         } else {
  1058.                             this.add('-message', "@Snaquaza was unable to ascend in time!");
  1059.                             pokemon.ascensionCount++;
  1060.                             pokemon.ascended = -1;
  1061.                             pokemon.faint();
  1062.                         }
  1063.                     }
  1064.                 }
  1065.                 for (var q in thisSide.pokemon) {
  1066.                     if (q.name === '%Pikachuun') {
  1067.                         var hprat = q.hp/q.maxhp;
  1068.                         q.baseStats = {atk:348, def:155, spa:266, spd:207, spe:419};
  1069.                         //This corresponds to 70 / 132 / 72 / 120 / 90 / 149 Stats, because I keep forgetting them...
  1070.                     }
  1071.                     if (q.name === '+insanelegend') {
  1072.                         var hprat = q.hp/q.maxhp;
  1073.                         q.baseStats = {hp:334, atk:150, def:217, spa:129, spd:138, spe:108};
  1074.                     }
  1075.                 }
  1076.             }
  1077.         },
  1078.         // A moonspeak move
  1079.         onGetDamage: function (pokemon, target, move) {
  1080.             if (move.id === 'cut' && pokemon.name === '%Pikachuun' && this.random(10) < 1) return target.maxhp;
  1081.         },
  1082.         // Inverse Battle
  1083.         onEffectiveness: function (typeMod, target, type, move) {
  1084.             return;
  1085.             /*if (!move || move.effectType !== 'Move' || !target.side.getSideCondition('inversebattle')) return;
  1086.             if (move && move.id === 'freezedry' && type === 'Water') return;
  1087.             if (move && !this.getImmunity(move, type)) return 1;
  1088.             if (-typeMod === this.getEffectiveness(move, type)) return typeMod; //Glitch avoidance
  1089.             return -typeMod;*/
  1090.         },
  1091.         // This is where the signature moves are actually done.
  1092.         onModifyMove: function (move, pokemon, target) {
  1093.             var name = toId(pokemon.illusion && move.sourceEffect === 'allyswitch' ? pokemon.illusion.name : pokemon.name);
  1094.             // Prevent visual glitch with Spell Steal.
  1095.             move.effectType = 'Move';
  1096.             // Just because it's funny. It still is.
  1097.             if (move.id === 'defog') {
  1098.                 move.name = 'Defrog';
  1099.                 this.attrLastMove('[still]');
  1100.                 this.add('-anim', pokemon, "Defog", pokemon);
  1101.             }
  1102.  
  1103.             // Room Owner signature moves.
  1104.  
  1105.             if (move.id === 'babydolleyes' && name === 'eeveegeneral') {
  1106.                 move.name = 'War Crimes';
  1107.                 move.type = 'Normal';
  1108.                 delete move.boosts;
  1109.                 move.onHit = function (pokemon, source) {
  1110.                     this.directDamage(source.maxhp / 4, source, source);
  1111.                     pokemon.addVolatile('curse');
  1112.                     pokemon.addVolatile('confusion');
  1113.                     this.add("c|#Eevee General|What's a Geneva Convention?");
  1114.                 };
  1115.             } else if (move.id === 'swift' && name === 'eeveegeneral') {
  1116.                 if (!pokemon.evoBeamHits && pokemon.evoBeamHits !== 0) pokemon.evoBeamHits = 0;
  1117.                 move.name = 'Evo Beam';
  1118.                 move.basePower = 22;
  1119.                 move.category = 'Physical';
  1120.                 move.accuracy = 100;
  1121.                 move.basePowerCallback = function (pokemon) {
  1122.                     var basePowerTable = [22, 44, 44, 52, 52, 26, 44, 52, 44];
  1123.                     return basePowerTable[pokemon.evoBeamHits];
  1124.                 };
  1125.                 var eBH = pokemon.evoBeamHits;
  1126.                 move.affectedByImmunities = false;
  1127.                 move.multihit = 9;
  1128.                 move.flags = {protect: 1, mirror: 1, authentic: 1};
  1129.                 var tAb = target.ability;
  1130.                 move.onTryHit = function (target, source, move) { //We actually want this as TryHit for each hit to have its own anim
  1131.                     target.ability = 'zoidberg'; //Why not?
  1132.                     this.attrLastMove('[still]');
  1133.                     var stringTable = ['Eevee', 'Vaporeon', 'Jolteon', 'Flareon', 'Espeon', 'Umbreon', 'Leafeon', 'Glaceon', 'Sylveon'];
  1134.                     this.add('-message', stringTable[source.evoBeamHits] + '\'s attack!');
  1135.                     var move = ['Secret Power', 'Hydro Pump', 'Charge Beam', 'Flamethrower', 'Psybeam', 'Dark Pulse', 'Leaf Storm', 'Ice Beam', 'Dazzling Gleam'][source.evoBeamHits];
  1136.                     this.add('-anim', source, move, target);
  1137.                 };
  1138.                 move.onHit = function (target, pokemon, move) {
  1139.                     var categoryTable = ['Physical', 'Special', 'Special', 'Physical', 'Special', 'Physical', 'Physical', 'Special', 'Special'];
  1140.                     if (categoryTable[pokemon.evoBeamHits + 1]) move.category = categoryTable[pokemon.evoBeamHits + 1];
  1141.                     var typeTable = ['Normal', 'Water', 'Electric', 'Fire', 'Psychic', 'Dark', 'Grass', 'Ice', 'Fairy'];
  1142.                     if (typeTable[pokemon.evoBeamHits + 1]) move.type = typeTable[pokemon.evoBeamHits + 1];
  1143.                     var secondaryTable = [{}, {chance: 20, boosts: {spe:-1}}, {chance: 20, status: 'par'}, {chance: 10, status: 'brn'}, {chance: 10, boosts: {spd:-1}}, {chance: 30, volatileStatus: 'flinch'}, {chance: 20, status: 'slp'}, {chance: 10, status: 'frz'}, {chance: 20, boosts: {spa:-1}}];
  1144.                     if (secondaryTable[pokemon.evoBeamHits]) move.secondaries = [secondaryTable[pokemon.evoBeamHits]];
  1145.                     pokemon.evoBeamHits++;
  1146.                     target.ability = tAb;
  1147.                 };
  1148.                 move.onAfterMove = function (pokemon) {
  1149.                     pokemon.evoBeamHits = 0;
  1150.                 };
  1151.             }
  1152.             if (move.id === 'geomancy' && name === 'hollywood') {
  1153.                 move.name = 'Meme Mime';
  1154.                 move.isTwoTurnMove = false;
  1155.                 move.onTry = function () {};
  1156.                 move.boosts = {atk:1, spa:1, spe:1};
  1157.                 move.onPrepareHit = function (target, source, move) {
  1158.                     this.attrLastMove('[still]');
  1159.                     this.add('-anim', pokemon, "Geomancy", pokemon);
  1160.                 };
  1161.             }
  1162.             if (move.id === 'milkdrink' && name === 'joim') {
  1163.                 move.name = 'Red Bull Drink';
  1164.                 move.boosts = {spa:1, spe:1, accuracy:1, evasion:-1};
  1165.                 delete move.heal;
  1166.                 move.onTryHit = function (pokemon) {
  1167.                     if (pokemon.volatiles['redbull']) return false;
  1168.                     this.attrLastMove('[still]');
  1169.                     this.add('-anim', pokemon, "Geomancy", pokemon);
  1170.                 };
  1171.                 move.onHit = function (pokemon) {
  1172.                     if (pokemon.volatiles['redbull']) return false;
  1173.                     pokemon.addVolatile('redbull');
  1174.                 };
  1175.             }
  1176.             if (move.id === 'nightslash' && name === 'theimmortal') {
  1177.                 move.name = 'Primordial Force';
  1178.                 move.type = 'Dark';
  1179.                 move.bp = 150;
  1180.                 move.accuracy = true;
  1181.                 move.pp = 5;
  1182.                 move.ignoreDefensive = true;
  1183.                 delete move.critRatio;
  1184.                 move.flags = {authentic: 1};
  1185.                 move.onTryHit = function (target, source) {
  1186.                     this.attrLastMove('[still]');
  1187.                     this.add('-anim', source, "Shadow Force", target);
  1188.                 };
  1189.             }
  1190.  
  1191.             // Leader signature moves.
  1192.        
  1193.             if (move.id === 'bravebird' && name === 'verbatim') {
  1194.                 move.name = 'Glass Cannon';
  1195.                 move.basePower = 170;
  1196.                 move.accuracy = 80;
  1197.                 move.recoil = [1, 4];
  1198.                 move.onPrepareHit = function (target, source, move) {
  1199.                     this.attrLastMove('[still]');
  1200.                     this.add('-anim', source, "High Jump Kick", target);
  1201.                 };
  1202.                 move.onHit = function (pokemon) {
  1203.                     this.add('c|&verbatim|DEFENESTRATION!');
  1204.                     if (this.random(20) === 1) pokemon.switchFlag = true;
  1205.                 };
  1206.                 move.onMoveFail = function (target, source, move) {
  1207.                     this.damage(source.maxhp / 2, source, source, 'glasscannon');
  1208.                 };
  1209.             }
  1210.  
  1211.             // Mod signature moves.
  1212.             if (move.id === 'milkdrink' && name === 'adrianmarinbh') {
  1213.                 move.name = 'Paranoid Stall';
  1214.                 move.onHit = function (target) {
  1215.                     if (target.status !== 'tox' && target.status !== 'psn') {
  1216.                         if (target.status) target.cureStatus();
  1217.                         target.setStatus('psn');
  1218.                     }
  1219.                 }
  1220.             }
  1221.             if (move.id === 'psychoboost' && name === 'arcticblast') {
  1222.                 move.name = 'Doubles Purism';
  1223.                 delete move.self;
  1224.                 move.onHit = function (target, source) {
  1225.                     if (source.hp) {
  1226.                         var hasRemovedHazards = false;
  1227.                         var sideConditions = {'spikes': 1, 'toxicspikes': 1, 'stealthrock': 1, 'stickyweb': 1};
  1228.                         for (var i in sideConditions) {
  1229.                             if (target.side.removeSideCondition(i)) {
  1230.                                 hasRemovedHazards = true;
  1231.                                 this.add('-sideend', target.side, this.getEffect(i).name, '[from] move: Doubles Purism', '[of] ' + source);
  1232.                             }
  1233.                             if (source.side.removeSideCondition(i)) {
  1234.                                 hasRemovedHazards = true;
  1235.                                 this.add('-sideend', source.side, this.getEffect(i).name, '[from] move: Doubles Purism', '[of] ' + source);
  1236.                             }
  1237.                         }
  1238.                         if (hasRemovedHazards) this.add('c|@Arcticblast|HAZARDS ARE TERRIBLE IN DOUBLES');
  1239.                     }
  1240.                 };
  1241.             }
  1242.             if (move.id === 'calmmind' && name === 'betahousing') {
  1243.                 move.name = "Drink's Up";
  1244.                 if (pokemon.volatiles.confusion) move.boosts = {atk:3, def:3, spa:3, spd:3, spe:3, accuracy:3};
  1245.                 if (!pokemon.volatiles.confusion && pokemon.hp < pokemon.maxhp) move.heal = [1, 4];
  1246.                 if (pokemon.volatiles.confusion && pokemon.hp < pokemon.maxhp) move.heal = [1, 1];
  1247.                 move.onPrepareHit = function (target, source, move) {
  1248.                     this.attrLastMove('[still]');
  1249.                     this.add('-anim', source, "Milk Drink", target);
  1250.                 };
  1251.             }
  1252.             if (move.id === 'taunt' && name === 'bottt') {
  1253.                 move.name = 'Bot Mute';
  1254.                 move.onHit = function (target) {
  1255.                     target.addVolatile('embargo');
  1256.                     target.addVolatile('torment');
  1257.                     target.addVolatile('healblock');
  1258.                 };
  1259.             }
  1260.             if (move.id === 'detect' && name === 'dell') {
  1261.                 var dmg = Math.ceil(pokemon.maxhp / (pokemon.ability === 'simple' ? 2 : 4));
  1262.                 move.name = 'Aura Parry';
  1263.                 move.self = {boosts: {atk:1, spa:1, spe:1}};
  1264.                 move.onTryHit = function (target, source) {
  1265.                     if (source.hp <= dmg) return false;
  1266.                     this.attrLastMove('[still]');
  1267.                     this.add('-anim', source, "Amnesia", source);
  1268.                     return !!this.willAct() && this.runEvent('StallMove', target);
  1269.                 };
  1270.                 move.onHit = function (target) {
  1271.                     this.directDamage(dmg, target, target);
  1272.                     pokemon.addVolatile('parry');
  1273.                     pokemon.addVolatile('stall');
  1274.                 };
  1275.             }
  1276.             if (move.id === 'naturepower' && name === 'imanalt') {
  1277.                 move.name = 'FREE GENV BH';
  1278.                 move.onTryHit = function (target, source) {
  1279.                     this.useMove('earthquake', source, target);
  1280.                 };
  1281.             }
  1282.             if (move.id === 'defensecurl' && name === 'imas234') {
  1283.                 move.name = 'Defense Swirl';
  1284.                 move.boosts = {def: 2}
  1285.                 move.onPrepareHit = function (target, source, move) {
  1286.                     this.attrLastMove('[still]');
  1287.                     this.add('-anim', source, "Defense Curl", target);
  1288.                 };
  1289.                 move.onHit = function (target, source, move) {
  1290.                     source.side.addSideCondition('reflect');
  1291.                     source.side.addSideCondition('lightscreen');
  1292.                 };
  1293.             }
  1294.             if (move.id === 'swagger' && name === 'imas234') {
  1295.                 move.name = 'sweg';
  1296.                 move.onPrepareHit = function (target, source, move) {
  1297.                     this.attrLastMove('[still]');
  1298.                     this.add('-anim', source, "Swagger", target);
  1299.                 };
  1300.             }
  1301.             if (move.id === 'leafstorm' && name === 'piccolo') {
  1302.                 move.name = 'dank kush';
  1303.                 move.onPrepareHit = function (target, source, move) {
  1304.                     this.attrLastMove('[still]');
  1305.                     this.add('-anim', source, "Leaf Storm", target);
  1306.                 };
  1307.                 move.onHit = function (target, source, move) {
  1308.                     this.add('c|@piccolo|this dank kush mang');
  1309.                     var dankAbility = target.setAbility('whitesmoke');
  1310.                     if (dankAbility) this.add('-ability', target, target.ability, '[from] move: dank kush');
  1311.                 }
  1312.                 move.secondaries = [{chance:42.0, status:'brn'}];
  1313.                 delete move.self;
  1314.             }
  1315.             if (move.id === 'headcharge' && name === 'rekeri') {
  1316.                 move.name = 'Land Before Time';
  1317.                 move.basePower = 125;
  1318.                 move.type = 'Rock';
  1319.                 move.accuracy = 90;
  1320.                 move.secondaries = [{chance:10, volatileStatus:'flinch'}];
  1321.             }
  1322.             if (move.id === 'frenzyplant' && name === 'rosiethevenusaur') {
  1323.                 move.name = 'Swag Plant';
  1324.                 move.bp = 100;
  1325.                 move.volatileStatus = 'confusion';
  1326.                 move.self = {boosts: {atk:1, def:1}};
  1327.             }
  1328.             if (move.id === 'detect' && name === 'shaymin') {
  1329.                 move.name = 'Flower Garden';
  1330.                 move.type = 'Grass';
  1331.                 move.self = {boosts: {def:1, spa:1, spd:1}};
  1332.                 move.onTryHit = function (target, source) {
  1333.                     if (source.volatiles['flowergarden']) return false;
  1334.                     this.attrLastMove('[still]');
  1335.                     this.add('-anim', source, "Amnesia", source);
  1336.                 };
  1337.                 move.onHit = function (target, source) {
  1338.                     source.addVolatile('stall');
  1339.                     source.addVolatile('flowergarden');
  1340.                 };
  1341.             }
  1342.             if (move.id === 'selfdestruct' && name === 'snaquaza') {
  1343.                 move.name = 'Ascension';
  1344.                 move.basePower = 180;
  1345.                 move.type = 'Flying';
  1346.                 move.selfdestruct = false;
  1347.                 move.flags = {protect: 1, authentic: 1},
  1348.                 move.onPrepareHit = function (target, source, move) {
  1349.                     this.attrLastMove('[still]');
  1350.                     if (!source.template.isMega) {
  1351.                         this.add('-message', "But @Snaquaza is not powerful enough to ascend!");
  1352.                         return false;
  1353.                     } else {
  1354.                         this.add('-anim', source, "Dragon Ascent", target);
  1355.                     }
  1356.                 };
  1357.                 move.onMoveFail = function (target, source, move) {
  1358.                     if (source.template.isMega) {
  1359.                         this.add('-message', "@Snaquaza wasn't able to ascend!");
  1360.                     }
  1361.                 };
  1362.                 move.onHit = function (target, source, move) {
  1363.                     if (source.ascensionCount < 0) {
  1364.                         this.add('-message', "@Snaquaza successfully ascended, with 3 turns remaining!");
  1365.                     } else {
  1366.                         this.add('-message', "@Snaquaza successfully ascended, with " + (4 - source.ascensionCount) + " turns remaining!");
  1367.                     }
  1368.                     source.faint();
  1369.                     source.ascended = 1;
  1370.                 };
  1371.             }
  1372.             if (move.id === 'growl' && name === 'unfixable') {
  1373.                 move.name = 'Wrath of Cacnea';
  1374.                 move.accuracy = true;
  1375.                 delete move.boosts;
  1376.                 move.flags = {authentic: 1};
  1377.                 move.onPrepareHit = function (target, source, move) {
  1378.                     this.attrLastMove('[still]');
  1379.                     if (!target.volatiles.confusion) this.add('-anim', source, "Curse", source);
  1380.                 };
  1381.                 move.onHit = function (target, source, move) {
  1382.                     if (!target.volatiles.confusion) {
  1383.                         this.boost({atk:1, def:1, spa:1, spd:1, spe:1, accuracy:1}, source, source);
  1384.                         target.addVolatile('confusion');
  1385.                     } else {
  1386.                         this.add("c|@unfixable|CACNEA");
  1387.                         this.add('-message', 'BUT WAIT A MINUTE, AS IT TURNS OUT THAT WAS JUST IN PREPARATION FOR...')
  1388.                         this.useMove('needlearm', source, target);
  1389.                     }
  1390.                 };
  1391.                 move.type = 'Grass';
  1392.             }
  1393.             if (move.id === 'needlearm' && name === 'unfixable') {
  1394.                 move.name = 'TRUE WRATH OF CACNEA';
  1395.                 move.basePowerCallback = function (pokemon) {
  1396.                     return 60 + 20 * pokemon.positiveBoosts();
  1397.                 };
  1398.                 move.onPrepareHit = function (target, source, move) {
  1399.                     this.attrLastMove('[still]');
  1400.                     this.add('-anim', source, "Wood Hammer", target);
  1401.                 };
  1402.                 move.onHit = function (target, source, move) {
  1403.                     this.boost({atk:-1, def:-1, spa:-1, spd:-1, spe:-1, accuracy:-1}, source, source);
  1404.                     target.removeVolatile('confusion');
  1405.                 };
  1406.             }
  1407.             if (move.id === 'splash' && name === 'uselesscrab') {
  1408.                 move.onTryHit = function (target, source, move) {
  1409.                     this.add('-message', 'But nothing happened?');
  1410.                     if (source.volatiles.splash) { //Props to you for using splash twice and living a hit somehow.
  1411.                         this.add('-message', 'Wait. HOW DID YOU USE THIS TWICE WITHOUT SWITCHING OUT?');
  1412.                         this.add('-message', 'I MEAN SERIOUSLY. YOU\'RE AT -6 IN EVERY STAT. ALL OF THEM. YOU HAVE NO EVS AND IVS IN THESE STATS TOO. HOW DID YOU LIVE A HIT?');
  1413.                         this.add('-message', 'MAYBE THAT 1 HP EV I GAVE WAS TOO MUCH? EH I\'LL PATCH IT LATER.');
  1414.                         this.add('-message', 'FOR NOW, I GIVE UP. TAKE YOUR DUMB WIN AND LEAVE. PLEASE.');
  1415.                     }
  1416.                 };
  1417.                 move.onHit = function (target, source, move) {
  1418.                     if (!source.volatiles.splash) source.addVolatile('splash');
  1419.                     else this.win(source.side); //Props to you for using splash twice and living a hit. Here, have this, my treat :3
  1420.                 };
  1421.             }
  1422.             if (move.id === 'metronome' && name === 'xfix') {
  1423.                 if (pokemon.moveset[3] && pokemon.moveset[3].pp) {
  1424.                     pokemon.moveset[3].pp = Math.round(pokemon.moveset[3].pp * 10 + 6) / 10;
  1425.                 }
  1426.                 move.name = '(Super Glitch)';
  1427.                 move.multihit = [2, 5];
  1428.                 move.onTryHit = function (target, source) {
  1429.                     if (!source.isActive) return null;
  1430.                     if (this.random(777) !== 42) return;
  1431.                     var opponent = pokemon.side.foe.active[0];
  1432.                     opponent.setStatus('brn');
  1433.                     var possibleStatuses = ['confusion', 'flinch', 'attract', 'focusenergy', 'foresight', 'healblock'];
  1434.                     for (var i = 0; i < possibleStatuses.length; i++) {
  1435.                         if (this.random(3) === 1) {
  1436.                             opponent.addVolatile(possibleStatuses[i]);
  1437.                         }
  1438.                     }
  1439.  
  1440.                     function generateNoise() {
  1441.                         var noise = '';
  1442.                         var random = this.random(40, 81);
  1443.                         for (var i = 0; i < random; i++) {
  1444.                             if (this.random(4) !== 0) {
  1445.                                 // Non-breaking space
  1446.                                 noise += '\u00A0';
  1447.                             } else {
  1448.                                 noise += String.fromCharCode(this.random(0xA0, 0x3040));
  1449.                             }
  1450.                         }
  1451.                         return noise;
  1452.                     }
  1453.                     this.add('-message', "(Enemy " + generateNoise.call(this) + " TMTRAINER " + opponent.name + " is frozen solid?)");
  1454.                     this.add('-message', "(Enemy " + generateNoise.call(this) + " TMTRAINER " + opponent.name + " is hurt by its burn!)");
  1455.                     this.damage(opponent.maxhp * this.random(42, 96) * 0.01, opponent, opponent);
  1456.                     var exclamation = source.status === 'brn' ? '!' : '?';
  1457.                     this.add('-message', "(Enemy " + generateNoise.call(this) + " TMTRAINER @xfix is hurt by its burn" + exclamation + ")");
  1458.                     this.damage(source.maxhp * this.random(24, 48) * 0.01, source, source);
  1459.                     return null;
  1460.                 };
  1461.             }
  1462.  
  1463.             // Driver signature moves.
  1464.             if (move.id === 'psystrike' && name === 'e4flint') {
  1465.                 var hyperOffense = !!(target.name === '%Adrian Marin BH')
  1466.                 move.name = 'Hyper Offense';
  1467.                 move.basePower = 180;
  1468.                 move.accuracy = 90;
  1469.                 move.ohko = hyperOffense;
  1470.                 delete move.defensiveCategory;
  1471.                 move.onPrepareHit = function (target, source, move) {
  1472.                     this.attrLastMove('[still]');
  1473.                     this.add('-anim', source, "Light of Ruin", target);
  1474.                     this.add('-anim', source, "Psystrike", target);
  1475.                 };
  1476.                 move.self = {boosts: {def: -1, spd: -1, spe: -1}};
  1477.             }
  1478.             if (move.id === 'tailwhip' && name === 'kidwizard') {
  1479.                 move.name = 'Broken Wand';
  1480.                 delete move.boosts;
  1481.                 move.flags = {reflectable: 1, nonsky: 1};
  1482.                 move.onPrepareHit = function (target, source, move) {
  1483.                     this.attrLastMove('[still]');
  1484.                     this.add('-anim', source, "Spikes", target);
  1485.                 };
  1486.                 move.onHit = function (target, source, move) {
  1487.                     target.side.addSideCondition('spikes');
  1488.                     target.side.addSideCondition('toxicspikes');
  1489.                     this.useMove(['icebeam','thunderbolt'][this.random(2)], source);
  1490.                 };
  1491.             }
  1492.             if (move.id === 'geargrind' && name === 'kl4ng') {
  1493.                 move.name = 'Flint Grinder';
  1494.                 move.basePower = 60;
  1495.                 move.accuracy = (target.name === '%E4 Flint') ? true : 90;
  1496.                 move.onPrepareHit = function (target, source, move) {
  1497.                     this.attrLastMove('[still]');
  1498.                     this.add('-anim', source, "Gear Grind", target);
  1499.                 };
  1500.                 move.onHit = function (target, source, move) {
  1501.                     if (target.name === '%E4 Flint') {
  1502.                         this.add('c|%Kl4ng|!git gud flint');
  1503.                     }
  1504.                 }
  1505.             }
  1506.             if (move.id === 'hydropump' && name === 'manu11') {
  1507.                 move.name = 'Surskit Energy';
  1508.                 move.basePower = 130;
  1509.                 move.sideCondition = 'stickyweb';
  1510.                 move.onPrepareHit = function (target, source, move) {
  1511.                     this.attrLastMove('[still]');
  1512.                     this.add('-anim', source, "Origin Pulse", target);
  1513.                 };
  1514.                 move.onEffectiveness = function (typeMod, type, move) {
  1515.                     return typeMod + this.getEffectiveness('Bug', type);
  1516.                 };
  1517.             }
  1518.             if (name === 'pikachuun') {
  1519.                 if (move.id === 'metronome') {
  1520.                     move.name = 'Moonspeak';
  1521.                     move.onPrepareHit = function (target, source, move) {
  1522.                         this.attrLastMove('[still]');
  1523.                         this.add('-anim', source, "Hyper Voice", target);
  1524.                     };
  1525.                     move.onHit = function(target, source) {
  1526.                         var movespeak = ['fairywind', 'bubble', 'thundershock', 'confusion', 'cut', 'shadowpunch', 'ember', 'thief', 'powdersnow', 'sonicboom', 'nightshade'];
  1527.                         var moonspoke = movespeak[this.random(11)];
  1528.                         this.useMove(moonspoke, target)
  1529.                     }
  1530.                 } else if (move.id === 'fairywind') {
  1531.                     move.name = '「パニッシュ・ザ・ジャッジメント」'; //Super Strong, Special [fairy]
  1532.                     move.basePower = 250;
  1533.                     move.onPrepareHit = function (target, source, move) {
  1534.                         this.attrLastMove('[still]');
  1535.                         this.add('-anim', source, "Judgment", target);
  1536.                     };
  1537.                 } else if (move.id === 'bubble') {
  1538.                     move.name = '禍殃「メエルシュトレエムに呑まれて」'; //Pretty strong, special, chance to OHKO [water]
  1539.                     move.basePower = 140;
  1540.                     move.ohko = (this.random(10) < 3);
  1541.                     move.onPrepareHit = function (target, source, move) {
  1542.                         this.attrLastMove('[still]');
  1543.                         this.add('-anim', source, "Origin Pulse", target);
  1544.                     };
  1545.                     delete move.secondary;
  1546.                     delete move.secondaries;
  1547.                 } else if (move.id === 'thundershock') {
  1548.                     move.name = '光速「ルクシオンエッジ」'; //Super Strong, Physical [electric]
  1549.                     move.basePower = 200;
  1550.                     move.category = 'Physical';
  1551.                     move.onPrepareHit = function (target, source, move) {
  1552.                         this.attrLastMove('[still]');
  1553.                         this.add('-anim', source, "Bolt Strike", target);
  1554.                     };
  1555.                     delete move.secondary;
  1556.                     move.secondaries = [{chance: 30, status: 'par'}];
  1557.                 } else if (move.id === 'confusion') {
  1558.                     move.name = '魔砲「ファイナルスパーク」'; //Super Strong, Special [Psychic]
  1559.                     move.basePower = 250;
  1560.                     move.onPrepareHit = function (target, source, move) {
  1561.                         this.attrLastMove('[still]');
  1562.                         this.add('-anim', source, "Hyper Beam", target);
  1563.                     };
  1564.                     delete move.secondary;
  1565.                     delete move.secondaries;
  1566.                 } else if (move.id === 'cut') {
  1567.                     move.name = '彼岸剣「地獄極楽滅多斬り」'; //Pretty strong in total, hits 6 times, Has a chance to OHKO, Physical [Steel]
  1568.                     move.basePower = 33;
  1569.                     move.type = 'Steel';
  1570.                     move.accuracy = 100;
  1571.                     move.multihit = 6;
  1572.                     move.onPrepareHit = function (target, source, move) {
  1573.                         this.attrLastMove('[still]');
  1574.                         this.add('-anim', source, "Slash", target);
  1575.                     };
  1576.                 } else if (move.id === 'shadowpunch') {
  1577.                     move.name = '真紅眼の狂月宴 (レッドアイズ・バンケット)'; //Pretty strong, physical, auto-Taunt [Ghost]
  1578.                     move.basePower = 180;
  1579.                     move.accuracy = 100;
  1580.                     move.onPrepareHit = function (target, source, move) {
  1581.                         this.attrLastMove('[still]');
  1582.                         this.add('-anim', source, "Shadow Force", target);
  1583.                     };
  1584.                     move.volatileStatus = 'taunt';
  1585.                 } else if (move.id === 'ember') {
  1586.                     move.name = '七星「セプテントリオン」'; //Super Strong in total, Special. Chance to burn, hits 7 times. [Fire]
  1587.                     move.basePower = 25;
  1588.                     move.multihit = 7;
  1589.                     move.onPrepareHit = function (target, source, move) {
  1590.                         this.attrLastMove('[still]');
  1591.                         this.add('-anim', source, "Fusion Flare", target);
  1592.                     };
  1593.                 } else if (move.id === 'thief') {
  1594.                     move.name = '逆符「天下転覆」'; //Pretty srong, inverts targets stat changes and steals them if necessary. [Dark]
  1595.                     move.basePower = 140;
  1596.                     move.onPrepareHit = function (target, source, move) {
  1597.                         this.attrLastMove('[still]');
  1598.                         this.add('-anim', source, "Dark Void", target);
  1599.                     };
  1600.                     move.onHit = function (target, source) {
  1601.                         var targetBoosts = {};
  1602.                         var targetDeboosts = {};
  1603.                         for (var i in target.boosts) {
  1604.                             targetBoosts[i] = (target.boosts[i] > 0) ? target.boosts[i] : 0;
  1605.                             targetDeboosts[i] = (target.boosts[i] > 0) ? -target.boosts[i] : 0;
  1606.                         }
  1607.                         source.setBoost(targetBoosts);
  1608.                         target.setBoost(targetDeboosts);
  1609.                         this.add('-copyboost', source, target, '[from] move: 逆符「天下転覆」');
  1610.                         this.add('-invertboost', target, '[from] move: 逆符「天下転覆」');
  1611.                     };
  1612.                 } else if (move.id === 'powdersnow') {
  1613.                     move.name = '氷符「パーフェクトグレーシャリスト」'; //Moderate power, special, Hits 9 times. Chance to freeze. [Ice]
  1614.                     move.basePower = 11;
  1615.                     move.multihit = 9;
  1616.                     move.onPrepareHit = function (target, source, move) {
  1617.                         this.attrLastMove('[still]');
  1618.                         this.add('-anim', source, "Blizzard", target);
  1619.                     };
  1620.                 } else if (move.id === 'sonicboom') {
  1621.                     move.name = '弾幕幻想'; //Will always leave the opponent with 1 HP.
  1622.                     move.type = '無効';
  1623.                     move.damage = 65535;
  1624.                     move.noFaint = true;
  1625.                     move.onPrepareHit = function (target, source, move) {
  1626.                         this.attrLastMove('[still]');
  1627.                         this.add('-anim', source, "Light of Ruin", target);
  1628.                     };
  1629.                 } else if (move.id === 'nightshade'){
  1630.                     move.name = '世界の終わり'; //Deals ~666 damage to all opponents, distributed evenly. Devastating when pulled.
  1631.                     move.type = '惨事';
  1632.                     var oppPokes = 0;
  1633.                     for (var i in target.side.pokemon) {
  1634.                         if (target.side.pokemon[i].hp) {
  1635.                             oppPokes += 1;
  1636.                         }
  1637.                     }
  1638.                     var distribution = Math.ceil(666/oppPokes);
  1639.                     move.damage = distribution;
  1640.                     move.flags = {protect: 1, mirror: 1, authentic: 1},
  1641.                     move.onPrepareHit = function (target, source, move) {
  1642.                         this.attrLastMove('[still]');
  1643.                         this.add('-anim', source, "Night Shade", target);
  1644.                         this.add('-anim', source, "Night Shade", target);
  1645.                         this.add('-anim', source, "Hyperspace Fury", target);
  1646.                     };
  1647.                     move.onHit = function (target, source, move) {
  1648.                         this.add('-message', '相手のポケモンは死のためにマークされていました!')
  1649.                         for (var i in target.side.pokemon) {
  1650.                             if (i > 0 && target.side.pokemon[i].hp) {
  1651.                                 if (!target.side.pokemon[i].marked) target.side.pokemon[i].marked = 0;
  1652.                                 target.side.pokemon[i].marked += distribution;
  1653.                             }
  1654.                         }
  1655.                     };
  1656.                 }
  1657.             }
  1658.             if (name === 'peefrimgar' && move.id === 'attract') {
  1659.                 move.name = 'Gay Agenda';
  1660.                 move.onPrepareHit = function (target, source, move) {
  1661.                     this.attrLastMove('[still]');
  1662.                     this.add('-anim', source, "Attract", target);
  1663.                 };
  1664.                 delete move.volatileStatus;
  1665.                 move.onHit = function (target, source, move) {
  1666.                     if (target.gender === 'M') {
  1667.                         target.gender = 'F';
  1668.                         target.addVolatile('attract');
  1669.                         target.gender = 'M';
  1670.                         target.addVolatile('confusion');
  1671.                         target.trySetStatus('psn');
  1672.                     } else if (target.gender === 'F') {
  1673.                         this.directDamage(source.maxhp / 2, source, source);
  1674.                         this.directDamage(target.maxhp / 2, target, target);
  1675.                     } else {
  1676.                         this.add('-message', 'Peef could not comprehend the genderless target!');
  1677.                         this.useMove('Self-Destruct', source);
  1678.                     }
  1679.                 };
  1680.             }
  1681.             if (move.id === 'spikes' && name === 'quotecs') {
  1682.                 move.name = 'Diversify';
  1683.                 move.self = {boosts: {atk:1, spd:1}};
  1684.                 move.onTryHit = function (target, source) {
  1685.                     this.attrLastMove('[still]');
  1686.                     this.add('-anim', source, "Eruption", source);
  1687.                 };
  1688.             }
  1689.             // Voices signature moves.
  1690.             if (name === 'aesf' && move.id === 'assist') {
  1691.                 move.onHit = function (target) {
  1692.                     this.useMove('thousandarrows', target);
  1693.                 }
  1694.             }
  1695.             if (name === 'aesf' && move.id === 'thousandarrows') {
  1696.                 move.basePower = 60; //To prevent aesf from being 3op
  1697.             }
  1698.             if (name === 'cactuscacti' && move.id === 'spikecannon') {
  1699.                 move.name = 'Spike Canon';
  1700.                 move.basePower = 80;
  1701.                 move.type = 'Grass';
  1702.                 delete move.multihit;
  1703.                 var spikes = !!(target.side.sideConditions.spikes);
  1704.                 var slayers = 0;
  1705.                 if (spikes) slayers = target.side.sideConditions.spikes.layers;
  1706.                 var tspikes = !!(target.side.sideConditions.toxicspikes);
  1707.                 var tlayers = 0;
  1708.                 if (tspikes) tlayers = target.side.sideConditions.toxicspikes.layers;
  1709.                 var gen = pokemon.gender;
  1710.                 var ten = target.gender;
  1711.                 move.onPrepareHit = function (target, source, move) {
  1712.                     this.attrLastMove('[still]');
  1713.                     this.add('-anim', source, "Pin Missile", target);
  1714.                 }
  1715.                 switch (slayers + tlayers) {
  1716.                 case 5:
  1717.                     move.onHit = function (target, source) {
  1718.                         target.setStatus('par');
  1719.                         target.addVolatile('confusion');
  1720.                         source.gender = target.gender === 'M' ? 'F' : 'M';
  1721.                         if (target.gender !== 'M' && target.gender !== 'F') target.gender = 'F';
  1722.                         target.addVolatile('attract');
  1723.                         source.gender = gen;
  1724.                         target.gender = ten;
  1725.                         target.addVolatile('leechseed');
  1726.                         target.addVolatile('taunt');
  1727.                         target.addVolatile('curse');
  1728.                         target.addVolatile('torment');
  1729.                     };
  1730.                     move.flags = {mirror: 1, authentic: 1};
  1731.                     break;
  1732.                 case 4:
  1733.                     move.onHit = function (target, source) {
  1734.                         target.setStatus('par');
  1735.                         target.addVolatile('confusion');
  1736.                         source.gender = target.gender === 'M' ? 'F' : 'M';
  1737.                         if (target.gender !== 'M' && target.gender !== 'F') target.gender = 'F';
  1738.                         target.addVolatile('attract');
  1739.                         source.gender = gen;
  1740.                         target.gender = ten;
  1741.                         target.addVolatile('leechseed');
  1742.                         target.addVolatile('taunt');
  1743.                     };
  1744.                     move.flags = {mirror: 1, authentic: 1};
  1745.                     break;
  1746.                 case 3:
  1747.                     move.onHit = function (target, source) {
  1748.                         target.trySetStatus('par');
  1749.                         target.addVolatile('confusion');
  1750.                         source.gender = target.gender === 'M' ? 'F' : 'M';
  1751.                         if (target.gender !== 'M' && target.gender !== 'F') target.gender = 'F';
  1752.                         target.addVolatile('attract');
  1753.                         source.gender = gen;
  1754.                         target.gender = ten;
  1755.                         target.addVolatile('taunt');
  1756.                     };
  1757.                     move.flags = {protect: 1, mirror: 1, authentic: 1};
  1758.                     break;
  1759.                 case 2:
  1760.                     move.onHit = function (target, source) {
  1761.                         target.trySetStatus('par');
  1762.                         target.addVolatile('confusion');
  1763.                         source.gender = target.gender === 'M' ? 'F' : 'M';
  1764.                         if (target.gender !== 'M' && target.gender !== 'F') target.gender = 'F';
  1765.                         target.addVolatile('attract');
  1766.                         source.gender = gen;
  1767.                         target.gender = ten;
  1768.                     };
  1769.                     move.flags = {protect: 1, mirror: 1, authentic: 1};
  1770.                     break;
  1771.                 case 1:
  1772.                     move.onHit = function (target, source) {
  1773.                         target.trySetStatus('par');
  1774.                         target.addVolatile('confusion');
  1775.                     };
  1776.                     break;
  1777.                 default:
  1778.                     move.onHit = function (target, source) {
  1779.                         target.addVolatile('confusion');
  1780.                     };
  1781.                     break;
  1782.                 }
  1783.             }
  1784.             if (name === 'dreameatergengar' && move.id === 'splash') {
  1785.                 move.name = 'NOT ARCHEOPS!!';
  1786.                 delete move.onTryHit;
  1787.                 move.onHit = function (pokemon) {
  1788.                     pokemon.archeops = true; //hue programmer joke hue
  1789.                     this.add('c|+Dream Eater Gengar|**BAN** Archeops');
  1790.                     pokemon.faint();
  1791.                 };
  1792.             }
  1793.             if (name === 'dreameatergengar' && move.id === 'dreameater') {
  1794.                 move.type = 'Ghost';
  1795.                 move.drain = [3, 4];
  1796.             }
  1797.             if (name === 'dreameatergengar' && move.id === 'darkvoid') {
  1798.                 move.name = 'Sweet Dreams';
  1799.                 move.accuracy = 100;
  1800.                 move.type = 'Ghost';
  1801.                 move.onPrepareHit = function (target, source, move) {
  1802.                     this.attrLastMove('[still]');
  1803.                     this.add('-anim', source, "Dark Void", target);
  1804.                 };
  1805.                 delete move.status;
  1806.                 move.onHit = function (pokemon, user) {
  1807.                     if (pokemon.status !== 'slp') {
  1808.                         pokemon.trySetStatus('slp');
  1809.                     } else {
  1810.                         pokemon.addVolatile('nightmare');
  1811.                     }
  1812.                 };
  1813.             }
  1814.             if (name === 'dreameatergengar' && move.id === 'meanlook') {
  1815.                 move.name = '1v1 me bro';
  1816.                 move.onPrepareHit = function (target, source, move) {
  1817.                     this.attrLastMove('[still]');
  1818.                     this.add('-anim', source, "Mean Look", target);
  1819.                 };
  1820.                 move.onHit = function (target, source, move) {
  1821.                     if (!target.addVolatile('trapped', source, move, 'trapper')) {
  1822.                         this.add('-fail', target);
  1823.                     } else {
  1824.                         this.add("c|+Dream Eater Gengar|1v1 me irl lgi");
  1825.                         this.add('-start', source, 'typechange', 'Dark/Poison');
  1826.                         source.typesData = [{type: 'Dark', suppressed: false}, {type: 'Poison', suppressed: false}];
  1827.                         source.addVolatile('trapped', source, move, 'trapper');
  1828.                         target.addVolatile('taunt');
  1829.                         source.addVolatile('taunt');
  1830.                     }
  1831.                 };
  1832.             }
  1833.             if (move.id === 'razorleaf' && name === 'dremz') {
  1834.                 move.name = '420 BLAZE IT';
  1835.                 move.basePower = 420;
  1836.                 move.accuracy = 420;
  1837.                 delete move.critratio;
  1838.                 move.onEffectiveness = function (typeMod, type, move) {
  1839.                     return typeMod + this.getEffectiveness('Fire', type);
  1840.                 };
  1841.                 move.onPrepareHit = function (target, source, move) {
  1842.                     this.attrLastMove('[still]');
  1843.                     this.add('-anim', source, "Leaf Storm", target);
  1844.                     this.add('-anim', target, "Fire Blast", target);
  1845.                 };
  1846.                 move.onHit = function (target, source, move) {
  1847.                     this.add('c|+DreMZ|420');
  1848.                     this.add('c|+DreMZ|BLAZE');
  1849.                     this.add('c|+DreMZ|IT');
  1850.                     source.typesData = [
  1851.                         {type: 'Grass', suppressed: false,  isAdded: false}
  1852.                     ];
  1853.                     if (this.random(420) < 420) source.setStatus('brn');
  1854.                     source.typesData = [
  1855.                         {type: 'Grass', suppressed: false,  isAdded: false},
  1856.                         {type: 'Fire', suppressed: false,  isAdded: false}
  1857.                     ];
  1858.                 };
  1859.                 move.recoil = [420, 420];
  1860.                 move.self = {
  1861.                     boosts: {atk: -420}
  1862.                 };
  1863.             }
  1864.             if (name === 'illusio' && move.id === 'chatter') {
  1865.                 move.name = 'Name Change';
  1866.                 move.onPrepareHit = function (target, source, move) {
  1867.                     this.attrLastMove('[still]');
  1868.                     this.add('-anim', source, "Chatter", target);
  1869.                 };
  1870.                 move.onHit = function (pokemon, user) {
  1871.                     var template = pokemon.template;
  1872.                     if (pokemon.fainted || pokemon.illusion) {
  1873.                         return false;
  1874.                     }
  1875.                     if (!template.abilities || (pokemon && pokemon.transformed) || (user && user.transformed)) {
  1876.                         return false;
  1877.                     }
  1878.                     if (!user.formeChange(template, true)) {
  1879.                         return false;
  1880.                     }
  1881.                     user.transformed = true;
  1882.                     user.illusioTransformed = true;
  1883.                     user.typesData = [];
  1884.                     for (var i = 0, l = pokemon.typesData.length; i < l; i++) {
  1885.                         user.typesData.push({
  1886.                             type: pokemon.typesData[i].type,
  1887.                             suppressed: false,
  1888.                             isAdded: pokemon.typesData[i].isAdded
  1889.                         });
  1890.                     }
  1891.                     for (var statName in user.stats) {
  1892.                         user.stats[statName] = pokemon.stats[statName];
  1893.                     }
  1894.                     user.moveset = [];
  1895.                     user.moves = [];
  1896.                     for (var i = 0; i < pokemon.moveset.length; i++) {
  1897.                         var move = this.getMove(user.set.moves[i]);
  1898.                         var moveData = pokemon.moveset[i];
  1899.                         var moveName = moveData.move;
  1900.                         if (moveData.id === 'hiddenpower') {
  1901.                             moveName = 'Hidden Power ' + user.hpType;
  1902.                         }
  1903.                         user.moveset.push({
  1904.                             move: moveName,
  1905.                             id: moveData.id,
  1906.                             pp: move.noPPBoosts ? moveData.maxpp : 5,
  1907.                             maxpp: move.noPPBoosts ? moveData.maxpp : 5,
  1908.                             target: moveData.target,
  1909.                             disabled: false
  1910.                         });
  1911.                         user.moves.push(toId(moveName));
  1912.                     }
  1913.                     for (var j in pokemon.boosts) {
  1914.                         user.boosts[j] = pokemon.boosts[j];
  1915.                     }
  1916.                     this.add('-transform', user, pokemon);
  1917.                     user.setAbility(pokemon.ability);
  1918.                     user.originalName = user.name;
  1919.                     user.name = pokemon.name;
  1920.                     user.update();
  1921.                 };
  1922.             }
  1923.             if (move.id === 'infestation' && name === 'insanelegend') {
  1924.                 move.name = 'Bidoof Army';
  1925.                 move.basePower = 80;
  1926.                 move.category = 'Physical';
  1927.                 move.type = 'Water';
  1928.                 move.secondaries = [{
  1929.                     chance: 100,
  1930.                     status: 'tox'
  1931.                 }];
  1932.             }
  1933.             if (name === 'kitkasai' && move.id === 'judgment') {
  1934.                 move.name = 'Kagome Kagome';
  1935.                 move.basePower = 125;
  1936.                 move.onTryHit = function (target, source, move) {
  1937.                     this.attrLastMove('[still]');
  1938.                     var movAnim = (this.runEvent('Plate', pokemon, null, 'judgment', 'Normal') === 'Ghost') ? "Psystrike" : "Judgment";
  1939.                     this.add('-anim', source, movAnim, target);
  1940.                 };
  1941.                 move.secondaries = [{
  1942.                     chance: 20,
  1943.                     status: 'brn'
  1944.                 }];
  1945.             }
  1946.             if (name === 'lcass4919' && move.id === 'boomburst') {
  1947.                 move.name = 'Smiting of Xatu';
  1948.                 move.onEffectiveness = function (typeMod, type, move) {
  1949.                     return typeMod + this.getEffectiveness('Psychic', type);
  1950.                 };
  1951.                 move.flags = {protect: 1, mirror: 1};
  1952.                 move.onPrepareHit = function (target, source, move) {
  1953.                     this.attrLastMove('[still]');
  1954.                     this.add('-anim', source, "Thunder", target);
  1955.                 };
  1956.             }
  1957.             if (name === 'leafshield' && move.id === 'spikyshield') {
  1958.                 move.name = 'Leaf Shield';
  1959.                 move.self = {boosts: {def:2}};
  1960.                 move.onPrepareHit = function (target, source, move) {
  1961.                     this.attrLastMove('[still]');
  1962.                     this.add('-anim', source, "Leaf Storm", target);
  1963.                     if (source.volatiles['leafshield']) return false;
  1964.                     return !!this.willAct() && this.runEvent('StallMove', target);
  1965.                 };
  1966.                 move.onHit = function (target, source, move) {
  1967.                     source.addVolatile('stall');
  1968.                     source.addVolatile('leafshield');
  1969.                 }
  1970.             }
  1971.             if (name === 'misakamikoto' && move.id === 'playrough') {
  1972.                 move.name = 'Anime Girl';
  1973.                 move.accuracy = 100;
  1974.                 move.basePower = 80;
  1975.                 move.basePowerCallback = function (pokemon) {
  1976.                     if (pokemon.anime > 3) return 100;
  1977.                     return 80;
  1978.                 };
  1979.                 move.onPrepareHit = function (target, source, move) {
  1980.                     this.attrLastMove('[still]');
  1981.                     this.add('-anim', source, "Play Rough", target);
  1982.                     if (!source.anime) source.anime = 0;
  1983.                     source.anime++;
  1984.                 };
  1985.                 move.self = {boosts: {atk:1, spe:1}};
  1986.                 delete move.secondary;
  1987.                 delete move.secondaries;
  1988.             }
  1989.             if (name === 'mamp' && move.id === 'present') {
  1990.                 var pepe = this.random(10) < 3 ? -1 : 1
  1991.                 if (target.pepe && target.pepe !== 0) pepe = target.pepe;
  1992.                 move.name = 'Rare Pepe';
  1993.                 move.accuracy = 100;
  1994.                 move.category = 'Special';
  1995.                 delete move.onModifyMove;
  1996.                 delete move.heal;
  1997.                 move.basePower = 0;
  1998.                 if (pepe > 0) {
  1999.                     move.basePower = 150;
  2000.                     move.volatileStatus = 'confusion'
  2001.                     move.onPrepareHit = function (target, source, move) {
  2002.                         this.attrLastMove('[still]');
  2003.                         this.add('-anim', source, "Techno Blast", target);
  2004.                         target.pepe = 1
  2005.                     }
  2006.                 }
  2007.                 if (pepe < 0) {
  2008.                     move.onHit = function (target, source, move) {
  2009.                         if (target.hp < target.maxhp) this.heal(target.maxhp, target, source, "Rare Pepe");
  2010.                         if (target.status) target.cureStatus();
  2011.                     }
  2012.                     move.onPrepareHit = function (target, source, move) {
  2013.                         this.attrLastMove('[still]');
  2014.                         this.add('-anim', source, "Heal Pulse", target);
  2015.                         target.pepe = -1;
  2016.                     }
  2017.                 }
  2018.             }
  2019.             if (move.id === 'bide' && name === 'othermetagames') {
  2020.                 move.name = 'Battly Move';
  2021.                 delete move.volatileStatus;
  2022.                 move.category = 'Status';
  2023.                 if (pokemon.battly === 'Hidden Type') {
  2024.                     move.onHit = function (target, source, move) {
  2025.                         source.moveset[3].id = source.moves[3] = 'shadowball';
  2026.                         source.moveset[3].move = 'Shadow Ball';
  2027.                         source.moveset[3].pp = source.moveset[3].maxpp = 24;
  2028.                         source.moveset[3].target = 'normal';
  2029.                         this.add('-message', '+Other Metagames forgot Battly Move and learned Shadow Ball!');
  2030.                         this.add('-start', source, 'typechange', 'Normal/Ghost');
  2031.                         source.typesData = [
  2032.                             {type: 'Normal', suppressed: false,  isAdded: false},
  2033.                             {type: 'Ghost', suppressed: false,  isAdded: false}
  2034.                         ];
  2035.                         source.activated = true;
  2036.                     }
  2037.                 } else if (pokemon.battly === 'Balanced Hackmons') {
  2038.                     move.onHit = function (target, source, move) {
  2039.                         source.setAbility('magicbounce');
  2040.                         this.add('-ability', source, source.ability);
  2041.                         source.moveset[3].id = source.moves[3] = 'metalburst';
  2042.                         source.moveset[3].move = 'Metal Burst';
  2043.                         source.moveset[3].pp = 16;
  2044.                         source.moveset[3].target = 'normal';
  2045.                         this.add('-message', '+Other Metagames forgot Battly Move and learned Metal Burst!');
  2046.                         source.activated = true;
  2047.                     }
  2048.                 } else if (pokemon.battly === '1v1') {
  2049.                     move.onHit = function (target, source, move) {
  2050.                         source.setAbility('analytic');
  2051.                         this.add('-ability', source, source.ability);
  2052.                         source.moveset[3].id = source.moves[3] = 'triattack';
  2053.                         source.moveset[3].move = 'Tri Attack';
  2054.                         source.moveset[3].pp = 16;
  2055.                         source.moveset[3].target = 'normal';
  2056.                         this.add('-message', '+Other Metagames forgot Battly Move and learned Tri Attack!');
  2057.                         source.activated = true;
  2058.                     }
  2059.                 } else if (pokemon.battly === 'Tier Shift') {
  2060.                     move.onHit = function (target, source, move) {
  2061.                         source.shift = 1;
  2062.                         this.add('-message', '+Other Metagames has recieved buffs from Tier Shift!');
  2063.                         source.moveset[3].id = source.moves[3] = 'toxic';
  2064.                         source.moveset[3].move = 'Toxic';
  2065.                         source.moveset[3].pp = 16;
  2066.                         source.moveset[3].target = 'normal';
  2067.                         this.add('-message', '+Other Metagames forgot Battly Move and learned Toxic!');
  2068.                         source.activated = true;
  2069.                     }
  2070.                 } else if (pokemon.battly === 'Almost Any Ability') {
  2071.                     move.onHit = function (target, source, move) {
  2072.                         source.setAbility('poisonheal');
  2073.                         this.add('-ability', source, source.ability);
  2074.                         source.trySetStatus('tox');
  2075.                         source.moveset[3].id = source.moves[3] = 'toxic';
  2076.                         source.moveset[3].move = 'Toxic';
  2077.                         source.moveset[3].pp = 16;
  2078.                         source.moveset[3].target = 'normal';
  2079.                         this.add('-message', '+Other Metagames forgot Battly Move and learned Toxic!');
  2080.                         source.activated = true;
  2081.                     }
  2082.                 } else {
  2083.                     move.onHit = function (target, source, move) {
  2084.                         source.setAbility('download');
  2085.                         source.moveset[3].id = source.moves[3] = 'boomburst';
  2086.                         source.moveset[3].move = 'Boomburst';
  2087.                         source.moveset[3].pp = 16;
  2088.                         source.moveset[3].target = 'normal';
  2089.                         this.add('-message', '+Other Metagames forgot Battly Move and learned Boomburst!');
  2090.                         source.activated = true;
  2091.                     }
  2092.                 }
  2093.             }
  2094.             if (move.id === 'splash' && name === 'ransei') {
  2095.                 move.name = 'Alt Change';
  2096.                 delete move.onTryHit;
  2097.                 move.onHit = function (pokemon) {
  2098.                     pokemon.faint();
  2099.                 };
  2100.             }
  2101.             if (move.id === 'roost' && name === 'spartanmalice') {
  2102.                 move.name = 'Theorymon';
  2103.                 move.target = 'normal';
  2104.                 delete move.heal;
  2105.                 move.onPrepareHit = function (target, source, move) {
  2106.                     this.attrLastMove('[still]');
  2107.                     this.add('-anim', source, "Roost", source);
  2108.                     if (pokemon.maxhp === pokemon.hp) return false;
  2109.                     if (pokemon.theory === 'STABmons') {
  2110.                         var moveMat = [source.moveset[0].id, source.moveset[1].id, source.moveset[2].id];
  2111.                         if (moveMat.indexOf('vcreate') > -1 && moveMat.indexOf('dragonascent') > -1 && moveMat.indexOf('tailwind') > -1) return false;
  2112.                     } else if (pokemon.theory === 'Tier Shift') {
  2113.                         if (pokemon.shift !== 0) return false;
  2114.                     } else if (pokemon.theory === '1v1') {
  2115.                         if (pokemon.volatiles['trapped']) return false;
  2116.                     }
  2117.                     this.heal(source.maxhp/2, source, source, "Theorymon");
  2118.                 }
  2119.                 if (pokemon.theory === 'STABmons') {
  2120.                     move.onHit = function (target, source, move) {
  2121.                         var moveMat = [source.moveset[0].id, source.moveset[1].id, source.moveset[2].id];
  2122.                         var correction = [moveMat.indexOf('flareblitz'), moveMat.indexOf('outrage'), moveMat.indexOf('dragondance')];
  2123.                         var change = false;
  2124.                         while (!change) {
  2125.                             var selector = this.random(3)
  2126.                             var randMove = correction[selector];
  2127.                             if (randMove > -1 && !selector) {
  2128.                                 source.moveset[randMove].id = 'vcreate';
  2129.                                 source.moveset[randMove].name = 'V-create';
  2130.                                 this.add('-message', '+SpartanMalice forgot Flare Blitz and learned V-create!');
  2131.                                 change = true;
  2132.                             } else if (randMove > -1 && selector === 1) {
  2133.                                 source.moveset[randMove].id = 'dragonascent';
  2134.                                 source.moveset[randMove].name = 'Dragon Ascent';
  2135.                                 this.add('-message', '+SpartanMalice forgot Outrage and learned Dragon Ascent!');
  2136.                                 change = true;
  2137.                             } else if (randMove > -1) {
  2138.                                 source.moveset[randMove].id = 'tailwind';
  2139.                                 source.moveset[randMove].name = 'Tailwind';
  2140.                                 this.add('-message', '+SpartanMalice forgot Dragon Dance and learned Tailwind!');
  2141.                                 change = true;
  2142.                             }
  2143.                         }
  2144.                     }
  2145.                 } else if (pokemon.theory === 'Almost Any Ability') {
  2146.                     move.onHit = function (target, source, move) {
  2147.                         var selector = this.random(7);
  2148.                         var ab = ['Poison Heal', 'Tough Claws', 'Protean', 'Adaptability', 'Drought', 'Magic Bounce', 'Filter'][selector];
  2149.                         source.setAbility(toId(ab));
  2150.                         this.add('-ability', pokemon, ab, '[from] move: Theorymon');
  2151.                     }
  2152.                 /*} else if (pokemon.theory === 'Inverse Battle') {
  2153.                     move.onHit = function (target, source, move) {
  2154.                         if (!source.volatiles['inversebattle'] && !target.volatiles['inversebattle']) {
  2155.                             source.addVolatile('inversebattle');
  2156.                             source.side.addSideCondition('inversebattle');
  2157.                             target.side.addSideCondition('inversebattle');
  2158.                             this.add('-message', '+SpartanMalice inverted the type chart!');
  2159.                         } else {
  2160.                             source.removeVolatile('inversebattle');
  2161.                             source.side.removeSideCondition('inversebattle');
  2162.                             target.removeVolatile('inversebattle');
  2163.                             target.side.removeSideCondition('inversebattle');
  2164.                             this.add('-message', 'The inverted type chart returned to normal!');
  2165.                         }
  2166.                     }
  2167.                 */} else if (pokemon.theory === 'Tier Shift') {
  2168.                     move.onHit = function (target, source, move) {
  2169.                         source.shift = 1;
  2170.                         this.add('-message', '+SpartanMalice has recieved buffs from Tier Shift!');
  2171.                     }
  2172.                 } else {
  2173.                     move.onHit = function (target, source, move) {
  2174.                         target.addVolatile('trapped', source, move, 'trapper');
  2175.                         source.addVolatile('trapped', target, move, 'trapper');
  2176.                     }
  2177.                 }
  2178.             }
  2179.             if (move.id === 'powertrick' && name === 'theburgerking99') {
  2180.                 move.name = 'Stat Switch';
  2181.                 delete move.volatileStatus;
  2182.                 move.onPrepareHit = function (target, source, move) {
  2183.                     this.attrLastMove('[still]');
  2184.                     this.add('-anim', source, "Topsy-Turvy", source);
  2185.                 };
  2186.                 move.onHit = function (pokemon) {
  2187.                     pokemon.statSwitch = (pokemon.statSwitch) ? false : true;
  2188.                     if (pokemon.statSwitch) {
  2189.                         this.add('-message', '+TheBurgerKing99\'s stats were switched!');
  2190.                     } else {
  2191.                         this.add('-message', '+TheBurgerKing99\'s stats returned to normal!');
  2192.                     }
  2193.                 };
  2194.             }
  2195.             if (move.id === 'partingshot' && name === 'word') {
  2196.                 move.name = 'Tour Win';
  2197.                 move.flags = {authentic: 1, protect: 1};
  2198.                 move.boosts = {atk: -1, def: -1, spd: -1};
  2199.                 move.onPrepareHit = function (target, source, move) {
  2200.                     this.attrLastMove('[still]');
  2201.                     this.add('-anim', source, "Parting Shot", target);
  2202.                 };
  2203.                 move.onHit = function (target, source, move) {
  2204.                     source.side.addSideCondition('tourwin');
  2205.                     for (var i = 0; i < 12; i++) {
  2206.                         var gratz = this.p1.pokemon.concat(this.p2.pokemon)[i];
  2207.                         if (toId(gratz.name) !== name && !gratz.fainted) this.add('c|' + gratz.name + '|' + ['gratz', 'congratulations', 'gj', 'yay', 'grats', 'grates', 'gartz', 'GrATS', 'congrats', 'congratz'][this.random(5)] + ['', '', ' word'][this.random(3)]);
  2208.                         if (gratz === source && !gratz.fainted) this.add('c|+word|thanks');
  2209.                     }
  2210.                 };
  2211.             }
  2212.             if (move.id === 'eggbomb' && name === 'zodiax') {
  2213.                 move.name = 'Protean Shake';
  2214.                 move.accuracy = 100;
  2215.                 move.onPrepareHit = function (target, source, move) {
  2216.                     this.attrLastMove('[still]');
  2217.                     this.add('-anim', source, "Milk Drink", target);
  2218.                     this.add('-anim', source, "Brick Break", target);
  2219.                 };
  2220.                 move.affectedByImmunities = false;
  2221.                 move.onEffectiveness = function (typeMod, type, move) {
  2222.                     return this.getEffectiveness('???', type) + this.getEffectiveness('Bug', type) + this.getEffectiveness('Dark', type) + this.getEffectiveness('Dragon', type) + this.getEffectiveness('Electric', type) + this.getEffectiveness('Fairy', type) + this.getEffectiveness('Fighting', type) + this.getEffectiveness('Fire', type) + this.getEffectiveness('Flying', type) + this.getEffectiveness('Ghost', type) + this.getEffectiveness('Grass', type) + this.getEffectiveness('Ground', type) + this.getEffectiveness('Ice', type) + this.getEffectiveness('Normal', type) + this.getEffectiveness('Poison', type) + this.getEffectiveness('Psychic', type) + this.getEffectiveness('Rock', type) + this.getEffectiveness('Steel', type) + this.getEffectiveness('Water', type);
  2223.                 };
  2224.             }
  2225.        
  2226.             //Regular Users
  2227.             if (name === '0loyd0') {
  2228.                 if (move.id === 'focuspunch' && pokemon.customs[0] === 1) {
  2229.                     move.name = 'Falcon Punch';
  2230.                     move.basePower = 250;
  2231.                     move.type = 'Fire';
  2232.                     move.affectedByImmunities = false; //Too epic
  2233.                     move.beforeTurnCallback = function (pokemon) {
  2234.                         this.add('c|+0Loyd0|FALLCCOOOONNNNN...');
  2235.                         pokemon.addVolatile('focuspunch');
  2236.                     };
  2237.                     move.onPrepareHit = function (target, source, move) {
  2238.                         this.attrLastMove('[still]');
  2239.                         this.add('-anim', source, "Fire Punch", target);
  2240.                         this.add('c|+0Loyd0|PAWWWNCCCHHHHHHH!!!!!!!');
  2241.                     };
  2242.                 } else if (move.id === 'focuspunch' && pokemon.customs[0] === 2) {
  2243.                     move.name = 'Falcon Dash Punch';
  2244.                     move.type = 'Fire';
  2245.                     move.affectedByImmunities = false; //Too epic
  2246.                     move.flags = {contact: 1, protect: 1, punch: 1, authentic: 1};
  2247.                     move.beforeTurnCallback = function (pokemon) {
  2248.                         this.add('c|+0Loyd0|FALLCCOOOONNNNN...');
  2249.                         pokemon.addVolatile('focuspunch');
  2250.                     };
  2251.                     move.onPrepareHit = function (target, source, move) {
  2252.                         this.attrLastMove('[still]');
  2253.                         this.add('-anim', source, "Fire Punch", target);
  2254.                         this.add('c|+0Loyd0|PAWWWNCCCHHHHHHH!!!!!!!');
  2255.                     };
  2256.                 } else if (move.id === 'focuspunch' && pokemon.customs[0] === 3) {
  2257.                     move.name = 'Mighty Falcon Punch';
  2258.                     move.basePower = 160;
  2259.                     move.type = 'Fire';
  2260.                     move.multihit = 2;
  2261.                     move.affectedByImmunities = false; //Too epic
  2262.                     move.beforeTurnCallback = function (pokemon) {
  2263.                         this.add('c|+0Loyd0|FALLCCOOOONNNNN...');
  2264.                         pokemon.addVolatile('focuspunch');
  2265.                     };
  2266.                     move.onPrepareHit = function (target, source, move) {
  2267.                         this.attrLastMove('[still]');
  2268.                         this.add('-anim', source, "Fire Punch", target);
  2269.                         this.add('c|+0Loyd0|PAWWWNCCCHHHHHHH!!!!!!!'); //This punch is so epic that you have to say PAWNCH twice.
  2270.                     };
  2271.                 }
  2272.                 if (move.id === 'skyuppercut' && pokemon.customs[1] === 1) {
  2273.                     move.name = 'Raptor Boost';
  2274.                     move.basePower = 90;
  2275.                     move.secondaries = [
  2276.                         {
  2277.                             chance: 20,
  2278.                             status: 'brn'
  2279.                         }, {
  2280.                             chance: 20,
  2281.                             volatileStatus: 'flinch'
  2282.                         }
  2283.                     ];
  2284.                     move.onPrepareHit = function (target, source, move) {
  2285.                         this.attrLastMove('[still]');
  2286.                         this.add('-anim', source, "Sky Uppercut", target);
  2287.                     };
  2288.                 } else if (move.id === 'skyuppercut' && pokemon.customs[1] === 2) {
  2289.                     move.name = 'Heavy Raptor Boost';
  2290.                     move.basePower = 120;
  2291.                     move.secondaries = [{
  2292.                         chance: 40,
  2293.                         status: 'brn'
  2294.                     }];
  2295.                     move.onPrepareHit = function (target, source, move) {
  2296.                         this.attrLastMove('[still]');
  2297.                         this.add('-anim', source, "Sky Uppercut", target);
  2298.                     };
  2299.                 } else if (move.id === 'skyuppercut' && pokemon.customs[1] === 3) {
  2300.                     move.name = 'Wind-up Raptor Boost';
  2301.                     move.basePower = 60;
  2302.                     move.secondaries = [
  2303.                         {
  2304.                             chance: 10,
  2305.                             status: 'brn'
  2306.                         }, {
  2307.                             chance: 10,
  2308.                             volatileStatus: 'flinch'
  2309.                         }
  2310.                     ];
  2311.                     move.flags = {contact: 1, protect: 1, mirror: 1, punch: 1, authentic: 1};
  2312.                     move.onPrepareHit = function (target, source, move) {
  2313.                         this.attrLastMove('[still]');
  2314.                         this.add('-anim', source, "Sky Uppercut", target);
  2315.                     };
  2316.                 }
  2317.                 if (move.id === 'dive' && pokemon.customs[2] === 1) {
  2318.                     move.name = 'Falcon Dive';
  2319.                     move.basePower = 120;
  2320.                     move.type = 'Fire';
  2321.                     delete move.onTry;
  2322.                     move.onPrepareHit = function (target, source, move) {
  2323.                         this.attrLastMove('[still]');
  2324.                         this.add('-anim', source, "Fly", target);
  2325.                     };
  2326.                     move.onHit = function () {
  2327.                         this.add('c|+0Loyd0|YESZH!!');
  2328.                     };
  2329.                 } else if (move.id === 'dive' && pokemon.customs[2] === 2) {
  2330.                     move.name = 'Falcon Strike';
  2331.                     move.basePower = 80;
  2332.                     move.type = 'Fire';
  2333.                     delete move.onTry;
  2334.                     move.onPrepareHit = function (target, source, move) {
  2335.                         this.attrLastMove('[still]');
  2336.                         this.add('-anim', source, "Fly", target);
  2337.                     };
  2338.                 } else if (move.id === 'dive' && pokemon.customs[2] === 3) {
  2339.                     move.name = 'Explosive Falcon Dive';
  2340.                     move.basePower = 150;
  2341.                     move.type = 'Fire';
  2342.                     delete move.onTry;
  2343.                     move.secondaries = [
  2344.                         {
  2345.                             chance: 30,
  2346.                             status: 'brn'
  2347.                         }
  2348.                     ];
  2349.                     move.onPrepareHit = function (target, source, move) {
  2350.                         this.attrLastMove('[still]');
  2351.                         this.add('-anim', source, "Fly", target);
  2352.                     };
  2353.                     move.onHit = function () {
  2354.                         this.add('c|+0Loyd0|YESZH!!');
  2355.                     };
  2356.                 }
  2357.                 if (move.id === 'blazekick' && pokemon.customs[3] === 1) {
  2358.                     move.name = 'Falcon Kick';
  2359.                     move.basePower = 100;
  2360.                     move.onPrepareHit = function (target, source, move) {
  2361.                         this.attrLastMove('[still]');
  2362.                         this.add('-anim', source, "Blaze Kick", target);
  2363.                         this.add('c|+0Loyd0|FALCON KICK!');
  2364.                     };
  2365.                 } else if (move.id === 'blazekick' && pokemon.customs[3] === 2) {
  2366.                     move.name = 'Falcon Kick Fury';
  2367.                     move.basePower = 30;
  2368.                     move.multihit = 5;
  2369.                     move.onPrepareHit = function (target, source, move) {
  2370.                         this.attrLastMove('[still]');
  2371.                         this.add('-anim', source, "Blaze Kick", target);
  2372.                         this.add('c|+0Loyd0|FALCON KICK!'); //Intentional
  2373.                     };
  2374.                 } else if (move.id === 'blazekick' && pokemon.customs[3] === 3) {
  2375.                     move.name = 'Lightning Kick';
  2376.                     move.basePower = 120;
  2377.                     delete move.secondary;
  2378.                     move.secondaries = [
  2379.                         {
  2380.                             chance: 100,
  2381.                             status: 'par'
  2382.                         }
  2383.                     ];
  2384.                     move.onEffectiveness = function (typeMod, type, move) {
  2385.                         return typeMod + this.getEffectiveness('Electric', type);
  2386.                     };
  2387.                     move.onPrepareHit = function (target, source, move) {
  2388.                         this.attrLastMove('[still]');
  2389.                         this.add('-anim', source, "Blaze Kick", target);
  2390.                         this.add('c|+0Loyd0|FALCON KICK!');
  2391.                     };
  2392.                 }
  2393.             }
  2394.             if (name === 'choonbot' && move.id === 'discharge') {
  2395.                 var choon = this.random(6) + 1;
  2396.                 move.name = '$dicegame';
  2397.                 move.basePower = choon*40;
  2398.                 delete move.secondary;
  2399.                 delete move.secondaries;
  2400.                 move.type = '???';
  2401.                 move.affectedByImmunities = false;
  2402.                 move.onPrepareHit = function (target, source, move) {
  2403.                     this.attrLastMove('[still]');
  2404.                     this.add('-anim', source, "Metronome", source);
  2405.                     this.add('-message', 'ChoonBot is rolling his dice...');
  2406.                 };
  2407.                 move.onTryHit = function(target, source) {
  2408.                     this.add('-message', 'ChoonBot rolled a ' + choon + '!');
  2409.                     var anims = ["PLACEHOLDER OF TRUUUUUUUUUUUTH", "Secret Power", "Judgment"];
  2410.                     this.add('-anim', source, anims[Math.floor((choon-1)/2)], target);
  2411.                 };
  2412.             }
  2413.         }
  2414.     },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement