From a38aa59eaadba8350bf64c4d1734ef14be2f1dbc Mon Sep 17 00:00:00 2001 From: Kevin Lau Date: Thu, 29 Oct 2015 17:10:48 -0700 Subject: [PATCH] Implement November/December Seasonal, Super Squad Showdown --- config/formats.js | 119 +++++---------------------------------- data/aliases.js | 2 +- data/scripts.js | 138 +++++++++++++++++++++++++++++----------------- 3 files changed, 103 insertions(+), 156 deletions(-) diff --git a/config/formats.js b/config/formats.js index b53ab76ac9..f4873e91e4 100644 --- a/config/formats.js +++ b/config/formats.js @@ -432,115 +432,24 @@ exports.Formats = [ } }, { - name: "[Seasonal] Spoopy Party", + name: "[Seasonal] Super Squad Smackdown", desc: ["• Seasonal Ladder"], section: "OM of the Month", - - team: 'randomSpoopy', + team: 'randomHero', ruleset: ['HP Percentage Mod', 'Sleep Clause Mod', 'Cancel Mod'], + onEffectiveness: function (typeMod, target, move, type) { + if (this.activePokemon && this.activePokemon.name === 'Magneto' && move.id === 'flashcannon' && type === 'Steel') return 1; + }, + onSwitchInPriority: 10, onSwitchIn: function (pokemon) { - if (pokemon.species === 'Magikarp') { - this.boost({spe:4, spd:2, def:2}, pokemon, pokemon, 'the power of dank'); - } - }, - onModifyMove: function (move) { - if (move.id === 'aquaring') { - move.volatileStatus = 'wonderring'; - move.onHit = function (pokemon) { - this.add('-start', pokemon, 'Aqua Ring'); - this.add('-message', "7.8/10, too much water - IGN"); - }; - } - if (move.id === 'hyperbeam') { - move.type = 'Water'; - move.accuracy = true; - delete move.self; - move.onTryHit = function (target, source) { - this.add('-message', target.name + "'s fuel cannot melt " + source.name + " beams!"); - }; - } - if (move.id === 'trickortreat') { - switch (this.random(7)) { - case 0: - move.category = 'Special'; - move.type = 'Fire'; - move.basePower = 200; - move.onTryHit = function () { - this.add('-message', "Pumpkin bomb!"); - }; - move.onHit = function () {}; - break; - case 1: - move.category = 'Physical'; - move.type = 'Poison'; - move.basePower = 25; - move.multihit = 4; - move.onTryHit = function () { - this.add('-message', "Toilet paper missile attack!"); - }; - move.onHit = function () {}; - break; - case 2: - move.onTryHit = function () { - this.add('-message', "Yum! Chocolate!"); - }; - move.onHit = function (target, source) { - this.heal(Math.ceil(target.maxhp * 0.5)); - }; - break; - case 3: - move.onTryHit = function () { - this.add('-message', "This is a rather bland candy."); - }; - move.onHit = function (target, source) { - this.heal(Math.ceil(target.maxhp * 0.25)); - target.setStatus('par'); - target.addVolatile('confusion'); - }; - break; - case 4: - move.onTryHit = function () { - this.add('-message', "You are about to be rotten-egged on!"); - }; - move.onHit = function (target, source) { - target.setStatus('tox'); - target.addVolatile('torment'); - }; - break; - case 5: - move.category = 'Special'; - move.type = 'Dark'; - move.basePower = 500; - move.self = {volatileStatus: 'mustrecharge'}; - move.onTryHit = function () { - this.add('-message', "Ultimate Super Hiper Mega Awesome Beam destroyer of worlds!"); - }; - move.onHit = function (target, source) { - this.add('-message', source.name + " was caught in the explosion!"); - source.setStatus('brn'); - source.addVolatile('disabled'); - source.addVolatile('confusion'); - }; - break; - case 6: - move.onTryHit = function () { - this.add('-message', "Have some refreshment, my fellow."); - }; - move.onHit = function (target, source) { - target.addVolatile('aquaring'); - }; - break; - } - } - }, - onResidual: function () { - var allpokes = this.p1.active.concat(this.p2.active); - var pokemon; - for (var i = 0; i < allpokes.length; i++) { - pokemon = allpokes[i]; - if (pokemon.hp && pokemon.volatiles['wonderring']) { - this.heal(pokemon.maxhp / 8, pokemon, pokemon, 'dank memes'); - } + switch (pokemon.name) { + case 'Iron Man': + pokemon.addType('Steel'); + this.add('-start', pokemon, 'typechange', 'Fire/Steel'); + break; + case 'Spiderman': + this.boost({atk: 1, spe: 2}, pokemon, pokemon, 'Spidey Sense'); + break; } } }, diff --git a/data/aliases.js b/data/aliases.js index c17ca532a5..0253b515ac 100644 --- a/data/aliases.js +++ b/data/aliases.js @@ -17,7 +17,7 @@ exports.BattleAliases = { "vgc": "VGC 2015", "bsdoubles": "Battle Spot Doubles", "bstriples": "Battle Spot Triples", - "seasonal": "[Seasonal] Spoopy Party", + "seasonal": "[Seasonal] Super Squad Smackdown", "createapokemon": "CAP", "2v2": "2v2 Doubles", "cc1v1": "Challenge Cup 1v1", diff --git a/data/scripts.js b/data/scripts.js index e1c20a67e2..8b4ac777e1 100644 --- a/data/scripts.js +++ b/data/scripts.js @@ -3179,61 +3179,99 @@ exports.BattleScripts = { shiny: !this.random(template.id === 'missingno' ? 4 : 1024) }; }, - randomSpoopyTeam: function () { - var pool = [ - 'ekans', 'arbok', 'golbat', 'parasect', 'muk', 'gengar', 'marowak', 'weezing', 'tangela', 'mr. mime', 'ditto', - 'kabutops', 'noctowl', 'ariados', 'crobat', 'umbreon', 'murkrow', 'misdreavus', 'gligar', 'granbull', 'sneasel', - 'houndoom', 'mightyena', 'dustox', 'shiftry', 'shedinja', 'exploud', 'sableye', 'mawile', 'swalot', 'carvanha', - 'sharpedo', 'cacturne', 'seviper', 'lunatone', 'claydol', 'shuppet', 'banette', 'duskull', 'dusclops', 'absol', - 'snorunt', 'glalie', 'drifloon', 'drifblim', 'mismagius', 'honchkrow', 'skuntank', 'spiritomb', 'drapion', - 'toxicroak', 'weavile', 'tangrowth', 'gliscor', 'dusknoir', 'froslass', 'rotom', 'rotomwash', 'rotomheat', - 'rotommow', 'purrloin', 'liepard', 'swoobat', 'whirlipede', 'scolipede', 'basculin', 'krookodile', 'sigilyph', - 'yamask', 'cofagrigus', 'garbodor', 'zorua', 'zoroark', 'gothita', 'gothorita', 'gothitelle', 'frillish', - 'jellicent', 'joltik', 'galvantula', 'elgyem', 'beheeyem', 'litwick', 'lampent', 'chandelure', 'golurk', - 'zweilous', 'hydreigon', 'volcarona', 'espurr', 'meowstic', 'honedge', 'doublade', 'aegislash', 'malamar', - 'phantump', 'trevenant', 'pumpkaboo', 'gourgeist', 'noibat', 'noivern', 'magikarp', 'farfetchd', 'machamp' + randomHeroTeam: function () { + var teams = [ + ['Wolverine', 'Professor X', 'Cyclops', 'Nightcrawler', 'Phoenix', 'Emma Frost', 'Storm', 'Iceman'], + ['Magneto', 'Mystique', 'Quicksilver', 'Scarlet Witch', 'Blob', 'Pyro', 'Sabretooth', 'Juggernaut', 'Toad'], + ['Captain America', 'Hulk', 'Iron Man', 'Hawkeye', 'Black Widow', 'Thor', 'Nick Fury', 'Vision'], + ['Starlord', 'Gamora', 'Groot', 'Rocket Raccoon', 'Drax the Destroyer', 'Nova'], + ['Batman', 'Superman', 'Aquaman', 'Wonder Woman', 'Green Lantern', 'The Flash', 'Green Arrow', 'Firestorm'], + ['Robin', 'Starfire', 'Cyborg', 'Beast Boy', 'Raven', 'Jinx', 'Terra', 'Blue Beetle'], + ['Mr. Fantastic', 'Invisible Woman', 'Thing', 'Human Torch', 'Spiderman', 'Ant-Man'], + ['Baymax', 'Honey Lemon', 'GoGo Tomago', 'Wasabi-no-Ginger', 'Fredzilla', 'Silver Samurai', 'Sunfire'], + ['Joker', 'Deadshot', 'Harley Quinn', 'Boomerang', 'Killer Croc', 'Enchantress'], + ['Poison Ivy', 'Bane', 'Scarecrow', 'Two-Face', 'Penguin', 'Mr. Freeze', 'Catwoman'] ]; - var team = []; + var mons = { + 'Wolverine': {species: 'excadrill', ability: 'Regenerator', item: 'lifeorb', gender: 'M'}, + 'Professor X': {species: 'beheeyem', moves: ['psystrike', 'thunderbolt', 'calmmind', 'aurasphere', 'signalbeam'], gender: 'M'}, + 'Cyclops': {species: 'sigilyph', moves: ['icebeam', 'psybeam', 'signalbeam', 'chargebeam'], item: 'lifeorb', + ability: 'tintedlens', gender: 'M'}, + 'Nightcrawler': {species: 'sableye', gender: 'M'}, 'Phoenix': {species: 'Ho-oh', gender: 'F'}, + 'Emma Frost': {species: 'dianciemega', gender: 'F'}, 'Storm': {species: 'tornadus', gender: 'F'}, + 'Iceman': {species: 'regice', moves: ['freezedry', 'thunderbolt', 'focusblast', 'thunderwave'], gender: 'M'}, + 'Magneto': {species: 'magnezone', required: 'flashcannon', gender: 'M'}, 'Quicksilver': {species: 'lucario', gender: 'M', required: 'extremespeed'}, 'Scarlet Witch': {species: 'delphox', gender: 'F'}, + 'Blob': {species: 'snorlax', gender: 'M'}, 'Pyro': {species: 'magmortar', gender: 'M'}, 'Juggernaut': {species: 'conkeldurr', gender: 'M'}, 'Toad': {species: 'poliwrath', gender: 'M'}, + 'Mystique': {species: 'mew', moves: ['knockoff', 'zenheadbutt', 'stormthrow', 'acrobatics', 'fakeout'], ability: 'Illusion', gender: 'F'}, + 'Sabretooth': {species: 'zangoose', ability: 'Tough Claws', item: 'lifeorb', + moves: ['swordsdance', 'quickattack', 'doubleedge', 'closecombat', 'knockoff'], gender: 'M'}, + 'Captain America': {species: 'braviary', gender: 'M'}, 'Hulk': {species: 'machamp', shiny: true, gender: 'M'}, + 'Iron Man': {species: 'magmortar', moves: ['fireblast', 'flashcannon', 'thunderbolt', 'energyball', 'focusblast', 'substitute'], gender: 'M'}, + 'Hawkeye': {species: 'gliscor', item: 'flyinggem', moves: ['thousandarrows', 'acrobatics', 'stoneedge', 'knockoff'], ability: 'hypercutter', gender: 'M'}, + 'Black Widow': {species: 'greninja', gender: 'F', shiny: true}, 'Thor': {species: 'ampharosmega', gender: (this.random(10) ? 'M' : 'F')}, 'Nick Fury': {species: 'primeape', gender: 'M'}, + 'Vision': {species: 'genesectshock', shiny: true}, 'Starlord': {species: 'medicham', required: 'teeterdance', gender: 'M'}, + 'Groot': {species: 'trevenant', moves: ['hornleech', 'shadowforce', 'hammerarm', 'icepunch'], item: 'assaultvest', gender: 'N'}, + 'Rocket Raccoon': {species: 'linoone', gender: 'M'}, 'Gamora': {species: 'gardevoirmega', gender: 'F'}, + 'Drax the Destroyer': {species: 'throh', gender: 'M'}, 'Nova': {species: 'electivire', gender: 'M'}, 'Batman': {species: 'crobat', gender: 'M'}, + 'Superman': {species: 'deoxys', gender: 'M'}, 'Aquaman': {species: 'samurott', gender: 'M'}, 'Wonder Woman': {species: 'lopunnymega', gender: 'F'}, + 'Green Lantern': {species: 'reuniclus', moves: ['psyshock', 'shadowball', 'aurasphere', 'recover'], gender: 'M'}, 'The Flash': {species: 'blaziken', gender: 'M'}, + 'Green Arrow': {species: 'sceptilemega', moves: ['dragonpulse', 'thousandarrows', 'seedflare', 'flashcannon'], gender: 'M'}, + 'Firestorm': {species: 'infernape', gender: 'M'}, 'Robin': {species: 'talonflame', gender: 'M'}, 'Starfire': {species: 'latias', gender: 'F'}, + 'Cyborg': {species: 'golurk', gender: 'M'}, 'Raven': {species: 'absolmega', gender: 'F'}, 'Jinx': {species: 'mismagius', gender: 'F'}, + 'Terra': {species: 'nidoqueen', gender: 'F'}, 'Blue Beetle': {species: 'heracross', gender: 'M'}, 'Beast Boy': {species: 'virizion', gender: 'M'}, + 'Mr. Fantastic': {species: 'zygarde', gender: 'M'}, 'Invisible Woman': {species: 'cresselia', gender: 'F'}, 'Thing': {species: 'regirock', gender: 'M'}, + 'Human Torch': {species: 'typhlosion', gender: 'M'}, 'Spiderman': {species: 'Ariados', gender: 'M'}, 'Ant-Man': {species: 'durant', gender: 'M'}, + 'Baymax': {species: 'regigigas'}, 'Honey Lemon': {species: 'goodra', gender: 'F'}, 'GoGo Tomago': {species: 'heliolisk', gender: 'F'}, + 'Wasabi-no-Ginger': {species: 'gallademega', gender: 'M'}, 'Fredzilla': {species: 'tyrantrum', gender: 'M'}, 'Silver Samurai': {species: 'cobalion', gender: 'M'}, + 'Sunfire': {species: 'charizardmegay', gender: 'M'}, 'Joker': {species: 'mrmime', gender: 'M'}, 'Boomerang': {species: 'marowak', gender: 'M'}, + 'Deadshot': {species: 'kingdra', ability: 'No Guard', item: 'scopelens', moves: ['dracometeor', 'hydropump', 'searingshot', 'aurasphere'], gender: 'M'}, + 'Harley Quinn': {species: 'lopunny', gender: 'F'}, 'Killer Croc': {species: 'krookodile', gender: 'M'}, 'Enchantress': {species: 'mesprit', gender: 'F'}, + 'Bane': {species: 'metagross', gender: 'M'}, 'Scarecrow': {species: 'cacturne', moves: ['gunkshot', 'seedbomb', 'knockoff', 'drainpunch'], shiny: true, gender: 'M'}, + 'Penguin': {species: 'empoleon', gender: 'M'}, 'Two-Face': {species: 'zweilous', gender: 'M'}, 'Mr. Freeze': {species: 'beartic', gender: 'M'}, 'Catwoman': {species: 'persian', gender: 'F'}, + 'Poison Ivy': {species: 'roserade', gender: 'F'} + }; + + if (!this.seasonal) this.seasonal = {}; + + var teamDetails = {megaCount: 1, stealthRock: 0, hazardClear: 0}; + var sides = Object.keys(teams); + var side; + while (side === undefined || this.seasonal.side === side) { + // You can't have both players have the same squad + side = this.sampleNoReplace(sides); + } + if (this.seasonal.side === undefined) this.seasonal.side = side; + + var heroes = teams[side]; + var pokemonTeam = []; + var hero, heroTemplate, template, pokemon; for (var i = 0; i < 6; i++) { - var mon = this.sampleNoReplace(pool); - var template = this.getTemplate(mon); - if (mon === 'pumpkaboo' || mon === 'gourgeist') { - var forme = this.random(4); - if (forme > 0) { - mon = template.otherFormes[forme - 1]; - template = this.getTemplate(mon); - } - } - var set = this.randomSet(template, i, {megaCount: 1}); - set.species = mon; - if (mon === 'magikarp') { - set.name = 'ayy lmao'; - set.item = 'powerherb'; - set.ability = 'primordialsea'; - set.moves = ['hyperbeam', 'geomancy', 'originpulse', 'aquaring', 'trickortreat']; - } else { - if (mon === 'golurk') { - set.name = 'Spoopy Skilenton'; - } else if (mon === 'farfetchd') { - set.name = 'Le Toucan of Luck'; - } else if (mon === 'machamp') { - set.name = 'John Cena'; - } else if (mon === 'espurr') { - set.name = 'Devourer of Souls'; - } - set.moves[4] = 'trickortreat'; - if (set.item === 'Assault Vest') { - set.item = 'Leftovers'; - } - if (set.item === 'Choice Band' || set.item === 'Choice Specs') { - set.item = 'Life Orb'; - } - } - team.push(set); + hero = this.sampleNoReplace(heroes); + heroTemplate = mons[hero]; + + template = this.getTemplate(heroTemplate.species); + if (heroTemplate.moves) template.randomBattleMoves = heroTemplate.moves; + if (heroTemplate.required) template.requiredMove = heroTemplate.required; + + pokemon = this.randomSet(template, i, teamDetails); + + if (heroTemplate.ability) pokemon.ability = heroTemplate.ability; + if (heroTemplate.gender) pokemon.gender = heroTemplate.gender; + if (heroTemplate.item) pokemon.item = heroTemplate.item; + pokemon.species = pokemon.name; + pokemon.name = hero; + pokemon.shiny = !!heroTemplate.shiny; + + pokemonTeam.push(pokemon); + + if (pokemon.ability === 'Snow Warning') teamDetails['hail'] = 1; + if (pokemon.ability === 'Drizzle' || pokemon.moves.indexOf('raindance') >= 0) teamDetails['rain'] = 1; + if (pokemon.moves.indexOf('stealthrock') >= 0) teamDetails.stealthRock++; + if (pokemon.moves.indexOf('defog') >= 0 || pokemon.moves.indexOf('rapidspin') >= 0) teamDetails.hazardClear++; } - return team; + return pokemonTeam; }, randomFactorySets: require('./factory-sets.json'), randomFactorySet: function (template, slot, teamData, tier) {