From 277ca6564189e17feb42cfd52f3d9fc5b2942e6d Mon Sep 17 00:00:00 2001 From: Joim Date: Tue, 5 Feb 2013 08:33:17 +0100 Subject: [PATCH] Adding Valentine Venture random team selection Added the random team selection for the new Seasonal ladder for February Valentine Venture (randomSeasonalVVTeam). It's a doubles ladder that chooses three couples for each player. --- data/scripts.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/data/scripts.js b/data/scripts.js index 32a86de553..e1495cbd08 100644 --- a/data/scripts.js +++ b/data/scripts.js @@ -1296,6 +1296,43 @@ exports.BattleScripts = { team.push(set); } + return team; + }, + randomSeasonalVVTeam: function(side) { + var couples = ['nidoranf+nidoranm', 'nidorina+nidorino', 'nidoqueen+nidoking', 'gallade+gardevoir', 'plusle+minun', 'illumise+volbeat', 'latias+latios', 'skitty+wailord', 'tauros+miltank', 'rufflet+vullaby', 'braviary+mandibuzz', 'mew+mesprit', 'audino+chansey', 'lickilicky+blissey', 'purugly+beautifly', 'clefairy+wigglytuff', 'clefable+jigglypuff', 'cleffa+igglybuff', 'pichu+pachirisu', 'alomomola+luvdisc', 'gorebyss+huntail', 'kyuremb+kyuremw', 'cherrim+cherubi', 'slowbro+slowking', 'jynx+lickitung', 'milotic+gyarados', 'slowpoke+shelder', 'happiny+mimejr', 'mrmime+smoochum', 'woobat+munna', 'swoobat+musharna', 'delcatty+lopunny', 'skitty+buneary', 'togetic+shaymin', 'glameow+snubbull', 'whismur+wormadam', 'finneon+porygon', 'ditto+porygon2', 'porygonz+togekiss', 'hoppip+togepi', 'lumineon+corsola', 'exeggcute+flaaffy']; + couples = couples.randomize(); + var shouldHaveAttract = {audino:1, beautifly:1, delcatty:1, finneon:1, glameow:1, lumineon:1, purugly:1, swoobat:1, woobat:1, wormadam:1, wormadamsandy:1, wormadamtrash:1}; + var shouldHaveKiss = {buneary:1, finneon:1, lopunny:1, lumineon:1, minun:1, pachirisu:1, pichu:1, plusle:1, shaymin:1, togekiss:1, togepi:1, togetic:1}; + var team = []; + + // First we get the three couples and separate it in a list of Pokemon to deal with them + couples = couples.splice(0, 3); + var pokemons = []; + for (var i=0; i<3; i++) { + var couple = couples[i].split('+'); + pokemons.push(couple[0]); + pokemons.push(couple[1]); + } + + for (var i=0; i<6; i++) { + var pokemon = pokemons[i]; + if (pokemon === 'wormadam') { + var wormadams = ['wormadam', 'wormadamsandy', 'wormadamtrash']; + wormadams = wormadams.randomize(); + pokemon = wormadams[0]; + } + var template = this.getTemplate(pokemon); + var set = this.randomSet(template, i); + // We set some arbitrary moves + if (template.id === 'jynx') set.moves[0] = 'Lovely Kiss'; + if (template.id in shouldHaveAttract) set.moves[0] = 'Attract'; + if (template.id in shouldHaveKiss) set.moves[0] = 'Sweet Kiss'; + // We set some arbitrary levels to balance + if (template.id === 'kyuremb' || template.id === 'kyuremw') set.level = 60; + if (template.id === 'magikarp') set.level = 100; + team.push(set); + } + return team; } };