diff --git a/configs/embeds/pokemon_iv.js.example b/configs/embeds/pokemon_iv.js.example index 350d232..bcfd677 100644 --- a/configs/embeds/pokemon_iv.js.example +++ b/configs/embeds/pokemon_iv.js.example @@ -1,8 +1,8 @@ module.exports = function(WDR, p) { // ADD YOUR CUSTOM SPACING - if (p.form_name) { - p.form_name = " " + p.form_name; + if (p.form) { + p.form = " " + p.form; } if (p.gender_wemoji) { @@ -14,15 +14,15 @@ module.exports = function(WDR, p) { let Sighting_Embed = new WDR.DiscordJS.MessageEmbed() .setColor(p.color) .setThumbnail(p.sprite) - .setTitle("**" + p.name + "" + p.form_name + "** " + p.atk + "/" + p.def + "/" + p.sta + " (" + p.iv + "%) " + p.area) + .setTitle("**" + p.name + "" + p.form + "** " + p.atk + "/" + p.def + "/" + p.sta + " (" + p.iv + "%) " + p.area) .setDescription("Level " + p.lvl + " | CP " + p.cp + p.gender_wemoji + "\n" + "Ht: " + p.height + "m | Wt: " + p.weight + "kg | " + p.size + "\n" + p.move_1_name + " " + p.move_1_type + " / " + p.move_2_name + " " + p.move_2_type + "\n" + "Despawn: **" + p.time + " (" + p.mins + "m " + p.secs + "s)** " + p.verified + "\n" + p.weather_boost + " \n" + "Directions:" + "\n" + - p.google + " | " + p.apple + " | " + p.waze) - .setImage(p.static_map); + p.google + " | " + p.apple + " | " + p.waze); + // STATIC MAP ADDED AUTOMATICALLY IF YOU DO NOT ADD ONE MANUALLY return Sighting_Embed; } @@ -38,7 +38,7 @@ module.exports = function(WDR, p) { //------------------------------------------------------------------------------ // p.gen - Generation // p.name - Locale Name -// p.form_name - Locale Form Name +// p.form - Locale Form Name // p.id - Pokedex ID // p.sprite - Sprite Image // p.iv - Internal Value diff --git a/configs/embeds/pvp.js.example b/configs/embeds/pvp.js.example index 05e9379..9680ac0 100644 --- a/configs/embeds/pvp.js.example +++ b/configs/embeds/pvp.js.example @@ -1,8 +1,8 @@ module.exports = function(WDR, p) { // ADD YOUR CUSTOM SPACING - if (p.form_name) { - p.form_name = " " + p.form_name; + if (p.form) { + p.form = " " + p.form; } if (p.gender_wemoji) { @@ -11,34 +11,28 @@ module.exports = function(WDR, p) { p.gender_wemoji = ""; } - // - //------------------------------------------------------------------------------ - // CUSTOMIZEABLE LIST FOR NAME, RANK, %, AND CP - //------------------------------------------------------------------------------ - for (var pokemon_id in p.possible_cps) { + if (p.gender_noemoji) { + p.gender_noemoji = " | " + p.gender_noemoji; + } else { + p.gender_noemoji = ""; + } + p.possible_cps.forEach(pvp => { let pipe = " | "; // SPACING - - let Name = WDR.Master.Pokemon[pokemon_id].name; - - let Level = "Lvl " + p.possible_cps[pokemon_id].level; - - let Cp = "CP " + p.possible_cps[pokemon_id].cp; - - let Rank = "Rank " + p.possible_cps[pokemon_id].rank; - - let Percent = p.possible_cps[pokemon_id].percent + "%"; - - let string = "**" + Name + " (" + Percent + ") " + p.atk + "/" + p.def + "/" + p.sta + "** \n" + Rank + pipe + Level + pipe + Cp; - + let Name = WDR.Master.Pokemon[pvp.pokemon_id].name; + let Level = "Lvl " + pvp.level; + let Cp = "CP " + pvp.cp; + let Rank = "**Rank " + pvp.rank + "**"; + let Percent = pvp.percent + "%"; + let string = Rank + " " + Name + " (" + Percent + ")\n" + Level + pipe + Cp + pipe + p.atk + "/" + p.def + "/" + p.sta; p.pvp_data += string + "\n"; - } + }); let Pokemon_Embed = new WDR.DiscordJS.MessageEmbed() .setColor(p.color) .setThumbnail(p.sprite) .setTitle(p.pvp_data) - .setDescription("**" + p.name + "" + p.form_name + "** " + p.atk + "/" + p.def + "/" + p.sta + " (" + p.iv + "%)" + "\n" + + .setDescription("**" + p.name + "" + p.form + "** " + p.atk + "/" + p.def + "/" + p.sta + " (" + p.iv + "%)" + "\n" + "Level " + p.lvl + " | CP " + p.cp + p.gender_wemoji + "\n" + "Ht: " + p.height + "m | Wt: " + p.weight + "kg | " + p.size + "\n" + p.move_1_name + " " + p.move_1_type + " / " + p.move_2_name + " " + p.move_2_type + "\n" + @@ -46,7 +40,8 @@ module.exports = function(WDR, p) { p.weather_boost + " \n" + "Directions:" + "\n" + p.google + " | " + p.apple + " | " + p.waze) - .setImage(p.static_map); + .setFooter(p.footer); + // STATIC MAP ADDED AUTOMATICALLY IF YOU DO NOT ADD ONE MANUALLY return Pokemon_Embed; } @@ -55,11 +50,11 @@ module.exports = function(WDR, p) { // AVAILABLE VARIABLES //------------------------------------------------------------------------------ // p.pvpString - String of PVP data -// p.ranks - String of PVP Ranks +// p.ranks - String of PVP Ranks // p.pvp_data - Lines of PVP Data // p.gen - Generation // p.name - Locale Name -// p.form_name - Locale Form Name +// p.form - Locale Form Name // p.id - Pokedex ID // p.sprite - Sprite Image // p.iv - Internal Value @@ -68,7 +63,7 @@ module.exports = function(WDR, p) { // p.gender_noemoji - Gender without Emoji // p.height - Take a wild guess // p.weight - Probably cant figure this one out -// p.type - Type(s) Emoji(s) +// p.type_wemoji - Type(s) w/ Emoji(s) // p.type_noemoji - Type(s) Wording // p.color - Type Color (Hex) // p.weather_boost - If Weather-Boosted @@ -85,7 +80,6 @@ module.exports = function(WDR, p) { // p.waze - Waze Directions URL // p.pmsf - PMSF Map Link to the Sighting // p.rdm - RDM Map Link to the Sighting -// p.static_map - Static Map Tile Image // p.verified - Spawnpoint Timer Verified Emoji (Yes/No) // p.time - Despawn Time // p.mins - Despawn Minutes @@ -94,3 +88,4 @@ module.exports = function(WDR, p) { // p.def - Defense IV // p.sta - Stamina IV // p.lvl - Level +// p.footer - Includes processing latency diff --git a/configs/embeds/raids.js.example b/configs/embeds/raid_boss.js.example similarity index 98% rename from configs/embeds/raids.js.example rename to configs/embeds/raid_boss.js.example index 3ae77a1..66749fe 100644 --- a/configs/embeds/raids.js.example +++ b/configs/embeds/raid_boss.js.example @@ -25,7 +25,7 @@ module.exports = function(WDR, g) { "Level " + g.lvl + " | " + g.team + g.sponsor + "\n" + "Counter(s): " + g.weaknesses + "\n" + g.exraid + g.notes + "\n" + - "**" + g.area + " | Directions:" + "\n" + + "**" + g.area + "** | Directions:" + "\n" + g.google + " | " + g.apple + " | " + g.waze) .setImage(g.static_map); diff --git a/configs/embeds/raid_eggs.js.example b/configs/embeds/raid_egg.js.example similarity index 97% rename from configs/embeds/raid_eggs.js.example rename to configs/embeds/raid_egg.js.example index 50cea3b..9cc4fca 100644 --- a/configs/embeds/raid_eggs.js.example +++ b/configs/embeds/raid_egg.js.example @@ -24,7 +24,7 @@ module.exports = function(WDR, g) { "Hatches: **" + g.hatch_time + " (*" + g.hatch_mins + " Mins*)" + "**\n" + g.exraid + g.notes + "\n" + "**" + g.area + "** | Directions:" + "\n" + - g.google + " | " + g.apple + " | " + g.waze) + g.google + " - " + g.apple + " - " + g.waze) .setImage(g.static_map); return raid_embed; diff --git a/configs/filters/PvP_Perfect_Grass_Ultra.json.ex b/configs/filters/PvP_Perfect_Grass_Ultra.json.ex new file mode 100644 index 0000000..143db30 --- /dev/null +++ b/configs/filters/PvP_Perfect_Grass_Ultra.json.ex @@ -0,0 +1,736 @@ +{ + "Type": "pvp", + + "league": "ultra", + + "type": "grass", + + "min_level": 1, + + "min_pvp_rank": 1, + + "min_cp_range": 2200, + "max_cp_range": 2500, + + "Bulbasaur": "True", + "Ivysaur": "True", + "Venusaur": "True", + "Charmander": "True", + "Charmeleon": "True", + "Charizard": "True", + "Squirtle": "True", + "Wartortle": "True", + "Blastoise": "True", + "Caterpie": "True", + "Metapod": "True", + "Butterfree": "True", + "Weedle": "True", + "Kakuna": "True", + "Beedrill": "True", + "Pidgey": "True", + "Pidgeotto": "True", + "Pidgeot": "True", + "Rattata": "True", + "Raticate": "True", + "Spearow": "True", + "Fearow": "True", + "Ekans": "True", + "Arbok": "True", + "Pikachu": "True", + "Raichu": "True", + "Sandshrew": "True", + "Sandslash": "True", + "Nidoran♀": "True", + "Nidorina": "True", + "Nidoqueen": "True", + "Nidoran♂": "True", + "Nidorino": "True", + "Nidoking": "True", + "Clefairy": "True", + "Clefable": "True", + "Vulpix": "True", + "Ninetales": "True", + "Jigglypuff": "True", + "Wigglytuff": "True", + "Zubat": "True", + "Golbat": "True", + "Oddish": "True", + "Gloom": "True", + "Vileplume": "True", + "Paras": "True", + "Parasect": "True", + "Venonat": "True", + "Venomoth": "True", + "Diglett": "True", + "Dugtrio": "True", + "Meowth": "True", + "Persian": "True", + "Psyduck": "True", + "Golduck": "True", + "Mankey": "True", + "Primeape": "True", + "Growlithe": "True", + "Arcanine": "True", + "Poliwag": "True", + "Poliwhirl": "True", + "Poliwrath": "True", + "Abra": "True", + "Kadabra": "True", + "Alakazam": "True", + "Machop": "True", + "Machoke": "True", + "Machamp": "True", + "Bellsprout": "True", + "Weepinbell": "True", + "Victreebel": "True", + "Tentacool": "True", + "Tentacruel": "True", + "Geodude": "True", + "Graveler": "True", + "Golem": "True", + "Ponyta": "True", + "Rapidash": "True", + "Slowpoke": "True", + "Slowbro": "True", + "Magnemite": "True", + "Magneton": "True", + "Farfetchd": "True", + "Doduo": "True", + "Dodrio": "True", + "Seel": "True", + "Dewgong": "True", + "Grimer": "True", + "Muk": "True", + "Shellder": "True", + "Cloyster": "True", + "Gastly": "True", + "Haunter": "True", + "Gengar": "True", + "Onix": "True", + "Drowzee": "True", + "Hypno": "True", + "Krabby": "True", + "Kingler": "True", + "Voltorb": "True", + "Electrode": "True", + "Exeggcute": "True", + "Exeggutor": "True", + "Cubone": "True", + "Marowak": "True", + "Hitmonlee": "True", + "Hitmonchan": "True", + "Lickitung": "True", + "Koffing": "True", + "Weezing": "True", + "Rhyhorn": "True", + "Rhydon": "True", + "Chansey": "True", + "Tangela": "True", + "Kangaskhan": "True", + "Horsea": "True", + "Seadra": "True", + "Goldeen": "True", + "Seaking": "True", + "Staryu": "True", + "Starmie": "True", + "Mr. Mime": "True", + "Scyther": "True", + "Jynx": "True", + "Electabuzz": "True", + "Magmar": "True", + "Pinsir": "True", + "Tauros": "True", + "Magikarp": "True", + "Gyarados": "True", + "Lapras": "True", + "Ditto": "True", + "Eevee": "True", + "Vaporeon": "True", + "Jolteon": "True", + "Flareon": "True", + "Porygon": "True", + "Omanyte": "True", + "Omastar": "True", + "Kabuto": "True", + "Kabutops": "True", + "Aerodactyl": "True", + "Snorlax": "True", + "Articuno": "True", + "Zapdos": "True", + "Moltres": "True", + "Dratini": "True", + "Dragonair": "True", + "Dragonite": "True", + "Mewtwo": "True", + "Mew": "True", + "Chikorita": "True", + "Bayleef": "True", + "Meganium": "True", + "Cyndaquil": "True", + "Quilava": "True", + "Typhlosion": "True", + "Totodile": "True", + "Croconaw": "True", + "Feraligatr": "True", + "Sentret": "True", + "Furret": "True", + "Hoothoot": "True", + "Noctowl": "True", + "Ledyba": "True", + "Ledian": "True", + "Spinarak": "True", + "Ariados": "True", + "Crobat": "True", + "Chinchou": "True", + "Lanturn": "True", + "Pichu": "True", + "Cleffa": "True", + "Igglybuff": "True", + "Togepi": "True", + "Togetic": "True", + "Natu": "True", + "Xatu": "True", + "Mareep": "True", + "Flaaffy": "True", + "Ampharos": "True", + "Bellossom": "True", + "Marill": "True", + "Azumarill": "True", + "Sudowoodo": "True", + "Politoed": "True", + "Hoppip": "True", + "Skiploom": "True", + "Jumpluff": "True", + "Aipom": "True", + "Sunkern": "True", + "Sunflora": "True", + "Yanma": "True", + "Wooper": "True", + "Quagsire": "True", + "Espeon": "True", + "Umbreon": "True", + "Murkrow": "True", + "Slowking": "True", + "Misdreavus": "True", + "Unown": "True", + "Wobbuffet": "True", + "Girafarig": "True", + "Pineco": "True", + "Forretress": "True", + "Dunsparce": "True", + "Gligar": "True", + "Steelix": "True", + "Snubbull": "True", + "Granbull": "True", + "Qwilfish": "True", + "Scizor": "True", + "Shuckle": "True", + "Heracross": "True", + "Sneasel": "True", + "Teddiursa": "True", + "Ursaring": "True", + "Slugma": "True", + "Magcargo": "True", + "Swinub": "True", + "Piloswine": "True", + "Corsola": "True", + "Remoraid": "True", + "Octillery": "True", + "Delibird": "True", + "Mantine": "True", + "Skarmory": "True", + "Houndour": "True", + "Houndoom": "True", + "Kingdra": "True", + "Phanpy": "True", + "Donphan": "True", + "Porygon2": "True", + "Stantler": "True", + "Smeargle": "True", + "Tyrogue": "True", + "Hitmontop": "True", + "Smoochum": "True", + "Elekid": "True", + "Magby": "True", + "Miltank": "True", + "Blissey": "True", + "Raikou": "True", + "Entei": "True", + "Suicune": "True", + "Larvitar": "True", + "Pupitar": "True", + "Tyranitar": "True", + "Lugia": "True", + "Ho-Oh": "True", + "Celebi": "True", + "Treecko": "True", + "Grovyle": "True", + "Sceptile": "True", + "Torchic": "True", + "Combusken": "True", + "Blaziken": "True", + "Mudkip": "True", + "Marshtomp": "True", + "Swampert": "True", + "Poochyena": "True", + "Mightyena": "True", + "Zigzagoon": "True", + "Linoone": "True", + "Wurmple": "True", + "Silcoon": "True", + "Beautifly": "True", + "Cascoon": "True", + "Dustox": "True", + "Lotad": "True", + "Lombre": "True", + "Ludicolo": "True", + "Seedot": "True", + "Nuzleaf": "True", + "Shiftry": "True", + "Taillow": "True", + "Swellow": "True", + "Wingull": "True", + "Pelipper": "True", + "Ralts": "True", + "Kirlia": "True", + "Gardevoir": "True", + "Surskit": "True", + "Masquerain": "True", + "Shroomish": "True", + "Breloom": "True", + "Slakoth": "True", + "Vigoroth": "True", + "Slaking": "True", + "Nincada": "True", + "Ninjask": "True", + "Shedinja": "True", + "Whismur": "True", + "Loudred": "True", + "Exploud": "True", + "Makuhita": "True", + "Hariyama": "True", + "Azurill": "True", + "Nosepass": "True", + "Skitty": "True", + "Delcatty": "True", + "Sableye": "True", + "Mawile": "True", + "Aron": "True", + "Lairon": "True", + "Aggron": "True", + "Meditite": "True", + "Medicham": "True", + "Electrike": "True", + "Manectric": "True", + "Plusle": "True", + "Minun": "True", + "Volbeat": "True", + "Illumise": "True", + "Roselia": "True", + "Gulpin": "True", + "Swalot": "True", + "Carvanha": "True", + "Sharpedo": "True", + "Wailmer": "True", + "Wailord": "True", + "Numel": "True", + "Camerupt": "True", + "Torkoal": "True", + "Spoink": "True", + "Grumpig": "True", + "Spinda": "True", + "Trapinch": "True", + "Vibrava": "True", + "Flygon": "True", + "Cacnea": "True", + "Cacturne": "True", + "Swablu": "True", + "Altaria": "True", + "Zangoose": "True", + "Seviper": "True", + "Lunatone": "True", + "Solrock": "True", + "Barboach": "True", + "Whiscash": "True", + "Corphish": "True", + "Crawdaunt": "True", + "Baltoy": "True", + "Claydol": "True", + "Lileep": "True", + "Cradily": "True", + "Anorith": "True", + "Armaldo": "True", + "Feebas": "True", + "Milotic": "True", + "Castform": "True", + "Kecleon": "True", + "Shuppet": "True", + "Banette": "True", + "Duskull": "True", + "Dusclops": "True", + "Tropius": "True", + "Chimecho": "True", + "Absol": "True", + "Wynaut": "True", + "Snorunt": "True", + "Glalie": "True", + "Spheal": "True", + "Sealeo": "True", + "Walrein": "True", + "Clamperl": "True", + "Huntail": "True", + "Gorebyss": "True", + "Relicanth": "True", + "Luvdisc": "True", + "Bagon": "True", + "Shelgon": "True", + "Salamence": "True", + "Beldum": "True", + "Metang": "True", + "Metagross": "True", + "Regirock": "True", + "Regice": "True", + "Registeel": "True", + "Latias": "True", + "Latios": "True", + "Kyogre": "True", + "Groudon": "True", + "Rayquaza": "True", + "Jirachi": "True", + "Deoxys": "True", + "Turtwig": "True", + "Grotle": "True", + "Torterra": "True", + "Chimchar": "True", + "Monferno": "True", + "Infernape": "True", + "Piplup": "True", + "Prinplup": "True", + "Empoleon": "True", + "Starly": "True", + "Staravia": "True", + "Staraptor": "True", + "Bidoof": "True", + "Bibarel": "True", + "Kricketot": "True", + "Kricketune": "True", + "Shinx": "True", + "Luxio": "True", + "Luxray": "True", + "Budew": "True", + "Roserade": "True", + "Cranidos": "True", + "Rampardos": "True", + "Shieldon": "True", + "Bastiodon": "True", + "Burmy": "True", + "Wormadam": "True", + "Mothim": "True", + "Combee": "True", + "Vespiquen": "True", + "Pachirisu": "True", + "Buizel": "False", + "Floatzel": "True", + "Cherubi": "True", + "Cherrim": "True", + "Shellos": "True", + "Gastrodon": "True", + "Ambipom": "True", + "Drifloon": "True", + "Drifblim": "True", + "Buneary": "True", + "Lopunny": "True", + "Mismagius": "True", + "Honchkrow": "True", + "Glameow": "True", + "Purugly": "True", + "Chingling": "True", + "Stunky": "True", + "Skuntank": "True", + "Bronzor": "True", + "Bronzong": "True", + "Bonsly": "True", + "Mime Jr.": "True", + "Happiny": "True", + "Chatot": "True", + "Spiritomb": "True", + "Gible": "True", + "Gabite": "True", + "Garchomp": "True", + "Munchlax": "True", + "Riolu": "True", + "Lucario": "True", + "Hippopotas": "True", + "Hippowdon": "True", + "Skorupi": "True", + "Drapion": "True", + "Croagunk": "True", + "Toxicroak": "True", + "Carnivine": "True", + "Finneon": "True", + "Lumineon": "True", + "Mantyke": "True", + "Snover": "True", + "Abomasnow": "True", + "Weavile": "True", + "Magnezone": "True", + "Lickilicky": "True", + "Rhyperior": "True", + "Tangrowth": "True", + "Electivire": "True", + "Magmortar": "True", + "Togekiss": "True", + "Yanmega": "True", + "Leafeon": "True", + "Glaceon": "True", + "Gliscor": "True", + "Mamoswine": "True", + "Porygon-Z": "True", + "Gallade": "True", + "Probopass": "True", + "Dusknoir": "True", + "Froslass": "True", + "Rotom": "True", + "Uxie": "True", + "Mesprit": "True", + "Azelf": "True", + "Dialga": "True", + "Palkia": "True", + "Heatran": "True", + "Regigigas": "True", + "Giratina": "True", + "Cresselia": "True", + "Phione": "True", + "Manaphy": "True", + "Darkrai": "True", + "Shaymin": "True", + "Arceus": "True", + "Victini": "True", + "Snivy": "True", + "Servine": "True", + "Serperior": "True", + "Tepig": "True", + "Pignite": "True", + "Emboar": "True", + "Oshawott": "True", + "Dewott": "True", + "Samurott": "True", + "Patrat": "True", + "Watchog": "True", + "Lillipup": "True", + "Herdier": "True", + "Stoutland": "True", + "Purrloin": "True", + "Liepard": "True", + "Pansage": "True", + "Simisage": "True", + "Pansear": "True", + "Simisear": "True", + "Panpour": "True", + "Simipour": "True", + "Munna": "True", + "Musharna": "True", + "Pidove": "True", + "Tranquill": "True", + "Unfezant": "True", + "Blitzle": "True", + "Zebstrika": "True", + "Roggenrola": "True", + "Boldore": "True", + "Gigalith": "True", + "Woobat": "True", + "Swoobat": "True", + "Drilbur": "True", + "Excadrill": "True", + "Audino": "True", + "Timburr": "True", + "Gurdurr": "True", + "Conkeldurr": "True", + "Tympole": "True", + "Palpitoad": "True", + "Seismitoad": "True", + "Throh": "True", + "Sawk": "True", + "Sewaddle": "True", + "Swadloon": "True", + "Leavanny": "True", + "Venipede": "True", + "Whirlipede": "True", + "Scolipede": "True", + "Cottonee": "True", + "Whimsicott": "True", + "Petilil": "True", + "Lilligant": "True", + "Basculin": "True", + "Sandile": "True", + "Krokorok": "True", + "Krookodile": "True", + "Darumaka": "True", + "Darmanitan": "True", + "Maractus": "True", + "Dwebble": "True", + "Crustle": "True", + "Scraggy": "True", + "Scrafty": "True", + "Sigilyph": "True", + "Yamask": "True", + "Cofagrigus": "True", + "Tirtouga": "True", + "Carracosta": "True", + "Archen": "True", + "Archeops": "True", + "Trubbish": "True", + "Garbodor": "True", + "Zorua": "True", + "Zoroark": "True", + "Minccino": "True", + "Cinccino": "True", + "Gothita": "True", + "Gothorita": "True", + "Gothitelle": "True", + "Solosis": "True", + "Duosion": "True", + "Reuniclus": "True", + "Ducklett": "True", + "Swanna": "True", + "Vanillite": "True", + "Vanillish": "True", + "Vanilluxe": "True", + "Deerling": "True", + "Sawsbuck": "True", + "Emolga": "True", + "Karrablast": "True", + "Escavalier": "True", + "Foongus": "True", + "Amoonguss": "True", + "Frillish": "True", + "Jellicent": "True", + "Alomomola": "True", + "Joltik": "True", + "Galvantula": "True", + "Ferroseed": "True", + "Ferrothorn": "True", + "Klink": "True", + "Klang": "True", + "Klinklang": "True", + "Tynamo": "True", + "Eelektrik": "True", + "Eelektross": "True", + "Elgyem": "True", + "Beheeyem": "True", + "Litwick": "True", + "Lampent": "True", + "Chandelure": "True", + "Axew": "True", + "Fraxure": "True", + "Haxorus": "True", + "Cubchoo": "True", + "Beartic": "True", + "Cryogonal": "True", + "Shelmet": "True", + "Accelgor": "True", + "Stunfisk": "True", + "Mienfoo": "True", + "Mienshao": "True", + "Druddigon": "True", + "Golett": "True", + "Golurk": "True", + "Pawniard": "True", + "Bisharp": "True", + "Bouffalant": "True", + "Rufflet": "True", + "Braviary": "True", + "Vullaby": "True", + "Mandibuzz": "True", + "Heatmor": "True", + "Durant": "True", + "Deino": "True", + "Zweilous": "True", + "Hydreigon": "True", + "Larvesta": "True", + "Volcarona": "True", + "Cobalion": "True", + "Terrakion": "True", + "Virizion": "True", + "Tornadus": "True", + "Thundurus": "True", + "Reshiram": "True", + "Zekrom": "True", + "Landorus": "True", + "Kyurem": "True", + "Keldeo": "True", + "Meloetta": "True", + "Genesect": "True", + "Chespin": "True", + "Quilladin": "True", + "Chesnaught": "True", + "Fennekin": "True", + "Braixen": "True", + "Delphox": "True", + "Froakie": "True", + "Frogadier": "True", + "Greninja": "True", + "Bunnelby": "True", + "Diggersby": "True", + "Fletchling": "True", + "Fletchinder": "True", + "Talonflame": "True", + "Scatterbug": "True", + "Spewpa": "True", + "Vivillon": "True", + "Litleo": "True", + "Pyroar": "True", + "Flab\u00e9b\u00e9": "True", + "Floette": "True", + "Florges": "True", + "Skiddo": "True", + "Gogoat": "True", + "Pancham": "True", + "Pangoro": "True", + "Furfrou": "True", + "Espurr": "True", + "Meowstic": "True", + "Honedge": "True", + "Doublade": "True", + "Aegislash": "True", + "Spritzee": "True", + "Aromatisse": "True", + "Swirlix": "True", + "Slurpuff": "True", + "Inkay": "True", + "Malamar": "True", + "Binacle": "True", + "Barbaracle": "True", + "Skrelp": "True", + "Dragalge": "True", + "Clauncher": "True", + "Clawitzer": "True", + "Helioptile": "True", + "Heliolisk": "True", + "Tyrunt": "True", + "Tyrantrum": "True", + "Amaura": "True", + "Aurorus": "True", + "Sylveon": "True", + "Hawlucha": "True", + "Dedenne": "True", + "Carbink": "True", + "Goomy": "True", + "Sliggoo": "True", + "Goodra": "True", + "Klefki": "True", + "Phantump": "True", + "Trevenant": "True", + "Pumpkaboo": "True", + "Gourgeist": "True", + "Bergmite": "True", + "Avalugg": "True", + "Noibat": "True", + "Noivern": "True", + "Xerneas": "True", + "Yveltal": "True", + "Zygarde": "True", + "Diancie": "True", + "Hoopa": "True", + "Volcanion": "True" +} diff --git a/configs/filters/PvP_Perfect_Grass_Ultra.json.example b/configs/filters/PvP_Perfect_Grass_Ultra.json.example new file mode 100644 index 0000000..21cae32 --- /dev/null +++ b/configs/filters/PvP_Perfect_Grass_Ultra.json.example @@ -0,0 +1,736 @@ +{ + "Type": "pvp", + + "league": "ultra", + + "type": "grass", + + "min_level": 1, + + "min_pvp_rank": 1, + + "min_cp_range": 1800, + "max_cp_range": 2500, + + "Bulbasaur": "True", + "Ivysaur": "True", + "Venusaur": "True", + "Charmander": "True", + "Charmeleon": "True", + "Charizard": "True", + "Squirtle": "True", + "Wartortle": "True", + "Blastoise": "True", + "Caterpie": "True", + "Metapod": "True", + "Butterfree": "True", + "Weedle": "True", + "Kakuna": "True", + "Beedrill": "True", + "Pidgey": "True", + "Pidgeotto": "True", + "Pidgeot": "True", + "Rattata": "True", + "Raticate": "True", + "Spearow": "True", + "Fearow": "True", + "Ekans": "True", + "Arbok": "True", + "Pikachu": "True", + "Raichu": "True", + "Sandshrew": "True", + "Sandslash": "True", + "Nidoran♀": "True", + "Nidorina": "True", + "Nidoqueen": "True", + "Nidoran♂": "True", + "Nidorino": "True", + "Nidoking": "True", + "Clefairy": "True", + "Clefable": "True", + "Vulpix": "True", + "Ninetales": "True", + "Jigglypuff": "True", + "Wigglytuff": "True", + "Zubat": "True", + "Golbat": "True", + "Oddish": "True", + "Gloom": "True", + "Vileplume": "True", + "Paras": "True", + "Parasect": "True", + "Venonat": "True", + "Venomoth": "True", + "Diglett": "True", + "Dugtrio": "True", + "Meowth": "True", + "Persian": "True", + "Psyduck": "True", + "Golduck": "True", + "Mankey": "True", + "Primeape": "True", + "Growlithe": "True", + "Arcanine": "True", + "Poliwag": "True", + "Poliwhirl": "True", + "Poliwrath": "True", + "Abra": "True", + "Kadabra": "True", + "Alakazam": "True", + "Machop": "True", + "Machoke": "True", + "Machamp": "True", + "Bellsprout": "True", + "Weepinbell": "True", + "Victreebel": "True", + "Tentacool": "True", + "Tentacruel": "True", + "Geodude": "True", + "Graveler": "True", + "Golem": "True", + "Ponyta": "True", + "Rapidash": "True", + "Slowpoke": "True", + "Slowbro": "True", + "Magnemite": "True", + "Magneton": "True", + "Farfetchd": "True", + "Doduo": "True", + "Dodrio": "True", + "Seel": "True", + "Dewgong": "True", + "Grimer": "True", + "Muk": "True", + "Shellder": "True", + "Cloyster": "True", + "Gastly": "True", + "Haunter": "True", + "Gengar": "True", + "Onix": "True", + "Drowzee": "True", + "Hypno": "True", + "Krabby": "True", + "Kingler": "True", + "Voltorb": "True", + "Electrode": "True", + "Exeggcute": "True", + "Exeggutor": "True", + "Cubone": "True", + "Marowak": "True", + "Hitmonlee": "True", + "Hitmonchan": "True", + "Lickitung": "True", + "Koffing": "True", + "Weezing": "True", + "Rhyhorn": "True", + "Rhydon": "True", + "Chansey": "True", + "Tangela": "True", + "Kangaskhan": "True", + "Horsea": "True", + "Seadra": "True", + "Goldeen": "True", + "Seaking": "True", + "Staryu": "True", + "Starmie": "True", + "Mr. Mime": "True", + "Scyther": "True", + "Jynx": "True", + "Electabuzz": "True", + "Magmar": "True", + "Pinsir": "True", + "Tauros": "True", + "Magikarp": "True", + "Gyarados": "True", + "Lapras": "True", + "Ditto": "True", + "Eevee": "True", + "Vaporeon": "True", + "Jolteon": "True", + "Flareon": "True", + "Porygon": "True", + "Omanyte": "True", + "Omastar": "True", + "Kabuto": "True", + "Kabutops": "True", + "Aerodactyl": "True", + "Snorlax": "True", + "Articuno": "True", + "Zapdos": "True", + "Moltres": "True", + "Dratini": "True", + "Dragonair": "True", + "Dragonite": "True", + "Mewtwo": "True", + "Mew": "True", + "Chikorita": "True", + "Bayleef": "True", + "Meganium": "True", + "Cyndaquil": "True", + "Quilava": "True", + "Typhlosion": "True", + "Totodile": "True", + "Croconaw": "True", + "Feraligatr": "True", + "Sentret": "True", + "Furret": "True", + "Hoothoot": "True", + "Noctowl": "True", + "Ledyba": "True", + "Ledian": "True", + "Spinarak": "True", + "Ariados": "True", + "Crobat": "True", + "Chinchou": "True", + "Lanturn": "True", + "Pichu": "True", + "Cleffa": "True", + "Igglybuff": "True", + "Togepi": "True", + "Togetic": "True", + "Natu": "True", + "Xatu": "True", + "Mareep": "True", + "Flaaffy": "True", + "Ampharos": "True", + "Bellossom": "True", + "Marill": "True", + "Azumarill": "True", + "Sudowoodo": "True", + "Politoed": "True", + "Hoppip": "True", + "Skiploom": "True", + "Jumpluff": "True", + "Aipom": "True", + "Sunkern": "True", + "Sunflora": "True", + "Yanma": "True", + "Wooper": "True", + "Quagsire": "True", + "Espeon": "True", + "Umbreon": "True", + "Murkrow": "True", + "Slowking": "True", + "Misdreavus": "True", + "Unown": "True", + "Wobbuffet": "True", + "Girafarig": "True", + "Pineco": "True", + "Forretress": "True", + "Dunsparce": "True", + "Gligar": "True", + "Steelix": "True", + "Snubbull": "True", + "Granbull": "True", + "Qwilfish": "True", + "Scizor": "True", + "Shuckle": "True", + "Heracross": "True", + "Sneasel": "True", + "Teddiursa": "True", + "Ursaring": "True", + "Slugma": "True", + "Magcargo": "True", + "Swinub": "True", + "Piloswine": "True", + "Corsola": "True", + "Remoraid": "True", + "Octillery": "True", + "Delibird": "True", + "Mantine": "True", + "Skarmory": "True", + "Houndour": "True", + "Houndoom": "True", + "Kingdra": "True", + "Phanpy": "True", + "Donphan": "True", + "Porygon2": "True", + "Stantler": "True", + "Smeargle": "True", + "Tyrogue": "True", + "Hitmontop": "True", + "Smoochum": "True", + "Elekid": "True", + "Magby": "True", + "Miltank": "True", + "Blissey": "True", + "Raikou": "True", + "Entei": "True", + "Suicune": "True", + "Larvitar": "True", + "Pupitar": "True", + "Tyranitar": "True", + "Lugia": "True", + "Ho-Oh": "True", + "Celebi": "True", + "Treecko": "True", + "Grovyle": "True", + "Sceptile": "True", + "Torchic": "True", + "Combusken": "True", + "Blaziken": "True", + "Mudkip": "True", + "Marshtomp": "True", + "Swampert": "True", + "Poochyena": "True", + "Mightyena": "True", + "Zigzagoon": "True", + "Linoone": "True", + "Wurmple": "True", + "Silcoon": "True", + "Beautifly": "True", + "Cascoon": "True", + "Dustox": "True", + "Lotad": "True", + "Lombre": "True", + "Ludicolo": "True", + "Seedot": "True", + "Nuzleaf": "True", + "Shiftry": "True", + "Taillow": "True", + "Swellow": "True", + "Wingull": "True", + "Pelipper": "True", + "Ralts": "True", + "Kirlia": "True", + "Gardevoir": "True", + "Surskit": "True", + "Masquerain": "True", + "Shroomish": "True", + "Breloom": "True", + "Slakoth": "True", + "Vigoroth": "True", + "Slaking": "True", + "Nincada": "True", + "Ninjask": "True", + "Shedinja": "True", + "Whismur": "True", + "Loudred": "True", + "Exploud": "True", + "Makuhita": "True", + "Hariyama": "True", + "Azurill": "True", + "Nosepass": "True", + "Skitty": "True", + "Delcatty": "True", + "Sableye": "True", + "Mawile": "True", + "Aron": "True", + "Lairon": "True", + "Aggron": "True", + "Meditite": "True", + "Medicham": "True", + "Electrike": "True", + "Manectric": "True", + "Plusle": "True", + "Minun": "True", + "Volbeat": "True", + "Illumise": "True", + "Roselia": "True", + "Gulpin": "True", + "Swalot": "True", + "Carvanha": "True", + "Sharpedo": "True", + "Wailmer": "True", + "Wailord": "True", + "Numel": "True", + "Camerupt": "True", + "Torkoal": "True", + "Spoink": "True", + "Grumpig": "True", + "Spinda": "True", + "Trapinch": "True", + "Vibrava": "True", + "Flygon": "True", + "Cacnea": "True", + "Cacturne": "True", + "Swablu": "True", + "Altaria": "True", + "Zangoose": "True", + "Seviper": "True", + "Lunatone": "True", + "Solrock": "True", + "Barboach": "True", + "Whiscash": "True", + "Corphish": "True", + "Crawdaunt": "True", + "Baltoy": "True", + "Claydol": "True", + "Lileep": "True", + "Cradily": "True", + "Anorith": "True", + "Armaldo": "True", + "Feebas": "True", + "Milotic": "True", + "Castform": "True", + "Kecleon": "True", + "Shuppet": "True", + "Banette": "True", + "Duskull": "True", + "Dusclops": "True", + "Tropius": "True", + "Chimecho": "True", + "Absol": "True", + "Wynaut": "True", + "Snorunt": "True", + "Glalie": "True", + "Spheal": "True", + "Sealeo": "True", + "Walrein": "True", + "Clamperl": "True", + "Huntail": "True", + "Gorebyss": "True", + "Relicanth": "True", + "Luvdisc": "True", + "Bagon": "True", + "Shelgon": "True", + "Salamence": "True", + "Beldum": "True", + "Metang": "True", + "Metagross": "True", + "Regirock": "True", + "Regice": "True", + "Registeel": "True", + "Latias": "True", + "Latios": "True", + "Kyogre": "True", + "Groudon": "True", + "Rayquaza": "True", + "Jirachi": "True", + "Deoxys": "True", + "Turtwig": "True", + "Grotle": "True", + "Torterra": "True", + "Chimchar": "True", + "Monferno": "True", + "Infernape": "True", + "Piplup": "True", + "Prinplup": "True", + "Empoleon": "True", + "Starly": "True", + "Staravia": "True", + "Staraptor": "True", + "Bidoof": "True", + "Bibarel": "True", + "Kricketot": "True", + "Kricketune": "True", + "Shinx": "True", + "Luxio": "True", + "Luxray": "True", + "Budew": "True", + "Roserade": "True", + "Cranidos": "True", + "Rampardos": "True", + "Shieldon": "True", + "Bastiodon": "True", + "Burmy": "True", + "Wormadam": "True", + "Mothim": "True", + "Combee": "True", + "Vespiquen": "True", + "Pachirisu": "True", + "Buizel": "False", + "Floatzel": "True", + "Cherubi": "True", + "Cherrim": "True", + "Shellos": "True", + "Gastrodon": "True", + "Ambipom": "True", + "Drifloon": "True", + "Drifblim": "True", + "Buneary": "True", + "Lopunny": "True", + "Mismagius": "True", + "Honchkrow": "True", + "Glameow": "True", + "Purugly": "True", + "Chingling": "True", + "Stunky": "True", + "Skuntank": "True", + "Bronzor": "True", + "Bronzong": "True", + "Bonsly": "True", + "Mime Jr.": "True", + "Happiny": "True", + "Chatot": "True", + "Spiritomb": "True", + "Gible": "True", + "Gabite": "True", + "Garchomp": "True", + "Munchlax": "True", + "Riolu": "True", + "Lucario": "True", + "Hippopotas": "True", + "Hippowdon": "True", + "Skorupi": "True", + "Drapion": "True", + "Croagunk": "True", + "Toxicroak": "True", + "Carnivine": "True", + "Finneon": "True", + "Lumineon": "True", + "Mantyke": "True", + "Snover": "True", + "Abomasnow": "True", + "Weavile": "True", + "Magnezone": "True", + "Lickilicky": "True", + "Rhyperior": "True", + "Tangrowth": "True", + "Electivire": "True", + "Magmortar": "True", + "Togekiss": "True", + "Yanmega": "True", + "Leafeon": "True", + "Glaceon": "True", + "Gliscor": "True", + "Mamoswine": "True", + "Porygon-Z": "True", + "Gallade": "True", + "Probopass": "True", + "Dusknoir": "True", + "Froslass": "True", + "Rotom": "True", + "Uxie": "True", + "Mesprit": "True", + "Azelf": "True", + "Dialga": "True", + "Palkia": "True", + "Heatran": "True", + "Regigigas": "True", + "Giratina": "True", + "Cresselia": "True", + "Phione": "True", + "Manaphy": "True", + "Darkrai": "True", + "Shaymin": "True", + "Arceus": "True", + "Victini": "True", + "Snivy": "True", + "Servine": "True", + "Serperior": "True", + "Tepig": "True", + "Pignite": "True", + "Emboar": "True", + "Oshawott": "True", + "Dewott": "True", + "Samurott": "True", + "Patrat": "True", + "Watchog": "True", + "Lillipup": "True", + "Herdier": "True", + "Stoutland": "True", + "Purrloin": "True", + "Liepard": "True", + "Pansage": "True", + "Simisage": "True", + "Pansear": "True", + "Simisear": "True", + "Panpour": "True", + "Simipour": "True", + "Munna": "True", + "Musharna": "True", + "Pidove": "True", + "Tranquill": "True", + "Unfezant": "True", + "Blitzle": "True", + "Zebstrika": "True", + "Roggenrola": "True", + "Boldore": "True", + "Gigalith": "True", + "Woobat": "True", + "Swoobat": "True", + "Drilbur": "True", + "Excadrill": "True", + "Audino": "True", + "Timburr": "True", + "Gurdurr": "True", + "Conkeldurr": "True", + "Tympole": "True", + "Palpitoad": "True", + "Seismitoad": "True", + "Throh": "True", + "Sawk": "True", + "Sewaddle": "True", + "Swadloon": "True", + "Leavanny": "True", + "Venipede": "True", + "Whirlipede": "True", + "Scolipede": "True", + "Cottonee": "True", + "Whimsicott": "True", + "Petilil": "True", + "Lilligant": "True", + "Basculin": "True", + "Sandile": "True", + "Krokorok": "True", + "Krookodile": "True", + "Darumaka": "True", + "Darmanitan": "True", + "Maractus": "True", + "Dwebble": "True", + "Crustle": "True", + "Scraggy": "True", + "Scrafty": "True", + "Sigilyph": "True", + "Yamask": "True", + "Cofagrigus": "True", + "Tirtouga": "True", + "Carracosta": "True", + "Archen": "True", + "Archeops": "True", + "Trubbish": "True", + "Garbodor": "True", + "Zorua": "True", + "Zoroark": "True", + "Minccino": "True", + "Cinccino": "True", + "Gothita": "True", + "Gothorita": "True", + "Gothitelle": "True", + "Solosis": "True", + "Duosion": "True", + "Reuniclus": "True", + "Ducklett": "True", + "Swanna": "True", + "Vanillite": "True", + "Vanillish": "True", + "Vanilluxe": "True", + "Deerling": "True", + "Sawsbuck": "True", + "Emolga": "True", + "Karrablast": "True", + "Escavalier": "True", + "Foongus": "True", + "Amoonguss": "True", + "Frillish": "True", + "Jellicent": "True", + "Alomomola": "True", + "Joltik": "True", + "Galvantula": "True", + "Ferroseed": "True", + "Ferrothorn": "True", + "Klink": "True", + "Klang": "True", + "Klinklang": "True", + "Tynamo": "True", + "Eelektrik": "True", + "Eelektross": "True", + "Elgyem": "True", + "Beheeyem": "True", + "Litwick": "True", + "Lampent": "True", + "Chandelure": "True", + "Axew": "True", + "Fraxure": "True", + "Haxorus": "True", + "Cubchoo": "True", + "Beartic": "True", + "Cryogonal": "True", + "Shelmet": "True", + "Accelgor": "True", + "Stunfisk": "True", + "Mienfoo": "True", + "Mienshao": "True", + "Druddigon": "True", + "Golett": "True", + "Golurk": "True", + "Pawniard": "True", + "Bisharp": "True", + "Bouffalant": "True", + "Rufflet": "True", + "Braviary": "True", + "Vullaby": "True", + "Mandibuzz": "True", + "Heatmor": "True", + "Durant": "True", + "Deino": "True", + "Zweilous": "True", + "Hydreigon": "True", + "Larvesta": "True", + "Volcarona": "True", + "Cobalion": "True", + "Terrakion": "True", + "Virizion": "True", + "Tornadus": "True", + "Thundurus": "True", + "Reshiram": "True", + "Zekrom": "True", + "Landorus": "True", + "Kyurem": "True", + "Keldeo": "True", + "Meloetta": "True", + "Genesect": "True", + "Chespin": "True", + "Quilladin": "True", + "Chesnaught": "True", + "Fennekin": "True", + "Braixen": "True", + "Delphox": "True", + "Froakie": "True", + "Frogadier": "True", + "Greninja": "True", + "Bunnelby": "True", + "Diggersby": "True", + "Fletchling": "True", + "Fletchinder": "True", + "Talonflame": "True", + "Scatterbug": "True", + "Spewpa": "True", + "Vivillon": "True", + "Litleo": "True", + "Pyroar": "True", + "Flab\u00e9b\u00e9": "True", + "Floette": "True", + "Florges": "True", + "Skiddo": "True", + "Gogoat": "True", + "Pancham": "True", + "Pangoro": "True", + "Furfrou": "True", + "Espurr": "True", + "Meowstic": "True", + "Honedge": "True", + "Doublade": "True", + "Aegislash": "True", + "Spritzee": "True", + "Aromatisse": "True", + "Swirlix": "True", + "Slurpuff": "True", + "Inkay": "True", + "Malamar": "True", + "Binacle": "True", + "Barbaracle": "True", + "Skrelp": "True", + "Dragalge": "True", + "Clauncher": "True", + "Clawitzer": "True", + "Helioptile": "True", + "Heliolisk": "True", + "Tyrunt": "True", + "Tyrantrum": "True", + "Amaura": "True", + "Aurorus": "True", + "Sylveon": "True", + "Hawlucha": "True", + "Dedenne": "True", + "Carbink": "True", + "Goomy": "True", + "Sliggoo": "True", + "Goodra": "True", + "Klefki": "True", + "Phantump": "True", + "Trevenant": "True", + "Pumpkaboo": "True", + "Gourgeist": "True", + "Bergmite": "True", + "Avalugg": "True", + "Noibat": "True", + "Noivern": "True", + "Xerneas": "True", + "Yveltal": "True", + "Zygarde": "True", + "Diancie": "True", + "Hoopa": "True", + "Volcanion": "True" +} diff --git a/configs/filters/PvP_Perfect_Great.json.ex b/configs/filters/PvP_Perfect_Great.json.example similarity index 99% rename from configs/filters/PvP_Perfect_Great.json.ex rename to configs/filters/PvP_Perfect_Great.json.example index e4f5d4b..b935671 100644 --- a/configs/filters/PvP_Perfect_Great.json.ex +++ b/configs/filters/PvP_Perfect_Great.json.example @@ -3,6 +3,8 @@ "league": "great", + "type": "all", + "min_level": 1, "min_pvp_rank": 1, diff --git a/configs/filters/PvP_Perfect_Ultra.json.ex b/configs/filters/PvP_Perfect_Ultra.json.example similarity index 99% rename from configs/filters/PvP_Perfect_Ultra.json.ex rename to configs/filters/PvP_Perfect_Ultra.json.example index 699867a..147b6b4 100644 --- a/configs/filters/PvP_Perfect_Ultra.json.ex +++ b/configs/filters/PvP_Perfect_Ultra.json.example @@ -3,6 +3,8 @@ "league": "ultra", + "type": "all", + "min_level": 1, "min_pvp_rank": 1, diff --git a/configs/geofences/city.json.example b/configs/geofences/#city.json.example similarity index 100% rename from configs/geofences/city.json.example rename to configs/geofences/#city.json.example diff --git a/configs/invasion_channels/city.ini.example b/configs/invasion_channels/#city.ini.example similarity index 100% rename from configs/invasion_channels/city.ini.example rename to configs/invasion_channels/#city.ini.example diff --git a/configs/lure_channels/city.ini.example b/configs/lure_channels/#city.ini.example similarity index 100% rename from configs/lure_channels/city.ini.example rename to configs/lure_channels/#city.ini.example diff --git a/configs/quest_channels/city.ini.example b/configs/quest_channels/#city.ini.example similarity index 100% rename from configs/quest_channels/city.ini.example rename to configs/quest_channels/#city.ini.example diff --git a/configs/raid_channels/city.ini.example b/configs/raid_channels/#city.ini.example similarity index 100% rename from configs/raid_channels/city.ini.example rename to configs/raid_channels/#city.ini.example diff --git a/configs/sub_presets/pvp/All_Rank_1s.ini.example b/configs/sub_presets/pvp/All_Rank_1s.ini.example new file mode 100644 index 0000000..1c79a9d --- /dev/null +++ b/configs/sub_presets/pvp/All_Rank_1s.ini.example @@ -0,0 +1,23 @@ +# Use 0 for all or use Pokemon ID #. Split with ',' for multiple. +pokemon_id = 0 + +# 0 for All or the pokemon type name. Only one type may be used. +pokemon_type = 0 + +# 0 for All or the league name +league = 0 + +# Use 0 for All. Must use Form ID number +form = 0 + +# Use 0 for All or Use lowercase type name. You can only set one. +type = 0 + +# Use 0 for All. Use Gen ID and split with ',' for multiple. +gen = 0 + +# 1 - 35. Do not use 0. +min_lvl = 1 + +# 1 - 20. This value cannot be higher than 20. Do not use 0. +min_rank = 1 diff --git a/configs/sub_presets/pvp/All_Ultra_Rank_1s.ini.example b/configs/sub_presets/pvp/All_Ultra_Rank_1s.ini.example new file mode 100644 index 0000000..d7f74e0 --- /dev/null +++ b/configs/sub_presets/pvp/All_Ultra_Rank_1s.ini.example @@ -0,0 +1,23 @@ +# Use 0 for all or use Pokemon ID #. Split with ',' for multiple. +pokemon_id = 0 + +# 0 for All or the pokemon type name. Only one type may be used. +pokemon_type = 0 + +# 0 for All or the league name +league = ultra + +# Use 0 for All. Must use Form ID number +form = 0 + +# Use 0 for All or Use lowercase type name. You can only set one. +type = 0 + +# Use 0 for All. Use Gen ID and split with ',' for multiple. +gen = 0 + +# 1 - 35. Do not use 0. +min_lvl = 1 + +# 1 - 20. This value cannot be higher than 20. Do not use 0. +min_rank = 1 diff --git a/configs/sub_presets/pvp/Gen5_Rank_1s.ini.example b/configs/sub_presets/pvp/Gen5_Rank_1s.ini.example new file mode 100644 index 0000000..79dcd6f --- /dev/null +++ b/configs/sub_presets/pvp/Gen5_Rank_1s.ini.example @@ -0,0 +1,23 @@ +# Use 0 for all or use Pokemon ID #. Split with ',' for multiple. +pokemon_id = 0 + +# 0 for All or the pokemon type name. Only one type may be used. +pokemon_type = 0 + +# 0 for All or the league name +league = 0 + +# Use 0 for All. Must use Form ID number +form = 0 + +# Use 0 for All or Use lowercase type name. You can only set one. +type = 0 + +# Use 0 for All. Use Gen ID and split with ',' for multiple. +gen = 5 + +# 1 - 35. Do not use 0. +min_lvl = 1 + +# 1 - 20. This value cannot be higher than 20. Do not use 0. +min_rank = 1 diff --git a/configs/sub_presets/pvp/Grass_Rank_1s.ini.example b/configs/sub_presets/pvp/Grass_Rank_1s.ini.example new file mode 100644 index 0000000..6ef75ed --- /dev/null +++ b/configs/sub_presets/pvp/Grass_Rank_1s.ini.example @@ -0,0 +1,23 @@ +# Use 0 for all or use Pokemon ID #. Split with ',' for multiple. +pokemon_id = 0 + +# 0 for All or the pokemon type name. Only one type may be used. +pokemon_type = 0 + +# 0 for All or the league name +league = 0 + +# Use 0 for All. Must use Form ID number +form = 0 + +# Use 0 for All or Use lowercase type name. You can only set one. +type = grass + +# Use 0 for All. Use Gen ID and split with ',' for multiple. +gen = 0 + +# 1 - 35. Do not use 0. +min_lvl = 1 + +# 1 - 20. This value cannot be higher than 20. Do not use 0. +min_rank = 1 diff --git a/configs/z_maptiles/Templates/pokemon.json b/configs/z_maptiles/Templates/pokemon.json index 3bb9587..6966cb4 100644 --- a/configs/z_maptiles/Templates/pokemon.json +++ b/configs/z_maptiles/Templates/pokemon.json @@ -33,8 +33,8 @@ "url": "#index(pg, 3)", "latitude": #index(pg, 0), "longitude": #index(pg, 1), - "height": 18, - "width": 18, + "height": 20, + "width": 20, "y_offset": -24 }, #endfor @@ -43,8 +43,8 @@ "url": "#(url)", "latitude": #(lat), "longitude": #(lon), - "width": 40, - "height": 40 + "width": 45, + "height": 45 } ] } diff --git a/configs/z_maptiles/Templates/raids.json b/configs/z_maptiles/Templates/raids.json index 4756d60..1cacfcc 100644 --- a/configs/z_maptiles/Templates/raids.json +++ b/configs/z_maptiles/Templates/raids.json @@ -33,8 +33,8 @@ "url": "#index(pg, 3)", "latitude": #index(pg, 0), "longitude": #index(pg, 1), - "height": 18, - "width": 18, + "height": 20, + "width": 20, "y_offset": -24 }, #endfor @@ -50,8 +50,8 @@ "url": "#(url2)", "latitude": #(lat), "longitude": #(lon), - "width": 50, - "height": 50, + "width": 55, + "height": 55, "y_offset": -40 } ] diff --git a/configs/z_maptiles/nest.json b/configs/z_maptiles/nest.json new file mode 100644 index 0000000..a646d68 --- /dev/null +++ b/configs/z_maptiles/nest.json @@ -0,0 +1,93 @@ +{ + "style": "klokantech-basic", + "latitude": #(lat), + "longitude": #(lon), + "zoom": 15, + "width": 400, + "height": 220, + "scale": 2, + "markers": [ + #if(gyms != nil): + #for(pg in gyms): + #if(index(pg, 2) == 0): + { + "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/Uncontested.png", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "width": 20, + "height": 20, + "y_offset": -8 + }, + #endif + #if(index(pg, 2) == 1): + { + "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/Mystic.png", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "width": 20, + "height": 20, + "y_offset": -8 + }, + #endif + #if(index(pg, 2) == 2): + { + "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/Valor.png", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "width": 20, + "height": 20, + "y_offset": -8 + }, + #endif + #if(index(pg, 2) == 3): + { + "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/Instinct.png", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "width": 20, + "height": 20, + "y_offset": -8 + }, + #endif + #endfor + #endif + #if(stops != nil): + #for(ps in stops): + { + "url": "#(url3)", + "latitude": #index(ps, 0), + "longitude": #index(ps, 1), + "width": 20, + "height": 20, + "y_offset": -8 + }, + #endfor + #endif + { + "url": "#(url2)", + "latitude": #(lat), + "longitude": #(lon), + "width": 45, + "height": 45 + }, + { + "url": "#(url)", + "latitude": #(lat), + "longitude": #(lon), + "width": 40, + "height": 40 + } + ], + "polygons": [ + { + "fill_color": "#87ceeb60", + "stroke_color": "#000000", + "stroke_width": 1, + "path": [ + #for(coord in polygon): + #if(index!=0):,#endif[#index(coord, 0), #index(coord, 1)] + #endfor + ] + } + ] +} diff --git a/configs/z_maptiles/pokemon.json b/configs/z_maptiles/pokemon.json new file mode 100644 index 0000000..3bb9587 --- /dev/null +++ b/configs/z_maptiles/pokemon.json @@ -0,0 +1,50 @@ +{ + "style": "klokantech-basic", + "latitude": #(lat), + "longitude": #(lon), + "zoom": 15, + "width": 400, + "height": 220, + "scale": 2, + "markers": [ + #if(stops != nil): + #for(ps in stops): + { + "url": "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/other/tile_pokestop.png", + "latitude": #index(ps,0), + "longitude": #index(ps,1), + "width": 17, + "height": 17, + "y_offset": -7 + }, + #endfor + #endif + #if(gyms != nil): + #for(pg in gyms): + { + "url": "#index(pg, 2)", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "height": 20, + "width": 20, + "y_offset": -8 + }, + { + "url": "#index(pg, 3)", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "height": 18, + "width": 18, + "y_offset": -24 + }, + #endfor + #endif + { + "url": "#(url)", + "latitude": #(lat), + "longitude": #(lon), + "width": 40, + "height": 40 + } + ] +} diff --git a/configs/z_maptiles/quests.json b/configs/z_maptiles/quests.json new file mode 100644 index 0000000..9d66cfb --- /dev/null +++ b/configs/z_maptiles/quests.json @@ -0,0 +1,58 @@ +{ + "style": "klokantech-basic", + "latitude": #(lat), + "longitude": #(lon), + "zoom": 15, + "width": 400, + "height": 220, + "scale": 2, + "markers": [ + #if(stops != nil): + #for(ps in stops): + { + "url": "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/other/tile_pokestop.png", + "latitude": #index(ps,0), + "longitude": #index(ps,1), + "width": 17, + "height": 17, + "y_offset": -7 + }, + #endfor + #endif + #if(gyms != nil): + #for(pg in gyms): + { + "url": "#index(pg, 2)", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "height": 20, + "width": 20, + "y_offset": -8 + }, + { + "url": "#index(pg, 3)", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "height": 18, + "width": 18, + "y_offset": -24 + }, + #endfor + #endif + { + "url": "#(url)", + "latitude": #(lat), + "longitude": #(lon), + "width": 50, + "height": 50 + }, + { + "url": "#(url2)", + "latitude": #(lat), + "longitude": #(lon), + "width": 40, + "height": 40, + "y_offset": -40 + } + ] +} diff --git a/configs/z_maptiles/raids.json b/configs/z_maptiles/raids.json new file mode 100644 index 0000000..4756d60 --- /dev/null +++ b/configs/z_maptiles/raids.json @@ -0,0 +1,58 @@ +{ + "style": "klokantech-basic", + "latitude": #(lat), + "longitude": #(lon), + "zoom": 15, + "width": 400, + "height": 220, + "scale": 2, + "markers": [ + #if(stops != nil): + #for(ps in stops): + { + "url": "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/other/tile_pokestop.png", + "latitude": #index(ps,0), + "longitude": #index(ps,1), + "width": 17, + "height": 17, + "y_offset": -7 + }, + #endfor + #endif + #if(gyms != nil): + #for(pg in gyms): + { + "url": "#index(pg, 2)", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "height": 20, + "width": 20, + "y_offset": -8 + }, + { + "url": "#index(pg, 3)", + "latitude": #index(pg, 0), + "longitude": #index(pg, 1), + "height": 18, + "width": 18, + "y_offset": -24 + }, + #endfor + #endif + { + "url": "#(url)", + "latitude": #(lat), + "longitude": #(lon), + "width": 50, + "height": 50 + }, + { + "url": "#(url2)", + "latitude": #(lat), + "longitude": #(lon), + "width": 50, + "height": 50, + "y_offset": -40 + } + ] +} diff --git a/package-lock.json b/package-lock.json index ae9aad1..34a617e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -120,6 +120,17 @@ "negotiator": "0.6.2" } }, + "ajv": { + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -140,6 +151,19 @@ "resolved": "https://registry.npmjs.org/array-source/-/array-source-0.0.4.tgz", "integrity": "sha1-pSXfSoSxN20nxnfNQmqXw4gviso=" }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -150,6 +174,16 @@ "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha1-YCzUtG6EStTv/JKoARo8RuAjjcI=" }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", + "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" + }, "axios": { "version": "0.19.2", "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", @@ -158,6 +192,26 @@ "follow-redirects": "1.5.10" } }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + }, + "dependencies": { + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + } + } + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", @@ -194,6 +248,11 @@ "redeyed": "~2.1.0" } }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, "cli-progress": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.8.2.tgz", @@ -203,10 +262,41 @@ "string-width": "^4.2.0" } }, + "color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz", + "integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==", + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha1-xQSRR51MG9rtLJztMs98fcI2D3g=" + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" }, "combined-stream": { "version": "1.0.8", @@ -245,6 +335,37 @@ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=" }, + "contentstream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/contentstream/-/contentstream-1.0.0.tgz", + "integrity": "sha1-C9z6RtowRkqGzo+n7OVlQQ3G+aU=", + "requires": { + "readable-stream": "~1.0.33-1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "cookie": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", @@ -260,6 +381,27 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cwise-compiler": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", + "integrity": "sha1-9NZnQQ6FDToxOn0tt7HlBbsDTMU=", + "requires": { + "uniq": "^1.0.0" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-uri-to-buffer": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-0.0.3.tgz", + "integrity": "sha1-GK6XmmoMqZSwYlhTkW0mYruuCxo=" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -303,6 +445,15 @@ "ws": "^7.2.1" } }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -375,6 +526,26 @@ "vary": "~1.1.2" } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, "file-source": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/file-source/-/file-source-0.6.1.tgz", @@ -415,6 +586,21 @@ } } }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -475,11 +661,82 @@ "shapefile": "~0.6.6" } }, + "get-pixels": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/get-pixels/-/get-pixels-3.3.2.tgz", + "integrity": "sha512-6ar+8yPxRd1pskEcl2GSEu1La0+xYRjjnkby6AYiRDDwZ0tJbPQmHnSeH9fGLskT8kvR0OukVgtZLcsENF9YKQ==", + "requires": { + "data-uri-to-buffer": "0.0.3", + "jpeg-js": "^0.3.2", + "mime-types": "^2.0.1", + "ndarray": "^1.0.13", + "ndarray-pack": "^1.1.1", + "node-bitmap": "0.0.1", + "omggif": "^1.0.5", + "parse-data-uri": "^0.2.0", + "pngjs": "^3.3.3", + "request": "^2.44.0", + "through": "^2.3.4" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gif-encoder": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/gif-encoder/-/gif-encoder-0.4.3.tgz", + "integrity": "sha1-iitP6MqJWkjjoLbLs0CgpqNXGJk=", + "requires": { + "readable-stream": "~1.1.9" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", "integrity": "sha1-Ila94U02MpWMRl68ltxGfKB6Kfs=" }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", @@ -492,6 +749,16 @@ "toidentifier": "1.0.0" } }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -505,6 +772,20 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q=" }, + "image-downloader": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/image-downloader/-/image-downloader-4.0.1.tgz", + "integrity": "sha512-VfjlMHx1DDPN27x6IC15+6oejeG0A1S955r7oF4rsxqAh8+ygJ3avK8yi8pJztz5qir/x1dFV+eCIy3155byhg==" + }, + "image-stroke": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/image-stroke/-/image-stroke-0.1.1.tgz", + "integrity": "sha512-+rFNIG1Ip0n4NSxraaA/SHcmA3RHVOzVS+RdHL086lpvwaZ1EFZE/KfXIbUaVqzZOQLj7iShypRAAgAvhtNoRQ==", + "requires": { + "color": "^3.1.2", + "marching-squares": "^0.2.0" + } + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -515,11 +796,26 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=" }, + "iota-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz", + "integrity": "sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc=" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha1-v/OFQ+64mEglB5/zoqjmy9RngbM=" }, + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -530,11 +826,46 @@ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jpeg-js": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.7.tgz", + "integrity": "sha512-9IXdWudL61npZjvLuVe/ktHiA41iE8qFyLB+4VDTblEsWBzeg8WQTlktdUK4CdncUqtUgUg0bbOmTE2bKBKaBQ==" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, "jsonfile": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", @@ -544,6 +875,17 @@ "universalify": "^1.0.0" } }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -557,6 +899,11 @@ "yallist": "^3.0.2" } }, + "marching-squares": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/marching-squares/-/marching-squares-0.2.0.tgz", + "integrity": "sha1-KAhhcL932NvVeEWdmXqQUmz1+vA=" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -590,6 +937,19 @@ "mime-db": "1.44.0" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, "moment": { "version": "2.25.3", "resolved": "https://registry.npmjs.org/moment/-/moment-2.25.3.tgz", @@ -608,6 +968,24 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "requires": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "dependencies": { + "sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=" + } + } + }, "mysql2": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.1.0.tgz", @@ -658,16 +1036,57 @@ } } }, + "ndarray": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz", + "integrity": "sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==", + "requires": { + "iota-array": "^1.0.0", + "is-buffer": "^1.0.2" + } + }, + "ndarray-ops": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ndarray-ops/-/ndarray-ops-1.2.2.tgz", + "integrity": "sha1-WeiNLDKn7ryxvGkPrhQVeVV6YU4=", + "requires": { + "cwise-compiler": "^1.0.0" + } + }, + "ndarray-pack": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz", + "integrity": "sha1-jK6+qqJNXs9w/4YCBjeXfajuWFo=", + "requires": { + "cwise-compiler": "^1.1.2", + "ndarray": "^1.0.13" + } + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=" }, + "node-bitmap": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz", + "integrity": "sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE=" + }, "node-fetch": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", "integrity": "sha1-5jNFY4bUqlWGP2dqerDaqP3ssP0=" }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "omggif": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", + "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -681,6 +1100,14 @@ "resolved": "https://registry.npmjs.org/ontime/-/ontime-0.0.6.tgz", "integrity": "sha1-BpSeYLNYlrSG6z38IqNL40wxhWo=" }, + "parse-data-uri": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/parse-data-uri/-/parse-data-uri-0.2.0.tgz", + "integrity": "sha1-vwTYUd1ch7CrI45dAazklLYEtMk=", + "requires": { + "data-uri-to-buffer": "0.0.3" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -718,6 +1145,21 @@ "resolve-protobuf-schema": "^2.1.0" } }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pngjs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", + "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==" + }, + "pngjs-nozlib": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pngjs-nozlib/-/pngjs-nozlib-1.0.0.tgz", + "integrity": "sha1-nmTWAs/pzOTZ1Zl9BodCmnPwt9c=" + }, "point-in-geopolygon": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/point-in-geopolygon/-/point-in-geopolygon-1.0.1.tgz", @@ -782,6 +1224,16 @@ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -825,6 +1277,40 @@ "esprima": "~4.0.0" } }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + } + } + }, "resolve-protobuf-schema": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", @@ -843,6 +1329,27 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" }, + "save-pixels": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/save-pixels/-/save-pixels-2.3.4.tgz", + "integrity": "sha1-SdNJwGuNfAEn2/DaJLRKylr7Wf4=", + "requires": { + "contentstream": "^1.0.0", + "gif-encoder": "~0.4.1", + "jpeg-js": "0.0.4", + "ndarray": "^1.0.18", + "ndarray-ops": "^1.2.2", + "pngjs-nozlib": "^1.0.0", + "through": "^2.3.4" + }, + "dependencies": { + "jpeg-js": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.0.4.tgz", + "integrity": "sha1-Bqr0fv7HrwsZJKWc1pWm0rXthw4=" + } + } + }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -909,6 +1416,14 @@ "text-encoding": "^0.6.4" } }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "requires": { + "is-arrayish": "^0.3.1" + } + }, "slice-source": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/slice-source/-/slice-source-0.4.1.tgz", @@ -919,6 +1434,29 @@ "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.2.tgz", "integrity": "sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg==" }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "dependencies": { + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + } + } + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -960,11 +1498,43 @@ "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=" }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=" }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "trim-image": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/trim-image/-/trim-image-1.0.3.tgz", + "integrity": "sha512-bN+tDqg4j10/tyOZgbSvZlUdZ0EFpKPTSqzcT6xF6XQlNl1kXzg2Yr3mayasbMMGFympOf5yE3hg+mBMRmYO0g==", + "requires": { + "get-pixels": "^3.3.0", + "mkdirp": "^0.5.1", + "save-pixels": "^2.3.4" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", @@ -984,6 +1554,11 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", @@ -994,6 +1569,14 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, "util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", @@ -1012,11 +1595,26 @@ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, "ws": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", diff --git a/package.json b/package.json index 5319ace..b0257fe 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "requires": true, + "version": "2.0.0b2", "lockfileVersion": 1, "dependencies": { "axios": "^0.19.2", @@ -16,7 +17,6 @@ "ini": "^1.3.5", "moment": "^2.25.3", "moment-timezone": "^0.5.28", - "mysql": "^2.18.1", "mysql2": "^2.1.0", "ontime": "0.0.6", "path": "^0.12.7", diff --git a/src/bot.js b/src/bot.js index 9290429..11a49a1 100644 --- a/src/bot.js +++ b/src/bot.js @@ -53,7 +53,7 @@ function Array_Login(WDR) { // LOAD ERROR EVENTS FOR EACH TOKEN AVAILABLE bots_available[i].on("error", (error) => { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [bot.js] Discord client encountered an error: " + error); + WDR.Console.error(WDR, "[src/bot.js] Discord client encountered an error:", [error]); }); // LOGIN A BOT FOR EACH TOKEN @@ -69,7 +69,7 @@ function Array_Login(WDR) { // RESTART FUNCTION //------------------------------------------------------------------------------ Bot.restart = (reason, code) => { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [bot.js] Restarting..."); + WDR.Console.error(WDR, "[src/bot.js] Restarting..."); process.exit(code).catch(console.error); return; } @@ -81,12 +81,12 @@ Bot.restart = (reason, code) => { exports.Load = function(WDR) { return new Promise(async resolve => { - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [bot.js] Logging in Main Bot..."); + WDR.Console.info(WDR, "[src/bot.js] Logging in Main Bot..."); // LOGIN WDR TOKEN await Bot.login(WDR.Config.TOKENS.WDR); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [bot.js] Logging in Worker Bots..."); + WDR.Console.info(WDR, "[src/bot.js] Logging in Worker Bots..."); // LOGIN IN ALL ACCESSORY BOTS await Array_Login(WDR); diff --git a/src/commands/subscription/area.js b/src/commands/subscription/area.js deleted file mode 100644 index 45183fa..0000000 --- a/src/commands/subscription/area.js +++ /dev/null @@ -1,468 +0,0 @@ -const insideGeofence = require("point-in-polygon"); -const insideGeojson = require("point-in-geopolygon"); - -module.exports = async (WDR, message, prefix, server) => { - - // DECLARE VARIABLES - let nickname = "", - area_array = "", - available_areas = ""; - - let geofence = await WDR.Geofences.get(server.geojson_file); - - if (!geofence) { - return message.reply("No geofence file has been set for this server. Contact a server admin if you think this is incorrect.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - - await geofence.features.forEach((geofence, index) => { - area_array += geofence.properties.name + ","; - }); - area_array = area_array.slice(0, -1); - - // GET USER NICKNAME - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let requestAction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle("What would you like to do with your Area Subscriptions?") - .setDescription("`distance` » Set coordinates for distance based Notifications" + "\n" + - "`view` » View your Areas." + "\n" + - "`add` » Add an Area." + "\n" + - "`remove` » Remove an Area.") - .setFooter("Type the action, no command prefix required."); - - - message.channel.send(requestAction).catch(console.error).then(msg => { - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (message.content.toLowerCase()) { - case "add": - collector.stop("add"); - break; - case "remove": - collector.stop("remove"); - break; - case "view": - collector.stop("view"); - break; - case "cancel": - collector.stop("cancel"); - break; - default: - message.reply("`" + message.content + "` is not a valid option.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on("end", (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case "add": - subscription_create(WDR, message, nickname, prefix, area_array, server); - break; - case "remove": - subscription_remove(WDR, message, nickname, prefix, area_array, server); - break; - case "view": - subscription_view(WDR, message, nickname, prefix, area_array, server); - break; - default: - return message.reply("Your subscription has timed out.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - }); - }); -} - -// AREA VIEW FUNCTION -async function subscription_view(WDR, message, nickname, prefix, area_array, server) { - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, server.id], function(error, user, fields) { - if (!user || !user[0]) { - return; - } - - let area_list = ""; - if (!user[0].geofence) { - area_list = "None"; - } else { - area_list = user[0].geofence.replace(/,/g, "\n"); - } - - // CREATE THE EMBED - let area_subs = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle("Area Subscriptions") - .setDescription("Overall Status: `" + user[0].status + "`") - .addField("Your Areas:", "**" + area_list + "**", false) - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - - // SEND THE EMBED - message.channel.send(area_subs).catch(console.error).then(msg => { - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (message.content.toLowerCase()) { - case "add": - collector.stop("add"); - break; - case "remove": - collector.stop("remove"); - break; - case "view": - collector.stop("view"); - break; - case "cancel": - collector.stop("cancel"); - break; - default: - collector.stop("end"); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on("end", (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - - switch (reason) { - case "add": - subscription_create(WDR, message, nickname, prefix, area_array, server); - break; - case "remove": - subscription_remove(WDR, message, nickname, prefix, area_array, server); - break; - case "view": - subscription_view(WDR, message, nickname, prefix, area_array, server); - break; - case "end": - return; - } - }); - }); - }); -} - -// SUBSCRIPTION CREATE FUNCTION -async function subscription_create(WDR, message, nickname, prefix, area_array, server) { - - // PULL THE USER"S SUBSCRITIONS FROM THE USER TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, server.id], async function(error, user, fields) { - - // RETRIEVE AREA NAME FROM USER - let sub = await sub_collector(WDR, "Name", nickname, message, "Names are not case-sensitive. The Check denotes you are already subscribed to that Area.", user[0].geofence, area_array, server); - if (sub.toLowerCase() == "cancel") { - return message.reply("Subscription cancelled. Type `" + prefix + "area` to restart.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else if (sub == "time") { - return message.reply("Your subscription has timed out.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - - // DEFINED VARIABLES - let areas = user[0].geofence.split(","); - let area_index = areas.indexOf(sub); - - // CHECK IF USER IS ALREADY SUBSCRIBED TO THE AREA OR NOT AND ADD - if (area_index >= 0) { - return message.reply("You are already subscribed to this Area.").then(m => m.delete(10000)).catch(console.error); - } else { - switch (true) { - case sub == "all": - areas = server.name; - break; - case user[0].geofence == server.name: - case user[0].geofence == "None": - areas = []; - areas.push(sub); - break; - default: - areas.push(sub); - } - } - - // CONVERT TO STRING - areas = areas.toString(); - - // UPDATE THE USER"S RECORD - WDR.wdrDB.query(`UPDATE users SET geofence = ? WHERE user_id = ? AND discord_id = ?`, [areas, message.author.id, server.id], function(error, user, fields) { - if (error) { - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle(sub + " Area Added!") - .setDescription("Saved to the " + WDR.config.BOT_NAME + " Database.") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - return message.channel.send(subscription_success).then(msg => { - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (message.content.toLowerCase()) { - case "add": - collector.stop("add"); - break; - case "remove": - collector.stop("remove"); - break; - case "view": - collector.stop("view"); - break; - case "cancel": - collector.stop("cancel"); - break; - default: - collector.stop("end"); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on("end", (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case "add": - subscription_create(WDR, message, nickname, prefix, area_array, server); - break; - case "remove": - subscription_remove(WDR, message, nickname, prefix, area_array, server); - break; - case "view": - subscription_view(WDR, message, nickname, prefix, area_array, server); - break; - case "end": - return; - } - }); - }); - } - }); - }); -} - -// SUBSCRIPTION REMOVE FUNCTION -async function subscription_remove(WDR, message, nickname, prefix, area_array, server) { - - // PULL THE USER"S SUBSCRITIONS FROM THE USER TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, server.id], async function(error, user, fields) { - - // RETRIEVE AREA NAME FROM USER - let sub = await sub_collector(WDR, "Remove", nickname, message, "Names are not case-sensitive. The Check denotes you are already subscribed to that Area.", user[0].geofence, area_array, server); - if (sub.toLowerCase() == "cancel") { - return message.reply("Subscription cancelled. Type `" + prefix + "area` to restart.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else if (sub == "time") { - return message.reply("Your subscription has timed out.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - - // DEFINED VARIABLES - let areas = user[0].geofence.split(","); - let area_index = areas.indexOf(sub); - - // CHECK IF USER IS ALREADY SUBSCRIBED TO THE AREA OR NOT AND ADD - if (sub == "all") { - areas = "None"; - } else if (area_index < 0) { - return message.reply("You are not subscribed to this Area.").then(m => m.delete(10000)).catch(console.error); - } else { - areas.splice(area_index, 1); - } - - if (areas.length == 0) { - areas = "None"; - } else { - areas = areas.toString(); - } - - // UPDATE THE USER"S RECORD - WDR.wdrDB.query(`UPDATE users SET geofence = ? WHERE user_id = ? AND discord_id = ?`, [areas, message.author.id, server.id], function(error, user, fields) { - if (error) { - console.error(error); - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle(sub + " Area Removed!") - .setFooter("Saved to the " + WDR.config.BOT_NAME + " Database."); - return message.channel.send(subscription_success).then(msg => { - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (message.content.toLowerCase()) { - case "add": - collector.stop("add"); - break; - case "remove": - collector.stop("remove"); - break; - case "view": - collector.stop("view"); - break; - case "cancel": - collector.stop("cancel"); - break; - default: - collector.stop("end"); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on("end", (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case "add": - subscription_create(WDR, message, nickname, prefix, area_array, server); - break; - case "remove": - subscription_remove(WDR, message, nickname, prefix, area_array, server); - break; - case "view": - subscription_view(WDR, message, nickname, prefix, area_array, server); - break; - case "end": - return; - } - }); - }); - } - }); - }); -} - -// SUB COLLECTOR FUNCTION -function sub_collector(WDR, type, nickname, message, requirements, sub, area_array, server) { - return new Promise(function(resolve, reject) { - - - // DELCARE VARIABLES - let timeout = true, - instruction = ""; - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 120000 - }); - - let user_areas = sub.toLowerCase().split(","), - area_list = ""; - area_array = area_array.split(","); - // CREATE REWARD LIST AND ADD CHECK FOR SUBSCRIBED REWARDS - area_array.forEach((area, index) => { - if (user_areas.indexOf(area.toLowerCase()) >= 0) { - area_list += area + " " + WDR.Emotes.checkYes + "\n"; - } else { - area_list += area + "\n"; - } - }); - - switch (type) { - - // AREA NAME EMBED - case "Name": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle("What Area would you like to Subscribe to?") - .setDescription("**" + area_list + "**", false) - .setFooter(requirements); - break; - - // REMOVAL EMBED - case "Remove": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle("What Area do you want to remove?") - .addField("Your Areas:", "**" + area_list + "**", false) - .setFooter(requirements); - break; - } - - message.channel.send(instruction).catch(console.error).then(msg => { - - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (true) { - case message.content.toLowerCase() == "cancel": - collector.stop("cancel"); - break; - - // AREA NAME - case type.indexOf("Name") >= 0: - case type.indexOf("Remove") >= 0: - if (message.content.toLowerCase() == "all") { - collector.stop("all"); - break; - } - for (let a = 0; a < area_array.length + 1; a++) { - if (a == area_array.length) { - message.reply("`" + message.content + "` doesn\"t appear to be a valid Area. Please check the spelling and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - } else if (message.content.toLowerCase() == area_array[a].toLowerCase()) { - collector.stop(area_array[a]); - break; - } - } - break; - } - }); - - // COLLECTOR ENDED - collector.on("end", (collected, reason) => { - msg.delete(); - resolve(reason); - }); - }); - }); -} \ No newline at end of file diff --git a/src/commands/subscription/cancel.js b/src/commands/subscription/cancel.js new file mode 100644 index 0000000..fd85537 --- /dev/null +++ b/src/commands/subscription/cancel.js @@ -0,0 +1,9 @@ +module.exports = (WDR, Functions, Message, Member) => { + let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Subscription Cancelled.") + .setDescription("Nothing has been Saved.") + return Message.channel.send(subscription_cancel).then(m => m.delete({ + timeout: 5000 + })).catch(console.error); +} \ No newline at end of file diff --git a/src/commands/subscription/cp.js b/src/commands/subscription/cp.js deleted file mode 100644 index cf5dd49..0000000 --- a/src/commands/subscription/cp.js +++ /dev/null @@ -1,175 +0,0 @@ -const GeoTz = require('geo-tz'); - -const Send_Nest = require(__dirname + '/../../embeds/nests.js'); -const InsideGeojson = require('point-in-geopolygon'); -const pvp = require(__dirname + '/../../pvp.js'); - -module.exports = async (WDR, message, prefix, discord) => { - - // GET USER NICKNAME - let nickname = ''; - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let requestAction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Pokémon do you want a CP search string for?') - .setFooter('Type the name of desired Poké, no command prefix required.'); - - message.channel.send(requestAction).catch(console.error).then(msg => { - initiate_collector(WDR, 'start', message, msg, nickname, prefix, discord); - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - return; - }); -} - -async function pokemon_view(WDR, message, nickname, pokemon, prefix, discord) { - let guild = WDR.Bot.guilds.cache.get(discord.id); - let pokemon_id = pokemon.pokemon_id, - form_id = pokemon.form; - let locale = await WDR.Get_Data(WDR, pokemon); - let sprite = WDR.Get_Sprite(WDR, pokemon); - let pokemon_name = locale.pokemon_name; - let pokemon_color = locale.color; - - // let search_string = pokemon_id+'&', role_id = ''; - // for(var level = 1; level <= 40; level++) { - // search_string += 'cp'+pvp.CalculateCP(WDR,pokemon_id,form_id,15,15,15,level)+','; - // } search_string = search_string.slice(0,-1); - - let search_string = '```Level CP\tLevel CP\n'; - for (var level = 1; level <= 10; level++) { - let cp = ''; - // 1-10 - if (level <= 9) { - search_string += ' '; - } - cp = pvp.CalculateCP(WDR, pokemon_id, form_id, 15, 15, 15, level); - search_string += level + ' ' + padded(cp); - // 11-20 - cp = pvp.CalculateCP(WDR, pokemon_id, form_id, 15, 15, 15, level + 10); - search_string += '\t' + (level + 10) + ' ' + padded(cp) + '\n'; - } - search_string += '``` ```Level CP\tBoosted\n'; - for (var level = 1; level <= 10; level++) { - let cp = ''; - // 21-30 - cp = pvp.CalculateCP(WDR, pokemon_id, form_id, 15, 15, 15, level + 20); - search_string += (level + 20) + ' ' + padded(cp); - // 31-35 - if (level <= 5) { - cp = pvp.CalculateCP(WDR, pokemon_id, form_id, 15, 15, 15, level + 30); - search_string += '\t' + (level + 30) + ' ' + padded(cp) + '\n'; - } else { - cp = pvp.CalculateCP(WDR, pokemon_id, form_id, 15, 15, 15, level + 30); - search_string += '\t' + (level + 30) + ' ' + padded(cp) + '\n'; - } - } - search_string += '```'; - - let chart_embed = new WDR.DiscordJS.MessageEmbed() - .setColor(pokemon_color) - .setThumbnail(sprite) - .setTitle(pokemon_name + ' CP Chart') - .setDescription(search_string); - - - if (discord.spam_channels.indexOf(message.channel.id) >= 0) { - return WDR.Send_Embed(WDR, 'cp', 0, discord, '', chart_embed, message.channel.id); - } else { - guild.members.fetch(message.author.id).then(TARGET => { - return TARGET.send(chart_embed).catch(console.error); - }); - } -} - -function padded(num) { - let n = num.toString(); - if (num < 999) { - n = ' ' + n; - } - if (num < 99) { - n = ' ' + n; - } - return n; -} - -function subscription_timedout(WDR, nickname, message, prefix) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Your Subscription Has Timed Out.') - .setFooter('You can type \'view\', \'add\', \'add adv\', \'remove\', or \'edit\'.'); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, 'time', message, msg, nickname, prefix, discord); - }); -} - -async function initiate_collector(WDR, source, message, msg, nickname, prefix, discord) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - let msg_count = 0; - - // FILTER COLLECT EVENT - await collector.on('collect', message => { - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - let pokemon = message.content.toLowerCase(); - - if (pokemon != 'NaN' && pokemon < 809) { - collector.stop({ - pokemon_id: pokemon.split(' ')[0], - form: pokemon.split(' ')[1] - }); - } - - let searched = WDR.Master.Pokemon_ID_Search(WDR, pokemon); - if (searched) { - collector.stop(searched); - } - - if (pokemon === 'cancel' || pokemon === 'time') { - collector.stop('cancel'); - } else { - collector.stop('retry'); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - break; - case 'time': - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - case 'retry': - message.reply('Please check your spelling, and retry.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - default: - pokemon_view(WDR, message, nickname, reason, prefix, discord); - } - return; - }); -} \ No newline at end of file diff --git a/src/commands/subscription/dex.js b/src/commands/subscription/dex.js deleted file mode 100644 index ad36e2a..0000000 --- a/src/commands/subscription/dex.js +++ /dev/null @@ -1,104 +0,0 @@ -const GeoTz = require('geo-tz'); - -const Send_Dex = require(__dirname + '/../../embeds/dex.js'); - -module.exports = async (WDR, message, prefix, discord) => { - // DECLARE VARIABLES - let nickname = ''; - - // GET USER NICKNAME - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let requestAction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Pokémon do you want to find out more about?') - .setFooter('Type the name of desired Pokémon, no command prefix required.'); - - message.channel.send(requestAction).catch(console.error).then(msg => { - initiate_collector(WDR, 'start', message, msg, nickname, prefix, discord); - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - return; - }); - -} - -function pokemon_view(WDR, message, nickname, pokemon, prefix, discord) { - new Promise(async function(resolve, reject) { - Send_Dex(WDR, message, pokemon, discord); - return message.reply('Entry sent, check your inbox if not in the channel.') - .then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - }); -} - -async function initiate_collector(WDR, source, message, msg, nickname, prefix, discord) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - let msg_count = 0; - - // FILTER COLLECT EVENT - await collector.on('collect', message => { - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - let pokemon = message.content.toLowerCase(); - - if (pokemon != 'NaN' && pokemon < 809) { - collector.stop({ - pokemon_id: pokemon.split(' ')[0], - form: pokemon.split(' ')[1] - }); - } - - let searched = WDR.Master.Pokemon_ID_Search(WDR, pokemon); - if (searched) { - collector.stop(searched); - } - - if (pokemon === 'cancel' || pokemon === 'time') { - collector.stop('cancel'); - } else { - collector.stop('retry'); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', async (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - break; - case 'time': - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - case 'retry': - message.reply('Please check your spelling, and retry.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - default: - return pokemon_view(WDR, message, nickname, reason, prefix, discord); - } - return; - }); -} \ No newline at end of file diff --git a/src/commands/subscription/help.js b/src/commands/subscription/help.js deleted file mode 100644 index 7b55359..0000000 --- a/src/commands/subscription/help.js +++ /dev/null @@ -1,77 +0,0 @@ -const Discord = require('discord.js'); - -module.exports = async (WDR, message, prefix, discord) => { - let help = new WDR.DiscordJS.MessageEmbed(); - - // COMMAND CHANNEL HELP - if ((discord.command_channels.indexOf(message.channel.id) >= 0 && discord.spam_channels.indexOf(message.channel.id) < 0) || message.channel.type == 'dm') { - help.setColor('000044') - help.setAuthor('Available Subscription Commands:') - help.setDescription('Type a Command to view category options.'); - if (WDR.config.POKEMON.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'pokemon` | `' + prefix + 'p`', 'Initializes Pokémon Subscription Options.', false); - } - if (WDR.config.PVP.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'pvp`', 'Initializes Pokémon PvP Subscription Options.', false); - } - if (WDR.config.QUEST.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'quest` | `' + prefix + 'q` ', 'Initializes Quest Subscription Options.', false); - } - if (WDR.config.RAID.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'raid` | `' + prefix + 'r` ', 'Initializes Raid Subscription Options.', false); - } - if (WDR.config.LURE.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'lure` | `' + prefix + 'l` ', 'Initializes Lure Subscription Options.', false); - } - if (WDR.config.INVASION.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'invasion` | `' + prefix + 'i` ', 'Initializes Team Rocket Invasion Subscription Options.', false); - } - help.addField('`' + prefix + 'area`', 'Shows Area subscription options.', false) - help.addField('`' + prefix + 'pause` | `' + prefix + 'resume`', 'Pause or Resume ALL subscription alerts.', false); - if (WDR.config.pmsfDB.Search == 'ENABLED') { - help.addField('`' + prefix + 'nest` | `' + prefix + 'n` ', 'Initializes Nest Search.', false); - } - help.addField('`' + prefix + 'seen` | `' + prefix + 's` ', 'Look up the # of sightings for a specific Pokémon.', false); - help.addField('`' + prefix + 'cp` ', 'Initializes perfect Pokémon CP string lookup.', false); - help.addField('`' + prefix + 'raidcp` ', 'Initializes raid Pokémon top CPs table.', false); - help.addField('`' + prefix + 'questcp` ', 'Initializes quest Pokémon top CPs table.', false); - help.addField('`' + prefix + 'dex` ', 'Initializes Pokedex search.', false); - return message.channel.send(help).catch(console.error); - - // SPAM CHANNEL HELP - } else if (discord.command_channels.indexOf(message.channel.id) >= 0) { - help.setColor('000044') - help.setAuthor('Available Subscription Commands:') - help.setDescription('Type a Command to view category options.'); - if (WDR.config.POKEMON.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'pokemon` | `' + prefix + 'p`', 'Initializes Pokemon Subscription Options.', false); - } - if (WDR.config.QUEST.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'quest` | `' + prefix + 'q` ', 'Initializes Quest Subscription Options.', false); - } - if (WDR.config.RAID.Subscriptions == 'ENABLED') { - help.addField('`' + prefix + 'raid` | `' + prefix + 'r` ', 'Initializes Raid Subscription Options.', false); - } - help.addField('`' + prefix + 'area`', 'Shows Area subscription options.', false) - help.addField('`' + prefix + 'pause` | `' + prefix + 'resume`', 'Pause or Resume ALL subscription alerts.', false); - if (WDR.config.pmsfDB.Search == 'ENABLED') { - help.addField('`' + prefix + 'nest` | `' + prefix + 'n` ', 'Initializes Nest Search.', false); - } - return message.channel.send(help).catch(console.error); - - // SPAM CHANNEL HELP - } else if (discord.spam_channels.indexOf(message.channel.id) >= 0) { - help.setColor('000044') - help.setAuthor('Available Spam Commands:') - help.setDescription('Type a Command to view category options.'); - if (WDR.config.pmsfDB.Search == 'ENABLED') { - help.addField('`' + prefix + 'nest` | `' + prefix + 'n` ', 'Initializes Nest Search.', false); - } - help.addField('`' + prefix + 'seen` | `' + prefix + 's` ', 'Look up the # of sightings for a specific Pokémon.', false); - help.addField('`' + prefix + 'cp` ', 'Initializes perfect Pokémon CP string lookup.', false); - help.addField('`' + prefix + 'raidcp` ', 'Initializes raid Pokemon top CPs table.', false); - help.addField('`' + prefix + 'questcp` ', 'Initializes quest Pokemon top CPs table.', false); - help.addField('`' + prefix + 'dex` ', 'Initializes Pokedex search.', false); - return message.channel.send(help).catch(console.error); - } -} \ No newline at end of file diff --git a/src/commands/subscription/invasion.js b/src/commands/subscription/invasion.js deleted file mode 100644 index 32e6e76..0000000 --- a/src/commands/subscription/invasion.js +++ /dev/null @@ -1,755 +0,0 @@ -const Fuzzy = require('fuzzy'); - -const InsideGeojson = require('point-in-geopolygon'); - -module.exports = async (WDR, message, prefix, discord) => { - - // LOAD ALL STOPS WITHIN DISCORD GEOFENCE TO AN ARRAY FOR FUZZY - let available_stops = [], - stop_collection = new WDR.discordjs.Collection(); - await WDR.stop_array.forEach(async (stop, index) => { - if (InsideGeojson.polygon(discord.geofence, [stop.lon, stop.lat])) { - let stop_area = await WDR.Get_Area(WDR, stop.lat, stop.lon, discord); - let stop_name = stop.name + ' [' + stop_area.embed + ']'; - available_stops.push(stop_name); - stop_collection.set(stop_name, stop); - } - }); - - // GET USER NICKNAME - let nickname = ''; - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let request_action = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What would you like to do with your Invasion Subscriptions?') - .setDescription('`view` » View your Subscritions.\n' + - '`add` » Create a Simple Subscription.\n' + - '`remove` » Remove a Invasion Subscription.\n' + - '`pause` or `resume` » Pause/Resume Invasion Subscriptions Only.') - .setFooter('Type the action, no command prefix required.'); - - message.channel.send(request_action).catch(console.error).then(msg => { - return initiate_collector(WDR, 'start', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); -} - -// PAUSE OR RESUME POKEMON SUBSCRIPTIOONS -function subscription_status(WDR, message, nickname, reason, prefix, available_stops, discord, stop_collection) { - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, discord.id], function(error, user, fields) { - if (user[0].invasion_status == 'ACTIVE' && reason == 'resume') { - let already_active = new WDR.DiscordJS.MessageEmbed().setColor('ff0000') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Your Invasion subscriptions are already **Active**!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // SEND THE EMBED - message.channel.send(already_paused).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else if (user[0].invasion_status == 'PAUSED' && reason == 'pause') { - let already_paused = new WDR.DiscordJS.MessageEmbed().setColor('ff0000') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Your Invasion subscriptions are already **Paused**!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // SEND THE EMBED - message.channel.send(already_paused).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else { - if (reason == 'pause') { - change = 'PAUSED'; - } - if (reason == 'resume') { - change = 'ACTIVE'; - } - WDR.wdrDB.query('UPDATE users SET invasion_status = ? WHERE user_id = ? AND discord_id = ?', [change, message.author.id, discord.id], function(error, user, fields) { - if (error) { - return message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Your Invasion subscriptions have been set to `' + change + '`!') - .setFooter('Saved to the ' + WDR.config.BOT_NAME + ' Database.'); - return message.channel.send(subscription_success).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - }); - } - }); -} - -// SUBSCRIPTION REMOVE FUNCTION -async function subscription_view(WDR, message, nickname, prefix, available_stops, discord, stop_collection) { - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, discord.id], function(error, user, fields) { - - // CHECK IF THE USER ALREADY HAS SUBSCRIPTIONS AND ADD - if (!user[0].invasion) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('You do not have any Invasion Subscriptions!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // SEND THE EMBED - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else { - - let invasion = JSON.parse(user[0].invasion); - if (!invasion.subscriptions[0]) { - - // CREATE THE EMBED AND SEND - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('You do not have any Subscriptions!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else { - - // CREATE THE EMBED - let invasion_subs = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Invasion Subscriptions') - .setDescription('Overall Status: `' + user[0].status + '`\nInvasions Status: `' + user[0].invasion_status + '`') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // TURN EACH SUBSCRIPTION INTO A FIELD - invasion.subscriptions.forEach((sub, index) => { - if (!sub.gender) { - sub.gender = 'All'; - } - if (sub.stop != 'All' && sub.type != 'All') { - title = '#' + (index + 1) + ' ' + sub.type; - body = 'Stop: ' + sub.stop + '`\nGender: `' + sub.gender + '\nFiltered by Areas: `' + sub.areas + '`'; - } else { - title = '#' + (index + 1); - body = 'Stop: `' + sub.stop + '`\nType: `' + sub.type + '`\nGender: `' + sub.gender + '`\nFiltered by Areas: `' + sub.areas + '`'; - } - - invasion_subs.addField(title, body, false); - }); - - // SEND THE EMBED - message.channel.send(invasion_subs).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } - } - }); -} - -// SUBSCRIPTION CREATE FUNCTION -async function subscription_create(WDR, message, nickname, prefix, advanced, available_stops, discord, stop_collection) { - - // DEFINED THE SUBSCRIPTION OBJECT - let sub = {}, - got_name = false; - - // RETRIEVE STOP NAME FROM USER - do { - sub.stop = await sub_collector(WDR, 'Stop', nickname, message, undefined, 'Respond with \'All\' or a Stop name. Names are not case-sensitive.', sub, available_stops, discord, stop_collection); - if (sub.stop == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.stop == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else { - if (sub.stop == 'All') { - sub.stop = 'All'; - got_name = true; - } else if (!Array.isArray(sub.stop) && sub.stop.split(',')[0] == 'fuzzy') { - let results = Fuzzy.filter(sub.stop.split(',')[1], available_stops); - let matches = results.map(function(el) { - return el.string; - }); - if (!matches[0]) { - message.reply('`' + sub.stop + '`, does not closely match any stop in the database.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else { - let user_choice = await match_collector(WDR, 'Matches', nickname, message, matches, 'Type the number of the Correct stop.', sub, available_stops, discord, stop_collection); - if (sub.stop == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.stop == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else { - let collection_match = stop_collection.get(matches[user_choice]); - if (collection_match) { - sub.id = collection_match.id; - sub.stop = collection_match.name; - got_name = true; - } - } - } - } else if (sub.stop.length > 1) { - let user_choice = await match_collector(WDR, 'Multiple', nickname, message, sub.stop, 'Type the number of the Correct Stop.', sub, available_stops, discord, stop_collection); - if (sub.stop == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.stop == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.stop[user_choice] == undefined) { - return; - } else { - sub.id = sub.stop[user_choice].id; - sub.stop = sub.stop[user_choice].name; - got_name = true; - } - } else { - sub.id = sub.stop[0].id; - sub.stop = sub.stop[0].name; - got_name = true; - } - } - } while (got_name == false); - - // RETRIEVE TYPE NAME FROM USER - sub.type = await sub_collector(WDR, 'Type', nickname, message, undefined, 'Respond with Invasion Grunt Type -OR- \'All\'. Types are not case-sensitive.', sub, available_stops, discord, stop_collection); - if (sub.type == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.type == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - - // RETRIEVE GENDER NAME FROM USER - sub.gender = await sub_collector(WDR, 'Gender', nickname, message, undefined, 'Respond with \'Male\', \'Female\' -OR- \'All\'. Genders are not case-sensitive.', sub, available_stops, discord, stop_collection); - if (sub.gender == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.gender == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - - // RETRIEVE AREA CONFIRMATION FROM USER IF NOT FOR A SPECIFIC STOP - if (sub.stop == 'All') { - sub.areas = await sub_collector(WDR, 'Area Filter', nickname, message, sub.type, 'Please respond with \'Yes\' or \'No\'', sub, available_stops, discord, stop_collection); - if (sub.areas == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.areas == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - } else { - sub.areas = 'Stop Specified'; - } - - // RETRIEVE CONFIRMATION FROM USER - let confirm = await sub_collector(WDR, 'Confirm-Add', nickname, message, sub.type, 'Type \'Yes\' or \'No\'. Subscription will be saved.', sub, available_stops, discord, stop_collection); - if (confirm == 'Cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (confirm == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - - // PULL THE USER'S SUBSCRITIONS FROM THE USER TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, discord.id], async function(error, user, fields) { - let invasion = ''; - // CHECK IF THE USER ALREADY HAS SUBSCRIPTIONS AND ADD - if (!user[0].invasion) { - invasion = {}; - invasion.subscriptions = []; - invasion.subscriptions.push(sub); - } else { - invasion = JSON.parse(user[0].invasion); - if (!invasion.subscriptions[0]) { - invasion.subscriptions.push(sub); - } else { - // CONVERT TO OBJECT AND CHECK EACH SUBSCRIPTION - invasion = JSON.parse(user[0].invasion); - invasion.subscriptions.forEach((subscription, index) => { - - // ADD OR OVERWRITE IF EXISTING - if (subscription.encounter == sub.type && subscription.stop == sub.stop) { - invasion.subscriptions[index] = sub; - } else if (index == invasion.subscriptions.length - 1) { - invasion.subscriptions.push(sub); - } - }); - } - } - - // STRINGIFY THE OBJECT - let new_subs = JSON.stringify(invasion); - - // UPDATE THE USER'S RECORD - WDR.wdrDB.query(`UPDATE users SET invasion = ? WHERE user_id = ? AND discord_id = ?`, [new_subs, message.author.id, discord.id], function(error, user, fields) { - if (error) { - return message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle(sub.type + ' Invasion Subscription Complete!') - .setDescription('Saved to the ' + WDR.config.BOT_NAME + ' Database.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(subscription_success).then(msg => { - return initiate_collector(WDR, 'create', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } - }); - }); -} - -// SUBSCRIPTION REMOVE FUNCTION -async function subscription_remove(WDR, message, nickname, prefix, available_stops, discord, stop_collection) { - - // FETCH USER FROM THE USERS TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, discord.id], async function(error, user, fields) { - - // END IF USER HAS NO SUBSCRIPTIONS - if (!user[0].invasion) { - - // CREATE THE RESPONSE EMBED - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('You do not have any Invasion Subscriptions!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // SEND THE EMBED - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else { - - // PARSE THE STRING TO AN OBJECT - let invasion = JSON.parse(user[0].invasion), - found = false, - embed_title = ''; - - // FETCH NAME OF POKEMON TO BE REMOVED AND CHECK RETURNED STRING - let remove_id = await sub_collector(WDR, 'Remove', nickname, message, invasion, 'Type the Number of the Subscription you want to remove.', undefined); - - switch (remove_id.toLowerCase()) { - case 'time': - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - case 'cancel': - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - case 'all': - - // CONFIRM THEY REALL MEANT TO REMOVE ALL - let confirm = await sub_collector(WDR, 'Confirm-Remove', nickname, message, remove_id, 'Type \'Yes\' or \'No\'. Subscription will be saved.', undefined); - if (confirm == 'Cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (confirm == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - - // MARK AS FOUND AND WIPE THE ARRAY - invasion.subscriptions = []; - break; - embed_title = 'All Subscriptions Removed!'; - - default: - // REMOVE THE SUBSCRIPTION - invasion.subscriptions.splice((remove_id - 1), 1); - embed_title = 'Subscription #' + remove_id + ' Removed!' - } - - // STRINGIFY THE OBJECT - let new_subs = JSON.stringify(invasion); - - // UPDATE THE USER'S RECORD - WDR.wdrDB.query(`UPDATE users SET invasion = ? WHERE user_id = ? AND discord_id = ?`, [new_subs, message.author.id, discord.id], function(error, user, fields) { - if (error) { - return message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle(embed_title) - .setDescription('Saved to the ' + WDR.config.BOT_NAME + ' Database.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - return message.channel.send(subscription_success).then(msg => { - return initiate_collector(WDR, 'remove', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } - }); - } - }); -} - -// SUB COLLECTOR FUNCTION -function sub_collector(WDR, type, nickname, message, object, requirements, sub, available_stops, discord, stop_collection) { - return new Promise(function(resolve, reject) { - - // DELCARE VARIABLES - let timeout = true, - instruction = ''; - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 30000 - }); - - switch (type) { - - // INVASION TYPE EMBED - case 'Type': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Invasion Grunt Type would you like to Subscribe to?') - .setFooter(requirements); - break; - - // INVASION TYPE EMBED - case 'Gender': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Gender would you like to Subscribe to?') - .setFooter(requirements); - break; - - // Stop NAME EMBED - case 'Stop': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Stop would you like to Subscribe to?') - .setFooter(requirements); - break; - - // CONFIRMATION EMBED - case 'Confirm-Add': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Does all of this look correct?\nStop: `' + sub.stop + '`\nGrunt Type: `' + sub.type + '`\nGender: `' + sub.gender + '`\nFilter By Areas: `' + sub.areas + '`') - .setFooter(requirements); - break; - - case 'Confirm-Remove': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Are you sure you want to Remove ALL of your subscriptions?') - .setFooter(requirements); - break; - - // REMOVAL EMBED - case 'Remove': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Which Invasion Subscription do you want to remove?') - .setFooter(requirements); - - // TURN EACH SUBSCRIPTION INTO A FIELD - object.subscriptions.forEach((invasion, index) => { - if (!invasion.gender) { - invasion.gender = 'All'; - } - instruction.addField('#' + (index + 1), 'Invasion: `' + invasion.stop + '`\nGrunt Type: `' + invasion.type + '`\nGender: `' + invasion.gender + '`\nFiltered by Areas: ' + invasion.areas, false); - }); - break; - - // AREA EMBED - case 'Area Filter': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Do you want to get notifications for ' + object + ' Invasions filtered by your subscribed Areas?') - .setDescription('If you choose **Yes**, your notifications for this Invasion Grunt Type will be filtered based on your areas. If you choose **No**, you will get notifications for this Invasion in ALL areas for the city.') - .setFooter(requirements); - break; - - // DEFAULT EMBED - default: - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What **' + type + '** would like you like to set for **' + object + '** Invasion Notifications?') - .setFooter(requirements); - } - - message.channel.send(instruction).catch(console.error).then(msg => { - - // DEFINED VARIABLES - let input = ''; - - // FILTER COLLECT EVENT - collector.on('collect', message => { - switch (true) { - - // CANCEL SUB - case message.content.toLowerCase() == 'stop': - case message.content.toLowerCase() == 'cancel': - collector.stop('cancel'); - break; - - // Stop NAME - case type.indexOf('Stop') >= 0: - if (message.content.toLowerCase() == 'all') { - collector.stop('All'); - } else { - WDR.scannerDB.query(`SELECT * FROM pokestop WHERE name = ?`, [message.content], async function(error, stops, fields) { - if (!stops) { - return collector.stop('fuzzy,' + message.content); - } else { - await stops.forEach((stop, index) => { - if (!InsideGeojson.polygon(discord.geofence, [stop.lon, stop.lat])) { - stops.splice(index, 1); - } - }); - if (stops[0]) { - return collector.stop(stops); - } else { - return collector.stop('fuzzy,' + message.content); - } - } - }); - } - break; - - // GET CONFIRMATION - case type.indexOf('Area Filter') >= 0: - switch (message.content.toLowerCase()) { - case 'yes': - collector.stop('Yes'); - break; - case 'all': - case 'no': - collector.stop('No'); - break; - default: - message.reply('`' + message.content + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf('Confirm-Add') >= 0: - case type.indexOf('Confirm-Remove') >= 0: - switch (message.content.toLowerCase()) { - case 'save': - case 'yes': - collector.stop('Yes'); - break; - case 'no': - case 'cancel': - collector.stop('Cancel'); - break; - default: - message.reply('`' + message.content + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // INVASION TYPE - case type.indexOf('Type') >= 0: - switch (message.content.toLowerCase()) { - case 'all': - collector.stop('All'); - break; - case 'tier ii': - collector.stop('Tier II'); - break; - default: - let found = false; - Object.keys(WDR.types).forEach(function(grunt) { - if (grunt.toLowerCase() === message.content.toLowerCase()) { - found = true; - return collector.stop(grunt); - } - }); - if (!found) { - message.reply('`' + message.content + '` doesn\'t appear to be a valid Invasion Grunt Type. Please check the spelling and try again.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - break; - - // GENDER CONFIGURATION - case type.indexOf('Gender') >= 0: - if (message.content.toLowerCase() == 'male') { - collector.stop('Male'); - } else if (message.content.toLowerCase() == 'female') { - collector.stop('Female'); - } else if (message.content.toLowerCase() == 'all') { - collector.stop('All'); - } else { - message.reply('`' + message.content + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // SUBSCRIPTION NUMBER - case type.indexOf('Remove') >= 0: - if (message.content > 0 && message.content <= object.subscriptions.length) { - collector.stop(message.content); - } else { - message.reply('`' + message.content + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - } - }); - - // COLLECTOR ENDED - collector.on('end', (collected, reason) => { - msg.delete(); - return resolve(reason); - }); - }); - }); -} - -function subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Subscription Cancelled.') - .setDescription('Nothing has been Saved.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, 'cancel', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); -} - -function subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Subscription Timed Out.') - .setDescription('Nothing has been Saved.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, 'time', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); -} - -function initiate_collector(WDR, source, message, msg, nickname, prefix, available_stops, discord, stop_collection) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - - // FILTER COLLECT EVENT - collector.on('collect', message => { - switch (message.content.toLowerCase()) { - case 'advanced': - case 'add advanced': - case 'add': - collector.stop('add'); - break; - case 'remove': - collector.stop('remove'); - break; - case 'view': - collector.stop('view'); - break; - case 'pause': - collector.stop('pause'); - break; - case 'resume': - collector.stop('resume'); - break; - default: - collector.stop('end'); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - resolve('cancel'); - break; - case 'add': - subscription_create(WDR, message, nickname, prefix, false, available_stops, discord, stop_collection); - break; - case 'remove': - subscription_remove(WDR, message, nickname, prefix, available_stops, discord, stop_collection); - break; - case 'view': - subscription_view(WDR, message, nickname, prefix, available_stops, discord, stop_collection); - break; - case 'resume': - case 'pause': - subscription_status(WDR, message, nickname, reason, prefix, available_stops, discord, stop_collection); - break; - default: - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - return; - }); -} - -async function match_collector(WDR, type, nickname, message, object, requirements, sub, available_stops, discord, stop_collection) { - return new Promise(async resolve => { - let options = ''; - switch (type) { - - // REMOVAL EMBED - case 'Matches': - let match_desc = ''; - object.forEach((match, index) => { - match_desc += (index + 1) + '. ' + match + '\n'; - }); - if (match_desc.length > 2048) { - match_desc = match_desc.slice(0, 1973) + '**\nThere are too many to display. Try to narrow your search terms.**'; - } - options = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Possible matches for \'' + sub.stop.split(',')[1] + '\' were found.') - .setDescription(match_desc) - .setFooter('Type the number of the stop you wish to select or type \'cancel\'.'); - break; - - // REMOVAL EMBED - case 'Multiple': - let description = ''; - await WDR.asyncForEach(object, async (match, index) => { - let match_area = await WDR.Get_Area(WDR, match.lat, match.lon, discord); - let match_name = match.name + ' [' + match_area.embed + ']'; - description += (index + 1) + '. ' + match_name + '\n'; - }) - if (description.length > 2048) { - description = description.slice(0, 1973) + '**\nThere are too many to display. Try to narrow your search terms.**'; - } - options = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Multiple Matches were found.').setDescription(description) - .setFooter('Type the number of the stop you wish to select or type \'cancel\'.'); - break; - } - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 30000 - }); - - message.channel.send(options).catch(console.error).then(msg => { - - // FILTER COLLECT EVENT - collector.on('collect', message => { - if (parseInt(message.content) >= 1 && parseInt(message.content) <= object.length) { - collector.stop(parseInt(message.content) - 1); - } else if (message.content.toLowerCase() == 'cancel') { - collector.stop('cancel'); - } else { - message.reply('`' + message.content + '` is not a valid selection.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - }); - - collector.on('end', (collected, reason) => { - msg.delete(); - return resolve(reason); - }); - }); - }); -} \ No newline at end of file diff --git a/src/commands/subscription/lure.js b/src/commands/subscription/lure.js deleted file mode 100644 index e94df98..0000000 --- a/src/commands/subscription/lure.js +++ /dev/null @@ -1,728 +0,0 @@ -const Fuzzy = require('fuzzy'); - -const InsideGeojson = require('point-in-geopolygon'); - -module.exports = async (WDR, message, prefix, discord) => { - - // LOAD ALL STOPS WITHIN DISCORD GEOFENCE TO AN ARRAY FOR FUZZY - let available_stops = [], - stop_collection = new WDR.discordjs.Collection(); - await WDR.stop_array.forEach(async (stop, index) => { - if (InsideGeojson.polygon(discord.geofence, [stop.lon, stop.lat])) { - let stop_area = await WDR.Get_Area(WDR, stop.lat, stop.lon, discord); - let stop_name = stop.name + ' [' + stop_area.embed + ']'; - available_stops.push(stop_name); - stop_collection.set(stop_name, stop); - } - }); - - // GET USER NICKNAME - let nickname = ''; - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let request_action = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What would you like to do with your Lure Subscriptions?') - .setDescription('`view` » View your Subscritions.\n' + - '`add` » Create a Simple Subscription.\n' + - '`remove` » Remove a Lure Subscription.\n' + - '`pause` or `resume` » Pause/Resume Lure Subscriptions Only.') - .setFooter('Type the action, no command prefix required.'); - - message.channel.send(request_action).catch(console.error).then(msg => { - return initiate_collector(WDR, 'start', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); -} - -// PAUSE OR RESUME POKEMON SUBSCRIPTIOONS -function subscription_status(WDR, message, nickname, reason, prefix, available_stops, discord, stop_collection) { - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, discord.id], function(error, user, fields) { - if (user[0].lure_status == 'ACTIVE' && reason == 'resume') { - let already_active = new WDR.DiscordJS.MessageEmbed().setColor('ff0000') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Your lure subscriptions are already **Active**!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // SEND THE EMBED - message.channel.send(already_paused).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else if (user[0].lure_status == 'PAUSED' && reason == 'pause') { - let already_paused = new WDR.DiscordJS.MessageEmbed().setColor('ff0000') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Your lure subscriptions are already **Paused**!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // SEND THE EMBED - message.channel.send(already_paused).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else { - if (reason == 'pause') { - change = 'PAUSED'; - } - if (reason == 'resume') { - change = 'ACTIVE'; - } - WDR.wdrDB.query('UPDATE users SET lure_status = ? WHERE user_id = ? AND discord_id = ?', [change, message.author.id, discord.id], function(error, user, fields) { - if (error) { - return message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Your lure subscriptions have been set to `' + change + '`!') - .setFooter('Saved to the ' + WDR.config.BOT_NAME + ' Database.'); - return message.channel.send(subscription_success).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - }); - } - }); -} - -// SUBSCRIPTION REMOVE FUNCTION -async function subscription_view(WDR, message, nickname, prefix, available_stops, discord, stop_collection) { - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, discord.id], function(error, user, fields) { - - // CHECK IF THE USER ALREADY HAS SUBSCRIPTIONS AND ADD - if (!user[0].lure) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('You do not have any Lure Subscriptions!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // SEND THE EMBED - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else { - - let lure = JSON.parse(user[0].lure), - lure_levels = ''; - if (!lure.subscriptions[0]) { - - // CREATE THE EMBED AND SEND - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('You do not have any Subscriptions!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else { - - // CREATE THE EMBED - let lure_subs = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Lure Subscriptions') - .setDescription('Overall Status: `' + user[0].status + '`\nlures Status: `' + user[0].lure_status + '`') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // TURN EACH SUBSCRIPTION INTO A FIELD - lure.subscriptions.forEach((sub, index) => { - if (sub.stop != 'All' && sub.type != 'All') { - title = '#' + (index + 1) + ' ' + sub.type; - body = 'Stop: ' + sub.stop + '\nFiltered by Areas: `' + sub.areas + '`'; - } else { - title = '#' + (index + 1); - body = 'Stop: `' + sub.stop + '`\nlure : `' + sub.type + '`\nFiltered by Areas: `' + sub.areas + '`'; - } - - lure_subs.addField(title, body, false); - }); - - // SEND THE EMBED - message.channel.send(lure_subs).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } - } - }); -} - -// SUBSCRIPTION CREATE FUNCTION -async function subscription_create(WDR, message, nickname, prefix, advanced, available_stops, discord, stop_collection) { - - // DEFINED THE SUBSCRIPTION OBJECT - let sub = {}, - got_name = false; - - // RETRIEVE STOP NAME FROM USER - do { - sub.stop = await sub_collector(WDR, 'Stop', nickname, message, undefined, 'Respond with \'All\' or a Stop name. Names are not case-sensitive.', sub, available_stops, discord, stop_collection); - if (sub.stop == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.stop == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else { - if (sub.stop == 'All') { - sub.stop = 'All'; - got_name = true; - } else if (!Array.isArray(sub.stop) && sub.stop.split(',')[0] == 'fuzzy') { - console.log(sub.stop); - console.log(sub.stop.split(',')[1]); - let results = Fuzzy.filter(sub.stop.split(',')[1], available_stops); - let matches = results.map(function(el) { - return el.string; - }); - if (!matches[0]) { - message.reply('`' + sub.stop + '`, does not closely match any stop in the database.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else { - let user_choice = await match_collector(WDR, 'Matches', nickname, message, matches, 'Type the number of the Correct stop.', sub, available_stops, discord, stop_collection); - if (sub.stop == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.stop == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else { - let collection_match = stop_collection.get(matches[user_choice]); - if (collection_match) { - sub.id = collection_match.id; - sub.stop = collection_match.name; - got_name = true; - } - } - } - } else if (sub.stop.length > 1) { - let user_choice = await match_collector(WDR, 'Multiple', nickname, message, sub.stop, 'Type the number of the Correct Stop.', sub, available_stops, discord, stop_collection); - if (sub.stop == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.stop == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else { - sub.id = sub.stop[user_choice].id; - sub.stop = sub.stop[user_choice].name; - got_name = true; - } - } else { - sub.id = sub.stop[0].id; - sub.stop = sub.stop[0].name; - got_name = true; - } - } - } while (got_name == false); - - // RETRIEVE LURE TYPE FROM USER - sub.type = await sub_collector(WDR, 'Type', nickname, message, undefined, 'Respond with \'All\' or the Lure Type. Names are not case-sensitive.', sub, available_stops, discord, stop_collection); - if (sub.type == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.type == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - - // RETRIEVE AREA CONFIRMATION FROM USER IF NOT FOR A SPECIFIC STOP - if (sub.stop == 'All') { - sub.areas = await sub_collector(WDR, 'Area Filter', nickname, message, sub.type, 'Please respond with \'Yes\' or \'No\'', sub, available_stops, discord, stop_collection); - if (sub.areas == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (sub.areas == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - } else { - sub.areas = 'Stop Specified'; - } - - // RETRIEVE CONFIRMATION FROM USER - let confirm = await sub_collector(WDR, 'Confirm-Add', nickname, message, sub.type, 'Type \'Yes\' or \'No\'. Subscription will be saved.', sub, available_stops, discord, stop_collection); - if (confirm == 'Cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (confirm == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - - // PULL THE USER'S SUBSCRITIONS FROM THE USER TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, discord.id], async function(error, user, fields) { - let lure = ''; - // CHECK IF THE USER ALREADY HAS SUBSCRIPTIONS AND ADD - if (!user[0].lure) { - lure = {}; - lure.subscriptions = []; - lure.subscriptions.push(sub); - } else { - lure = JSON.parse(user[0].lure); - if (!lure.subscriptions[0]) { - lure.subscriptions.push(sub); - } else { - // CONVERT TO OBJECT AND CHECK EACH SUBSCRIPTION - lure = JSON.parse(user[0].lure); - lure.subscriptions.forEach((subscription, index) => { - - // ADD OR OVERWRITE IF EXISTING - if (subscription.encounter == sub.type && subscription.stop == sub.stop) { - lure.subscriptions[index] = sub; - } else if (index == lure.subscriptions.length - 1) { - lure.subscriptions.push(sub); - } - }); - } - } - - // STRINGIFY THE OBJECT - let new_subs = JSON.stringify(lure); - - // UPDATE THE USER'S RECORD - WDR.wdrDB.query(`UPDATE users SET lure = ? WHERE user_id = ? AND discord_id = ?`, [new_subs, message.author.id, discord.id], function(error, user, fields) { - if (error) { - return message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle(sub.type + ' Lure Subscription Complete!') - .setDescription('Saved to the ' + WDR.config.BOT_NAME + ' Database.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(subscription_success).then(msg => { - return initiate_collector(WDR, 'create', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } - }); - }); -} - -// SUBSCRIPTION REMOVE FUNCTION -async function subscription_remove(WDR, message, nickname, prefix, available_stops, discord, stop_collection) { - - // FETCH USER FROM THE USERS TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [message.author.id, discord.id], async function(error, user, fields) { - - // END IF USER HAS NO SUBSCRIPTIONS - if (!user[0].lure) { - - // CREATE THE RESPONSE EMBED - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('You do not have any Lure Subscriptions!') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - - // SEND THE EMBED - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, 'view', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } else { - - // PARSE THE STRING TO AN OBJECT - let lure = JSON.parse(user[0].lure), - found = false, - embed_title = ''; - - // FETCH NAME OF POKEMON TO BE REMOVED AND CHECK RETURNED STRING - let remove_id = await sub_collector(WDR, 'Remove', nickname, message, lure, 'Type the Number of the Subscription you want to remove.', undefined); - - switch (remove_id.toLowerCase()) { - case 'time': - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - case 'cancel': - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - case 'all': - - // CONFIRM THEY REALL MEANT TO REMOVE ALL - let confirm = await sub_collector(WDR, 'Confirm-Remove', nickname, message, remove_id, 'Type \'Yes\' or \'No\'. Subscription will be saved.', undefined); - if (confirm == 'Cancel') { - return subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } else if (confirm == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection); - } - - // MARK AS FOUND AND WIPE THE ARRAY - lure.subscriptions = []; - break; - embed_title = 'All Subscriptions Removed!'; - - default: - // REMOVE THE SUBSCRIPTION - lure.subscriptions.splice((remove_id - 1), 1); - embed_title = 'Subscription #' + remove_id + ' Removed!' - } - - // STRINGIFY THE OBJECT - let new_subs = JSON.stringify(lure); - - // UPDATE THE USER'S RECORD - WDR.wdrDB.query(`UPDATE users SET lure = ? WHERE user_id = ? AND discord_id = ?`, [new_subs, message.author.id, discord.id], function(error, user, fields) { - if (error) { - return message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle(embed_title) - .setDescription('Saved to the ' + WDR.config.BOT_NAME + ' Database.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - return message.channel.send(subscription_success).then(msg => { - return initiate_collector(WDR, 'remove', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); - } - }); - } - }); -} - -// SUB COLLECTOR FUNCTION -function sub_collector(WDR, type, nickname, message, object, requirements, sub, available_stops, discord, stop_collection) { - return new Promise(function(resolve, reject) { - - // DELCARE VARIABLES - let timeout = true, - instruction = ''; - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 30000 - }); - - switch (type) { - - // POKEMON NAME EMBED - case 'Type': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Lure Type would you like to Subscribe to?') - .setFooter(requirements); - break; - - // Stop NAME EMBED - case 'Stop': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Stop would you like to Subscribe to?') - .setFooter(requirements); - break; - - // CONFIRMATION EMBED - case 'Confirm-Add': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Does all of this look correct?\nStop: `' + sub.stop + '`\nLure Type: `' + sub.type + '`\nFilter By Areas: `' + sub.areas + '`') - .setFooter(requirements); - break; - - case 'Confirm-Remove': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Are you sure you want to Remove ALL of your subscriptions?') - .setFooter(requirements); - break; - - // REMOVAL EMBED - case 'Remove': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Which lure Subscription do you want to remove?') - .setFooter(requirements); - - // TURN EACH SUBSCRIPTION INTO A FIELD - object.subscriptions.forEach((lure, index) => { - instruction.addField('#' + (index + 1), 'lure: `' + lure.stop + '`\nLure Type: `' + lure.type + '`\nFiltered by Areas: ' + lure.areas, false); - }); - break; - - // AREA EMBED - case 'Area Filter': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Do you want to get notifications for ' + object + ' lures filtered by your subscribed Areas?') - .setDescription('If you choose **Yes**, your notifications for this Lure Type will be filtered based on your areas. If you choose **No**, you will get notifications for this lure in ALL areas for the city.') - .setFooter(requirements); - break; - - // DEFAULT EMBED - default: - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What **' + type + '** would like you like to set for **' + object + '** lure Notifications?') - .setFooter(requirements); - } - - message.channel.send(instruction).catch(console.error).then(msg => { - - // DEFINED VARIABLES - let input = ''; - - // FILTER COLLECT EVENT - collector.on('collect', message => { - switch (true) { - - // CANCEL SUB - case message.content.toLowerCase() == 'stop': - case message.content.toLowerCase() == 'cancel': - collector.stop('cancel'); - break; - - // Stop NAME - case type.indexOf('Stop') >= 0: - if (message.content.toLowerCase() == 'all') { - collector.stop('All'); - } else { - WDR.scannerDB.query(`SELECT * FROM pokestop WHERE name = ?`, [message.content], async function(error, stops, fields) { - if (!stops) { - return collector.stop('fuzzy,' + message.content); - } else { - await stops.forEach((stop, index) => { - if (!InsideGeojson.polygon(discord.geofence, [stop.lon, stop.lat])) { - stops.splice(index, 1); - } - }); - if (stops[0]) { - return collector.stop(stops); - } else { - return collector.stop('fuzzy,' + message.content); - } - } - }); - } - break; - - case type.indexOf('Area Filter') >= 0: - switch (message.content.toLowerCase()) { - case 'yes': - collector.stop('Yes'); - break; - case 'all': - case 'no': - collector.stop('No'); - break; - default: - message.reply('`' + message.content + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf('Confirm-Add') >= 0: - case type.indexOf('Confirm-Remove') >= 0: - switch (message.content.toLowerCase()) { - case 'save': - case 'yes': - collector.stop('Yes'); - break; - case 'no': - case 'cancel': - collector.stop('Cancel'); - break; - default: - message.reply('`' + message.content + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // POKEMON NAME - case type.indexOf('Type') >= 0: - switch (message.content.toLowerCase()) { - case 'all': - collector.stop('All'); - break; - case 'normal': - collector.stop('Normal'); - break; - case 'glacial': - collector.stop('Glacial'); - break; - case 'mossy': - collector.stop('Mossy'); - break; - case 'magnetic': - collector.stop('Magnetic'); - break; - default: - message.reply('`' + message.content + '` doesn\'t appear to be a valid Lure Type. Please check the spelling and try again.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // SUBSCRIPTION NUMBER - case type.indexOf('Remove') >= 0: - if (message.content > 0 && message.content <= object.subscriptions.length) { - collector.stop(message.content); - } else { - message.reply('`' + message.content + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // MIN/MAX LEVEL CONFIGURATION - case type.indexOf('Level') >= 0: - if (parseInt(message.content) >= 1 && parseInt(message.content) <= 5) { - collector.stop(message.content); - } else if (message.content.toLowerCase() == 'all') { - collector.stop('All'); - } else { - message.reply('`' + message.content + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - } - }); - - // COLLECTOR ENDED - collector.on('end', (collected, reason) => { - msg.delete(); - return resolve(reason); - }); - }); - }); -} - -function subscription_cancel(WDR, nickname, message, prefix, available_stops, discord, stop_collection) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Subscription Cancelled.') - .setDescription('Nothing has been Saved.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, 'cancel', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); -} - -function subscription_timedout(WDR, nickname, message, prefix, available_stops, discord, stop_collection) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Subscription Timed Out.') - .setDescription('Nothing has been Saved.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, 'time', message, msg, nickname, prefix, available_stops, discord, stop_collection); - }); -} - -function initiate_collector(WDR, source, message, msg, nickname, prefix, available_stops, discord, stop_collection) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - - // FILTER COLLECT EVENT - collector.on('collect', message => { - switch (message.content.toLowerCase()) { - case 'advanced': - case 'add advanced': - case 'add': - collector.stop('add'); - break; - case 'remove': - collector.stop('remove'); - break; - case 'view': - collector.stop('view'); - break; - case 'pause': - collector.stop('pause'); - break; - case 'resume': - collector.stop('resume'); - break; - default: - collector.stop('end'); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - resolve('cancel'); - break; - case 'add': - subscription_create(WDR, message, nickname, prefix, false, available_stops, discord, stop_collection); - break; - case 'remove': - subscription_remove(WDR, message, nickname, prefix, available_stops, discord, stop_collection); - break; - case 'view': - subscription_view(WDR, message, nickname, prefix, available_stops, discord, stop_collection); - break; - case 'resume': - case 'pause': - subscription_status(WDR, message, nickname, reason, prefix, available_stops, discord, stop_collection); - break; - default: - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - return; - }); -} - -async function match_collector(WDR, type, nickname, message, object, requirements, sub, available_stops, discord, stop_collection) { - return new Promise(async resolve => { - let options = ''; - switch (type) { - - // REMOVAL EMBED - case 'Matches': - let match_desc = ''; - object.forEach((match, index) => { - match_desc += (index + 1) + '. ' + match + '\n'; - }); - if (match_desc.length > 2048) { - match_desc = match_desc.slice(0, 1973) + '**\nThere are too many to display. Try to narrow your search terms.**'; - } - options = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Possible matches for \'' + sub.stop.split(',')[1] + '\' were found.') - .setDescription(match_desc) - .setFooter('Type the number of the stop you wish to select or type \'cancel\'.'); - break; - - // REMOVAL EMBED - case 'Multiple': - let description = ''; - await WDR.asyncForEach(object, async (match, index) => { - let match_area = await WDR.Get_Area(WDR, match.lat, match.lon, discord); - let match_name = match.name + ' [' + match_area.embed + ']'; - description += (index + 1) + '. ' + match_name + '\n'; - }) - options = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Multiple Matches were found.').setDescription(description) - .setFooter('Type the number of the stop you wish to select or type \'cancel\'.'); - break; - } - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 30000 - }); - - message.channel.send(options).catch(console.error).then(msg => { - - // FILTER COLLECT EVENT - collector.on('collect', message => { - if (parseInt(message.content) >= 1 && parseInt(message.content) <= object.length) { - collector.stop(parseInt(message.content) - 1); - } else if (message.content.toLowerCase() == 'cancel') { - collector.stop('cancel'); - } else { - message.reply('`' + message.content + '` is not a valid selection.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - }); - - collector.on('end', (collected, reason) => { - msg.delete(); - return resolve(reason); - }); - }); - }); -} \ No newline at end of file diff --git a/src/commands/subscription/nest.js b/src/commands/subscription/nest.js deleted file mode 100644 index c867b6a..0000000 --- a/src/commands/subscription/nest.js +++ /dev/null @@ -1,217 +0,0 @@ -const Fuzzy = require('fuzzy'); -const GeoTz = require('geo-tz'); - -const Send_Nest = require(__dirname + '/../../embeds/nests.js'); -const InsideGeojson = require('point-in-geopolygon'); - -module.exports = async (WDR, message, prefix, discord) => { - // DECLARE VARIABLES - let nickname = '', - park = '', - embed = ''; - - // LOAD ALL NESTS WITHIN DISCORD GEOFENCE TO AN ARRAY FOR FUZZY - let available_nests = [], - nest_collection = new WDR.discordjs.Collection(); - await WDR.park_array.forEach((nest, index) => { - if (InsideGeojson.polygon(discord.geofence, [nest.lon, nest.lat])) { - available_nests.push(nest.name); - nest_collection.set(nest.name, nest); - } - }); - - // GET USER NICKNAME - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - let avatar = message.author.displayAvatarURL; - - let requestAction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, avatar) - .setTitle('What Pokémon or Park do you want to find a nest for?') - .setFooter('Type the name of desired Poké or Park, no command prefix required.'); - - message.channel.send(requestAction).catch(console.error).then(msg => { - initiate_collector(WDR, 'start', message, msg, avatar, nickname, prefix, discord, available_nests, nest_collection); - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - return; - }); -} - -function pokemon_view(WDR, message, nickname, pokemon_id, search_area, prefix, discord) { - embed = 'nests.js'; - new Promise(async function(resolve, reject) { - WDR.pmsf.query(`SELECT * FROM nests WHERE pokemon_id = ?`, [pokemon_id], function(error, nests, fields) { - if (!nests) { - return message.reply('No known nest, please retry.') - .then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - let nest_found = false; - WDR.asyncForEach(nests, async (nest) => { - let timezone = GeoTz(discord.geofence[0][1][1], discord.geofence[0][1][0])[0]; - discord_match = true; - area = await WDR.Get_Area(WDR, nest.lat, nest.lon, discord).catch(console.error); - if (area) { - if (search_area == area.embed || search_area == 'ALL') { - Send_Nest(WDR, message, nest, discord, area, timezone, embed); - message.channel.send('Nest sent, check your inbox if not in the channel.') - .then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - nest_found = true; - } - } - }).then(not => { - if (nest_found === false) { - message.reply('No known nest, please retry.') - .then(m => m.delete({ - timeout: 5000 - })).catch(console.error) - } - }) - }) - }); -} - -function park_view(WDR, message, nickname, name, search_area, prefix, discord, available_nests, nest_collection) { - embed = 'nests.js' - new Promise(async function(resolve, reject) { - WDR.pmsf.query(`SELECT * FROM nests WHERE name LIKE ?`, [name], function(error, nests, fields) { - if (!nests) { - return message.reply('No known nest, please retry.') - .then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - let nest_found = false; - WDR.asyncForEach(nests, async (nest) => { - let timezone = GeoTz(discord.geofence[0][1][1], discord.geofence[0][1][0])[0]; - discord_match = true; - area = await WDR.Get_Area(WDR, nest.lat, nest.lon, discord).catch(console.error); - if (area) { - if (search_area == area.embed || search_area == 'ALL') { - Send_Nest(WDR, message, nest, discord, area, timezone, embed); - message.channel.send('Nest sent, check your inbox if not in the channel.') - .then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - nest_found = true; - } - } - }).then(not => { - if (nest_found === false) { - message.reply('No known nest, please retry.') - .then(m => m.delete({ - timeout: 5000 - })).catch(console.error) - } - }) - return; - }) - }); -} - -async function initiate_collector(WDR, source, message, msg, avatar, nickname, prefix, discord, available_nests, nest_collection) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - let msg_count = 0; - - // FILTER COLLECT EVENT - await collector.on('collect', message => { - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - pokemon = message.content; - park = message.content; - let non_nesting = [2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 59, 61, 62, 64, 65, 67, 68, 69, 70, 71, 73, 74, 75, 76, 78, 79, 80, 82, 83, 85, 87, 88, 89, 91, 93, 94, 96, 97, 98, 99, 101, 103, 105, 106, 107, 108, 109, 110, 112, 113, 114, 115, 117, 118, 119, 120, 121, 122, 128, 130, 131, 132, 134, 135, 136, 137, 139, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 153, 154, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 186, 187, 188, 189, 191, 192, 194, 195, 196, 197, 198, 199, 201, 204, 205, 207, 208, 210, 212, 214, 217, 218, 219, 221, 222, 223, 224, 225, 228, 229, 230, 232, 233, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 253, 254, 256, 257, 259, 260, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 274, 275, 276, 277, 279, 280, 281, 282, 284, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 297, 298, 301, 303, 304, 305, 306, 308, 310, 313, 314, 315, 316, 317, 319, 321, 323, 324, 326, 327, 328, 329, 330, 331, 332, 334, 335, 336, 337, 338, 339, 340, 342, 344, 346, 348, 349, 350, 351, 352, 354, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 388, 389, 391, 392, 394, 395, 396, 397, 398, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493]; - - if (pokemon.toLowerCase() === 'cancel' || pokemon.toLowerCase() === 'time') { - collector.stop('cancel'); - } - - //Pokemon ID Search - if (pokemon != 'NaN' && pokemon < 809) { - if (non_nesting.indexOf(parseInt(pokemon)) >= 0) { - collector.stop('non_nesting'); - } else { - collector.stop(pokemon); - } - } - - let searched = WDR.Master.Pokemon_ID_Search(WDR, pokemon); - if (searched && searched.pokemon_id && non_nesting.indexOf(parseInt(searched.pokemon_id)) >= 0) { - collector.stop('non_nesting'); - } else if (searched && searched.pokemon_id) { - collector.stop(searched.pokemon_id); - } - - //Park Search - (async () => { - let results = Fuzzy.filter(pokemon, available_nests); - let matches = results.map(function(el) { - return el.string; - }); - if (matches[0]) { - park = matches[0] - collector.stop('park'); - } else { - collector.stop('retry'); - } - })(); - - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', async (collected, reason) => { - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - break; - case 'time': - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - case 'retry': - message.reply('Please check your spelling, and retry.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - case 'non_nesting': - message.reply('Pokémon is not known to nest.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - case 'park': - return park_view(WDR, message, nickname, park, 'ALL', prefix, discord); - break; - default: - return pokemon_view(WDR, message, nickname, reason, 'ALL', prefix, discord); - } - return; - }); -} - -const capitalize = (s) => { - if (typeof s !== 'string') { - return ''; - } - s = s.toLowerCase(); - return s.charAt(0).toUpperCase() + s.slice(1) -} \ No newline at end of file diff --git a/src/commands/subscription/pause.js b/src/commands/subscription/pause.js deleted file mode 100644 index ed1d40b..0000000 --- a/src/commands/subscription/pause.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = async (WDR, Message) => { - WDR.wdrDB.query( - `UPDATE - wdr_users - SET - status = 0, - pokemon_status = 0, - pvp_status = 0, - quest_status = 0, - raid_status = 0, - lure_status = 0, - invasion_status = 0 - WHERE - user_id = ${Member.id}`, - function(error, user, fields) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pause.js] Error Pausing Subscriptions.", preset); - console.error(error); - return Message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(15000)).catch(console.error); - } else { - WDR.wdrDB.query( - `UPDATE - wdr_subscriptions - SET - status = 0 - WHERE - user_id = ${Member.id}`, - function(error, user, fields) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pause.js] Error Pausing Subscriptions.", preset); - console.error(error); - return Message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(15000)).catch(console.error); - } else { - return Message.reply('All of your subscriptions are now `PAUSED`.').then(m => m.delete(15000)).catch(console.error); - } - } - ); - } - } - ); -} \ No newline at end of file diff --git a/src/commands/subscription/pokemon.js b/src/commands/subscription/pokemon.js deleted file mode 100644 index d89aade..0000000 --- a/src/commands/subscription/pokemon.js +++ /dev/null @@ -1,1287 +0,0 @@ -const maximum_level = 35; - -module.exports = async (WDR, Message) => { - - let Member = ""; - if (Message.member) { - Member = Message.member; - } else { - Member = Message.author; - } - - switch (true) { - case Member.nickname: - break; - case Message.author.username: - break; - } - - Member.db = Message.member.db; - - if (!Member.nickname) { - Member.nickname = Message.author.username; - } else { - Member.nickname = Message.author.username; - } - - let request_action = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("What would you like to do with your Pokémon Subscriptions?") - .setDescription("`presets` » View quick preset subscriptions." + "\n" + - "`view` » View your Subscriptions." + "\n" + - "`add` » Create a Simple Subscription." + "\n" + - "`add adv` » Create an Advanced Subscription." + "\n" + - "`remove` » Remove a Pokémon Subscription." + "\n" + - "`edit` » Edit a Subscription." + "\n" + - "`pause` or `resume` » Pause/Resume Pokémon Subscriptions Only.") - .setFooter("Type the action, no command prefix required."); - - Message.channel.send(request_action).catch(console.error).then(BotMsg => { - return option_collector(WDR, "start", Message, BotMsg, Member); - }); -} - -//############################################################################## - -async function subscription_preset(WDR, Message, Member) { - let presets = ""; - let preset_names = WDR.Presets.Pokemon.map(p => p.name); - for (let p = 0, plen = preset_names.length; p < plen; p++) { - let ps = WDR.Presets.Pokemon[p]; - presets += (p + 1) + " - " + preset_names[p] + "\n"; - } - presets = presets.slice(0, -1); - - let preset = await detail_collector(WDR, "Preset", Member, Message, presets, "Respond with the # of a preset.", null); - let preset_name = preset_names[(preset - 1)]; - preset = WDR.Presets.Pokemon.get(preset_name); - - // RETRIEVE AREA CONFIMATION FROM USER - preset.geofence = await detail_collector(WDR, "Geofence", Member, Message, undefined, "Please respond with \"Yes\", \"No\" or \"Areas Names\"", preset); - - // RETRIEVE CONFIRMATION FROM USER - preset.confirm = await detail_collector(WDR, "Confirm-Add", Member, Message, undefined, "Type \"Yes\" or \"No\". Subscription will be saved.", preset); - - WDR.wdrDB.query( - `INSERT INTO - wdr_subscriptions ( - user_id, - user_name, - guild_id, - guild_name, - bot, - status, - geofence, - sub_type, - pokemon_id, - form, - min_lvl, - max_lvl, - min_iv, - max_iv, - size, - gender, - generation - ) - VALUES - ( - ${Message.author.id}, - '${Member.nickname}', - ${Message.guild.id}, - '${Member.db.guild_name}', - ${Member.db.bot}, - ${Member.db.pokemon_status}, - '${preset.geofence}', - 'pokemon', - ${preset.id}, - ${preset.form}, - ${preset.min_lvl}, - ${preset.max_lvl}, - ${preset.min_iv}, - ${preset.max_iv}, - '${preset.size}', - ${preset.gender}, - ${preset.gen} - )`, - async function(error, result) { - if (error) { - if (error.toString().indexOf("Duplicate entry") >= 0) { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Existing Subscription Found!") - .setDescription("Nothing has been saved.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } else { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Inserting Preset Subscription.", preset); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(preset.name + " Pokemon Subscription Complete!") - .setDescription("Saved to the subscription Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } - } - ); -} - -//############################################################################## - -function subscription_status(WDR, Message, Member, reason) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_users - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id}`, - async function(error, user) { - if (Member.db.pokemon_status == 1 && reason == "resume") { - let already_active = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Pokemon subscriptions are already **Active**!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(already_active).catch(console.error).then(msg => { - return option_collector(WDR, "view", Message, nMessage, Member); - }); - } else if (Member.db.pokemon_status == 0 && reason == "pause") { - let already_paused = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Pokemon subscriptions are already **Paused**!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(already_paused).catch(console.error).then(msg => { - return option_collector(WDR, "view", Message, nMessage, Member); - }); - } else { - if (reason == "pause") { - change = 0; - } else if (reason == "resume") { - change = 1; - } - WDR.wdrDB.query( - `UPDATE - wdr_users - SET - pokemon_status = ${change} - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id}`, - async function(error, user, fields) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - WDR.wdrDB.query( - `UPDATE - wdr_subscriptions - SET - status = ${change} - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon'`, - async function(error, user, fields) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - switch (change) { - case 0: - change = "DISABLED" - break; - case 1: - change = "ENABLED" - break; - } - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Pokémon Subscriptions have been set to `" + change + "`!") - .setFooter("Saved to the subscription Database."); - return Message.channel.send(subscription_success).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - ); - } - } - ); - } - } - ); -} - -//############################################################################## - -function subscription_view(WDR, Message, Member) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_subscriptions - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon'`, - async function(error, subscriptions) { - if (!subscriptions || subscriptions.length < 1) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You do not have any Pokémon Subscriptions!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } else { - - let sub_list = ""; - for (let s = 0, slen = subscriptions.length; s < slen; s++) { - let choice = s + 1; - let sub_data = subscriptions[s]; - sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; - sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; - sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; - let data = ""; - if (sub_data.form > 0) { - data += " Form: `" + WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; - } - if (sub_data.min_iv != 0) { - data += " Min IV: `" + sub_data.min_iv + "`\n"; - } - if (sub_data.max_iv != 100) { - data += " Max IV: `" + sub_data.max_iv + "`\n"; - } - if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { - data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; - } - if (sub_data.max_lvl != maximum_level) { - data += " Max Lvl: `" + sub_data.max_lvl + "`\n"; - } - if (sub_data.gender != 0) { - let gender = await WDR.Get_Gender(sub_data.gender); - data += " Gender: `" + gender + "`\n"; - } - if (sub_data.size != 0) { - data += " Size: `" + sub_data.size + "`\n"; - } - if (sub_data.generation != 0) { - data += " Gen: `" + sub_data.generation + "`\n"; - } - if (sub_data.geofence == Message.Discord.name) { - data += " Geofence: `" + sub_data.geofence + "`\n"; - } - if (!data) { - data = " `All" + "`\n";; - } - sub_list += data + "\n"; - } - sub_list = sub_list.slice(0, -1); - - let o_status = Member.db.status ? "Enabled" : "Disabled"; - let p_status = Member.db.pokemon_status ? "Enabled" : "Disabled"; - let pokemonSubs = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Pokémon Subscriptions") - .setDescription("Overall Status: `" + o_status + "`\n" + - "Pokemon Status: `" + p_status + "`\n\n" + sub_list) - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(pokemonSubs).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } - } - ); -} - -//############################################################################## - -async function subscription_create(WDR, Message, Member, advanced) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_subscriptions - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon'`, - async function(error, subs) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Error Fetching Subscriptions to Create Subscription.", sub); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else if (subs.length >= 25) { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Maximum Subscriptions Reached!") - .setDescription("You are at the maximum of 25 subscriptions. Please remove one before adding another.") - .setFooter("You can type \"view\", \"presets\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } else { - let sub = {}; - sub.pokemon = await detail_collector(WDR, "Name", Member, Message, null, "Respond with \"All\" or the Pokémon Name and Form if it has one. Names are not case-sensitive.", sub); - sub.name = sub.pokemon.name ? sub.pokemon.name : sub.pokemon; - sub.id = sub.pokemon.id ? sub.pokemon.id : sub.pokemon; - - if (advanced == true) { - - if (sub.id > 0) { - sub.form = await detail_collector(WDR, "Form", Member, Message, null, "Please respond with a Form Name of the specified Pokemon -OR- type \"All\". Type \"Cancel\" to Stop.", sub); - } - - if (sub.pokemon == 0) { - sub.gen = await detail_collector(WDR, "Generation", Member, Message, null, "Please respond with the Generation number -OR- type \"All\". Type \"Cancel\" to Stop.", sub); - } - - sub.min_iv = await detail_collector(WDR, "Minimum IV", Member, Message, null, "Please respond with a IV number between 0 and 100 -OR- specify minimum Atk/Def/Sta (15/14/13) Values -OR- type \"All\". Type \"Cancel\" to Stop.", sub); - - if (sub.min_iv == 100) { - sub.max_iv = 100 - } else { - sub.max_iv = await detail_collector(WDR, "Maximum IV", Member, Message, null, "Please respond with a IV number between 0 and 100 -OR- specify minimum Atk/Def/Sta (15/14/13) Values -OR- type \"All\". Type \"Cancel\" to Stop.", sub); - } - - sub.min_lvl = await detail_collector(WDR, "Minimum Level", Member, Message, null, "Please respond with a value between 0 and " + maximum_level + " or type \"All\". Type \"Cancel\" to Stop.", sub); - - if (sub.min_lvl == maximum_level) { - sub.max_lvl = maximum_level; - } else { - sub.max_lvl = await detail_collector(WDR, "Maximum Level", Member, Message, null, "Please respond with a value between 0 and " + maximum_level + " or type \"All\". Type \"Cancel\" to Stop.", sub); - } - - if (sub.pokemon > 0) { - sub.gender = await detail_collector(WDR, "Gender", Member, Message, null, "Please respond with \"Male\" or \"Female\" or type \"All\".", sub); - sub.size = await detail_collector(WDR, "Size", Member, Message, null, "Please respond with \"big\", \"large\", \"normal\", \"small\", \"tiny\" or \"All\".", sub); - sub.size = sub.size.toLowerCase(); - } else { - sub.size = 0; - } - - sub.geofence = await detail_collector(WDR, "Geofence", Member, Message, null, "Please respond with \"Yes\", \"No\" or \"Areas Names\"", sub); - - } else { - - sub.form = 0; - sub.max_iv = 100; - sub.max_lvl = maximum_level; - sub.gender = 4; - sub.gen = 0 - sub.size = 0; - - sub.min_iv = await detail_collector(WDR, "Minimum IV", Member, Message, null, "Please respond with a IV number between 0 and 100 -OR- specify minimum Atk/Def/Sta (15/14/13) Values -OR- type \"All\". Type \"Cancel\" to Stop.", sub); - - sub.min_lvl = await detail_collector(WDR, "Minimum Level", Member, Message, null, "Please respond with a value between 0 and " + maximum_level + " or type \"All\". Type \"Cancel\" to Stop.", sub); - - sub.geofence = await detail_collector(WDR, "Geofence", Member, Message, null, "Please respond with \"Yes\", \"No\" or \"Area Names Separated by ,\"", sub); - sub.geofence = sub.geofence == "ALL" ? Message.Discord.name : sub.geofence; - } - - let confirm = await detail_collector(WDR, "Confirm-Add", Member, Message, null, "Type \"Yes\" or \"No\". Subscription will be saved.", sub); - - WDR.wdrDB.query( - `INSERT INTO - wdr_subscriptions ( - user_id, - user_name, - guild_id, - guild_name, - bot, - status, - geofence, - sub_type, - pokemon_id, - form, - min_lvl, - max_lvl, - min_iv, - max_iv, - size, - gender, - generation - ) - VALUES - ( - ${Message.author.id}, - '${Member.nickname}', - ${Message.guild.id}, - '${Member.db.guild_name}', - ${Member.db.bot}, - ${Member.db.pokemon_status}, - '${sub.geofence}', - 'pokemon', - ${sub.id}, - ${sub.form}, - ${sub.min_lvl}, - ${sub.max_lvl}, - ${sub.min_iv}, - ${sub.max_iv}, - '${sub.size}', - ${sub.gender}, - ${sub.gen} - )`, - async function(error, result) { - if (error) { - if (error.toString().indexOf("Duplicate entry") >= 0) { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Existing Subscription Found!") - .setDescription("Nothing Has Been Saved." + "\n" + +"\n" + - "Use the view to see if your overall or pokemon status is Active if you are not receiving DMs.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } else { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Inserting Subscription.", sub); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(sub.name + " Subscription Complete!") - .setDescription("Saved to the subscription Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } - } - ); - } - } - ); -} - -//############################################################################## - -async function subscription_remove(WDR, Message, Member) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_subscriptions - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon'`, - async function(error, subscriptions, fields) { - if (!subscriptions || !subscriptions[0]) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You do not have any Pokémon Subscriptions!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } else { - let sub_list = ""; - for (let s = 0, slen = subscriptions.length; s < slen; s++) { - let choice = s + 1; - let sub_data = subscriptions[s]; - sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; - sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; - sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; - let data = ""; - if (sub_data.form != 0) { - data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; - } - if (sub_data.min_iv != 0) { - data += " Min IV: `" + sub_data.min_iv + "`\n"; - } - if (sub_data.max_iv != 100) { - data += " Max IV: `" + sub_data.max_iv + "`\n"; - } - if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { - data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; - } - if (sub_data.max_lvl != maximum_level) { - data += " Max Lvl: `" + sub_data.max_lvl + "`\n"; - } - if (sub_data.gender != 0) { - let gender = await WDR.Get_Gender(sub_data.gender); - data += " Gender: `" + gender + "`\n"; - } - if (sub_data.size != 0 && sub_data.size != "all") { - data += " Size: `" + sub_data.size + "`\n"; - } - if (!data) { - data = " `All" + "`\n";; - } - sub_list += data + "\n"; - } - sub_list = sub_list.slice(0, -1); - - let number = await detail_collector(WDR, "Remove", Member, Message, subscriptions, "Type the corressponding # of the subscription you would like to remove -OR- type \"all\"", sub_list); - - let remove = subscriptions[number]; - - WDR.wdrDB.query( - `DELETE FROM - wdr_subscriptions - WHERE - user_id = ${Message.author.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon' - AND pokemon_id = ${remove.pokemon_id} - AND form = ${remove.form} - AND min_lvl = ${remove.min_lvl} - AND max_lvl = ${remove.max_lvl} - AND min_iv = ${remove.min_iv} - AND max_iv = ${remove.max_iv} - AND size = ${remove.size} - AND gender = ${remove.gender} - AND generation = ${remove.generation}`, - async function(error, result) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Removing Subscription.", remove); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(WDR.Master.Pokemon[remove.pokemon_id].name + " Subscription Removed!") - .setDescription("Saved to the subscription Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - return Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "remove", Message, BotMsg, Member); - }); - } - } - ); - } - } - ); -} - -//############################################################################## - -async function subscription_modify(WDR, Message, Member) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_subscriptions - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon'`, - async function(error, subscriptions, fields) { - if (!subscriptions || !subscriptions[0]) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You do not have any Pokémon Subscriptions!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } - - let sub_list = ""; - for (let s = 0, slen = subscriptions.length; s < slen; s++) { - let choice = s + 1; - let sub_data = subscriptions[s]; - sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; - sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; - sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; - let data = ""; - if (sub_data.form != 0) { - data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; - } - if (sub_data.min_iv != 0) { - data += " Min IV: `" + sub_data.min_iv + "`\n"; - } - if (sub_data.max_iv != 100) { - data += " Max IV: `" + sub_data.max_iv + "`\n"; - } - if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { - data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; - } - if (sub_data.max_lvl != maximum_level) { - data += " Max Lvl: `" + sub_data.max_lvl + "`\n"; - } - if (sub_data.gender != 0) { - let gender = await WDR.Get_Gender(sub_data.gender); - data += " Gender: `" + gender + "`\n"; - } - if (sub_data.size != 0 && sub_data.size != "all") { - data += " Size: `" + sub_data.size + "`\n"; - } - if (!data) { - data = " `All" + "`\n";; - } - sub_list += data + "\n"; - } - sub_list = sub_list.slice(0, -1); - - let number = await detail_collector(WDR, "Modify", Member, Message, subscriptions, "Type the corressponding # of the subscription you would like to remove -OR- type \"all\"", sub_list); - - let old = subscriptions[number]; - - let modified = subscriptions[number]; - - old.name = WDR.Master.Pokemon[old.pokemon_id] ? WDR.Master.Pokemon[old.pokemon_id].name : "All Pokémon"; - if (WDR.Master.Pokemon[old.pokemon_id]) { - old.form_name = WDR.Master.Pokemon[old.pokemon_id].forms[old.form] ? WDR.Master.Pokemon[old.pokemon_id].forms[old.form].form : "All"; - } else { - old.form_name = "All"; - } - - modified.pokemon = await detail_collector(WDR, "Name", Member, Message, old.name, "Respond with \"Next\", \"All\", or the Pokémon Name and Form if it has one. Names are not case-sensitive.", modified); - modified.name = modified.pokemon.name ? modified.pokemon.name : modified.pokemon; - modified.id = modified.pokemon.id ? modified.pokemon.id : modified.pokemon; - - old.form_name = WDR.Master.Pokemon[old.pokemon_id] ? WDR.Master.Pokemon[old.pokemon_id].forms[old.form] : "All"; - - if (modified.id > 0) { - modified.form = await detail_collector(WDR, "Form", Member, Message, old, "Please respond with \"Next\", a Form Name of the specified Pokemon, -OR- type \"All\". Type \"Cancel\" to Stop.", modified); - } - - if (modified.pokemon == 0) { - modified.gen = await detail_collector(WDR, "Generation", Member, Message, old.gen, "Please respond with \"Next\", a Generation Number, -OR- type \"All\". Type \"Cancel\" to Stop.", modified); - } else { - modified.gen = old.generation; - } - - modified.min_iv = await detail_collector(WDR, "Minimum IV", Member, Message, old.min_iv, "Please respond with \"Next\", an Number between 1 and 100, -OR- type \"All\". Type \"Cancel\" to Stop.", modified); - - if (modified.min_iv == 100) { - modified.max_iv = 100; - } else { - modified.max_iv = await detail_collector(WDR, "Maximum IV", Member, Message, old.max_iv, "Please respond with \"Next\", an Number between 1 and 100, -OR- type \"All\". Type \"Cancel\" to Stop.", modified); - } - - modified.min_lvl = await detail_collector(WDR, "Minimum Level", Member, Message, old.min_lvl, "Please respond with \"Next\", a Number between 0 and " + maximum_level + ", or type \"All\". Type \"Cancel\" to Stop.", modified); - - if (modified.min_lvl == maximum_level) { - modified.max_lvl = maximum_level; - } else { - modified.max_lvl = await detail_collector(WDR, "Maximum Level", Member, Message, old.max_lvl, "Please respond with \"Next\", a Number between 0 and " + maximum_level + ", or type \"All\". Type \"Cancel\" to Stop.", modified); - } - - if (sub.pokemon > 0) { - modified.gender = await detail_collector(WDR, "Gender", Member, Message, old.gender, "Please respond with \"Next\", \"Male\", \"Female\", or type \"All\".", modified); - modified.size = await detail_collector(WDR, "Size", Member, Message, old.size, "Please respond with \"Next\", \"Big\", \"Large\", \"Normal\", \"Small\", \"Tiny\" or \"All\".", modified); - modified.size = modified.size.toLowerCase(); - } else { - modified.size = 0; - } - - modified.geofence = await detail_collector(WDR, "Geofence", Member, Message, old.geofence, "Please respond with \"Yes\", \"No\", or \"Distance\"", modified); - - modified.confirm = await detail_collector(WDR, "Confirm-Add", Member, Message, undefined, "Type \"Yes\" or \"No\". Subscription will be saved.", modified); - - WDR.wdrDB.query( - `UPDATE - wdr_subscriptions - SET - pokemon_id = ${modified.id}, - form = ${modified.form}, - min_lvl = ${modified.min_lvl}, - max_lvl = ${modified.max_lvl}, - min_iv = ${modified.min_iv}, - max_iv = ${modified.max_iv}, - size = ${modified.size}, - gender = ${modified.gender}, - generation = ${modified.gen} - WHERE - user_id = ${Message.author.id} - AND guild_id = ${Message.guild.id} - AND geofence = ${modified.geofence} - AND sub_type = 'pokemon' - AND pokemon_id = ${old.pokemon_id} - AND form = ${old.form} - AND min_lvl = ${old.min_lvl} - AND max_lvl = ${old.max_lvl} - AND min_iv = ${old.min_iv} - AND max_iv = ${old.max_iv} - AND size = ${old.size} - AND gender = ${old.gender} - AND generation = ${old.generation}`, - async function(error, existing) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - let modification_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(modified.name + " Subscription Modified!") - .setDescription("Saved to the subscription Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - return Message.channel.send(modification_success).then(BotMsg => { - return option_collector(WDR, "modify", Message, BotMsg, Member); - }); - } - } - ); - } - ); -} - -//############################################################################## - -function detail_collector(WDR, type, Member, Message, object, requirements, sub) { - return new Promise(async resolve => { - - let timeout = true, - instruction = ""; - - const filter = cMessage => cMessage.author.id == Message.author.id; - const collector = Message.channel.createMessageCollector(filter, { - time: 60000 - }); - - switch (type) { - - case "Preset": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Choose a Preset Subscription:") - .setDescription(object) - .setFooter(requirements); - break; - - case "Name": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("What Pokémon would you like to Subscribe to?") - .setFooter(requirements); - if (object) { - instruction.setDescription("Current: `" + object + "`"); - } - break; - - case "Form": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("What Form of " + sub.name + " would you like to Subscribe to?") - .setDescription("Available Forms:" + "\n " + sub.pokemon.forms.join("\n ")) - .setFooter(requirements); - if (object) { - if (object.form == 0) { - instruction.setDescription("Current: `All Pokémon`"); - } else { - instruction.setDescription("Current: `" + WDR.Master.Pokemon[object.pokemon_id].forms[object.form].form + "`"); - } - } - break; - - case "Confirm-Add": - let gender = ""; - switch (sub.gender) { - case 1: - gender = "Male"; - break; - case 2: - gender = "Female"; - break; - case 0: - case 3: - case 4: - gender = "All"; - break; - } - - let size = ""; - if (sub.size == 0) { - size = "All"; - } else { - size = await WDR.Capitalize(size); - } - - let form = ""; - switch (sub.form) { - case 0: - form = "All"; - break; - default: - form = WDR.Master.Pokemon[sub.id].forms[sub.form]; - } - - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Does all of this look correct?") - .setDescription("`Name:` " + sub.name + "\n" + - "`Form:` " + form + "\n" + - "`Min IV:` " + sub.min_iv + "\n" + - "`Max IV:` " + sub.max_iv + "\n" + - "`Min Lvl:` " + sub.min_lvl + "\n" + - "`Max Lvl:` " + sub.max_lvl + "\n" + - "`Gender:` " + gender + "\n" + - "`Size:` " + size + "\n" + - "`Areas:` " + sub.geofence) - .setFooter(requirements); - break; - - case "Confirm-Remove": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Are you sure you want to Remove ALL of your subscriptions?") - .setDescription("If you wanted to remove an `ALL` pokemon filter, you need to specify the number associated with it. \`ALL-1\`, \`ALL-2\`, etc") - .setFooter(requirements); - break; - - case "Remove": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Which Subscription do you want to remove?") - .setDescription(sub) - .setFooter(requirements); - break; - - case "Modify": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Which Subscription do you want to Modify?") - .setDescription(sub) - .setFooter(requirements); - break; - - case "Geofence": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Do you want to get notifications for " + sub.name + " filtered by your subscribed Areas?") - .setDescription("**Yes**, your notifications for this Pokémon will be filtered based on your areas.\n" + - "**No**, you will get notifications for this pokemon in ALL areas for the city.\n" + - "Type \"Distance\" to be notified based on your Distance Coordinates in Area settings.") - .setFooter(requirements); - break; - - default: - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("What **" + type + "** would like you like to set for **" + sub.name + "** Notifications?") - .setFooter(requirements); - if (object) { - instruction.setDescription("Current: `" + object + "`"); - } - } - - return Message.channel.send(instruction).catch(console.error).then(msg => { - - let input = ""; - - collector.on("collect", async CollectedMsg => { - - CollectedMsg.delete(); - - switch (true) { - - // CANCEL SUB - case CollectedMsg.content.toLowerCase() == "stop": - case CollectedMsg.content.toLowerCase() == "cancel": - collector.stop("cancel"); - break; - - case type.indexOf("Confirm-Add") >= 0: - case type.indexOf("Confirm-Remove") >= 0: - switch (CollectedMsg.content.toLowerCase()) { - case "save": - case "yes": - collector.stop("Yes"); - break; - case "no": - case "cancel": - return subscription_cancel(WDR, Message, Member); - break; - default: - CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("Geofence") >= 0: - switch (CollectedMsg.content.toLowerCase()) { - case "yes": - collector.stop(Member.db.geofence); - break; - case "all": - case "no": - collector.stop(Message.Discord.name); - break; - case "distance": - if (!Member.db.coords) { - CollectedMsg.reply("**WARNING:** You have not set Coordinates for Distance-based Notifications. You will not receive Notifications for this Sub until you set distance coordinates with the `area` command.").then(m => m.delete({ - timeout: 11000 - })).catch(console.error); - setTimeout(function() { - collector.stop(Member.db.coords); - }, 11000); - } else { - collector.stop(Member.db.coords); - } - break; - default: - CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("Preset") >= 0: - if (CollectedMsg.content > 0 && CollectedMsg.content <= object.length) { - return collector.stop(parseInt(CollectedMsg.content)); - } else { - return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a valid selection.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("Modify") >= 0: - case type.indexOf("Remove") >= 0: - let num = parseInt(CollectedMsg.content); - switch (true) { - case (isNaN(CollectedMsg.content)): - return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a Number. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - case (num > 0 && num <= object.length): - return collector.stop((num - 1)); - default: - return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a valid # selection. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("Name") >= 0: - switch (true) { - case (CollectedMsg.content.toLowerCase() == "same"): - case (CollectedMsg.content.toLowerCase() == "keep"): - case (CollectedMsg.content.toLowerCase() == "next"): - let old_data = await WDR.Pokemon_ID_Search(WDR, object.pokemon_id); - collector.stop(old_data); - break; - case (CollectedMsg.content.toLowerCase() == "all"): - collector.stop(0); - break; - default: - let valid = await WDR.Pokemon_ID_Search(WDR, CollectedMsg.content.split(" ")[0]); - if (valid) { - return collector.stop(valid); - } else { - return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\"t appear to be a valid Pokémon name. Please check the spelling and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - break; - - case type.indexOf("Form") >= 0: - let user_form = await WDR.Capitalize(CollectedMsg.content); - switch (true) { - case (CollectedMsg.content.toLowerCase() == "same"): - case (CollectedMsg.content.toLowerCase() == "keep"): - case (CollectedMsg.content.toLowerCase() == "next"): - collector.stop(object.form); - break; - case (CollectedMsg.content.toLowerCase() == "all"): - collector.stop(0); - break; - case (object.forms.indexOf(user_form) >= 0): - collector.stop(object.form_ids[object.forms.indexOf(user_form)]); - break; - default: - return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\"t appear to be a valid form for `" + object.name + "`. Please check the spelling and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("Generation") >= 0: - switch (true) { - case (CollectedMsg.content.toLowerCase() == "same"): - case (CollectedMsg.content.toLowerCase() == "keep"): - case (CollectedMsg.content.toLowerCase() == "next"): - collector.stop(object.generation); - break; - case (CollectedMsg.content.toLowerCase() == "all"): - collector.stop(0); - break; - case (!isNaN(CollectedMsg.content) && CollectedMsg.content > 0): - collector.stop(parseInt(CollectedMsg.content)); - break; - default: - return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\"t appear to be a valid Generation number.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("IV") >= 0: - switch (true) { - case (CollectedMsg.content.toLowerCase() == "same"): - case (CollectedMsg.content.toLowerCase() == "keep"): - case (CollectedMsg.content.toLowerCase() == "next"): - if (type.indexOf("Minimum") >= 0) { - collector.stop(object.min_iv); - } else { - collector.stop(object.max_iv); - } - break; - case (parseInt(CollectedMsg.content) >= 0 && parseInt(CollectedMsg.content) <= 100): - collector.stop(parseInt(CollectedMsg.content)); - break; - case (CollectedMsg.content.toLowerCase() == "all"): - if (type.indexOf("Minimum") >= 0) { - collector.stop(0); - } else { - collector.stop(100); - } - break; - default: - CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("Level") >= 0: - switch (true) { - case (CollectedMsg.content.toLowerCase() == "same"): - case (CollectedMsg.content.toLowerCase() == "keep"): - case (CollectedMsg.content.toLowerCase() == "next"): - collector.stop(object); - break; - case (parseInt(CollectedMsg.content) >= 0 && parseInt(CollectedMsg.content) <= maximum_level): - collector.stop(parseInt(CollectedMsg.content)); - break; - case (CollectedMsg.content.toLowerCase() == "all"): - if (type.indexOf("Minimum") >= 0) { - collector.stop(0); - } else { - collector.stop(maximum_level); - } - break; - default: - CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("Gender") >= 0: - switch (true) { - case (CollectedMsg.content.toLowerCase() == "same"): - case (CollectedMsg.content.toLowerCase() == "keep"): - case (CollectedMsg.content.toLowerCase() == "next"): - collector.stop(object); - break; - case (CollectedMsg.content.toLowerCase() == "male"): - collector.stop(1); - break; - case (CollectedMsg.content.toLowerCase() == "female"): - collector.stop(2); - break; - case (CollectedMsg.content.toLowerCase() == "all"): - collector.stop(0); - break; - default: - CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - case type.indexOf("Size") >= 0: - switch (true) { - case (CollectedMsg.content.toLowerCase() == "same"): - case (CollectedMsg.content.toLowerCase() == "keep"): - case (CollectedMsg.content.toLowerCase() == "next"): - collector.stop(object); - break; - case (CollectedMsg.content.toLowerCase() == "big"): - collector.stop("big"); - break; - case (CollectedMsg.content.toLowerCase() == "large"): - collector.stop("large"); - break; - case (CollectedMsg.content.toLowerCase() == "normal"): - collector.stop("normal"); - break; - case (CollectedMsg.content.toLowerCase() == "small"): - collector.stop("small"); - break; - case (CollectedMsg.content.toLowerCase() == "tiny"): - collector.stop("tiny"); - break; - case (CollectedMsg.content.toLowerCase() == "all"): - collector.stop(0); - break; - default: - CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - } - }); - - collector.on("end", (collected, reason) => { - if (msg) { - msg.delete(); - } - switch (true) { - case "cancel": - return subscription_cancel(WDR, Message, Member); - case "time": - return subscription_timedout(WDR, Message, Member); - default: - return resolve(reason); - } - }); - }); - - // END - return; - }); -} - -//############################################################################## - -function subscription_cancel(WDR, Message, Member) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Subscription Cancelled.") - .setDescription("Nothing has been Saved.") - return Message.channel.send(subscription_cancel).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); -} - -//############################################################################## - -function subscription_timedout(WDR, Message, Member) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Subscription Has Timed Out.") - .setDescription("Nothing has been Saved.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - return Message.channel.send(subscription_cancel).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); -} - -//############################################################################## - -function option_collector(WDR, source, oMessage, bMessage, Member) { - - var BotMsg = bMessage; - let OriginalMsg = oMessage; - - const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; - const collector = OriginalMsg.channel.createMessageCollector(filter, { - time: 60000 - }); - - collector.on("collect", CollectedMsg => { - if (CollectedMsg) { - CollectedMsg.delete(); - } - let input = CollectedMsg.content.split(" ")[0].toString().toLowerCase(); - if (CollectedMsg.content.split(" ")[1] == "advanced" || CollectedMsg.content.split(" ")[1] == "adv") { - input += " adv"; - } - switch (input) { - case "advanced": - case "add advanced": - case "add adv": - collector.stop("advanced"); - break; - case "ad": - case "add": - collector.stop("add"); - break; - case "preset": - case "presets": - collector.stop("preset"); - break; - case "remove": - collector.stop("remove"); - break; - case "change": - case "modify": - case "edit": - case "eidt": - collector.stop("edit"); - break; - case "view": - case "veiw": - collector.stop("view"); - break; - case "puase": - case "pasue": - case "pasue": - case "psaue": - case "paus": - case "pause": - collector.stop("pause"); - break; - case "resum": - case "rseume": - case "reusme": - case "resuem": - case "resume": - collector.stop("resume"); - break; - default: - collector.stop("cancel"); - } - }); - - collector.on("end", (collected, reason) => { - if (BotMsg) { - BotMsg.delete(); - } - switch (reason) { - case "cancel": - return subscription_cancel(WDR, OriginalMsg, Member); - case "advanced": - return subscription_create(WDR, OriginalMsg, Member, true); - case "add": - return subscription_create(WDR, OriginalMsg, Member, false); - case "preset": - return subscription_preset(WDR, OriginalMsg, Member, false); - case "remove": - return subscription_remove(WDR, OriginalMsg, Member); - case "edit": - return subscription_modify(WDR, OriginalMsg, Member); - case "view": - return subscription_view(WDR, OriginalMsg, Member); - case "resume": - case "pause": - return subscription_status(WDR, OriginalMsg, Member, reason); - case "time": - return subscription_timedout(WDR, OriginalMsg, Member); - default: - return; - } - }); - - // END - return; -} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/begin.js b/src/commands/subscription/pokemon/begin.js index dfc61b6..4119f07 100644 --- a/src/commands/subscription/pokemon/begin.js +++ b/src/commands/subscription/pokemon/begin.js @@ -1,36 +1,30 @@ -let Status = require(__dirname + "/status.js"); -let View = require(__dirname + "/view.js"); -let Create = require(__dirname + "/create.js"); -let Remove = require(__dirname + "/remove.js"); -let Modify = require(__dirname + "/modify.js"); -let Option_Collector = require(__dirname + "/option_collector.js"); +var Functions = { + Cancel: require(__dirname + "/../cancel.js"), + Create: require(__dirname + "/create.js"), + DetailCollect: require(__dirname + "/collect_detail.js"), + Modify: require(__dirname + "/modify.js"), + OptionCollect: require(__dirname + "/collect_option.js"), + Preset: require(__dirname + "/preset.js"), + Remove: require(__dirname + "/remove.js"), + Status: require(__dirname + "/status.js"), + TimedOut: require(__dirname + "/../timedout.js"), + View: require(__dirname + "/view.js"), + Dir: __filename.split("/").slice(__dirname.split("/").length - 4).join("/") +} -module.exports = async (WDR, Message, Discord) => { +module.exports = async (WDR, Message) => { - let Member = ""; - if (Message.member) { - Member = Message.member; - } else { - Member = Message.author; - } - - switch (true) { - case Member.nickname: - break; - case Message.author.username: - break; - } - - Member.db = Message.member.db; + var Member = Message.member ? Message.member : Message.author; - if (!Member.nickname) { - Member.nickname = Message.author.username; + if (Message.member.db.length > 1) { + let choice = await Functions.DetailCollect(WDR, Functions, "Guild", Member, Message, Message.member.user_guilds, "Respond with the # of a Discord.", null); + Member.db = Message.member.db[choice]; } else { - Member.nickname = Message.author.username; + Member.db = Message.member.db; } - let requestAction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) + let request_action = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) .setTitle("What would you like to do with your Pokémon Subscriptions?") .setDescription("`presets` » View quick preset subscriptions." + "\n" + "`view` » View your Subscriptions." + "\n" + @@ -41,7 +35,7 @@ module.exports = async (WDR, Message, Discord) => { "`pause` or `resume` » Pause/Resume Pokémon Subscriptions Only.") .setFooter("Type the action, no command prefix required."); - Message.channel.send(requestAction).catch(console.error).then(BotMsg => { - return Option_Collector(WDR, "start", Message, BotMsg, Member); + Message.channel.send(request_action).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "start", Message, BotMsg, Member); }); } \ No newline at end of file diff --git a/src/commands/subscription/pokemon/cancel.js b/src/commands/subscription/pokemon/cancel.js deleted file mode 100644 index e69de29..0000000 diff --git a/src/commands/subscription/pokemon/collect_detail.js b/src/commands/subscription/pokemon/collect_detail.js new file mode 100644 index 0000000..57845c2 --- /dev/null +++ b/src/commands/subscription/pokemon/collect_detail.js @@ -0,0 +1,474 @@ +module.exports = (WDR, Functions, type, Member, Message, object, requirements, sub) => { + return new Promise(async resolve => { + try { + + let timeout = true, + instruction = ""; + + const filter = cMessage => cMessage.author.id == Message.author.id; + const collector = Message.channel.createMessageCollector(filter, { + time: 60000 + }); + + switch (type) { + + case "Guild": + let list = ""; + object.forEach((guild, i) => { + list += (i + 1) + " - " + guild.name + "\n"; + }); + list = list.slice(0, -1); + + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Choose a Discord:") + .setDescription(list) + .setFooter(requirements); + break; + + case "Preset": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Choose a Preset Subscription:") + .setDescription(object) + .setFooter(requirements); + break; + + case "Name": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What Pokémon would you like to Subscribe to?") + .setFooter(requirements); + if (object) { + instruction.setDescription("Current: `" + object + "`"); + } + break; + + case "Type": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What Pokémon Type would you like to Subscribe to?") + .setFooter(requirements); + if (object) { + instruction.setDescription("Current: `" + WDR.Capitalize(object) + "`"); + } + break; + + case "Form": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What Form of " + sub.name + " would you like to Subscribe to?") + .setDescription("Available Forms:" + "\n " + sub.pokemon.forms.join("\n ")) + .setFooter(requirements); + if (object) { + if (object.form == 0) { + instruction.setDescription("Current: `All Pokémon`"); + } else { + instruction.setDescription("Current: `" + WDR.Master.Pokemon[object.pokemon_id].forms[object.form].form + "`"); + } + } + break; + + case "Confirm-Add": + let gender = ""; + switch (sub.gender) { + case 1: + gender = "Male"; + break; + case 2: + gender = "Female"; + break; + case 0: + case 3: + case 4: + gender = "All"; + break; + } + + let size = ""; + if (sub.size == 0) { + size = "All"; + } else { + size = await WDR.Capitalize(size); + } + + let form = ""; + switch (sub.form) { + case 0: + form = "All"; + break; + default: + form = WDR.Master.Pokemon[sub.id].forms[sub.form]; + } + + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Does all of this look correct?") + .setDescription("`Name:` " + sub.name + "\n" + + "`Form:` " + form + "\n" + + "`Min IV:` " + sub.min_iv + "\n" + + "`Max IV:` " + sub.max_iv + "\n" + + "`Min Lvl:` " + sub.min_lvl + "\n" + + "`Max Lvl:` " + sub.max_lvl + "\n" + + "`Gender:` " + gender + "\n" + + "`Size:` " + size + "\n" + + "`Areas:` " + sub.geofence) + .setFooter(requirements); + break; + + case "Confirm-Remove": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Are you sure you want to Remove ALL of your subscriptions?") + .setDescription("If you wanted to remove an `ALL` pokemon filter, you need to specify the number associated with it. \`ALL-1\`, \`ALL-2\`, etc") + .setFooter(requirements); + break; + + case "Remove": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Which Subscription do you want to remove?") + .setDescription(sub) + .setFooter(requirements); + break; + + case "Modify": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Which Subscription do you want to Modify?") + .setDescription(sub) + .setFooter(requirements); + break; + + case "Geofence": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Do you want to get notifications for " + sub.name + " filtered by your subscribed Areas?") + .setDescription("**Yes**, your notifications for this Pokémon will be filtered based on your areas.\n" + + "**No**, you will get notifications for this pokemon in ALL areas for the city.\n" + + "Type \'Distance\' to be notified based on your Distance Coordinates in Area settings.") + .setFooter(requirements); + break; + + default: + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What **" + type + "** would like you like to set for **" + sub.name + "** Notifications?") + .setFooter(requirements); + if (object) { + instruction.setDescription("Current: `" + object + "`"); + } + } + + return Message.channel.send(instruction).then(msg => { + + let input = ""; + + collector.on("collect", async CollectedMsg => { + + if (Message.channel.type != "dm") { + CollectedMsg.delete(); + } + + switch (true) { + + case CollectedMsg.content.toLowerCase() == "stop": + case CollectedMsg.content.toLowerCase() == "cancel": + collector.stop("cancel"); + break; + + case type.indexOf("Confirm-Add") >= 0: + case type.indexOf("Confirm-Remove") >= 0: + switch (CollectedMsg.content.toLowerCase()) { + case "save": + case "yes": + collector.stop("Yes"); + break; + case "no": + case "cancel": + return Functions.Cancel(WDR, Functions, Message, Member); + collector.stop(null); + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Geofence") >= 0: + switch (CollectedMsg.content.toLowerCase()) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case "yes": + collector.stop(Member.db.geofence); + break; + case "all": + case "no": + collector.stop(Message.Discord.name); + break; + case "distance": + if (!Member.db.coords) { + CollectedMsg.reply("**WARNING:** You have not set Coordinates for Distance-based Notifications. You will not receive Notifications for this Sub until you set distance coordinates with the `area` command.").then(m => m.delete({ + timeout: 11000 + })); + setTimeout(function() { + collector.stop(Member.db.coords); + }, 11000); + } else { + collector.stop(Member.db.coords); + } + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Guild") >= 0: + case type.indexOf("Preset") >= 0: + case type.indexOf("Modify") >= 0: + case type.indexOf("Remove") >= 0: + let num = parseInt(CollectedMsg.content); + switch (true) { + case (isNaN(CollectedMsg.content)): + return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a Number. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + case (num > 0 && num <= object.length): + return collector.stop((num - 1)); + default: + return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a valid # selection. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Name") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + default: + let valid = await WDR.Pokemon_ID_Search(WDR, CollectedMsg.content.split(" ")[0]); + if (valid) { + return collector.stop(valid); + } else { + return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\'t appear to be a valid Pokémon name. Please check the spelling and try again.").then(m => m.delete({ + timeout: 5000 + })); + } + } + break; + + case type.indexOf("Type") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + default: + let match; + WDR.Master.Pokemon_Types.forEach(type => { + if (type.toLowerCase() == CollectedMsg.content.toLowerCase()) { + match = type.toLowerCase(); + collector.stop(match); + } + }); + if (!match) { + return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\'t appear to be a valid type. Please check the spelling and try again.").then(m => m.delete({ + timeout: 5000 + })); + } + } + break; + + case type.indexOf("Form") >= 0: + let user_form = await WDR.Capitalize(CollectedMsg.content); + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + case (object.forms.indexOf(user_form) >= 0): + collector.stop(object.form_ids[object.forms.indexOf(user_form)]); + break; + default: + return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\'t appear to be a valid form for `" + object.name + "`. Please check the spelling and try again.").then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Generation") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + case (!isNaN(CollectedMsg.content) && CollectedMsg.content > 0): + collector.stop(parseInt(CollectedMsg.content)); + break; + default: + return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\'t appear to be a valid Generation number.").then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("IV") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (parseInt(CollectedMsg.content) >= 0 && parseInt(CollectedMsg.content) <= 100): + collector.stop(parseInt(CollectedMsg.content)); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + if (type.indexOf("Minimum") >= 0) { + collector.stop(0); + } else { + collector.stop(100); + } + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Level") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (parseInt(CollectedMsg.content) >= 0 && parseInt(CollectedMsg.content) <= WDR.MaxLevel): + collector.stop(parseInt(CollectedMsg.content)); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + if (type.indexOf("Minimum") >= 0) { + collector.stop(0); + } else { + collector.stop(WDR.MaxLevel); + } + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Gender") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (CollectedMsg.content.toLowerCase() == "male"): + collector.stop(1); + break; + case (CollectedMsg.content.toLowerCase() == "female"): + collector.stop(2); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Size") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (CollectedMsg.content.toLowerCase() == "big"): + collector.stop("big"); + break; + case (CollectedMsg.content.toLowerCase() == "large"): + collector.stop("large"); + break; + case (CollectedMsg.content.toLowerCase() == "normal"): + collector.stop("normal"); + break; + case (CollectedMsg.content.toLowerCase() == "small"): + collector.stop("small"); + break; + case (CollectedMsg.content.toLowerCase() == "tiny"): + collector.stop("tiny"); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. Type cancel to quit. this subscription." + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + }); + + collector.on("end", (collected, reason) => { + if (reason == null) { + return; + } + if (msg && msg.channel.type != "dm") { + msg.delete(); + } + switch (reason) { + case "cancel": + return Functions.Cancel(WDR, Functions, Message, Member); + case "time": + return Functions.TimedOut(WDR, Functions, Message, Member); + default: + return resolve(reason); + } + }); + }); + } catch (e) { + WDR.WDR.Console.error(WDR, "[" + Functions.Dir + "] Error Collecting Detail.", [error]); + } + + // END + return; + }); +} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/collect_option.js b/src/commands/subscription/pokemon/collect_option.js new file mode 100644 index 0000000..58a8cbc --- /dev/null +++ b/src/commands/subscription/pokemon/collect_option.js @@ -0,0 +1,91 @@ +module.exports = (WDR, Functions, source, oMessage, bMessage, Member) => { + + let BotMsg = bMessage; + let OriginalMsg = oMessage; + + const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; + const collector = OriginalMsg.channel.createMessageCollector(filter, { + time: 60000 + }); + + collector.on("collect", CollectedMsg => { + + if (CollectedMsg && CollectedMsg.channel.type != "dm") { + CollectedMsg.delete(); + } + + let input = CollectedMsg.content.split(" ")[0].toString().toLowerCase(); + + let adv_words = ["adv"], + add_words = ["ad", "add", "create"], + preset_words = ["preset", "presets"], + remove_words = ["remove", "rm"], + modify_words = ["change", "modify", "edit", "eidt"], + view_words = ["view", "vw", "veiw", "viw", "vew"], + pause_words = ["puase", "pasue", "pasue", "psaue", "paus", "pause"], + resume_words = ["resum", "rseume", "reusme", "resuem", "resume"]; + + switch (true) { + case adv_words.some(word => input.includes(word)): + collector.stop("advanced"); + break; + case add_words.some(word => input.includes(word)): + collector.stop("add"); + break; + case preset_words.some(word => input.includes(word)): + collector.stop("preset"); + break; + case remove_words.some(word => input.includes(word)): + collector.stop("remove"); + break; + case modify_words.some(word => input.includes(word)): + collector.stop("edit"); + break; + case view_words.some(word => input.includes(word)): + collector.stop("view"); + break; + case pause_words.some(word => input.includes(word)): + collector.stop("pause"); + break; + case resume_words.some(word => input.includes(word)): + collector.stop("resume"); + break; + default: + collector.stop("cancel"); + } + }); + + collector.on("end", (collected, arg) => { + + if (BotMsg && BotMsg.channel.type != "dm") { + BotMsg.delete(); + } + + switch (arg) { + case "cancel": + return Functions.Cancel(WDR, Functions, OriginalMsg, Member); + case "advanced": + return Functions.Create(WDR, Functions, OriginalMsg, Member, true); + case "add": + return Functions.Create(WDR, Functions, OriginalMsg, Member, false); + case "preset": + return Functions.Preset(WDR, Functions, OriginalMsg, Member); + case "remove": + return Functions.Remove(WDR, Functions, OriginalMsg, Member); + case "edit": + return Functions.Modify(WDR, Functions, OriginalMsg, Member); + case "view": + return Functions.View(WDR, Functions, OriginalMsg, Member); + case "resume": + case "pause": + return Functions.Status(WDR, Functions, OriginalMsg, Member, arg); + case "time": + return Functions.TimedOut(WDR, Functions, OriginalMsg, Member); + default: + return; + } + }); + + // END + return; +} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/create.js b/src/commands/subscription/pokemon/create.js new file mode 100644 index 0000000..4b6bbb3 --- /dev/null +++ b/src/commands/subscription/pokemon/create.js @@ -0,0 +1,166 @@ +module.exports = (WDR, Functions, Message, Member, advanced) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_subscriptions + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pokemon'`, + async function(error, subs) { + if (error) { + WDR.Console.error(WDR, "[subs/poke/create.js] Error Fetching Subscriptions to Create Subscription.", [sub, error]); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else if (subs.length >= 25) { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Maximum Subscriptions Reached!") + .setDescription("You are at the maximum of 25 subscriptions. Please remove one before adding another.") + .setFooter("You can type \'view\', \'presets\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "create", Message, BotMsg, Member); + }); + } else { + let sub = {}; + sub.pokemon = await Functions.DetailCollect(WDR, Functions, "Name", Member, Message, null, "Respond with \'All\' or the Pokémon Name and Form if it has one. Names are not case-sensitive.", sub); + sub.name = sub.pokemon.name ? sub.pokemon.name : sub.pokemon; + sub.id = sub.pokemon.id ? sub.pokemon.id : sub.pokemon; + if (sub.name == 0) { + sub.name = "All"; + } + + if (sub.id > 0) { + sub.form = await Functions.DetailCollect(WDR, Functions, "Form", Member, Message, null, "Please respond with a Form Name of the specified Pokemon -OR- type \'All\'. Type \'Cancel\' to Stop.", sub); + } + + if (advanced == true) { + + if (sub.pokemon == 0) { + sub.gen = await Functions.DetailCollect(WDR, Functions, "Generation", Member, Message, null, "Please respond with the Generation number -OR- type \'All\'. Type \'Cancel\' to Stop.", sub); + } + + sub.min_iv = await Functions.DetailCollect(WDR, Functions, "Minimum IV", Member, Message, null, "Please respond with a IV number between 0 and 100 -OR- specify minimum Atk/Def/Sta (15/14/13) Values -OR- type \'All\'. Type \'Cancel\' to Stop.", sub); + + if (sub.min_iv == 100) { + sub.max_iv = 100 + } else { + sub.max_iv = await Functions.DetailCollect(WDR, Functions, "Maximum IV", Member, Message, null, "Please respond with a IV number between 0 and 100 -OR- specify minimum Atk/Def/Sta (15/14/13) Values -OR- type \'All\'. Type \'Cancel\' to Stop.", sub); + } + + sub.min_lvl = await Functions.DetailCollect(WDR, Functions, "Minimum Level", Member, Message, null, "Please respond with a value between 0 and " + WDR.MaxLevel + " or type \'All\'. Type \'Cancel\' to Stop.", sub); + + if (sub.min_lvl == WDR.MaxLevel) { + sub.max_lvl = WDR.MaxLevel; + } else { + sub.max_lvl = await Functions.DetailCollect(WDR, Functions, "Maximum Level", Member, Message, null, "Please respond with a value between 0 and " + WDR.MaxLevel + " or type \'All\'. Type \'Cancel\' to Stop.", sub); + } + + if (sub.pokemon > 0) { + sub.gender = await Functions.DetailCollect(WDR, Functions, "Gender", Member, Message, null, "Please respond with \'Male\' or \'Female\' or type \'All\'.", sub); + sub.size = await Functions.DetailCollect(WDR, Functions, "Size", Member, Message, null, "Please respond with \'big\', \'large\', \'normal\', \'small\', \'tiny\' or \'All\'.", sub); + sub.size = sub.size.toLowerCase(); + } else { + sub.size = 0; + } + + sub.geofence = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, null, "Please respond with \'Yes\' or \'No\'", sub); + + } else { + + sub.form = 0; + sub.max_iv = 100; + sub.max_lvl = WDR.MaxLevel; + sub.gender = 4; + sub.gen = 0 + sub.size = 0; + + sub.min_iv = await Functions.DetailCollect(WDR, Functions, "Minimum IV", Member, Message, null, "Please respond with a IV number between 0 and 100 -OR- specify minimum Atk/Def/Sta (15/14/13) Values -OR- type \'All\'. Type \'Cancel\' to Stop.", sub); + + sub.min_lvl = await Functions.DetailCollect(WDR, Functions, "Minimum Level", Member, Message, null, "Please respond with a value between 0 and " + WDR.MaxLevel + " or type \'All\'. Type \'Cancel\' to Stop.", sub); + + sub.geofence = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, null, "Please respond with \'Yes\' or \'No\'", sub); + sub.geofence = sub.geofence == "ALL" ? Message.Discord.name : sub.geofence; + } + + let confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", Member, Message, null, "Type \'Yes\' or \'No\'. Subscription will be saved.", sub); + + let query = + `INSERT INTO + wdr_subscriptions ( + user_id, + user_name, + guild_id, + guild_name, + bot, + status, + geofence, + sub_type, + pokemon_id, + form, + min_lvl, + max_lvl, + min_iv, + max_iv, + size, + gender, + generation + ) + VALUES + ( + ${Message.author.id}, + '${Member.db.user_name}', + ${Message.guild.id}, + '${Member.db.guild_name}', + ${Member.db.bot}, + ${Member.db.pokemon_status}, + '${sub.geofence}', + 'pokemon', + ${sub.id}, + ${sub.form}, + ${sub.min_lvl}, + ${sub.max_lvl}, + ${sub.min_iv}, + ${sub.max_iv}, + '${sub.size}', + ${sub.gender}, + ${sub.gen} + );`; + WDR.wdrDB.query( + query, + async function(error, result) { + if (error) { + if (error.toString().indexOf("Duplicate entry") >= 0) { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Existing Subscription Found!") + .setDescription("Nothing Has Been Saved." + "\n" + +"\n" + + "Use the view to see if your overall or pokemon status is Active if you are not receiving DMs.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "create", Message, BotMsg, Member); + }); + } else { + WDR.Console.error(WDR, "[" + Functions.Dir + "] Error Inserting Subscription.", [query, error]); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } + } else { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle(sub.name + " Subscription Complete!") + .setDescription("Saved to the subscription Database.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "create", Message, BotMsg, Member); + }); + } + } + ); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/modify.js b/src/commands/subscription/pokemon/modify.js index e69de29..7d04ec0 100644 --- a/src/commands/subscription/pokemon/modify.js +++ b/src/commands/subscription/pokemon/modify.js @@ -0,0 +1,167 @@ +module.exports = (WDR, Functions, Message, Member) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_subscriptions + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pokemon';`, + async function(error, subscriptions, fields) { + if (!subscriptions || !subscriptions[0]) { + let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("You do not have any Pokémon Subscriptions!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, BotMsg, Member); + }); + } + + let sub_list = ""; + for (let s = 0, slen = subscriptions.length; s < slen; s++) { + let choice = s + 1; + let sub_data = subscriptions[s]; + sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; + sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; + sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; + let data = ""; + if (sub_data.form != 0) { + data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; + } + if (sub_data.min_iv != 0) { + data += " Min IV: `" + sub_data.min_iv + "`\n"; + } + if (sub_data.max_iv != 100) { + data += " Max IV: `" + sub_data.max_iv + "`\n"; + } + if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { + data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; + } + if (sub_data.max_lvl != WDR.MaxLevel) { + data += " Max Lvl: `" + sub_data.max_lvl + "`\n"; + } + if (sub_data.gender != 0) { + let gender = await WDR.Get_Gender(sub_data.gender); + data += " Gender: `" + gender + "`\n"; + } + if (sub_data.size != 0 && sub_data.size != "all") { + data += " Size: `" + sub_data.size + "`\n"; + } + if (!data) { + data = " `All" + "`\n";; + } + sub_list += data + "\n"; + } + sub_list = sub_list.slice(0, -1); + + let number = await Functions.DetailCollect(WDR, Functions, "Modify", Member, Message, subscriptions, "Type the corressponding # of the subscription you would like to remove -OR- type \'all\'", sub_list); + + let old = subscriptions[number]; + + let modified = subscriptions[number]; + + old.name = WDR.Master.Pokemon[old.pokemon_id] ? WDR.Master.Pokemon[old.pokemon_id].name : "All Pokémon"; + if (WDR.Master.Pokemon[old.pokemon_id]) { + old.form_name = WDR.Master.Pokemon[old.pokemon_id].forms[old.form] ? WDR.Master.Pokemon[old.pokemon_id].forms[old.form].form : "All"; + } else { + old.form_name = "All"; + } + + modified.pokemon = await Functions.DetailCollect(WDR, Functions, "Name", Member, Message, old.name, "Respond with \'Next\', \'All\', or the Pokémon Name and Form if it has one. Names are not case-sensitive.", modified); + modified.name = modified.pokemon.name ? modified.pokemon.name : modified.pokemon; + modified.id = modified.pokemon.id ? modified.pokemon.id : modified.pokemon; + + old.form_name = WDR.Master.Pokemon[old.pokemon_id] ? WDR.Master.Pokemon[old.pokemon_id].forms[old.form] : "All"; + + if (modified.id > 0) { + modified.form = await Functions.DetailCollect(WDR, Functions, "Form", Member, Message, old.form_name, "Please respond with \'Next\', a Form Name of the specified Pokemon, -OR- type \'All\'. Type \'Cancel\' to Stop.", modified); + } else { + modified.type = await Functions.DetailCollect(WDR, Functions, "Type", Member, Message, old.pokemon_type, "Please respond with the Pokemon Type -OR- type \'All\'. Type \'Cancel\' to Stop.", modified); + } + if (modifed.form = old.form_name) { + modified.form = old.form; + } + + if (modified.pokemon == 0) { + modified.gen = await Functions.DetailCollect(WDR, Functions, "Generation", Member, Message, old.gen, "Please respond with \'Next\', a Generation Number, -OR- type \'All\'. Type \'Cancel\' to Stop.", modified); + } else { + modified.gen = old.generation; + } + + modified.min_iv = await Functions.DetailCollect(WDR, Functions, "Minimum IV", Member, Message, old.min_iv, "Please respond with \'Next\', an Number between 1 and 100, -OR- type \'All\'. Type \'Cancel\' to Stop.", modified); + + if (modified.min_iv == 100) { + modified.max_iv = 100; + } else { + modified.max_iv = await Functions.DetailCollect(WDR, Functions, "Maximum IV", Member, Message, old.max_iv, "Please respond with \'Next\', an Number between 1 and 100, -OR- type \'All\'. Type \'Cancel\' to Stop.", modified); + } + + modified.min_lvl = await Functions.DetailCollect(WDR, Functions, "Minimum Level", Member, Message, old.min_lvl, "Please respond with \'Next\', a Number between 0 and " + WDR.MaxLevel + ", or type \'All\'. Type \'Cancel\' to Stop.", modified); + + if (modified.min_lvl == WDR.MaxLevel) { + modified.max_lvl = WDR.MaxLevel; + } else { + modified.max_lvl = await Functions.DetailCollect(WDR, Functions, "Maximum Level", Member, Message, old.max_lvl, "Please respond with \'Next\', a Number between 0 and " + WDR.MaxLevel + ", or type \'All\'. Type \'Cancel\' to Stop.", modified); + } + + if (sub.pokemon > 0) { + modified.gender = await Functions.DetailCollect(WDR, Functions, "Gender", Member, Message, old.gender, "Please respond with \'Next\', \'Male\', \'Female\', or type \'All\'.", modified); + modified.size = await Functions.DetailCollect(WDR, Functions, "Size", Member, Message, old.size, "Please respond with \'Next\', \'Big\', \'Large\', \'Normal\', \'Small\', \'Tiny\' or \'All\'.", modified); + modified.size = modified.size.toLowerCase(); + } else { + modified.size = 0; + } + + modified.geofence = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, old.geofence, "Please respond with \'Yes\', \'No\', or \'Distance\'", modified); + + modified.confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", Member, Message, undefined, "Type \'Yes\' or \'No\'. Subscription will be saved.", modified); + + WDR.wdrDB.query( + `UPDATE + wdr_subscriptions + SET + pokemon_id = ${modified.id}, + form = ${modified.form}, + min_lvl = ${modified.min_lvl}, + max_lvl = ${modified.max_lvl}, + min_iv = ${modified.min_iv}, + max_iv = ${modified.max_iv}, + size = ${modified.size}, + gender = ${modified.gender}, + generation = ${modified.gen} + WHERE + user_id = ${Message.author.id} + AND guild_id = ${Message.guild.id} + AND geofence = ${modified.geofence} + AND sub_type = 'pokemon' + AND pokemon_id = ${old.pokemon_id} + AND form = ${old.form} + AND min_lvl = ${old.min_lvl} + AND max_lvl = ${old.max_lvl} + AND min_iv = ${old.min_iv} + AND max_iv = ${old.max_iv} + AND size = ${old.size} + AND gender = ${old.gender} + AND generation = ${old.generation}`, + async function(error, existing) { + if (error) { + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else { + let modification_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle(modified.name + " Subscription Modified!") + .setDescription("Saved to the subscription Database.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + return Message.channel.send(modification_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "modify", Message, BotMsg, Member); + }); + } + } + ); + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/option_collector.js b/src/commands/subscription/pokemon/option_collector.js deleted file mode 100644 index b90840f..0000000 --- a/src/commands/subscription/pokemon/option_collector.js +++ /dev/null @@ -1,90 +0,0 @@ -module.exports = (WDR, source, oMessage, bMessage, Member) => { - - let BotMsg = bMessage; - let OriginalMsg = oMessage; - - const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; - const collector = OriginalMsg.channel.createMessageCollector(filter, { - time: 60000 - }); - - collector.on("collect", CollectedMsg => { - if (CollectedMsg) { - CollectedMsg.delete(); - } - let input = CollectedMsg.content.split(" ")[0].toString().toLowerCase(); - if (CollectedMsg.content.split(" ")[1] == "advanced" || CollectedMsg.content.split(" ")[1] == "adv") { - input += " adv"; - } - switch (input) { - case "advanced": - case "add advanced": - case "add adv": - collector.stop("advanced"); - break; - case "ad": - case "add": - collector.stop("add"); - break; - case "preset": - case "presets": - collector.stop("preset"); - break; - case "remove": - collector.stop("remove"); - break; - case "edit": - case "eidt": - collector.stop("edit"); - break; - case "view": - case "veiw": - collector.stop("view"); - break; - case "puase": - case "pasue": - case "pasue": - case "psaue": - case "paus": - case "pause": - collector.stop("pause"); - break; - case "resum": - case "rseume": - case "reusme": - case "resuem": - case "resume": - collector.stop("resume"); - break; - default: - collector.stop("end"); - } - }); - - collector.on("end", (collected, reason) => { - if (BotMsg) { - BotMsg.delete(); - } - switch (reason) { - case "cancel": - return subscription_cancel(WDR, OriginalMsg, Member); - case "advanced": - return subscription_create(WDR, OriginalMsg, Member, true); - case "add": - return subscription_create(WDR, OriginalMsg, Member, false); - case "preset": - return subscription_preset(WDR, OriginalMsg, Member, false); - case "remove": - return subscription_remove(WDR, OriginalMsg, Member); - case "edit": - return subscription_modify(WDR, OriginalMsg, Member); - case "view": - return subscription_view(WDR, OriginalMsg, Member); - case "resume": - case "pause": - return subscription_status(WDR, OriginalMsg, Member, reason); - default: - return subscription_timedout(WDR, OriginalMsg, Member); - } - }); -} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/preset.js b/src/commands/subscription/pokemon/preset.js new file mode 100644 index 0000000..49ec218 --- /dev/null +++ b/src/commands/subscription/pokemon/preset.js @@ -0,0 +1,90 @@ +module.exports = async (WDR, Functions, Message, Member) => { + let presets = ""; + let preset_names = WDR.Presets.Pokemon.map(p => p.name); + for (let p = 0, plen = preset_names.length; p < plen; p++) { + let ps = WDR.Presets.Pokemon[p]; + presets += (p + 1) + " - " + preset_names[p] + "\n"; + } + presets = presets.slice(0, -1); + + let preset = await Functions.DetailCollect(WDR, Functions, "Preset", Member, Message, presets, "Respond with the # of a preset.", null); + let preset_name = preset_names[preset]; + preset = WDR.Presets.Pokemon.get(preset_name); + + // RETRIEVE AREA CONFIMATION FROM USER + preset.geofence = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, undefined, "Please respond with \'Yes\' or \'No\'", preset); + + // RETRIEVE CONFIRMATION FROM USER + preset.confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", Member, Message, undefined, "Type \'Yes\' or \'No\'. Subscription will be saved.", preset); + + WDR.wdrDB.query(` + INSERT INTO + wdr_subscriptions ( + user_id, + user_name, + guild_id, + guild_name, + bot, + status, + geofence, + sub_type, + pokemon_id, + form, + min_lvl, + max_lvl, + min_iv, + max_iv, + size, + gender, + generation + ) + VALUES + ( + ${Message.author.id}, + '${Member.db.user_name}', + ${Message.guild.id}, + '${Member.db.guild_name}', + ${Member.db.bot}, + ${Member.db.pokemon_status}, + '${preset.geofence}', + 'pokemon', + ${preset.id}, + ${preset.form}, + ${preset.min_lvl}, + ${preset.max_lvl}, + ${preset.min_iv}, + ${preset.max_iv}, + '${preset.size}', + ${preset.gender}, + ${preset.gen} + )`, + async function(error, result) { + if (error) { + if (error.toString().indexOf("Duplicate entry") >= 0) { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Existing Subscription Found!") + .setDescription("Nothing has been saved.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "create", Message, BotMsg, Member); + }); + } else { + WDR.Console.error(WDR, "[commands/pokemon.js] Error Inserting Preset Subscription.", [preset, error]); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } + } else { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle(preset.name + " Pokemon Subscription Complete!") + .setDescription("Saved to the subscription Database.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "create", Message, BotMsg, Member); + }); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/remove.js b/src/commands/subscription/pokemon/remove.js new file mode 100644 index 0000000..5bda4be --- /dev/null +++ b/src/commands/subscription/pokemon/remove.js @@ -0,0 +1,100 @@ +module.exports = (WDR, Functions, Message, Member) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_subscriptions + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pokemon'`, + async function(error, subscriptions, fields) { + if (!subscriptions || !subscriptions[0]) { + let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("You do not have any Pokémon Subscriptions!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, BotMsg, Member); + }); + } else { + let sub_list = ""; + for (let s = 0, slen = subscriptions.length; s < slen; s++) { + let choice = s + 1; + let sub_data = subscriptions[s]; + sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; + sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; + sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; + let data = ""; + if (sub_data.form != 0) { + data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; + } + if (sub_data.min_iv != 0) { + data += " Min IV: `" + sub_data.min_iv + "`\n"; + } + if (sub_data.max_iv != 100) { + data += " Max IV: `" + sub_data.max_iv + "`\n"; + } + if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { + data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; + } + if (sub_data.max_lvl != WDR.MaxLevel) { + data += " Max Lvl: `" + sub_data.max_lvl + "`\n"; + } + if (sub_data.gender != 0) { + let gender = await WDR.Get_Gender(sub_data.gender); + data += " Gender: `" + gender + "`\n"; + } + if (sub_data.size != 0 && sub_data.size != "all") { + data += " Size: `" + sub_data.size + "`\n"; + } + if (!data) { + data = " `All" + "`\n";; + } + sub_list += data + "\n"; + } + sub_list = sub_list.slice(0, -1); + + let number = await Functions.DetailCollect(WDR, Functions, "Remove", Member, Message, subscriptions, "Type the corressponding # of the subscription you would like to remove -OR- type \'all\'", sub_list); + + let remove = subscriptions[number]; + + WDR.wdrDB.query( + `DELETE FROM + wdr_subscriptions + WHERE + user_id = ${Message.author.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pokemon' + AND pokemon_id = ${remove.pokemon_id} + AND form = ${remove.form} + AND min_lvl = ${remove.min_lvl} + AND max_lvl = ${remove.max_lvl} + AND min_iv = ${remove.min_iv} + AND max_iv = ${remove.max_iv} + AND size = ${remove.size} + AND gender = ${remove.gender} + AND generation = ${remove.generation}`, + async function(error, result) { + if (error) { + WDR.Console.error(WDR, "[commands/pokemon.js] Error Removing Subscription.", [remove, error]); + console.error(error); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle(WDR.Master.Pokemon[remove.pokemon_id].name + " Subscription Removed!") + .setDescription("Saved to the subscription Database.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + return Message.channel.send(subscription_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "remove", Message, BotMsg, Member); + }); + } + } + ); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/status.js b/src/commands/subscription/pokemon/status.js new file mode 100644 index 0000000..1749d1c --- /dev/null +++ b/src/commands/subscription/pokemon/status.js @@ -0,0 +1,86 @@ +module.exports = (WDR, Functions, Message, Member, reason) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_users + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id}`, + async function(error, user) { + if (Member.db.pokemon_status == 1 && reason == "resume") { + let already_active = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your Pokemon subscriptions are already **Active**!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(already_active).catch(console.error).then(msg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, nMessage, Member); + }); + } else if (Member.db.pokemon_status == 0 && reason == "pause") { + let already_paused = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your Pokemon subscriptions are already **Paused**!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(already_paused).catch(console.error).then(msg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, nMessage, Member); + }); + } else { + if (reason == "pause") { + change = 0; + } else if (reason == "resume") { + change = 1; + } + WDR.wdrDB.query( + `UPDATE + wdr_users + SET + pokemon_status = ${change} + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id}`, + async function(error, user, fields) { + if (error) { + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else { + WDR.wdrDB.query( + `UPDATE + wdr_subscriptions + SET + status = ${change} + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pokemon'`, + async function(error, user, fields) { + if (error) { + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else { + switch (change) { + case 0: + change = "DISABLED" + break; + case 1: + change = "ENABLED" + break; + } + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your Pokémon Subscriptions have been set to `" + change + "`!") + .setFooter("Saved to the subscription Database."); + return Message.channel.send(subscription_success).then(m => m.delete({ + timeout: 5000 + })); + } + } + ); + } + } + ); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/timed_out.js b/src/commands/subscription/pokemon/timed_out.js deleted file mode 100644 index 6024afe..0000000 --- a/src/commands/subscription/pokemon/timed_out.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = (WDR, Message, Member) => { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Subscription Has Timed Out.") - .setDescription("Nothing has been Saved.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_cancel).then(nMessage => { - return option_collector(WDR, "time", Message, nMessage, Member); - }); -} \ No newline at end of file diff --git a/src/commands/subscription/pokemon/view.js b/src/commands/subscription/pokemon/view.js index e69de29..58b51e3 100644 --- a/src/commands/subscription/pokemon/view.js +++ b/src/commands/subscription/pokemon/view.js @@ -0,0 +1,79 @@ +module.exports = (WDR, Functions, Message, Member) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_subscriptions + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pokemon'`, + async function(error, subscriptions) { + if (!subscriptions || subscriptions.length < 1) { + let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("You do not have any Pokémon Subscriptions!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, BotMsg, Member); + }); + } else { + + let sub_list = ""; + for (let s = 0, slen = subscriptions.length; s < slen; s++) { + let choice = s + 1; + let sub_data = subscriptions[s]; + sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; + sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; + sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; + let data = ""; + if (sub_data.form > 0) { + data += " Form: `" + WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; + } + if (sub_data.min_iv != 0) { + data += " Min IV: `" + sub_data.min_iv + "`\n"; + } + if (sub_data.max_iv != 100) { + data += " Max IV: `" + sub_data.max_iv + "`\n"; + } + if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { + data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; + } + if (sub_data.max_lvl != WDR.MaxLevel) { + data += " Max Lvl: `" + sub_data.max_lvl + "`\n"; + } + if (sub_data.gender != 0) { + let gender = await WDR.Get_Gender(sub_data.gender); + data += " Gender: `" + gender + "`\n"; + } + if (sub_data.size != 0) { + data += " Size: `" + sub_data.size + "`\n"; + } + if (sub_data.generation != 0) { + data += " Gen: `" + sub_data.generation + "`\n"; + } + if (sub_data.geofence == Message.Discord.name) { + data += " Geofence: `" + sub_data.geofence + "`\n"; + } + if (!data) { + data = " `All" + "`\n";; + } + sub_list += data + "\n"; + } + sub_list = sub_list.slice(0, -1); + + let o_status = Member.db.status ? "Enabled" : "Disabled"; + let p_status = Member.db.pokemon_status ? "Enabled" : "Disabled"; + let pokemonSubs = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your Pokémon Subscriptions") + .setDescription("Overall Status: `" + o_status + "`\n" + + "Pokemon Status: `" + p_status + "`\n\n" + sub_list) + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(pokemonSubs).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, BotMsg, Member); + }); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pvp.js b/src/commands/subscription/pvp.js deleted file mode 100644 index dd1a6ca..0000000 --- a/src/commands/subscription/pvp.js +++ /dev/null @@ -1,977 +0,0 @@ -const maximum_level = 35; - -module.exports = async (WDR, Message) => { - - // DECLARE VARIABLES FOR USER - let Member = ""; - if (Message.member) { - Member = Message.member; - } else { - Member = Message.author; - } - - Member.db = Message.member.db; - - if (!Member.nickname) { - Member.nickname = Message.author.username; - } else { - Member.nickname = Message.author.username; - } - - let request_action = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle("What would you like to do with your PvP Subscriptions?") - .setDescription("`presets` » View quick preset subscriptions." + "\n" + - "`view` » View your Subscriptions." + "\n" + - "`add` » Create a Simple Subscription." + "\n" + - "`remove` » Remove a pokemon Subscription." + "\n" + - "`edit` » Edit a Subscription." + "\n" + - "`pause` or `resume` » Pause/Resume PvP subscriptions Only.") - .setFooter("Type the action, no command prefix required."); - Message.channel.send(request_action).catch(console.error).then(BotMsg => { - return option_collector(WDR, "start", Message, BotMsg, Member); - }); -} - -async function subscription_preset(WDR, Message, Member) { - let presets = ""; - let preset_names = WDR.Presets.PvP.map(p => p.name); - for (let p = 0, plen = preset_names.length; p < plen; p++) { - let ps = WDR.Presets.PvP[p]; - presets += (p + 1) + " - " + preset_names[p] + "\n"; - } - presets = presets.slice(0, -1); - - let preset = await detail_collector(WDR, "Preset", Member, Message, presets, "Respond with the # of a preset.", null); - let preset_name = preset_names[(preset - 1)]; - preset = WDR.Presets.PvP.get(preset_name); - - preset.geofence = await detail_collector(WDR, "Geofence", Member, Message, undefined, "Please respond with \"Yes\", \"No\" or \"Areas Names\"", preset); - - preset.confirm = await detail_collector(WDR, "Confirm-Add", Member, Message, undefined, "Type \"Yes\" or \"No\". Subscription will be saved.", preset); - - WDR.wdrDB.query( - `INSERT INTO - wdr_subscriptions ( - user_id, - user_name, - guild_id, - guild_name, - bot, - status, - geofence, - coords, - sub_type, - pokemon_id, - form, - min_lvl, - league, - min_rank, - min_cp - ) - VALUES - ( - ${Member.id}, - ${Member.nickname}, - ${Message.guild.id}, - ${Member.db.guild_name}, - ${Member.db.bot}, - ${Member.db.pvp_status}, - ${preset.geofence}, - ${Member.db.coords}, - 'pvp', - ${preset.pokemon_id}, - ${preset.form}, - ${preset.min_lvl}, - ${preset.league}, - ${preset.min_rank}, - ${preset.min_cp}, - ${preset.max_cp} - )`, - async function(error, result) { - if (error) { - if (error.indexOf("Duplicate entry") >= 0) { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Existing Subscription Found!") - .setDescription("Nothing has been saved.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } else { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Inserting Subscription.", preset); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(preset.name + " PvP Subscription Complete!") - .setDescription("Saved to the Subscription Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } - } - ); -} - -function subscription_status(WDR, Message, Member, reason) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_users - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id}`, - async function(error, user) { - if (Member.db.pvp_status == 1 && reason == "resume") { - let already_active = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your PvP subscriptions are already **Active**!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(already_active).catch(console.error).then(msg => { - return option_collector(WDR, "view", Message, nMessage, Member); - }); - } else if (Member.db.pvp_status == 0 && reason == "pause") { - let already_paused = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your PvP subscriptions are already **Paused**!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(already_paused).catch(console.error).then(msg => { - return option_collector(WDR, "view", Message, nMessage, Member); - }); - } else { - if (reason == "pause") { - change = 0; - } else if (reason == "resume") { - change = 1; - } - WDR.wdrDB.query( - `UPDATE - wdr_users - SET - pvp_status = ${change} - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id}`, - async function(error, user, fields) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Inserting Subscription.", preset); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - WDR.wdrDB.query( - `UPDATE - wdr_subscriptions - SET - status = ${change} - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pvp'`, - async function(error, user, fields) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Inserting Subscription.", preset); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Pokémon Subscriptions have been set to `" + change + "`!") - .setFooter("Saved to the subscription Database."); - return Message.channel.send(subscription_success).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - ); - } - } - ); - } - } - ); -} - - -function subscription_view(WDR, Message, Member) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_subscriptions - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pvp'`, - async function(error, subscriptions) { - if (!subscriptions || subscriptions.length < 1) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You do not have any Pokémon Subscriptions!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } else { - - let sub_list = ""; - for (let s = 0, slen = subscriptions.length; s < slen; s++) { - let choice = s + 1; - let sub_data = subscriptions[s]; - sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; - sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; - sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; - let data = ""; - if (sub_data.league != "all") { - data += " League: `" + sub_data.league + "`\n"; - } - if (sub_data.form != 0) { - data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; - } - data += " Min Rank: `" + sub_data.min_rank + "`\n"; - if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { - data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; - } - if (sub_data.min_cp != 0) { - data += " Min CP: `" + sub_data.min_cp + "`\n"; - } - if (sub_data.max_cp != 10000) { - data += " Max CP: `" + sub_data.max_cp + "`\n"; - } - sub_list += data + "\n"; - } - sub_list = sub_list.slice(0, -1); - - let o_status = Member.db.status ? "Enabled" : "Disabled"; - let p_status = Member.db.pvp_status ? "Enabled" : "Disabled"; - let pokemonSubs = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your PvP Subscriptions") - .setDescription("Overall Status: `" + o_status + "`\n" + - "PvP Status: `" + p_status + "`\n\n" + sub_list) - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(pokemonSubs).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } - } - ); -} - - - -// SUBSCRIPTION CREATE FUNCTION -async function subscription_create(WDR, message, nickname, prefix, advanced) { - - let create = {}; - - create.name = await detail_collector(WDR, "Name", nickname, message, undefined, "Respond with \"All\" or the Pokémon name. Names are not case-sensitive.", sub); - - create.league = await detail_collector(WDR, "League", nickname, message, create.name, "Please respond with \"Great\", \"Ultra\", or \"All\".", sub); - create.league = create.league.toLowerCase(); - - create.min_rank = await detail_collector(WDR, "Minimum Rank", nickname, message, create.name, "Please respond with a value between 0 and 4096 -OR- type \"All\". Type \"Cancel\" to Stop.", sub); - - create.min_lvl = await detail_collector(WDR, "Minimum CP", nickname, message, create.name, "Please respond with a number greater than 0 or \"All\". Type \"Cancel\" to Stop.", sub); - - if (create.min_lvl != 0 && create.min_lvl != 1) { - create.min_cp = await detail_collector(WDR, "Minimum CP", nickname, message, create.name, "Please respond with a number greater than 0 or \"All\". Type \"Cancel\" to Stop.", sub); - } else { - create.min_cp = 0; - } - - create.areas = await detail_collector(WDR, "Geofence", nickname, message, create.name, "Please respond with \"Yes\", \"No\" or \"Areas Names\"", undefined); - - let confirm = await detail_collector(WDR, "Confirm-Add", nickname, message, create.name, "Type \"Yes\" or \"No\". Subscription will be saved.", sub); - - WDR.wdrDB.query( - `INSERT INTO - wdr_subscriptions ( - user_id, - user_name, - guild_id, - guild_name, - bot, - status, - geofence, - coords, - sub_type, - pokemon_id, - form, - min_lvl, - league, - min_rank, - min_cp - ) - VALUES - ( - ${Member.id}, - ${Member.nickname}, - ${Message.guild.id}, - ${Member.db.guild_name}, - ${Member.db.bot}, - ${Member.db.pvp_status}, - ${create.geofence}, - ${Member.db.coords}, - 'pvp', - ${create.id}, - ${create.form}, - ${create.min_lvl}, - ${create.league}, - ${create.min_rank}, - ${create.min_cp} - )`, - async function(error, result) { - if (error) { - if (error.indexOf("Duplicate entry") >= 0) { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Existing Subscription Found!") - .setDescription("Nothing has been saved.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } else { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Inserting Subscription.", preset); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle(create.name + " PvP Subscription Complete!") - .setDescription("Saved to the Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(msg => { - return option_collector(WDR, "create", message, msg, nickname, prefix); - }); - } - } - ); -} - - - -async function subscription_remove(WDR, Message, Member) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_subscriptions - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon'`, - async function(error, subscriptions, fields) { - if (!subscriptions || !subscriptions[0]) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You do not have any PvP Subscriptions!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } else { - - let sub_list = ""; - for (let s = 0, slen = subscriptions.length; s < slen; s++) { - let choice = s + 1; - let sub_data = subscriptions[s]; - sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; - sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; - sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; - let data = ""; - if (sub_data.league != "all") { - data += " League: `" + sub_data.league + "`\n"; - } - if (sub_data.form != 0) { - data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; - } - data += " Min Rank: `" + sub_data.min_rank + "`\n"; - if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { - data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; - } - if (sub_data.min_cp != 0) { - data += " Min CP: `" + sub_data.min_cp + "`\n"; - } - if (sub_data.max_cp != 10000) { - data += " Max CP: `" + sub_data.max_cp + "`\n"; - } - sub_list += data + "\n"; - } - sub_list = sub_list.slice(0, -1); - - let number = await detail_collector(WDR, "Remove", Member, Message, subscriptions, "Type the corressponding # of the subscription you would like to remove -OR- type \"all\"", sub_list); - - let remove = subscriptions[number]; - - WDR.wdrDB.query( - `DELETE FROM - wdr_subscriptions - WHERE - user_id = ${Message.author.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon' - AND pokemon_id = ${remove.pokemon_id} - AND form = ${remove.form} - AND min_rank = ${remove.min_rank} - AND min_lvl = ${remove.min_lvl} - AND league = ${remove.league} - AND min_cp = ${remove.min_cp} - AND max_cp = ${remove.max_cp}`, - async function(error, result) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Removing Subscription.", remove); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(WDR.Master.Pokemon[remove.pokemon_id].name + " PvP Subscription Removed!") - .setDescription("Saved to the subscription Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - return Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "remove", Message, BotMsg, Member); - }); - } - } - ); - } - } - ); -} - -// SUBSCRIPTION MODIFY FUNCTION -async function subscription_modify(WDR, Message, Member) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_subscriptions - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'pokemon'`, - async function(error, subscriptions, fields) { - if (!subscriptions || !subscriptions[0]) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You do not have any PvP Subscriptions!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } - - let sub_list = ""; - for (let s = 0, slen = subscriptions.length; s < slen; s++) { - let choice = s + 1; - let sub_data = subscriptions[s]; - sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; - sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; - sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; - let data = ""; - if (sub_data.league != "all") { - data += " League: `" + sub_data.league + "`\n"; - } - if (sub_data.form != 0) { - data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; - } - data += " Min Rank: `" + sub_data.min_rank + "`\n"; - if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { - data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; - } - if (sub_data.min_cp != 0) { - data += " Min CP: `" + sub_data.min_cp + "`\n"; - } - if (sub_data.max_cp != 10000) { - data += " Max CP: `" + sub_data.max_cp + "`\n"; - } - sub_list += data + "\n"; - } - sub_list = sub_list.slice(0, -1); - - let number = await detail_collector(WDR, "Remove", Member, Message, subscriptions, "Type the corressponding # of the subscription you would like to remove -OR- type \"all\"", sub_list); - - let old = subscriptions[number]; - - let modified = subscriptions[number]; - - old.name = WDR.Master.Pokemon[old.pokemon_id] ? WDR.Master.Pokemon[old.pokemon_id].name : "All Pokémon"; - if (WDR.Master.Pokemon[old.pokemon_id]) { - old.form_name = WDR.Master.Pokemon[old.pokemon_id].forms[old.form] ? WDR.Master.Pokemon[old.pokemon_id].forms[old.form].form : "All"; - } else { - old.form_name = "All"; - } - - // RETRIEVE POKEMON NAME FROM USER - modified.pokemon = await detail_collector(WDR, "Name", nickname, message, old.name, "Respond with \"All\" or the Pokémon name. Names are not case-sensitive.", modified); - modified.name = modified.pokemon.name ? modified.pokemon.name : modified.pokemon; - modified.id = modified.pokemon.id ? modified.pokemon.id : modified.pokemon; - - modified.form = await detail_collector(WDR, "Form", Member, Message, old.form, "Please respond with \"Next\", a Form Name of the specified Pokemon, -OR- type \"All\". Type \"Cancel\" to Stop.", old); - - modified.league = await detail_collector(WDR, "League", nickname, message, old.league, "Please respond with \"Great\", or \"Ultra\".", sub); - modified.league = modified.league.toLowerCase(); - - modified.min_rank = await detail_collector(WDR, "Rank", nickname, message, old.min_rank, "Please respond with a value between 0 and 4096 -OR- type \"All\". Type \"Cancel\" to Stop.", sub); - - modified.min_lvl = await detail_collector(WDR, "Level", nickname, message, olc.min_lvl, "Please respond with a number greater than 0 or \"All\". Type \"Cancel\" to Stop.", sub); - - if (modified.min_lvl != 0 && modified.min_lvl != 1) { - modified.min_cp = await detail_collector(WDR, "CP", nickname, message, old.min_cp, "Please respond with a number greater than 0 or \"All\". Type \"Cancel\" to Stop.", sub); - } else { - modified.min_cp = 0; - } - - modified.areas = await detail_collector(WDR, "Geofence", nickname, message, old.geofence, "Please respond with \"Yes\", \"No\" or \"Areas Names\"", undefined); - - modified.confirm = await detail_collector(WDR, "Confirm-Add", nickname, message, null, "Type \"Yes\" or \"No\". Subscription will be saved.", sub); - - WDR.wdrDB.query( - `UPDATE - wdr_subscriptions - SET - pokemon_id = ${modified.id}, - form = ${modified.form}, - min_lvl = ${modified.min_lvl}, - max_lvl = ${modified.max_lvl}, - min_iv = ${modified.min_iv}, - max_iv = ${modified.max_iv}, - size = ${modified.size}, - gender = ${modified.gender}, - generation = ${modified.gen} - WHERE - user_id = ${Message.author.id} - AND guild_id = ${Message.guild.id} - AND geofence = ${modified.geofence} - AND sub_type = 'pokemon' - AND pokemon_id = ${old.pokemon_id} - AND form = ${old.form} - AND min_lvl = ${old.min_lvl} - AND max_lvl = ${old.max_lvl} - AND min_iv = ${old.min_iv} - AND max_iv = ${old.max_iv} - AND size = ${old.size} - AND gender = ${old.gender} - AND generation = ${old.generation}`, - async function(error, existing) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - let modification_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(modified.name + " Subscription Modified!") - .setDescription("Saved to the subscription Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - return Message.channel.send(modification_success).then(BotMsg => { - return option_collector(WDR, "modify", Message, BotMsg, Member); - }); - } - } - ); - } - ); -} - -// SUB COLLECTOR FUNCTION -function detail_collector(WDR, type, nickname, message, pokemon, requirements, sub) { - return new Promise(function(resolve, reject) { - - // DELCARE VARIABLES - let timeout = true, - instruction = ""; - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMember.id == Member.id; - const collector = Message.channel.createMessageCollector(filter, { - time: 60000 - }); - - switch (type) { - - // POKEMON NAME EMBED - case "Name": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle("What Pokémon would you like to Subscribe to?") - .setFooter(requirements); - break; - - // CONFIRMATION EMBED - case "Confirm-Add": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle("Does all of this look correct?\nName: `" + sub.name + "`\nMin CP: `" + sub.min_cp + "`\nMax CP: `" + sub.max_cp + "`\nMin Rank: `" + sub.min_rank + "`\nMax Rank: `" + sub.max_rank + "`\nMin Lvl: `" + sub.min_percent + "`\nMax Lvl: `" + sub.max_percent + "`\nLeague: `" + sub.league + "`\nFilter By Areas: `" + sub.areas + "`") - .setFooter(requirements); - break; - - case "Confirm-Remove": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle("Are you sure you want to Remove ALL of your subscriptions?") - .setDescription("If you wanted to remove an `ALL` pokemon filter, you need to specify the number associated with it. \`ALL-1\`, \`ALL-2\`, etc") - .setFooter(requirements); - break; - - // REMOVAL EMBED - case "Remove": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle("What Pokémon do you want to remove?") - .setFooter(requirements); - break; - - // MODIFY EMBED - case "Modify": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle("What Pokémon do you want to modify?") - .setFooter(requirements); - break; - - // AREA EMBED - case "Geofence": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle("Do you want to get notifications for " + pokemon + " filtered by your subscribed Areas?") - .setDescription("If you choose **Yes**, your notifications for this Pokémon will be filtered based on your areas.\n" + - "If you choose **No**, you will get notifications for this pokemon in ALL areas for the city.") - .setFooter(requirements); - break; - - - // DEFAULT EMBED - default: - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Message.author.displayAvatarURL) - .setTitle("What **" + type + "** would like you like to set for **" + pokemon + "** Notifications?") - .setFooter(requirements); - } - - Message.channel.send(instruction).catch(console.error).then(msg => { - - // DEFINED VARIABLES - let input = ""; - - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (true) { - - // CANCEL SUB - case Message.content.toLowerCase() == "stop": - case Message.content.toLowerCase() == "cancel": - collector.stop("cancel"); - break; - - // GET CONFIRMATION - case type.indexOf("Confirm-Add") >= 0: - case type.indexOf("Confirm-Remove") >= 0: - switch (Message.content.toLowerCase()) { - case "save": - case "yes": - collector.stop("Yes"); - break; - case "no": - case "cancel": - collector.stop("Cancel"); - break; - default: - Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // GET AREA CONFIRMATION - case type.indexOf("Geofence") >= 0: - switch (Message.content.toLowerCase()) { - case "yes": - collector.stop("Yes"); - break; - case "all": - case "no": - collector.stop("No"); - break; - default: - let areas = Message.content.split(","), - area_array = []; - let areas_confirmed = ""; - let geofences = WDR.Geofences.get(discord.geojson_file); - geofences.features.forEach((geofence, index) => { - area_array.push(geofence.properties.name); - }); - areas.forEach((area, index) => { - for (let i = 0; i < area_array.length + 1; i++) { - if (i == area_array.length) { - Message.reply("`" + area + "` doesn\"t appear to be a valid Area. Please check the spelling and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - } else if (area.toLowerCase() == area_array[i].toLowerCase()) { - areas_confirmed += area_array[i] + ","; - break; - } - } - }); - areas_confirmed = areas_confirmed.slice(0, -1); - if (areas_confirmed.split(",").length == areas.length) { - collector.stop(areas_confirmed); - } - } - break; - - - // POKEMON NAME - case type.indexOf("Name") >= 0: - case type.indexOf("Modify") >= 0: - case type.indexOf("Remove") >= 0: - switch (Message.content.toLowerCase()) { - case "all": - collector.stop("All"); - break; - case "all-1": - collector.stop("All-1"); - break; - case "all-2": - collector.stop("All-2"); - break; - case "all-3": - collector.stop("All-3"); - break; - case "all-4": - collector.stop("All-4"); - break; - case "all-5": - collector.stop("All-5"); - break; - default: - for (let p = 1; p <= 650; p++) { - if (p == 650) { - Message.reply("`" + Message.content + "` doesn\"t appear to be a valid Pokémon name. Please check the spelling and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else if (Message.content.toLowerCase().startsWith(WDR.Master.Pokemon[p].name.toLowerCase())) { - let number = Message.content.toLowerCase().split(WDR.Master.Pokemon[p].name.toLowerCase()); - if (number[1]) { - return collector.stop(WDR.Master.Pokemon[p].name + number[1]); - } else { - return collector.stop(WDR.Master.Pokemon[p].name); - } - } - } - } - break; - - // CP CONFIGURATION - case type.indexOf("CP") >= 0: - if (parseInt(Message.content) > 0) { - collector.stop(Message.content); - } else if (Message.content.toLowerCase() == "all") { - collector.stop("ALL"); - } else { - Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // MIN/MAX CONFIGURATION - case type.indexOf("Rank") >= 0: - if (parseInt(Message.content) >= 0 && parseInt(Message.content) <= 4096) { - collector.stop(Message.content); - } else if (Message.content.toLowerCase() == "all") { - collector.stop("ALL"); - } else { - Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // MIN/MAX PERCENT CONFIGURATION - case type.indexOf("Percent") >= 0: - if (parseInt(Message.content) >= 0 && parseInt(Message.content) <= 100) { - collector.stop(Message.content); - } else if (Message.content.toLowerCase() == "all") { - collector.stop("ALL"); - } else { - Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // LEAGUE CONFIGURATION - case type.indexOf("League") >= 0: - if (Message.content.toLowerCase() == "great") { - collector.stop("great"); - } else if (Message.content.toLowerCase() == "ultra") { - collector.stop("ultra"); - } else if (Message.content.toLowerCase() == "other") { - collector.stop("all"); - } else { - Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - } - }); - - collector.on("end", (collected, reason) => { - if (msg) { - msg.delete(); - } - switch (true) { - case "cancel": - return subscription_cancel(WDR, Message, Member); - case "time": - return subscription_timedout(WDR, Message, Member); - default: - return resolve(reason); - } - }); - }); - - // END - return; - }); -} - -//############################################################################## - -function subscription_cancel(WDR, Message, Member) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Subscription Cancelled.") - .setDescription("Nothing has been Saved.") - return Message.channel.send(subscription_cancel).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); -} - -//############################################################################## - -function subscription_timedout(WDR, Message, Member) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Subscription Has Timed Out.") - .setDescription("Nothing has been Saved.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - return Message.channel.send(subscription_cancel).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); -} - -function option_collector(WDR, source, oMessage, bMessage, Member) { - - var BotMsg = bMessage; - let OriginalMsg = oMessage; - - const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; - const collector = OriginalMsg.channel.createMessageCollector(filter, { - time: 60000 - }); - - collector.on("collect", CollectedMsg => { - if (CollectedMsg) { - CollectedMsg.delete(); - } - let input = CollectedMsg.content.split(" ")[0].toString().toLowerCase(); - if (CollectedMsg.content.split(" ")[1] == "advanced" || CollectedMsg.content.split(" ")[1] == "adv") { - input += " adv"; - } - switch (input) { - case "ad": - case "add": - collector.stop("add"); - break; - case "preset": - case "presets": - collector.stop("preset"); - break; - case "remove": - collector.stop("remove"); - break; - case "change": - case "modify": - case "edit": - case "eidt": - collector.stop("edit"); - break; - case "view": - case "veiw": - collector.stop("view"); - break; - case "puase": - case "pasue": - case "pasue": - case "psaue": - case "paus": - case "pause": - collector.stop("pause"); - break; - case "resum": - case "rseume": - case "reusme": - case "resuem": - case "resume": - collector.stop("resume"); - break; - default: - collector.stop("cancel"); - } - }); - - collector.on("end", (collected, reason) => { - if (BotMsg) { - BotMsg.delete(); - } - switch (reason) { - case "cancel": - return subscription_cancel(WDR, OriginalMsg, Member); - case "advanced": - return subscription_create(WDR, OriginalMsg, Member, true); - case "add": - return subscription_create(WDR, OriginalMsg, Member, false); - case "preset": - return subscription_preset(WDR, OriginalMsg, Member, false); - case "remove": - return subscription_remove(WDR, OriginalMsg, Member); - case "edit": - return subscription_modify(WDR, OriginalMsg, Member); - case "view": - return subscription_view(WDR, OriginalMsg, Member); - case "resume": - case "pause": - return subscription_status(WDR, OriginalMsg, Member, reason); - case "time": - return subscription_timedout(WDR, OriginalMsg, Member); - default: - return; - } - }); - - // END - return; -} \ No newline at end of file diff --git a/src/commands/subscription/pvp/begin.js b/src/commands/subscription/pvp/begin.js new file mode 100644 index 0000000..aa305e8 --- /dev/null +++ b/src/commands/subscription/pvp/begin.js @@ -0,0 +1,40 @@ +var Functions = { + Cancel: require(__dirname + "/../cancel.js"), + Create: require(__dirname + "/create.js"), + DetailCollect: require(__dirname + "/collect_detail.js"), + Modify: require(__dirname + "/modify.js"), + OptionCollect: require(__dirname + "/collect_option.js"), + Preset: require(__dirname + "/preset.js"), + Remove: require(__dirname + "/remove.js"), + Status: require(__dirname + "/status.js"), + TimedOut: require(__dirname + "/../timedout.js"), + View: require(__dirname + "/view.js"), + Dir: __filename.split("/").slice(__dirname.split("/").length - 4).join("/") +} + +module.exports = async (WDR, Message) => { + + var Member = Message.member ? Message.member : Message.author; + + if (Message.member.db.length > 1) { + let choice = await Functions.DetailCollect(WDR, Functions, "Guild", Member, Message, Message.member.user_guilds, "Respond with the # of a Discord.", null); + Member.db = Message.member.db[choice]; + } else { + Member.db = Message.member.db; + } + + let request_action = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What would you like to do with your PvP Subscriptions?") + .setDescription("`presets` » View quick preset subscriptions." + "\n" + + "`view` » View your Subscriptions." + "\n" + + "`add` » Create a Simple Subscription." + "\n" + + "`remove` » Remove a pokemon Subscription." + "\n" + + "`edit` » Edit a Subscription." + "\n" + + "`pause` or `resume` » Pause/Resume PvP subscriptions Only.") + .setFooter("Type the action, no command prefix required."); + + Message.channel.send(request_action).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "start", Message, BotMsg, Member); + }); +} \ No newline at end of file diff --git a/src/commands/subscription/pvp/collect_detail.js b/src/commands/subscription/pvp/collect_detail.js new file mode 100644 index 0000000..0d8328a --- /dev/null +++ b/src/commands/subscription/pvp/collect_detail.js @@ -0,0 +1,394 @@ +module.exports = (WDR, Functions, type, Member, Message, object, requirements, sub) => { + return new Promise(async resolve => { + + // DELCARE VARIABLES + let timeout = true, + instruction = ""; + + const filter = cMessage => cMessage.author.id == Message.author.id; + const collector = Message.channel.createMessageCollector(filter, { + time: 60000 + }); + + switch (type) { + + case "Guild": + let list = ""; + object.forEach((guild, i) => { + list += (i + 1) + " - " + guild.name + "\n"; + }); + list = list.slice(0, -1); + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Choose a Discord:") + .setDescription(list) + .setFooter(requirements); + break; + + case "Preset": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Choose a Preset Subscription:") + .setDescription(object) + .setFooter(requirements); + break; + + // POKEMON NAME EMBED + case "Name": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What Pokémon would you like to Subscribe to?") + .setFooter(requirements); + break; + + // CONFIRMATION EMBED + case "Confirm-Add": + + let form = ""; + switch (sub.form) { + case 0: + form = "All"; + break; + default: + form = WDR.Master.Pokemon[sub.id].forms[sub.form]; + } + + let type = ""; + switch (sub.type) { + case 0: + type = "All"; + default: + type = sub.type; + } + + let league = ""; + switch (sub.league) { + case 0: + league = "All"; + default: + league = sub.league; + } + + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Does all of this look correct?") + .setDescription("Name: `" + sub.name + "`\n" + + "League: `" + league + "`\n" + + "Type: `" + type + "`\n" + + "Form: `" + form + "`\n" + + "Min Rank: `" + sub.min_rank + "`\n" + + "Min Lvl: `" + sub.min_lvl + "`\n" + + "Generation: `" + sub.gen + "`\n" + + "Filter By Areas: `" + sub.geofence + "`") + .setFooter(requirements); + break; + + case "Confirm-Remove": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Are you sure you want to Remove ALL of your subscriptions?") + .setDescription("If you wanted to remove an `ALL` pokemon filter, you need to specify the number associated with it. \`ALL-1\`, \`ALL-2\`, etc") + .setFooter(requirements); + break; + + // REMOVAL EMBED + case "Remove": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What Pokémon do you want to remove?") + .setFooter(requirements); + break; + + // MODIFY EMBED + case "Modify": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What Pokémon do you want to modify?") + .setFooter(requirements); + break; + + // AREA EMBED + case "Geofence": + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Do you want to get notifications for " + sub.name + " filtered by your subscribed Areas?") + .setDescription("If you choose **Yes**, your notifications for this Pokémon will be filtered based on your areas.\n" + + "If you choose **No**, you will get notifications for this pokemon in ALL areas for the city.") + .setFooter(requirements); + break; + + + // DEFAULT EMBED + default: + instruction = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("What **" + type + "** would like you like to set for **" + pokemon + "** Notifications?") + .setFooter(requirements); + } + + Message.channel.send(instruction).then(msg => { + + let input = ""; + + // FILTER COLLECT EVENT + collector.on("collect", async CollectedMsg => { + + switch (true) { + + // CANCEL SUB + case CollectedMsg.content.toLowerCase() == "stop": + case CollectedMsg.content.toLowerCase() == "cancel": + collector.stop("cancel"); + break; + + case type.indexOf("Confirm-Add") >= 0: + case type.indexOf("Confirm-Remove") >= 0: + switch (CollectedMsg.content.toLowerCase()) { + case "save": + case "yes": + collector.stop("Yes"); + break; + case "no": + case "cancel": + collector.stop("Cancel"); + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Geofence") >= 0: + switch (CollectedMsg.content.toLowerCase()) { + case "yes": + collector.stop(Member.db.geofence); + break; + case "all": + case "no": + collector.stop(Message.Discord.name); + break; + case "distance": + if (!Member.db.coords) { + CollectedMsg.reply("**WARNING:** You have not set Coordinates for Distance-based Notifications. You will not receive Notifications for this Sub until you set distance coordinates with the `area` command.").then(m => m.delete({ + timeout: 11000 + })); + setTimeout(function() { + collector.stop(Member.db.coords); + }, 11000); + } else { + collector.stop(Member.db.coords); + } + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Guild") >= 0: + case type.indexOf("Preset") >= 0: + case type.indexOf("Modify") >= 0: + case type.indexOf("Remove") >= 0: + let num = parseInt(CollectedMsg.content); + switch (true) { + case (isNaN(CollectedMsg.content)): + return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a Number. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + case (num > 0 && num <= object.length): + return collector.stop((num - 1)); + default: + return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a valid # selection. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Name") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + let old_data = await WDR.Pokemon_ID_Search(WDR, object.pokemon_id); + collector.stop(old_data); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + default: + let valid = await WDR.Pokemon_ID_Search(WDR, CollectedMsg.content.split(" ")[0]); + if (valid) { + collector.stop(valid); + } else { + return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\'t appear to be a valid Pokémon name. Please check the spelling and try again.").then(m => m.delete({ + timeout: 5000 + })); + } + } + break; + + case type.indexOf("Type") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + let old_data = await WDR.Pokemon_ID_Search(WDR, object.pokemon_id); + collector.stop(object.pokemon_type); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + default: + let match; + WDR.Master.Pokemon_Types.forEach(type => { + if (type.toLowerCase() == CollectedMsg.content.toLowerCase()) { + match = type.toLowerCase(); + collector.stop(match); + } + }); + if (!match) { + return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\'t appear to be a valid type. Please check the spelling and try again.").then(m => m.delete({ + timeout: 5000 + })); + } + } + break; + + case type.indexOf("Form") >= 0: + let user_form = await WDR.Capitalize(CollectedMsg.content); + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object.form); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + case (object.forms.indexOf(user_form) >= 0): + collector.stop(object.form_ids[object.forms.indexOf(user_form)]); + break; + default: + return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\'t appear to be a valid form for `" + object.name + "`. Please check the spelling and try again.").then(m => m.delete({ + timeout: 5000 + })); + } + break; + + // case type.indexOf("CP") >= 0: + // if (parseInt(Message.content) > 0) { + // collector.stop(Message.content); + // } else if (Message.content.toLowerCase() == "all") { + // collector.stop("ALL"); + // } else { + // Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + // timeout: 5000 + // })); + // } + // break; + + case type.indexOf("Rank") >= 0: + if (Message.content.toLowerCase() == "all") { + collector.stop(20); + } else if (parseInt(Message.content) >= 0 && parseInt(Message.content) <= 20) { + collector.stop(Message.content); + } else if (parseInt(Message.content) > 20) { + Message.reply("The Lowest Rank you can sub to is 20." + requirements).then(m => m.delete({ + timeout: 5000 + })); + } else { + Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Generation") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object.generation); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + collector.stop(0); + break; + case (!isNaN(CollectedMsg.content) && CollectedMsg.content > 0): + collector.stop(parseInt(CollectedMsg.content)); + break; + default: + return CollectedMsg.reply("`" + CollectedMsg.content + "` doesn\'t appear to be a valid Generation number.").then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("Level") >= 0: + switch (true) { + case (CollectedMsg.content.toLowerCase() == "same"): + case (CollectedMsg.content.toLowerCase() == "keep"): + case (CollectedMsg.content.toLowerCase() == "next"): + collector.stop(object); + break; + case (parseInt(CollectedMsg.content) >= 0 && parseInt(CollectedMsg.content) <= WDR.MaxLevel): + collector.stop(parseInt(CollectedMsg.content)); + break; + case (CollectedMsg.content.toLowerCase() == "all"): + if (type.indexOf("Minimum") >= 0) { + collector.stop(0); + } else { + collector.stop(WDR.MaxLevel); + } + break; + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + case type.indexOf("League") >= 0: + if (Message.content.toLowerCase() == "great") { + collector.stop("great"); + } else if (Message.content.toLowerCase() == "ultra") { + collector.stop("ultra"); + } else if (Message.content.toLowerCase() == "other") { + collector.stop("all"); + } else { + Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + break; + + default: + CollectedMsg.reply("`" + CollectedMsg.content + "` is an Invalid Input. Type cancel to quit. this subscription." + requirements).then(m => m.delete({ + timeout: 5000 + })); + } + }); + + collector.on("end", (collected, reason) => { + if (reason == null) { + return; + } + if (msg && msg.channel.type != "dm") { + msg.delete(); + } + switch (reason) { + case "cancel": + return Functions.Cancel(WDR, Functions, Message, Member); + case "time": + return Functions.TimedOut(WDR, Functions, Message, Member); + default: + return resolve(reason); + } + }); + }); + + // END + return; + }); +} \ No newline at end of file diff --git a/src/commands/subscription/pvp/collect_option.js b/src/commands/subscription/pvp/collect_option.js new file mode 100644 index 0000000..4728afa --- /dev/null +++ b/src/commands/subscription/pvp/collect_option.js @@ -0,0 +1,85 @@ +module.exports = (WDR, Functions, source, oMessage, bMessage, Member) => { + + var BotMsg = bMessage; + let OriginalMsg = oMessage; + + const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; + const collector = OriginalMsg.channel.createMessageCollector(filter, { + time: 60000 + }); + + collector.on("collect", CollectedMsg => { + + if (CollectedMsg) { + CollectedMsg.delete(); + } + + let input = CollectedMsg.content.split(" ")[0].toString().toLowerCase(); + + let add_words = ["ad", "add"], + preset_words = ["preset", "presets"], + remove_words = ["remove", "rm"], + modify_words = ["change", "modify", "edit", "eidt"], + view_words = ["view", "vw", "veiw", "viw", "vew"], + pause_words = ["puase", "pasue", "pasue", "psaue", "paus", "pause"], + resume_words = ["resum", "rseume", "reusme", "resuem", "resume"]; + + switch (true) { + case add_words.some(word => input.includes(word)): + collector.stop("add"); + break; + case preset_words.some(word => input.includes(word)): + collector.stop("preset"); + break; + case remove_words.some(word => input.includes(word)): + collector.stop("remove"); + break; + case modify_words.some(word => input.includes(word)): + collector.stop("edit"); + break; + case view_words.some(word => input.includes(word)): + collector.stop("view"); + break; + case pause_words.some(word => input.includes(word)): + collector.stop("pause"); + break; + case resume_words.some(word => input.includes(word)): + collector.stop("resume"); + break; + default: + collector.stop("cancel"); + } + }); + + collector.on("end", (collected, arg) => { + if (BotMsg) { + BotMsg.delete(); + } + switch (arg) { + case "cancel": + return Functions.Cancel(WDR, Functions, OriginalMsg, Member); + case "advanced": + return Functions.Create(WDR, Functions, OriginalMsg, Member, true); + case "add": + return Functions.Create(WDR, Functions, OriginalMsg, Member, false); + case "preset": + return Functions.Preset(WDR, Functions, OriginalMsg, Member, false); + case "remove": + return Functions.Remove(WDR, Functions, OriginalMsg, Member); + case "edit": + return Functions.Modify(WDR, Functions, OriginalMsg, Member); + case "view": + return Functions.View(WDR, Functions, OriginalMsg, Member); + case "resume": + case "pause": + return Functions.Status(WDR, Functions, OriginalMsg, Member, arg); + case "time": + return Functions.TimedOut(WDR, Functions, OriginalMsg, Member); + default: + return; + } + }); + + // END + return; +} \ No newline at end of file diff --git a/src/commands/subscription/pvp/create.js b/src/commands/subscription/pvp/create.js new file mode 100644 index 0000000..5198ae8 --- /dev/null +++ b/src/commands/subscription/pvp/create.js @@ -0,0 +1,107 @@ +module.exports = async (WDR, Functions, Message, Member, advanced) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_subscriptions + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pvp'`, + async function(error, subs) { + if (error) { + WDR.Console.error(WDR, "[database.js] Error Fetching Subscriptions to Create Subscription.", [sub, error]); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else if (subs.length >= 25) { + let create = {}; + create.name = await Functions.DetailCollect(WDR, Functions, "Name", message, undefined, "Respond with \'All\' or the Pokémon name. Names are not case-sensitive.", sub); + create.name = create.pokemon.name ? create.pokemon.name : create.pokemon; + create.id = create.pokemon.id ? create.pokemon.id : create.pokemon; + if (create.id == 0) { + create.league = await Functions.DetailCollect(WDR, Functions, "League", message, create.name, "Please respond with \'Great\', \'Ultra\'.", sub); + create.league = create.league.toLowerCase(); + create.type = await Functions.DetailCollect(WDR, Functions, "Type", message, create.name, "Please respond with \'Great\', \'Ultra\'.", sub); + } else { + create.league = 0; + create.type = 0; + } + create.min_rank = await Functions.DetailCollect(WDR, Functions, "Minimum Rank", message, create.name, "Please respond with a value between 1 and 20. Type \'Cancel\' to Stop.", sub); + create.min_lvl = await Functions.DetailCollect(WDR, Functions, "Minimum CP", message, create.name, "Please respond with a number greater than 0 or \'All\'. Type \'Cancel\' to Stop.", sub); + // if (create.min_lvl != 0 && create.min_lvl != 1) { + // create.min_cp = await Functions.DetailCollect(WDR, Functions, "Minimum CP", message, create.name, "Please respond with a number greater than 0 or \'All\'. Type \'Cancel\' to Stop.", sub); + // } else { + // create.min_cp = 0; + // } + create.areas = await Functions.DetailCollect(WDR, Functions, "Geofence", message, create.name, "Please respond with \'Yes\', \'No\' or \'Areas Names\'", undefined); + let confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", message, create.name, "Type \'Yes\' or \'No\'. Subscription will be saved.", sub); + WDR.wdrDB.query( + `INSERT INTO + wdr_subscriptions ( + user_id, + user_name, + guild_id, + guild_name, + bot, + status, + geofence, + coords, + sub_type, + pokemon_id, + form, + min_lvl, + league, + min_rank + ) + VALUES + ( + ${Member.id}, + ${Member.db.user_name}, + ${Message.guild.id}, + ${Member.db.guild_name}, + ${Member.db.bot}, + ${Member.db.pvp_status}, + ${create.geofence}, + ${Member.db.coords}, + 'pvp', + ${create.id}, + ${create.type} + ${create.form}, + ${create.min_lvl}, + ${create.league}, + ${create.min_rank} + )`, + async function(error, result) { + if (error) { + if (error.toString().indexOf("Duplicate entry") >= 0) { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Existing Subscription Found!") + .setDescription("Nothing has been saved.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "create", Message, BotMsg, Member); + }); + } else { + WDR.Console.error(WDR, "[commands/pokemon.js] Error Inserting Subscription.", [preset, error]); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } + } else { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle(create.name + " PvP Subscription Complete!") + .setDescription("Saved to the Database.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(msg => { + return Functions.OptionCollect(WDR, Functions, "create", message, msg, prefix); + }); + } + } + ); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pvp/modify.js b/src/commands/subscription/pvp/modify.js new file mode 100644 index 0000000..87ba340 --- /dev/null +++ b/src/commands/subscription/pvp/modify.js @@ -0,0 +1,133 @@ +module.exports = (WDR, Functions, Message, Member) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_subscriptions + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pvp'`, + async function(error, subscriptions, fields) { + if (!subscriptions || !subscriptions[0]) { + let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("You do not have any PvP Subscriptions!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, BotMsg, Member); + }); + } + + let sub_list = ""; + for (let s = 0, slen = subscriptions.length; s < slen; s++) { + let choice = s + 1; + let sub_data = subscriptions[s]; + sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; + sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; + sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; + let data = ""; + if (sub_data.league != "all") { + data += " League: `" + sub_data.league + "`\n"; + } + if (sub_data.form != 0) { + data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; + } + data += " Min Rank: `" + sub_data.min_rank + "`\n"; + if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { + data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; + } + if (sub_data.min_cp != 0) { + data += " Min CP: `" + sub_data.min_cp + "`\n"; + } + if (sub_data.max_cp != 10000) { + data += " Max CP: `" + sub_data.max_cp + "`\n"; + } + sub_list += data + "\n"; + } + sub_list = sub_list.slice(0, -1); + + let number = await Functions.DetailCollect(WDR, Functions, "Remove", Member, Message, subscriptions, "Type the corressponding # of the subscription you would like to remove -OR- type \'all\'", sub_list); + + let old = subscriptions[number]; + + let modified = subscriptions[number]; + + old.name = WDR.Master.Pokemon[old.pokemon_id] ? WDR.Master.Pokemon[old.pokemon_id].name : "All Pokémon"; + if (WDR.Master.Pokemon[old.pokemon_id]) { + old.form_name = WDR.Master.Pokemon[old.pokemon_id].forms[old.form] ? WDR.Master.Pokemon[old.pokemon_id].forms[old.form].form : "All"; + } else { + old.form_name = "All"; + } + + // RETRIEVE POKEMON NAME FROM USER + modified.pokemon = await Functions.DetailCollect(WDR, Functions, "Name", message, old.name, "Respond with \'All\' or the Pokémon name. Names are not case-sensitive.", modified); + modified.name = modified.pokemon.name ? modified.pokemon.name : modified.pokemon; + modified.id = modified.pokemon.id ? modified.pokemon.id : modified.pokemon; + + modified.form = await Functions.DetailCollect(WDR, Functions, "Form", Member, Message, old.form, "Please respond with \'Next\', a Form Name of the specified Pokemon, -OR- type \'All\'. Type \'Cancel\' to Stop.", old); + + modified.league = await Functions.DetailCollect(WDR, Functions, "League", message, old.league, "Please respond with \'Great\', or \'Ultra\'.", sub); + modified.league = modified.league.toLowerCase(); + + modified.min_rank = await Functions.DetailCollect(WDR, Functions, "Rank", message, old.min_rank, "Please respond with a value between 0 and 4096 -OR- type \'All\'. Type \'Cancel\' to Stop.", sub); + + modified.min_lvl = await Functions.DetailCollect(WDR, Functions, "Level", message, olc.min_lvl, "Please respond with a number greater than 0 or \'All\'. Type \'Cancel\' to Stop.", sub); + + if (modified.min_lvl != 0 && modified.min_lvl != 1) { + modified.min_cp = await Functions.DetailCollect(WDR, Functions, "CP", message, old.min_cp, "Please respond with a number greater than 0 or \'All\'. Type \'Cancel\' to Stop.", sub); + } else { + modified.min_cp = 0; + } + + modified.areas = await Functions.DetailCollect(WDR, Functions, "Geofence", message, old.geofence, "Please respond with \'Yes\', \'No\' or \'Areas Names\'", undefined); + + modified.confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", message, null, "Type \'Yes\' or \'No\'. Subscription will be saved.", sub); + + WDR.wdrDB.query( + `UPDATE + wdr_subscriptions + SET + pokemon_id = ${modified.id}, + form = ${modified.form}, + min_lvl = ${modified.min_lvl}, + max_lvl = ${modified.max_lvl}, + min_iv = ${modified.min_iv}, + max_iv = ${modified.max_iv}, + size = ${modified.size}, + gender = ${modified.gender}, + generation = ${modified.gen} + WHERE + user_id = ${Message.author.id} + AND guild_id = ${Message.guild.id} + AND geofence = ${modified.geofence} + AND sub_type = 'pokemon' + AND pokemon_id = ${old.pokemon_id} + AND form = ${old.form} + AND min_lvl = ${old.min_lvl} + AND max_lvl = ${old.max_lvl} + AND min_iv = ${old.min_iv} + AND max_iv = ${old.max_iv} + AND size = ${old.size} + AND gender = ${old.gender} + AND generation = ${old.generation}`, + async function(error, existing) { + if (error) { + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else { + let modification_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle(modified.name + " Subscription Modified!") + .setDescription("Saved to the subscription Database.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + return Message.channel.send(modification_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "modify", Message, BotMsg, Member); + }); + } + } + ); + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pvp/preset.js b/src/commands/subscription/pvp/preset.js new file mode 100644 index 0000000..62eaca5 --- /dev/null +++ b/src/commands/subscription/pvp/preset.js @@ -0,0 +1,89 @@ +module.exports = async (WDR, Functions, Message, Member) => { + let presets = ""; + let preset_names = WDR.Presets.PvP.map(p => p.name); + for (let p = 0, plen = preset_names.length; p < plen; p++) { + let ps = WDR.Presets.PvP[p]; + presets += (p + 1) + " - " + preset_names[p] + "\n"; + } + presets = presets.slice(0, -1); + + let preset = await Functions.DetailCollect(WDR, Functions, "Preset", Member, Message, presets, "Respond with the # of a preset.", null); + let preset_name = preset_names[preset]; + preset = WDR.Presets.PvP.get(preset_name); + + preset.geofence = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, undefined, "Please respond with \'Yes\' or \'No\'.", preset); + + preset.confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", Member, Message, undefined, "Type \'Yes\' or \'No\'. Subscription will be saved.", preset); + + let query = ` + INSERT INTO + wdr_subscriptions ( + user_id, + user_name, + guild_id, + guild_name, + bot, + status, + geofence, + distance, + sub_type, + pokemon_id, + pokemon_type, + form, + min_lvl, + league, + min_rank + ) + VALUES + ( + ${Member.id}, + '${Member.db.user_name}', + ${Message.guild.id}, + '${Member.db.guild_name}', + ${Member.db.bot}, + ${Member.db.pvp_status}, + '${preset.geofence}', + '${Member.db.coords};${Member.db.distance}', + 'pvp', + ${preset.pokemon_id}, + '${preset.pokemon_type}', + ${preset.form}, + ${preset.min_lvl}, + '${preset.league}', + ${preset.min_rank} + );`; + WDR.wdrDB.query( + query, + async function(error, result) { + if (error) { + if (error.toString().indexOf("Duplicate entry") >= 0) { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Existing Subscription Found!") + .setDescription("Nothing has been saved.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(BotMsg => { + Functions.OptionCollect(WDR, Functions, "create", Message, BotMsg, Member); + }); + } else { + WDR.Console.error(WDR, "[commands/pokemon.js] Error Inserting Subscription.", [preset, error]); + Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } + } else { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle(preset.name + " PvP Subscription Complete!") + .setDescription("Saved to the Subscription Database.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(subscription_success).then(BotMsg => { + Functions.OptionCollect(WDR, Functions, "create", Message, BotMsg, Member); + }); + } + } + ); + + //END + return; +} \ No newline at end of file diff --git a/src/commands/subscription/pvp/remove.js b/src/commands/subscription/pvp/remove.js new file mode 100644 index 0000000..57eb6aa --- /dev/null +++ b/src/commands/subscription/pvp/remove.js @@ -0,0 +1,89 @@ +module.exports = (WDR, Functions, Message, Member) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_subscriptions + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pvp'`, + async function(error, subscriptions, fields) { + if (!subscriptions || !subscriptions[0]) { + let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("You do not have any PvP Subscriptions!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, BotMsg, Member); + }); + } else { + + let sub_list = ""; + for (let s = 0, slen = subscriptions.length; s < slen; s++) { + let choice = s + 1; + let sub_data = subscriptions[s]; + sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; + sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; + sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; + let data = ""; + if (sub_data.league != "all") { + data += " League: `" + sub_data.league + "`\n"; + } + if (sub_data.form != 0) { + data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; + } + data += " Min Rank: `" + sub_data.min_rank + "`\n"; + if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { + data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; + } + if (sub_data.min_cp != 0) { + data += " Min CP: `" + sub_data.min_cp + "`\n"; + } + if (sub_data.max_cp != 10000) { + data += " Max CP: `" + sub_data.max_cp + "`\n"; + } + sub_list += data + "\n"; + } + sub_list = sub_list.slice(0, -1); + + let number = await Functions.DetailCollect(WDR, Functions, "Remove", Member, Message, subscriptions, "Type the corressponding # of the subscription you would like to remove -OR- type \'all\'", sub_list); + + let remove = subscriptions[number]; + + WDR.wdrDB.query( + `DELETE FROM + wdr_subscriptions + WHERE + user_id = ${Message.author.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pokemon' + AND pokemon_id = ${remove.pokemon_id} + AND form = ${remove.form} + AND min_rank = ${remove.min_rank} + AND min_lvl = ${remove.min_lvl} + AND league = ${remove.league} + AND min_cp = ${remove.min_cp} + AND max_cp = ${remove.max_cp}`, + async function(error, result) { + if (error) { + WDR.Console.error(WDR, "[commands/pokemon.js] Error Removing Subscription.", [remove, error]); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle(WDR.Master.Pokemon[remove.pokemon_id].name + " PvP Subscription Removed!") + .setDescription("Saved to the subscription Database.") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + return Message.channel.send(subscription_success).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "remove", Message, BotMsg, Member); + }); + } + } + ); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pvp/status.js b/src/commands/subscription/pvp/status.js new file mode 100644 index 0000000..f62c7e1 --- /dev/null +++ b/src/commands/subscription/pvp/status.js @@ -0,0 +1,81 @@ +module.exports = (WDR, Functions, Message, Member, reason) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_users + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pvp'`, + async function(error, user) { + if (Member.db.pvp_status == 1 && reason == "resume") { + let already_active = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your PvP subscriptions are already **Active**!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(already_active).catch(console.error).then(msg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, nMessage, Member); + }); + } else if (Member.db.pvp_status == 0 && reason == "pause") { + let already_paused = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your PvP subscriptions are already **Paused**!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(already_paused).catch(console.error).then(msg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, nMessage, Member); + }); + } else { + if (reason == "pause") { + change = 0; + } else if (reason == "resume") { + change = 1; + } + WDR.wdrDB.query( + `UPDATE + wdr_users + SET + pvp_status = ${change} + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id}`, + async function(error, user, fields) { + if (error) { + WDR.Console.error(WDR, "[commands/pokemon.js] Error Inserting Subscription.", [preset, error]); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else { + WDR.wdrDB.query( + `UPDATE + wdr_subscriptions + SET + status = ${change} + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pvp'`, + async function(error, user, fields) { + if (error) { + WDR.Console.error(WDR, "[commands/pokemon.js] Error Inserting Subscription.", [preset, error]); + return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ + timeout: 10000 + })); + } else { + let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your Pokémon Subscriptions have been set to `" + change + "`!") + .setFooter("Saved to the subscription Database."); + return Message.channel.send(subscription_success).then(m => m.delete({ + timeout: 5000 + })); + } + } + ); + } + } + ); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/pvp/view.js b/src/commands/subscription/pvp/view.js new file mode 100644 index 0000000..82d1ded --- /dev/null +++ b/src/commands/subscription/pvp/view.js @@ -0,0 +1,58 @@ +module.exports = (WDR, Functions, Message, Member) => { + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_subscriptions + WHERE + user_id = ${Member.id} + AND guild_id = ${Message.guild.id} + AND sub_type = 'pvp'`, + async function(error, subscriptions) { + if (!subscriptions || subscriptions.length < 1) { + let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("You do not have any Pokémon Subscriptions!") + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, BotMsg, Member); + }); + } else { + + let sub_list = ""; + for (let s = 0, slen = subscriptions.length; s < slen; s++) { + let choice = s + 1; + let sub_data = subscriptions[s]; + sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; + sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; + sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; + let data = ""; + if (sub_data.league != "0") { + data += " League: `" + sub_data.league + "`\n"; + } + if (sub_data.form != 0) { + data += " Form: `" + sub_data.form == 0 ? "All" : WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; + } + data += " Min Rank: `" + sub_data.min_rank + "`\n"; + if (sub_data.min_lvl != 0 && sub_data.min_lvl != 1) { + data += " Min Lvl: `" + sub_data.min_lvl + "`\n"; + } + sub_list += data + "\n"; + } + sub_list = sub_list.slice(0, -1); + + let o_status = Member.db.status ? "Enabled" : "Disabled"; + let p_status = Member.db.pvp_status ? "Enabled" : "Disabled"; + let pokemonSubs = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your PvP Subscriptions") + .setDescription("Overall Status: `" + o_status + "`\n" + + "PvP Status: `" + p_status + "`\n\n" + sub_list) + .setFooter("You can type \'view\', \'presets\', \'add\', \'add adv\', \'remove\', or \'edit\'."); + Message.channel.send(pokemonSubs).catch(console.error).then(BotMsg => { + return Functions.OptionCollect(WDR, Functions, "view", Message, BotMsg, Member); + }); + } + } + ); +} \ No newline at end of file diff --git a/src/commands/subscription/quest.js b/src/commands/subscription/quest.js deleted file mode 100644 index 33ca6c7..0000000 --- a/src/commands/subscription/quest.js +++ /dev/null @@ -1,762 +0,0 @@ -module.exports = async (WDR, Message) => { - - let Member = ""; - if (Message.member) { - Member = Message.member; - } else { - Member = Message.author; - } - - switch (true) { - case Member.nickname: - break; - case Message.author.username: - break; - } - - Member.db = Message.member.db; - - if (!Member.nickname) { - Member.nickname = Message.author.username; - } else { - Member.nickname = Message.author.username; - } - - let request_action = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("What would you like to do with your Quest Subscriptions?") - .setDescription("`presets` » View quick preset subscriptions." + "\n" + - "`view` » View your Subscritions.\n" + - "`add` » Add a Reward to your Subscriptions.\n" + - "`remove` » Remove a Reward from your Subscriptions.\n" + - "`time` » Change your Quest DM delivery Time.\n " + - "`pause` or `resume` » Pause/Resume Quest Subscriptions.") - .setFooter("Type the action, no command prefix required."); - - Message.channel.send(request_action).catch(console.error).then(BotMsg => { - return option_collector(WDR, "start", Message, BotMsg, Member); - }); -} - -//############################################################################## - -async function subscription_preset(WDR, Message, Member) { - let presets = ""; - let preset_names = WDR.Presets.Pokemon.map(p => p.name); - for (let p = 0, plen = preset_names.length; p < plen; p++) { - let ps = WDR.Presets.Quests[p]; - presets += (p + 1) + " - " + preset_names[p] + "\n"; - } - presets = presets.slice(0, -1); - - let preset = await detail_collector(WDR, "Preset", Member, Message, presets, "Respond with the # of a preset.", null); - let preset_name = preset_names[(preset - 1)]; - preset = WDR.Presets.Pokemon.get(preset_name); - - // RETRIEVE AREA CONFIMATION FROM USER - preset.geofence = await detail_collector(WDR, "Geofence", Member, Message, undefined, "Please respond with \"Yes\", \"No\" or \"Areas Names\"", preset); - - // RETRIEVE CONFIRMATION FROM USER - preset.confirm = await detail_collector(WDR, "Confirm-Add", Member, Message, undefined, "Type \"Yes\" or \"No\". Subscription will be saved.", preset); - - WDR.wdrDB.query( - `INSERT INTO - wdr_subscriptions ( - user_id, - user_name, - guild_id, - guild_name, - bot, - status, - geofence, - sub_type, - pokemon_id, - form, - generation, - reward - ) - VALUES - ( - ${Message.author.id}, - '${Member.nickname}', - ${Message.guild.id}, - '${Member.db.guild_name}', - ${Member.db.bot}, - ${Member.db.quest_status}, - '${preset.geofence}', - 'quest', - ${preset.id}, - ${preset.form}, - ${preset.gen}, - '${preset.reward}' - )`, - async function(error, result) { - if (error) { - if (error.toString().indexOf("Duplicate entry") >= 0) { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Existing Subscription Found!") - .setDescription("Nothing has been saved.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } else { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Inserting Quest Preset Subscription.", preset); - console.error(error); - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(preset.name + " Quest Subscription Complete!") - .setDescription("Saved to the subscription Database.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(subscription_success).then(BotMsg => { - return option_collector(WDR, "create", Message, BotMsg, Member); - }); - } - } - ); -} - -//############################################################################## - - -function subscription_status(WDR, Message, Member, reason) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_users - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id}`, - async function(error, user) { - if (Member.db.quest_status == 1 && reason == "resume") { - let already_active = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Pokemon subscriptions are already **Active**!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(already_active).catch(console.error).then(msg => { - return option_collector(WDR, "view", Message, nMessage, Member); - }); - } else if (Member.db.quest_status == 0 && reason == "pause") { - let already_paused = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Pokemon subscriptions are already **Paused**!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(already_paused).catch(console.error).then(msg => { - return option_collector(WDR, "view", Message, nMessage, Member); - }); - } else { - if (reason == "pause") { - change = 0; - } else if (reason == "resume") { - change = 1; - } - WDR.wdrDB.query( - `UPDATE - wdr_users - SET - quest_status = ${change} - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id}`, - async function(error, user, fields) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - WDR.wdrDB.query( - `UPDATE - wdr_subscriptions - SET - status = ${change} - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = 'quest'`, - async function(error, user, fields) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 10000 - })).catch(console.error); - } else { - switch (change) { - case 0: - change = "DISABLED" - break; - case 1: - change = "ENABLED" - break; - } - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Quest Subscriptions have been set to `" + change + "`!") - .setFooter("Saved to the subscription Database."); - return Message.channel.send(subscription_success).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - ); - } - } - ); - } - } - ); -} - -//############################################################################## - -function subscription_view(WDR, Message, Member) { - WDR.wdrDB.query( - `SELECT - * - FROM - wdr_subscriptions - WHERE - user_id = ${Member.id} - AND guild_id = ${Message.guild.id} - AND sub_type = "quest"`, - async function(error, subscriptions) { - if (!subscriptions || subscriptions.length < 1) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You do not have any Pokémon Subscriptions!") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } else { - - let sub_list = ""; - for (let s = 0, slen = subscriptions.length; s < slen; s++) { - let choice = s + 1; - let sub_data = subscriptions[s]; - if (sub_data.pokemon_id > 0 || (sub_data.pokemon_id == 0 && sub_data.gen > 0)) { - sub_data.id = sub_data.id ? sub_data.id : sub_data.pokemon_id; - sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.id] ? WDR.Master.Pokemon[sub_data.id].name : "All Pokémon"; - sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; - let data = ""; - if (sub_data.form > 0) { - data += " Form: `" + WDR.Master.Pokemon[sub_data.id].forms[sub_data.form].form + "`\n"; - } - if (sub_data.gen > 0) { - data += " Gen: `" + sub_data.gen + "`\n"; - } - } else { - data += " Reward: `" + sub_data.reward + "`\n"; - } - if (sub_data.geofence == Message.Discord.name) { - data += " Geofence: `" + sub_data.geofence + "`\n"; - } - if (!data) { - data = " `All" + "`\n";; - } - sub_list += data + "\n"; - } - sub_list = sub_list.slice(0, -1); - - let o_status = Member.db.status ? "Enabled" : "Disabled"; - let q_status = Member.db.quest_status ? "Enabled" : "Disabled"; - let questSubs = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Pokémon Subscriptions") - .setDescription("Overall Status: `" + o_status + "`\n" + - "Quest Status: `" + q_status + "`\n\n" + sub_list) - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - Message.channel.send(questSubs).catch(console.error).then(BotMsg => { - return option_collector(WDR, "view", Message, BotMsg, Member); - }); - } - } - ); -} - -//############################################################################## - -async function subscription_time(WDR, message, prefix, discord) { - - - let sub = await detail_collector(WDR, "Time", Member, Message, Member.db.alert_time, "Must be in 00:00 24-Hour format and between 00:00-23:00.", undefined); - sub = sub.split(":"); - let quest_time = moment(), - timezone = GeoTz(Message.Discord.geofence[0][1][1], Message.Discord.geofence[0][1][0]); - quest_time = moment.tz(quest_time, timezone[0]).set({ - hour: sub[0], - minute: sub[1], - second: 0, - millisecond: 0 - }); - quest_time = moment.tz(quest_time, WDR.Config.TIMEZONE).format("HH:mm"); - - WDR.wdrDB.query( - `UPDATE - wdr_users - SET - alert_time = '${quest_time}' - WHERE - user_id = ${Member.id}`, - function(error, user, fields) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else { - WDR.wdrDB.query( - `UPDATE - wdr_subscriptions - SET - alert_time = '${quest_time}' - WHERE - user_id = ${Member.id}`, - function(error, user, fields) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Time Changed!") - .setDescription("`" + sub + "` Saved to the " + WDR.config.BOT_NAME + " Database.") - .setFooter("You can type \"view\", \"time\" \"add\", \"remove\", \"pause\" or \"resume\"."); - Message.channel.send(subscription_success).then(msg => { - return option_collector(WDR, "time", message, msg, prefix, discord); - }); - } - } - ); - } - } - ); -} - -// SUBSCRIPTION CREATE FUNCTION -async function subscription_create(WDR, message, prefix, discord) { - - // PULL THE USER"S SUBSCRITIONS FROM THE USER TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [Message.author.id, discord.id], async function(error, user, fields) { - - // RETRIEVE QUEST NAME FROM USER - let sub = await detail_collector(WDR, "Name", Member, Message, user[0].quests, "Type any Pokémon name or choose from the list. A " + WDR.Emotes.checkYes + " denotes you are already subscribed to that Reward. Names are not case-sensitive.", undefined); - - // DEFINED VARIABLES - let quests = []; - if (user[0].quests) { - quests = user[0].quests.split(","); - } - - let index = quests.indexOf(sub); - let rewards = WDR.Config.QUEST.Rewards.toString().toLowerCase().split(","); - let reward_index = rewards.indexOf(sub.toLowerCase()); - - // CHECK IF THE USER ALREADY HAS SUBSCRIPTIONS AND ADD - if (index >= 0) { - return Message.reply("You are already subscribed to this quest reward.").then(m => m.delete(10000)).catch(console.error); - } else if (reward_index >= 0) { - quests.push(WDR.config.QUEST.Rewards[reward_index]); - } else { - quests.push(sub); - } - - // CONVERT ARRAY TO STRING - quests = quests.toString(); - - // UPDATE THE USER"S RECORD - WDR.wdrDB.query(`UPDATE users SET quests = ? WHERE user_id = ? AND discord_id = ?`, [quests, Message.author.id, discord.id], function(error, user, fields) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(sub + " Subscription Complete!") - .setDescription("Saved to the " + WDR.config.BOT_NAME + " Database.") - .setFooter("You can type \"view\", \"time\" \"add\", \"remove\", \"pause\" or \"resume\"."); - Message.channel.send(subscription_success).then(msg => { - return option_collector(WDR, "create", message, msg, prefix, discord); - }); - } - }); - }); -} - -// SUBSCRIPTION REMOVE FUNCTION -async function subscription_remove(WDR, message, prefix, discord) { - - // PULL THE USER"S SUBSCRITIONS FROM THE USER TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [Message.author.id, discord.id], async function(error, user, fields) { - - // CHECK IF THE USER ALREADY HAS SUBSCRIPTIONS AND ADD - if (!user[0].quests) { - - // CREATE THE EMBED - let no_subscriptions = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You do not have any Quest Subscriptions!") - .setFooter("You can type \"view\", \"time\", or \"add\"."); - - // SEND THE EMBED - Message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return option_collector(WDR, "remove", message, msg, prefix, discord); - }); - } else { - // RETRIEVE QUEST NAME FROM USER - let remove_all = false; - let sub = await detail_collector(WDR, "Remove", Member, Message, user[0].quests, "Names are not case-sensitive.", undefined); - switch (sub) { - - case "ALL": - let sub_all = await detail_collector(WDR, "Confirm-Remove", Member, Message, user[0].quests, "Type \"Yes\" or \"No\"", undefined); - - remove_all = true; - default: - // DEFINED VARIABLES - let quests = user[0].quests.split(","); - let index = quests.indexOf(sub); - let rewards = WDR.Config.QUEST.Rewards.toString().toLowerCase().split(","); - let reward_index = rewards.indexOf(sub.toLowerCase()); - - if (index < 0 && !remove_all) { - - // CREATE THE EMBED - let no_quest = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("You are not Subscribed to that Quest!") - .setFooter("You can type \"view\", \"time\" \"add\", or \"remove\"."); - - // SEND THE EMBED - Message.channel.send(no_quest).catch(console.error).then(msg => { - return option_collector(WDR, "remove", message, msg, prefix, discord); - }); - } else if (remove_all) { - quests = ""; - } else { - quests.splice(index, 1); - } - - // CONVERT THE ARRAY TO A STRING - quests = quests.toString(); - - // UPDATE THE USER"S RECORD - WDR.wdrDB.query(`UPDATE users SET quests = ? WHERE user_id = ? AND discord_id = ?`, [quests, Message.author.id, discord.id], function(error, user, fields) { - if (error) { - return Message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle(sub + " Subscription Removed!") - .setFooter("Saved to the " + WDR.config.BOT_NAME + " Database.") - .setFooter("You can type \"view\", \"time\" \"add\", \"remove\", \"pause\" or \"resume\"."); - - Message.channel.send(subscription_success).then(msg => { - return option_collector(WDR, "remove", message, msg, prefix, discord); - }); - } - }); - } - } - }); -} - -// SUB COLLECTOR FUNCTION -async function detail_collector(WDR, type, Member, Message, object, requirements, sub) { - return new Promise(async resolve => { - - let timeout = true, - instruction = "", - reward_list = "", - user_rewards = []; - - const filter = cMessage => cMessage.author.id == Message.author.id; - const collector = Message.channel.createMessageCollector(filter, { - time: 30000 - }); - - switch (type) { - - case "Preset": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Choose a Preset Subscription:") - .setDescription(object) - .setFooter(requirements); - break; - - case "Name": - if (object) { - user_rewards = object.split(","); - } else { - user_rewards[0] = "None"; - } - await WDR.Config.QUEST.Rewards.forEach((reward, index) => { - if (user_rewards.indexOf(reward) >= 0) { - reward_list += reward + " " + WDR.Emotes.checkYes + "\n"; - } else { - reward_list += reward + "\n"; - } - }); - await user_rewards.forEach((reward, index) => { - if (reward_list.indexOf(reward) < 0) { - reward_list += reward + " " + WDR.Emotes.checkYes + "\n"; - } - }); - if (!reward_list) { - reward_list = user_rewards; - } - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("What Quest would you like to Subscribe to?") - .addField("Available Quest Rewards:", reward_list, false) - .setFooter(requirements); - break; - - // CONFIRM REMOVAL OF ALL REWARDS - case "Confirm-Remove": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Are you sure you want to Remove ALL of your subscriptions?") - .setFooter(requirements); - break; - - // REMOVAL EMBED - case "Remove": - let sub_list = object.split(",").toString().replace(/,/g, "\n"); - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("What Quest do you want to remove?") - .addField("Your Subscriptions:", "**" + sub_list + "**", false) - .setFooter(requirements); - break; - - // REMOVAL EMBED - case "Time": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("What time do you want to set for Quest DM Alerts?") - .setDescription("Current Time: `" + object + "`") - .setFooter(requirements); - break; - } - - Message.channel.send(instruction).catch(console.error).then(msg => { - - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (true) { - - // CANCEL SUB - case Message.content.toLowerCase() == "cancel": - collector.stop("cancel"); - break; - - // GET CONFIRMATION - case type.indexOf("Confirm-Remove") >= 0: - case type.indexOf("Confirm") >= 0: - switch (Message.content.toLowerCase()) { - case "save": - case "yes": - collector.stop("yes"); - break; - case "no": - case "cancel": - collector.stop("cancel"); - break; - default: - Message.reply("`" + Message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // QUEST NAME - case type.indexOf("Name") >= 0: - case type.indexOf("Remove") >= 0: - if (Message.content.toLowerCase() == "all") { - collector.stop("ALL"); - break; - } - let search_pokemon = Message.content - let valid_pokemon = WDR.Master.Pokemon_ID_Search(WDR, search_pokemon); - if (valid_pokemon) { - return collector.stop(valid_pokemon.pokemon_name); - } - for (let r = 0; r < WDR.Config.QUEST.Rewards.length + 1; r++) { - if (r == WDR.Config.QUEST.Rewards.length + 1) { - Message.reply("`" + Message.content + "` doesn\"t appear to be a valid Quest reward. Please check the spelling and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - } else if (WDR.config.QUEST.Rewards[r] && Message.content.toLowerCase() == WDR.Config.QUEST.Rewards[r].toLowerCase()) { - collector.stop(WDR.config.QUEST.Rewards[r]); - break; - } - } - break; - - case type.indexOf("Time") >= 0: - if (Message.content.length < 6 && Message.content.indexOf(":") >= 0) { - let times = Message.content.split(":"); - if (parseInt(times[0]) >= 0 && parseInt(times[0]) < 23 && parseInt(times[1]) <= 59 && parseInt(times[1]) >= 0) { - collector.stop(Message.content); - break; - } else { - Message.reply("`" + Message.content + "` doesn\"t appear to be a valid Time. Please check the requirements and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - } - break; - } else { - Message.reply("`" + Message.content + "` doesn\"t appear to be a valid Time. Please check the requirements and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - } - break; - } - }); - - collector.on("end", (collected, reason) => { - if (msg) { - msg.delete(); - } - switch (true) { - case "cancel": - return subscription_cancel(WDR, Message, Member); - case "time": - return subscription_timedout(WDR, Message, Member); - default: - return resolve(reason); - } - }); - }); - - // END - return; - }); -} - -//############################################################################## - -function subscription_cancel(WDR, Message, Member) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Subscription Cancelled.") - .setDescription("Nothing has been Saved.") - return Message.channel.send(subscription_cancel).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); -} - -//############################################################################## - -function subscription_timedout(WDR, Message, Member) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.user.displayAvatarURL()) - .setTitle("Your Subscription Has Timed Out.") - .setDescription("Nothing has been Saved.") - .setFooter("You can type \"view\", \"presets\", \"add\", \"add adv\", \"remove\", or \"edit\"."); - return Message.channel.send(subscription_cancel).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); -} - -//############################################################################## - -function option_collector(WDR, source, oMessage, bMessage, Member) { - - var BotMsg = bMessage; - let OriginalMsg = oMessage; - - const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; - const collector = OriginalMsg.channel.createMessageCollector(filter, { - time: 60000 - }); - - // FILTER COLLECT EVENT - collector.on("collect", message => { - if (CollectedMsg) { - CollectedMsg.delete(); - } - let input = CollectedMsg.content.split(" ")[0].toString().toLowerCase(); - switch (input) { - case "ad": - case "add": - collector.stop("add"); - break; - case "preset": - case "presets": - collector.stop("preset"); - break; - case "remove": - collector.stop("remove"); - break; - case "change": - case "modify": - case "edit": - case "eidt": - collector.stop("edit"); - break; - case "view": - case "veiw": - collector.stop("view"); - break; - case "puase": - case "pasue": - case "pasue": - case "psaue": - case "paus": - case "pause": - collector.stop("pause"); - break; - case "resum": - case "rseume": - case "reusme": - case "resuem": - case "resume": - collector.stop("resume"); - break; - default: - collector.stop("cancel"); - } - }); - - collector.on("end", (collected, reason) => { - if (BotMsg) { - BotMsg.delete(); - } - switch (reason) { - case "cancel": - return subscription_cancel(WDR, OriginalMsg, Member); - case "advanced": - return subscription_create(WDR, OriginalMsg, Member, true); - case "add": - return subscription_create(WDR, OriginalMsg, Member, false); - case "preset": - return subscription_preset(WDR, OriginalMsg, Member, false); - case "remove": - return subscription_remove(WDR, OriginalMsg, Member); - case "edit": - return subscription_modify(WDR, OriginalMsg, Member); - case "view": - return subscription_view(WDR, OriginalMsg, Member); - case "resume": - case "pause": - return subscription_status(WDR, OriginalMsg, Member, reason); - case "time": - return subscription_timedout(WDR, OriginalMsg, Member); - default: - return; - } - }); - - // END - return; -} \ No newline at end of file diff --git a/src/commands/subscription/raid.js b/src/commands/subscription/raid.js deleted file mode 100644 index ab7f4e6..0000000 --- a/src/commands/subscription/raid.js +++ /dev/null @@ -1,943 +0,0 @@ -const Fuzzy = require("fuzzy"); - -module.exports = async (WDR, message, prefix, discord) => { - - // DECLARE VARIABLES FOR USER - let Member = ""; - if (Message.member) { - Member = Message.member; - } else { - Member = Message.author; - } - - switch (true) { - case Member.nickname: - break; - case Message.author.username: - break; - } - - Member.db = Message.Member.db; - - if (!Member.nickname) { - Member.nickname = Message.author.username; - } else { - Member.nickname = Message.author.username; - } - - let request_action = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("What would you like to do with your Raid Subscriptions?") - .setDescription("`presets` » View quick preset subscriptions." + "\n" + - "`view` » View your Subscritions.\n" + - "`add` » Create a Simple Subscription.\n" + - "`remove` » Remove a Raid Subscription.\n" + - "`pause` or `resume` » Pause/Resume Raid Subscriptions Only.") - .setFooter("Type the action, no command prefix required."); - - message.channel.send(request_action).catch(console.error).then(msg => { - return initiate_collector(WDR, "start", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); -} - -// PAUSE OR RESUME POKEMON SUBSCRIPTIOONS -function subscription_status(WDR, message, member, reason, prefix, available_gyms, discord, gym_collection) { - WDR.wdrDB.query( - `SELECT - * - FROM - users - WHERE - user_id = ? - AND discord_id = ?`, - [ - Member.id, - Message.guild.id - ], - function(error, user, fields) { - if (error) { - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } - if (!user || !user[0]) { - console.error("[COMMANDS] [" + WDR.Time(null, "stamp") + "] [raid.js/(subscription_status)] Could not retrieve user: " + Member.nickname + " entry from dB."); - return message.reply("There has been an error retrieving your user data from the dB contact an Admin to fix."); - } - - if (user[0].raids_status == "ACTIVE" && reason == "resume") { - let already_active = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Your Raid subscriptions are already **Active**!") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - - // SEND THE EMBED - message.channel.send(already_paused).catch(console.error).then(msg => { - return initiate_collector(WDR, "view", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); - } else if (user[0].raids_status == "PAUSED" && reason == "pause") { - let already_paused = new WDR.DiscordJS.MessageEmbed().setColor("ff0000") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Your Raid subscriptions are already **Paused**!") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - - // SEND THE EMBED - message.channel.send(already_paused).catch(console.error).then(msg => { - return initiate_collector(WDR, "view", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); - } else { - if (reason == "pause") { - change = "PAUSED"; - } - if (reason == "resume") { - change = "ACTIVE"; - } - WDR.wdrDB.query("UPDATE users SET raids_status = ? WHERE user_id = ? AND discord_id = ?", [change, message.author.id, Message.guild.id], function(error, user, fields) { - if (error) { - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Your Raid subscriptions have been set to `" + change + "`!") - .setFooter("Saved to the " + WDR.config.BOT_NAME + " Database."); - return message.channel.send(subscription_success).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - }); - } - }); -} - -// SUBSCRIPTION REMOVE FUNCTION -async function subscription_view(WDR, message, member, prefix, available_gyms, discord, gym_collection) { - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [Member.id, Message.guild.id], async function(error, user, fields) { - if (error) { - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } - if (!user || !user[0]) { - console.error("[COMMANDS] [" + WDR.Time(null, "stamp") + "] [raid.js/(subscription_view)] Could not retrieve user: " + Member.nickname + " entry from dB."); - return message.reply("There has been an error retrieving your user data from the dB contact an Admin to fix."); - } - - // CHECK IF THE USER ALREADY HAS SUBSCRIPTIONS AND ADD - if (!user[0].raids) { - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("You do not have any Raid Subscriptions!") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - - // SEND THE EMBED - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, "view", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); - } else { - - let raid = JSON.parse(user[0].raids), - raid_levels = ""; - if (!raid.subscriptions[0]) { - - // CREATE THE EMBED AND SEND - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("You do not have any Subscriptions!") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, "view", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); - } else { - - // CREATE THE EMBED - let raid_subs = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Raid Boss Subscriptions") - .setDescription("Overall Status: `" + user[0].status + "`\nRaids Status: `" + user[0].raids_status + "`") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - - // TURN EACH SUBSCRIPTION INTO A FIELD - await raid.subscriptions.forEach(async (sub, index) => { - // GET BOSS INFO - let id = WDR.Master.Pokemon_ID_Search(WDR, sub.boss), - locale = {}; - if (id) { - locale = await WDR.Get_Data(WDR, { - pokemon_id: id.pokemon_id, - form: sub.form ? sub.form : id.form - }); - } - - if (id && !sub.form && WDR.Master.Pokemon[id.pokemon_id].default_form) { - locale.form = "[All] "; - } else if (!locale.form) { - locale.form = ""; - } - - let fields = field_view(WDR, index, sub, locale); - - raid_subs.addField(fields.title, fields.body, false); - }); - - // SEND THE EMBED - message.channel.send(raid_subs).catch(console.error).then(msg => { - return initiate_collector(WDR, "view", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); - } - } - }); -} - -// CREATE THE OUTPUT FOR VIEW OR REMOVE FIELD -function field_view(WDR, index, sub, locale) { - let title = "", - body = ""; - switch (true) { - // FILTERED BY BOSS NAME - case (sub.gym != "All" && sub.boss != "All"): - title = "#" + (index + 1) + " " + sub.boss + " " + locale.form; - body = "Gym: " + sub.gym + "\nFiltered by Areas: `" + sub.areas + "`"; - break; - // ALL BOSSES FILTERED BY ALL LEVEL - case (sub.gym != "All" && sub.boss == "All" && sub.min_lvl == "1" && sub.max_lvl == "5"): - title = "#" + (index + 1) + " " + sub.gym; - body = "All Levels`\nFiltered by Areas: `" + sub.areas + "`"; - break; - // ALL BOSSES FILTERED BY LEVEL - case (sub.gym != "All" && sub.boss == "All"): - title = "#" + (index + 1) + " " + sub.gym; - body = "Min/Max Lvl: `" + sub.min_lvl + "/" + sub.max_lvl + "`\nFiltered by Areas: `" + sub.areas + "`"; - break; - // GYMS FILTERED BY BOSS AND AREA - case (sub.gym == "All" && sub.boss != "All"): - title = "#" + (index + 1) + " " + sub.boss + " " + locale.form; - body = "All Gyms\nFiltered by Areas: `" + sub.areas + "`"; - break; - // GYM FILTERED BY AREA - case (sub.gym == "All" && sub.boss == "All"): - if (sub.min_lvl == sub.max_lvl) { - title = "#" + (index + 1) + " Level " + sub.max_lvl + " Raids"; - } else { - title = "#" + (index + 1) + " Level " + sub.min_lvl + " - " + sub.max_lvl + " Raids"; - } - body = "**All Gyms**\nFiltered by Areas: `" + sub.areas + "`"; - break; - default: - title = "#" + (index + 1); - body = "Gym: `" + sub.gym + "`\nRaid Boss: `" + sub.boss + " " + locale.form + "`\nMin/Max Lvl: `" + sub.min_lvl + "/" + sub.max_lvl + "`\nFiltered by Areas: `" + sub.areas + "`"; - } - return { - title: title, - body: body - }; -} - -// SUBSCRIPTION CREATE FUNCTION -async function subscription_create(WDR, message, member, prefix, advanced, available_gyms, discord, gym_collection) { - - // PULL THE USER"S SUBSCRITIONS FROM THE USER TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [Member.id, Message.guild.id], async function(error, user, fields) { - if (error) { - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } - if (!user || !user[0]) { - console.error("[COMMANDS] [" + WDR.Time(null, "stamp") + "] [raid.js/(subscription_create)] Could not retrieve user: " + Member.nickname + " entry from dB."); - return message.reply("There has been an error retrieving your user data from the dB contact an Admin to fix."); - } - - // DEFINED THE SUBSCRIPTION OBJECT - let sub = {}, - got_name = false; - - // RETRIEVE GYM NAME FROM USER - do { - sub.gym = await sub_collector(WDR, "Gym", member, message, undefined, "Respond with \"All\" or a Gym name. Names are not case-sensitive.", sub, available_gyms, discord, gym_collection); - if (sub.gym == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (sub.gym == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else { - if (sub.gym == "All") { - sub.gym = "All"; - got_name = true; - } else if (!Array.isArray(sub.gym) && sub.gym.split(",")[0] == "fuzzy") { - let results = Fuzzy.filter(sub.gym.split(",")[1], available_gyms); - let matches = results.map(function(el) { - return el.string; - }); - if (!matches[0]) { - message.reply("`" + sub.gym + "`, does not closely match any gym in the database.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else { - let user_choice = await match_collector(WDR, "Matches", member, message, matches, "Type the number of the Correct Gym.", sub, available_gyms, discord, gym_collection); - if (sub.gym == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (sub.gym == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else { - let collection_match = gym_collection.get(matches[user_choice]); - if (collection_match) { - sub.id = collection_match.id; - sub.gym = collection_match.name; - got_name = true; - } - } - } - } else if (sub.gym.length > 1) { - let user_choice = await match_collector(WDR, "Multiple", member, message, undefined, "Type the number of the Correct Gym.", sub, available_gyms, discord, gym_collection); - if (sub.gym == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (sub.gym == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (sub.gym[user_choice] == undefined) { - return; - } else { - sub.id = sub.gym[user_choice].id; - sub.gym = sub.gym[user_choice].name; - got_name = true; - } - } else { - sub.id = sub.gym[0].id; - sub.gym = sub.gym[0].name; - got_name = true; - } - } - } while (got_name == false); - - // RETRIEVE BOSS NAME FROM USER - sub.pokemon = await sub_collector(WDR, "Name", member, message, undefined, "Respond with \"All\", \"Egg\" or the Raid Boss\"s name. Names are not case-sensitive.", sub, available_gyms, discord, gym_collection); - sub.boss = sub.pokemon.pokemon_name ? sub.pokemon.pokemon_name : sub.pokemon.toString(); - sub.form = sub.pokemon.form ? parseInt(sub.pokemon.form) : 0; - if (sub.boss == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (sub.boss == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } - - if (sub.boss == "All" || sub.boss == "Egg") { - // RETRIEVE MIN LEVEL FROM USER - sub.min_lvl = await sub_collector(WDR, "Minimum Level", member, message, sub, "Please respond with a value of 1 through 5 or type \"All\". Type \"Cancel\" to Stop.", sub, available_gyms, discord, gym_collection); - if (sub.min_lvl == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (sub.min_lvl == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } - - // RETRIEVE MIN LEVEL FROM USER - if (sub.min_lvl == "5" || sub.min_lvl == "All") { - sub.max_lvl = "All"; - } else { - sub.max_lvl = await sub_collector(WDR, "Maximum Level", member, message, sub, "Please respond with a value of 1 through 5 or type \"All\". Type \"Cancel\" to Stop.", sub, available_gyms, discord, gym_collection); - if (sub.max_lvl == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (sub.max_lvl == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } - } - } else { - sub.min_lvl = "Boss Specified"; - sub.max_lvl = "Boss Specified"; - } - - // RETRIEVE AREA CONFIRMATION FROM USER IF NOT FOR A SPECIFIC GYM - if (sub.gym == "All") { - sub.areas = await sub_collector(WDR, "Area Filter", member, message, sub, "Please respond with \"Yes\" or \"No\"", sub, available_gyms, discord, gym_collection); - if (sub.areas == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (sub.areas == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } - } else { - sub.areas = "Gym Specified"; - } - - // RETRIEVE CONFIRMATION FROM USER - let confirm = await sub_collector(WDR, "Confirm-Add", member, message, user[0], "Type \"Yes\" or \"No\". Subscription will be saved.", sub, available_gyms, discord, gym_collection); - if (confirm == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (confirm == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } - - let raid = ""; - // CHECK IF THE USER ALREADY HAS SUBSCRIPTIONS AND ADD - if (!user[0].raids) { - raid = {}; - raid.subscriptions = []; - raid.subscriptions.push(sub); - } else { - raid = JSON.parse(user[0].raids); - if (!raid.subscriptions[0]) { - raid.subscriptions.push(sub); - } else { - // CONVERT TO OBJECT AND CHECK EACH SUBSCRIPTION - raid = JSON.parse(user[0].raids); - raid.subscriptions.forEach((subscription, index) => { - subscription.form = subscription.form ? subscription.form : sub.pokemon.pokemon_id ? WDR.Master.Pokemon[sub.pokemon.pokemon_id].default_form : 0; - - // ADD OR OVERWRITE IF EXISTING - if (subscription.boss == sub.boss && subscription.gym == sub.gym && subscription.form == sub.form) { - raid.subscriptions[index] = sub; - } else if (index == raid.subscriptions.length - 1) { - raid.subscriptions.push(sub); - } - }); - } - } - - // STRINGIFY THE OBJECT - let new_subs = JSON.stringify(raid); - - // UPDATE THE USER"S RECORD - WDR.wdrDB.query(`UPDATE users SET raids = ? WHERE user_id = ? AND discord_id = ?`, [new_subs, Member.id, Message.guild.id], function(error, user, fields) { - if (error) { - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle(sub.boss + " Raid Subscription Complete!") - .setDescription("Saved to the " + WDR.config.BOT_NAME + " Database.") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - message.channel.send(subscription_success).then(msg => { - return initiate_collector(WDR, "create", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); - } - }); - }); -} - -// SUBSCRIPTION REMOVE FUNCTION -async function subscription_remove(WDR, message, member, prefix, available_gyms, discord, gym_collection) { - - // FETCH USER FROM THE USERS TABLE - WDR.wdrDB.query(`SELECT * FROM users WHERE user_id = ? AND discord_id = ?`, [Member.id, Message.guild.id], async function(error, user, fields) { - if (error) { - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } - if (!user || !user[0]) { - console.error("[COMMANDS] [" + WDR.Time(null, "stamp") + "] [raid.js/(subscription_remove)] Could not retrieve user: " + Member.nickname + " entry from dB."); - return message.reply("There has been an error retrieving your user data from the dB contact an Admin to fix."); - } - - // END IF USER HAS NO SUBSCRIPTIONS - if (!user[0].raids) { - - // CREATE THE RESPONSE EMBED - let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("You do not have any Raid Subscriptions!") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - - // SEND THE EMBED - message.channel.send(no_subscriptions).catch(console.error).then(msg => { - return initiate_collector(WDR, "view", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); - } else { - - // PARSE THE STRING TO AN OBJECT - let raids = JSON.parse(user[0].raids), - found = false, - embed_title = ""; - - // FETCH NAME OF POKEMON TO BE REMOVED AND CHECK RETURNED STRING - let remove_id = await sub_collector(WDR, "Remove", member, message, user[0], "Type the Number of the Subscription you want to remove.", raids, available_gyms, discord, gym_collection); - - switch (remove_id.toLowerCase()) { - case "time": - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - case "cancel": - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - case "all": - - // CONFIRM THEY REALL MEANT TO REMOVE ALL - let confirm = await sub_collector(WDR, "Confirm-Remove", member, message, remove_id, "Type \"Yes\" or \"No\". Subscription will be saved.", undefined, available_gyms, discord, gym_collection); - if (confirm == "cancel") { - return subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } else if (confirm == "time") { - return subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection); - } - - // MARK AS FOUND AND WIPE THE ARRAY - raids.subscriptions = []; - break; - embed_title = "All Subscriptions Removed!"; - - default: - // REMOVE THE SUBSCRIPTION - raids.subscriptions.splice((remove_id - 1), 1); - embed_title = "Subscription #" + remove_id + " Removed!" - } - - // STRINGIFY THE OBJECT - let new_subs = JSON.stringify(raids); - - // UPDATE THE USER"S RECORD - WDR.wdrDB.query(`UPDATE users SET raids = ? WHERE user_id = ? AND discord_id = ?`, [new_subs, Member.id, Message.guild.id], function(error, user, fields) { - if (error) { - return message.reply("There has been an error, please contact an Admin to fix.").then(m => m.delete(10000)).catch(console.error); - } else { - let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle(embed_title) - .setDescription("Saved to the " + WDR.config.BOT_NAME + " Database.") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - return message.channel.send(subscription_success).then(msg => { - return initiate_collector(WDR, "remove", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); - } - }); - } - }); -} - -// SUB COLLECTOR FUNCTION -function sub_collector(WDR, type, member, message, object, requirements, sub, available_gyms, discord, gym_collection) { - return new Promise(async resolve => { - - // DELCARE VARIABLES - let timeout = true, - instruction = ""; - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 30000 - }); - switch (type) { - - // POKEMON NAME EMBED - case "Name": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("What Raid Boss would you like to Subscribe to?") - .setFooter(requirements); - break; - - // GYM NAME EMBED - case "Gym": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("What Gym would you like to Subscribe to?") - .setFooter(requirements); - break; - - // CONFIRMATION EMBED - case "Confirm-Add": - let form = "", - areas = sub.areas; - if (sub.pokemon == "All" || sub.pokemon == "Egg") { - form = ""; - } else { - let confirm_locale = await WDR.Get_Data(WDR, { - pokemon_id: sub.pokemon.pokemon_id, - form: sub.form - }); - if (!sub.form && WDR.Master.Pokemon[sub.pokemon.pokemon_id].default_form) { - form = "[All] "; - } else { - form = confirm_locale.form; - } - } - - // SUB AREA - switch (areas) { - case "Yes": - areas = object.geofence; - break; - case "No": - areas = "ALL"; - } - - if (sub.min_lvl == "Boss Specified") { - raid_levels = "Boss Specified"; - } else if (sub.min_lvl == "ALL") { - raid_levels = "ALL"; - } else { - raid_levels = sub.min_lvl + "/" + sub.max_lvl; - } - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Does all of this look correct?\nGym: `" + sub.gym + "`\nRaid Boss: `" + sub.boss + " " + form + "`\nMin/Max Lvl: `" + raid_levels + "`\nFilter By Areas: `" + areas + "`") - .setFooter(requirements); - break; - - case "Confirm-Remove": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Are you sure you want to Remove ALL of your subscriptions?") - .setFooter(requirements); - break; - - - // REMOVAL EMBED - case "Remove": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Which Raid Subscription do you want to remove?") - .setFooter(requirements); - - // TURN EACH SUBSCRIPTION INTO A FIELD - await WDR.asyncForEach(sub.subscriptions, async (sub, index) => { - let id = WDR.Master.Pokemon_ID_Search(WDR, sub.boss), - remove_locale = {}; - let areas = sub.areas; - if (!sub.pokemon) { - sub.pokemon = id; - } - if (id && sub.pokemon) { - remove_locale = await WDR.Get_Data(WDR, { - pokemon_id: sub.pokemon.pokemon_id, - form: sub.form ? sub.form : id.form - }); - } - remove_locale = remove_locale ? remove_locale : { - pokemon_name: sub.boss, - form: "" - }; - if (sub.boss == "All" || sub.boss == "Egg") { - remove_locale.form = ""; - } else { - if (!sub.form && WDR.Master.Pokemon[sub.pokemon.pokemon_id].default_form) { - remove_locale.form = "[All] " - } - } - - // SUB AREA - switch (areas) { - case "Yes": - areas = object.geofence; - break; - case "No": - areas = "ALL"; - } - - let fields = field_view(WDR, index, sub, remove_locale, areas); - - instruction.addField(fields.title, fields.body, false); - }); - break; - - // AREA EMBED - case "Area Filter": - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Do you want to get notifications for " + object.boss + " Raids filtered by your subscribed Areas?") - .setDescription("**Yes**, your notifications for this Pokémon will be filtered based on your areas.\n" + - "**No**, you will get notifications for this pokemon in ALL areas for the city.\n" + - "Type an Area, you will be able to get notifications outside of your normal area geofence.") - .setFooter(requirements); - break; - - // DEFAULT EMBED - default: - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("What **" + type + "** would you like to set for **" + object.boss + "** Raid Notifications?") - .setFooter(requirements); - } - - message.channel.send(instruction).catch(console.error).then(msg => { - - // DEFINED VARIABLES - let input = ""; - - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (true) { - - // CANCEL SUB - case message.content.toLowerCase() == "stop": - case message.content.toLowerCase() == "cancel": - collector.stop("cancel"); - break; - - // GYM NAME - case type.indexOf("Gym") >= 0: - if (message.content.toLowerCase() == "all") { - collector.stop("All"); - } else { - WDR.scannerDB.query(`SELECT * FROM gym WHERE name = ?`, [message.content], async function(error, gyms, fields) { - if (!gyms) { - return collector.stop("fuzzy," + message.content); - } else { - await gyms.forEach((gym, index) => { - if (!InsideGeojson.polygon(Message.Discord.geofence, [gym.lon, gym.lat])) { - gyms.splice(index, 1); - } - }); - if (gyms[0]) { - return collector.stop(gyms); - } else { - return collector.stop("fuzzy," + message.content); - } - } - }); - } - break; - - // GET CONFIRMATION - case type.indexOf("Area Filter") >= 0: - switch (message.content.toLowerCase()) { - case "yes": - collector.stop("Yes"); - break; - case "all": - case "no": - collector.stop("No"); - break; - default: - let areas = message.content.split(","), - area_array = []; - let areas_confirmed = ""; - let geofences = WDR.Geofences.get(Message.Discord.geojson_file); - geofences.features.forEach((geofence, index) => { - area_array.push(geofence.properties.name); - }); - areas.forEach((area, index) => { - for (let i = 0; i < area_array.length + 1; i++) { - if (i == area_array.length) { - message.reply("`" + area + "` doesn\"t appear to be a valid Area. Please check the spelling and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - } else if (area.toLowerCase() == area_array[i].toLowerCase()) { - areas_confirmed += area_array[i] + ","; - break; - } - } - }); - areas_confirmed = areas_confirmed.slice(0, -1); - if (areas_confirmed.split(",").length == areas.length) { - collector.stop(areas_confirmed); - } - } - break; - - case type.indexOf("Confirm-Add") >= 0: - case type.indexOf("Confirm-Remove") >= 0: - switch (message.content.toLowerCase()) { - case "save": - case "yes": - collector.stop("yes"); - break; - case "no": - case "cancel": - collector.stop("cancel"); - break; - default: - message.reply("`" + message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // POKEMON NAME - case type.indexOf("Name") >= 0: - switch (message.content.toLowerCase()) { - case "all": - collector.stop("All"); - break; - case "egg": - collector.stop("Egg"); - break; - default: - let search_pokemon = message.content.split("-") - let valid_pokemon = WDR.Master.Pokemon_ID_Search(WDR, search_pokemon[0]); - if (valid_pokemon) { - if (search_pokemon[1]) { - valid_pokemon.pokemon_name = valid_pokemon.pokemon_name + "-" + search_pokemon[1]; - } - return collector.stop(valid_pokemon); - } else { - return message.reply("`" + message.content + "` doesn\"t appear to be a valid Raid Boss name. Please check the spelling and try again.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - break; - - // SUBSCRIPTION NUMBER - case type.indexOf("Remove") >= 0: - if (message.content > 0 && message.content <= sub.subscriptions.length) { - collector.stop(message.content); - } else { - message.reply("`" + message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // MIN/MAX LEVEL CONFIGURATION - case type.indexOf("Level") >= 0: - if (parseInt(message.content) >= 1 && parseInt(message.content) <= 5) { - collector.stop(message.content); - } else if (message.content.toLowerCase() == "all") { - collector.stop("All"); - } else { - message.reply("`" + message.content + "` is an Invalid Input. " + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - } - }); - - // COLLECTOR ENDED - collector.on("end", (collected, reason) => { - msg.delete(); - return resolve(reason); - }); - }); - }); -} - -function subscription_cancel(WDR, member, message, prefix, available_gyms, discord, gym_collection) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Subscription Cancelled.") - .setDescription("Nothing has been Saved.") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, "cancel", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); -} - -function subscription_timedout(WDR, member, message, prefix, available_gyms, discord, gym_collection) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Subscription Timed Out.") - .setDescription("Nothing has been Saved.") - .setFooter("You can type \"view\", \"add\", or \"remove\"."); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, "time", message, msg, member, prefix, available_gyms, discord, gym_collection); - }); -} - -function initiate_collector(WDR, source, message, msg, member, prefix, available_gyms, discord, gym_collection) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - // FILTER COLLECT EVENT - collector.on("collect", message => { - switch (message.content.toLowerCase()) { - case "advanced": - case "add advanced": - case "add": - collector.stop("add"); - break; - case "remove": - collector.stop("remove"); - break; - case "view": - collector.stop("view"); - break; - case "pause": - collector.stop("pause"); - break; - case "resume": - collector.stop("resume"); - break; - default: - collector.stop("end"); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on("end", (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case "cancel": - resolve("cancel"); - break; - case "add": - subscription_create(WDR, message, member, prefix, false, available_gyms, discord, gym_collection); - break; - case "remove": - subscription_remove(WDR, message, member, prefix, available_gyms, discord, gym_collection); - break; - case "view": - subscription_view(WDR, message, member, prefix, available_gyms, discord, gym_collection); - break; - case "resume": - case "pause": - subscription_status(WDR, message, member, reason, prefix, available_gyms, discord, gym_collection); - break; - default: - if (source == "start") { - message.reply("Your subscription has timed out.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - return; - }); -} - -async function match_collector(WDR, type, member, message, object, requirements, sub, available_gyms, discord, gym_collection) { - return new Promise(async resolve => { - let options = ""; - switch (type) { - - // REMOVAL EMBED - case "Matches": - let match_desc = ""; - object.forEach((match, index) => { - match_desc += (index + 1) + ". " + match + "\n"; - }); - if (match_desc.length > 2048) { - match_desc = match_desc.slice(0, 1973) + "**\nThere are too many to display. Try to narrow your search terms.**"; - } - options = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Possible matches for \"" + sub.gym.split(",")[1] + "\" were found.") - .setDescription(match_desc) - .setFooter("Type the number of the gym you wish to select or type \"cancel\"."); - break; - - // REMOVAL EMBED - case "Multiple": - let description = ""; - await WDR.asyncForEach(object, async (match, index) => { - let match_area = await WDR.Get_Area(WDR, match.lat, match.lon, discord); - let match_name = match.name + " [" + match_area.embed + "]"; - description += (index + 1) + ". " + match_name + "\n"; - }) - if (description.length > 2048) { - description = description.slice(0, 1973) + "**\nThere are too many to display. Try to narrow your search terms.**"; - } - options = new WDR.DiscordJS.MessageEmbed() - .setAuthor(Member.nickname, Member.author.displayAvatarURL) - .setTitle("Multiple Matches were found.").setDescription(description) - .setFooter("Type the number of the gym you wish to select or type \"cancel\"."); - break; - } - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 30000 - }); - - message.channel.send(options).catch(console.error).then(msg => { - - // FILTER COLLECT EVENT - collector.on("collect", message => { - if (parseInt(message.content) >= 1 && parseInt(message.content) <= object.length) { - collector.stop(parseInt(message.content) - 1); - } else if (message.content.toLowerCase() == "cancel") { - collector.stop("cancel"); - } else { - message.reply("`" + message.content + "` is not a valid selection.").then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - }); - - collector.on("end", (collected, reason) => { - msg.delete(); - return resolve(reason); - }); - }); - }); -} \ No newline at end of file diff --git a/src/commands/subscription/raidcp.js b/src/commands/subscription/raidcp.js deleted file mode 100644 index a660322..0000000 --- a/src/commands/subscription/raidcp.js +++ /dev/null @@ -1,145 +0,0 @@ -const GeoTz = require('geo-tz'); - -const Send_Nest = require(__dirname + '/../../embeds/nests.js'); -const InsideGeojson = require('point-in-geopolygon'); -const pvp = require(__dirname + '/../../pvp.js'); - -module.exports = async (WDR, message, prefix, discord) => { - - // GET USER NICKNAME - let nickname = ''; - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let requestAction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Pokémon do you want a CP search string for?') - .setFooter('Type the name of desired Poké, no command prefix required.'); - - message.channel.send(requestAction).catch(console.error).then(msg => { - initiate_collector(WDR, 'start', message, msg, nickname, prefix, discord); - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - return; - }); -} - -async function pokemon_view(WDR, message, nickname, pokemon, prefix, discord) { - let guild = WDR.Bot.guilds.cache.get(discord.id); - let pokemon_id = pokemon.pokemon_id, - form_id = pokemon.form; - let locale = await WDR.Get_Data(WDR, pokemon); - - let result_string = '```', - role_id = ''; - let pokemon_name = locale.pokemon_name; - let pokemon_color = locale.color, - level = 20; - let pokemon_type = locale.type, - weaknesses = locale.weaknesses; - for (var atk = 15; atk >= 13; atk--) { - for (var def = 15; def >= 13; def--) { - for (var sta = 15; sta >= 13; sta--) { - iv_percent = Math.round((atk + def + sta) / 45 * 100); - result_string += atk + ',' + def + ',' + sta + ' ' + pvp.CalculateCP(WDR, pokemon_id, form_id, atk, def, sta, level) + ' CP ' + iv_percent + '%\n'; - } - } - } - result_string += '```'; - - // DETERMINE BASE STATS - if (!WDR.Master.Pokemon[pokemon_id].attack) { - form_name = locale.form_name; - attack = WDR.Master.Pokemon[pokemon_id].forms[form_id].attack; - defense = WDR.Master.Pokemon[pokemon_id].forms[form_id].defense; - stamina = WDR.Master.Pokemon[pokemon_id].forms[form_id].stamina; - } else { - attack = WDR.Master.Pokemon[pokemon_id].attack; - defense = WDR.Master.Pokemon[pokemon_id].defense; - stamina = WDR.Master.Pokemon[pokemon_id].stamina; - } - - let sprite = WDR.Get_Sprite(WDR, pokemon); - let chart_embed = new WDR.DiscordJS.MessageEmbed() - .setColor(pokemon_color) - .setThumbnail(sprite) - .setTitle('**' + pokemon_name + '** Raid CP Chart') - .setDescription('**(ATK,DEF,STA)\t\t LvL' + level + ' CP\t\t%**' + result_string); - - if (discord.spam_channels.indexOf(message.channel.id) >= 0) { - return WDR.Send_Embed(WDR, 'chart', 0, discord, role_id, chart_embed, message.channel.id); - } else { - guild.members.fetch(message.author.id).then(TARGET => { - return TARGET.send(chart_embed).catch(console.error); - }); - } -} - -async function initiate_collector(WDR, source, message, msg, nickname, prefix, discord) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - let msg_count = 0; - - // FILTER COLLECT EVENT - await collector.on('collect', message => { - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - let pokemon = message.content.toLowerCase(); - - if (pokemon != 'NaN' && pokemon < 809) { - collector.stop({ - pokemon_id: pokemon.split(' ')[0], - form_id: pokemon.split(' ')[1] - }); - } - - let searched = WDR.Master.Pokemon_ID_Search(WDR, pokemon); - if (searched) { - collector.stop(searched); - } - - if (pokemon === 'cancel' || pokemon === 'time') { - collector.stop('cancel'); - } else { - collector.stop('retry'); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - break; - case 'time': - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - case 'retry': - message.reply('Please check your spelling, and retry.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - default: - pokemon_view(WDR, message, nickname, reason, prefix, discord); - } - return; - }); -} \ No newline at end of file diff --git a/src/commands/subscription/rank.js b/src/commands/subscription/rank.js deleted file mode 100644 index a99c705..0000000 --- a/src/commands/subscription/rank.js +++ /dev/null @@ -1,334 +0,0 @@ -const Fuzzy = require('fuzzy'); - -const InsideGeojson = require('point-in-geopolygon'); -const pvp = require(__dirname + '/../../pvp.js'); - -module.exports = async (WDR, message, prefix, discord) => { - - let available_stops = []; - - // GET USER NICKNAME - let nickname = ''; - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let request_action = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What rank do you want to search for?') - .setDescription('`Great` » Great League.\n' + - '`Ultra` » Ultra League.') - .setFooter('Type the league, no command prefix required.'); - - message.channel.send(request_action).catch(console.error).then(msg => { - return initiate_collector(WDR, 'start', message, msg, nickname, prefix, discord); - }); -} - -// SUBSCRIPTION CREATE FUNCTION -async function subscription_create(WDR, message, nickname, prefix, league, discord) { - - // DEFINED THE SUBSCRIPTION OBJECT - let rank = {}, - ranks = {}, - filter = {}, - got_name = false; - switch (league) { - case 'Great': - filter.min_cp_range = 0; - filter.max_cp_range = 1500; - break; - case 'Ultra': - filter.min_cp_range = 1500; - filter.max_cp_range = 2500; - break; - default: - filter.min_cp_range = 0; - filter.max_cp_range = 5000; - } - - // RETRIEVE POKEMON NAME FROM USER - do { - rank.pokemon = await sub_collector(WDR, 'Pokemon', nickname, message, league, 'Respond with Pokémon name. Names are not case-sensitive.', rank, discord); - if (rank.pokemon) { - got_name = true - } - if (rank.pokemon == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, discord); - } else if (rank.pokemon == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, discord); - } - - } while (got_name == false); - - // RETRIEVE TYPE NAME FROM USER - rank.stats = await sub_collector(WDR, 'Stats', nickname, message, league, 'Respond with stats in the format of ATK/DEF/STA (i.e. 2/14/15)', rank, discord); - if (rank.stats == 'cancel') { - return subscription_cancel(WDR, nickname, message, prefix, discord); - } else if (rank.stats == 'time') { - return subscription_timedout(WDR, nickname, message, prefix, discord); - } - - if (rank.stats == 'top') { - ranks = await pvp.CalculateTopRanks(WDR, rank.pokemon.pokemon_id, rank.pokemon.form, filter.max_cp_range); - } else { - ranks = await pvp.SearchTopRank(WDR, rank, filter); - } - - // DETERMINE BASE STATS - let base_attack = '', - base_defense = '', - base_stamina = ''; - if (!WDR.Master.Pokemon[rank.pokemon.pokemon_id].attack) { - base_attack = WDR.Master.Pokemon[rank.pokemon.pokemon_id].forms[rank.pokemon.form].attack; - base_defense = WDR.Master.Pokemon[rank.pokemon.pokemon_id].forms[rank.pokemon.form].defense; - base_stamina = WDR.Master.Pokemon[rank.pokemon.pokemon_id].forms[rank.pokemon.form].stamina; - } else { - base_attack = WDR.Master.Pokemon[rank.pokemon.pokemon_id].attack; - base_defense = WDR.Master.Pokemon[rank.pokemon.pokemon_id].defense; - base_stamina = WDR.Master.Pokemon[rank.pokemon.pokemon_id].stamina; - } - // DETERMINE CURRENT STATS - let current_CPMultiplier = WDR.cp_multiplier[ranks.level]; - let current_attack = Math.round((base_attack + rank.stats.atk) * current_CPMultiplier * 100) / 100; - let current_defense = Math.round((base_defense + rank.stats.def) * current_CPMultiplier * 100) / 100; - let current_stamina = Math.floor((base_stamina + rank.stats.sta) * current_CPMultiplier); - - // DETERMINE BEST STATS - let best_CPMultiplier = WDR.cp_multiplier[ranks.topRank.level]; - let best_attack = Math.round((base_attack + ranks.topRank.atk) * best_CPMultiplier * 100) / 100; - let best_defense = Math.round((base_defense + ranks.topRank.def) * best_CPMultiplier * 100) / 100; - let best_stamina = Math.floor((base_stamina + ranks.topRank.sta) * best_CPMultiplier); - - // DEFINE VARIABLES - let sprite = WDR.Get_Sprite(WDR, rank.pokemon); - let locale = await WDR.Get_Data(WDR, rank.pokemon); - let typing = await WDR.Get_Typing(WDR, rank.pokemon); - - // BUILD EMBED - let rank_embed = new WDR.DiscordJS.MessageEmbed() - .setColor(typing.color) - .setThumbnail(sprite) - .addField('**' + locale.pokemon_name + '** ' + locale.form + typing.type, league + ' League Ranks') - // SEARCHED STATS - .addField('You searched for:', '**IV**: ' + rank.stats.atk + '/' + rank.stats.def + '/' + rank.stats.sta + ' **(' + ranks.percent + '%)**\n' + - '**CP**: ' + pvp.CalculateCP(WDR, rank.pokemon.pokemon_id, rank.pokemon.form, rank.stats.atk, rank.stats.def, rank.stats.sta, ranks.level) + '\n' + - '**Level**: ' + ranks.level + '\n' + - '**Rank**: ' + ranks.rank + '/4096\n' + - '**Stats**: *ATK*: ' + current_attack + ' *DEF*: ' + current_defense + ' *STA*: ' + current_stamina, true) - // TOP STATS - .addField('Best Availble Stats:', '**IV**: ' + ranks.topRank.atk + '/' + ranks.topRank.def + '/' + ranks.topRank.sta + ' **(' + ranks.topRank.percent + '%)**\n' + - '**CP**: ' + pvp.CalculateCP(WDR, rank.pokemon.pokemon_id, rank.pokemon.form, ranks.topRank.atk, ranks.topRank.def, ranks.topRank.sta, ranks.topRank.level) + '\n' + - '**Level**: ' + ranks.topRank.level + '\n' + - '**Rank**: ' + ranks.topRank.rank + '/4096\n' + - '**Stats**: *ATK*: ' + best_attack + ' *DEF*: ' + best_defense + ' *STA*: ' + best_stamina, true); - - if (message.channel.type == 'dm') { - return message.channel.send(rank_embed).catch(console.error); - } else if (discord.spam_channels.indexOf(message.channel.id) >= 0) { - return WDR.Send_Embed(WDR, 'chart', 0, discord, role_id, rank_embed, message.channel.id); - } else { - // CHECK IF THE TARGET IS A USER - let member = WDR.Bot.guilds.cache.get(discord.id).members.cache.get(message.author.id); - if (!member) { - return; - } - return member.send(rank_embed).catch(console.error); - } -} - -// SUB COLLECTOR FUNCTION -function sub_collector(WDR, type, nickname, message, league, requirements, rank, discord) { - return new Promise(function(resolve, reject) { - - // DELCARE VARIABLES - let timeout = true, - instruction = ''; - - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 30000 - }); - - switch (type) { - - // RANK POKEMON EMBED - case 'Pokemon': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Pokémon would you like to evaluate for ' + league + ' League?') - .setFooter(requirements); - break; - - // RANK STATS EMBED - case 'Stats': - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What are the stats of ' + rank.pokemon.pokemon_name + '?') - .setFooter(requirements); - break; - - // DEFAULT EMBED - default: - instruction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What **' + type + '** would like you like to set for **' + object + '** Invasion Notifications?') - .setFooter(requirements); - } - - message.channel.send(instruction).catch(console.error).then(msg => { - - // DEFINED VARIABLES - let input = ''; - - // FILTER COLLECT EVENT - collector.on('collect', message => { - switch (true) { - - // CANCEL SUB - case message.content.toLowerCase() == 'stop': - case message.content.toLowerCase() == 'cancel': - collector.stop('cancel'); - break; - - // POKEMON NAME - case type.indexOf('Pokemon') >= 0: - let searched = WDR.Master.Pokemon_ID_Search(WDR, message.content.toLowerCase()); - if (searched) { - collector.stop(searched); - } else { - message.reply('`' + searched + '` doesn\'t appear to be a valid Pokémon name. Please check the spelling and try again.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - - // STATS CONFIRMATION - case type.indexOf('Stats') >= 0: - if (message.content.toLowerCase() == 'top') { - collector.stop('top'); - } else { - let args = message.content.split('/'); - let stats = { - atk: parseInt(args[0], 10), - def: parseInt(args[1], 10), - sta: parseInt(args[2], 10) - } - switch (true) { - case stats.atk == undefined: - case stats.atk > 15: - case stats.atk < 0: - case !Number.isInteger(stats.atk): - message.reply('ATK: `' + stats.atk + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - case stats.def == undefined: - case stats.def > 15: - case stats.def < 0: - case !Number.isInteger(stats.def): - message.reply('DEF: `' + stats.def + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - case stats.sta == undefined: - case stats.sta > 15: - case stats.sta < 0: - case !Number.isInteger(stats.sta): - message.reply('ATK: `' + stats.sta + '` is an Invalid Input. ' + requirements).then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - default: - collector.stop(stats); - } - } - break; - - } - }); - - // COLLECTOR ENDED - collector.on('end', (collected, reason) => { - msg.delete(); - return resolve(reason); - }); - }); - }); -} - -function subscription_cancel(WDR, nickname, message, prefix, discord) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Subscription Cancelled.') - .setDescription('Nothing has been Saved.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, 'cancel', message, msg, nickname, prefix, discord); - }); -} - -function subscription_timedout(WDR, nickname, message, prefix, discord) { - let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('Subscription Timed Out.') - .setDescription('Nothing has been Saved.') - .setFooter('You can type \'view\', \'add\', or \'remove\'.'); - message.channel.send(subscription_cancel).then(msg => { - return initiate_collector(WDR, 'time', message, msg, nickname, prefix, discord); - }); -} - -function initiate_collector(WDR, source, message, msg, nickname, prefix, discord) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - - // FILTER COLLECT EVENT - collector.on('collect', message => { - switch (message.content.toLowerCase()) { - case 'great': - collector.stop('great'); - break; - case 'ultra': - collector.stop('ultra'); - break; - default: - collector.stop('end'); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - resolve('cancel'); - break; - case 'great': - subscription_create(WDR, message, nickname, prefix, 'Great', discord); - break; - case 'ultra': - subscription_create(WDR, message, nickname, prefix, 'Ultra', discord); - break; - default: - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - } - return; - }); -} \ No newline at end of file diff --git a/src/commands/subscription/resume.js b/src/commands/subscription/resume.js deleted file mode 100644 index 0290def..0000000 --- a/src/commands/subscription/resume.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = async (WDR, Message) => { - WDR.wdrDB.query( - `UPDATE - wdr_users - SET - status = 1, - pokemon_status = 1, - pvp_status = 1, - quest_status = 1, - raid_status = 1, - lure_status = 1, - invasion_status = 1 - WHERE - user_id = ${Member.id}`, - function(error, user, fields) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pause.js] Error Resuming Subscriptions.", preset); - console.error(error); - return Message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(15000)).catch(console.error); - } else { - WDR.wdrDB.query( - `UPDATE - wdr_subscriptions - SET - status = 1 - WHERE - user_id = ${Member.id}`, - function(error, user, fields) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pause.js] Error Resuming Subscriptions.", preset); - console.error(error); - return Message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete(15000)).catch(console.error); - } else { - return Message.reply('All of your subscriptions are now `PAUSED`.').then(m => m.delete(15000)).catch(console.error); - } - } - ); - } - } - ); -} \ No newline at end of file diff --git a/src/commands/subscription/seen.js b/src/commands/subscription/seen.js deleted file mode 100644 index a64e709..0000000 --- a/src/commands/subscription/seen.js +++ /dev/null @@ -1,180 +0,0 @@ -const GeoTz = require('geo-tz'); - -const Send_Nest = require(__dirname + '/../../embeds/nests.js'); -const InsideGeojson = require('point-in-geopolygon'); - -module.exports = async (WDR, message, prefix, discord) => { - - // GET USER NICKNAME - let nickname = ''; - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let requestAction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Pokémon do you want stats for?\nAnd How many days back do you want to search? (7 Max)') - .setFooter('Type the name of desired Poké, followed by the number of days in the past you want to search, no command prefix required. If you do not specify the number of days, it will search all sightings in the last hour.'); - - message.channel.send(requestAction).catch(console.error).then(msg => { - initiate_collector(WDR, 'start', message, msg, nickname, prefix, discord); - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - return; - }); -} - -async function pokemon_view(WDR, message, nickname, target, prefix, discord) { - let guild = WDR.Bot.guilds.cache.get(discord.id); - let locale = await WDR.Get_Data(WDR, target); - let pokemon_name = locale.pokemon_name; - - message.reply('Searching... this may take a minute. Check your inbox if not in the channel.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - let search = ''; - if (target.duration) { - if (target.duration > 7) { - target.duration = 7; - } - target.period = target.duration * 86400; - } else { - target.period = 3600; - } - //console.log('TARGET',target); - let coordinates = discord.geofence[0] + ''; - coordinates = coordinates.split(','); - let coords = ' AND (ST_WITHIN(point(pokemon.lon,pokemon.lat), ST_GEOMFROMTEXT(\'POLYGON((', - degrees = 'lon'; - coordinates.forEach((point) => { - coords += point; - if (degrees == 'lon') { - coords += ' '; - degrees = 'lat'; - } else { - coords += ','; - degrees = 'lon'; - } - }); - coords = coords.slice(0, -1); - coords += '))\')) )'; - //console.log(coords); - - if (target.name == 'all') { - pokemon_name = 'ALL'; - } - if (target.pokemon_id == 132) { - search = 'weather > 0 AND (atk_iv < 4 OR def_iv < 4 OR sta_iv < 4 OR level < 6) AND ' - } else { - search = 'pokemon_id = ? AND '; - } - - let query = `SELECT COUNT(*) as total, SUM(shiny = 1) AS shiny, SUM(shiny IS NOT NULL) AS count FROM pokemon WHERE ` + search + `first_seen_timestamp >= UNIX_TIMESTAMP()-` + target.period + coords; - WDR.scannerDB.query(query, [target.pokemon_id], function(error, stats, fields) { - if (error) { - console.error(error); - } - if (!stats) { - return message.reply('There have been 0 seen.'); - } - let pokemon_count = stats[0].total, - role_id = ''; - if (stats[0].shiny > 0) { - let probability = (stats[0].count / stats[0].shiny).toFixed(); - pokemon_count = pokemon_count + '. ' + stats[0].shiny + ' shiny of ' + stats[0].count + ' encountered with a 1/' + probability + ' chance' - } - - let stat_message = target.duration ? 'There have been ' + pokemon_count + '. ' + pokemon_name + ' seen in ' + target.duration + ' day(s).' : 'There have been ' + pokemon_count + '. ' + pokemon_name + ' seen in the last hour.'; - - // SEND THE USER A DM OR TO THE CHANNEL IF IN THE CONFIG - if (discord.spam_channels && discord.spam_channels.indexOf(message.channel.id) >= 0) { - return message.reply(stat_message); - } else { - guild.members.fetch(message.author.id).then(TARGET => { - return TARGET.send(stat_message).catch(console.error); - }); - } - }); -} - -async function initiate_collector(WDR, source, message, msg, nickname, prefix, discord) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - let msg_count = 0; - - // FILTER COLLECT EVENT - await collector.on('collect', message => { - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - let args = message.content.split(' '); - let pokemon = args[0].toString().toLowerCase(); - if (args[1] && isNaN(args[1])) { - message.reply('Invalid input. Please type <#ofdays>.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } else { - let target = {}; - target.duration = args[1]; - target.name = pokemon; - - if (pokemon != 'NaN' && pokemon < 809) { - target.pokemon_id = pokemon; - collector.stop(target); - } - - if (pokemon == 'all') { - collector.stop(target); - } - - let searched = WDR.Master.Pokemon_ID_Search(WDR, pokemon); - if (searched) { - searched.duration = args[1]; - collector.stop(searched); - } - - if (pokemon === 'cancel' || pokemon === 'time') { - collector.stop('cancel'); - } else { - collector.stop('retry'); - } - } - - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - break; - case 'time': - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - case 'retry': - message.reply('Please check your spelling, and retry.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - default: - pokemon_view(WDR, message, nickname, reason, prefix, discord); - } - return; - }); -} \ No newline at end of file diff --git a/src/commands/subscription/timedout.js b/src/commands/subscription/timedout.js new file mode 100644 index 0000000..9fe4543 --- /dev/null +++ b/src/commands/subscription/timedout.js @@ -0,0 +1,9 @@ +module.exports = (WDR, Functions, Message, Member) => { + let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor("00ff00") + .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) + .setTitle("Your Subscription Has Timed Out.") + .setDescription("Nothing has been Saved."); + return Message.channel.send(subscription_cancel).then(m => m.delete({ + timeout: 5000 + })).catch(console.error); +} \ No newline at end of file diff --git a/src/commands/subscription/weathercp.js b/src/commands/subscription/weathercp.js deleted file mode 100644 index 1b034ce..0000000 --- a/src/commands/subscription/weathercp.js +++ /dev/null @@ -1,145 +0,0 @@ -const GeoTz = require('geo-tz'); - -const Send_Nest = require(__dirname + '/../../embeds/nests.js'); -const InsideGeojson = require('point-in-geopolygon'); -const pvp = require(__dirname + '/../../pvp.js'); - -module.exports = async (WDR, message, prefix, discord) => { - - // GET USER NICKNAME - let nickname = ''; - if (message.member) { - if (message.member.nickname) { - nickname = message.member.nickname; - } else { - nickname = message.member.user.username; - } - } else { - nickname = message.author.username; - } - - let requestAction = new WDR.DiscordJS.MessageEmbed() - .setAuthor(nickname, message.author.displayAvatarURL) - .setTitle('What Pokémon do you want a CP search string for?') - .setFooter('Type the name of desired Poké, no command prefix required.'); - - message.channel.send(requestAction).catch(console.error).then(msg => { - initiate_collector(WDR, 'start', message, msg, nickname, prefix, discord); - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - return; - }); -} - -async function pokemon_view(WDR, message, nickname, pokemon, prefix, discord) { - let guild = WDR.Bot.guilds.cache.get(discord.id); - let pokemon_id = pokemon.pokemon_id, - form_id = pokemon.form; - let locale = await WDR.Get_Data(WDR, pokemon); - - let result_string = '```', - role_id = ''; - let pokemon_name = locale.pokemon_name; - let pokemon_color = locale.color, - level = 25; - let pokemon_type = locale.type, - weaknesses = locale.weaknesses; - for (var atk = 15; atk >= 13; atk--) { - for (var def = 15; def >= 13; def--) { - for (var sta = 15; sta >= 13; sta--) { - iv_percent = Math.round((atk + def + sta) / 45 * 100); - result_string += atk + ',' + def + ',' + sta + ' ' + pvp.CalculateCP(WDR, pokemon_id, form_id, atk, def, sta, level) + ' CP ' + iv_percent + '%\n'; - } - } - } - result_string += '```'; - - // DETERMINE BASE STATS - if (!WDR.Master.Pokemon[pokemon_id].attack) { - form_name = locale.form_name; - attack = WDR.Master.Pokemon[pokemon_id].forms[form_id].attack; - defense = WDR.Master.Pokemon[pokemon_id].forms[form_id].defense; - stamina = WDR.Master.Pokemon[pokemon_id].forms[form_id].stamina; - } else { - attack = WDR.Master.Pokemon[pokemon_id].attack; - defense = WDR.Master.Pokemon[pokemon_id].defense; - stamina = WDR.Master.Pokemon[pokemon_id].stamina; - } - - let sprite = WDR.Get_Sprite(WDR, pokemon); - let chart_embed = new WDR.DiscordJS.MessageEmbed() - .setColor(pokemon_color) - .setThumbnail(sprite) - .setTitle('**' + pokemon_name + '** Weatherboosted CP Chart') - .setDescription('**(ATK,DEF,STA)\t\t LvL' + level + ' CP\t\t%**' + result_string); - - if (discord.spam_channels.indexOf(message.channel.id) >= 0) { - return WDR.Send_Embed(WDR, 'chart', 0, discord, role_id, chart_embed, message.channel.id); - } else { - guild.members.fetch(message.author.id).then(TARGET => { - return TARGET.send(chart_embed).catch(console.error); - }); - } -} - -async function initiate_collector(WDR, source, message, msg, nickname, prefix, discord) { - // DEFINE COLLECTOR AND FILTER - const filter = cMessage => cMessage.author.id == message.author.id; - const collector = message.channel.createMessageCollector(filter, { - time: 60000 - }); - let msg_count = 0; - - // FILTER COLLECT EVENT - await collector.on('collect', message => { - if (WDR.config.Tidy_Channel == 'ENABLED' && discord.command_channels.indexOf(message.channel.id) < 0 && discord.spam_channels.indexOf(message.channel.id) < 0 && message.channel.type != 'dm' && message) { - message.delete(); - } - let pokemon = message.content.toLowerCase(); - - if (pokemon != 'NaN' && pokemon < 809) { - collector.stop({ - pokemon_id: pokemon.split(' ')[0], - form_id: pokemon.split(' ')[1] - }); - } - - let searched = WDR.Master.Pokemon_ID_Search(WDR, pokemon); - if (searched) { - collector.stop(searched); - } - - if (pokemon === 'cancel' || pokemon === 'time') { - collector.stop('cancel'); - } else { - collector.stop('retry'); - } - }); - - // COLLECTOR HAS BEEN ENDED - collector.on('end', (collected, reason) => { - - // DELETE ORIGINAL MESSAGE - msg.delete(); - switch (reason) { - case 'cancel': - break; - case 'time': - if (source == 'start') { - message.reply('Your subscription has timed out.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - } - break; - case 'retry': - message.reply('Please check your spelling, and retry.').then(m => m.delete({ - timeout: 5000 - })).catch(console.error); - break; - default: - pokemon_view(WDR, message, nickname, reason, prefix, discord); - } - return; - }); -} \ No newline at end of file diff --git a/src/database.js b/src/database.js index 2d50a92..12e2cd6 100644 --- a/src/database.js +++ b/src/database.js @@ -2,10 +2,207 @@ const Ontime = require("ontime"); var Queries = {}; const DB = { - //############################################################################ Queries: {}, + Load: function(WDR, database) { + return new Promise(async resolve => { + WDR[database] = WDR.MySQL.createPool({ + supportBigNumbers: true, + connectionLimit: 100, + host: WDR.Config[database].host, + user: WDR.Config[database].username, + password: WDR.Config[database].password, + port: WDR.Config[database].port, + database: WDR.Config[database].db_name + }); + + WDR[database].on("enqueue", function() { + WDR.Console.error(WDR, "[src/database.js] Your " + database.toUpperCase() + " Query Load is Exceeding the Pool Size."); + }); + + switch (database) { + case "wdrDB": + await create_tables(WDR); + await update_database(WDR); + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_info`, + async function(error, row) { + if (error) { + WDR.Console.error(WDR, "[src/database.js] Error connecting to wdrDB.", error); + return resolve(); + } else if (row[0].pvp_tables_generated < 1) { + WDR.Console.error(WDR, "[src/database.js] PvP Tables Not Found. Generating..."); + await WDR.PvP_Table_Generator(WDR); + WDR.wdrDB.query( + `UPDATE + wdr_info + SET + pvp_tables_generated = 1;` + ); + WDR.Console.log(WDR, "[src/database.js] Generated PvP Tables."); + return resolve(WDR); + } else { + WDR.Console.info(WDR, "[src/database.js] Successfully Connected to wdrDB."); + return resolve(WDR); + } + } + ); + break; + + case "pmsfDB": + WDR.pmsfDB.query( + `SELECT + count(*) + FROM + users`, + function(error, row) { + if (error) { + WDR.Console.error(WDR, "[src/database.js] Error connecting to pmsfDB.", error); + return resolve(); + } else { + WDR.Console.info(WDR, "[src/database.js] Successfully Connected to pmsfDB."); + return resolve(WDR); + } + } + ); + break; + + case "scannerDB": + WDR.scannerDB.query( + `SELECT + count(*) + FROM + gym`, + async function(error, row) { + if (error) { + WDR.Console.error(WDR, "[src/database.js] Error connecting to scannerDB.", error); + return resolve(); + } else { + WDR.Console.info(WDR, "[src/database.js] Successfully Connected to scannerDB."); + + // LOAD DATA ARRAYS FROM SCANNER DB + WDR.Gym_Array = []; + WDR.Pokestop_Array = []; + WDR.Pokemon_Array = []; + WDR.Park_Array = []; + + // LOAD POKEMON ARRAY + WDR.Pokemon_Array = Object.keys(WDR.Master.Pokemon).map(i => WDR.Master.Pokemon[i].name); + + WDR.Console.info(WDR, "[src/database.js] Loaded " + WDR.Pokemon_Array.length + " Pokemon into the Pokemon Array."); + + // CHECK HOW MANY GYMS DO NOT HAVE NAMES + await WDR.scannerDB.promise().query( + `SELECT + * + FROM + gym + WHERE + name is NULL` + ).then(([null_gyms, fields]) => { + if (null_gyms && null_gyms.length > 0) { + WDR.Console.error(WDR, "[src/database.js] You have " + null_gyms.length + " Gyms without Names in your Database."); + } + }); + // CHECK HOW MANY POKESTOPS DO NOT HAVE NAMES + await WDR.scannerDB.promise().query( + `SELECT + * + FROM + pokestop + WHERE + name is NULL` + ).then(([null_stops, fields]) => { + if (null_stops && null_stops.length > 0) { + WDR.Console.error(WDR, "[src/database.js] You have " + null_stops.length + " Pokestops without Names in your Database."); + } + }); + // GYM NAMES ARRAY + await WDR.scannerDB.promise().query( + `SELECT + * + FROM + gym + WHERE + name is not NULL` + ).then(([gyms, fields]) => { + if (gyms) { + for (let g = 0, g_len = gyms.length; g < g_len; g++) { + let gym = gyms[g]; + let record = {}; + record.name = gym.name; + record.id = gym.id; + record.lat = gym.lat; + record.lon = gym.lon; + WDR.Gym_Array.push(record); + } + + // LOG SUCCESS AND COUNTS + WDR.Console.info(WDR, "[src/database.js] Loaded " + WDR.Gym_Array.length + " Gyms into the Gym Array."); + } + }); + // POKESTOP NAMES ARRAY + await WDR.scannerDB.promise().query( + `SELECT + * + FROM + pokestop + WHERE + name is not NULL` + ).then(([stops, fields]) => { + if (stops) { + for (let s = 0, s_len = stops.length; s < s_len; s++) { + let stop = stops[s]; + let record = {}; + record.name = stop.name; + record.id = stop.id; + record.lat = stop.lat; + record.lon = stop.lon; + WDR.Pokestop_Array.push(record); + } + + // LOG SUCCESS AND COUNTS + WDR.Console.info(WDR, "[src/database.js] Loaded " + WDR.Pokestop_Array.length + " Pokestops into the Pokestop Array."); + } + }); + + if (WDR.Fs.existsSync(WDR.Dir + "/configs/db/quarterhourly.js")) { + DB.Queries.Minute = require(WDR.Dir + "/configs/db/quarterhourly.js"); + DB.QuarterHourly(WDR, DB.Queries.Minute); + } + + if (WDR.Fs.existsSync(WDR.Dir + "/configs/db/hourly.js")) { + DB.Queries.Hour = require(WDR.Dir + "/configs/db/hourly.js"); + DB.Hourly(WDR, DB.Queries.Hour); + } + + if (WDR.Fs.existsSync(WDR.Dir + "/configs/db/daily.js")) { + DB.Queries.Day = require(WDR.Dir + "/configs/db/daily.js"); + DB.Daily(WDR, DB.Queries.Day); + } + + if (WDR.Fs.existsSync(WDR.Dir + "/configs/db/scheduled.js")) { + DB.Queries.Scheduled = require(WDR.Dir + "/configs/db/scheduled.js"); + DB.Scheduled(WDR, DB.Queries.Scheduled); + } + + // END + return resolve(WDR); + } + } + ); + break; + + default: + WDR.Console.error(WDR, "You failed at modifying the WDR Code."); + process.exit(1); + } + }); + }, //############################################################################ QuarterHourly: function(WDR, QuarterHourly) { @@ -19,7 +216,7 @@ const DB = { query[1], function(error, data) { if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] QuarterHourly Ontime Query Failed.", query[1]); + WDR.Console.error(WDR, "[src/database.js] QuarterHourly Ontime Query Failed.", query[1]); console.error(error) } } @@ -28,7 +225,7 @@ const DB = { }); return ot.done(); }); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Loaded " + QuarterHourly.length + " queries to run every 15 minutes."); + WDR.Console.info(WDR, "[src/database.js] Loaded " + QuarterHourly.length + " queries to run every 15 minutes."); return; }, @@ -44,7 +241,7 @@ const DB = { query[1], function(error, data) { if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Hourly Ontime Query Failed.", error); + WDR.Console.error(WDR, "[src/database.js] Hourly Ontime Query Failed.", error); } } ); @@ -52,7 +249,7 @@ const DB = { }); return ot.done(); }); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Loaded " + Hourly.length + " queries to run every hour."); + WDR.Console.info(WDR, "[src/database.js] Loaded " + Hourly.length + " queries to run every hour."); return; }, @@ -69,21 +266,26 @@ const DB = { Ontime({ cycle: [daily_time] }, function(ot) { - Daily.forEach((query, index) => { - setTimeout(function() { - WDR[query[0]].query( - query[1], - function(error, data) { - if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Daily Ontime Query Failed.", error); + try { + Daily.forEach((query, index) => { + setTimeout(function() { + WDR[query[0]].query( + query[1], + function(error, data) { + if (error) { + WDR.Console.error(WDR, "[src/database.js] Daily Ontime Query Failed.", error); + } } - } - ); - }, 1000 * (60 * index)); // 60 second intervals - }); + ); + }, 1000 * (60 * index)); // 60 second intervals + }); + } catch (e) { + WDR.WDR.Console.error(WDR, "Error executing daily database query", query); + console.error(e); + } return ot.done(); }); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Loaded " + Daily.length + " queries to run every day."); + WDR.Console.info(WDR, "[src/database.js] Loaded " + Daily.length + " queries to run every day."); return; }, @@ -109,25 +311,23 @@ const DB = { query[2], function(error, data) { if (error) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Scheduled Ontime Query Failed.", query); + WDR.Console.error(WDR, "[src/database.js] Scheduled Ontime Query Failed.", query); console.error(error); } } ); return ot.done(); }); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Loaded query to run at " + scheduled_time + "."); + WDR.Console.info(WDR, "[src/database.js] Loaded query to run at " + scheduled_time + "."); } catch (e) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Daily Ontime Query Failed.", query); + WDR.Console.error(WDR, "[src/database.js] Daily Ontime Query Failed.", query); console.error(e); } }); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Loaded " + count + " scheduled queries."); + WDR.Console.info(WDR, "[src/database.js] Loaded " + count + " scheduled queries."); return; }, - //############################################################################ - Interval: function(WDR) { // SEND QUEST DMs WDR.wdrDB.query( @@ -143,23 +343,23 @@ const DB = { setTimeout(async function() { let guild = WDR.bot_array[alert.bot].guilds.cache.get(alert.discord_id); let user = guild.members.fetch(alert.user_id).catch(error => { - console.error("[BAD USER ID] " + alert.user_id, error); + WDR.Console.error(WDR, "[BAD USER ID] " + alert.user_id, error); }); WDR.Bots.Array[alert.bot].guilds.cache.get(alert.discord_id).members.fetch(alert.user_id).then(TARGET => { let quest_embed = JSON.parse(alert.embed); TARGET.send({ embed: quest_embed }).catch(error => { - return console.error("[" + WDR.Time(null, "log") + "] " + TARGET.user.tag + " (" + alert.user_id + ") , CANNOT SEND THIS USER A MESSAGE.", error); + return WDR.Console.error(WDR, "[" + WDR.Time(null, "log") + "] " + TARGET.user.tag + " (" + alert.user_id + ") , CANNOT SEND THIS USER A MESSAGE.", error); }); }); }, 2000 * index); }); WDR.wdrDB.query( `DELETE FROM - wdr_queued - WHERE - alert_time < UNIX_TIMESTAMP()*1000`, + wdr_queued + WHERE + alert_time < UNIX_TIMESTAMP()*1000`, function(error, alerts, fields) { if (error) { console.error; @@ -170,203 +370,6 @@ const DB = { } ); return; - }, - - //############################################################################ - - Load: function(WDR, database) { - return new Promise(async resolve => { - - let connections = 5; - if (database == "wdrDB") { - connections = 100; - } - - WDR[database] = WDR.MySQL.createPool({ - supportBigNumbers: true, - connectionLimit: connections, - host: WDR.Config[database].host, - user: WDR.Config[database].username, - password: WDR.Config[database].password, - port: WDR.Config[database].port, - database: WDR.Config[database].db_name - }); - - WDR[database].on("enqueue", function() { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Your " + database.toUpperCase() + " Query Load is Exceeding the Pool Size."); - }); - - switch (database) { - case "wdrDB": - await create_tables(WDR); - await update_database(WDR); - await WDR.wdrDB.promise().query( - `SELECT - * - FROM - wdr_info` - ).then(async ([row, fields]) => { - if (row[0].pvp_tables_generated < 1) { - console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] PvP Tables Not Found. Generating...").bold.brightRed); - await WDR.PvP_Table_Generator(WDR); - WDR.wdrDB.query( - `UPDATE - wdr_info - SET - pvp_tables_generated = 1;` - ); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Generated PvP Tables.".bold.brightGreen); - - } - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Successfully Connected to wdrDB."); - - }).catch(error => { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Error connecting to wdrDB.", error); - return resolve(); - }); - // END - return resolve(WDR); - - case "pmsfDB": - await WDR.pmsfDB.promise().query( - `SELECT - count(*) - FROM - users` - ).then(async ([rows, fields]) => { - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Successfully Connected to pmsfDB."); - }).catch(error => { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Error connecting to pmsfDB.", error); - return resolve(); - }); - // END - return resolve(WDR); - - case "scannerDB": - await WDR.scannerDB.promise().query( - `SELECT - count(*) - FROM - gym` - ).then(([rows, fields]) => { - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Successfully Connected to scannerDB."); - }).catch(error => { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Error connecting to scannerDB.", error); - return resolve(); - }); - // LOAD DATA ARRAYS FROM SCANNER DB - WDR.Gym_Array = []; - WDR.Pokestop_Array = []; - WDR.Pokemon_Array = []; - WDR.Park_Array = []; - - // LOAD POKEMON ARRAY - WDR.Pokemon_Array = Object.keys(WDR.Master.Pokemon).map(i => WDR.Master.Pokemon[i].name); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Loaded " + WDR.Pokemon_Array.length + " Pokemon into the Pokemon Array."); - - // CHECK HOW MANY GYMS DO NOT HAVE NAMES - await WDR.scannerDB.promise().query( - `SELECT - * - FROM - gym - WHERE - name is NULL` - ).then(([null_gyms, fields]) => { - if (null_gyms && null_gyms.length > 0) { - console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] You have " + null_gyms.length + " Gyms without Names in your Database.").bold.brightRed); - } - }); - // CHECK HOW MANY POKESTOPS DO NOT HAVE NAMES - await WDR.scannerDB.promise().query( - `SELECT - * - FROM - pokestop - WHERE - name is NULL` - ).then(([null_stops, fields]) => { - if (null_stops && null_stops.length > 0) { - console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] You have " + null_stops.length + " Pokestops without Names in your Database.").bold.brightRed); - } - }); - // GYM NAMES ARRAY - await WDR.scannerDB.promise().query( - `SELECT - * - FROM - gym - WHERE - name is not NULL` - ).then(([gyms, fields]) => { - if (gyms) { - for (let g = 0, g_len = gyms.length; g < g_len; g++) { - let gym = gyms[g]; - let record = {}; - record.name = gym.name; - record.id = gym.id; - record.lat = gym.lat; - record.lon = gym.lon; - WDR.Gym_Array.push(record); - } - - // LOG SUCCESS AND COUNTS - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Loaded " + WDR.Gym_Array.length + " Gyms into the Gym Array."); - } - }); - // POKESTOP NAMES ARRAY - await WDR.scannerDB.promise().query( - `SELECT - * - FROM - pokestop - WHERE - name is not NULL` - ).then(([stops, fields]) => { - if (stops) { - for (let s = 0, s_len = stops.length; s < s_len; s++) { - let stop = stops[s]; - let record = {}; - record.name = stop.name; - record.id = stop.id; - record.lat = stop.lat; - record.lon = stop.lon; - WDR.Pokestop_Array.push(record); - } - - // LOG SUCCESS AND COUNTS - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Loaded " + WDR.Pokestop_Array.length + " Pokestops into the Pokestop Array."); - } - }); - - if (WDR.Fs.existsSync(WDR.dir + "/configs/db/quarterhourly.js")) { - DB.Queries.Minute = require(WDR.dir + "/configs/db/quarterhourly.js"); - DB.QuarterHourly(WDR, DB.Queries.Minute); - } - - if (WDR.Fs.existsSync(WDR.dir + "/configs/db/hourly.js")) { - DB.Queries.Hour = require(WDR.dir + "/configs/db/hourly.js"); - DB.Hourly(WDR, DB.Queries.Hour); - } - - if (WDR.Fs.existsSync(WDR.dir + "/configs/db/daily.js")) { - DB.Queries.Day = require(WDR.dir + "/configs/db/daily.js"); - DB.Daily(WDR, DB.Queries.Day); - } - - if (WDR.Fs.existsSync(WDR.dir + "/configs/db/scheduled.js")) { - DB.Queries.Scheduled = require(WDR.dir + "/configs/db/scheduled.js"); - DB.Scheduled(WDR, DB.Queries.Scheduled); - } - - // END - return resolve(WDR); - - default: - console.error("You failed at modifying the WDR Code."); - process.exit(1); - } - }); } } @@ -391,16 +394,16 @@ async function create_tables(WDR) { guild_name varchar(40) NOT NULL, bot tinyint NOT NULL DEFAULT '0', geofence varchar(50) NOT NULL DEFAULT 'all', - loc_coords varchar(20) DEFAULT NULL, - loc_distance tinyint DEFAULT '5', + coords varchar(30) DEFAULT NULL, + distance tinyint DEFAULT '5', status tinyint NOT NULL DEFAULT '1', pokemon_status tinyint NOT NULL DEFAULT '1', + pvp_status tinyint NOT NULL DEFAULT '1', raid_status tinyint NOT NULL DEFAULT '1', quest_status tinyint NOT NULL DEFAULT '1', lure_status tinyint NOT NULL DEFAULT '1', invasion_status tinyint NOT NULL DEFAULT '1', alert_time varchar(5) NOT NULL DEFAULT '08:00', - pvp_status tinyint NOT NULL DEFAULT '1', PRIMARY KEY (user_id,guild_id) );`; WDR.wdrDB.query(wdr_users); @@ -411,11 +414,13 @@ async function create_tables(WDR) { user_name varchar(40) NOT NULL, guild_id bigint NOT NULL, guild_name varchar(40) NOT NULL, - bot int NOT NULL, + bot tinyint NOT NULL, status tinyint DEFAULT '1', geofence varchar(50) NOT NULL, + distance varchar(30) NOT NULL DEFAULT '0', sub_type varchar(10) NOT NULL, pokemon_id smallint NOT NULL DEFAULT '0', + pokemon_type varchar(10) NOT NULL DEFAULT '0', form smallint NOT NULL DEFAULT '0', min_lvl tinyint NOT NULL DEFAULT '0', max_lvl tinyint NOT NULL DEFAULT '0', @@ -427,22 +432,23 @@ async function create_tables(WDR) { generation tinyint NOT NULL DEFAULT '0', reward varchar(25) NOT NULL DEFAULT '0', gym_id varchar(50) NOT NULL DEFAULT '0', - min_rank tinyint NOT NULL DEFAULT '0', + min_rank smallint NOT NULL DEFAULT '0', league varchar(10) NOT NULL DEFAULT '0', - alert_time varchar(10) DEFAULT '', - PRIMARY KEY (user_id,guild_id,sub_type,pokemon_id,form,min_lvl,max_lvl,min_iv,max_iv,min_cp,size,generation,reward,gym_id,min_rank,league) + alert_time varchar(10) DEFAULT '0', + PRIMARY KEY (user_id,guild_id,sub_type,pokemon_id,form,pokemon_type,min_lvl,max_lvl,min_iv,max_iv,size,generation,reward,gym_id,min_rank,league), + KEY ix_data (gender,min_cp) );`; WDR.wdrDB.query(wdr_subscriptions); let wdr_quest_queue = ` CREATE TABLE IF NOT EXISTS wdr_quest_queue ( - user_id int NOT NULL, + user_id bigint NOT NULL, user_name varchar(40) NOT NULL, - guild_id int NOT NULL, + guild_id bigint NOT NULL, bot smallint NOT NULL, area varchar(20), alert varchar(10), - alert_time int, + alert_time bigint, embed LONGTEXT NOT NULL );`; WDR.wdrDB.query(wdr_quest_queue); @@ -476,7 +482,7 @@ function update_database(WDR) { wdr_info`, async function(error, row, fields) { if (!row || !row[0]) { - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] No data found in wdr_info. Inserting default values..."); + WDR.Console.error(WDR, "[src/database.js] No data found in wdr_info. Inserting default values..."); await WDR.wdrDB.promise().query( `INSERT INTO wdr_info( @@ -491,7 +497,7 @@ function update_database(WDR) { } else if (row[0].db_version < WDR.db.LATEST) { // LOG FOUND UPDATE - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Database Update Found. Updating..."); + WDR.Console.error(WDR, "[src/database.js] Database Update Found. Updating..."); // PERFORM UPDATES await update_each_version(WDR, row[0].db_version); @@ -502,7 +508,7 @@ function update_database(WDR) { } else if (row[0].db_version > WDR.db.LATEST) { // LOG HIGHER VERSION THAN LATEST - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [database.js] Your database version is higher than latest. WTF did you do?"); + WDR.Console.error(WDR, "[src/database.js] Your database version is higher than latest. WTF did you do?"); // TERMINATE THE SCRIPT process.exit(1); @@ -527,7 +533,7 @@ async function update_each_version(WDR, v) { if (version == WDR.db.LATEST) { // LOG UP TO DATE - console.log("[WDR " + WDR.Version + "] [database.js] [" + WDR.Time(null, "log") + "] Database is now Up-To-Date."); + WDR.Console.log(WDR, "[src/database.js] Database is now Up-To-Date."); // END return resolve(); @@ -546,9 +552,9 @@ async function update_each_version(WDR, v) { update.data, async function(error, results, fields) { if (error) { - console.error(update.bLog, error); + WDR.Console.error(update.bLog, error); } else { - console.log(update.gLog); + WDR.Console.log(update.gLog); } // CHANGE DB VERSION await WDR.wdrDB.promise().query( @@ -561,7 +567,7 @@ async function update_each_version(WDR, v) { ); // LOG UPDATE - console.log("[WDR " + WDR.Version + "] [database.js] [" + WDR.Time(null, "log") + "] Database updated to Version " + update_to + "."); + WDR.Console.log(WDR, "[src/database.js] Database updated to Version " + update_to + "."); } ); }); diff --git a/src/embeds/invasion.js b/src/embeds/invasion.js index 9ed36c0..0cd9dbb 100644 --- a/src/embeds/invasion.js +++ b/src/embeds/invasion.js @@ -1,5 +1,5 @@ module.exports = async (WDR, Target, Invasion) => { - let Embed_Config = require(WDR.dir + "/configs/embeds/" + Invasion.Embed); + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + Invasion.Embed); // CHECK IF THE TARGET IS A USER Invasion.Member = WDR.Bot.guilds.cache.get(Invasion.Discord.id).members.cache.get(Target.user_id); @@ -12,13 +12,13 @@ module.exports = async (WDR, Target, Invasion) => { Invasion.weaknesses = ""; Invasion.resistances = ""; //Invasion.type = WDR.Emotes[Invasion.grunt_type.toLowerCase()] ? WDR.Emotes[Invasion.grunt_type.toLowerCase()] : ""; - Invasion.color = await WDR.Get_Type_Color(WDR.Master.Grunt_Types[Invasion.grunt_type].type); + Invasion.color = WDR.Get_Type_Color(WDR.Master.Grunt_Types[Invasion.grunt_type].type); Invasion.time = WDR.Time(Invasion.incident_expire_timestamp, "1", Invasion.Timezone); Invasion.mins = Math.floor((Invasion.incident_expire_timestamp - (Invasion.Time_Now / 1000)) / 60); Invasion.secs = Math.floor((Invasion.incident_expire_timestamp - (Invasion.Time_Now / 1000)) - ((Math.floor((Invasion.incident_expire_timestamp - (Invasion.Time_Now / 1000)) / 60)) * 60)); Invasion.lat = Invasion.latitude; Invasion.lon = Invasion.longitude; - Invasion.area = Invasion.Area.Embed; + Invasion.area = Invasion.area.embed; Invasion.map_url = WDR.Config.FRONTEND_URL; // MAP LINK PROVIDERS diff --git a/src/embeds/lure.js b/src/embeds/lure.js index 4a48750..c0ca168 100644 --- a/src/embeds/lure.js +++ b/src/embeds/lure.js @@ -1,5 +1,5 @@ module.exports = async (WDR, Target, Lure) => { - let Embed_Config = require(WDR.dir + "/configs/embeds/" + Lure.Embed); + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + Lure.Embed); // CHECK IF THE TARGET IS A USER Lure.Member = WDR.Bot.guilds.cache.get(Lure.Discord.id).members.cache.get(Target.user_id); @@ -18,7 +18,7 @@ module.exports = async (WDR, Target, Lure) => { // GET LOCATION INFO Lure.lat = Lure.latitude; Lure.lon = Lure.longitude; - Lure.area = Lure.Area.Embed; + Lure.area = Lure.area.embed; Lure.map_url = WDR.Config.FRONTEND_URL; // MAP LINK PROVIDERS @@ -81,7 +81,7 @@ module.exports = async (WDR, Target, Lure) => { if (Lure.Member) { if (WDR.Debug.Lure == "ENABLED" && WDR.Debug.Subscriptions == "ENABLED") { - console.log("[EMBEDS] [" + WDR.Time(null, "stamp") + "] [Lure.js] Sent a " + Lure.name + " to " + Lure.Member.user.tag + " (" + Lure.Member.id + ")."); + WDR.Console.log(WDR,"[EMBEDS] [" + WDR.Time(null, "stamp") + "] [Lure.js] Sent a " + Lure.name + " to " + Lure.Member.user.tag + " (" + Lure.Member.id + ")."); } return WDR.Send_DM(WDR, Lure.Discord.id, Lure.Member.id, Lure.Embed, Target.bot); } else { diff --git a/src/embeds/nests.js b/src/embeds/nests.js index 5eb2e05..582dfff 100644 --- a/src/embeds/nests.js +++ b/src/embeds/nests.js @@ -1,5 +1,5 @@ module.exports = async (WDR, message, nest, server, area, timezone, embed) => { - let Embed_Config = require(WDR.dir + '/configs/embeds/' + embed); + let Embed_Config = require(WDR.Dir + '/configs/embeds/' + embed); let form = WDR.Master.Pokemon[nest.pokemon_id].default_form ? WDR.Master.Pokemon[nest.pokemon_id].default_form : 0; let locale = await WDR.Get_Data(WDR, nest); diff --git a/src/embeds/pokemon.js b/src/embeds/pokemon.js deleted file mode 100644 index f89c152..0000000 --- a/src/embeds/pokemon.js +++ /dev/null @@ -1,122 +0,0 @@ -module.exports = async (WDR, User, Channel, Sighting) => { - let Sighting_Embed = Sighting; - let Embed_Config = require(WDR.dir + "/configs/embeds/" + Sighting_Embed.Embed); - - // CHECK IF THE TARGET IS A USER - if (User) { - Sighting_Embed.Member = WDR.Bot.guilds.cache.get(Sighting_Embed.Discord.id).members.cache.get(User.user_id); - } else { - delete Sighting_Embed.Member; - } - - // VARIABLES POKEMON NAME, FORM AND TYPE EMOTES - let typing = await WDR.Get_Typing(WDR, Sighting_Embed); - - // POKEMON OBJECT - Sighting_Embed.name = Sighting_Embed.pokemon_name; - Sighting_Embed.form_name = Sighting_Embed.form_name ? Sighting_Embed.form_name : ""; - Sighting_Embed.form_name = Sighting_Embed.form_name == "[Normal]" ? "" : Sighting_Embed.form_name; - Sighting_Embed.id = Sighting_Embed.pokemon_id; - - Sighting_Embed.sprite = WDR.Get_Sprite(WDR, Sighting_Embed); - Sighting_Embed.iv = Sighting_Embed.internal_value; - Sighting_Embed.type = typing.type; - Sighting_Embed.type_noemoji = typing.type_noemoji; - Sighting_Embed.color = typing.color; - Sighting_Embed.lat = Sighting_Embed.latitude; - Sighting_Embed.lon = Sighting_Embed.longitude; - Sighting_Embed.area = Sighting_Embed.Area.Embed; - Sighting_Embed.map_url = WDR.Config.FRONTEND_URL; - - // DETERMINE MOVE NAMES AND TYPES - Sighting_Embed.move_1_type = WDR.Emotes[WDR.Master.Moves[Sighting_Embed.move_1].type.toLowerCase()]; - Sighting_Embed.move_2_type = WDR.Emotes[WDR.Master.Moves[Sighting_Embed.move_2].type.toLowerCase()]; - - // DETERMINE HEIGHT, WEIGHT AND SIZE - Sighting_Embed.height = Math.floor(Sighting_Embed.height * 100) / 100; - Sighting_Embed.weight = Math.floor(Sighting_Embed.weight * 100) / 100; - Sighting_Embed.size = await WDR.Capitalize(Sighting_Embed.size) - - // POKEMON STATS - Sighting_Embed.atk = Sighting_Embed.individual_attack; - Sighting_Embed.def = Sighting_Embed.individual_defense; - Sighting_Embed.sta = Sighting_Embed.individual_stamina; - Sighting_Embed.lvl = Sighting_Embed.pokemon_level; - Sighting_Embed.gen = Sighting_Embed.Gen - - // LINK VARIABLES - Sighting_Embed.google = "[Google Maps](https://www.google.com/maps?q=" + Sighting_Embed.latitude + "," + Sighting_Embed.longitude + ")"; - Sighting_Embed.apple = "[Apple Maps](http://maps.apple.com/maps?daddr=" + Sighting_Embed.latitude + "," + Sighting_Embed.longitude + "&z=10&t=s&dirflg=d)"; - Sighting_Embed.waze = "[Waze](https://www.waze.com/ul?ll=" + Sighting_Embed.latitude + "," + Sighting_Embed.longitude + "&navigate=yes)"; - Sighting_Embed.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + Sighting_Embed.latitude + "&lon=" + Sighting_Embed.longitude + "&zoom=15)"; - Sighting_Embed.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + Sighting_Embed.latitude + "/" + Sighting_Embed.longitude + "/15)"; - - Sighting_Embed.body = await WDR.Generate_Tile(WDR, "pokemon", Sighting_Embed.lat, Sighting_Embed.lon, Sighting_Embed.sprite); - Sighting_Embed.static_map = WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + Sighting_Embed.body; - - //LOG TILE IF enabled - if (WDR.Debug.Map_Tiles == "ENABLED") { - console.log(Sighting_Embed.static_map); - } - - // TIME VARIABLES - Sighting_Embed.verified = Sighting_Embed.disappear_time_verified ? WDR.Emotes.checkYes : WDR.Emotes.yellowQuestion; - Sighting_Embed.time = WDR.Time(Sighting_Embed.disappear_time, "1", Sighting_Embed.Timezone); - Sighting_Embed.mins = Math.floor((Sighting_Embed.disappear_time - (Sighting_Embed.Time_Now / 1000)) / 60); - Sighting_Embed.secs = Math.floor((Sighting_Embed.disappear_time - (Sighting_Embed.Time_Now / 1000)) - (Sighting_Embed.mins * 60)); - - // CHECK IF TARGET IS A MEMBER OR A CHANNEL - // if (HasIV == false || (Sighting_Embed.cp == null && WDR.Config.Sighting_Embed.sub_without_iv == "ENABLED")) { - // let NoIV_Embed = await Embed_Config(WDR, Sighting_Embed); - // - // // CHECK IF TARGET IS A MEMBER OR A CHANNEL - // if (Sighting_Embed.Member) { - // if (WDR.Config.TIME_REWDR_SUBS && Sighting_Embed.mins < WDR.Config.TIME_REWDR_SUBS) { - // return; - // } - // if (WDR.Config.VERBOSE_LOGS == "ENABLED") { - // console.log("[EMBEDS] [" + WDR.Time(null, "stamp") + "] [Sighting_Embed.js] Sent a " + Sighting_Embed.name + " to " + Sighting_Embed.Member.user.tag + " (" + Sighting_Embed.Member.id + ")."); - // } - // return WDR.Send_DM(WDR, NoIV_Embed, User.bot); - // - // } else { - // if (WDR.Config.TIME_REWDR && Sighting_Embed.mins < WDR.Config.TIME_REWDR) { - // return; - // } - // if (WDR.Config.VERBOSE_LOGS == "ENABLED") { - // console.log("[EMBEDS] [" + WDR.Time(null, "stamp") + "] [Sighting_Embed.js] Sent a " + Sighting_Embed.name + " to " + Channel.guild.name + " (" + Channel.id + ")."); - // } - // return WDR.Send_Embed(WDR, NoIV_Embed, Channel.id); - // } - // } else { - - // RETURN FOR NULL CP - if (Sighting_Embed.cp == null) { - return; - } - - if (User && Sighting_Embed.pokemon_id == 132) { - console.log(">>>>TEST5<<<<< | " + Sighting_Embed.pokemon_name + " | " + Sighting_Embed.internal_value + " | User " + User.user_id); - } else if (Sighting_Embed.pokemon_id == 132) { - console.log(">>>>TEST5<<<<< | " + Sighting_Embed.pokemon_name + " | " + Sighting_Embed.internal_value + " | Channel " + Channel.id); - } - - // CREATE AND SEND EMBED - let IV_Embed = Embed_Config(WDR, Sighting_Embed); - if (WDR.Debug.Processing_Speed == "ENABLED") { - let difference = Math.round((new Date().getTime() - Sighting_Embed.WDR_Received) / 10) / 100; - IV_Embed.setFooter("Latency: " + difference + "s"); - } - - // CHECK IF TARGET IS A MEMBER OR A CHANNEL - if (Sighting_Embed.Member) { - //console.log("[EMBEDS] [" + WDR.Time(null, "stamp") + "] [Sighting_Embed.js] Sent a " + Sighting_Embed.name + " to " + Sighting_Embed.Member.user.tag + " (" + Sighting_Embed.Member.id + ")."); - return WDR.Send_DM(WDR, Sighting_Embed.Discord.id, Sighting_Embed.Member.id, IV_Embed, User.bot); - } else { - if (WDR.Config.VERBOSE_LOGS == "ENABLED") { - console.log("[EMBEDS] [" + WDR.Time(null, "stamp") + "] [Sighting_Embed.js] Sent a " + Sighting_Embed.name + " to " + Channel.guild.name + " (" + Channel.id + ")."); - } - return WDR.Send_Embed(WDR, IV_Embed, Channel.id); - } - //} -} \ No newline at end of file diff --git a/src/embeds/pvp.js b/src/embeds/pvp.js deleted file mode 100644 index 556298d..0000000 --- a/src/embeds/pvp.js +++ /dev/null @@ -1,121 +0,0 @@ -module.exports = async (WDR, user, channel, pvp) => { - - let Embed_Config = require(WDR.dir + "/configs/embeds/" + pvp.Embed_File); - - // CHECK IF THE TARGET IS A user - if (user) { - pvp.Member = WDR.Bot.guilds.cache.get(pvp.Discord.id).members.cache.get(Target.user_id); - } - - if (channel.Filter.league.toLowerCase() == "ultra") { - console.log("data1", pvp.possible_cps); - } - - pvp.typing = await WDR.Get_Typing(WDR, { - pokemon_id: pvp.pokemon_id, - form: pvp.form - }); - pvp.type = pvp.typing.type; - pvp.type_noemoji = pvp.typing.type_noemoji; - pvp.color = pvp.typing.color; - - if (channel.Filter.league.toLowerCase() == "ultra") { - console.log("data2", pvp.possible_cps); - } - - pvp.name = pvp.pokemon_name; - - pvp.form = pvp.form_name ? pvp.form_name : ""; - pvp.form = pvp.form_name == "[Normal]" ? "" : pvp.form_name; - - pvp.id = pvp.pokemon_id; - - pvp.sprite = WDR.Get_Sprite(WDR, pvp); - pvp.iv = pvp.internal_value; - - pvp.lat = pvp.latitude; - pvp.lon = pvp.longitude; - - pvp.area = pvp.Area.Embed; - - pvp.map_url = WDR.Config.FRONTEND_URL; - - // DETERMINE HEIGHT, WEIGHT AND SIZE - pvp.height = Math.floor(pvp.height * 100) / 100; - pvp.weight = Math.floor(pvp.weight * 100) / 100; - - // POKEMON STATS - pvp.atk = pvp.individual_attack; - pvp.def = pvp.individual_defense; - pvp.sta = pvp.individual_stamina; - pvp.lvl = pvp.pokemon_level; - pvp.gen = pvp.Gen - - // DETERMINE MOVE NAMES AND TYPES - pvp.move_1_type = WDR.Emotes[WDR.Master.Moves[pvp.move_1].type.toLowerCase()]; - pvp.move_2_type = WDR.Emotes[WDR.Master.Moves[pvp.move_2].type.toLowerCase()]; - - // DETERMINE HEIGHT, WEIGHT AND SIZE - pvp.height = Math.floor(pvp.height * 100) / 100; - pvp.weight = Math.floor(pvp.weight * 100) / 100; - - // LINK VARIABLES - pvp.google = "[Google Maps](https://www.google.com/maps?q=" + pvp.latitude + "," + pvp.longitude + ")"; - pvp.apple = "[Apple Maps](http://maps.apple.com/maps?daddr=" + pvp.latitude + "," + pvp.longitude + "&z=10&t=s&dirflg=d)"; - pvp.waze = "[Waze](https://www.waze.com/ul?ll=" + pvp.latitude + "," + pvp.longitude + "&navigate=yes)"; - pvp.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + pvp.latitude + "&lon=" + pvp.longitude + "&zoom=15)"; - pvp.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + pvp.latitude + "/" + pvp.longitude + "/15)"; - - // TIME VARIABLES - pvp.verified = pvp.disappear_time_verified ? WDR.Emotes.checkYes : WDR.Emotes.yellowQuestion; - pvp.time = WDR.Time(pvp.disappear_time, "1", pvp.Timezone); - pvp.mins = Math.floor((pvp.disappear_time - (pvp.Time_Now / 1000)) / 60); - pvp.secs = Math.floor((pvp.disappear_time - (pvp.Time_Now / 1000)) - (pvp.mins * 60)); - - pvp.pvp_data = ""; - pvp.possible_cps.forEach(pcp => { - let pipe = " | "; // SPACING - let Name = WDR.Master.Pokemon[pcp.pokemon_id].name; - let Level = "Lvl " + pcp.level; - let Cp = "CP " + pcp.cp; - let Rank = "**Rank " + pcp.rank + "**"; - let Percent = pcp.percent + "%"; - let string = Rank + " " + Name + " (" + Percent + ")\n" + Level + pipe + Cp + pipe + pvp.atk + "/" + pvp.def + "/" + pvp.sta; - pvp.pvp_data += string + "\n"; - }); - if (channel.Filter.league.toLowerCase() == "ultra") { - console.log("ultra\n", pvp.pvp_data); - } - - // pvp RANK AND EVO STRING - pvp.ranks = ""; - pvp.possible_cps.forEach(rank_cp => { - pvp.ranks += "Rank " + rank_cp.rank + " (" + WDR.Master.Pokemon[rank_cp.pokemon_id].name + ")\n"; - }); - - pvp.pvp_data = ""; - - if (WDR.Debug.Processing_Speed == "ENABLED") { - let difference = Math.round((new Date().getTime() - pvp.WDR_Received) / 10) / 100; - pvp.footer = "Latency: " + difference + "s"; - } - - // CREATE AND SEND EMBED - pvp.Embed = Embed_Config(WDR, pvp); - - if (!pvp.Embed.image) { - pvp.body = await WDR.Generate_Tile(WDR, "pokemon", pvp.lat, pvp.lon, pvp.sprite); - pvp.Embed.image = { - url: WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + pvp.body - }; - } - - if (user) { - WDR.Send_DM(WDR, pvp.Discord.id, pvp.Member.id, pvp.Embed, user.bot); - } else { - WDR.Send_Embed(WDR, pvp.Embed, channel.id); - } - - // END - return; -} \ No newline at end of file diff --git a/src/embeds/quests.js b/src/embeds/quests.js index fad75ef..d44c7f5 100644 --- a/src/embeds/quests.js +++ b/src/embeds/quests.js @@ -2,7 +2,7 @@ const moment = require("moment"); module.exports = async (WDR, Target, Quest) => { let Q = Quest; - let Embed_Config = require(WDR.dir + "/configs/embeds/" + Q.Embed); + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + Q.Embed); // CHECK IF THE TARGET IS A USER Q.Member = WDR.Bot.guilds.cache.get(Q.Discord.id).members.cache.get(Target.user_id); @@ -14,7 +14,7 @@ module.exports = async (WDR, Target, Quest) => { // GET LOCATION INFO Q.lat = Q.latitude; Q.lon = Q.longitude; - Q.area = Q.Area.Embed; + Q.area = Q.area.embed; Q.url = Q.pokestop_url; Q.map_url = WDR.Config.FRONTEND_URL; @@ -68,10 +68,10 @@ module.exports = async (WDR, Target, Quest) => { // SAVE THE ALERT TO THE ALERT TABLE FOR FUTURE DELIVERY returnWDR.wdrDBquery(`INSERT INTO quest_alerts (user_id, user_name, guild_id, bot, area, alert, alert_time, embed) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`, - [Target.user_id, Target.user_name, quest_object, Q.Embed, Q.Area.Embed, Target.bot, Q.DB_Date, Q.Discord.id], + [Target.user_id, Target.user_name, quest_object, Q.Embed, Q.area.embed, Target.bot, Q.DB_Date, Q.Discord.id], function(error, alert, fields) { if (error) { - console.error("[" + WDR.Time(null, "stamp") + "] UNABLE TO ADD ALERT TO quest_alerts", error); + WDR.Console.error(WDR, "[" + WDR.Time(null, "stamp") + "] UNABLE TO ADD ALERT TO quest_alerts", error); } else if (WDR.Debug.Quests == "ENABLED" && WDR.Debug.Subscriptions == "ENABLED") { console.log(WDR.Color.pink + "[EMBEDS] [" + WDR.Time(null, "stamp") + "] [quests.js] [SUBSCRIPTIONS] Stored a " + Q.quest_reward + " Quest Alert for " + Target.user_name + "." + WDR.Color.reset); } diff --git a/src/embeds/raids.js b/src/embeds/raids.js index 1a7d124..c04005c 100644 --- a/src/embeds/raids.js +++ b/src/embeds/raids.js @@ -2,7 +2,7 @@ const pvp = require(__dirname + "/../pvp.js"); module.exports = async (WDR, Target, Raid) => { let R = Raid; - let Embed_Config = require(WDR.dir + "/configs/embeds/" + R.Embed); + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + R.Embed); // CHECK IF THE TARGET IS A USER R.Member = WDR.Bot.guilds.cache.get(R.Discord.id).members.cache.get(Target.user_id); @@ -29,7 +29,7 @@ module.exports = async (WDR, Target, Raid) => { R.lat = R.latitude; R.lon = R.longitude; R.map_img = ""; - R.area = R.Area.Embed; + R.area = R.area.embed; R.map_url = WDR.Config.FRONTEND_URL; // MAP LINK PROVIDERS @@ -141,10 +141,10 @@ module.exports = async (WDR, Target, Raid) => { R.move_2_type = WDR.Emotes[WDR.Master.Moves[R.move_2].type.toLowerCase()]; // Run Min-Max CP Calculations for Boss - R.minCP = pvp.CalculateCP(WDR, R.pokemon_id, R.form, 10, 10, 10, 20); - R.maxCP = pvp.CalculateCP(WDR, R.pokemon_id, R.form, 15, 15, 15, 20); - R.minCP_boosted = pvp.CalculateCP(WDR, R.pokemon_id, R.form, 10, 10, 10, 25); - R.maxCP_boosted = pvp.CalculateCP(WDR, R.pokemon_id, R.form, 15, 15, 15, 25); + R.minCP = WDR.PvP.CalculateCP(WDR, R.pokemon_id, R.form, 10, 10, 10, 20); + R.maxCP = WDR.PvP.CalculateCP(WDR, R.pokemon_id, R.form, 15, 15, 15, 20); + R.minCP_boosted = WDR.PvP.CalculateCP(WDR, R.pokemon_id, R.form, 10, 10, 10, 25); + R.maxCP_boosted = WDR.PvP.CalculateCP(WDR, R.pokemon_id, R.form, 15, 15, 15, 25); R.body = await WDR.Generate_Tile(WDR, "raids", R.marker_latitude, R.lon, R.embed_image, R.sprite); R.static_map = WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + R.body; diff --git a/src/feeds/invasion.js b/src/feeds/invasion.js index 09b156d..83e7792 100644 --- a/src/feeds/invasion.js +++ b/src/feeds/invasion.js @@ -9,14 +9,10 @@ module.exports = async (WDR, Invasion) => { // CHECK FOR GRUNT TYPE if (!WDR.Master.Grunt_Types[Invasion.grunt_type]) { - return console.error("[subs/Invasion.js] [" + WDR.Time(null, 'stamp') + "] No Grunt found for " + Invasion.grunt_type + " in Grunts.json."); + console.log(WDR.Master.Grunt_Types); + return WDR.Console.error(WDR, "[feeds/invasion.js] No Grunt found for " + Invasion.grunt_type + " in Grunts.json."); } - // GET TYPE OF GRUNT - Invasion.type = WDR.Master.Grunt_Types[Invasion.grunt_type].type; - if (!Invasion.type) { - return console.error("[subs/Invasion.js] [" + WDR.Time(null, 'stamp') + "] No Grunt type found for " + Invasion.grunt_type + " in Grunts.json."); - } Invasion.gender = WDR.Master.Grunt_Types[Invasion.grunt_type].grunt; // CHECK ALL FILTERS @@ -28,32 +24,32 @@ module.exports = async (WDR, Invasion) => { // LOOK UP CHANNEL let Channel = WDR.Bot.channels.cache.get(feed_channel[0]); if (!Channel) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The channel " + feed_channel[0] + " does not appear to exist."); + return WDR.Console.error(WDR, "[feeds/invasion.js] The channel " + feed_channel[0] + " does not appear to exist."); } // FETCH CHANNEL GEOFENCE Channel.Geofences = feed_channel[1].geofences.split(","); if (!Channel.Geofences) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] You do not have a Geofences set for " + feed_channel[1] + "."); + return WDR.Console.error(WDR, "[feeds/invasion.js] You do not have a Geofences set for " + feed_channel[1] + "."); } // FETCH CHANNEL FILTER Channel.Filter = WDR.Filters.get(feed_channel[1].filter); if (!Channel.Filter) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); + return WDR.Console.error(WDR, "[feeds/invasion.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); } // CHECK CHANNEL FILTER TYPE if (Channel.Filter.Type != "invasion") { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to be a invasion filter."); + return WDR.Console.error(WDR, "[feeds/invasion.js] The filter defined for " + feed_channel[0] + " does not appear to be a invasion filter."); } // ADD ROLE ID IF IT EXISTS IN CHANNEL CONFIG if (feed_channel[1].roleid) { if (feed_channel[1].roleid == "here" || feed_channel[1].roleid == "everyone") { - Invasion.Role_ID = "@" + feed_channel[1].roleid; + Invasion.role_id = "@" + feed_channel[1].roleid; } else { - Invasion.Role_ID = "<@&" + feed_channel[1].roleid + ">"; + Invasion.role_id = "<@&" + feed_channel[1].roleid + ">"; } } @@ -61,9 +57,9 @@ module.exports = async (WDR, Invasion) => { switch (true) { case (Channel.Geofences.indexOf("ALL") >= 0): - case (Channel.Geofences.indexOf(Invasion.Area.Default) >= 0): - case (Channel.Geofences.indexOf(Invasion.Area.Main) >= 0): - case (Channel.Geofences.indexOf(Invasion.Area.Sub) >= 0): + case (Channel.Geofences.indexOf(Invasion.area.default) >= 0): + case (Channel.Geofences.indexOf(Invasion.area.main) >= 0): + case (Channel.Geofences.indexOf(Invasion.area.sub) >= 0): // AREA FILTER switch (true) { diff --git a/src/feeds/lure.js b/src/feeds/lure.js index 006c673..1bfd90c 100644 --- a/src/feeds/lure.js +++ b/src/feeds/lure.js @@ -32,32 +32,32 @@ module.exports = async (WDR, Lure) => { // LOOK UP CHANNEL let Channel = WDR.Bot.channels.cache.get(feed_channel[0]); if (!Channel) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/lure.js] The channel " + feed_channel[0] + " does not appear to exist."); + return WDR.Console.error(WDR, "[feeds/lure.js] The channel " + feed_channel[0] + " does not appear to exist."); } // FETCH CHANNEL GEOFENCE Channel.Geofences = feed_channel[1].geofences.split(","); if (!Channel.Geofences) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/lure.js] You do not have a Geofences set for " + feed_channel[1] + "."); + return WDR.Console.error(WDR, "[feeds/lure.js] You do not have a Geofences set for " + feed_channel[1] + "."); } // FETCH CHANNEL FILTER Channel.Filter = WDR.Filters.get(feed_channel[1].filter); if (!Channel.Filter) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/lure.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); + return WDR.Console.error(WDR, "[feeds/lure.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); } // CHECK CHANNEL FILTER TYPE if (Channel.Filter.Type != "lure") { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/lure.js] The filter defined for " + feed_channel[0] + " does not appear to be a lure filter."); + return WDR.Console.error(WDR, "[feeds/lure.js] The filter defined for " + feed_channel[0] + " does not appear to be a lure filter."); } // ADD ROLE ID IF IT EXISTS IN CHANNEL CONFIG if (feed_channel[1].roleid) { if (feed_channel[1].roleid == "here" || feed_channel[1].roleid == "everyone") { - Lure.Role_ID = "@" + feed_channel[1].roleid; + Lure.role_id = "@" + feed_channel[1].roleid; } else { - Lure.Role_ID = "<@&" + feed_channel[1].roleid + ">"; + Lure.role_id = "<@&" + feed_channel[1].roleid + ">"; } } @@ -66,9 +66,9 @@ module.exports = async (WDR, Lure) => { switch (true) { case (Channel.Geofences.indexOf("ALL") >= 0): - case (Channel.Geofences.indexOf(Lure.Area.Default) >= 0): - case (Channel.Geofences.indexOf(Lure.Area.Main) >= 0): - case (Channel.Geofences.indexOf(Lure.Area.Sub) >= 0): + case (Channel.Geofences.indexOf(Lure.area.default) >= 0): + case (Channel.Geofences.indexOf(Lure.area.main) >= 0): + case (Channel.Geofences.indexOf(Lure.area.sub) >= 0): switch (true) { case (Channel.Filter.Lure_Type.indexOf("ALL") >= 0): diff --git a/src/feeds/pokemon.js b/src/feeds/pokemon.js index 94daba4..b29fac0 100644 --- a/src/feeds/pokemon.js +++ b/src/feeds/pokemon.js @@ -1,6 +1,5 @@ module.exports = (WDR, Sighting) => { - let S = Sighting; let Feed_Embed = require(__dirname + "/../embeds/pokemon.js"); if (WDR.Pokemon_Channels.length < 1) { @@ -8,130 +7,163 @@ module.exports = (WDR, Sighting) => { } // CHECK ALL FILTERS - WDR.Pokemon_Channels.forEach(feed_channel => { + WDR.Pokemon_Channels.forEach(async feed_channel => { // LOOK UP CHANNEL - let Ch = WDR.Bot.channels.cache.get(feed_channel[0]); - if (!Ch) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pokemon.js] The channel " + feed_channel[0] + " does not appear to exist."); + let channel = WDR.Bot.channels.cache.get(feed_channel[0]); + if (!channel) { + return WDR.Console.error(WDR, "[feeds/pokemon.js] The channel " + feed_channel[0] + " does not appear to exist."); } // FETCH CHANNEL GEOFENCE - Ch.Geofences = feed_channel[1].geofences.split(","); - if (!Ch.Geofences) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pokemon.js] You do not have a Geofences set for " + feed_channel[1] + "."); + channel.geofences = feed_channel[1].geofences.split(","); + if (!channel.geofences) { + return WDR.Console.error(WDR, "[feeds/pokemon.js] You do not have a Geofences set for " + feed_channel[1] + "."); } // FETCH CHANNEL FILTER - Ch.Filter = WDR.Filters.get(feed_channel[1].filter); - if (!Ch.Filter) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pokemon.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); + channel.filter = WDR.Filters.get(feed_channel[1].filter); + if (!channel.filter) { + return WDR.Console.error(WDR, "[feeds/pokemon.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); } // CHECK CHANNEL FILTER TYPE - if (Ch.Filter.Type != "pokemon") { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pokemon.js] The filter defined for " + feed_channel[0] + " does not appear to be a pokemon filter."); + if (channel.filter.Type != "pokemon") { + return WDR.Console.error(WDR, "[feeds/pokemon.js] The filter defined for " + feed_channel[0] + " does not appear to be a pokemon filter."); } // ADD ROLE ID IF IT EXISTS IN CHANNEL CONFIG if (feed_channel[1].roleid) { if (feed_channel[1].roleid == "here" || feed_channel[1].roleid == "everyone") { - S.Role_ID = "@" + feed_channel[1].roleid; + channel.role_id = "@" + feed_channel[1].roleid; } else { - S.Role_ID = "<@&" + feed_channel[1].roleid + ">"; + channel.role_id = "<@&" + feed_channel[1].roleid + ">"; } } - // CHECK FILTER GEOFENCES - switch (true) { - case (Ch.Geofences.indexOf(S.Area.Default) >= 0): - case (Ch.Geofences.indexOf(S.Area.Main) >= 0): - case (Ch.Geofences.indexOf(S.Area.Sub) >= 0): + let pobject = channel.filter[WDR.Master.Pokemon[Sighting.pokemon_id].name]; + if (!pobject) { + return WDR.Console.error(WDR, "[feeds/pokemon.js] Missing filter data for " + WDR.Master.Pokemon[Sighting.pokemon_id].name + " in configs/filters/" + feed_channel[1].filter); + } + + if (pobject != "False") { + let defGeo = (channel.geofences.indexOf(Sighting.area.default) >= 0); + let mainGeo = (channel.geofences.indexOf(Sighting.area.default) >= 0); + let subGeo = (channel.geofences.indexOf(Sighting.area.sub) >= 0); + let geoPass = (defGeo || mainGeo || subGeo); + + // CHECK FILTER GEOFENCES + if (geoPass) { // FRESH FILTER CRITERIA let criteria = {}; - criteria.gender = (Ch.Filter.gender == undefined ? "all" : Ch.Filter.gender).toLowerCase(); - criteria.size = (Ch.Filter.size == undefined ? "all" : Ch.Filter.size).toLowerCase(); - criteria.min_iv = Ch.Filter.min_iv == undefined ? 0 : Ch.Filter.min_iv; - criteria.max_iv = Ch.Filter.max_iv == undefined ? 100 : Ch.Filter.max_iv; - criteria.min_level = Ch.Filter.min_level == undefined ? 0 : Ch.Filter.min_level; - criteria.max_level = Ch.Filter.max_level == undefined ? 35 : Ch.Filter.max_level; - - switch (true) { - - // // POST WITHOUT IV FILTER - // case Ch.Filter.Post_Without_IV: - // switch (true) { - // - // // ONLY BREAK IF UIV IS DISABLED - // case (S.cp > 0 && WDR.Config.UIV == "DISABLED"): - // break; - // - // case !Ch.Filter[S.pokemon_id]: - // console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pokemon.js] Missing filter data for " + WDR.Master.Pokemon[S.pokemon_id].name + " in configs/filters/" + feed_channel[1].filter); - // break; - // - // case Ch.Filter[S.pokemon_id] == "False": - // break; - // - // default: - // S.Embed = feed_channel[1].embed ? feed_channel[1].embed : "pokemon.js"; - // Feed_Embed(WDR, null, Ch, S); - // } - // break; - - // BREAK IF POKEMON IS UNDEFINED - case !Ch.Filter[WDR.Master.Pokemon[S.pokemon_id].name]: - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pokemon.js] Missing filter data for " + WDR.Master.Pokemon[S.pokemon_id].name + " in configs/filters/" + feed_channel[1].filter); - break; - - // BREAK IF POKEMON IS DISABLED - case Ch.Filter[WDR.Master.Pokemon[S.pokemon_id].name] == "False": - break; - - // FILTER BY VALUES - default: - - S.Embed = feed_channel[1].embed ? feed_channel[1].embed : "pokemon_iv.js"; - - switch (true) { - - // CP FILTERS - case criteria.min_cp > S.cp: - break; - case criteria.max_cp < S.cp: - break; - - // LEVEL FILTERS - case criteria.min_level > S.pokemon_level: - break; - case criteria.max_level < S.pokemon_level: - break; - - // SIZE FILTER - case (criteria.size != "all" && criteria.size != S.size): - break; - - default: - switch (true) { - - // Interal Value Filter - case criteria.min_iv > S.internal_value: - break; - case criteria.max_iv < S.internal_value: - break; - default: - - if (criteria.gender == "all" || criteria.gender == S.gender) { - Feed_Embed(WDR, null, Ch, S); - } - } - } + + criteria.gender = (channel.filter.gender == undefined ? "all" : channel.filter.gender).toLowerCase(); + criteria.size = (channel.filter.size == undefined ? "all" : channel.filter.size).toLowerCase(); + criteria.generation = channel.filter.generation == undefined ? "all" : channel.filter.generation; + criteria.min_iv = channel.filter.min_iv == undefined ? 0 : channel.filter.min_iv; + criteria.max_iv = channel.filter.max_iv == undefined ? 100 : channel.filter.max_iv; + criteria.min_level = channel.filter.min_level == undefined ? 0 : channel.filter.min_level; + criteria.max_level = channel.filter.max_level == undefined ? 35 : channel.filter.max_level; + + if (pobject != "True") { + criteria.gender = (pobject.gender == undefined ? criteria.gender : pobject.gender).toLowerCase(); + criteria.size = (pobject.size == undefined ? criteria.size : pobject.size).toLowerCase(); + criteria.generation = pobject.generation == undefined ? criteria.generation : pobject.generation; + criteria.min_iv = pobject.min_iv == undefined ? criteria.min_iv : pobject.min_iv; + criteria.max_iv = pobject.max_iv == undefined ? criteria.max_iv : pobject.max_iv; + criteria.min_level = pobject.min_level == undefined ? criteria.min_level : pobject.min_level; + criteria.max_level = pobject.max_level == undefined ? criteria.max_level : pobject.max_level; } - break; - default: - //console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pokemon.js] Pokemon ignored due to area filter. Wanted: " + Ch.Geofences + ", Saw: " + S.Area.Default + ", " + S.Area.Main + ", " + S.Area.Sub + "."); + // FILTERS + let lvlPass = ((criteria.min_level <= Sighting.pokemon_level) && (criteria.max_level >= Sighting.pokemon_level)); + let sizePass = ((criteria.gender == "all") || (criteria.gender == Sighting.gender)); + let genderPass = ((criteria.gender == "all") || (criteria.gender == Sighting.gender)); + let genPass = ((criteria.generation == "all") || (criteria.generation == Sighting.gen)); + let ivPass = ((criteria.min_iv <= Sighting.internal_value) && (criteria.max_iv >= Sighting.internal_value)); + let allPass = (lvlPass && sizePass && genderPass && genPass && ivPass); + + if (allPass) { + + let match = {}; + + match.embed = (feed_channel[1].embed ? feed_channel[1].embed : "pokemon_iv.js"); + + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + match.embed); + + match.typing = await WDR.Get_Typing(WDR, { + pokemon_id: Sighting.pokemon_id, + form: Sighting.form + }); + + match.sprite = WDR.Get_Sprite(WDR, { + pokemon_id: Sighting.pokemon_id, + form: Sighting.form_id + }); + + match.type = match.typing.type; + match.type_noemoji = match.typing.type_noemoji; + + match.color = match.typing.color; + + match.name = Sighting.pokemon_name; + match.id = Sighting.pokemon_id; + match.form = Sighting.form_name ? Sighting.form_name : ""; + match.form = Sighting.form_name == "[Normal]" ? "" : Sighting.form_name; + + match.iv = Sighting.internal_value; + match.cp = Sighting.cp; + + match.lat = Sighting.latitude; + match.lon = Sighting.longitude; + + match.weather_boost = Sighting.weather_boost; + + match.area = Sighting.area.embed; + + match.map_url = WDR.Config.FRONTEND_URL; + + match.atk = Sighting.individual_attack; + match.def = Sighting.individual_defense; + match.sta = Sighting.individual_stamina; + + match.lvl = Sighting.pokemon_level; + match.gen = Sighting.gen; + + match.move_1_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_1].type.toLowerCase()]; + match.move_2_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_2].type.toLowerCase()]; + match.move_1_name = Sighting.move_1_name; + match.move_2_name = Sighting.move_2_name; + + match.height = Math.floor(Sighting.height * 100) / 100; + match.weight = Math.floor(Sighting.weight * 100) / 100; + match.size = await WDR.Capitalize(Sighting.size); + + match.google = "[Google Maps](https://www.google.com/maps?q=" + Sighting.latitude + "," + Sighting.longitude + ")"; + match.apple = "[Apple Maps](http://maps.apple.com/maps?daddr=" + Sighting.latitude + "," + Sighting.longitude + "&z=10&t=s&dirflg=d)"; + match.waze = "[Waze](https://www.waze.com/ul?ll=" + Sighting.latitude + "," + Sighting.longitude + "&navigate=yes)"; + match.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + Sighting.latitude + "&lon=" + Sighting.longitude + "&zoom=15)"; + match.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + Sighting.latitude + "/" + Sighting.longitude + "/15)"; + + match.verified = Sighting.disappear_time_verified ? WDR.Emotes.checkYes : WDR.Emotes.yellowQuestion; + match.time = WDR.Time(Sighting.disappear_time, "1", Sighting.Timezone); + match.mins = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) / 60); + match.secs = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) - (match.mins * 60)); + + match.body = await WDR.Generate_Tile(WDR, "pokemon", match.lat, match.lon, match.sprite); + match.static_map = WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + match.body; + + if (WDR.Debug.Processing_Speed == "ENABLED") { + let difference = Math.round((new Date().getTime() - Sighting.WDR_Received) / 10) / 100; + match.footer = "Latency: " + difference + "s"; + } + + match.embed = Embed_Config(WDR, match); + + WDR.Send_Embed(WDR, match.embed, channel.id); + } + } } }); diff --git a/src/feeds/pvp.js b/src/feeds/pvp.js index 5f81f5d..8e24171 100644 --- a/src/feeds/pvp.js +++ b/src/feeds/pvp.js @@ -4,187 +4,197 @@ module.exports = async (WDR, Sighting) => { return; } - WDR.PvP_Channels.forEach(async feed_channel => { + for (let c = 0, clen = WDR.PvP_Channels.length; c < clen; c++) { + let feed_channel = WDR.PvP_Channels[c]; + //WDR.PvP_Channels.forEach(async feed_channel => { // LOOK UP CHANNEL let channel = WDR.Bot.channels.cache.get(feed_channel[0]); if (!channel) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pvp.js] The channel " + feed_channel[0] + " does not appear to exist."); + return WDR.Console.error(WDR, "[feeds/pvp.js] The channel " + feed_channel[0] + " does not appear to exist."); } // FETCH CHANNEL GEOFENCE channel.Geofences = feed_channel[1].geofences.split(","); if (!channel.Geofences) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pvp.js] You do not have a Geofences set for " + feed_channel[1] + "."); + return WDR.Console.error(WDR, "[feeds/pvp.js] You do not have a Geofences set for " + feed_channel[1] + "."); } // FETCH CHANNEL FILTER channel.Filter = WDR.Filters.get(feed_channel[1].filter); if (!channel.Filter) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pvp.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); + return WDR.Console.error(WDR, "[feeds/pvp.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); } // CHECK CHANNEL FILTER TYPE if (channel.Filter.Type != "pvp") { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pvp.js] The filter defined for " + feed_channel[0] + " does not appear to be a pvp filter."); + return WDR.Console.error(WDR, "[feeds/pvp.js] The filter defined for " + feed_channel[0] + " does not appear to be a pvp filter."); } // ADD ROLE ID IF IT EXISTS IN CHANNEL CONFIG if (feed_channel[1].roleid) { if (feed_channel[1].roleid == "here" || feed_channel[1].roleid == "everyone") { - Sighting.Role_ID = "@" + feed_channel[1].roleid; + Sighting.role_id = "@" + feed_channel[1].roleid; } else { - Sighting.Role_ID = "<@&" + feed_channel[1].roleid + ">"; + Sighting.role_id = "<@&" + feed_channel[1].roleid + ">"; } } let Embed_File = feed_channel[1].embed ? feed_channel[1].embed : "pvp.js"; - let defGeo = (channel.Geofences.indexOf(Sighting.Area.Default) >= 0); - let mainGeo = (channel.Geofences.indexOf(Sighting.Area.Default) >= 0); - let subGeo = (channel.Geofences.indexOf(Sighting.Area.Sub) >= 0); + let defGeo = (channel.Geofences.indexOf(Sighting.area.default) >= 0); + let mainGeo = (channel.Geofences.indexOf(Sighting.area.default) >= 0); + let subGeo = (channel.Geofences.indexOf(Sighting.area.sub) >= 0); // CHECK FILTER GEOFENCES if (defGeo || mainGeo || subGeo) { // CHECK FILTER VARIABLES if (!channel.Filter.min_cp_range && channel.Filter.min_level !== 0) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pvp.js] Missing `min_cp_range` variable in " + feed_channel[1].filter + "."); + return WDR.Console.error(WDR, "[feeds/pvp.js] Missing `min_cp_range` variable in " + feed_channel[1].filter + "."); } else if (!channel.Filter.max_cp_range) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pvp.js] Missing `max_cp_range` variable in " + feed_channel[1].filter + "."); + return WDR.Console.error(WDR, "[feeds/pvp.js] Missing `max_cp_range` variable in " + feed_channel[1].filter + "."); } + //let cpRange = ((Sighting.cp <= channel.Filter.max_cp_range) && (Sighting.cp >= channel.Filter.min_cp_range)); - let cpRange = (Sighting.cp <= channel.Filter.max_cp_range); + //let cpRange = (Sighting.cp <= channel.Filter.max_cp_range); if (!channel.Filter.min_level && channel.Filter.min_level !== 0) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pvp.js] Missing `min_level` variable in " + feed_channel[1].filter + "."); + return WDR.Console.error(WDR, "[feeds/pvp.js] Missing `min_level` variable in " + feed_channel[1].filter + "."); } let lvlRange = (Sighting.pokemon_level >= channel.Filter.min_level); if (!channel.Filter[WDR.Master.Pokemon[Sighting.pokemon_id].name]) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/pvp.js] Missing `" + WDR.Master.Pokemon[Sighting.pokemon_id].name + "` in " + feed_channel[1].filter + "."); + return WDR.Console.error(WDR, "[feeds/pvp.js] Missing `" + WDR.Master.Pokemon[Sighting.pokemon_id].name + "` in " + feed_channel[1].filter + "."); } let filterStatus = (channel.Filter[WDR.Master.Pokemon[Sighting.pokemon_id].name] == 'True'); - //if (cpRange && lvlRange && filterStatus) { - if (cpRange && filterStatus) { - - let pvp = {}; - - pvp.possible_cps = []; - - pvp.league = channel.Filter.league.toLowerCase() + "_league"; - - Sighting[pvp.league].forEach(potential => { + if (lvlRange && filterStatus) { + //if (cpRange && filterStatus) { + + let match = { + pvp_data: "", + possible_cps: [], + league: channel.Filter.league.toLowerCase() + "_league" + }; + + for (let l = 0, llen = Sighting[match.league].length; l < llen; l++) { + let potential = Sighting[match.league][l]; + potential.typing = await WDR.Get_Typing(WDR, { + pokemon_id: potential.pokemon_id, + form: potential.form, + type: "pvp_filter" + }); let rankMatch = potential.rank <= channel.Filter.min_pvp_rank; let cpMatch = potential.cp >= channel.Filter.min_cp_range; - if (rankMatch && cpMatch) { - let match = {}; - match.pokemon_id = potential.pokemon_id; - match.rank = potential.rank; - match.percent = potential.percent; - match.level = potential.level; - match.cp = potential.cp; - match.value = potential.pvp_value; - match.form_id = potential.form_id; - pvp.possible_cps.push(match); + let typeMatch = (channel.Filter.type == "all") ? true : potential.typing.some(type => channel.Filter.type.includes(type)); + if (rankMatch && cpMatch && typeMatch) { + let filtered = {}; + filtered.types = potential.typing; + filtered.pokemon_id = potential.pokemon_id; + filtered.rank = potential.rank; + filtered.percent = potential.percent; + filtered.level = potential.level; + filtered.cp = potential.cp; + filtered.value = potential.pvp_value; + filtered.form_id = potential.form_id; + match.possible_cps.push(filtered); } - }); + } - if (pvp.possible_cps.length > 0) { - let Embed_Config = require(WDR.dir + "/configs/embeds/" + Embed_File); - if (channel.Filter.league.toLowerCase() == "ultra") { - console.log("data1", pvp.possible_cps); - } - pvp.typing = await WDR.Get_Typing(WDR, { + if (match.possible_cps.length > 0) { + + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + Embed_File); + + match.typing = await WDR.Get_Typing(WDR, { pokemon_id: Sighting.pokemon_id, form: Sighting.form }); - pvp.sprite = WDR.Get_Sprite(WDR, { - pokemon_id: pvp.possible_cps[0].pokemon_id, - form: pvp.possible_cps[0].form_id + + match.sprite = WDR.Get_Sprite(WDR, { + pokemon_id: match.possible_cps[0].pokemon_id, + form: match.possible_cps[0].form_id }); - pvp.tile_sprite = WDR.Get_Sprite(WDR, { + + match.tile_sprite = WDR.Get_Sprite(WDR, { pokemon_id: Sighting.pokemon_id, form: Sighting.form_id }); - pvp.type_wemoji = pvp.typing.type; - pvp.type_noemoji = pvp.typing.type_noemoji; - pvp.color = pvp.typing.color; - pvp.gender_wemoji = Sighting.gender_wemoji - pvp.gender_noemoji = Sighting.gender_noemoji - if (channel.Filter.league.toLowerCase() == "ultra") { - console.log("data2", pvp.possible_cps); - } - pvp.name = Sighting.pokemon_name; - pvp.form = Sighting.form_name ? Sighting.form_name : ""; - pvp.form = Sighting.form_name == "[Normal]" ? "" : Sighting.form_name; - pvp.id = Sighting.pokemon_id; - pvp.iv = Sighting.internal_value; - pvp.cp = Sighting.cp; - pvp.lat = Sighting.latitude; - pvp.lon = Sighting.longitude; - pvp.weather_boost = Sighting.weather_boost; - pvp.area = Sighting.Area.Embed; - pvp.map_url = WDR.Config.FRONTEND_URL; - pvp.height = Math.floor(Sighting.height * 100) / 100; - pvp.weight = Math.floor(Sighting.weight * 100) / 100; - pvp.atk = Sighting.individual_attack; - pvp.def = Sighting.individual_defense; - pvp.sta = Sighting.individual_stamina; - pvp.lvl = Sighting.pokemon_level; - pvp.gen = Sighting.gen - pvp.move_1_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_1].type.toLowerCase()]; - pvp.move_2_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_2].type.toLowerCase()]; - pvp.move_1_name = Sighting.move_1_name; - pvp.move_2_name = Sighting.move_2_name; - pvp.height = Math.floor(Sighting.height * 100) / 100; - pvp.weight = Math.floor(Sighting.weight * 100) / 100; - pvp.size = await WDR.Capitalize(Sighting.size); - pvp.google = "[Google Maps](https://www.google.com/maps?q=" + pvp.lat + "," + pvp.lon + ")"; - pvp.apple = "[Apple Maps](http://maps.apple.com/maps?daddr=" + pvp.lat + "," + pvp.lon + "&z=10&t=s&dirflg=d)"; - pvp.waze = "[Waze](https://www.waze.com/ul?ll=" + pvp.lat + "," + pvp.lon + "&navigate=yes)"; - pvp.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + pvp.lat + "&lon=" + pvp.lon + "&zoom=15)"; - pvp.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + pvp.lat + "/" + pvp.lon + "/15)"; - pvp.verified = Sighting.disappear_time_verified ? WDR.Emotes.checkYes : WDR.Emotes.yellowQuestion; - pvp.time = WDR.Time(Sighting.disappear_time, "1", Sighting.Timezone); - pvp.mins = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) / 60); - pvp.secs = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) - (pvp.mins * 60)); - pvp.pvp_data = ""; - pvp.possible_cps.forEach(pcp => { - let pipe = " | "; // SPACING - let Name = WDR.Master.Pokemon[pcp.pokemon_id].name; - let Level = "Lvl " + pcp.level; - let Cp = "CP " + pcp.cp; - let Rank = "**Rank " + pcp.rank + "**"; - let Percent = pcp.percent + "%"; - let string = Rank + " " + Name + " (" + Percent + ")\n" + Level + pipe + Cp + pipe + pvp.atk + "/" + pvp.def + "/" + pvp.sta; - pvp.pvp_data += string + "\n"; - }); - if (channel.Filter.league.toLowerCase() == "ultra") { - console.log("ultra\n", pvp.pvp_data); - } - pvp.ranks = ""; - pvp.possible_cps.forEach(rank_cp => { - pvp.ranks += "Rank " + rank_cp.rank + " (" + WDR.Master.Pokemon[rank_cp.pokemon_id].name + ")\n"; + + match.type_wemoji = match.typing.type; + match.type_noemoji = match.typing.type_noemoji; + + match.color = match.typing.color; + + match.gender_wemoji = Sighting.gender_wemoji + match.gender_noemoji = Sighting.gender_noemoji + + match.name = Sighting.pokemon_name; + match.id = Sighting.pokemon_id; + match.form = Sighting.form_name ? Sighting.form_name : ""; + match.form = Sighting.form_name == "[Normal]" ? "" : Sighting.form_name; + + match.iv = Sighting.internal_value; + match.cp = Sighting.cp; + + match.lat = Sighting.latitude; + match.lon = Sighting.longitude; + + match.weather_boost = Sighting.weather_boost; + + match.area = Sighting.area.embed; + + match.map_url = WDR.Config.FRONTEND_URL; + + match.atk = Sighting.individual_attack; + match.def = Sighting.individual_defense; + match.sta = Sighting.individual_stamina; + + match.lvl = Sighting.pokemon_level; + match.gen = Sighting.gen; + + match.move_1_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_1].type.toLowerCase()]; + match.move_2_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_2].type.toLowerCase()]; + match.move_1_name = Sighting.move_1_name; + match.move_2_name = Sighting.move_2_name; + + match.height = Math.floor(Sighting.height * 100) / 100; + match.weight = Math.floor(Sighting.weight * 100) / 100; + match.size = await WDR.Capitalize(Sighting.size); + + match.google = "[Google Maps](https://www.google.com/maps?q=" + match.lat + "," + match.lon + ")"; + match.apple = "[Apple Maps](http://maps.apple.com/maps?daddr=" + match.lat + "," + match.lon + "&z=10&t=s&dirflg=d)"; + match.waze = "[Waze](https://www.waze.com/ul?ll=" + match.lat + "," + match.lon + "&navigate=yes)"; + match.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + match.lat + "&lon=" + match.lon + "&zoom=15)"; + match.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + match.lat + "/" + match.lon + "/15)"; + + match.verified = Sighting.disappear_time_verified ? WDR.Emotes.checkYes : WDR.Emotes.yellowQuestion; + match.time = WDR.Time(Sighting.disappear_time, "1", Sighting.Timezone); + match.mins = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) / 60); + match.secs = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) - (match.mins * 60)); + + match.pvp_data = ""; + + match.ranks = ""; + match.possible_cps.forEach(rank_cp => { + match.ranks += "Rank " + rank_cp.rank + " (" + WDR.Master.Pokemon[rank_cp.pokemon_id].name + ")\n"; }); - pvp.pvp_data = ""; + + match.body = await WDR.Generate_Tile(WDR, "pokemon", match.lat, match.lon, match.tile_sprite); + match.static_map = WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + match.body; + if (WDR.Debug.Processing_Speed == "ENABLED") { let difference = Math.round((new Date().getTime() - Sighting.WDR_Received) / 10) / 100; - pvp.footer = "Latency: " + difference + "s"; - } - pvp.embed = Embed_Config(WDR, pvp); - if (!pvp.embed.image) { - pvp.body = await WDR.Generate_Tile(WDR, "pokemon", pvp.lat, pvp.lon, pvp.tile_sprite); - pvp.embed.image = { - url: WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + pvp.body - }; + match.footer = "Latency: " + difference + "s"; } - WDR.Send_Embed(WDR, pvp.embed, channel.id); + + match.embed = Embed_Config(WDR, match); + + WDR.Send_Embed(WDR, match.embed, channel.id); } } } - }); + } //); // END return; diff --git a/src/feeds/quests.js b/src/feeds/quests.js index 0d5d2b5..7002646 100644 --- a/src/feeds/quests.js +++ b/src/feeds/quests.js @@ -9,32 +9,32 @@ module.exports = async (WDR, Quest) => { // LOOK UP CHANNEL let Channel = WDR.Bot.channels.cache.get(feed_channel[0]); if (!Channel) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The channel " + feed_channel[0] + " does not appear to exist."); + return WDR.Console.error(WDR, "[feeds/raids.js] The channel " + feed_channel[0] + " does not appear to exist."); } // FETCH CHANNEL GEOFENCE Channel.Geofences = feed_channel[1].geofences.split(","); if (!Channel.Geofences) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] You do not have a Geofences set for " + feed_channel[1] + "."); + return WDR.Console.error(WDR, "[feeds/raids.js] You do not have a Geofences set for " + feed_channel[1] + "."); } // FETCH CHANNEL FILTER Channel.Filter = WDR.Filters.get(feed_channel[1].filter); if (!Channel.Filter) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); + return WDR.Console.error(WDR, "[feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); } // CHECK CHANNEL FILTER TYPE if (Channel.Filter.Type != "quest") { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to be a quest filter."); + return WDR.Console.error(WDR, "[feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to be a quest filter."); } // ADD ROLE ID IF IT EXISTS IN CHANNEL CONFIG if (feed_channel[1].roleid) { if (feed_channel[1].roleid == "here" || feed_channel[1].roleid == "everyone") { - Raid.Role_ID = "@" + feed_channel[1].roleid; + Raid.role_id = "@" + feed_channel[1].roleid; } else { - Raid.Role_ID = "<@&" + feed_channel[1].roleid + ">"; + Raid.role_id = "<@&" + feed_channel[1].roleid + ">"; } } @@ -43,9 +43,9 @@ module.exports = async (WDR, Quest) => { switch (true) { case (Channel.Geofences.indexOf("ALL") >= 0): - case (Channel.Geofences.indexOf(Quest.Area.Default) >= 0): - case (Channel.Geofences.indexOf(Quest.Area.Main) >= 0): - case (Channel.Geofences.indexOf(Quest.Area.Sub) >= 0): + case (Channel.Geofences.indexOf(Quest.area.default) >= 0): + case (Channel.Geofences.indexOf(Quest.area.main) >= 0): + case (Channel.Geofences.indexOf(Quest.area.sub) >= 0): // REWARD FILTER switch (true) { diff --git a/src/feeds/raids.js b/src/feeds/raids.js index 6a8209c..a7cc23e 100644 --- a/src/feeds/raids.js +++ b/src/feeds/raids.js @@ -13,104 +13,250 @@ module.exports = async (WDR, Raid) => { Raid.Type = "Egg"; } - if (WDR.Debug.Raids == "ENABLED" && WDR.Debug.Feed == "ENABLED") { - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] Received a " + Raid.pokemon_name + " Raid."); - } - - // CHECK ALL FILTERS - for (let c = 0, ch_len = WDR.Raid_Channels.length; c < ch_len; c++) { + for (let c = 0, clen = WDR.Raid_Channels.length; c < clen; c++) { let feed_channel = WDR.Raid_Channels[c]; // LOOK UP CHANNEL - let Channel = WDR.Bot.channels.cache.get(feed_channel[0]); - if (!Channel) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The channel " + feed_channel[0] + " does not appear to exist."); + let channel = WDR.Bot.channels.cache.get(feed_channel[0]); + if (!channel) { + return WDR.Console.error(WDR, "[feeds/raids.js] The channel " + feed_channel[0] + " does not appear to exist."); } - // FETCH CHANNEL GEOFENCE - Channel.Geofences = feed_channel[1].geofences.split(","); - if (!Channel.Geofences) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] You do not have a Geofences set for " + feed_channel[1] + "."); + // FETCH channel GEOFENCE + channel.Geofences = feed_channel[1].geofences.split(","); + if (!channel.Geofences) { + return WDR.Console.error(WDR, "[feeds/raids.js] You do not have a Geofences set for " + feed_channel[1] + "."); } - // FETCH CHANNEL FILTER - Channel.Filter = WDR.Filters.get(feed_channel[1].filter); - if (!Channel.Filter) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); + // FETCH channel FILTER + channel.Filter = WDR.Filters.get(feed_channel[1].filter); + if (!channel.Filter) { + return WDR.Console.error(WDR, "[feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to exist."); } - // CHECK CHANNEL FILTER TYPE - if (Channel.Filter.Type != "raid") { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to be a raid filter."); + // CHECK channel FILTER TYPE + if (channel.Filter.Type != "raid") { + return WDR.Console.error(WDR, "[feeds/raids.js] The filter defined for " + feed_channel[0] + " does not appear to be a raid filter."); } - // ADD ROLE ID IF IT EXISTS IN CHANNEL CONFIG + // ADD ROLE ID IF IT EXISTS IN channel CONFIG if (feed_channel[1].roleid) { if (feed_channel[1].roleid == "here" || feed_channel[1].roleid == "everyone") { - Raid.Role_ID = "@" + feed_channel[1].roleid; + Raid.role_id = "@" + feed_channel[1].roleid; } else { - Raid.Role_ID = "<@&" + feed_channel[1].roleid + ">"; + Raid.role_id = "<@&" + feed_channel[1].roleid + ">"; } } // IDENTIFY THE EMBED TYPE + let Embed_File; if (Raid.Type == "Egg") { - switch (true) { - case !feed_channel[1].embed: - Raid.Embed = "raid_eggs.js"; - break; - case !feed_channel[1].embed_egg: - Raid.Embed = "raid_eggs.js"; - break; - default: - Raid.Embed = feed_channel[1].embed_egg; + if (!feed_channel[1].embed_egg && !feed_channel[1].embed) { + Embed_File = "raid_eggs.js"; + } else if (feed_channel[1].embed_egg) { + Embed_File = feed_channel[1].embed_egg; + } else { + Embed_File = feed_channel[1].embed ? feed_channel[1].embed : "raid_egg.js"; } } else { - Raid.Embed = feed_channel[1].embed ? feed_channel[1].embed : "raids.js"; + Embed_File = feed_channel[1].embed ? feed_channel[1].embed : "raid_boss.js"; } + // let defGeo = (channel.Geofences.indexOf(Raid.area.default) >= 0); + // let mainGeo = (channel.Geofences.indexOf(Raid.area.default) >= 0); + // let subGeo = (channel.Geofences.indexOf(Raid.area.sub) >= 0); + // + // // CHECK FILTER GEOFENCES + // if (defGeo || mainGeo || subGeo) { + // MATCH TO GEOFENCES switch (true) { - case Channel.Geofences.indexOf("ALL") >= 0: + case channel.Geofences.indexOf("ALL") >= 0: Raid.Matched_Geofence = true; break; - case Channel.Geofences.indexOf(Raid.Area.Default) >= 0: + case channel.Geofences.indexOf(Raid.area.default) >= 0: Raid.Matched_Geofence = true; break; - case (Channel.Geofences.indexOf(Raid.Area.Main) >= 0): + case (channel.Geofences.indexOf(Raid.area.main) >= 0): Raid.Matched_Geofence = true; break; - case (Channel.Geofences.indexOf(Raid.Area.Sub) >= 0): + case (channel.Geofences.indexOf(Raid.area.sub) >= 0): Raid.Matched_Geofence = true; break; default: Raid.Matched_Geofence = false; } - // MATCH EGG FILTERS - Raid.Matched_Egg = (Raid.Type == "Egg" && (Channel.Filter.Egg_Levels.indexOf(Raid.level) >= 0)); + if (Raid.Matched_Geofence) { - // MATCH BOSS FILTERS - Raid.Matched_Boss = (Raid.Type == "Boss" && (Channel.Filter.Boss_Levels.indexOf(Raid.level) >= 0 || Channel.Filter.Boss_Levels.indexOf(Raid.pokemon_name) >= 0)); + // MATCH EGG FILTERS + Raid.Matched_Egg = (Raid.Type == "Egg" && (channel.Filter.Egg_Levels.indexOf(Raid.level) >= 0)); - // MATCH EX ELIGIBILITY FILTER - switch (true) { - case (Channel.Filter.Ex_Eligible_Only == undefined || Channel.Filter.Ex_Eligible_Only != true): - Raid.Matched_Ex_Eligibility = true; - break; - case (Channel.Filter.Ex_Eligible_Only == Raid.ex_raid_eligible || Channel.Filter.Ex_Eligible_Only == Raid.sponsor_id): - Raid.Matched_Ex_Eligibility = true; - break; - default: - Raid.Matched_Ex_Eligibility = false; - } + // MATCH BOSS FILTERS + Raid.Matched_Boss = (Raid.Type == "Boss" && (channel.Filter.Boss_Levels.indexOf(Raid.level) >= 0 || channel.Filter.Boss_Levels.indexOf(Raid.pokemon_name) >= 0)); - if (Raid.Matched_Geofence) { if (Raid.Matched_Egg || Raid.Matched_Boss) { + + // MATCH EX ELIGIBILITY FILTER + switch (true) { + case (channel.Filter.Ex_Eligible_Only == undefined || channel.Filter.Ex_Eligible_Only != true): + Raid.Matched_Ex_Eligibility = true; + break; + case (channel.Filter.Ex_Eligible_Only == Raid.ex_raid_eligible || channel.Filter.Ex_Eligible_Only == Raid.sponsor_id): + Raid.Matched_Ex_Eligibility = true; + break; + default: + Raid.Matched_Ex_Eligibility = false; + } + if (Raid.Matched_Ex_Eligibility) { - // INSERT RAID LOBBY AND SEND RAID - Create_Raid_Embed(WDR, Channel, Raid); + let match = {}; + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + Embed_File); + + // VARIABLES + match.id = Raid.gym_id; + match.lvl = Raid.level; + + // CHECK FOR GYM NAME AND NOTES + match.gym = Raid.gym_name ? Raid.gym_name : "No Name"; + if (WDR.Gym_Notes && WDR.Gym_Notes[Raid.gym_id]) { + match.notes = WDR.Gym_Notes[Raid.gym_id] ? WDR.Gym_Notes[Raid.gym_id].description : ""; + } else { + match.notes = ""; + } + + // DETERMINE POKEMON NAME AND FORM OR EGG + match.boss = Raid.pokemon_name ? Raid.pokemon_name : "Egg"; + + // CHECK IF EXCLUSIVE RAID + match.exraid = Raid.is_exclusive ? "**EXRaid Invite Only**\n" : ""; + + // GET LOCATION INFO + match.lat = Raid.latitude; + match.lon = Raid.longitude; + match.map_img = ""; + match.area = Raid.area.embed; + match.map_url = WDR.Config.FRONTEND_URL; + + // MAP LINK PROVIDERS + match.google = "[Google Maps](https://www.google.com/maps?q=" + match.lat + "," + match.lon + ")"; + match.apple = "[Apple Maps](http://mapmatch.apple.com/maps?daddr=" + match.lat + "," + match.lon + "&z=10&t=s&dirflg=d)"; + match.waze = "[Waze](https://www.waze.com/ul?ll=" + match.lat + "," + match.lon + "&navigate=yes)"; + match.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + match.lat + "&lon=" + match.lon + "&zoom=15)"; + match.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + match.lat + "/" + match.lon + "/15)"; + + // DETERMINE GYM CONTROL + switch (Raid.team_id) { + case 1: + match.team = WDR.Emotes.mystic + " Control"; + match.url = Raid.gym_url ? Raid.gym_url : "https://raw.githubusercontent.com/shindekokoro/PogoAssets/master/static_assets/png/team_blue.png"; + match.embed_image = "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/gyms/Russell_Gym_Mystic.png"; + break; + case 2: + match.team = WDR.Emotes.valor + " Control"; + match.url = Raid.gym_url ? Raid.gym_url : "https://raw.githubusercontent.com/shindekokoro/PogoAssets/master/static_assets/png/team_red.png"; + match.embed_image = "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/gyms/Russell_Gym_Valor.png"; + break; + case 3: + match.team = WDR.Emotes.instinct + " Control"; + match.url = Raid.gym_url ? Raid.gym_url : "https://raw.githubusercontent.com/shindekokoro/PogoAssets/master/static_assets/png/team_yellow.png"; + match.embed_image = "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/gyms/Russell_Gym_Instinct.png"; + break; + default: + match.team = "Uncontested Gym"; + match.url = Raid.gym_url ? Raid.gym_url : "https://raw.githubusercontent.com/shindekokoro/PogoAssets/master/static_assets/png/TeamLesRaid.png"; + match.embed_image = "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/gyms/Russell_Gym_Uncontested.png"; + } + + // CHECK IF SPONSORED GYM + match.sponsor = (Raid.sponsor_id || Raid.ex_raid_eligible) ? WDR.Emotes.exPass + " Eligible" : ""; + + // GET RAID COLOR + switch (Raid.level) { + case 1: + case 2: + match.color = "f358fb"; + break; + case 3: + case 4: + match.color = "ffd300"; + break; + case 5: + match.color = "5b00de"; + break; + } + + match.hatch_time = WDR.Time(Raid.start, "1", Raid.Timezone); + match.end_time = WDR.Time(Raid.end, "1", Raid.Timezone); + match.hatch_mins = Math.floor((Raid.start - (Raid.Time_Now / 1000)) / 60); + match.end_mins = Math.floor((Raid.end - (Raid.Time_Now / 1000)) / 60); + + match.marker_latitude = Raid.latitude + .0004; + + // DETERMINE IF IT"S AN EGG OR A RAID + if (Raid.Type == "Egg") { + switch (Raid.level) { + case 1: + case 2: + match.sprite = "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/gyms/ic_raid_egg_normal.png"; + break; + case 3: + case 4: + match.sprite = "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/gyms/ic_raid_egg_rare.png"; + break; + case 5: + match.sprite = "https://raw.githubusercontent.com/PartTimeJS/Assets/master/pogo/gyms/ic_raid_egg_legendary.png"; + break; + } + + match.body = await WDR.Generate_Tile(WDR, "raids", match.marker_latitude, match.lon, match.embed_image, match.sprite); + match.static_map = WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + match.body; + + if (WDR.Debug.Processing_Speed == "ENABLED") { + let difference = Math.round((new Date().getTime() - Raid.WDR_Received) / 10) / 100; + match.footer = "Latency: " + difference + "s"; + } + + match.embed = await Embed_Config(WDR, match); + + } else { + + match.sprite = WDR.Get_Sprite(WDR, Raid); + + match.form = Raid.form_name ? Raid.form_name : ""; + match.form = match.form == "[Normal]" ? "" : match.form; + + match.typing = await WDR.Get_Typing(WDR, Raid); + match.type = match.typing.type; + match.type_noemoji = match.typing.type_noemoji; + match.weaknesses = match.typing.weaknesses; + match.resistances = match.typing.resistances; + match.reduced = match.typing.reduced; + + + match.move_1_type = WDR.Emotes[WDR.Master.Moves[Raid.move_1].type.toLowerCase()]; + match.move_2_type = WDR.Emotes[WDR.Master.Moves[Raid.move_2].type.toLowerCase()]; + match.move_1_name = Raid.move_1_name; + match.move_2_name = Raid.move_2_name; + + match.minCP = WDR.PvP.CalculateCP(WDR, Raid.pokemon_id, Raid.form_id, 10, 10, 10, 20); + match.maxCP = WDR.PvP.CalculateCP(WDR, Raid.pokemon_id, Raid.form_id, 15, 15, 15, 20); + match.minCP_boosted = WDR.PvP.CalculateCP(WDR, Raid.pokemon_id, Raid.form_id, 10, 10, 10, 25); + match.maxCP_boosted = WDR.PvP.CalculateCP(WDR, Raid.pokemon_id, Raid.form_id, 15, 15, 15, 25); + + match.body = await WDR.Generate_Tile(WDR, "raids", match.marker_latitude, match.lon, match.embed_image, match.sprite); + match.static_map = WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + match.body; + + if (WDR.Debug.Processing_Speed == "ENABLED") { + let difference = Math.round((new Date().getTime() - Raid.WDR_Received) / 10) / 100; + match.footer = "Latency: " + difference + "s"; + } + + match.embed = await Embed_Config(WDR, match); + } + + WDR.Send_Embed(WDR, match.embed, channel.id); } } } diff --git a/src/functions/Capitalize.js b/src/functions/Capitalize.js index 785ae28..cb7c1f9 100644 --- a/src/functions/Capitalize.js +++ b/src/functions/Capitalize.js @@ -18,8 +18,7 @@ module.exports = async (string) => { return resolve(""); } } catch (e) { - console.error(e); - console.error(string); + WDR.Console.error(WDR,"[functions/Capitalize.js] Error Capitalizing string `" + string + "`", e); } }); } \ No newline at end of file diff --git a/src/functions/Console.js b/src/functions/Console.js index eaec6f3..ca2eee2 100644 --- a/src/functions/Console.js +++ b/src/functions/Console.js @@ -1,25 +1,35 @@ module.exports = { - error: function(err, object) { - console.log((err).bold.brightRed); + error: function(WDR, err, object) { + console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] " + err).bold.brightRed); if (object) { - console.error(object); + if (object.length > 1) { + object.forEach(error => { + console.error(error); + }); + } else { + console.error(object); + } } return; }, - log: function(log, object) { - console.log((err).bold.brightRed); + log: function(WDR, log, object) { + console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] " + log).bold.brightGreen); if (object) { console.log(object); } return; }, - info: function(color, text, object) { - console.log((err).bold[color]); + info: function(WDR, info, object) { + console.info("WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] " + info); if (object) { - console.log(object); + console.info(object); } return; }, + + custom: function(text, object, color) { + + } } \ No newline at end of file diff --git a/src/functions/Generate_Master.js b/src/functions/Generate_Master.js new file mode 100644 index 0000000..7323b85 --- /dev/null +++ b/src/functions/Generate_Master.js @@ -0,0 +1 @@ +const _0x413b=['ChjVDg8=','y2fSBa==','BwfW','tMLKB3jHBUkzGa==','qujtuwC=','l3nYyY9ZDgf0AwmVzgf0ys90ExbLx2vMzMvJDgL2zw5LC3mUANnVBG==','EKjoAfK=','r1z4EeO=','D2vPz2H0','zw5JB3vUDgvY','khmP','svrftv9dqvrfr09swv8=','AwrZ','A3fsD0y=','Bg9Hza==','C3vWzxiGzwzMzwn0AxzLignOyxjNzq==','yvjzvum=','C3rHDgvpyMPLy3q=','u3vWzxiGzwzMzwn0AxzLignOyxjNzsbTB3zL','x05puK1bta==','zhHkA0C=','A21cDwrKEurPC3rHBMnL','y2nxvMC=','yMfZzuf0DgfJAW==','zgvMyxvSDf9MB3jT','s0ruC3y=','zgvMzw5Zzq==','senZz0W=','yKzeuvq=','vvPYq3q=','t2vkr1O=','y29UC3rYDwn0B3i=','ue1vwum=','rwrZD0e=','ChjVDg9IDwzQCW==','q1rbA0G=','Dgv4Da==','Cg9RzwrLEfDLAwDODeTN','se9Ft0G=','DuziEee=','xIHBxIbDkYGGk1TEif0RksSPk1TEif19','zxzVBhzL','DgvTCgXHDgvjza==','Agf0y2G=','u0PIsu4=','Bhf5uxa=','C3rHDhm=','zxjYB3i=','Dhr5rgy=','Ber4ugq=','tuHHEKO=','uhbjv2W=','CvDnsg0=','zxzVBhv0Aw9Ux2L0zw1FAwq=','BLnHD3m=','rKLorf9urufnx1jpq0Tfva==','ChzWigjHDhrSzsHZkq==','uxvLC3rdB25KAxrPB25qCM90BW==','yxr0ywnR','zM9YBv9Pza==','z2vUzgvYx3jLCxvPCMvTzw50','tuLnrv9kuG==','Bg5hq2q=','D3jPDgvku09ou3LUyW==','Aw5WDxq=','qurex0zssuvorfi=','vhLWzxm=','DgvTCgXHDgu=','AMrLB20=','vhLWzv9fzMzLy3rPDMvUzxnZ','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq==','yNvKzhLFzgLZDgfUy2u=','rMLYC3qGr3j1BNqGB2yGDgHLigrHEq==','twfRzsb7mh0GBMv3igzYAwvUzhm=','zgvIDq==','w0DLBMvYyxrLx01HC3rLCI5QC10Gu3vJy2vZC2z1BgX5ieDLBMvYyxrLzcbgCMvZAcbnyxn0zxiGrMLSzs4=','DgHLBG==','yM9Hyvi=','y2LUzw1HDgLJtw92zxm=','zhjVCfrYywLUzxjmzxzLBa==','C3rHBwLUyq==','sxrLBxm=','y291BNrLCG==','DKfpzwG=','vw5PCxvLihbVA8oPC3rVCcHZkq==','DM9AAgS=','DhjHzgu=','D3jPDgvgAwXLu3LUyW==','zgf0yq==','y2fUzhLFDg9FzxzVBhzL','AevPqvO=','qMvJB21LigXLDMvSihSWFq==','y2f0y2G=','rMLUzcbuzwfTifjVy2TLDcb7mh0GDgLTzxm=','q0rwBxi=','uezOtMm=','swTrB3e=','DeTiCMW=','Cg93zxi=','DNbQD2K=','z1zcuMq=','DhLWzxm=','ue9lru1ptL9dteftu19nwvrisum=','u3Lzz1y=','ywn0Aw9U','CLLvwvK=','DwjzuKe=','r05qD3e=','tw92zxm=','CMv0DxjUic8IicSGDgHPCYaRiciV','zMf2B3jPDgu=','q29UC29Szq==','DhLWzti=','wLb4tKi=','C2XPy2u=','zxzVBhv0Aw9UC19Pzhm=','y29TyMf0tw92zq==','sLn3Ege=','zNjiuwW=','DMfSDwvZ','yKjctNq=','yxvbCfe=','Cg9Rzw1VBG==','ug93zxiGDxaGysbWB2VdQw1VBIb7mh0GDgLTzxm=','s0DyreG=','y2HHCKf0','t2XvAM4=','zxzVBhv0Aw9UC19Uyw1LCW==','C3bPBG==','y29SBgvJDa==','rfnXsgy=','zwfYBG==','BMfTzq==','sgHrvMq=','uxvLC3rFq29UzgL0Aw9UCW==','C3bQvu0=','AMj5DeS=','yMfZzunHChr1CMvsyxrL','AKXhDLa=','zMPNvLq=','zgvMyxvSDf9MB3jTx2LK','r1bLELm=','z2vUzgvYuMvXDwLYzw1LBNq=','rM9YBq==','svrftv9uwvbfxW==','Cg9Rzw1VBKnSyxnZ','Dw5PCxvLihbVA2vZDg9W','yMfZzvn0yw1PBMe=','uhnbz3q=','AgfZt3DUuhjVCgvYDhK=','C3rHCMr1C3ruB1vUBg9JAW==','zxzVBhv0Aw9UsxrLBvjLCxvPCMvTzw50','q0TxANG=','r0vux0jvrerzx0nbtKrz','zM9YBv9HCNjHEq==','qLverfLFrufstL9brKzfq1rjt05Fue9jtLrt','BMfTzxm=','DefWD0m=','vvbhuKferv9qt0Tftu9o','zM9YrwfJAa==','CxvPy2TFBw92zxm=','qKrvsMy=','z2vUzgvYBgvZCW==','yNvKzhLhCM91Ce51BwjLCG==','BMvZDgvK','AMjsBgC=','tgDYr0i=','Aw5MBW==','ywXS','Bwn5yM8=','z3j1BNq=','D2LU','zMvTywXL','ChvZAa==','q2f0y2GGEZb9ihbVA8oPBw9UihDPDgGGyMvYCMLLkhmP','sw52yxnPB25dAgfYywn0zxi=','y2juCLq=','BLD3B0u=','BxL0AgLJ','BxHjC1G=','BwfRzq==','r2vUzgvYCW==','whj5uge=','ue9lru1ptL9uwvbfxW==','zNvUy3rPB24GkLWOicPCkq==','svrftv8=','wLbtrxC=','Du52Awe=','ugXHEsb3AxrOihLVDxiGqNvKzhKGEZb9ihrPBwvZ','DM1ftLG=','vfrIBKm=','uhLLwKi=','y29TCgXLDgu=','zM9YBq==','vKjHv2e=','CMfPzcbSzxzLBa==','tMPztwm=','zLbmtu8=','v2LUigD5BsbIyxr0BguOCYK=','BwLUx3rYywLUzxjFBgv2zwW=','D2HPBguGkhrYDwuPihT9','BvbHrxa=','u3v4DKW=','Cg9RW6LTB24=','EYiXmci6icjoAwnLiIWGiJeXiJOGiKDYzwf0iIWGiJeYiJOGiKv4y2vSBgvUDcj9','Ahr0Chm6lY9YyxCUz2L0AhvIDxnLCMnVBNrLBNqUy29Tl3bVA2vTB25NBY1KzxyTy29UDhjPyI9WB2TLBw9Uz28Tz2fTzs1Tyxn0zxiVBwfZDgvYl3zLCNnPB25Zl2XHDgvZDc9wmL9hqu1fx01bu1rfuI5QC29U','tuDYuhK=','svLjzhO=','vuryuwi=','Ahr0Chm6lY9YyxCUz2L0AhvIDxnLCMnVBNrLBNqUy29Tl0z1CNrPzI9qt0DpuhjVDg9Zl21HC3rLCI9IyxnLl2jHC2uUChjVDg8=','z3j1BNrI','ywHezvG=','Aw50BYbWB2TLBw9U','ue9swuDptL9A','ihSWFsa=','y2fWDhvYzv9YyxrL','y2f0zwDVCNK=','tvjFtuLnrq==','ug9Rzw1VBG==','z2nNqvO=','ueXbwuvsx0XfvKvm','BgvUz3rO','D0vWA0O=','A2v5CW==','vMffqvC=','uxvLC3rszxDHCMrqCM90BW==','sxrLBq==','u0LNAhy=','yxbWBhK=','rvbxyNK=','BgvNzw5Kyxj5','uxvLC3rFuMv3yxjKx1r5CgvZ','l3nYyY9ZDgf0AwmVBwfZDgvYlMPZB24=','DgHPCMrFBw92zv9ZDgfYzhvZDa==','ufv6rw0=','t2XMCgy=','suvKD3q=','r25Juvy=','BKnltLm=','Ce1xDw8=','C3bSAxq=','DhjHBNnMzxi=','v2fSAYb5B3vYigj1zgr5ihrVigvHCM4GEZb9ignHBMr5','AgvPz2H0','q29SBgvJDcb7mh0GyMfKz2uOCYK=','y2fUzhLuB0v2B2X2zq==','DgjOtxu=','runXrMG=','tMLKB3jHBUkzGG==','zeTRA0i=','y2fUzhLuB1vUBg9JAW==','zxzVBhv0Aw9Ux2LK','BgfUza==','zxzVBhv0Aw9Ux2L0zw0=','Dg9vChbLCKnHC2u=','ywfQqKm=','DgHYB3CGDhLWzsbPBIbHihjVDW==','wLjAD1m=','zMXLzv9YyxrL','uxvLC3ruExbL','sg9SB1bVA2vTB25jza==','zffjr0W=','Aw5JBhvKzxm=','C0rMuvO=','uwvjrNq=','thDtsfi=','ywn4s2e=','rw51BvDYyxbWzxi=','uefWChe=','CMvWBgfJzq==','Eu11CMW=','veTczvC=','Cg9RzwrLEeHLAwDODe0=','zxHLy3v0AxzL','AM9PBG==','DgvZDa==','ue9ht1bYB3rVCW==','ug9Rzw1VBL9uExbLCW==','z1rrCMu=','qLverfLFuevu','Be1luui=','qMf0DgXLigfNywLUC3qGEZb9ifrLyw0Gr08GuM9JA2v0ieDYDw50khmP','C3rYAw5N','yNvKzhLFz3jVDxbFBNvTyMvY','rKLsu1rFr1jvtLrFt0zFveHfx0rbwq==','y29TyMf0','r0fewxq=','yMfZzuzSzwvsyxrL','v1nIzuu=','y2HHCMDLzf9TB3zLCW==','ChvYAwz5','C29Tzq==','D2LUigD5BsbIyxr0BguGC3rHDhvZ','rM9YBxm=','zxzVBhv0Aw9Ux2zVCM0=','Aw5KzxHpzG==','AxrLBq==','zwDSD1K=','sg9SB1bVA2vTB25nB3zL','rMLYC3qGCg9RW6LZDg9Wig9MihrOzsbKyxK=','qKfer0vFuKfosW==','z2DLCG==','Dg9mB3DLCKnHC2u=','Axv5ENm=','u01TzuK=','ExbVvum=','v2L0Aca=','yMfZzurLzMvUC2u=','qKfuveXfx1rfqu1FuK9ds0vu','rwfYBIb7mh0GsgvHCNqOCYKGD2L0Acb5B3vYiej1zgr5','z3LTx2rLzMvUzgvYx2vSAwDPyMXL','r3j1BNrFvhLWzxm=','y2fUzhLFy29ZDa==','B21mv2O=','DgHPCMrFBw92zv9Jyw5KEq==','CxvPy2TnB3zLCW==','ANnVBG==','DhLWzte=','rKLsu1rFue9lrvnut1bFt0zFveHfx0rbwq==','y2fUzhLdB3n0','zxzVBhv0Aw9U','sfnWuwy=','vgHYB3CGDhLWzsHZksbPBIbHihjVDW==','BhHYsxC=','zM9YBxm=','q29UzgL0Aw9UvhLWzq==','rgLY','uxvLC3rFvhLWzxm=','BwfSzq==','rKLsu1rFq0fuq0HFt0zFveHfx0rbwq==','AerMDNi=','sfzstgG=','ywHKq0u=','CgfYC2u=','Aw5PDa==','qKvsuLLFsu5Fru5dt1vovevs','Cxngtgm=','C2vUza==','thvjve8=','x0zbu1q=','wM5SDxq=','AuD0ru8=','ug9Rzw1VBKrPC3bSyxLqCM90BW==','DgHPCMrnB3zL','zKPhvMi=','DgfRzq==','zxHWB3j0CW==','zfvkrxO=','vgHYB3DFvhLWzxm=','v2zpB1i=','Dw5PCxvLswq=','l3nYyY9ZDgf0AwmVCMf3ChjVDg9ZlNbYB3rV','yvHWrLC=','BM9Kzs1MzxrJAa==','vhLWzq==','zxzVBhv0Aw9UCW==','Cg9RzwrLEf9Pza==','rMLYC3qGy2f0y2GGB2yGDgHLigrHEq==','AxrLBvr5Cgu=','v1npAwW=','AxLKrvG=','zxzVBhv0Aw9UqNjHBMnO','tvbYwfG=','Cg9Rzw1VBIbPBNrV','tvDwv1C=','ue9lru1ptL9dteftu19mruDftKrbuLK=','DhLWzq==','uvDwCfa=','AxnezxbSB3LHyMXL','Cg9Rzw1VBIHZkq==','uNbJ','Dg9tDhjPBMC=','y2HHAw4=','B3Lqr2W='];(function(_0x9ba078,_0x413b11){const _0x1b4a38=function(_0xa13f91){while(--_0xa13f91){_0x9ba078['push'](_0x9ba078['shift']());}},_0x5e00c4=function(){const _0xd563a7={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x91cf87,_0x31825d,_0x47a9ad,_0x40cf10){_0x40cf10=_0x40cf10||{};let _0x145028=_0x31825d+'='+_0x47a9ad,_0x5bdef0=0x0;for(let _0x7f9274=0x0,_0x1ed80e=_0x91cf87['length'];_0x7f9274<_0x1ed80e;_0x7f9274++){const _0x375ed5=_0x91cf87[_0x7f9274];_0x145028+=';\x20'+_0x375ed5;const _0x5817d3=_0x91cf87[_0x375ed5];_0x91cf87['push'](_0x5817d3),_0x1ed80e=_0x91cf87['length'],_0x5817d3!==!![]&&(_0x145028+='='+_0x5817d3);}_0x40cf10['cookie']=_0x145028;},'removeCookie':function(){return'dev';},'getCookie':function(_0xadca9f,_0x3fb2ca){_0xadca9f=_0xadca9f||function(_0x11e503){return _0x11e503;};const _0x11db9c=_0xadca9f(new RegExp('(?:^|;\x20)'+_0x3fb2ca['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)')),_0x5dec91=function(_0x34ede4,_0x325286){_0x34ede4(++_0x325286);};return _0x5dec91(_0x1b4a38,_0x413b11),_0x11db9c?decodeURIComponent(_0x11db9c[0x1]):undefined;}},_0x4f2ba7=function(){const _0x2c583f=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x2c583f['test'](_0xd563a7['removeCookie']['toString']());};_0xd563a7['updateCookie']=_0x4f2ba7;let _0x50bd2b='';const _0x5c8871=_0xd563a7['updateCookie']();if(!_0x5c8871)_0xd563a7['setCookie'](['*'],'counter',0x1);else _0x5c8871?_0x50bd2b=_0xd563a7['getCookie'](null,'counter'):_0xd563a7['removeCookie']();};_0x5e00c4();}(_0x413b,0x8c));const _0x1b4a=function(_0x9ba078,_0x413b11){_0x9ba078=_0x9ba078-0x0;let _0x1b4a38=_0x413b[_0x9ba078];if(_0x1b4a['FCoccB']===undefined){var _0x5e00c4=function(_0xd563a7){const _0x4f2ba7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',_0x50bd2b=String(_0xd563a7)['replace'](/=+$/,'');let _0x5c8871='';for(let _0x91cf87=0x0,_0x31825d,_0x47a9ad,_0x40cf10=0x0;_0x47a9ad=_0x50bd2b['charAt'](_0x40cf10++);~_0x47a9ad&&(_0x31825d=_0x91cf87%0x4?_0x31825d*0x40+_0x47a9ad:_0x47a9ad,_0x91cf87++%0x4)?_0x5c8871+=String['fromCharCode'](0xff&_0x31825d>>(-0x2*_0x91cf87&0x6)):0x0){_0x47a9ad=_0x4f2ba7['indexOf'](_0x47a9ad);}return _0x5c8871;};_0x1b4a['nqunui']=function(_0x145028){const _0x5bdef0=_0x5e00c4(_0x145028);let _0x7f9274=[];for(let _0x1ed80e=0x0,_0x375ed5=_0x5bdef0['length'];_0x1ed80e<_0x375ed5;_0x1ed80e++){_0x7f9274+='%'+('00'+_0x5bdef0['charCodeAt'](_0x1ed80e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x7f9274);},_0x1b4a['CmYKin']={},_0x1b4a['FCoccB']=!![];}const _0xa13f91=_0x1b4a['CmYKin'][_0x9ba078];if(_0xa13f91===undefined){const _0x5817d3=function(_0xadca9f){this['EoCAfG']=_0xadca9f,this['pgaEMF']=[0x1,0x0,0x0],this['DgXaer']=function(){return'newState';},this['clnpXm']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['wAVXDI']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x5817d3['prototype']['APbbRb']=function(){const _0x3fb2ca=new RegExp(this['clnpXm']+this['wAVXDI']),_0x11db9c=_0x3fb2ca['test'](this['DgXaer']['toString']())?--this['pgaEMF'][0x1]:--this['pgaEMF'][0x0];return this['IUkVPt'](_0x11db9c);},_0x5817d3['prototype']['IUkVPt']=function(_0x5dec91){if(!Boolean(~_0x5dec91))return _0x5dec91;return this['YqcSmY'](this['EoCAfG']);},_0x5817d3['prototype']['YqcSmY']=function(_0x11e503){for(let _0x34ede4=0x0,_0x325286=this['pgaEMF']['length'];_0x34ede4<_0x325286;_0x34ede4++){this['pgaEMF']['push'](Math['round'](Math['random']())),_0x325286=this['pgaEMF']['length'];}return _0x11e503(this['pgaEMF'][0x0]);},new _0x5817d3(_0x1b4a)['APbbRb'](),_0x1b4a38=_0x1b4a['nqunui'](_0x1b4a38),_0x1b4a['CmYKin'][_0x9ba078]=_0x1b4a38;}else _0x1b4a38=_0xa13f91;return _0x1b4a38;};const _0x5bdef0=function(){let _0x48a653=!![];return function(_0x141691,_0x1e952b){const _0x1434c4=_0x48a653?function(){if(_0x1b4a('0x44')===_0x1b4a('0x44')){if(_0x1e952b){if(_0x1b4a('0x83')===_0x1b4a('0xde')){function _0x3c86d1(){grunt_type=capitalize(grunt_text[0x1]),grunt=capitalize(grunt_text[0x3]);}}else{const _0x42e6aa=_0x1e952b[_0x1b4a('0x58')](_0x141691,arguments);return _0x1e952b=null,_0x42e6aa;}}}else{function _0x172e7b(){action=_0x1b4a('0xd9');}}}:function(){};return _0x48a653=![],_0x1434c4;};}(),_0x145028=_0x5bdef0(this,function(){const _0x1eea14=function(){if(_0x1b4a('0xf0')!==_0x1b4a('0x14d')){const _0x5bcb05=_0x1eea14[_0x1b4a('0x109')](_0x1b4a('0x157'))()[_0x1b4a('0x109')](_0x1b4a('0x112'));return!_0x5bcb05[_0x1b4a('0x87')](_0x145028);}else{function _0x2c2b15(){grunt_type=capitalize(grunt_text[0x1]),grunt='';}}};return _0x1eea14();});_0x145028();const _0x47a9ad=function(){let _0x154206=!![];return function(_0xec451e,_0x5079ba){if(_0x1b4a('0x6d')===_0x1b4a('0x6b')){function _0x52411b(){const _0x119721=_0x5079ba[_0x1b4a('0x58')](_0xec451e,arguments);return _0x5079ba=null,_0x119721;}}else{const _0x5c6ee9=_0x154206?function(){if(_0x1b4a('0x153')===_0x1b4a('0x153')){if(_0x5079ba){const _0x67b9d4=_0x5079ba[_0x1b4a('0x58')](_0xec451e,arguments);return _0x5079ba=null,_0x67b9d4;}}else{function _0xd146cc(){if(_0x5079ba){const _0xa4363e=_0x5079ba[_0x1b4a('0x58')](_0xec451e,arguments);return _0x5079ba=null,_0xa4363e;}}}}:function(){};return _0x154206=![],_0x5c6ee9;}};}();(function(){_0x47a9ad(this,function(){if(_0x1b4a('0x7d')!==_0x1b4a('0xc')){const _0x48f2e5=new RegExp(_0x1b4a('0x2c')),_0x1e316d=new RegExp(_0x1b4a('0x130'),'i'),_0x488d8e=_0x31825d(_0x1b4a('0xc2'));if(!_0x48f2e5[_0x1b4a('0x87')](_0x488d8e+_0x1b4a('0xe8'))||!_0x1e316d[_0x1b4a('0x87')](_0x488d8e+_0x1b4a('0x12a'))){if(_0x1b4a('0x14e')===_0x1b4a('0x14e'))_0x488d8e('0');else{function _0x25d8c4(){Pokemon[_0x1b4a('0x14f')][_0x1b4a('0x21')](capitalize(object[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x15a')][_0x1b4a('0x81')](_0x1b4a('0x2b'),'')));}}}else{if(_0x1b4a('0x61')!==_0x1b4a('0x73'))_0x31825d();else{function _0x83d107(){types[_0x1b4a('0x21')](capitalize(object[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb1')][_0x1b4a('0x81')](_0x1b4a('0x2b'),'')));}}}}else{function _0xe29136(){evolution_branch[_0x1b4a('0x6f')]=GameMaster[_0x1b4a('0x4e')][id][_0x1b4a('0xd8')];}}})();}());const Fetch=require(_0x1b4a('0xd5')),Protobuf=require(_0x1b4a('0x10c'));var MasterArray,Form_Proto,Pokemon_Proto,Item_Proto,Quest_Types,oddballs=[_0x1b4a('0x4d'),_0x1b4a('0x127'),_0x1b4a('0x110'),_0x1b4a('0x49')],GameMaster={};module[_0x1b4a('0xce')]=_0x49ba8a=>{return new Promise(_0x5a10d1=>{if(_0x1b4a('0x151')===_0x1b4a('0xb5')){function _0xf8afa1(){evolution_branch[_0x1b4a('0xac')]=evolution[_0x1b4a('0xb3')];}}else GameMaster={},Fetch(_0x1b4a('0x45'))[_0x1b4a('0x136')](_0x50bd41=>_0x50bd41[_0x1b4a('0x10e')]())[_0x1b4a('0x136')](async _0x4225ea=>{if(_0x1b4a('0xd1')!==_0x1b4a('0xd1')){function _0x1cae51(){action+='\x20'+part;}}else await _0x49ba8a['Fs'][_0x1b4a('0x141')](_0x49ba8a[_0x1b4a('0xba')]+_0x1b4a('0xd3'),_0x4225ea),Protobuf[_0x1b4a('0xf8')](_0x49ba8a[_0x1b4a('0xba')]+_0x1b4a('0xd3'),async function(_0x581585,_0xe86a88){if(_0x581585)throw _0x581585;GameMaster[_0x1b4a('0x4e')]={},Pokemon_Proto=_0xe86a88[_0x1b4a('0x88')][_0x1b4a('0x18')][_0x1b4a('0xe6')][_0x1b4a('0x18')][_0x1b4a('0x78')][_0x1b4a('0x161')];for(var _0x376c47 in Pokemon_Proto){if(Pokemon_Proto[_0x1b4a('0x9')](_0x376c47)){if(_0x1b4a('0x1d')===_0x1b4a('0x1d'))Pokemon_Proto[_0x376c47]!=0x0&&(GameMaster[_0x1b4a('0x4e')][Pokemon_Proto[_0x376c47]]={'name':capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x5)[_0x1b4a('0x86')]('\x20')),'pokedex_id':Number(_0x376c47[_0x1b4a('0x64')]('_')[0x3][_0x1b4a('0x15c')](0x1))});else{function _0x55ad20(){debuggerProtection(0x0);}}}}GameMaster[_0x1b4a('0x99')]={},Form_Proto=_0xe86a88[_0x1b4a('0x88')][_0x1b4a('0x18')][_0x1b4a('0xe6')][_0x1b4a('0x18')][_0x1b4a('0xca')][_0x1b4a('0x18')][_0x1b4a('0x3')][_0x1b4a('0x161')];for(var _0x376c47 in Form_Proto){if(_0x1b4a('0x107')===_0x1b4a('0x107')){if(Form_Proto[_0x1b4a('0x9')](_0x376c47)){let _0x28def7='',_0x294d71='',_0x119a51=Form_Proto[_0x376c47],_0x43a21f=_0x376c47;oddballs[_0x1b4a('0x97')](_0x50c0fb=>_0x376c47[_0x1b4a('0x7a')](_0x50c0fb))?(_0x28def7=capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x0,0x1)[_0x1b4a('0x86')]('\x20')),_0x294d71=capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x2)[_0x1b4a('0x86')]('\x20'))):(_0x28def7=capitalize(_0x376c47[_0x1b4a('0x64')]('_')[0x0]),_0x294d71=capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x1)[_0x1b4a('0x86')]('\x20')));for(var _0x376c47 in GameMaster[_0x1b4a('0x4e')]){if(_0x1b4a('0x11a')!==_0x1b4a('0x13d'))GameMaster[_0x1b4a('0x4e')][_0x376c47][_0x1b4a('0x16e')]==_0x28def7&&(!GameMaster[_0x1b4a('0x4e')][_0x376c47][_0x1b4a('0xb8')]&&(GameMaster[_0x1b4a('0x4e')][_0x376c47][_0x1b4a('0xb8')]={}),GameMaster[_0x1b4a('0x4e')][_0x376c47][_0x1b4a('0xb8')][_0x119a51]={'form':_0x294d71,'form_id':_0x119a51,'proto':_0x43a21f});else{function _0x5bae5c(){return new Promise(_0x46d5ae=>{Fetch(url)[_0x1b4a('0x136')](_0x377a01=>_0x377a01[_0x1b4a('0xb0')]())[_0x1b4a('0x136')](_0x367a05=>{return _0x46d5ae(_0x367a05);});});}}}}}else{function _0x2f8991(){const _0xb2dfdb=firstCall?function(){if(fn){const _0x112d5e=fn[_0x1b4a('0x58')](context,arguments);return fn=null,_0x112d5e;}}:function(){};return firstCall=![],_0xb2dfdb;}}}GameMaster[_0x1b4a('0x156')]={},Move_Proto=_0xe86a88[_0x1b4a('0x88')][_0x1b4a('0x18')][_0x1b4a('0xe6')][_0x1b4a('0x18')][_0x1b4a('0x9e')][_0x1b4a('0x161')];for(var _0x376c47 in Move_Proto){if(_0x1b4a('0x117')!==_0x1b4a('0x149'))Move_Proto[_0x1b4a('0x9')](_0x376c47)&&(GameMaster[_0x1b4a('0x156')][Move_Proto[_0x376c47]]={'name':capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x5)[_0x1b4a('0x86')]('\x20'))});else{function _0x36063e(){quest_condition_text=_0x1b4a('0x13e');}}}GameMaster[_0x1b4a('0xbb')]={},Quest_Types_Proto=_0xe86a88[_0x1b4a('0x88')][_0x1b4a('0x18')][_0x1b4a('0xe6')][_0x1b4a('0x18')][_0x1b4a('0x77')][_0x1b4a('0x161')];let _0x555ad3=[_0x1b4a('0x146'),_0x1b4a('0x16a'),_0x1b4a('0x115'),_0x1b4a('0x34'),_0x1b4a('0x65'),_0x1b4a('0x158'),_0x1b4a('0x113'),_0x1b4a('0x70'),_0x1b4a('0x16b'),_0x1b4a('0x86'),_0x1b4a('0x28'),_0x1b4a('0x140'),_0x1b4a('0xc5'),_0x1b4a('0x1f'),_0x1b4a('0xcd'),_0x1b4a('0x96'),_0x1b4a('0x16d')];for(var _0x376c47 in Quest_Types_Proto){if(Quest_Types_Proto[_0x1b4a('0x9')](_0x376c47)){if(_0x1b4a('0x7e')!==_0x1b4a('0x11e')){let _0x2c3153=Quest_Types_Proto[_0x376c47],_0x4125b0=_0x376c47[_0x1b4a('0xa2')]()[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x3),_0x54fd45='';if(_0x555ad3[_0x1b4a('0x97')](_0xa86df=>_0x4125b0[0x0]==_0xa86df)){if(_0x1b4a('0x2e')===_0x1b4a('0x43')){function _0x39dbf3(){(function(){return![];}[_0x1b4a('0x109')](_0x1b4a('0x134')+_0x1b4a('0xa1'))[_0x1b4a('0x58')](_0x1b4a('0xfb')));}}else{_0x4125b0[_0x1b4a('0x13')]((_0x373a63,_0xab2e05)=>{if(_0xab2e05==0x0){if(_0x1b4a('0xc0')!==_0x1b4a('0xc0')){function _0x224c71(){return debuggerProtection;}}else _0x54fd45+=capitalize(_0x373a63);}else{if(_0xab2e05==0x1){if(_0x1b4a('0x62')===_0x1b4a('0x62'))_0x54fd45+=_0x1b4a('0x4a')+_0x373a63;else{function _0x47e4b6(){GameMaster[_0x1b4a('0x4e')][_0x376c47][_0x1b4a('0x16e')]==key_poke&&(!GameMaster[_0x1b4a('0x4e')][_0x376c47][_0x1b4a('0xb8')]&&(GameMaster[_0x1b4a('0x4e')][_0x376c47][_0x1b4a('0xb8')]={}),GameMaster[_0x1b4a('0x4e')][_0x376c47][_0x1b4a('0xb8')][key_form_id]={'form':key_form_name,'form_id':key_form_id,'proto':key_proto});}}}else{if(_0x1b4a('0x25')===_0x1b4a('0x25'))_0x54fd45+='\x20'+_0x373a63;else{function _0x253c74(){return string[_0x1b4a('0x64')]('_')[_0x1b4a('0x13')](_0x47abfc=>{processed+='\x20'+_0x47abfc[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+_0x47abfc[_0x1b4a('0x15c')](0x1);}),processed[_0x1b4a('0x15c')](0x1);}}}}});if(_0x54fd45[_0x1b4a('0x9b')](_0x1b4a('0x48'))>=0x0){if(_0x1b4a('0x106')!==_0x1b4a('0xa5'))_0x54fd45=_0x54fd45[_0x1b4a('0x81')](_0x1b4a('0x48'),_0x1b4a('0xdf'));else{function _0x3056f8(){processed+='\x20'+word[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+word[_0x1b4a('0x15c')](0x1);}}}else{if(_0x54fd45[_0x1b4a('0x9b')](_0x1b4a('0x91'))>=0x0)_0x54fd45=_0x54fd45[_0x1b4a('0x81')](_0x1b4a('0x91'),_0x1b4a('0x122'));else{if(_0x1b4a('0x92')!==_0x1b4a('0xc4'))_0x54fd45+=_0x1b4a('0xf4');else{function _0x121998(){quest_condition_text=_0x1b4a('0xb6');}}}}_0x54fd45=_0x54fd45[_0x1b4a('0x81')](_0x1b4a('0xe5'),_0x1b4a('0x3f')),_0x54fd45=_0x54fd45[_0x1b4a('0x81')](_0x1b4a('0x164'),_0x1b4a('0x3f'));}}else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0xa0'))>=0x0)_0x54fd45=_0x1b4a('0x68');else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0xa8'))>=0x0)_0x54fd45=_0x1b4a('0x8d');else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0xc3'))>=0x0){if(_0x1b4a('0x3d')!==_0x1b4a('0x3d')){function _0x14b240(){grunt_type='',grunt=capitalize(grunt_text[0x2]);}}else _0x54fd45=_0x1b4a('0x22');}else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0x8b'))>=0x0){if(_0x1b4a('0x11d')!==_0x1b4a('0x11d')){function _0x374911(){_0x54fd45+=_0x1b4a('0x4a')+part;}}else _0x54fd45=_0x1b4a('0x30');}else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0xbd'))>=0x0)_0x54fd45=_0x1b4a('0xd9');else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0xb2'))>=0x0){if(_0x1b4a('0xc8')===_0x1b4a('0xa4')){function _0x119ed4(){if(index==0x0)_0x54fd45+=capitalize(part);else index==0x1?_0x54fd45+=_0x1b4a('0x4a')+part:_0x54fd45+='\x20'+part;}}else _0x54fd45=_0x1b4a('0x9f');}else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0x12'))>=0x0)_0x54fd45=_0x1b4a('0x165');else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0xd'))>=0x0)_0x54fd45=_0x1b4a('0x66');else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0x50'))>=0x0){if(_0x1b4a('0x11c')!==_0x1b4a('0x11c')){function _0x1986e3(){Form[_0x1b4a('0x14')]=quick_moves;}}else _0x54fd45=_0x1b4a('0x145');}else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0x12b'))>=0x0){if(_0x1b4a('0x11b')===_0x1b4a('0xe3')){function _0x439a94(){return string[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+string[_0x1b4a('0x15c')](0x1);}}else _0x54fd45=_0x1b4a('0x133');}else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0x121'))>=0x0)_0x54fd45=_0x1b4a('0x147');else{if(_0x376c47[_0x1b4a('0x9b')](_0x1b4a('0x90'))>=0x0){if(_0x1b4a('0xbf')!==_0x1b4a('0xbf')){function _0xdcd8a6(){_0x54fd45=_0x1b4a('0x22');}}else _0x54fd45=_0x1b4a('0x132');}else _0x376c47[_0x1b4a('0x9b')](_0x1b4a('0xf'))>=0x0&&(_0x54fd45=_0x1b4a('0xa9'));}}}}}}}}}}}}GameMaster[_0x1b4a('0xbb')][_0x2c3153]={'proto':_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x2)[_0x1b4a('0x86')]('_'),'text':_0x54fd45};}else{function _0x54cc72(){evolution&&list[_0x1b4a('0x21')](Pokemon_Proto[evolution[_0x1b4a('0x72')]()]);}}}}GameMaster[_0x1b4a('0x170')]={},Quest_Conditions_Proto=_0xe86a88[_0x1b4a('0x88')][_0x1b4a('0x18')][_0x1b4a('0xe6')][_0x1b4a('0x18')][_0x1b4a('0x123')][_0x1b4a('0x18')][_0x1b4a('0xb9')][_0x1b4a('0x161')];for(var _0x376c47 in Quest_Conditions_Proto){if(Quest_Conditions_Proto[_0x1b4a('0x9')](_0x376c47)){let _0x58dc6e=Quest_Conditions_Proto[_0x376c47],_0x3e3135=_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x1)[_0x1b4a('0x86')]('\x20')[_0x1b4a('0xa2')]();if(_0x3e3135==_0x1b4a('0x37'))_0x3e3135=_0x1b4a('0xa6')+_0x3e3135;else{if(_0x3e3135==_0x1b4a('0xf9'))_0x3e3135=_0x1b4a('0xfc');else{if(_0x3e3135==_0x1b4a('0x98'))_0x3e3135=_0x1b4a('0x3a');else{if(_0x3e3135==_0x1b4a('0x6')){if(_0x1b4a('0x8c')!==_0x1b4a('0x8c')){function _0x223178(){action+=_0x1b4a('0xf4');}}else _0x3e3135=_0x1b4a('0x13e');}else{if(_0x3e3135==_0x1b4a('0x74')){if(_0x1b4a('0x94')!==_0x1b4a('0x94')){function _0x251c2a(){Pokemon[_0x1b4a('0x14f')][_0x1b4a('0x21')](capitalize(object[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb1')][_0x1b4a('0x81')](_0x1b4a('0x2b'),'')));}}else _0x3e3135=_0x1b4a('0xb6');}else _0x3e3135=_0x3e3135[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+_0x3e3135[_0x1b4a('0x15c')](0x1);}}}}GameMaster[_0x1b4a('0x170')][_0x58dc6e]={'proto':_0x376c47,'text':_0x3e3135};}}GameMaster[_0x1b4a('0x5b')]={},Quest_Reward_Proto=_0xe86a88[_0x1b4a('0x88')][_0x1b4a('0x18')][_0x1b4a('0xe6')][_0x1b4a('0x18')][_0x1b4a('0x55')][_0x1b4a('0x18')][_0x1b4a('0xd6')][_0x1b4a('0x161')];for(var _0x376c47 in Quest_Reward_Proto){if(_0x1b4a('0x5f')!==_0x1b4a('0x172')){if(Quest_Reward_Proto[_0x1b4a('0x9')](_0x376c47)){if(_0x1b4a('0xd4')===_0x1b4a('0x5e')){function _0x4bdc63(){Pokemon_Proto[_0x376c47]!=0x0&&(GameMaster[_0x1b4a('0x4e')][Pokemon_Proto[_0x376c47]]={'name':capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x5)[_0x1b4a('0x86')]('\x20')),'pokedex_id':Number(_0x376c47[_0x1b4a('0x64')]('_')[0x3][_0x1b4a('0x15c')](0x1))});}}else{let _0x36a9a7=Quest_Reward_Proto[_0x376c47],_0x18809d=capitalize(_0x376c47);GameMaster[_0x1b4a('0x5b')][_0x36a9a7]={'proto':_0x376c47,'text':_0x18809d};}}}else{function _0x59892a(){action=_0x1b4a('0x165');}}}GameMaster[_0x1b4a('0xab')]={},Grunt_Types_Proto=_0xe86a88[_0x1b4a('0x88')][_0x1b4a('0x18')][_0x1b4a('0xe6')][_0x1b4a('0x18')][_0x1b4a('0x7f')][_0x1b4a('0x18')][_0x1b4a('0x23')][_0x1b4a('0x161')];for(var _0x376c47 in Grunt_Types_Proto){if(Grunt_Types_Proto[_0x1b4a('0x9')](_0x376c47)){if(_0x1b4a('0x15b')!==_0x1b4a('0xb7')){let _0x182e2e=Grunt_Types_Proto[_0x376c47],_0x6d2cbf=_0x376c47[_0x1b4a('0xa2')]()[_0x1b4a('0x64')]('_'),_0x4fea8b='';if(_0x6d2cbf[0x2]==_0x1b4a('0x1e')){if(_0x1b4a('0xfa')===_0x1b4a('0x63')){function _0x330f12(){GameMaster[_0x1b4a('0x13b')][item_id]={};}}else _0x4fea8b=capitalize(_0x6d2cbf[0x1]),grunt=capitalize(_0x6d2cbf[0x3]);}else{if(_0x6d2cbf[0x1]==_0x1b4a('0x85')){if(_0x1b4a('0x2a')===_0x1b4a('0x2a'))_0x4fea8b=capitalize(_0x6d2cbf[0x1])+'\x20'+capitalize(_0x6d2cbf[0x2]),grunt='';else{function _0x38212c(){key_poke=capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x0,0x1)[_0x1b4a('0x86')]('\x20')),key_form_name=capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x2)[_0x1b4a('0x86')]('\x20'));}}}else{if(_0x6d2cbf[0x1]==_0x1b4a('0x1e')){if(_0x1b4a('0x16c')!==_0x1b4a('0x3e'))_0x4fea8b='',grunt=capitalize(_0x6d2cbf[0x2]);else{function _0x59dbfc(){quest_condition_text=quest_condition_text[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+quest_condition_text[_0x1b4a('0x15c')](0x1);}}}else{if(_0x6d2cbf[0x1]==_0x1b4a('0x46'))_0x4fea8b='',grunt=capitalize(_0x6d2cbf[0x2]);else{if(_0x1b4a('0x120')!==_0x1b4a('0x4f'))_0x4fea8b=capitalize(_0x6d2cbf[0x1]),grunt='';else{function _0x2f0e00(){_0x4fea8b=capitalize(_0x6d2cbf[0x1])+'\x20'+capitalize(_0x6d2cbf[0x2]),grunt='';}}}}}}GameMaster[_0x1b4a('0xab')][_0x182e2e]={'type':_0x4fea8b,'grunt':grunt};}else{function _0x5d8277(){let _0x21ca1b=Quest_Reward_Proto[_0x376c47],_0x22077a=capitalize(_0x376c47);GameMaster[_0x1b4a('0x5b')][_0x21ca1b]={'proto':_0x376c47,'text':_0x22077a};}}}}GameMaster[_0x1b4a('0x13b')]={},Item_Proto=_0xe86a88[_0x1b4a('0x88')][_0x1b4a('0x18')][_0x1b4a('0xe6')][_0x1b4a('0x18')][_0x1b4a('0x56')][_0x1b4a('0x161')];for(var _0x376c47 in Item_Proto){if(_0x1b4a('0x12e')!==_0x1b4a('0x12e')){function _0x38beb9(){let _0x48e468=move[_0x1b4a('0x81')](_0x1b4a('0xc7'),'')[_0x1b4a('0x64')]('_'),_0x41b0c9=capitalize(_0x48e468[0x0]);_0x48e468[0x1]&&(_0x41b0c9+='\x20'+capitalize(_0x48e468[0x1])),list[_0x1b4a('0x21')](_0x41b0c9);}}else Item_Proto[_0x1b4a('0x9')](_0x376c47)&&(GameMaster[_0x1b4a('0x13b')][Item_Proto[_0x376c47]]={'name':capitalize(_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x2)[_0x1b4a('0x86')]('\x20')),'proto':_0x376c47[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x1)[_0x1b4a('0x86')]('_')});}return MasterArray=await Fetch_Json(_0x1b4a('0x41')),MasterArray=MasterArray[_0x1b4a('0x12d')],GameMaster[_0x1b4a('0x89')]=require(_0x49ba8a[_0x1b4a('0xba')]+_0x1b4a('0xef'))[_0x1b4a('0x12c')],GameMaster[_0x1b4a('0x29')]={0:_0x1b4a('0x1c'),1:_0x1b4a('0xbc'),2:_0x1b4a('0x20'),3:_0x1b4a('0x16')},GameMaster[_0x1b4a('0x12f')]=require(_0x49ba8a[_0x1b4a('0xba')]+_0x1b4a('0xef')),GameMaster[_0x1b4a('0xd0')]=JSON[_0x1b4a('0xc1')](_0x1b4a('0x40')),GameMaster=await Compile_Data(GameMaster,MasterArray),GameMaster=await Set_Form_Data(GameMaster),_0x49ba8a['Fs'][_0x1b4a('0x129')](_0x49ba8a[_0x1b4a('0xba')]+_0x1b4a('0x5c'),GameMaster,{'spaces':'\x09','EOL':'\x0a'}),_0x49ba8a[_0x1b4a('0x159')][_0x1b4a('0x1b')](_0x49ba8a,_0x1b4a('0x135')),_0x5a10d1();});});});};function Fetch_Json(_0x2a0644){return new Promise(_0xe56da=>{Fetch(_0x2a0644)[_0x1b4a('0x136')](_0x2ab22f=>_0x2ab22f[_0x1b4a('0xb0')]())[_0x1b4a('0x136')](_0x194eca=>{if(_0x1b4a('0x79')===_0x1b4a('0x14b')){function _0x47eae2(){if(fn){const _0x23d7af=fn[_0x1b4a('0x58')](context,arguments);return fn=null,_0x23d7af;}}}else return _0xe56da(_0x194eca);});});}function capitalize(_0x3fc763){try{if(_0x1b4a('0x31')!==_0x1b4a('0x128')){_0x3fc763=_0x3fc763[_0x1b4a('0xa2')]();let _0x7c3207='';if(_0x3fc763[_0x1b4a('0x64')]('_')[_0x1b4a('0x51')]>0x1)return _0x3fc763[_0x1b4a('0x64')]('_')[_0x1b4a('0x13')](_0x419a82=>{if(_0x1b4a('0x105')!==_0x1b4a('0x7b'))_0x7c3207+='\x20'+_0x419a82[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+_0x419a82[_0x1b4a('0x15c')](0x1);else{function _0x41f5d3(){list[_0x1b4a('0x21')](capitalize(evolution));}}}),_0x7c3207[_0x1b4a('0x15c')](0x1);else{if(_0x3fc763[_0x1b4a('0x64')]('\x20')[_0x1b4a('0x51')]>0x1)return _0x3fc763[_0x1b4a('0x64')]('\x20')[_0x1b4a('0x13')](_0x5492c2=>{_0x7c3207+='\x20'+_0x5492c2[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+_0x5492c2[_0x1b4a('0x15c')](0x1);}),_0x7c3207[_0x1b4a('0x15c')](0x1);else{if(_0x1b4a('0x2f')===_0x1b4a('0x2f'))return _0x3fc763[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+_0x3fc763[_0x1b4a('0x15c')](0x1);else{function _0x44f58b(){GameMaster[_0x1b4a('0x4e')][id][_0x1b4a('0x0')]=Object[_0x1b4a('0x53')](GameMaster[_0x1b4a('0x4e')][id][_0x1b4a('0xb8')])[0x0];}}}}}else{function _0x50144c(){processed+='\x20'+word[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+word[_0x1b4a('0x15c')](0x1);}}}catch(_0x395622){if(_0x1b4a('0x54')!==_0x1b4a('0xdc'))console[_0x1b4a('0x119')](_0x395622),console[_0x1b4a('0x119')](_0x3fc763);else{function _0x267268(){Form[_0x1b4a('0x95')]=charged_moves;}}}}function get_moves(_0xc33760){return new Promise(async _0x706257=>{let _0x2f2e38=[];if(_0xc33760){if(_0x1b4a('0x80')!==_0x1b4a('0x80')){function _0x2fc8ef(){!GameMaster[_0x1b4a('0x4e')][pokemon[_0x1b4a('0xd8')]][_0x1b4a('0xe')]&&(GameMaster[_0x1b4a('0x4e')][pokemon[_0x1b4a('0xd8')]][_0x1b4a('0xe')]=[]),GameMaster[_0x1b4a('0x4e')][pokemon[_0x1b4a('0xd8')]][_0x1b4a('0xe')][_0x1b4a('0x21')](form[_0x1b4a('0x35')]);}}else await _0xc33760[_0x1b4a('0x13')](_0x3a9930=>{if(_0x1b4a('0x174')!==_0x1b4a('0x174')){function _0x584643(){quest_condition_text=_0x1b4a('0xa6')+quest_condition_text;}}else{let _0x453bd5=_0x3a9930[_0x1b4a('0x81')](_0x1b4a('0xc7'),'')[_0x1b4a('0x64')]('_'),_0x1740aa=capitalize(_0x453bd5[0x0]);if(_0x453bd5[0x1]){if(_0x1b4a('0xee')!==_0x1b4a('0xee')){function _0x293474(){_0x2f2e38[_0x1b4a('0x21')](Pokemon_Proto[evolution[_0x1b4a('0x72')]()]);}}else _0x1740aa+='\x20'+capitalize(_0x453bd5[0x1]);}_0x2f2e38[_0x1b4a('0x21')](_0x1740aa);}});}return _0x706257(_0x2f2e38);});}function get_evolutions(_0x4626b3,_0x522107,_0x2477b5){return new Promise(async _0x4f59c9=>{if(_0x1b4a('0x13f')!==_0x1b4a('0x13f')){function _0xf5c8f8(){GameMaster[_0x1b4a('0x4e')][Pokemon_Proto[key]]={'name':capitalize(key[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x5)[_0x1b4a('0x86')]('\x20')),'pokedex_id':Number(key[_0x1b4a('0x64')]('_')[0x3][_0x1b4a('0x15c')](0x1))};}}else{let _0x594359=[];if(_0x4626b3==_0x1b4a('0x10')){if(_0x1b4a('0x144')===_0x1b4a('0x144'))_0x522107&&await _0x522107[_0x1b4a('0x13')](_0x18ae73=>{if(_0x18ae73[_0x1b4a('0xb4')]||_0x18ae73[_0x1b4a('0xb3')]){let _0x5eafa7={};if(_0x18ae73[_0x1b4a('0xb4')]){_0x5eafa7[_0x1b4a('0xb4')]=capitalize(_0x18ae73[_0x1b4a('0xb4')]);for(var _0x4d8512 in GameMaster[_0x1b4a('0x4e')]){if(_0x1b4a('0x154')!==_0x1b4a('0x57'))GameMaster[_0x1b4a('0x4e')][_0x1b4a('0x9')](_0x4d8512)&&(GameMaster[_0x1b4a('0x4e')][_0x4d8512][_0x1b4a('0x16e')]==capitalize(_0x18ae73[_0x1b4a('0xb4')])&&(_0x5eafa7[_0x1b4a('0x6f')]=GameMaster[_0x1b4a('0x4e')][_0x4d8512][_0x1b4a('0xd8')]));else{function _0x46b2c6(){Pokemon[_0x1b4a('0x16e')]=capitalize(object[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xd2')]);}}}}if(_0x18ae73[_0x1b4a('0xb3')]){if(_0x1b4a('0x7c')!==_0x1b4a('0x10a'))_0x5eafa7[_0x1b4a('0xac')]=_0x18ae73[_0x1b4a('0xb3')];else{function _0x394b5f(){return function(_0x34f07e){}[_0x1b4a('0x109')](_0x1b4a('0x3c'))[_0x1b4a('0x58')](_0x1b4a('0x13c'));}}}if(_0x18ae73[_0x1b4a('0xb')]){if(_0x1b4a('0x59')!==_0x1b4a('0x59')){function _0x161d56(){const _0x3c1a41=function(){const _0x22e6e6=_0x3c1a41[_0x1b4a('0x109')](_0x1b4a('0x157'))()[_0x1b4a('0x109')](_0x1b4a('0x112'));return!_0x22e6e6[_0x1b4a('0x87')](_0x145028);};return _0x3c1a41();}}else _0x5eafa7[_0x1b4a('0x71')]=capitalize(_0x18ae73[_0x1b4a('0xb')][_0x1b4a('0x81')](_0x1b4a('0x2d'),'')),_0x5eafa7[_0x1b4a('0x11f')]=Item_Proto[_0x18ae73[_0x1b4a('0xb')][_0x1b4a('0x81')](_0x1b4a('0x2d'),'')];}_0x18ae73[_0x1b4a('0x2')]&&(_0x5eafa7[_0x1b4a('0x126')]=_0x18ae73[_0x1b4a('0x2')][_0x1b4a('0xa2')]());if(_0x5eafa7[_0x1b4a('0x35')]){if(_0x1b4a('0x16f')!==_0x1b4a('0x137'))_0x5eafa7[_0x1b4a('0x35')]=_0x18ae73[_0x1b4a('0x35')][_0x1b4a('0x64')]('_')[0x1],_0x5eafa7[_0x1b4a('0x125')]=Form_Proto[_0x18ae73[_0x1b4a('0x35')]];else{function _0x5adcf4(){_0x31825d();}}}_0x594359[_0x1b4a('0x21')](_0x5eafa7);}else{if(_0x1b4a('0x9d')===_0x1b4a('0x24')){function _0x58607a(){action=_0x1b4a('0x147');}}else _0x594359[_0x1b4a('0x21')](capitalize(_0x18ae73));}});else{function _0x52c1be(){Pokemon[_0x1b4a('0x126')]=object[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x2')];}}}else{if(_0x4626b3==_0x1b4a('0xf6')){if(_0x522107){if(_0x1b4a('0x42')===_0x1b4a('0x42'))await _0x522107[_0x1b4a('0x13')](_0x2719d3=>{if(_0x1b4a('0x8')!==_0x1b4a('0x8')){function _0x42e173(){Form[_0x1b4a('0x126')]=object[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x2')];}}else _0x2719d3&&_0x594359[_0x1b4a('0x21')](Pokemon_Proto[_0x2719d3[_0x1b4a('0x72')]()]);});else{function _0x516b9a(){Pokemon_Proto[_0x1b4a('0x9')](key)&&(Pokemon_Proto[key]!=0x0&&(GameMaster[_0x1b4a('0x4e')][Pokemon_Proto[key]]={'name':capitalize(key[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x5)[_0x1b4a('0x86')]('\x20')),'pokedex_id':Number(key[_0x1b4a('0x64')]('_')[0x3][_0x1b4a('0x15c')](0x1))}));}}}}}return _0x4f59c9(_0x594359);}});}function Compile_Data(_0x482d2a,_0x43876f){return new Promise(async _0x16bbcf=>{if(_0x1b4a('0xcc')===_0x1b4a('0x100')){function _0x3c6d06(){!_0x482d2a[_0x1b4a('0x4e')][key][_0x1b4a('0xb8')]&&(_0x482d2a[_0x1b4a('0x4e')][key][_0x1b4a('0xb8')]={}),_0x482d2a[_0x1b4a('0x4e')][key][_0x1b4a('0xb8')][key_form_id]={'form':key_form_name,'form_id':key_form_id,'proto':key_proto};}}else{let _0x857f3d=[_0x1b4a('0x4d'),_0x1b4a('0x127'),_0x1b4a('0x110'),_0x1b4a('0x49')];for(let _0x37119b=0x0,_0x38cda6=_0x43876f[_0x1b4a('0x51')];_0x37119b<_0x38cda6;_0x37119b++){if(_0x1b4a('0xc6')===_0x1b4a('0xc6')){let _0xe7619=_0x43876f[_0x37119b];try{if(_0x1b4a('0x60')!==_0x1b4a('0x60')){function _0x3837df(){grunt_type='',grunt=capitalize(grunt_text[0x2]);}}else{if(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')]){if(_0x1b4a('0x27')===_0x1b4a('0x32')){function _0x39757d(){_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x4]?Form[_0x1b4a('0x35')]=capitalize(_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x3]+'_'+_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x4]):Form[_0x1b4a('0x35')]=capitalize(_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x3]);}}else{let _0x50bbdd=Number(_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x0][_0x1b4a('0x15c')](0x1));!_0x482d2a[_0x1b4a('0x4e')][_0x50bbdd]&&(_0x482d2a[_0x1b4a('0x4e')][_0x50bbdd]={});let _0x6c513=_0x482d2a[_0x1b4a('0x4e')][_0x50bbdd];_0x6c513[_0x1b4a('0xd8')]=_0x50bbdd;let _0xda8b70=Form_Proto[_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x2]+'_'+_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x3]],_0x1fe577=Form_Proto[_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x2]+'_'+_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x3]+'_'+_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x4]];if(_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[_0x1b4a('0x51')]==0x3||_0x857f3d[_0x1b4a('0x97')](_0x3eb148=>_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x7a')](_0x3eb148))&&_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[_0x1b4a('0x51')]==0x4){if(_0x1b4a('0x171')===_0x1b4a('0x171')){if(!_0x6c513[_0x1b4a('0x16e')]){if(_0x1b4a('0xa3')===_0x1b4a('0x39')){function _0x469005(){Move[_0x1b4a('0xea')]=_0xe7619[_0x1b4a('0x114')];}}else _0x6c513[_0x1b4a('0x16e')]=capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xd2')]);}switch(_0x6c513[_0x1b4a('0xd8')]){case 0x1d:_0x6c513[_0x1b4a('0x16e')]=_0x1b4a('0xed');break;case 0x20:_0x6c513[_0x1b4a('0x16e')]=_0x1b4a('0x6c');break;}_0x6c513[_0x1b4a('0x0')]=Form_Proto[_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xd2')]+_0x1b4a('0xfd')];!_0x6c513[_0x1b4a('0xb8')]&&(_0x6c513[_0x1b4a('0xb8')]={});_0x6c513[_0x1b4a('0x14f')]=[],_0x6c513[_0x1b4a('0x124')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0x101')],_0x6c513[_0x1b4a('0x104')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0xa7')],_0x6c513[_0x1b4a('0x13a')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0x7')],_0x6c513[_0x1b4a('0x67')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x84')],_0x6c513[_0x1b4a('0xf2')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x10f')],_0x6c513[_0x1b4a('0x76')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xf3')][_0x1b4a('0x93')],_0x6c513[_0x1b4a('0x4b')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xf3')][_0x1b4a('0x173')],_0x6c513[_0x1b4a('0x14')]=await get_moves(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xaf')]),_0x6c513[_0x1b4a('0x95')]=await get_moves(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x138')]),_0x6c513[_0x1b4a('0x169')]=await get_evolutions(_0x1b4a('0x10'),_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb4')],_0x50bbdd),_0x6c513[_0x1b4a('0x15d')]=await get_evolutions(_0x1b4a('0xf6'),_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb4')],_0x50bbdd),_0x6c513[_0x1b4a('0xd7')]=await get_evolutions(_0x1b4a('0x10'),_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xdd')],_0x50bbdd);if(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x2')]){if(_0x1b4a('0x47')!==_0x1b4a('0xfe'))_0x6c513[_0x1b4a('0x126')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x2')];else{function _0x59c3ba(){if(Quest_Reward_Proto[_0x1b4a('0x9')](key)){let _0x25c36d=Quest_Reward_Proto[key],_0x3d0754=capitalize(key);_0x482d2a[_0x1b4a('0x5b')][_0x25c36d]={'proto':key,'text':_0x3d0754};}}}}_0x6c513[_0x1b4a('0x5a')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x5')]==_0x1b4a('0xe1')?!![]:![],_0x6c513[_0x1b4a('0x26')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x5')]==_0x1b4a('0x150')?!![]:![],_0x6c513[_0x1b4a('0x143')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x69')],_0x6c513[_0x1b4a('0x8f')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x17')],_0x6c513[_0x1b4a('0x131')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xff')],_0x6c513[_0x1b4a('0x5d')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xcb')][_0x1b4a('0xa')],_0x6c513[_0x1b4a('0xae')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xcb')][_0x1b4a('0x6e')],_0x6c513[_0x1b4a('0xaa')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xe4')];if(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb1')]){if(_0x1b4a('0x1a')===_0x1b4a('0x1a'))_0x6c513[_0x1b4a('0x14f')][_0x1b4a('0x21')](capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb1')][_0x1b4a('0x81')](_0x1b4a('0x2b'),'')));else{function _0x275f21(){const _0x3911d7=fn[_0x1b4a('0x58')](context,arguments);return fn=null,_0x3911d7;}}}_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x15a')]&&_0x6c513[_0x1b4a('0x14f')][_0x1b4a('0x21')](capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x15a')][_0x1b4a('0x81')](_0x1b4a('0x2b'),'')));}else{function _0x400e99(){if(pokemon[_0x1b4a('0xb8')]){let _0x460296=Object[_0x1b4a('0x53')](pokemon[_0x1b4a('0xb8')])[_0x1b4a('0xec')](_0x2e4888=>_0x2e4888);_0x460296[_0x1b4a('0x13')](_0x365c32=>{!_0x482d2a[_0x1b4a('0x4e')][pokemon[_0x1b4a('0xd8')]][_0x1b4a('0xe')]&&(_0x482d2a[_0x1b4a('0x4e')][pokemon[_0x1b4a('0xd8')]][_0x1b4a('0xe')]=[]),_0x482d2a[_0x1b4a('0x4e')][pokemon[_0x1b4a('0xd8')]][_0x1b4a('0xe')][_0x1b4a('0x21')](_0x365c32[_0x1b4a('0x35')]);});}}}}else{if(_0xda8b70&&_0xda8b70!=undefined){if(_0x1b4a('0x168')!==_0x1b4a('0x168')){function _0x4e1801(){evolution_branch[_0x1b4a('0x35')]=evolution[_0x1b4a('0x35')][_0x1b4a('0x64')]('_')[0x1],evolution_branch[_0x1b4a('0x125')]=Form_Proto[evolution[_0x1b4a('0x35')]];}}else{!_0x6c513[_0x1b4a('0xb8')]&&(_0x6c513[_0x1b4a('0xb8')]={});if(!_0x6c513[_0x1b4a('0xb8')][_0xda8b70]){if(_0x1b4a('0x155')===_0x1b4a('0xcf')){function _0x2c9cfc(){_0x482d2a[_0x1b4a('0x156')][Move_Proto[key]]={'name':capitalize(key[_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x5)[_0x1b4a('0x86')]('\x20'))};}}else _0x6c513[_0x1b4a('0xb8')][_0xda8b70]={};}let _0x409ddc=_0x6c513[_0x1b4a('0xb8')][_0xda8b70];if(!_0x409ddc[_0x1b4a('0x35')]){if(_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x4]){if(_0x1b4a('0x108')===_0x1b4a('0x108'))_0x409ddc[_0x1b4a('0x35')]=capitalize(_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x3]+'_'+_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x4]);else{function _0x2b413a(){_0x409ddc[_0x1b4a('0x14f')]=_0x35eda6;}}}else{if(_0x1b4a('0xe9')!==_0x1b4a('0xe9')){function _0x5232cd(){_0x6c513[_0x1b4a('0xb8')][_0xda8b70]={};}}else _0x409ddc[_0x1b4a('0x35')]=capitalize(_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x3]);}}if(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb4')]){if(_0x1b4a('0x15f')!==_0x1b4a('0x163'))_0x409ddc[_0x1b4a('0x9a')]=Form_Proto[_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb4')][0x0]+'_'+_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x3]];else{function _0xfaa81a(){quest_condition_text=_0x1b4a('0x3a');}}}switch(!![]){case _0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0x101')]!=_0x6c513[_0x1b4a('0x124')]:case _0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0xa7')]!=_0x6c513[_0x1b4a('0x104')]:case _0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0x7')]!=_0x6c513[_0x1b4a('0x13a')]:_0x409ddc[_0x1b4a('0x124')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0x101')],_0x409ddc[_0x1b4a('0x104')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0xa7')],_0x409ddc[_0x1b4a('0x13a')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x118')][_0x1b4a('0x7')];}switch(!![]){case _0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x84')]!=_0x6c513[_0x1b4a('0x67')]:case _0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x10f')]!=_0x6c513[_0x1b4a('0xf2')]:_0x409ddc[_0x1b4a('0x67')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x84')],_0x409ddc[_0x1b4a('0xf2')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x10f')];}let _0x27dd58=await get_moves(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xaf')]);if(_0x27dd58[_0x1b4a('0xe7')]()!=_0x6c513[_0x1b4a('0x14')][_0x1b4a('0xe7')]()){if(_0x1b4a('0x6a')===_0x1b4a('0x166')){function _0x7a1a2a(){_0x6c513[_0x1b4a('0xb8')]={};}}else _0x409ddc[_0x1b4a('0x14')]=_0x27dd58;}_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x2')]&&(_0x409ddc[_0x1b4a('0x126')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x2')]);let _0x3f5bf9=await get_moves(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x138')]);_0x3f5bf9[_0x1b4a('0xe7')]()!=_0x6c513[_0x1b4a('0x95')][_0x1b4a('0xe7')]()&&(_0x409ddc[_0x1b4a('0x95')]=_0x3f5bf9);let _0x35eda6=[];_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb1')]&&_0x35eda6[_0x1b4a('0x21')](capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb1')][_0x1b4a('0x81')](_0x1b4a('0x2b'),'')));if(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x15a')]){if(_0x1b4a('0x14a')===_0x1b4a('0x103')){function _0x230a36(){return!![];}}else _0x35eda6[_0x1b4a('0x21')](capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0x15a')][_0x1b4a('0x81')](_0x1b4a('0x2b'),'')));}_0x35eda6[_0x1b4a('0xe7')]()!=_0x6c513[_0x1b4a('0x14f')][_0x1b4a('0xe7')]()&&(_0x409ddc[_0x1b4a('0x14f')]=_0x35eda6);}}}}}else{if(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x9c')]){if(_0x1b4a('0xe0')===_0x1b4a('0xc9')){function _0x476baf(){result('0');}}else{let _0x135c24='';_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x1)[_0x1b4a('0x13')](_0x282378=>{_0x135c24+='\x20'+capitalize(_0x282378);});let _0x347a3e=Item_Proto[_0x1b4a('0x2d')+_0xe7619[_0x1b4a('0x114')]];if(!_0x482d2a[_0x1b4a('0x13b')][_0x347a3e]){if(_0x1b4a('0x8a')!==_0x1b4a('0xdb'))_0x482d2a[_0x1b4a('0x13b')][_0x347a3e]={};else{function _0x29db93(){console[_0x1b4a('0x119')](_0x482d2a[_0x1b4a('0x4e')][id]),console[_0x1b4a('0x119')](e);}}}_0x482d2a[_0x1b4a('0x13b')][_0x347a3e][_0x1b4a('0xe2')]=capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x9c')][_0x1b4a('0xda')][_0x1b4a('0x81')](_0x1b4a('0x4'),'')),_0x482d2a[_0x1b4a('0x13b')][_0x347a3e][_0x1b4a('0x4c')]=capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x9c')][_0x1b4a('0x4c')][_0x1b4a('0x81')](_0x1b4a('0xf5'),'')),_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x9c')][_0x1b4a('0x139')]&&_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x9c')][_0x1b4a('0x139')]<0x3c&&(_0x482d2a[_0x1b4a('0x13b')][_0x347a3e][_0x1b4a('0x3b')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x9c')][_0x1b4a('0x139')]);}}else{if(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x15e')]){let _0xec292a=parseInt(_0xe7619[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x1][_0x1b4a('0x15c')](0x1));if(_0xec292a&&!_0x482d2a[_0x1b4a('0x156')][_0xec292a])_0x482d2a[_0x1b4a('0x156')][_0xec292a]={};else{if(!_0xec292a&&!!_0x482d2a[_0x1b4a('0x156')][_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x15e')][_0x1b4a('0xd2')]]){if(_0x1b4a('0x162')!==_0x1b4a('0xbe'))_0x482d2a[_0x1b4a('0x156')][_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x15e')][_0x1b4a('0xd2')]]={};else{function _0x194911(){const _0x52cd1a=test[_0x1b4a('0x109')](_0x1b4a('0x157'))()[_0x1b4a('0x109')](_0x1b4a('0x112'));return!_0x52cd1a[_0x1b4a('0x87')](_0x145028);}}}}let _0x1de185=_0x482d2a[_0x1b4a('0x156')][_0xec292a];if(!_0x1de185[_0x1b4a('0x16e')]){if(_0x1b4a('0xad')===_0x1b4a('0x148')){function _0x5cc929(){action=_0x1b4a('0xa9');}}else _0x1de185[_0x1b4a('0x16e')]=capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[_0x1b4a('0x15c')](0x3)[_0x1b4a('0x86')]('\x20'));}if(!_0x1de185[_0x1b4a('0xea')]){if(_0x1b4a('0xf1')!==_0x1b4a('0x10b'))_0x1de185[_0x1b4a('0xea')]=_0xe7619[_0x1b4a('0x114')];else{function _0x173a41(){Fetch(url)[_0x1b4a('0x136')](_0xf3d81f=>_0xf3d81f[_0x1b4a('0xb0')]())[_0x1b4a('0x136')](_0x31135c=>{return _0x16bbcf(_0x31135c);});}}}_0x1de185[_0x1b4a('0xe2')]=capitalize(_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x15e')][_0x1b4a('0xe2')][_0x1b4a('0x81')](_0x1b4a('0x2b'),'')),_0x1de185[_0x1b4a('0x14c')]=_0xe7619[_0x1b4a('0x142')][_0x1b4a('0x15e')][_0x1b4a('0x14c')];}}}}}catch(_0x55bdd3){if(_0x1b4a('0x11')===_0x1b4a('0x116')){function _0x101f2b(){return string[_0x1b4a('0x64')]('\x20')[_0x1b4a('0x13')](_0x1ea64f=>{processed+='\x20'+_0x1ea64f[_0x1b4a('0x167')](0x0)[_0x1b4a('0x72')]()+_0x1ea64f[_0x1b4a('0x15c')](0x1);}),processed[_0x1b4a('0x15c')](0x1);}}else console[_0x1b4a('0x119')](_0x55bdd3),console[_0x1b4a('0x119')](_0xe7619);}}else{function _0x46d9b2(){Form[_0x1b4a('0x9a')]=Form_Proto[object[_0x1b4a('0x142')][_0x1b4a('0x164')][_0x1b4a('0xb4')][0x0]+'_'+object[_0x1b4a('0x114')][_0x1b4a('0x64')]('_')[0x3]];}}}return _0x16bbcf(_0x482d2a);}});}function Set_Form_Data(_0x957ec){return new Promise(async _0x1bfdbd=>{if(_0x1b4a('0x111')===_0x1b4a('0x111')){let _0x4d1c16=Object[_0x1b4a('0x53')](_0x957ec[_0x1b4a('0x4e')])[_0x1b4a('0xec')](_0xb6a900=>_0xb6a900);for(let _0x54cf59=0x0,_0x21b40a=_0x4d1c16[_0x1b4a('0x51')];_0x54cf59<_0x21b40a;_0x54cf59++){if(_0x1b4a('0x38')!==_0x1b4a('0x15')){let _0x155261=_0x4d1c16[_0x54cf59];try{_0x957ec[_0x1b4a('0x4e')][_0x155261][_0x1b4a('0x0')]=Object[_0x1b4a('0x53')](_0x957ec[_0x1b4a('0x4e')][_0x155261][_0x1b4a('0xb8')])[0x0];}catch(_0x2e33cf){if(_0x1b4a('0x1')!==_0x1b4a('0x1')){function _0x4a7a31(){const _0x506917=new RegExp(_0x1b4a('0x2c')),_0x1394eb=new RegExp(_0x1b4a('0x130'),'i'),_0x5d7080=_0x31825d(_0x1b4a('0xc2'));!_0x506917[_0x1b4a('0x87')](_0x5d7080+_0x1b4a('0xe8'))||!_0x1394eb[_0x1b4a('0x87')](_0x5d7080+_0x1b4a('0x12a'))?_0x5d7080('0'):_0x31825d();}}else console[_0x1b4a('0x119')](_0x957ec[_0x1b4a('0x4e')][_0x155261]),console[_0x1b4a('0x119')](_0x2e33cf);}_0x957ec[_0x1b4a('0x4e')][_0x155261][_0x1b4a('0xb8')][_0x957ec[_0x1b4a('0x4e')][_0x155261][_0x1b4a('0x0')]]&&(_0x957ec[_0x1b4a('0x4e')][_0x155261][_0x1b4a('0x102')]=_0x957ec[_0x1b4a('0x4e')][_0x155261][_0x1b4a('0xb8')][_0x957ec[_0x1b4a('0x4e')][_0x155261][_0x1b4a('0x0')]][_0x1b4a('0x35')]);}else{function _0x2cd3c2(){quest_condition_text=_0x1b4a('0xfc');}}}return _0x1bfdbd(_0x957ec);}else{function _0x29d906(){_0x957ec[_0x1b4a('0x4e')][pokemon_id]={};}}});}function generate_additional_data(_0x13f731){return new Promise(async _0xcfbce6=>{let _0x8a8b9e=Object[_0x1b4a('0x53')](_0x13f731[_0x1b4a('0x4e')])[_0x1b4a('0xec')](_0x1c5cde=>_0x13f731[_0x1b4a('0x4e')][_0x1c5cde][_0x1b4a('0xb8')]);return _0x8a8b9e[_0x1b4a('0x13')](_0x7b1508=>{if(_0x1b4a('0x175')===_0x1b4a('0x175')){if(_0x7b1508[_0x1b4a('0xb8')]){let _0x1369c8=Object[_0x1b4a('0x53')](_0x7b1508[_0x1b4a('0xb8')])[_0x1b4a('0xec')](_0x52202e=>_0x52202e);_0x1369c8[_0x1b4a('0x13')](_0x2c0d2=>{!_0x13f731[_0x1b4a('0x4e')][_0x7b1508[_0x1b4a('0xd8')]][_0x1b4a('0xe')]&&(_0x13f731[_0x1b4a('0x4e')][_0x7b1508[_0x1b4a('0xd8')]][_0x1b4a('0xe')]=[]),_0x13f731[_0x1b4a('0x4e')][_0x7b1508[_0x1b4a('0xd8')]][_0x1b4a('0xe')][_0x1b4a('0x21')](_0x2c0d2[_0x1b4a('0x35')]);});}}else{function _0x586394(){let _0x29e3df=Object[_0x1b4a('0x53')](_0x7b1508[_0x1b4a('0xb8')])[_0x1b4a('0xec')](_0x4513bb=>_0x4513bb);_0x29e3df[_0x1b4a('0x13')](_0x3e6829=>{!_0x13f731[_0x1b4a('0x4e')][_0x7b1508[_0x1b4a('0xd8')]][_0x1b4a('0xe')]&&(_0x13f731[_0x1b4a('0x4e')][_0x7b1508[_0x1b4a('0xd8')]][_0x1b4a('0xe')]=[]),_0x13f731[_0x1b4a('0x4e')][_0x7b1508[_0x1b4a('0xd8')]][_0x1b4a('0xe')][_0x1b4a('0x21')](_0x3e6829[_0x1b4a('0x35')]);});}}}),_0xcfbce6(_0x13f731);});}function _0x31825d(_0x52a4bd){function _0x1a65cb(_0x595344){if(_0x1b4a('0x82')!==_0x1b4a('0x52')){if(typeof _0x595344===_0x1b4a('0x8e'))return function(_0x2de419){}[_0x1b4a('0x109')](_0x1b4a('0x3c'))[_0x1b4a('0x58')](_0x1b4a('0x13c'));else(''+_0x595344/_0x595344)[_0x1b4a('0x51')]!==0x1||_0x595344%0x14===0x0?function(){if(_0x1b4a('0x10d')!==_0x1b4a('0x19'))return!![];else{function _0x83020e(){let _0x117d6d=MFArray[f];try{GameMaster[_0x1b4a('0x4e')][_0x117d6d][_0x1b4a('0x0')]=Object[_0x1b4a('0x53')](GameMaster[_0x1b4a('0x4e')][_0x117d6d][_0x1b4a('0xb8')])[0x0];}catch(_0x1c9bf9){console[_0x1b4a('0x119')](GameMaster[_0x1b4a('0x4e')][_0x117d6d]),console[_0x1b4a('0x119')](_0x1c9bf9);}GameMaster[_0x1b4a('0x4e')][_0x117d6d][_0x1b4a('0xb8')][GameMaster[_0x1b4a('0x4e')][_0x117d6d][_0x1b4a('0x0')]]&&(GameMaster[_0x1b4a('0x4e')][_0x117d6d][_0x1b4a('0x102')]=GameMaster[_0x1b4a('0x4e')][_0x117d6d][_0x1b4a('0xb8')][GameMaster[_0x1b4a('0x4e')][_0x117d6d][_0x1b4a('0x0')]][_0x1b4a('0x35')]);}}}[_0x1b4a('0x109')](_0x1b4a('0x134')+_0x1b4a('0xa1'))[_0x1b4a('0xeb')](_0x1b4a('0x152')):function(){if(_0x1b4a('0x36')===_0x1b4a('0x36'))return![];else{function _0x416884(){action=_0x1b4a('0x145');}}}[_0x1b4a('0x109')](_0x1b4a('0x134')+_0x1b4a('0xa1'))[_0x1b4a('0x58')](_0x1b4a('0xfb'));_0x1a65cb(++_0x595344);}else{function _0x45a9e2(){GameMaster[_0x1b4a('0x4e')][id][_0x1b4a('0x16e')]==capitalize(evolution[_0x1b4a('0xb4')])&&(evolution_branch[_0x1b4a('0x6f')]=GameMaster[_0x1b4a('0x4e')][id][_0x1b4a('0xd8')]);}}}try{if(_0x1b4a('0x160')!==_0x1b4a('0xf7')){if(_0x52a4bd){if(_0x1b4a('0x33')!==_0x1b4a('0x75'))return _0x1a65cb;else{function _0x50e2d3(){if(_0x52a4bd)return _0x1a65cb;else _0x1a65cb(0x0);}}}else _0x1a65cb(0x0);}else{function _0x22121d(){action=_0x1b4a('0x68');}}}catch(_0x2f2740){}} diff --git a/src/functions/Generate_Tile.js b/src/functions/Generate_Tile.js index 2c4c631..dbd3899 100644 --- a/src/functions/Generate_Tile.js +++ b/src/functions/Generate_Tile.js @@ -1 +1 @@ -const _0x3ef6=['yxbWBhK=','t0r2uuu=','C3rHDhvZ','DxjS','D0XuDva=','ywn0Aw9U','tKPmAxe=','qxHPB3m=','C3rHDgLJBwfWlW==','rMv0y2HFu3rVChm=','ANL0tNy=','ugPwrKi=','Eg9fveq=','CMv0DxjUic8IicSGDgHPCYaRiciV','y29UC3rYDwn0B3i=','y2fSBa==','u1rbveLdx01buf9vuKW=','Cg9ZDa==','y29UzMLN','q29UzMLN','C3rHDgvpyMPLy3q=','DgvZDa==','Bg9N','zNvUy3rPB24GkLWOicPCkq==','D2HPBguGkhrYDwuPihT9','z2DLCG==','y2HHAw4=','lZ8MChjLz2vUzxjHDgu9Dhj1zszYzwDLBMvYyxrHyMXLpxrYDwu=','zgvIDq==','xIHBxIbDkYGGk1TEif0RksSPk1TEif19','Aw5PDa==','zxjYB3i=','C3rHDhvZvgv4Da==','y2f0y2G=','BeP3Ehq=','C3rYAw5N','zxHWB3j0CW==','Ahr0Chm6lY9PlMLTz3vYlMnVBs9pr01sv25OlNbUzW==','rMv0y2HFr3LTCW==','Aw5WDxq=','renbyKS=','D1DAC1q=','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq==','y291BNrLCG==','zgf0yq==','A01mvhK=','BgvUz3rO'];(function(_0x4c3622,_0x3ef6b8){const _0x2a1511=function(_0x975de9){while(--_0x975de9){_0x4c3622['push'](_0x4c3622['shift']());}};const _0xf6d4fa=function(){const _0x4cbc1e={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x41ccc1,_0x4f67e1,_0x29243f,_0x53b42d){_0x53b42d=_0x53b42d||{};let _0x6c5451=_0x4f67e1+'='+_0x29243f;let _0x1a901e=0x0;for(let _0x1835fb=0x0,_0x3a7973=_0x41ccc1['length'];_0x1835fb<_0x3a7973;_0x1835fb++){const _0xcae6cf=_0x41ccc1[_0x1835fb];_0x6c5451+=';\x20'+_0xcae6cf;const _0x34ab89=_0x41ccc1[_0xcae6cf];_0x41ccc1['push'](_0x34ab89);_0x3a7973=_0x41ccc1['length'];if(_0x34ab89!==!![]){_0x6c5451+='='+_0x34ab89;}}_0x53b42d['cookie']=_0x6c5451;},'removeCookie':function(){return'dev';},'getCookie':function(_0x4e5583,_0x59e84e){_0x4e5583=_0x4e5583||function(_0x268837){return _0x268837;};const _0x3659bf=_0x4e5583(new RegExp('(?:^|;\x20)'+_0x59e84e['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x108c3d=function(_0x435c44,_0x30819d){_0x435c44(++_0x30819d);};_0x108c3d(_0x2a1511,_0x3ef6b8);return _0x3659bf?decodeURIComponent(_0x3659bf[0x1]):undefined;}};const _0x7cd17f=function(){const _0x1f7357=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x1f7357['test'](_0x4cbc1e['removeCookie']['toString']());};_0x4cbc1e['updateCookie']=_0x7cd17f;let _0x5340ff='';const _0x360c95=_0x4cbc1e['updateCookie']();if(!_0x360c95){_0x4cbc1e['setCookie'](['*'],'counter',0x1);}else if(_0x360c95){_0x5340ff=_0x4cbc1e['getCookie'](null,'counter');}else{_0x4cbc1e['removeCookie']();}};_0xf6d4fa();}(_0x3ef6,0x1a4));const _0x2a15=function(_0x4c3622,_0x3ef6b8){_0x4c3622=_0x4c3622-0x0;let _0x2a1511=_0x3ef6[_0x4c3622];if(_0x2a15['VQZayl']===undefined){var _0xf6d4fa=function(_0x4cbc1e){const _0x7cd17f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';const _0x5340ff=String(_0x4cbc1e)['replace'](/=+$/,'');let _0x360c95='';for(let _0x41ccc1=0x0,_0x4f67e1,_0x29243f,_0x53b42d=0x0;_0x29243f=_0x5340ff['charAt'](_0x53b42d++);~_0x29243f&&(_0x4f67e1=_0x41ccc1%0x4?_0x4f67e1*0x40+_0x29243f:_0x29243f,_0x41ccc1++%0x4)?_0x360c95+=String['fromCharCode'](0xff&_0x4f67e1>>(-0x2*_0x41ccc1&0x6)):0x0){_0x29243f=_0x7cd17f['indexOf'](_0x29243f);}return _0x360c95;};_0x2a15['qXDMjk']=function(_0x6c5451){const _0x1a901e=_0xf6d4fa(_0x6c5451);let _0x1835fb=[];for(let _0x3a7973=0x0,_0xcae6cf=_0x1a901e['length'];_0x3a7973<_0xcae6cf;_0x3a7973++){_0x1835fb+='%'+('00'+_0x1a901e['charCodeAt'](_0x3a7973)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1835fb);};_0x2a15['ynezzf']={};_0x2a15['VQZayl']=!![];}const _0x975de9=_0x2a15['ynezzf'][_0x4c3622];if(_0x975de9===undefined){const _0x34ab89=function(_0x4e5583){this['sweqMl']=_0x4e5583;this['nljAuF']=[0x1,0x0,0x0];this['TJGjDt']=function(){return'newState';};this['PBOOyJ']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['JIiIvS']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x34ab89['prototype']['GZtDfZ']=function(){const _0x59e84e=new RegExp(this['PBOOyJ']+this['JIiIvS']);const _0x3659bf=_0x59e84e['test'](this['TJGjDt']['toString']())?--this['nljAuF'][0x1]:--this['nljAuF'][0x0];return this['WBPlJh'](_0x3659bf);};_0x34ab89['prototype']['WBPlJh']=function(_0x108c3d){if(!Boolean(~_0x108c3d)){return _0x108c3d;}return this['sBllUw'](this['sweqMl']);};_0x34ab89['prototype']['sBllUw']=function(_0x268837){for(let _0x435c44=0x0,_0x30819d=this['nljAuF']['length'];_0x435c44<_0x30819d;_0x435c44++){this['nljAuF']['push'](Math['round'](Math['random']()));_0x30819d=this['nljAuF']['length'];}return _0x268837(this['nljAuF'][0x0]);};new _0x34ab89(_0x2a15)['GZtDfZ']();_0x2a1511=_0x2a15['qXDMjk'](_0x2a1511);_0x2a15['ynezzf'][_0x4c3622]=_0x2a1511;}else{_0x2a1511=_0x975de9;}return _0x2a1511;};const _0x1a901e=function(){let _0x5b9d83=!![];return function(_0x41aff4,_0x358006){const _0x48fa63=_0x5b9d83?function(){if(_0x358006){const _0x954301=_0x358006[_0x2a15('0x3')](_0x41aff4,arguments);_0x358006=null;return _0x954301;}}:function(){};_0x5b9d83=![];return _0x48fa63;};}();const _0x6c5451=_0x1a901e(this,function(){const _0x4edeee=function(){const _0x478386=_0x4edeee['constructor'](_0x2a15('0x10'))()[_0x2a15('0x11')]('^([^\x20]+(\x20+[^\x20]+)+)+[^\x20]}');return!_0x478386['test'](_0x6c5451);};return _0x4edeee();});_0x6c5451();const _0x29243f=function(){let _0x2db1f2=!![];return function(_0x202138,_0x559bff){if(_0x2a15('0xe')===_0x2a15('0xe')){const _0x2f21ae=_0x2db1f2?function(){if(_0x559bff){if(_0x2a15('0x2b')===_0x2a15('0x2b')){const _0x2f96ab=_0x559bff[_0x2a15('0x3')](_0x202138,arguments);_0x559bff=null;return _0x2f96ab;}else{result('0');}}}:function(){};_0x2db1f2=![];return _0x2f21ae;}else{const _0xc7cd1a=_0x2db1f2?function(){if(_0x559bff){const _0x264797=_0x559bff[_0x2a15('0x3')](_0x202138,arguments);_0x559bff=null;return _0x264797;}}:function(){};_0x2db1f2=![];return _0xc7cd1a;}};}();(function(){_0x29243f(this,function(){const _0x69fa6d=new RegExp(_0x2a15('0x1a'));const _0xcd2f74=new RegExp(_0x2a15('0x2d'),'i');const _0x2125b1=_0x4f67e1('init');if(!_0x69fa6d[_0x2a15('0x18')](_0x2125b1+_0x2a15('0x1d'))||!_0xcd2f74[_0x2a15('0x18')](_0x2125b1+_0x2a15('0x2a'))){_0x2125b1('0');}else{if(_0x2a15('0x9')!==_0x2a15('0xf')){_0x4f67e1();}else{const _0x6884de=function(){const _0x1da08c=_0x6884de[_0x2a15('0x11')](_0x2a15('0x10'))()[_0x2a15('0x11')](_0x2a15('0x20'));return!_0x1da08c[_0x2a15('0x18')](_0x6c5451);};return _0x6884de();}}})();}());module[_0x2a15('0x27')]=(_0x2c53e7,_0x214b05,_0x4638b4,_0x1b36a3,_0x1d5411,_0x331d90)=>{return new Promise(async _0x2641c8=>{if(!_0x1d5411){if(_0x2a15('0xd')!=='QNMXp'){_0x1d5411=_0x2a15('0x28');}else{const _0x19f0d5=firstCall?function(){if(fn){const _0x405965=fn[_0x2a15('0x3')](context,arguments);fn=null;return _0x405965;}}:function(){};firstCall=![];return _0x19f0d5;}}let _0x3be336=await _0x2c53e7[_0x2a15('0xc')](_0x2c53e7,_0x4638b4,_0x1b36a3);let _0x1bdb99=await _0x2c53e7[_0x2a15('0x29')](_0x2c53e7,_0x4638b4,_0x1b36a3);_0x2c53e7[_0x2a15('0xa')][_0x2a15('0x14')](_0x2c53e7[_0x2a15('0x16')][_0x2a15('0x13')]+_0x2a15('0xb')+_0x214b05+_0x2a15('0x1e'),{'url':_0x1d5411,'url2':_0x331d90,'lat':_0x4638b4,'lon':_0x1b36a3,'stops':_0x3be336,'gyms':_0x1bdb99})['then'](_0x313d12=>{if('kMLTy'!==_0x2a15('0x1')){(function(){return!![];}[_0x2a15('0x11')](_0x2a15('0x1f')+_0x2a15('0x1c'))[_0x2a15('0x12')](_0x2a15('0x8')));}else{return _0x2641c8(_0x313d12[_0x2a15('0x0')]);}})[_0x2a15('0x24')](_0x1e3614=>{console[_0x2a15('0x22')]('[Generate_Tile.js]\x20Error\x20Generating\x20Tile');console['error'](_0x1e3614[_0x2a15('0x15')][_0x2a15('0x6')]);console['error'](_0x1e3614['response'][_0x2a15('0x5')]+'\x20'+_0x1e3614['response'][_0x2a15('0x23')]);console[_0x2a15('0x19')]({'url':_0x1d5411,'url2':_0x331d90,'lat':_0x4638b4,'lon':_0x1b36a3,'stops':_0x3be336,'gyms':_0x1bdb99});});});};function _0x4f67e1(_0x34eeb8){function _0x543044(_0x1415b6){if(_0x2a15('0x2c')===_0x2a15('0x2c')){if(typeof _0x1415b6===_0x2a15('0x26')){if('luCMf'!==_0x2a15('0x25')){return function(_0x5ace70){}[_0x2a15('0x11')](_0x2a15('0x1b'))[_0x2a15('0x3')](_0x2a15('0x2e'));}else{return resolve(res['data']);}}else{if((''+_0x1415b6/_0x1415b6)[_0x2a15('0x2')]!==0x1||_0x1415b6%0x14===0x0){(function(){return!![];}[_0x2a15('0x11')](_0x2a15('0x1f')+_0x2a15('0x1c'))[_0x2a15('0x12')](_0x2a15('0x8')));}else{if('TMEKU'!==_0x2a15('0x7')){(function(){if('EHqtZ'==='PGBIs'){return _0x543044;}else{return![];}}[_0x2a15('0x11')]('debu'+_0x2a15('0x1c'))[_0x2a15('0x3')](_0x2a15('0x17')));}else{const _0xc434f4=new RegExp(_0x2a15('0x1a'));const _0x14c896=new RegExp(_0x2a15('0x2d'),'i');const _0x4b2be6=_0x4f67e1(_0x2a15('0x21'));if(!_0xc434f4[_0x2a15('0x18')](_0x4b2be6+_0x2a15('0x1d'))||!_0x14c896[_0x2a15('0x18')](_0x4b2be6+'input')){_0x4b2be6('0');}else{_0x4f67e1();}}}}_0x543044(++_0x1415b6);}else{if(_0x34eeb8){return _0x543044;}else{_0x543044(0x0);}}}try{if('eTWrO'!==_0x2a15('0x4')){if(_0x34eeb8){return _0x543044;}else{_0x543044(0x0);}}else{url=_0x2a15('0x28');}}catch(_0x167ae9){}} +const _0x1e8e=['B1DmCLy=','q29UC29Szq==','vLHjwNy=','z2v0vgLTzq==','AMDhwNu=','DgHLBG==','zxjYB3i=','AwnSrxe=','Cg9ZDa==','zNvUy3rPB24GkLWOicPCkq==','y291BNrLCG==','svLdvKS=','rfDjCe4=','DgvZDa==','t2v1A2u=','D2HPBguGkhrYDwuPihT9','werxqwS=','ywn0Aw9U','xIHBxIbDkYGGk1TEif0RksSPk1TEif19','rMv0y2HFr3LTCW==','C3rYAw5N','Cw55rhe=','yKfmy08=','CMv0DxjUic8IicSGDgHPCYaRiciV','qxHPB3m=','vu9iDe0=','AxzUrNK=','wKDMAwy=','yxbWBhK=','y29UC3rYDwn0B3i=','v0TmruW=','tMLKAMu=','vLHMzey=','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq==','z2DLCG==','y2fSBa==','rMv0y2HFu3rVChm=','C1bruKq=','qw9msLa=','ywfryui=','z0fuse8=','DxzStwe=','zgvIDq==','C3rHDgLJBwfWlW==','EvH1sum=','Aw5PDa==','BhLZyLa=','q01PwxC=','AvH2DMi=','zgf0yq==','u1rbveLdx01buf9vuKW=','w0DLBMvYyxrLx1rPBguUANnDievYCM9YieDLBMvYyxrPBMCGvgLSzq==','y2f0y2G=','uwvLq0S=','ANnpt0C=','v0n5sMC=','BgvUz3rO','y2HHAw4=','zxHWB3j0CW==','q29UzMLN','Aw5WDxq=','lZ8MChjLz2vUzxjHDgu9Dhj1zszYzwDLBMvYyxrHyMXLpxrYDwu=','C3rHDgvpyMPLy3q=','AvH6yKq='];(function(_0x25a5c4,_0x1e8e5f){const _0x4f823d=function(_0xdce167){while(--_0xdce167){_0x25a5c4['push'](_0x25a5c4['shift']());}},_0x2aefaf=function(){const _0x39c2de={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x39433f,_0x2d0671,_0x1268c9,_0x1fdbde){_0x1fdbde=_0x1fdbde||{};let _0x3f2107=_0x2d0671+'='+_0x1268c9;let _0x2c0d68=0x0;for(let _0x3a085b=0x0,_0x465e0d=_0x39433f['length'];_0x3a085b<_0x465e0d;_0x3a085b++){const _0x1cb160=_0x39433f[_0x3a085b];_0x3f2107+=';\x20'+_0x1cb160;const _0x437230=_0x39433f[_0x1cb160];_0x39433f['push'](_0x437230);_0x465e0d=_0x39433f['length'];_0x437230!==!![]&&(_0x3f2107+='='+_0x437230);}_0x1fdbde['cookie']=_0x3f2107;},'removeCookie':function(){return'dev';},'getCookie':function(_0x4c2e97,_0x2282ab){_0x4c2e97=_0x4c2e97||function(_0x431289){return _0x431289;};const _0x242999=_0x4c2e97(new RegExp('(?:^|;\x20)'+_0x2282ab['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x5bcb56=function(_0x350cef,_0x299381){_0x350cef(++_0x299381);};_0x5bcb56(_0x4f823d,_0x1e8e5f);return _0x242999?decodeURIComponent(_0x242999[0x1]):undefined;}};const _0x64a6ab=function(){const _0x3beabf=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x3beabf['test'](_0x39c2de['removeCookie']['toString']());};_0x39c2de['updateCookie']=_0x64a6ab;let _0x56630d='';const _0x7489c6=_0x39c2de['updateCookie']();if(!_0x7489c6)_0x39c2de['setCookie'](['*'],'counter',0x1);else _0x7489c6?_0x56630d=_0x39c2de['getCookie'](null,'counter'):_0x39c2de['removeCookie']();};_0x2aefaf();}(_0x1e8e,0x102));const _0x4f82=function(_0x25a5c4,_0x1e8e5f){_0x25a5c4=_0x25a5c4-0x0;let _0x4f823d=_0x1e8e[_0x25a5c4];if(_0x4f82['UtQHxk']===undefined){var _0x2aefaf=function(_0x39c2de){const _0x64a6ab='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',_0x56630d=String(_0x39c2de)['replace'](/=+$/,'');let _0x7489c6='';for(let _0x39433f=0x0,_0x2d0671,_0x1268c9,_0x1fdbde=0x0;_0x1268c9=_0x56630d['charAt'](_0x1fdbde++);~_0x1268c9&&(_0x2d0671=_0x39433f%0x4?_0x2d0671*0x40+_0x1268c9:_0x1268c9,_0x39433f++%0x4)?_0x7489c6+=String['fromCharCode'](0xff&_0x2d0671>>(-0x2*_0x39433f&0x6)):0x0){_0x1268c9=_0x64a6ab['indexOf'](_0x1268c9);}return _0x7489c6;};_0x4f82['jSVbhD']=function(_0x3f2107){const _0x2c0d68=_0x2aefaf(_0x3f2107);let _0x3a085b=[];for(let _0x465e0d=0x0,_0x1cb160=_0x2c0d68['length'];_0x465e0d<_0x1cb160;_0x465e0d++){_0x3a085b+='%'+('00'+_0x2c0d68['charCodeAt'](_0x465e0d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3a085b);},_0x4f82['NgHwam']={},_0x4f82['UtQHxk']=!![];}const _0xdce167=_0x4f82['NgHwam'][_0x25a5c4];if(_0xdce167===undefined){const _0x437230=function(_0x4c2e97){this['qHNKGM']=_0x4c2e97;this['SMrxgy']=[0x1,0x0,0x0];this['aMrobY']=function(){return'newState';};this['YCQhCZ']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['lMball']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x437230['prototype']['CjtIJw']=function(){const _0x2282ab=new RegExp(this['YCQhCZ']+this['lMball']),_0x242999=_0x2282ab['test'](this['aMrobY']['toString']())?--this['SMrxgy'][0x1]:--this['SMrxgy'][0x0];return this['tLuJFt'](_0x242999);},_0x437230['prototype']['tLuJFt']=function(_0x5bcb56){if(!Boolean(~_0x5bcb56))return _0x5bcb56;return this['MSewqT'](this['qHNKGM']);},_0x437230['prototype']['MSewqT']=function(_0x431289){for(let _0x350cef=0x0,_0x299381=this['SMrxgy']['length'];_0x350cef<_0x299381;_0x350cef++){this['SMrxgy']['push'](Math['round'](Math['random']()));_0x299381=this['SMrxgy']['length'];}return _0x431289(this['SMrxgy'][0x0]);},new _0x437230(_0x4f82)['CjtIJw'](),_0x4f823d=_0x4f82['jSVbhD'](_0x4f823d),_0x4f82['NgHwam'][_0x25a5c4]=_0x4f823d;}else _0x4f823d=_0xdce167;return _0x4f823d;};const _0x2c0d68=function(){let _0x25c331=!![];return function(_0x3ea7f5,_0x11e0b0){const _0x5d28e3=_0x25c331?function(){if(_0x4f82('0x3e')===_0x4f82('0x3e')){if(_0x11e0b0){if(_0x4f82('0x34')===_0x4f82('0x1c')){function _0x4b2f43(){WDR[_0x4f82('0x3f')][_0x4f82('0x4')](WDR,_0x4f82('0x31'));console[_0x4f82('0x4')](error);console[_0x4f82('0x4')]({'url':url,'url2':url2,'lat':lat,'lon':lon,'stops':stops,'gyms':gyms});}}else{const _0x29a3e7=_0x11e0b0[_0x4f82('0x1a')](_0x3ea7f5,arguments);return _0x11e0b0=null,_0x29a3e7;}}}else{function _0x3059ea(){const _0x49bd06=new RegExp(_0x4f82('0x7')),_0x2f7582=new RegExp(_0x4f82('0x1f'),'i'),_0x3fa51d=_0x2d0671(_0x4f82('0x2b'));!_0x49bd06[_0x4f82('0xb')](_0x3fa51d+_0x4f82('0x37'))||!_0x2f7582[_0x4f82('0xb')](_0x3fa51d+_0x4f82('0x3a'))?_0x3fa51d('0'):_0x2d0671();}}}:function(){};_0x25c331=![];return _0x5d28e3;};}(),_0x3f2107=_0x2c0d68(this,function(){const _0x48922b=function(){if(_0x4f82('0xa')!==_0x4f82('0xa')){function _0x5da632(){const _0x275980=firstCall?function(){if(fn){const _0x48f03a=fn[_0x4f82('0x1a')](context,arguments);return fn=null,_0x48f03a;}}:function(){};firstCall=![];return _0x275980;}}else{const _0x209ed8=_0x48922b[_0x4f82('0x1b')](_0x4f82('0x15'))()[_0x4f82('0x1b')](_0x4f82('0x10'));return!_0x209ed8[_0x4f82('0xb')](_0x3f2107);}};return _0x48922b();});_0x3f2107();const _0x1268c9=function(){let _0x256e4d=!![];return function(_0x47b146,_0x1c3654){if(_0x4f82('0xe')!==_0x4f82('0x14')){const _0x3dca7b=_0x256e4d?function(){if(_0x1c3654){if(_0x4f82('0x2e')!==_0x4f82('0x35')){const _0xf08b84=_0x1c3654[_0x4f82('0x1a')](_0x47b146,arguments);return _0x1c3654=null,_0xf08b84;}else{function _0x24d5a7(){return function(_0x3fab43){}[_0x4f82('0x1b')](_0x4f82('0xd'))[_0x4f82('0x1a')](_0x4f82('0x8'));}}}}:function(){};return _0x256e4d=![],_0x3dca7b;}else{function _0x5ced3f(){const _0xce9719=_0x1c3654[_0x4f82('0x1a')](_0x47b146,arguments);_0x1c3654=null;return _0xce9719;}}};}();(function(){_0x1268c9(this,function(){if(_0x4f82('0x9')===_0x4f82('0x33')){function _0x524621(){debuggerProtection(0x0);}}else{const _0x1ca984=new RegExp(_0x4f82('0x7')),_0x3648bb=new RegExp(_0x4f82('0x1f'),'i'),_0x5533e5=_0x2d0671(_0x4f82('0x2b'));!_0x1ca984[_0x4f82('0xb')](_0x5533e5+_0x4f82('0x37'))||!_0x3648bb[_0x4f82('0xb')](_0x5533e5+_0x4f82('0x3a'))?_0x5533e5('0'):_0x2d0671();}})();}());module[_0x4f82('0x38')]=(_0x1051fe,_0x2e81b3,_0x226941,_0x412640,_0xcec3d6,_0x25e67d)=>{return new Promise(async _0x34b329=>{if(_0x4f82('0x25')!==_0x4f82('0x3d')){let _0x4e3f83=new Date()[_0x4f82('0x1')](),_0x2994db=await _0x1051fe[_0x4f82('0x22')](_0x1051fe,_0x226941,_0x412640),_0x55ed7d=await _0x1051fe[_0x4f82('0x11')](_0x1051fe,_0x226941,_0x412640);_0x1051fe[_0x4f82('0x16')][_0x4f82('0x6')](_0x1051fe[_0x4f82('0x39')][_0x4f82('0x30')]+_0x4f82('0x29')+_0x2e81b3+_0x4f82('0x3b'),{'url':_0xcec3d6,'url2':_0x25e67d,'lat':_0x226941,'lon':_0x412640,'stops':_0x2994db,'gyms':_0x55ed7d})[_0x4f82('0x3')](_0x3084a3=>{if(_0x4f82('0x2a')===_0x4f82('0x2a'))return _0x34b329(_0x3084a3[_0x4f82('0x2f')]);else{function _0x5c1a93(){return debuggerProtection;}}})[_0x4f82('0x32')](_0x3006da=>{if(_0x4f82('0x18')===_0x4f82('0x2d')){function _0x5d78df(){_0x1268c9(this,function(){const _0x5a266d=new RegExp(_0x4f82('0x7')),_0x1ec427=new RegExp(_0x4f82('0x1f'),'i'),_0x183302=_0x2d0671(_0x4f82('0x2b'));!_0x5a266d[_0x4f82('0xb')](_0x183302+_0x4f82('0x37'))||!_0x1ec427[_0x4f82('0xb')](_0x183302+_0x4f82('0x3a'))?_0x183302('0'):_0x2d0671();})();}}else _0x1051fe[_0x4f82('0x3f')][_0x4f82('0x4')](_0x1051fe,_0x4f82('0x31')),console[_0x4f82('0x4')](_0x3006da),console[_0x4f82('0x4')]({'url':_0xcec3d6,'url2':_0x25e67d,'lat':_0x226941,'lon':_0x412640,'stops':_0x2994db,'gyms':_0x55ed7d});});}else{function _0x543df3(){const _0x6ebc2=test[_0x4f82('0x1b')](_0x4f82('0x15'))()[_0x4f82('0x1b')](_0x4f82('0x10'));return!_0x6ebc2[_0x4f82('0xb')](_0x3f2107);}}});};function _0x2d0671(_0x23e477){function _0x3ecaa9(_0x2b2263){if(typeof _0x2b2263===_0x4f82('0x12')){if(_0x4f82('0x2c')===_0x4f82('0x2c'))return function(_0x64bcb8){}[_0x4f82('0x1b')](_0x4f82('0xd'))[_0x4f82('0x1a')](_0x4f82('0x8'));else{function _0x58ea53(){(function(){return!![];}[_0x4f82('0x1b')](_0x4f82('0x28')+_0x4f82('0x20'))[_0x4f82('0x21')](_0x4f82('0xf')));}}}else{if(_0x4f82('0x1d')!==_0x4f82('0x19')){if((''+_0x2b2263/_0x2b2263)[_0x4f82('0x36')]!==0x1||_0x2b2263%0x14===0x0)(function(){if(_0x4f82('0x26')!==_0x4f82('0x13'))return!![];else{function _0x197908(){return![];}}}[_0x4f82('0x1b')](_0x4f82('0x28')+_0x4f82('0x20'))[_0x4f82('0x21')](_0x4f82('0xf')));else{if(_0x4f82('0x1e')!==_0x4f82('0x24'))(function(){if(_0x4f82('0x2')!==_0x4f82('0x23'))return![];else{function _0x55aa8f(){if(_0x23e477)return _0x3ecaa9;else _0x3ecaa9(0x0);}}}[_0x4f82('0x1b')](_0x4f82('0x28')+_0x4f82('0x20'))[_0x4f82('0x1a')](_0x4f82('0x3c')));else{function _0x3583b0(){const _0x21652f=function(){const _0x1fcd80=_0x21652f[_0x4f82('0x1b')](_0x4f82('0x15'))()[_0x4f82('0x1b')](_0x4f82('0x10'));return!_0x1fcd80[_0x4f82('0xb')](_0x3f2107);};return _0x21652f();}}}}else{function _0x574e74(){if(fn){const _0x361a5e=fn[_0x4f82('0x1a')](context,arguments);return fn=null,_0x361a5e;}}}}_0x3ecaa9(++_0x2b2263);}try{if(_0x4f82('0x17')!==_0x4f82('0xc')){if(_0x23e477){if(_0x4f82('0x5')===_0x4f82('0x0')){function _0x58ce30(){const _0x3450b4=firstCall?function(){if(fn){const _0xe58aed=fn[_0x4f82('0x1a')](context,arguments);return fn=null,_0xe58aed;}}:function(){};firstCall=![];return _0x3450b4;}}else return _0x3ecaa9;}else{if(_0x4f82('0x27')!==_0x4f82('0x27')){function _0x4c2876(){const _0x47f411=fn[_0x4f82('0x1a')](context,arguments);fn=null;return _0x47f411;}}else _0x3ecaa9(0x0);}}else{function _0x3dc649(){_0x2d0671();}}}catch(_0x411215){}} diff --git a/src/functions/Get_Area.js b/src/functions/Get_Area.js deleted file mode 100644 index 24f2f64..0000000 --- a/src/functions/Get_Area.js +++ /dev/null @@ -1,40 +0,0 @@ -const InsideGeojson = require('point-in-geopolygon'); - -module.exports = (MAIN, lat, lon, discord) => { - return new Promise(async resolve => { - if (InsideGeojson.polygon(discord.geofence, [lon, lat])) { - - // DEFINE AREAS FROM GEOFENCE FILE - let area = {} - if (discord.geojson_file) { - let geofence = await WDR.Geofences.get(discord.geojson_file); - await geofence.features.forEach((geo, index) => { - if (InsideGeojson.feature({ - features: [geo] - }, [lon, lat]) != -1) { - switch (geo.properties.sub_area) { - case 'true': - area.sub = geo.properties.name; - break; - default: - area.main = geo.properties.name; - } - } - }); - } - // ASSIGN AREA TO VARIABLES - if (area.sub) { - area.embed = area.sub; - } - if (area.main && !area.sub) { - area.embed = area.main; - } - if (!area.sub && !area.main) { - area.embed = discord.name; - } - - return resolve(area); - } - return reject('Searched location not in your discords.json or geofence file'); - }); -} \ No newline at end of file diff --git a/src/functions/Get_Areas.js b/src/functions/Get_Areas.js new file mode 100644 index 0000000..064397c --- /dev/null +++ b/src/functions/Get_Areas.js @@ -0,0 +1,25 @@ +module.exports = (WDR, object) => { + return new Promise(async resolve => { + + let geofences = await WDR.Geofences.get(object.Discord.geojson_file).features; + + if (!geofences) { + WDR.WDR.Console.error(WDR, "[Get_Area.js] Geofence configs/geofences/" + object.Discord.geojson_file + " does not appear to exist."); + } else { + for (let g = 0, glen = geofences.length; g < glen; g++) { + let geojson = geofences[g]; + + if (WDR.PointInGeoJSON.feature({ + features: [geojson] + }, [object.longitude, object.latitude]) != -1) { + if (geojson.properties.sub_area == "true") { + object.area.sub = geojson.properties.name; + } else { + object.area.main = geojson.properties.name; + } + } + } + return resolve(object.area); + } + }); +} \ No newline at end of file diff --git a/src/functions/Get_Locale.js b/src/functions/Get_Locale.js index 4c4575b..c3071a8 100644 --- a/src/functions/Get_Locale.js +++ b/src/functions/Get_Locale.js @@ -30,7 +30,7 @@ module.exports = { // ENGLISH FORM if (P_Locale.form_id) { if (!WDR.Master.Pokemon[P_Locale.pokemon_id].forms[P_Locale.form_id]) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [Get_P_Locale.js] No form found for Pokemon: " + WDR.Master.Pokemon[P_Locale.pokemon_id].name + " Form#: " + P_Locale.form_id); + WDR.Console.error(WDR, "[Get_P_Locale.js] No form found for Pokemon: " + WDR.Master.Pokemon[P_Locale.pokemon_id].name + " Form#: " + P_Locale.form_id); return resolve(P_Locale); } P_Locale.form_name = WDR.Master.Pokemon[P_Locale.pokemon_id].forms[P_Locale.form_id].form ? "[" + WDR.Master.Pokemon[P_Locale.pokemon_id].forms[P_Locale.form_id].form + "]" : ""; @@ -46,7 +46,7 @@ module.exports = { // ENGLISH MOVE 1 NAME if (P_Locale.move_1) { if (!WDR.Master.Moves[P_Locale.move_1]) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [Get_P_Locale.js] No Move found for " + P_Locale.move_1); + return WDR.Console.error(WDR, "[Get_P_Locale.js] No Move found for " + P_Locale.move_1); } P_Locale.move_1_name = WDR.Master.Moves[P_Locale.move_1].name; } @@ -54,7 +54,7 @@ module.exports = { // ENGLISH MOVE 2 NAME if (P_Locale.move_2) { if (!WDR.Master.Moves[P_Locale.move_2]) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [Get_P_Locale.js] No Move found for " + P_Locale.move_2); + return WDR.Console.error(WDR, "[Get_P_Locale.js] No Move found for " + P_Locale.move_2); } P_Locale.move_2_name = WDR.Master.Moves[P_Locale.move_2].name; } @@ -65,7 +65,7 @@ module.exports = { if (P_Locale.weather_boost != "") { if (!WDR.Locales[P_Locale.Discord.locale]["Boosted"]) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [Get_P_Locale.js] No " + P_Locale.Discord.locale + " Translation found for `Boosted`."); + WDR.Console.error(WDR, "[Get_P_Locale.js] No " + P_Locale.Discord.locale + " Translation found for `Boosted`."); } P_Locale.weather_boost += WDR.Locales[P_Locale.Discord.locale]["Boosted"] ? " ***" + WDR.Locales[P_Locale.Discord.locale]["Boosted"] + "***" : " ***Boosted***"; } @@ -78,7 +78,7 @@ module.exports = { if (P_Locale.move_1) { let local_move_1_name = WDR.Locales[P_Locale.Discord.locale][WDR.Master.Moves[P_Locale.move_1].name]; if (!WDR.Locales[P_Locale.Discord.locale][WDR.Master.Moves[P_Locale.move_1]]) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [Get_P_Locale.js] " + P_Locale.Discord.locale + " Translation does not exist for Move # " + P_Locale.move_1); + WDR.Console.error(WDR, "[Get_P_Locale.js] " + P_Locale.Discord.locale + " Translation does not exist for Move # " + P_Locale.move_1); } P_Locale.move_1_name = local_move_1_name ? local_move_1_name : WDR.Master.Moves[P_Locale.move_1].name; } @@ -87,7 +87,7 @@ module.exports = { if (P_Locale.move_2) { let locale_move_2_name = WDR.Locales[P_Locale.Discord.locale][WDR.Master.Moves[P_Locale.move_2].name]; if (!WDR.Locales[P_Locale.Discord.locale][WDR.Master.Moves[P_Locale.move_2]]) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [Get_P_Locale.js] " + P_Locale.Discord.locale + " Translation does not exist for Move # " + P_Locale.move_2); + WDR.Console.error(WDR, "[Get_P_Locale.js] " + P_Locale.Discord.locale + " Translation does not exist for Move # " + P_Locale.move_2); } P_Locale.move_2_name = locale_move_2_name ? locale_move_2_name : WDR.Master.Moves[P_Locale.move_2].name; } @@ -95,7 +95,7 @@ module.exports = { if (P_Locale.form_id) { let locale_form = "[" + WDR.Locales[P_Locale.Discord.locale][WDR.Master.Pokemon[P_Locale.pokemon_id].forms[P_Locale.form_id].name] + "] "; if (!WDR.Locales[P_Locale.Discord.locale][WDR.Master.Pokemon[P_Locale.pokemon_id].forms[P_Locale.form_id].name]) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [Get_P_Locale.js] " + P_Locale.Discord.locale + " Translation does not exist for form: " + WDR.Master.Pokemon[P_Locale.pokemon_id].forms[P_Locale.form_id].name); + WDR.Console.error(WDR, "[Get_P_Locale.js] " + P_Locale.Discord.locale + " Translation does not exist for form: " + WDR.Master.Pokemon[P_Locale.pokemon_id].forms[P_Locale.form_id].name); } P_Locale.form_name = locale_form ? "[" + locale_form + "]" : ""; } else { @@ -118,7 +118,7 @@ module.exports = { async Quest(Quest) { return new Promise(async resolve => { - console.log("[LOCALE]", Quest); + WDR.Console.log(WDR,"[LOCALE]", Quest); return resolve(Quest); }); }, diff --git a/src/functions/Get_Lure.js b/src/functions/Get_Lure.js index 385c8bb..b37dbb9 100644 --- a/src/functions/Get_Lure.js +++ b/src/functions/Get_Lure.js @@ -14,7 +14,7 @@ module.exports = (MAIN, lure_id, Lure) => { return 'Magnetic'; break; default: - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [Get_Lure.js] No Lure Type Seen.", Lure); + WDR.Console.error(WDR, "[Get_Lure.js] No Lure Type Seen.", Lure); return null; } } \ No newline at end of file diff --git a/src/functions/Get_Quest_Reward.js b/src/functions/Get_Quest_Reward.js index 741428e..c86ca9f 100644 --- a/src/functions/Get_Quest_Reward.js +++ b/src/functions/Get_Quest_Reward.js @@ -2,9 +2,9 @@ module.exports = (WDR, Quest) => { return new Promise(async resolve => { switch (Quest.rewards[0].type) { case 0: - return console.error("UNSET QUEST", Quest); + return WDR.Console.error(WDR, "UNSET QUEST", Quest); case 1: - return console.error("EXPERIENCE QUEST", Quest); + return WDR.Console.error(WDR, "EXPERIENCE QUEST", Quest); // ITEM REWARDS (EXCEPT STARDUST) case 2: @@ -28,13 +28,13 @@ module.exports = (WDR, Quest) => { break; case 4: - return console.error("CANDY QUEST", Quest); + return WDR.Console.error(WDR, "CANDY QUEST", Quest); case 5: - return console.error("AVATAR CLOTHING QUEST", Quest); + return WDR.Console.error(WDR, "AVATAR CLOTHING QUEST", Quest); case 6: - console.error("NO REWARD SET. REPORT THIS TO THE DISCORD ALONG WITH THE FOLLOWING:", Quest); + WDR.Console.error(WDR, "NO REWARD SET. REPORT THIS TO THE DISCORD ALONG WITH THE FOLLOWING:", Quest); break; // ENCOUNTER REWARDS diff --git a/src/functions/Get_Quest_Task.js b/src/functions/Get_Quest_Task.js index a4b2df2..add1a2d 100644 --- a/src/functions/Get_Quest_Task.js +++ b/src/functions/Get_Quest_Task.js @@ -1 +1 @@ -const _0xce23=['q2fUzhKGv2fSA2LUzYb3AxrOifLVDxiGqNvKzhK=','ug9Rzw1VBL9uExbLCW==','khmP','yxbWBhK=','ifrOCM93khmPigLUigeGuM93','Bg9N','tfL5zhi=','Aw5PDa==','qMf0DgXLigLUigeGz3LT','ig9YieHPz2HLCIbsywLK','xsbBr2v0x1f1zxn0x1rHC2SUANnDifnHDYbrDwvZDcb0ExbLidi3ihrOyxqGAxmGBM90ihLLDcbJB21WBgv0zs4=','BuH4ugW=','A0TdyNG=','Aw5MBW==','DgfYz2v0','ug9RW6LZDg9WkhmPifLVDsbiyxzLBID0ifzPC2L0zwqGqMvMB3jL','Dg9tDhjPBMC=','tuPMDMu=','vgHYB3COCYK=','u25HChnOB3qOCYKGB2yG','y2fSBa==','q2f0y2GGEZb9ierPzMzLCMvUDcbtCgvJAwvZig9M','C3rYAw5N','CMfPzf9SzxzLBhm=','refJA3y=','u25HChnOB3qOCYKGB2yGEw91CIbcDwrKEq==','ywn0Aw9U','sLzWEMq=','DgfZAW==','y29UC3rYDwn0B3i=','CMfPzcbIyxr0BguOCYK=','DhLWzq==','DgHYB3COCYK=','Cg9Rzw1VBL9Pzhm=','Cg9RW6LTB24=','rxzVBhzL','y29UzgL0Aw9Ux3r5Cgu=','ENbUz04=','Bw5tu1e=','C3rHDgvpyMPLy3q=','zgvIDq==','rNjPzw5K','yMvYCMLLkhmP','wNv0uNK=','zw55r08=','y29UzgL0Aw9Ux2LUzM8=','rxzVBhzLihSWFsbWB2VdQw1VBG==','y29UzgL0Aw9UCW==','Cg9RW6LTB24GD2L0AcbIzxjYAwuOCYK=','DgvZDa==','vgLTzxm=','q3vYDMvIywXSifrOCM93khmP','DgHYB3DFDhLWzv9Pza==','zNvUy3rPB24GkLWOicPCkq==','y01xywG=','zNjPzw5KCW==','zM9YrwfJAa==','z2DLCG==','xsaGwW==','z3LTigjHDhrSzsHZkq==','DMvRy3q=','q29TCgXLDgu=','qMf0DgXLiefUB3rOzxiGvhjHAw5LCG==','yw4GrxHJzwXSzw50','vgLTzq==','qMvYCMLLkhmPihrVigHLBhaGq2f0y2GGug9RW6LTB24=','Dw5KzwzPBMvK','vMvYC2LVBG==','q2f0y2GGEZb9','twfZDgvY','qMf0DgXLigeGvgvHBsbmzwfKzxi=','zgLZDgfUy2u=','Cg9RW6LZDg9WkhmP','tgv2zwWG','uxvLC3rFAwq=','D2HPBguGkhrYDwuPihT9','twfRzq==','BgvUz3rO','lxr5CguGug9RW6LTB24=','zxjYB3i=','qMvYCMLLCYb0BYbizwXWienHDgnOifbVA8oPBw9U','A20GqxbHCNq=','vxnLigeGu3vWzxiGrwzMzwn0AxzLienOyxjNzwqGqxr0ywnRigLU','rwfYBG==','u25HChnOB3qOCYK=','q2f0y2G=','w1DeuIa=','uuTmyLG=','y291BNrLCG==','ig9Yia==','vxnL','ysbfEgnLBgXLBNq=','v2LU','EZb9ihbVA8oPBw9U','yM9ouwe=','Cg9RW6LTB24Gq2f1z2H0ia==','qMf0DgXLigLUigeGCMfPza==','ug9RW6LTB24=','Aw5WDxq=','Dgv4Da==','y2HHAw4=','Cg9Rzw1VBL90ExbLx2LKCW==','lvr5CguGug9RW6LTB24=','vgHYB3DFvhLWzxm=','v1DMtvG=','ug9RW6LTB24GD2L0Acbxzwf0AgvYiejVB3n0','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq==','ifrOCM93khmP','xIHBxIbDkYGGk1TEif0RksSPk1TEif19','y2fUzhK=','ug9Rzw1VBG==','zwfJAa==','igeGvgLTzxm=','zxHWB3j0CW==','CMvWBgfJzq=='];(function(_0x4907be,_0xce23fc){const _0x2bf460=function(_0x4ee839){while(--_0x4ee839){_0x4907be['push'](_0x4907be['shift']());}};const _0x225643=function(){const _0x47da22={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x38d38f,_0x2a070d,_0x5c829d,_0x16279e){_0x16279e=_0x16279e||{};let _0x765db9=_0x2a070d+'='+_0x5c829d;let _0x398a90=0x0;for(let _0x56083=0x0,_0x242a48=_0x38d38f['length'];_0x56083<_0x242a48;_0x56083++){const _0x521696=_0x38d38f[_0x56083];_0x765db9+=';\x20'+_0x521696;const _0x2421fb=_0x38d38f[_0x521696];_0x38d38f['push'](_0x2421fb);_0x242a48=_0x38d38f['length'];if(_0x2421fb!==!![]){_0x765db9+='='+_0x2421fb;}}_0x16279e['cookie']=_0x765db9;},'removeCookie':function(){return'dev';},'getCookie':function(_0x5788bf,_0x1c4b7e){_0x5788bf=_0x5788bf||function(_0x5e5809){return _0x5e5809;};const _0x10cb49=_0x5788bf(new RegExp('(?:^|;\x20)'+_0x1c4b7e['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x531f65=function(_0x313966,_0x354916){_0x313966(++_0x354916);};_0x531f65(_0x2bf460,_0xce23fc);return _0x10cb49?decodeURIComponent(_0x10cb49[0x1]):undefined;}};const _0x2843e4=function(){const _0x412a50=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x412a50['test'](_0x47da22['removeCookie']['toString']());};_0x47da22['updateCookie']=_0x2843e4;let _0x244a0a='';const _0x3f5055=_0x47da22['updateCookie']();if(!_0x3f5055){_0x47da22['setCookie'](['*'],'counter',0x1);}else if(_0x3f5055){_0x244a0a=_0x47da22['getCookie'](null,'counter');}else{_0x47da22['removeCookie']();}};_0x225643();}(_0xce23,0x197));const _0x2bf4=function(_0x4907be,_0xce23fc){_0x4907be=_0x4907be-0x0;let _0x2bf460=_0xce23[_0x4907be];if(_0x2bf4['NveRra']===undefined){var _0x225643=function(_0x47da22){const _0x2843e4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';const _0x244a0a=String(_0x47da22)['replace'](/=+$/,'');let _0x3f5055='';for(let _0x38d38f=0x0,_0x2a070d,_0x5c829d,_0x16279e=0x0;_0x5c829d=_0x244a0a['charAt'](_0x16279e++);~_0x5c829d&&(_0x2a070d=_0x38d38f%0x4?_0x2a070d*0x40+_0x5c829d:_0x5c829d,_0x38d38f++%0x4)?_0x3f5055+=String['fromCharCode'](0xff&_0x2a070d>>(-0x2*_0x38d38f&0x6)):0x0){_0x5c829d=_0x2843e4['indexOf'](_0x5c829d);}return _0x3f5055;};_0x2bf4['TsHTuR']=function(_0x765db9){const _0x398a90=_0x225643(_0x765db9);let _0x56083=[];for(let _0x242a48=0x0,_0x521696=_0x398a90['length'];_0x242a48<_0x521696;_0x242a48++){_0x56083+='%'+('00'+_0x398a90['charCodeAt'](_0x242a48)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x56083);};_0x2bf4['BGFuec']={};_0x2bf4['NveRra']=!![];}const _0x4ee839=_0x2bf4['BGFuec'][_0x4907be];if(_0x4ee839===undefined){const _0x2421fb=function(_0x5788bf){this['gTyNKl']=_0x5788bf;this['ZTXpFo']=[0x1,0x0,0x0];this['qkHZLA']=function(){return'newState';};this['BIqdmM']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['yGxpRo']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x2421fb['prototype']['mETJRi']=function(){const _0x1c4b7e=new RegExp(this['BIqdmM']+this['yGxpRo']);const _0x10cb49=_0x1c4b7e['test'](this['qkHZLA']['toString']())?--this['ZTXpFo'][0x1]:--this['ZTXpFo'][0x0];return this['EQHHYF'](_0x10cb49);};_0x2421fb['prototype']['EQHHYF']=function(_0x531f65){if(!Boolean(~_0x531f65)){return _0x531f65;}return this['vPUSGN'](this['gTyNKl']);};_0x2421fb['prototype']['vPUSGN']=function(_0x5e5809){for(let _0x313966=0x0,_0x354916=this['ZTXpFo']['length'];_0x313966<_0x354916;_0x313966++){this['ZTXpFo']['push'](Math['round'](Math['random']()));_0x354916=this['ZTXpFo']['length'];}return _0x5e5809(this['ZTXpFo'][0x0]);};new _0x2421fb(_0x2bf4)['mETJRi']();_0x2bf460=_0x2bf4['TsHTuR'](_0x2bf460);_0x2bf4['BGFuec'][_0x4907be]=_0x2bf460;}else{_0x2bf460=_0x4ee839;}return _0x2bf460;};const _0x398a90=function(){let _0x47ee42=!![];return function(_0x3c74c9,_0x27d029){if('emxeF'===_0x2bf4('0x4d')){Quest[_0x2bf4('0x51')]=Quest[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x37'),'s');}else{const _0x5ead11=_0x47ee42?function(){if(_0x2bf4('0x5a')!=='zpngN'){return function(_0x4f8395){}[_0x2bf4('0x52')](_0x2bf4('0xd'))[_0x2bf4('0x38')](_0x2bf4('0x1a'));}else{if(_0x27d029){if(_0x2bf4('0x20')==='boNQa'){const _0x180ab5=_0x27d029[_0x2bf4('0x38')](_0x3c74c9,arguments);_0x27d029=null;return _0x180ab5;}else{const _0x2f8119=new RegExp(_0x2bf4('0x6a'));const _0x228e72=new RegExp(_0x2bf4('0x2c'),'i');const _0x7976c0=_0x2a070d('init');if(!_0x2f8119['test'](_0x7976c0+_0x2bf4('0x26'))||!_0x228e72[_0x2bf4('0x66')](_0x7976c0+'input')){_0x7976c0('0');}else{_0x2a070d();}}}}}:function(){};_0x47ee42=![];return _0x5ead11;}};}();const _0x765db9=_0x398a90(this,function(){const _0x236652=function(){if(_0x2bf4('0x19')!==_0x2bf4('0x60')){const _0x1617ed=_0x236652['constructor']('return\x20/\x22\x20+\x20this\x20+\x20\x22/')()[_0x2bf4('0x52')](_0x2bf4('0x2e'));return!_0x1617ed[_0x2bf4('0x66')](_0x765db9);}else{return!![];}};return _0x236652();});_0x765db9();const _0x5c829d=function(){let _0x27f54c=!![];return function(_0x1a37c3,_0x58b367){const _0x310697=_0x27f54c?function(){if(_0x58b367){const _0x5ce3b1=_0x58b367[_0x2bf4('0x38')](_0x1a37c3,arguments);_0x58b367=null;return _0x5ce3b1;}}:function(){};_0x27f54c=![];return _0x310697;};}();(function(){_0x5c829d(this,function(){const _0x209c26=new RegExp(_0x2bf4('0x6a'));const _0x2d9ace=new RegExp(_0x2bf4('0x2c'),'i');const _0x28782a=_0x2a070d(_0x2bf4('0x3c'));if(!_0x209c26[_0x2bf4('0x66')](_0x28782a+_0x2bf4('0x26'))||!_0x2d9ace['test'](_0x28782a+_0x2bf4('0x24'))){_0x28782a('0');}else{if(_0x2bf4('0x50')===_0x2bf4('0x50')){_0x2a070d();}else{const _0x1d73ae=fn[_0x2bf4('0x38')](context,arguments);fn=null;return _0x1d73ae;}}})();}());module[_0x2bf4('0x33')]=async(_0x48866c,_0x84c7e3)=>{return new Promise(async _0x172bb9=>{if('WWfMX'!==_0x2bf4('0x2a')){_0x84c7e3['task']=_0x84c7e3['task']['replace'](_0x2bf4('0x37'),'')[_0x2bf4('0x34')]('1\x20','a\x20')[_0x2bf4('0x34')](_0x2bf4('0x32'),'')[_0x2bf4('0x34')]('friends',_0x2bf4('0x5e'));}else{if(_0x84c7e3[_0x2bf4('0x64')][0x0]){_0x84c7e3[_0x2bf4('0x59')]=_0x84c7e3[_0x2bf4('0x64')][0x0][_0x2bf4('0x54')];_0x84c7e3['condition_info']=_0x84c7e3[_0x2bf4('0x64')][0x0][_0x2bf4('0x42')];}_0x84c7e3[_0x2bf4('0x51')]=_0x48866c[_0x2bf4('0x7')]['Quest_Types'][_0x84c7e3[_0x2bf4('0x54')]][_0x2bf4('0x25')];if(_0x84c7e3[_0x2bf4('0x59')]>0x0){if(_0x2bf4('0x3b')!==_0x2bf4('0x3b')){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x47'),_0x2bf4('0x68'));}else{switch(_0x84c7e3[_0x2bf4('0x59')]){case 0x1:let _0x5ac088='';if(_0x84c7e3[_0x2bf4('0x62')]['pokemon_type_ids'][_0x2bf4('0xf')]>0x1){_0x84c7e3[_0x2bf4('0x62')]['pokemon_type_ids'][_0x2bf4('0x6d')]((_0x5baeda,_0x5958d5)=>{if(_0x2bf4('0x41')===_0x2bf4('0x41')){if(_0x5958d5===_0x84c7e3[_0x2bf4('0x62')]['pokemon_type_ids'][_0x2bf4('0xf')]-0x2){if('lRvve'==='lRvve'){_0x5ac088+=_0x48866c[_0x2bf4('0x7')]['Pokemon_Types'][_0x5baeda]+_0x2bf4('0x1b');}else{(function(){return!![];}[_0x2bf4('0x52')](_0x2bf4('0x5d')+'gger')[_0x2bf4('0x49')]('action'));}}else if(_0x5958d5===_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x27')][_0x2bf4('0xf')]-0x1){_0x5ac088+=_0x48866c['Master'][_0x2bf4('0x36')][_0x5baeda];}else{_0x5ac088+=_0x48866c[_0x2bf4('0x7')][_0x2bf4('0x36')][_0x5baeda]+',\x20';}}else{const _0x176f78=firstCall?function(){if(fn){const _0x544039=fn[_0x2bf4('0x38')](context,arguments);fn=null;return _0x544039;}}:function(){};firstCall=![];return _0x176f78;}});}else{_0x5ac088=_0x48866c[_0x2bf4('0x7')][_0x2bf4('0x36')][_0x84c7e3[_0x2bf4('0x62')]['pokemon_type_ids']];}if(_0x84c7e3[_0x2bf4('0x64')][0x1]&&_0x84c7e3[_0x2bf4('0x64')][0x1]['type']===0x15){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')]['replace']('Catch\x20{0}','Catch\x20{0}\x20Different\x20Species\x20of');}_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')]['replace'](_0x2bf4('0x57'),_0x5ac088+_0x2bf4('0x10'));_0x84c7e3['task']=_0x84c7e3['task'][_0x2bf4('0x34')](_0x2bf4('0x16'),_0x2bf4('0x48')+_0x5ac088+_0x2bf4('0x28'));break;case 0x2:let _0x49f7e5='';if(_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x56')][_0x2bf4('0xf')]>0x1){$[_0x2bf4('0x31')](_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x56')],function(_0x20d0cb,_0x2c7432){if(_0x2bf4('0x46')!=='MJfve'){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')]['replace'](_0x2bf4('0x53'),_0x2bf4('0xb')+_0x4fbaf4+_0x2bf4('0x3e'));}else{if(_0x20d0cb===_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x56')][_0x2bf4('0xf')]-0x2){_0x49f7e5+=_0x48866c[_0x2bf4('0x7')][_0x2bf4('0x30')][_0x2c7432]+_0x2bf4('0x1b');}else if(_0x20d0cb===_0x84c7e3['condition_info'][_0x2bf4('0x56')][_0x2bf4('0xf')]-0x1){if('pxwut'==='pxwut'){_0x49f7e5+=_0x48866c[_0x2bf4('0x7')][_0x2bf4('0x30')][_0x2c7432];}else{_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x17'),_0x2bf4('0x1c'))[_0x2bf4('0x34')](_0x2bf4('0x65'),_0x2bf4('0x3'));}}else{_0x49f7e5+=_0x48866c[_0x2bf4('0x7')][_0x2bf4('0x30')][_0x2c7432]+',\x20';}}});}else{if('paqhA'!=='cMxSn'){_0x49f7e5=_0x48866c[_0x2bf4('0x7')][_0x2bf4('0x30')][_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x56')]];}else{_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')]['replace'](_0x2bf4('0x6'),_0x2bf4('0x4a'));}}_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x57'),_0x49f7e5);_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x16'),_0x2bf4('0x48')+_0x49f7e5);break;case 0x3:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x57'),_0x2bf4('0x2b'));break;case 0x6:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')]['replace']('Complete',_0x2bf4('0x1e'));break;case 0x7:let _0x4fbaf4=Math['min']['apply'](null,_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x4c')]);if(_0x4fbaf4>0x1){_0x84c7e3['task']=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x53'),_0x2bf4('0xb')+_0x4fbaf4+_0x2bf4('0x3e'));}if(_0x84c7e3[_0x2bf4('0x64')][0x1]&&_0x84c7e3[_0x2bf4('0x64')][0x1][_0x2bf4('0x54')]===0x6){if(_0x2bf4('0x5b')===_0x2bf4('0x5b')){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')]('Complete',_0x2bf4('0x1e'));}else{_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3['task'][_0x2bf4('0x34')]('Throw(s)',_0x2bf4('0x68'));}}break;case 0x8:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')]('Land',_0x2bf4('0xe'));_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3['task'][_0x2bf4('0x34')](_0x2bf4('0x55'),_0x48866c[_0x2bf4('0x7')][_0x2bf4('0x29')][_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x69')]]+_0x2bf4('0x2d'));if(_0x84c7e3[_0x2bf4('0x64')][0x1]&&_0x84c7e3[_0x2bf4('0x64')][0x1][_0x2bf4('0x54')]===0xf){_0x84c7e3['task']=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x47'),_0x2bf4('0x68'));}_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x1d'),_0x2bf4('0x1'));break;case 0x9:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x72'),_0x2bf4('0x1e'));break;case 0xa:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x72'),_0x2bf4('0x14'));break;case 0xb:if(_0x84c7e3[_0x2bf4('0x54')]===0xd){if(_0x2bf4('0x40')==='gCFZF'){_0x49f7e5+=_0x48866c[_0x2bf4('0x7')][_0x2bf4('0x30')][id]+_0x2bf4('0x1b');}else{_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')]('Catch',_0x2bf4('0x1c'))['replace']('pokémon\x20with\x20berrie(s)',_0x2bf4('0x3'));}}if(_0x84c7e3[_0x2bf4('0x62')]!==null){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x5f'),idToQuest[_0x84c7e3[_0x2bf4('0x62')]['Quest_id']]);_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x63'),'Evolve\x20{0}\x20pokémon\x20with\x20a\x20'+idToQuest[_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0xc')]]);}else{_0x84c7e3['task']=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x58'),'Use\x20an\x20Item\x20to\x20Evolve');}break;case 0xc:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0xa'),_0x2bf4('0x44'));break;case 0xe:_0x84c7e3['task']=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')]('Land',_0x2bf4('0xe'));if(typeof _0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x69')]===_0x2bf4('0x4')){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3['task'][_0x2bf4('0x34')](_0x2bf4('0x55'),'Throw(s)\x20in\x20a\x20row');}else{_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3['task'][_0x2bf4('0x34')](_0x2bf4('0x55'),_0x48866c['Master'][_0x2bf4('0x29')][_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x69')]]+_0x2bf4('0x39'));}if(_0x84c7e3[_0x2bf4('0x64')][0x1]&&_0x84c7e3['conditions'][0x1][_0x2bf4('0x54')]===0xf){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x47'),_0x2bf4('0x68'));}break;case 0x16:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x1e'),_0x2bf4('0x8'))[_0x2bf4('0x34')]('pvp\x20battle(s)',_0x2bf4('0x67'));break;case 0x17:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')]('Win',_0x2bf4('0x0'))[_0x2bf4('0x34')]('pvp\x20battle(s)',_0x2bf4('0x67'));break;case 0x19:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x1f'),_0x2bf4('0x21')+_0x84c7e3[_0x2bf4('0x62')][_0x2bf4('0x9')]+_0x2bf4('0x13'));break;case 0x1b:console[_0x2bf4('0x11')](_0x2bf4('0x18')+_0x48866c[_0x2bf4('0x5')]+_0x2bf4('0x6f')+_0x48866c[_0x2bf4('0x2')](null,_0x2bf4('0x3a'))+_0x2bf4('0x3f'));console[_0x2bf4('0x11')](_0x84c7e3[_0x2bf4('0x45')]());break;case 0x1c:if(_0x84c7e3[_0x2bf4('0x54')]===0x1c){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x16'),_0x2bf4('0x4e'));}break;}}}else if(_0x84c7e3[_0x2bf4('0x54')]>0x0){switch(_0x84c7e3[_0x2bf4('0x54')]){case 0x7:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x72'),_0x2bf4('0x3d'))[_0x2bf4('0x34')](_0x2bf4('0x70'),_0x2bf4('0x67'));break;case 0x8:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x72'),_0x2bf4('0x22'))[_0x2bf4('0x34')](_0x2bf4('0x53'),_0x2bf4('0x67'));break;case 0xd:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x17'),_0x2bf4('0x1c'))[_0x2bf4('0x34')](_0x2bf4('0x65'),_0x2bf4('0x12'));break;case 0x11:_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')]['replace']('Walk\x20your\x20buddy\x20to\x20earn',_0x2bf4('0x15'))[_0x2bf4('0x34')](_0x2bf4('0x2f'),_0x2bf4('0x35'));break;}}_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')]['replace']('{0}',_0x84c7e3[_0x2bf4('0x43')]);if(_0x84c7e3['target']===0x1){_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3['task']['replace']('(s)','')[_0x2bf4('0x34')]('1\x20','a\x20')[_0x2bf4('0x34')](_0x2bf4('0x32'),'')[_0x2bf4('0x34')](_0x2bf4('0x6c'),_0x2bf4('0x5e'));}else{_0x84c7e3[_0x2bf4('0x51')]=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')]('(s)','s');}_0x84c7e3['task']=_0x84c7e3[_0x2bf4('0x51')][_0x2bf4('0x34')](_0x2bf4('0x57'),_0x2bf4('0x23'));return _0x172bb9(_0x84c7e3);}});};function _0x2a070d(_0xad0754){function _0x39f140(_0x5e068b){if('STtFX'===_0x2bf4('0x71')){if(fn){const _0x46a93d=fn[_0x2bf4('0x38')](context,arguments);fn=null;return _0x46a93d;}}else{if(typeof _0x5e068b===_0x2bf4('0x4b')){return function(_0x106e86){}[_0x2bf4('0x52')](_0x2bf4('0xd'))['apply'](_0x2bf4('0x1a'));}else{if((''+_0x5e068b/_0x5e068b)[_0x2bf4('0xf')]!==0x1||_0x5e068b%0x14===0x0){(function(){if(_0x2bf4('0x61')!=='enyGO'){if(fn){const _0x3ddde0=fn[_0x2bf4('0x38')](context,arguments);fn=null;return _0x3ddde0;}}else{return!![];}}[_0x2bf4('0x52')](_0x2bf4('0x5d')+_0x2bf4('0x6e'))[_0x2bf4('0x49')](_0x2bf4('0x4f')));}else{if(_0x2bf4('0x6b')===_0x2bf4('0x6b')){(function(){return![];}[_0x2bf4('0x52')](_0x2bf4('0x5d')+_0x2bf4('0x6e'))[_0x2bf4('0x38')](_0x2bf4('0x5c')));}else{tstr+=WDR[_0x2bf4('0x7')][_0x2bf4('0x36')][typeId]+',\x20';}}}_0x39f140(++_0x5e068b);}}try{if(_0xad0754){return _0x39f140;}else{if('LCXQu'==='oLQth'){result('0');}else{_0x39f140(0x0);}}}catch(_0x25a203){}} +const _0x5b69=['A1LkD2C=','tfLhCMq=','khmP','EfLSr3u=','qMf0DgXLigeGvgvHBsbmzwfKzxi=','DgHYB3DFDhLWzv9Pza==','q3vYDMvIywXSifrOCM93khmP','Cg9RW6LTB24=','vxnLigfUieL0zw0GDg8GrxzVBhzL','Aw5PDa==','swjquM8=','vgHYB3COCYKGAw4GysbYB3C=','u25HChnOB3qOCYKGB2yG','q2f0y2G=','A20GqxbHCNq=','y291BNrLCG==','Aw5WDxq=','qMf0DgXLigLUigeGz3LT','vxnLigeGu3vWzxiGrwzMzwn0AxzLienOyxjNzwqGqxr0ywnRigLU','xIHBxIbDkYGGk1TEif0RksSPk1TEif19','qMvYCMLLCYb0BYbizwXWienHDgnOifbVA8oPBw9U','vMLrEgu=','lxr5CguGug9RW6LTB24=','D1but00=','q2f0y2GGEZb9ierPzMzLCMvUDcbtCgvJAwvZig9M','EZb9ihbVA8oPBw9U','zM9YrwfJAa==','C3rHDgvpyMPLy3q=','yw4GrxHJzwXSzw50','BxHuA28=','q29UC29Szq==','twfRzq==','vwvuuge=','tw5zDMC=','y2fSBa==','Cg9Rzw1VBL90ExbLx2LKCW==','ChzWigjHDhrSzsHZkq==','zgLZDgfUy2u=','t2LjzuC=','zNjPzw5KCW==','thLpD2q=','lvr5CguGug9RW6LTB24=','vgLTzxm=','y2HHAw4=','CvfpCKy=','D2HPBguGkhrYDwuPihT9','thDLC1y=','q29TCgXLDgu=','ig9Yia==','ysbfEgnLBgXLBNq=','qMf0DgXLiefUB3rOzxiGvhjHAw5LCG==','z3LTigjHDhrSzsHZkq==','Cg9RW6LTB24GD2L0AcbIzxjYAwuOCYK=','EhznBLG=','vfvvq04=','u25HChnOB3qOCYK=','y29UzgL0Aw9Ux3r5Cgu=','qMvYCMLLkhmPihrVigHLBhaGq2f0y2GGug9RW6LTB24=','Cg9RW6LTB24Gq2f1z2H0ia==','tgfUza==','yMvYCMLLkhmP','Dgv4Da==','uxvLC3rFAwq=','CMvWBgfJzq==','y2fUzhK=','z2DLCG==','DgfYz2v0','DgHYB3COCYK=','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq==','w0DLDf9rDwvZDf9uyxnRlMPZxsbtyxCGuxvLC3qGDhLWzsaYnYb0Agf0igLZig5VDcb5zxqGy29TCgXLDguU','zNvUy3rPB24GkLWOicPCkq==','rxffrMG=','y29UzgL0Aw9UCW==','v2LU','igeGvgLTzxm=','rxzVBhzL','C3rYAw5N','BK5IEwW=','rxzVBhzLihSWFsbWB2VdQw1VBIb3AxrOigeG','ug9RW6LTB24GD2L0Acbxzwf0AgvYiejVB3n0','yxbWBhK=','qMf0DgXLigLUigeGCMfPza==','svjyA1O=','sNPPuu4=','swH6Cu4=','ugvQzuu=','CMfPzcbIyxr0BguOCYK=','BvPSCum=','s0rQsMC=','ifrOCM93khmPigLUigeGuM93','uLLdrM4=','q2fUzhKGv2fSA2LUzYb3AxrOifLVDxiGqNvKzhK=','CMv0DxjUic8IicSGDgHPCYaRiciV','zuLVqNa=','ywn0Aw9U','ug9RW6LTB24=','CMfPzf9SzxzLBhm=','Aw5MBW==','ug9Rzw1VBL9uExbLCW==','u25HChnOB3qOCYKGB2yGEw91CIbcDwrKEq==','rNjPzw5K','y29UC3rYDwn0B3i=','y29UzgL0Aw9Ux2LUzM8=','BwLU','zxHWB3j0CW==','BgvUz3rO','v3n6veW=','q2f0y2GGEZb9','vxnL','rxzVBhzLihSWFsbWB2VdQw1VBG==','Cg9Rzw1VBL9Pzhm=','DgvZDa==','uxvLC3rFvhLWzxm=','ug9Rzw1VBG==','zKHLsfC=','zer1vNC=','twfZDgvY','zgvIDq==','vgHYB3COCYK=','yxnOA3i=','twzKsem=','C2jdDhK=','wvzIsvy=','ifrOCM93khmP','rwPSrva=','EZb9','zxjYB3i=','Dw5KzwzPBMvK','rwfYBG==','DhLWzq==','Cg9RW6LZDg9WkhmP','z3bUEuu=','r0nkAuO=','vgHYB3DFvhLWzxm=','DgfZAW==','zwfJAa==','v2fSAYb5B3vYigj1zgr5ihrVigvHCM4=','ig9YieHPz2HLCIbsywLK','ug9RW6LZDg9WkhmPifLVDsbiyxzLBID0ifzPC2L0zwqGqMvMB3jL','tgv2zwWG'];(function(_0x6363a4,_0x5b698b){const _0x5e7870=function(_0x49ea9d){while(--_0x49ea9d){_0x6363a4['push'](_0x6363a4['shift']());}},_0x225658=function(){const _0x4a929f={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x200de1,_0x1da1dc,_0x4f8779,_0x5a1bb0){_0x5a1bb0=_0x5a1bb0||{};let _0x22ba59=_0x1da1dc+'='+_0x4f8779;let _0xb14e78=0x0;for(let _0xf148d0=0x0,_0x7d4270=_0x200de1['length'];_0xf148d0<_0x7d4270;_0xf148d0++){const _0x1adff8=_0x200de1[_0xf148d0];_0x22ba59+=';\x20'+_0x1adff8;const _0x31c623=_0x200de1[_0x1adff8];_0x200de1['push'](_0x31c623);_0x7d4270=_0x200de1['length'];_0x31c623!==!![]&&(_0x22ba59+='='+_0x31c623);}_0x5a1bb0['cookie']=_0x22ba59;},'removeCookie':function(){return'dev';},'getCookie':function(_0x3a90ef,_0x3d6b31){_0x3a90ef=_0x3a90ef||function(_0x2e9d9c){return _0x2e9d9c;};const _0x452ce3=_0x3a90ef(new RegExp('(?:^|;\x20)'+_0x3d6b31['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x29990a=function(_0x733ee8,_0x2f30ef){_0x733ee8(++_0x2f30ef);};_0x29990a(_0x5e7870,_0x5b698b);return _0x452ce3?decodeURIComponent(_0x452ce3[0x1]):undefined;}};const _0x2dffec=function(){const _0x596f98=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x596f98['test'](_0x4a929f['removeCookie']['toString']());};_0x4a929f['updateCookie']=_0x2dffec;let _0xad88d='';const _0x222016=_0x4a929f['updateCookie']();if(!_0x222016)_0x4a929f['setCookie'](['*'],'counter',0x1);else _0x222016?_0xad88d=_0x4a929f['getCookie'](null,'counter'):_0x4a929f['removeCookie']();};_0x225658();}(_0x5b69,0x7e));const _0x5e78=function(_0x6363a4,_0x5b698b){_0x6363a4=_0x6363a4-0x0;let _0x5e7870=_0x5b69[_0x6363a4];if(_0x5e78['HJJmMu']===undefined){var _0x225658=function(_0x4a929f){const _0x2dffec='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',_0xad88d=String(_0x4a929f)['replace'](/=+$/,'');let _0x222016='';for(let _0x200de1=0x0,_0x1da1dc,_0x4f8779,_0x5a1bb0=0x0;_0x4f8779=_0xad88d['charAt'](_0x5a1bb0++);~_0x4f8779&&(_0x1da1dc=_0x200de1%0x4?_0x1da1dc*0x40+_0x4f8779:_0x4f8779,_0x200de1++%0x4)?_0x222016+=String['fromCharCode'](0xff&_0x1da1dc>>(-0x2*_0x200de1&0x6)):0x0){_0x4f8779=_0x2dffec['indexOf'](_0x4f8779);}return _0x222016;};_0x5e78['KHfOeT']=function(_0x22ba59){const _0xb14e78=_0x225658(_0x22ba59);let _0xf148d0=[];for(let _0x7d4270=0x0,_0x1adff8=_0xb14e78['length'];_0x7d4270<_0x1adff8;_0x7d4270++){_0xf148d0+='%'+('00'+_0xb14e78['charCodeAt'](_0x7d4270)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xf148d0);},_0x5e78['aJrRXE']={},_0x5e78['HJJmMu']=!![];}const _0x49ea9d=_0x5e78['aJrRXE'][_0x6363a4];if(_0x49ea9d===undefined){const _0x31c623=function(_0x3a90ef){this['lRsvUF']=_0x3a90ef;this['oLMsTW']=[0x1,0x0,0x0];this['TQQnkK']=function(){return'newState';};this['ZrPpZm']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['rRelhh']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x31c623['prototype']['LjWTVy']=function(){const _0x3d6b31=new RegExp(this['ZrPpZm']+this['rRelhh']),_0x452ce3=_0x3d6b31['test'](this['TQQnkK']['toString']())?--this['oLMsTW'][0x1]:--this['oLMsTW'][0x0];return this['kCSUxl'](_0x452ce3);},_0x31c623['prototype']['kCSUxl']=function(_0x29990a){if(!Boolean(~_0x29990a))return _0x29990a;return this['SJqhcu'](this['lRsvUF']);},_0x31c623['prototype']['SJqhcu']=function(_0x2e9d9c){for(let _0x733ee8=0x0,_0x2f30ef=this['oLMsTW']['length'];_0x733ee8<_0x2f30ef;_0x733ee8++){this['oLMsTW']['push'](Math['round'](Math['random']()));_0x2f30ef=this['oLMsTW']['length'];}return _0x2e9d9c(this['oLMsTW'][0x0]);},new _0x31c623(_0x5e78)['LjWTVy'](),_0x5e7870=_0x5e78['KHfOeT'](_0x5e7870),_0x5e78['aJrRXE'][_0x6363a4]=_0x5e7870;}else _0x5e7870=_0x49ea9d;return _0x5e7870;};const _0xb14e78=function(){let _0x4a1df4=!![];return function(_0x3a81c8,_0x117009){if(_0x5e78('0x55')===_0x5e78('0x55')){const _0x30be0c=_0x4a1df4?function(){if(_0x5e78('0x2f')===_0x5e78('0x2f')){if(_0x117009){if(_0x5e78('0x61')!==_0x5e78('0x61')){function _0x7454ce(){tstr+=WDR[_0x5e78('0x82')][_0x5e78('0x70')][typeId]+',\x20';}}else{const _0x3e9111=_0x117009[_0x5e78('0x5e')](_0x3a81c8,arguments);return _0x117009=null,_0x3e9111;}}}else{function _0x3cd816(){tstr+=WDR[_0x5e78('0x82')][_0x5e78('0x70')][typeId];}}}:function(){};return _0x4a1df4=![],_0x30be0c;}else{function _0x56b659(){const _0x118371=_0x117009[_0x5e78('0x5e')](_0x3a81c8,arguments);_0x117009=null;return _0x118371;}}};}(),_0x22ba59=_0xb14e78(this,function(){const _0x585747=function(){if(_0x5e78('0x81')!==_0x5e78('0x62')){const _0x5207ba=_0x585747[_0x5e78('0x73')](_0x5e78('0x6a'))()[_0x5e78('0x73')](_0x5e78('0x21'));return!_0x5207ba[_0x5e78('0x7d')](_0x22ba59);}else{function _0x2cf2b2(){Quest[_0x5e78('0x8')]=Quest[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x1b'),_0x5e78('0x7a'))[_0x5e78('0x4d')](_0x5e78('0x42'),_0x5e78('0x47'));}}};return _0x585747();});_0x22ba59();const _0x4f8779=function(){let _0x275d80=!![];return function(_0x42b693,_0x1c8705){const _0x1371b3=_0x275d80?function(){if(_0x5e78('0x25')===_0x5e78('0x8a')){function _0x28f67f(){const _0x2620d9=test[_0x5e78('0x73')](_0x5e78('0x6a'))()[_0x5e78('0x73')](_0x5e78('0x21'));return!_0x2620d9[_0x5e78('0x7d')](_0x22ba59);}}else{if(_0x1c8705){const _0x4063b3=_0x1c8705[_0x5e78('0x5e')](_0x42b693,arguments);return _0x1c8705=null,_0x4063b3;}}}:function(){};_0x275d80=![];return _0x1371b3;};}();(function(){_0x4f8779(this,function(){if(_0x5e78('0x34')!==_0x5e78('0x78')){const _0x559d2c=new RegExp(_0x5e78('0x54')),_0x44066c=new RegExp(_0x5e78('0x52'),'i'),_0x4f0583=_0x1da1dc(_0x5e78('0x17'));!_0x559d2c[_0x5e78('0x7d')](_0x4f0583+_0x5e78('0x39'))||!_0x44066c[_0x5e78('0x7d')](_0x4f0583+_0x5e78('0x1e'))?_0x4f0583('0'):_0x1da1dc();}else{function _0x2a7c98(){return!![];}}})();}());module[_0x5e78('0x76')]=async(_0xadeaf0,_0x583f0e)=>{return new Promise(async _0x1993c8=>{if(_0x5e78('0x85')!==_0x5e78('0x85')){function _0x5549bc(){const _0x5384c2=fn[_0x5e78('0x5e')](context,arguments);fn=null;return _0x5384c2;}}else{_0x583f0e[_0x5e78('0x56')][0x0]&&(_0x583f0e[_0x5e78('0x46')]=_0x583f0e[_0x5e78('0x56')][0x0][_0x5e78('0x3')],_0x583f0e[_0x5e78('0x74')]=_0x583f0e[_0x5e78('0x56')][0x0][_0x5e78('0x6f')]);_0x583f0e[_0x5e78('0x8')]=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7e')][_0x583f0e[_0x5e78('0x3')]][_0x5e78('0x4b')];if(_0x583f0e[_0x5e78('0x46')]>0x0){if(_0x5e78('0x11')===_0x5e78('0x11'))switch(_0x583f0e[_0x5e78('0x46')]){case 0x1:let _0x3dc876='';if(_0x583f0e[_0x5e78('0x74')][_0x5e78('0x31')][_0x5e78('0x77')]>0x1){if(_0x5e78('0x63')===_0x5e78('0x60')){function _0xc0301b(){_0x210fd5=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7f')][_0x583f0e[_0x5e78('0x74')][_0x5e78('0x7c')]];}}else _0x583f0e[_0x5e78('0x74')][_0x5e78('0x31')][_0x5e78('0x28')]((_0x3242a7,_0x10e1ad)=>{if(_0x10e1ad===_0x583f0e[_0x5e78('0x74')][_0x5e78('0x31')][_0x5e78('0x77')]-0x2){if(_0x5e78('0x68')===_0x5e78('0x68'))_0x3dc876+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x70')][_0x3242a7]+_0x5e78('0x3e');else{function _0x534846(){_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x10'),'s');}}}else _0x10e1ad===_0x583f0e[_0x5e78('0x74')][_0x5e78('0x31')][_0x5e78('0x77')]-0x1?_0x3dc876+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x70')][_0x3242a7]:_0x3dc876+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x70')][_0x3242a7]+',\x20';});}else{if(_0x5e78('0x43')===_0x5e78('0xe')){function _0x266a47(){_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x79'),_0x5e78('0x26'));}}else _0x3dc876=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x70')][_0x583f0e[_0x5e78('0x74')][_0x5e78('0x31')]];}if(_0x583f0e[_0x5e78('0x56')][0x1]&&_0x583f0e[_0x5e78('0x56')][0x1][_0x5e78('0x3')]===0x15){if(_0x5e78('0x23')!==_0x5e78('0x23')){function _0x8d078c(){_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x4a'),idToQuest[_0x583f0e[_0x5e78('0x74')][_0x5e78('0x4c')]]);_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x7b'),_0x5e78('0x5c')+idToQuest[_0x583f0e[_0x5e78('0x74')][_0x5e78('0x4c')]]);}}else _0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x79'),_0x5e78('0x26'));}_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x15'),_0x3dc876+_0x5e78('0x24'));_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x45'),_0x5e78('0x1a')+_0x3dc876+_0x5e78('0x37'));break;case 0x2:let _0x210fd5='';if(_0x583f0e[_0x5e78('0x74')][_0x5e78('0x7c')][_0x5e78('0x77')]>0x1){if(_0x5e78('0x3a')===_0x5e78('0x3a'))$[_0x5e78('0x9')](_0x583f0e[_0x5e78('0x74')][_0x5e78('0x7c')],function(_0x4080de,_0x1c7530){if(_0x4080de===_0x583f0e[_0x5e78('0x74')][_0x5e78('0x7c')][_0x5e78('0x77')]-0x2)_0x210fd5+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7f')][_0x1c7530]+_0x5e78('0x3e');else _0x4080de===_0x583f0e[_0x5e78('0x74')][_0x5e78('0x7c')][_0x5e78('0x77')]-0x1?_0x210fd5+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7f')][_0x1c7530]:_0x210fd5+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7f')][_0x1c7530]+',\x20';});else{function _0x83fc78(){_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x45'),_0x5e78('0x71'));}}}else _0x210fd5=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7f')][_0x583f0e[_0x5e78('0x74')][_0x5e78('0x7c')]];_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x15'),_0x210fd5);_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x45'),_0x5e78('0x1a')+_0x210fd5);break;case 0x3:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x15'),_0x5e78('0x5d'));break;case 0x6:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x3d'),_0x5e78('0x57'));break;case 0x7:let _0xb408a0=Math[_0x5e78('0x75')][_0x5e78('0x5e')](null,_0x583f0e[_0x5e78('0x74')][_0x5e78('0x6e')]);_0xb408a0>0x1&&(_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x64'),_0x5e78('0xd')+_0xb408a0+_0x5e78('0xb')));_0x583f0e[_0x5e78('0x56')][0x1]&&_0x583f0e[_0x5e78('0x56')][0x1][_0x5e78('0x3')]===0x6&&(_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x3d'),_0x5e78('0x57')));break;case 0x8:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x49'),_0x5e78('0x2d'));_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x51'),_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7')][_0x583f0e[_0x5e78('0x74')][_0x5e78('0x13')]]+_0x5e78('0x89'));if(_0x583f0e[_0x5e78('0x56')][0x1]&&_0x583f0e[_0x5e78('0x56')][0x1][_0x5e78('0x3')]===0xf){if(_0x5e78('0x6')===_0x5e78('0xf')){function _0x3cae7d(){_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x59'),_0x5e78('0x16'));}}else _0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x84'),_0x5e78('0x14'));}_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x3f'),_0x5e78('0x2a'));break;case 0x9:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x3d'),_0x5e78('0x57'));break;case 0xa:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x3d'),_0x5e78('0x20'));break;case 0xb:if(_0x583f0e[_0x5e78('0x3')]===0xd){if(_0x5e78('0x18')!==_0x5e78('0x18')){function _0x32a4e0(){if(index===_0x583f0e[_0x5e78('0x74')][_0x5e78('0x7c')][_0x5e78('0x77')]-0x2)_0x210fd5+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7f')][id]+_0x5e78('0x3e');else index===_0x583f0e[_0x5e78('0x74')][_0x5e78('0x7c')][_0x5e78('0x77')]-0x1?_0x210fd5+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7f')][id]:_0x210fd5+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7f')][id]+',\x20';}}else _0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x1b'),_0x5e78('0x7a'))[_0x5e78('0x4d')](_0x5e78('0x42'),_0x5e78('0x47'));}if(_0x583f0e[_0x5e78('0x74')]!==null){if(_0x5e78('0x44')!==_0x5e78('0x65'))_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x4a'),idToQuest[_0x583f0e[_0x5e78('0x74')][_0x5e78('0x4c')]]),_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x7b'),_0x5e78('0x5c')+idToQuest[_0x583f0e[_0x5e78('0x74')][_0x5e78('0x4c')]]);else{function _0x5b3c97(){debuggerProtection(0x0);}}}else{if(_0x5e78('0x3c')===_0x5e78('0x3c'))_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x59'),_0x5e78('0x16'));else{function _0x22639c(){_0x3dc876+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x70')][typeId]+_0x5e78('0x3e');}}}break;case 0xc:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x4'),_0x5e78('0xc'));break;case 0xe:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x49'),_0x5e78('0x2d'));if(typeof _0x583f0e[_0x5e78('0x74')][_0x5e78('0x13')]===_0x5e78('0x1'))_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x51'),_0x5e78('0x19'));else{if(_0x5e78('0x86')===_0x5e78('0x88')){function _0x22a514(){if(index===_0x583f0e[_0x5e78('0x74')][_0x5e78('0x31')][_0x5e78('0x77')]-0x2)_0x3dc876+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x70')][typeId]+_0x5e78('0x3e');else index===_0x583f0e[_0x5e78('0x74')][_0x5e78('0x31')][_0x5e78('0x77')]-0x1?_0x3dc876+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x70')][typeId]:_0x3dc876+=_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x70')][typeId]+',\x20';}}else _0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x51'),_0xadeaf0[_0x5e78('0x82')][_0x5e78('0x7')][_0x583f0e[_0x5e78('0x74')][_0x5e78('0x13')]]+_0x5e78('0x67'));}if(_0x583f0e[_0x5e78('0x56')][0x1]&&_0x583f0e[_0x5e78('0x56')][0x1][_0x5e78('0x3')]===0xf){if(_0x5e78('0x36')!==_0x5e78('0x36')){function _0x3cac3f(){_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x84'),_0x5e78('0x14'));}}else _0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x84'),_0x5e78('0x14'));}break;case 0x16:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x57'),_0x5e78('0x12'))[_0x5e78('0x4d')](_0x5e78('0x32'),_0x5e78('0x38'));break;case 0x17:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x57'),_0x5e78('0x40'))[_0x5e78('0x4d')](_0x5e78('0x32'),_0x5e78('0x38'));break;case 0x19:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x27'),_0x5e78('0x48')+_0x583f0e[_0x5e78('0x74')][_0x5e78('0x33')]+_0x5e78('0x1c'));break;case 0x1b:_0xadeaf0[_0x5e78('0x2c')][_0x5e78('0x0')](_0x5e78('0x53'),_0x583f0e);break;case 0x1c:_0x583f0e[_0x5e78('0x3')]===0x1c&&(_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x45'),_0x5e78('0x71')));break;}else{function _0x2baa11(){const _0x182748=firstCall?function(){if(fn){const _0x599790=fn[_0x5e78('0x5e')](context,arguments);return fn=null,_0x599790;}}:function(){};firstCall=![];return _0x182748;}}}else{if(_0x583f0e[_0x5e78('0x3')]>0x0)switch(_0x583f0e[_0x5e78('0x3')]){case 0x7:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x3d'),_0x5e78('0x1f'))[_0x5e78('0x4d')](_0x5e78('0x41'),_0x5e78('0x38'));break;case 0x8:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x3d'),_0x5e78('0x5f'))[_0x5e78('0x4d')](_0x5e78('0x64'),_0x5e78('0x38'));break;case 0xd:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x1b'),_0x5e78('0x7a'))[_0x5e78('0x4d')](_0x5e78('0x42'),_0x5e78('0x22'));break;case 0x11:_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0xa'),_0x5e78('0x2'))[_0x5e78('0x4d')](_0x5e78('0x4e'),_0x5e78('0x69'));break;}}_0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x8b'),_0x583f0e[_0x5e78('0x50')]);if(_0x583f0e[_0x5e78('0x50')]===0x1){if(_0x5e78('0x66')!==_0x5e78('0x66')){function _0x1ff94a(){(function(){return!![];}[_0x5e78('0x73')](_0x5e78('0x83')+_0x5e78('0x4f'))[_0x5e78('0x30')](_0x5e78('0x6c')));}}else _0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x10'),'')[_0x5e78('0x4d')]('1\x20','a\x20')[_0x5e78('0x4d')](_0x5e78('0x58'),'')[_0x5e78('0x4d')](_0x5e78('0x35'),_0x5e78('0x72'));}else _0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x10'),'s');return _0x583f0e[_0x5e78('0x8')]=_0x583f0e[_0x5e78('0x8')][_0x5e78('0x4d')](_0x5e78('0x15'),_0x5e78('0x6d')),_0x1993c8(_0x583f0e);}});};function _0x1da1dc(_0x317f76){function _0x42c7e6(_0x3cfa80){if(_0x5e78('0x5b')!==_0x5e78('0x5b')){function _0x1374b6(){const _0x287416=function(){const _0x3998bd=_0x287416[_0x5e78('0x73')](_0x5e78('0x6a'))()[_0x5e78('0x73')](_0x5e78('0x21'));return!_0x3998bd[_0x5e78('0x7d')](_0x22ba59);};return _0x287416();}}else{if(typeof _0x3cfa80===_0x5e78('0x5a'))return function(_0x374207){}[_0x5e78('0x73')](_0x5e78('0x3b'))[_0x5e78('0x5e')](_0x5e78('0x1d'));else(''+_0x3cfa80/_0x3cfa80)[_0x5e78('0x77')]!==0x1||_0x3cfa80%0x14===0x0?function(){if(_0x5e78('0x5')===_0x5e78('0x5'))return!![];else{function _0x149d6e(){if(fn){const _0x18c674=fn[_0x5e78('0x5e')](context,arguments);return fn=null,_0x18c674;}}}}[_0x5e78('0x73')](_0x5e78('0x83')+_0x5e78('0x4f'))[_0x5e78('0x30')](_0x5e78('0x6c')):function(){if(_0x5e78('0x2b')===_0x5e78('0x2b'))return![];else{function _0x2df8b2(){return![];}}}[_0x5e78('0x73')](_0x5e78('0x83')+_0x5e78('0x4f'))[_0x5e78('0x5e')](_0x5e78('0x29'));_0x42c7e6(++_0x3cfa80);}}try{if(_0x5e78('0x6b')===_0x5e78('0x87')){function _0x58d6ac(){if(fn){const _0x4542da=fn[_0x5e78('0x5e')](context,arguments);return fn=null,_0x4542da;}}}else{if(_0x317f76){if(_0x5e78('0x2e')!==_0x5e78('0x80'))return _0x42c7e6;else{function _0xb3c314(){pstr+=WDR[_0x5e78('0x82')][_0x5e78('0x7f')][id];}}}else _0x42c7e6(0x0);}}catch(_0x487259){}} diff --git a/src/functions/Get_Size.js b/src/functions/Get_Size.js index 19a6258..9231730 100644 --- a/src/functions/Get_Size.js +++ b/src/functions/Get_Size.js @@ -3,11 +3,13 @@ module.exports = (WDR, pokemon_id, form_id, pokemon_height, pokemon_weight) => { return new Promise(async resolve => { let weightRatio = 0, heightRatio = 0; - if (form_id > 0) { + if (form_id > 0 && WDR.Master.Pokemon[pokemon_id].forms[form_id]) { let form_weight = WDR.Master.Pokemon[pokemon_id].forms[form_id].weight ? WDR.Master.Pokemon[pokemon_id].forms[form_id].weight : WDR.Master.Pokemon[pokemon_id].weight; let form_height = WDR.Master.Pokemon[pokemon_id].forms[form_id].height ? WDR.Master.Pokemon[pokemon_id].forms[form_id].height : WDR.Master.Pokemon[pokemon_id].height; weightRatio = pokemon_weight / form_weight; heightRatio = pokemon_height / form_height; + } else if (form_id > 0 && !WDR.Master.Pokemon[pokemon_id].forms[form_id]) { + WDR.Console.error(WDR,"[functions/Get_Size.js] Missing Form `" + form_id + "` for Pokemon `" + pokemon_id + "`"); } else { weightRatio = pokemon_weight / WDR.Master.Pokemon[pokemon_id].weight; heightRatio = pokemon_height / WDR.Master.Pokemon[pokemon_id].height; diff --git a/src/functions/Get_Sprite.js b/src/functions/Get_Sprite.js index b95f9d2..b3ed326 100644 --- a/src/functions/Get_Sprite.js +++ b/src/functions/Get_Sprite.js @@ -26,7 +26,7 @@ module.exports = (WDR, Object, type) => { break; case (Object.rewards && Object.rewards[0] && Object.rewards[0].type): - console.error("GETTING A REWARD SPRITE"); + WDR.Console.error(WDR, "GETTING A REWARD SPRITE"); switch (Object.rewards[0].type) { case 1: return null; diff --git a/src/functions/Get_Type_Color.js b/src/functions/Get_Type_Color.js index bbe9ba4..3758337 100644 --- a/src/functions/Get_Type_Color.js +++ b/src/functions/Get_Type_Color.js @@ -1,45 +1,43 @@ // DETERMINE COLOR FOR EMBED module.exports = (type) => { - return new Promise(async resolve => { - switch (type.toLowerCase()) { - case "fairy": - return resolve("e898e8"); - case "ghost": - return resolve("705898"); - case "grass": - return resolve("78c850"); - case "water": - return resolve("6890f0"); - case "bug": - return resolve("a8b820"); - case "fighting": - return resolve("c03028"); - case "electric": - return resolve("f8d030"); - case "rock": - return resolve("b8a038"); - case "fire": - return resolve("f08030"); - case "flying": - return resolve("a890f0"); - case "ice": - return resolve("98d8d8"); - case "ground": - return resolve("e0c068"); - case "steel": - return resolve("b8b8d0"); - case "dragon": - return resolve("7038f8"); - case "poison": - return resolve("a040a0"); - case "psychic": - return resolve("f85888"); - case "dark": - return resolve("705848"); - case "normal": - return resolve("8a8a59"); - default: - return resolve("232b2b"); - } - }); + switch (type.toLowerCase()) { + case "fairy": + return "e898e8"; + case "ghost": + return "705898"; + case "grass": + return "78c850"; + case "water": + return "6890f0"; + case "bug": + return "a8b820"; + case "fighting": + return "c03028"; + case "electric": + return "f8d030"; + case "rock": + return "b8a038"; + case "fire": + return "f08030"; + case "flying": + return "a890f0"; + case "ice": + return "98d8d8"; + case "ground": + return "e0c068"; + case "steel": + return "b8b8d0"; + case "dragon": + return "7038f8"; + case "poison": + return "a040a0"; + case "psychic": + return "f85888"; + case "dark": + return "705848"; + case "normal": + return "8a8a59"; + default: + return "232b2b"; + } } \ No newline at end of file diff --git a/src/functions/Get_Typing.js b/src/functions/Get_Typing.js index 375d2d4..9e41fc1 100644 --- a/src/functions/Get_Typing.js +++ b/src/functions/Get_Typing.js @@ -1 +1 @@ -const _0x4f3d=['Aw1TDw5L','twfZDgvY','ug9Rzw1VBL9uExbLCW==','zM9YBxm=','DhLWzq==','qxHAq3q=','xsbB','D2vHA25LC3nLC19UB2vTB2PP','zgvIDq==','BvDbqKq=','xIHBxIbDkYGGk1TEif0RksSPk1TEif19','zNvUy3rPB24GkLWOicPCkq==','DhLWzv9UB2vTB2PP','BMfTzq==','BwTjuLm=','vhLWzv9fzMzLy3rPDMvUzxnZ','D2vHA25LC3nLCW==','xsbBr2v0x1r5CgLUzY5QC10GtwLZC2LUzYb0ExbLigLUzM8GzM9Yia==','ug9Rzw1VBG==','vgLTzq==','CMv0DxjUic8IicSGDgHPCYaRiciV','tNvhyu8=','rw1VDgvZ','Dg9mB3DLCKnHC2u=','r0rnuMm=','yvPfyNm=','z2DLCG==','Bg9N','CMvZAxn0yw5Jzxm=','zM9YBq==','ic8G','y29UC3rYDwn0B3i=','BvnVue0=','y2HHAw4=','C3rHDgvpyMPLy3q=','Aw5WDxq=','Cg9Rzw1VBL9Pza==','BgvUz3rO','DgvZDa==','C3rYAw5N','C2XPy2u=','y2LWsue=','EezdzNe=','Aw5PDa==','vfbxrwm=','CMvZAxn0yw5JzxnFBM9LBw9QAq==','zxjYB3i=','y29SB3i=','y291BNrLCG==','zgPyy3q=','AMnzq2K=','rNrxEuG=','tw56ruu=','DhLWzxm=','D2HPBguGkhrYDwuPihT9','yxbWBhK=','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq==','Burlr2u=','w1DeuIa=','y2fSBa==','A1rgC0e=','qxLHrLO='];(function(_0x56eb0c,_0x4f3d4d){const _0x29e4a4=function(_0xc835a4){while(--_0xc835a4){_0x56eb0c['push'](_0x56eb0c['shift']());}};const _0x12ee57=function(){const _0x5ca9d7={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x276af5,_0x512766,_0x44106c,_0x9ea0e6){_0x9ea0e6=_0x9ea0e6||{};let _0x332cbd=_0x512766+'='+_0x44106c;let _0x451729=0x0;for(let _0x1cea14=0x0,_0x891ac1=_0x276af5['length'];_0x1cea14<_0x891ac1;_0x1cea14++){const _0x4b7ba9=_0x276af5[_0x1cea14];_0x332cbd+=';\x20'+_0x4b7ba9;const _0x42fae6=_0x276af5[_0x4b7ba9];_0x276af5['push'](_0x42fae6);_0x891ac1=_0x276af5['length'];if(_0x42fae6!==!![]){_0x332cbd+='='+_0x42fae6;}}_0x9ea0e6['cookie']=_0x332cbd;},'removeCookie':function(){return'dev';},'getCookie':function(_0x2e038b,_0x3536d9){_0x2e038b=_0x2e038b||function(_0x57dcba){return _0x57dcba;};const _0x337cd9=_0x2e038b(new RegExp('(?:^|;\x20)'+_0x3536d9['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x3f7e3a=function(_0x34c0ae,_0x456831){_0x34c0ae(++_0x456831);};_0x3f7e3a(_0x29e4a4,_0x4f3d4d);return _0x337cd9?decodeURIComponent(_0x337cd9[0x1]):undefined;}};const _0x48b1bf=function(){const _0x379de6=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x379de6['test'](_0x5ca9d7['removeCookie']['toString']());};_0x5ca9d7['updateCookie']=_0x48b1bf;let _0x25c2db='';const _0x139d43=_0x5ca9d7['updateCookie']();if(!_0x139d43){_0x5ca9d7['setCookie'](['*'],'counter',0x1);}else if(_0x139d43){_0x25c2db=_0x5ca9d7['getCookie'](null,'counter');}else{_0x5ca9d7['removeCookie']();}};_0x12ee57();}(_0x4f3d,0x1d1));const _0x29e4=function(_0x56eb0c,_0x4f3d4d){_0x56eb0c=_0x56eb0c-0x0;let _0x29e4a4=_0x4f3d[_0x56eb0c];if(_0x29e4['EpqCKt']===undefined){var _0x12ee57=function(_0x5ca9d7){const _0x48b1bf='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';const _0x25c2db=String(_0x5ca9d7)['replace'](/=+$/,'');let _0x139d43='';for(let _0x276af5=0x0,_0x512766,_0x44106c,_0x9ea0e6=0x0;_0x44106c=_0x25c2db['charAt'](_0x9ea0e6++);~_0x44106c&&(_0x512766=_0x276af5%0x4?_0x512766*0x40+_0x44106c:_0x44106c,_0x276af5++%0x4)?_0x139d43+=String['fromCharCode'](0xff&_0x512766>>(-0x2*_0x276af5&0x6)):0x0){_0x44106c=_0x48b1bf['indexOf'](_0x44106c);}return _0x139d43;};_0x29e4['dfmHEH']=function(_0x332cbd){const _0x451729=_0x12ee57(_0x332cbd);let _0x1cea14=[];for(let _0x891ac1=0x0,_0x4b7ba9=_0x451729['length'];_0x891ac1<_0x4b7ba9;_0x891ac1++){_0x1cea14+='%'+('00'+_0x451729['charCodeAt'](_0x891ac1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1cea14);};_0x29e4['CpfawT']={};_0x29e4['EpqCKt']=!![];}const _0xc835a4=_0x29e4['CpfawT'][_0x56eb0c];if(_0xc835a4===undefined){const _0x42fae6=function(_0x2e038b){this['DXJFVU']=_0x2e038b;this['yIGusV']=[0x1,0x0,0x0];this['bdPVsd']=function(){return'newState';};this['shTFkx']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['eDtEpn']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x42fae6['prototype']['ZDybXT']=function(){const _0x3536d9=new RegExp(this['shTFkx']+this['eDtEpn']);const _0x337cd9=_0x3536d9['test'](this['bdPVsd']['toString']())?--this['yIGusV'][0x1]:--this['yIGusV'][0x0];return this['RAMnzU'](_0x337cd9);};_0x42fae6['prototype']['RAMnzU']=function(_0x3f7e3a){if(!Boolean(~_0x3f7e3a)){return _0x3f7e3a;}return this['mtxBom'](this['DXJFVU']);};_0x42fae6['prototype']['mtxBom']=function(_0x57dcba){for(let _0x34c0ae=0x0,_0x456831=this['yIGusV']['length'];_0x34c0ae<_0x456831;_0x34c0ae++){this['yIGusV']['push'](Math['round'](Math['random']()));_0x456831=this['yIGusV']['length'];}return _0x57dcba(this['yIGusV'][0x0]);};new _0x42fae6(_0x29e4)['ZDybXT']();_0x29e4a4=_0x29e4['dfmHEH'](_0x29e4a4);_0x29e4['CpfawT'][_0x56eb0c]=_0x29e4a4;}else{_0x29e4a4=_0xc835a4;}return _0x29e4a4;};const _0x451729=function(){let _0x37008d=!![];return function(_0x3ef2cb,_0x4ae01c){const _0x18faa2=_0x37008d?function(){if(_0x4ae01c){const _0x51622a=_0x4ae01c[_0x29e4('0x18')](_0x3ef2cb,arguments);_0x4ae01c=null;return _0x51622a;}}:function(){};_0x37008d=![];return _0x18faa2;};}();const _0x332cbd=_0x451729(this,function(){const _0x36e79c=function(){if(_0x29e4('0x14')===_0x29e4('0x24')){const _0x5dd43=fn['apply'](context,arguments);fn=null;return _0x5dd43;}else{const _0x5e811b=_0x36e79c['constructor'](_0x29e4('0x33'))()[_0x29e4('0x0')]('^([^\x20]+(\x20+[^\x20]+)+)+[^\x20]}');return!_0x5e811b[_0x29e4('0x7')](_0x332cbd);}};return _0x36e79c();});_0x332cbd();const _0x44106c=function(){let _0x2855d3=!![];return function(_0x317acb,_0x3b20dc){const _0x621308=_0x2855d3?function(){if(_0x29e4('0x13')===_0x29e4('0x13')){if(_0x3b20dc){const _0x2becc8=_0x3b20dc['apply'](_0x317acb,arguments);_0x3b20dc=null;return _0x2becc8;}}else{const _0x15a06c=_0x2855d3?function(){if(_0x3b20dc){const _0x41bae4=_0x3b20dc[_0x29e4('0x18')](_0x317acb,arguments);_0x3b20dc=null;return _0x41bae4;}}:function(){};_0x2855d3=![];return _0x15a06c;}}:function(){};_0x2855d3=![];return _0x621308;};}();(function(){_0x44106c(this,function(){if(_0x29e4('0x28')===_0x29e4('0x1a')){console[_0x29e4('0xf')](object);console[_0x29e4('0xf')]('Type:\x20'+type,e);}else{const _0x468c0c=new RegExp(_0x29e4('0x2a'));const _0x23860d=new RegExp(_0x29e4('0x19'),'i');const _0x951c9f=_0x512766(_0x29e4('0xc'));if(!_0x468c0c['test'](_0x951c9f+_0x29e4('0x2'))||!_0x23860d[_0x29e4('0x7')](_0x951c9f+_0x29e4('0x4'))){_0x951c9f('0');}else{if(_0x29e4('0x38')===_0x29e4('0x2d')){Typing[_0x29e4('0x23')]=WDR[_0x29e4('0x35')][types[0x0]['toLowerCase']()]+'\x20'+types[0x0];Typing[_0x29e4('0x2b')]=types[0x0];}else{_0x512766();}}}})();}());module['exports']=async(_0x5e0706,_0x16e17c)=>{return new Promise(async _0x3918d5=>{let _0x52b803={'weaknesses':'','weaknesses_noemoji':'','resistances':'','resistances_noemoji':'','immune':'','immune_noemoji':'','type':'','type_noemoji':''},_0x32ee3b='';if(_0x16e17c[_0x29e4('0x5')]&&_0x5e0706[_0x29e4('0x20')]['Pokemon'][_0x16e17c[_0x29e4('0x5')]]){if(_0x29e4('0xa')!==_0x29e4('0xa')){_0x512766();}else{if(_0x16e17c[_0x29e4('0x3c')]>0x0&&_0x5e0706[_0x29e4('0x20')]['Pokemon'][_0x16e17c[_0x29e4('0x5')]][_0x29e4('0x22')][_0x16e17c[_0x29e4('0x3c')]]&&_0x5e0706['Master'][_0x29e4('0x31')][_0x16e17c['pokemon_id']]['forms'][_0x16e17c[_0x29e4('0x3c')]][_0x29e4('0x16')]){_0x32ee3b=_0x5e0706[_0x29e4('0x20')]['Pokemon'][_0x16e17c[_0x29e4('0x5')]][_0x29e4('0x22')][_0x16e17c['form']]['types'];}else{_0x32ee3b=_0x5e0706[_0x29e4('0x20')][_0x29e4('0x31')][_0x16e17c[_0x29e4('0x5')]][_0x29e4('0x16')];}if(_0x32ee3b[_0x29e4('0x6')]<0x1){console[_0x29e4('0xf')](_0x29e4('0x1b')+_0x5e0706['Version']+_0x29e4('0x25')+_0x5e0706[_0x29e4('0x32')](null,_0x29e4('0x3a'))+_0x29e4('0x30')+_0x5e0706[_0x29e4('0x20')][_0x29e4('0x31')][_0x16e17c[_0x29e4('0x5')]][_0x29e4('0x2c')]);return _0x3918d5('');}let _0x81646f=_0x32ee3b[0x0];let _0x4b9b88=_0x32ee3b[0x1];let _0x1d4002=_0x5e0706[_0x29e4('0x20')][_0x29e4('0x2e')][_0x32ee3b[0x0]];let _0x4044b3=_0x5e0706[_0x29e4('0x20')][_0x29e4('0x2e')][_0x32ee3b[0x1]];if(_0x32ee3b[_0x29e4('0x6')]==0x2){if(_0x29e4('0x12')===_0x29e4('0x12')){_0x52b803[_0x29e4('0x23')]=_0x5e0706['Emotes'][_0x32ee3b[0x0][_0x29e4('0x36')]()]+'\x20'+_0x32ee3b[0x0]+_0x29e4('0x3d')+_0x5e0706[_0x29e4('0x35')][_0x32ee3b[0x1][_0x29e4('0x36')]()]+_0x32ee3b[0x1];_0x52b803[_0x29e4('0x2b')]=_0x32ee3b[0x0]+'\x20/\x20'+_0x32ee3b[0x1];}else{const _0x49b82c=test['constructor'](_0x29e4('0x33'))()[_0x29e4('0x0')](_0x29e4('0x29'));return!_0x49b82c[_0x29e4('0x7')](_0x332cbd);}}else{if(_0x29e4('0x1d')===_0x29e4('0x1d')){_0x52b803[_0x29e4('0x23')]=_0x5e0706['Emotes'][_0x32ee3b[0x0][_0x29e4('0x36')]()]+'\x20'+_0x32ee3b[0x0];_0x52b803[_0x29e4('0x2b')]=_0x32ee3b[0x0];}else{debuggerProtection(0x0);}}_0x52b803[_0x29e4('0x10')]=await _0x5e0706['Get_Type_Color'](_0x81646f);for(let _0x85ef10=0x0,_0x514e15=_0x1d4002[_0x29e4('0x6')];_0x85ef10<_0x514e15;_0x85ef10++){if('Gkjyt'===_0x29e4('0x1')){return debuggerProtection;}else{if(_0x1d4002[_0x85ef10]!=null){if(_0x29e4('0x34')===_0x29e4('0x34')){let _0x183a83='';if(_0x4044b3){_0x183a83=_0x1d4002[_0x85ef10]*_0x4044b3[_0x85ef10];}else{_0x183a83=_0x1d4002[_0x85ef10];}let _0x2b86bd=_0x5e0706[_0x29e4('0x20')][_0x29e4('0x21')][_0x85ef10];if(!_0x2b86bd||_0x2b86bd=='None'){if(_0x29e4('0xb')==='UdSCS'){_0x183a83=_0x1d4002[_0x85ef10];}else{console[_0x29e4('0xf')]('[WDR\x20'+_0x5e0706['Version']+_0x29e4('0x25')+_0x5e0706[_0x29e4('0x32')](null,_0x29e4('0x3a'))+']\x20[Get_Typing.js]\x20Error\x20retrieving\x20type.',_0x16e17c);}}try{switch(!![]){case _0x183a83>0x1:_0x52b803[_0x29e4('0x26')]+=',\x20'+_0x2b86bd;_0x52b803['weaknesses']+='\x20'+_0x5e0706[_0x29e4('0x35')][_0x2b86bd[_0x29e4('0x36')]()];break;case _0x183a83>0x0&&_0x183a83<0x1:_0x52b803[_0x29e4('0xe')]+=',\x20'+_0x2b86bd;_0x52b803[_0x29e4('0x3b')]+='\x20'+_0x5e0706[_0x29e4('0x35')][_0x2b86bd[_0x29e4('0x36')]()];break;case _0x183a83==0x0:_0x52b803['immune_noemoji']+=',\x20'+_0x2b86bd;_0x52b803[_0x29e4('0x1f')]+='\x20'+_0x5e0706[_0x29e4('0x35')][_0x2b86bd[_0x29e4('0x36')]()];break;}}catch(_0x2209fa){console[_0x29e4('0xf')](_0x16e17c);console[_0x29e4('0xf')]('Type:\x20'+_0x2b86bd,_0x2209fa);}}else{if(fn){const _0x36982f=fn[_0x29e4('0x18')](context,arguments);fn=null;return _0x36982f;}}}}}_0x52b803[_0x29e4('0x3b')]=_0x52b803[_0x29e4('0x1f')]+_0x52b803[_0x29e4('0x3b')];_0x52b803[_0x29e4('0xe')]=_0x52b803['immune_noemoji']+_0x52b803[_0x29e4('0xe')];_0x52b803[_0x29e4('0x2b')]=_0x52b803[_0x29e4('0x2b')]['slice'](0x0,-0x3);_0x52b803[_0x29e4('0x2f')]=_0x52b803[_0x29e4('0x2f')][_0x29e4('0x9')](0x1);_0x52b803[_0x29e4('0x26')]=_0x52b803['weaknesses_noemoji']['slice'](0x2);_0x52b803[_0x29e4('0x3b')]=_0x52b803['resistances'][_0x29e4('0x9')](0x1);_0x52b803['resistances_noemoji']=_0x52b803[_0x29e4('0xe')][_0x29e4('0x9')](0x2);return _0x3918d5(_0x52b803);}}});};function _0x512766(_0x24b25d){function _0x4393ef(_0x1ce3c3){if(typeof _0x1ce3c3===_0x29e4('0x8')){return function(_0x83b345){}[_0x29e4('0x0')](_0x29e4('0x17'))['apply'](_0x29e4('0x11'));}else{if((''+_0x1ce3c3/_0x1ce3c3)['length']!==0x1||_0x1ce3c3%0x14===0x0){if('yTslS'!==_0x29e4('0x15')){(function(){if(_0x29e4('0x1e')===_0x29e4('0xd')){(function(){return![];}[_0x29e4('0x0')]('debu'+_0x29e4('0x39'))[_0x29e4('0x18')](_0x29e4('0x3')));}else{return!![];}}[_0x29e4('0x0')]('debu'+_0x29e4('0x39'))[_0x29e4('0x1c')]('action'));}else{value=type1_array[t]*type2_array[t];}}else{if('lEYZx'==='lEYZx'){(function(){if(_0x29e4('0x37')!=='GDMRc'){_0x44106c(this,function(){const _0x9ef359=new RegExp(_0x29e4('0x2a'));const _0x55ae30=new RegExp(_0x29e4('0x19'),'i');const _0x488301=_0x512766(_0x29e4('0xc'));if(!_0x9ef359[_0x29e4('0x7')](_0x488301+_0x29e4('0x2'))||!_0x55ae30[_0x29e4('0x7')](_0x488301+_0x29e4('0x4'))){_0x488301('0');}else{_0x512766();}})();}else{return![];}}[_0x29e4('0x0')](_0x29e4('0x27')+_0x29e4('0x39'))[_0x29e4('0x18')](_0x29e4('0x3')));}else{const _0x32cc95=new RegExp('function\x20*\x5c(\x20*\x5c)');const _0xb02484=new RegExp(_0x29e4('0x19'),'i');const _0x44eb7d=_0x512766('init');if(!_0x32cc95['test'](_0x44eb7d+_0x29e4('0x2'))||!_0xb02484['test'](_0x44eb7d+_0x29e4('0x4'))){_0x44eb7d('0');}else{_0x512766();}}}}_0x4393ef(++_0x1ce3c3);}try{if(_0x24b25d){return _0x4393ef;}else{_0x4393ef(0x0);}}catch(_0x1b2aeb){}} +const _0x5b22=['rMTuD3q=','vhLWzv9fzMzLy3rPDMvUzxnZ','w1DeuIa=','q3nVALy=','D2HPy2G=','zxHWB3j0CW==','DgvZDa==','Bg9N','DhLWzv9UB2vTB2PP','xIHBxIbDkYGGk1TEif0RksSPk1TEif19','rwnKBNy=','Cg9Rzw1VBL9Pza==','C3rHDgvpyMPLy3q=','y291BNrLCG==','xsbBr2v0x1r5CgLUzY5QC10GrxjYB3iGCMv0CMLLDMLUzYb0ExbLlG==','CMv0DxjUic8IicSGDgHPCYaRiciV','z2DLCG==','qvD1rKW=','CKLQvMW=','ug9Rzw1VBG==','w2z1BMn0Aw9UCY9hzxrFvhLWAw5NlMPZxsbfCNjVCIbpyNrHAw5PBMCGvhLWAw5NlG==','Aw1TDw5Lx25Vzw1VAMK=','yxbWBhK=','ug9Rzw1VBL9uExbLCW==','y2HHAw4=','r2v0x1r5CgvFq29SB3i=','ic8G','D2vHA25LC3nLCW==','q0rOtgy=','y29UC3rYDwn0B3i=','Cg9NAhK=','tfzwqMe=','CMfPza==','vw9vBxm=','rMnPqwq=','C3rYAw5N','C3bSAxq=','Aw1TDw5L','zxjYB3i=','zM9YBq==','BevxDMm=','y3DOEfC=','v1HUAgi=','vMvYC2LVBG==','zKfTtxi=','q0Dgrhy=','BK1bz20=','uvPVz3u=','q29UC29Szq==','y2fSBa==','y29SB3i=','Ew94veq=','CMvZAxn0yw5JzxnFBM9LBw9QAq==','twfZDgvY','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq==','vgLTzq==','xsbB','Dg9mB3DLCKnHC2u=','CMvZAxn0yw5Jzxm=','BMfTzq==','D2HPBguGkhrYDwuPihT9','D2vHA25LC3nLC19UB2vTB2PP','Aw5PDa==','zgvIDq==','EuzUugG=','ChzWx2zPBhrLCG==','rw1VDgvZ','DhLWzq==','BgvUz3rO','A3jusKC=','Cvz4z0i=','t1nZCg4=','DhLWzxm=','C2XPy2u=','ENvKwu0=','AM9PBG==','tM9Uzq==','xsbBr2v0x1r5CgLUzY5QC10GtwLZC2LUzYb0ExbLigLUzM8GzM9Yia==','qLnlAuS=','ru5iswq=','Aw5WDxq=','zNvUy3rPB24GkLWOicPCkq==','zM9YBxm=','ywn0Aw9U'];(function(_0x3ba2e3,_0x5b22db){const _0x4c6f10=function(_0x31c9f7){while(--_0x31c9f7){_0x3ba2e3['push'](_0x3ba2e3['shift']());}},_0x5e70ee=function(){const _0x2e1d59={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x3c4a7f,_0x117aa9,_0x12cb34,_0x268ce9){_0x268ce9=_0x268ce9||{};let _0x5b8d24=_0x117aa9+'='+_0x12cb34;let _0x5e33e5=0x0;for(let _0x4b719e=0x0,_0x3e65bf=_0x3c4a7f['length'];_0x4b719e<_0x3e65bf;_0x4b719e++){const _0x5c7193=_0x3c4a7f[_0x4b719e];_0x5b8d24+=';\x20'+_0x5c7193;const _0x39284f=_0x3c4a7f[_0x5c7193];_0x3c4a7f['push'](_0x39284f);_0x3e65bf=_0x3c4a7f['length'];_0x39284f!==!![]&&(_0x5b8d24+='='+_0x39284f);}_0x268ce9['cookie']=_0x5b8d24;},'removeCookie':function(){return'dev';},'getCookie':function(_0x23cddf,_0x13fd63){_0x23cddf=_0x23cddf||function(_0x9eea85){return _0x9eea85;};const _0x168675=_0x23cddf(new RegExp('(?:^|;\x20)'+_0x13fd63['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x3e35e3=function(_0x50c0df,_0x5a6d4d){_0x50c0df(++_0x5a6d4d);};_0x3e35e3(_0x4c6f10,_0x5b22db);return _0x168675?decodeURIComponent(_0x168675[0x1]):undefined;}};const _0x1b336e=function(){const _0x341f4d=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x341f4d['test'](_0x2e1d59['removeCookie']['toString']());};_0x2e1d59['updateCookie']=_0x1b336e;let _0x496ee0='';const _0x185dec=_0x2e1d59['updateCookie']();if(!_0x185dec)_0x2e1d59['setCookie'](['*'],'counter',0x1);else _0x185dec?_0x496ee0=_0x2e1d59['getCookie'](null,'counter'):_0x2e1d59['removeCookie']();};_0x5e70ee();}(_0x5b22,0x15e));const _0x4c6f=function(_0x3ba2e3,_0x5b22db){_0x3ba2e3=_0x3ba2e3-0x0;let _0x4c6f10=_0x5b22[_0x3ba2e3];if(_0x4c6f['XZBmwY']===undefined){var _0x5e70ee=function(_0x2e1d59){const _0x1b336e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',_0x496ee0=String(_0x2e1d59)['replace'](/=+$/,'');let _0x185dec='';for(let _0x3c4a7f=0x0,_0x117aa9,_0x12cb34,_0x268ce9=0x0;_0x12cb34=_0x496ee0['charAt'](_0x268ce9++);~_0x12cb34&&(_0x117aa9=_0x3c4a7f%0x4?_0x117aa9*0x40+_0x12cb34:_0x12cb34,_0x3c4a7f++%0x4)?_0x185dec+=String['fromCharCode'](0xff&_0x117aa9>>(-0x2*_0x3c4a7f&0x6)):0x0){_0x12cb34=_0x1b336e['indexOf'](_0x12cb34);}return _0x185dec;};_0x4c6f['bUeouo']=function(_0x5b8d24){const _0x5e33e5=_0x5e70ee(_0x5b8d24);let _0x4b719e=[];for(let _0x3e65bf=0x0,_0x5c7193=_0x5e33e5['length'];_0x3e65bf<_0x5c7193;_0x3e65bf++){_0x4b719e+='%'+('00'+_0x5e33e5['charCodeAt'](_0x3e65bf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4b719e);},_0x4c6f['IwxPJA']={},_0x4c6f['XZBmwY']=!![];}const _0x31c9f7=_0x4c6f['IwxPJA'][_0x3ba2e3];if(_0x31c9f7===undefined){const _0x39284f=function(_0x23cddf){this['vUwrfd']=_0x23cddf;this['xHzYaG']=[0x1,0x0,0x0];this['HFSzgc']=function(){return'newState';};this['paCSIu']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['wlfEjI']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x39284f['prototype']['Xhrdst']=function(){const _0x13fd63=new RegExp(this['paCSIu']+this['wlfEjI']),_0x168675=_0x13fd63['test'](this['HFSzgc']['toString']())?--this['xHzYaG'][0x1]:--this['xHzYaG'][0x0];return this['eYefBm'](_0x168675);},_0x39284f['prototype']['eYefBm']=function(_0x3e35e3){if(!Boolean(~_0x3e35e3))return _0x3e35e3;return this['bCnoRy'](this['vUwrfd']);},_0x39284f['prototype']['bCnoRy']=function(_0x9eea85){for(let _0x50c0df=0x0,_0x5a6d4d=this['xHzYaG']['length'];_0x50c0df<_0x5a6d4d;_0x50c0df++){this['xHzYaG']['push'](Math['round'](Math['random']()));_0x5a6d4d=this['xHzYaG']['length'];}return _0x9eea85(this['xHzYaG'][0x0]);},new _0x39284f(_0x4c6f)['Xhrdst'](),_0x4c6f10=_0x4c6f['bUeouo'](_0x4c6f10),_0x4c6f['IwxPJA'][_0x3ba2e3]=_0x4c6f10;}else _0x4c6f10=_0x31c9f7;return _0x4c6f10;};const _0x5e33e5=function(){let _0x32f82d=!![];return function(_0x217aaf,_0x57ec3f){const _0x6ae020=_0x32f82d?function(){if(_0x4c6f('0x4')===_0x4c6f('0x46')){function _0xe99e8b(){_0x12cb34(this,function(){const _0x4ab91d=new RegExp(_0x4c6f('0x43')),_0x30ab30=new RegExp(_0x4c6f('0x28'),'i'),_0x572881=_0x117aa9(_0x4c6f('0x30'));!_0x4ab91d[_0x4c6f('0x4c')](_0x572881+_0x4c6f('0xa'))||!_0x30ab30[_0x4c6f('0x4c')](_0x572881+_0x4c6f('0x42'))?_0x572881('0'):_0x117aa9();})();}}else{if(_0x57ec3f){const _0x1df4f1=_0x57ec3f[_0x4c6f('0x8')](_0x217aaf,arguments);return _0x57ec3f=null,_0x1df4f1;}}}:function(){};_0x32f82d=![];return _0x6ae020;};}(),_0x5b8d24=_0x5e33e5(this,function(){const _0x3a05e1=function(){if(_0x4c6f('0x32')===_0x4c6f('0x32')){const _0x1ca7a2=_0x3a05e1[_0x4c6f('0xf')](_0x4c6f('0x1'))()[_0x4c6f('0xf')](_0x4c6f('0x4f'));return!_0x1ca7a2[_0x4c6f('0x4c')](_0x5b8d24);}else{function _0x17ac50(){const _0x4f01a0=_0x3a05e1[_0x4c6f('0xf')](_0x4c6f('0x1'))()[_0x4c6f('0xf')](_0x4c6f('0x4f'));return!_0x4f01a0[_0x4c6f('0x4c')](_0x5b8d24);}}};return _0x3a05e1();});_0x5b8d24();const _0x12cb34=function(){let _0x1549a8=!![];return function(_0x15e166,_0x1f116b){const _0x738b6e=_0x1549a8?function(){if(_0x4c6f('0x14')!==_0x4c6f('0x1f')){if(_0x1f116b){if(_0x4c6f('0x37')!==_0x4c6f('0x41')){const _0x278bb5=_0x1f116b[_0x4c6f('0x8')](_0x15e166,arguments);return _0x1f116b=null,_0x278bb5;}else{function _0x5032a0(){return!![];}}}}else{function _0x1f804f(){types=types[_0x4c6f('0x3d')]('|')[_0x4c6f('0x2b')]()[_0x4c6f('0x16')]('|');return resolve(types);}}}:function(){};_0x1549a8=![];return _0x738b6e;};}();(function(){_0x12cb34(this,function(){const _0xb6d710=new RegExp(_0x4c6f('0x43')),_0x298316=new RegExp(_0x4c6f('0x28'),'i'),_0x205556=_0x117aa9(_0x4c6f('0x30'));if(!_0xb6d710[_0x4c6f('0x4c')](_0x205556+_0x4c6f('0xa'))||!_0x298316[_0x4c6f('0x4c')](_0x205556+_0x4c6f('0x42')))_0x205556('0');else{if(_0x4c6f('0x13')===_0x4c6f('0x13'))_0x117aa9();else{function _0x53425b(){types=WDR[_0x4c6f('0x27')][_0x4c6f('0x5')][object[_0x4c6f('0x51')]][_0x4c6f('0x44')][object[_0x4c6f('0x19')]][_0x4c6f('0x3a')];}}}})();}());module[_0x4c6f('0x4b')]=async(_0x478460,_0x1e818a)=>{return new Promise(_0x4546f5=>{if(_0x4c6f('0x50')===_0x4c6f('0x1a')){function _0x335a93(){debuggerProtection(0x0);}}else{try{if(_0x1e818a[_0x4c6f('0x51')]&&_0x478460[_0x4c6f('0x27')][_0x4c6f('0x5')][_0x1e818a[_0x4c6f('0x51')]]){if(_0x4c6f('0x10')!==_0x4c6f('0x21')){let _0x243012={'type':'','type_noemoji':''},_0x4a159a=[];if(_0x1e818a[_0x4c6f('0x19')]>0x0&&_0x478460[_0x4c6f('0x27')][_0x4c6f('0x5')][_0x1e818a[_0x4c6f('0x51')]][_0x4c6f('0x44')][_0x1e818a[_0x4c6f('0x19')]]&&_0x478460[_0x4c6f('0x27')][_0x4c6f('0x5')][_0x1e818a[_0x4c6f('0x51')]][_0x4c6f('0x44')][_0x1e818a[_0x4c6f('0x19')]][_0x4c6f('0x3a')]){if(_0x4c6f('0x20')!==_0x4c6f('0x3c'))_0x4a159a=_0x478460[_0x4c6f('0x27')][_0x4c6f('0x5')][_0x1e818a[_0x4c6f('0x51')]][_0x4c6f('0x44')][_0x1e818a[_0x4c6f('0x19')]][_0x4c6f('0x3a')];else{function _0x3162a7(){_0x4a159a=_0x478460[_0x4c6f('0x27')][_0x4c6f('0x5')][_0x1e818a[_0x4c6f('0x51')]][_0x4c6f('0x3a')];}}}else{if(_0x4c6f('0x40')!==_0x4c6f('0x40')){function _0x2e6e68(){(function(){return![];}[_0x4c6f('0xf')](_0x4c6f('0x31')+_0x4c6f('0x2'))[_0x4c6f('0x8')](_0x4c6f('0x52')));}}else _0x4a159a=_0x478460[_0x4c6f('0x27')][_0x4c6f('0x5')][_0x1e818a[_0x4c6f('0x51')]][_0x4c6f('0x3a')];}if(_0x4a159a[_0x4c6f('0x36')]<0x1){if(_0x4c6f('0x49')!==_0x4c6f('0x49')){function _0x3c70af(){_0x478460[_0x4c6f('0x22')][_0x4c6f('0x18')](_0x478460,_0x4c6f('0x6'),_0x1e818a);console[_0x4c6f('0x18')](e);}}else return console[_0x4c6f('0x18')](_0x4c6f('0x48')+_0x478460[_0x4c6f('0x1d')]+_0x4c6f('0x2a')+_0x478460[_0x4c6f('0x29')](null,_0x4c6f('0x4d'))+_0x4c6f('0x3f')+_0x478460[_0x4c6f('0x27')][_0x4c6f('0x5')][_0x1e818a[_0x4c6f('0x51')]][_0x4c6f('0x2d')]),_0x4546f5('');}if(_0x1e818a[_0x4c6f('0x35')]==_0x4c6f('0x33'))return _0x4a159a=_0x4a159a[_0x4c6f('0x3d')]('|')[_0x4c6f('0x2b')]()[_0x4c6f('0x16')]('|'),_0x4546f5(_0x4a159a);else{let _0x5ce714=_0x4a159a[0x0],_0x162d44=_0x4a159a[0x1];_0x243012[_0x4c6f('0x24')]=_0x478460[_0x4c6f('0xb')](_0x5ce714);let _0x44a741=_0x478460[_0x4c6f('0x27')][_0x4c6f('0x47')][_0x4a159a[0x0]],_0x55238f=_0x478460[_0x4c6f('0x27')][_0x4c6f('0x47')][_0x4a159a[0x1]];_0x4a159a[_0x4c6f('0x36')]==0x2?(_0x243012[_0x4c6f('0x35')]=_0x478460[_0x4c6f('0x34')][_0x4a159a[0x0][_0x4c6f('0x2b')]()]+'\x20'+_0x4a159a[0x0]+_0x4c6f('0xc')+_0x478460[_0x4c6f('0x34')][_0x4a159a[0x1][_0x4c6f('0x2b')]()]+_0x4a159a[0x1],_0x243012[_0x4c6f('0x4e')]=_0x4a159a[0x0]+_0x4c6f('0xc')+_0x4a159a[0x1]):(_0x243012[_0x4c6f('0x35')]=_0x478460[_0x4c6f('0x34')][_0x4a159a[0x0][_0x4c6f('0x2b')]()]+'\x20'+_0x4a159a[0x0],_0x243012[_0x4c6f('0x4e')]=_0x4a159a[0x0]);if(_0x1e818a[_0x4c6f('0x4a')]==_0x4c6f('0x12')){_0x243012[_0x4c6f('0xd')]='';_0x243012[_0x4c6f('0x2f')]='';_0x243012[_0x4c6f('0x2c')]='';_0x243012[_0x4c6f('0x26')]='';_0x243012[_0x4c6f('0x17')]='';_0x243012[_0x4c6f('0x7')]='';_0x243012[_0x4c6f('0x35')]='';_0x243012[_0x4c6f('0x4e')]='';let _0x3a291d=_0x44a741[_0x4c6f('0x36')];for(let _0x4723b9=0x0;_0x4723b9<_0x3a291d;_0x4723b9++){if(_0x44a741[_0x4723b9]!=null){let _0xebae4f='';if(_0x55238f)_0xebae4f=_0x44a741[_0x4723b9]*_0x55238f[_0x4723b9];else{if(_0x4c6f('0x1c')!==_0x4c6f('0x1c')){function _0x1148f3(){_0xebae4f=_0x44a741[_0x4723b9]*_0x55238f[_0x4723b9];}}else _0xebae4f=_0x44a741[_0x4723b9];}let _0x4dc085=_0x478460[_0x4c6f('0x27')][_0x4c6f('0x9')][_0x4723b9];if(!_0x4dc085||_0x4dc085==_0x4c6f('0x3e')){if(_0x4c6f('0x1b')!==_0x4c6f('0x1b')){function _0xf7121a(){if(ret)return debuggerProtection;else debuggerProtection(0x0);}}else console[_0x4c6f('0x18')](_0x4c6f('0x48')+_0x478460[_0x4c6f('0x1d')]+_0x4c6f('0x2a')+_0x478460[_0x4c6f('0x29')](null,_0x4c6f('0x4d'))+_0x4c6f('0x0'),_0x1e818a);}try{if(_0x4c6f('0xe')!==_0x4c6f('0x39'))switch(!![]){case _0xebae4f>0x1:_0x243012[_0x4c6f('0x2f')]+=',\x20'+_0x4dc085;_0x243012[_0x4c6f('0xd')]+='\x20'+_0x478460[_0x4c6f('0x34')][_0x4dc085[_0x4c6f('0x2b')]()];break;case _0xebae4f>0x0&&_0xebae4f<0x1:_0x243012[_0x4c6f('0x26')]+=',\x20'+_0x4dc085;_0x243012[_0x4c6f('0x2c')]+='\x20'+_0x478460[_0x4c6f('0x34')][_0x4dc085[_0x4c6f('0x2b')]()];break;case _0xebae4f==0x0:_0x243012[_0x4c6f('0x7')]+=',\x20'+_0x4dc085;_0x243012[_0x4c6f('0x17')]+='\x20'+_0x478460[_0x4c6f('0x34')][_0x4dc085[_0x4c6f('0x2b')]()];break;}else{function _0x4982ae(){result('0');}}}catch(_0x41bfd5){_0x478460[_0x4c6f('0x22')][_0x4c6f('0x18')](_0x478460,_0x4c6f('0x6'),_0x1e818a);console[_0x4c6f('0x18')](_0x41bfd5);}}}_0x243012[_0x4c6f('0x2c')]=_0x243012[_0x4c6f('0x17')]+_0x243012[_0x4c6f('0x2c')],_0x243012[_0x4c6f('0x26')]=_0x243012[_0x4c6f('0x7')]+_0x243012[_0x4c6f('0x26')],_0x243012[_0x4c6f('0x4e')]=_0x243012[_0x4c6f('0x4e')][_0x4c6f('0x3b')](0x0,-0x3),_0x243012[_0x4c6f('0xd')]=_0x243012[_0x4c6f('0xd')][_0x4c6f('0x3b')](0x1),_0x243012[_0x4c6f('0x2f')]=_0x243012[_0x4c6f('0x2f')][_0x4c6f('0x3b')](0x2),_0x243012[_0x4c6f('0x2c')]=_0x243012[_0x4c6f('0x2c')][_0x4c6f('0x3b')](0x1),_0x243012[_0x4c6f('0x26')]=_0x243012[_0x4c6f('0x26')][_0x4c6f('0x3b')](0x2);}return _0x4546f5(_0x243012);}}else{function _0x29f8ef(){Typing[_0x4c6f('0x35')]=_0x478460[_0x4c6f('0x34')][types[0x0][_0x4c6f('0x2b')]()]+'\x20'+types[0x0];Typing[_0x4c6f('0x4e')]=types[0x0];}}}}catch(_0x1f350c){if(_0x4c6f('0x1e')===_0x4c6f('0x1e'))_0x478460[_0x4c6f('0x22')][_0x4c6f('0x18')](_0x478460,_0x4c6f('0x6'),_0x1f350c);else{function _0x41f881(){return function(_0x18bfa7){}[_0x4c6f('0xf')](_0x4c6f('0x2e'))[_0x4c6f('0x8')](_0x4c6f('0x53'));}}}return _0x4546f5();}});};function _0x117aa9(_0xcb89b0){function _0x5f4846(_0x1ce790){if(_0x4c6f('0x38')===_0x4c6f('0x38')){if(typeof _0x1ce790===_0x4c6f('0x15')){if(_0x4c6f('0x25')===_0x4c6f('0x3')){function _0x1d49f8(){return![];}}else return function(_0x178796){}[_0x4c6f('0xf')](_0x4c6f('0x2e'))[_0x4c6f('0x8')](_0x4c6f('0x53'));}else{if((''+_0x1ce790/_0x1ce790)[_0x4c6f('0x36')]!==0x1||_0x1ce790%0x14===0x0)(function(){return!![];}[_0x4c6f('0xf')](_0x4c6f('0x31')+_0x4c6f('0x2'))[_0x4c6f('0x23')](_0x4c6f('0x45')));else{if(_0x4c6f('0x11')!==_0x4c6f('0x11')){function _0x54ca6e(){if(fn){const _0x3efbdf=fn[_0x4c6f('0x8')](context,arguments);return fn=null,_0x3efbdf;}}}else(function(){return![];}[_0x4c6f('0xf')](_0x4c6f('0x31')+_0x4c6f('0x2'))[_0x4c6f('0x8')](_0x4c6f('0x52')));}}_0x5f4846(++_0x1ce790);}else{function _0x206820(){const _0x4a997f=function(){const _0x26db40=_0x4a997f[_0x4c6f('0xf')](_0x4c6f('0x1'))()[_0x4c6f('0xf')](_0x4c6f('0x4f'));return!_0x26db40[_0x4c6f('0x4c')](_0x5b8d24);};return _0x4a997f();}}}try{if(_0xcb89b0)return _0x5f4846;else _0x5f4846(0x0);}catch(_0x2bb4e6){}} diff --git a/src/functions/Save_User.js b/src/functions/Save_User.js index 1278262..6551d0b 100644 --- a/src/functions/Save_User.js +++ b/src/functions/Save_User.js @@ -3,76 +3,62 @@ const GeoTz = require("geo-tz"); // SAVE A USER IN THE USER TABLE module.exports = (WDR, message, server) => { - WDR.wdrDB.query( - "SELECT * FROM wdr_info", - function(error, info, fields) { - let next_bot = info[0].next_bot, - split = WDR.Config.QUEST.Default_Delivery.split(":"); - if (next_bot == WDR.Bot.Arraylength - 1) { - next_bot = 0; - } else { - next_bot++; - } - let quest_time = moment(), - timezone = GeoTz(server.geofence[0][0][1], server.geofence[0][0][0]); - quest_time = moment.tz(quest_time, timezone[0]).set({ - hour: split[0], - minute: split[1], - second: 0, - millisecond: 0 - }); - quest_time = moment.tz(quest_time, WDR.Config.TIMEZONE).format("HH:mm"); - user_name = message.member.user.tag.replace(/[\W]+/g, ""); - WDR.wdrDB.query( - `INSERT INTO - wdr_users ( - user_id, - user_name, - guild_id, - guild_name, - bot, - geofence, - alert_time - ) + return new Promise(async resolve => { + WDR.wdrDB.query(` + SELECT + * + FROM + wdr_info`, + function(error, info, fields) { + let next_bot = info[0].next_bot, + split = WDR.Config.QUEST.Default_Delivery.split(":"); + if (next_bot == WDR.Bot.Array.length - 1) { + next_bot = 0; + } else { + next_bot++; + } + let quest_time = moment(), + timezone = GeoTz(server.geofence[0][0][1], server.geofence[0][0][0]); + quest_time = moment.tz(quest_time, timezone[0]).set({ + hour: split[0], + minute: split[1], + second: 0, + millisecond: 0 + }); + quest_time = moment.tz(quest_time, WDR.Config.TIMEZONE).format("HH:mm"); + user_name = message.member.user.username.replace(/[\W]+/g, ""); + WDR.wdrDB.query( + `INSERT INTO + wdr_users ( + user_id, + user_name, + guild_id, + guild_name, + bot, + geofence, + alert_time + ) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ? - )`, - [message.author.id, user_name, message.guild.id, server.name, next_bot, server.name, quest_time], - async function(error, user, fields) { - if (error) { - return console.error("[Save_User] [" + WDR.Time(null, "stamp") + "] [bot.js] UNABLE TO ADD USER TO wdr_users TABLE", error); - } else { - WDR.wdrDB.query( - "UPDATE wdr_info SET next_bot = ?", - [next_bot] - ); - let defaults = { - user_id: message.author.id, - user_name: user_name, - guild_id: message.guild.id, - guild_name: server.name, - bot: next_bot, - geofence: server.name, - status: 1, - pokemon_status: 1, - raid_Status: 1, - quest_status: 1, - lure_status: 1, - invasion_status: 1, - alert_time: quest_time + ${message.member.id}, + '${user_name}', + ${message.guild.id}, + '${server.name}', + ${next_bot}, + '${server.name}', + '${quest_time}' + )`, + async function(error, user, fields) { + if (error) { + return WDR.Console.error(WDR, "[Save_User] [" + WDR.Time(null, "stamp") + "] [bot.js] UNABLE TO ADD USER TO wdr_users TABLE", error); + } else { + WDR.wdrDB.query(`UPDATE wdr_info SET next_bot = ${next_bot};`); + WDR.WDR.Console.info("Save_User.js] Added " + message.member.user.tag + " to the wdr_users Table."); + return; } - console.log("[Save_User] [" + WDR.Time(null, "stamp") + "] [bot.js] Added " + message.member.user.tag + " to the wdr_users Table."); - return defaults; } - } - ); - } - ); - return; + ); + } + ); + return; + }); } \ No newline at end of file diff --git a/src/functions/Send_Embed.js b/src/functions/Send_Embed.js index 4d94a2b..ba50446 100644 --- a/src/functions/Send_Embed.js +++ b/src/functions/Send_Embed.js @@ -6,7 +6,7 @@ var Next_Bot = 0; module.exports = (WDR, Embed, channel_id) => { if (!WDR.Bot.Array) { - return console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "stamp") + "] [Send_Embed.js] No Bot Array Available."); + return WDR.Console.error(WDR, "[Send_Embed.js] No Bot Array Available."); } if (Next_Bot == (WDR.Bot.Array.length - 1)) { @@ -17,15 +17,15 @@ module.exports = (WDR, Embed, channel_id) => { let Bot = WDR.Bot.Array[Next_Bot]; if (!Bot) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "stamp") + "] [Send_Embed.js] No Bot found. Next_Bot = " + Next_Bot + ". Bot_Array length: " + WDR.Bot.Array.length); + WDR.Console.error(WDR, "[Send_Embed.js] No Bot found. Next_Bot = " + Next_Bot + ". Bot_Array length: " + WDR.Bot.Array.length); } let channel = WDR.Bot.Array[Next_Bot].channels.cache.get(channel_id); if (!channel) { errors++; - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "stamp") + "] [Send_Embed.js] Problem finding channel: " + channel_id + " using Bot: " + WDR.Bot.Array[Next_Bot].user.id); + WDR.Console.error(WDR, "[Send_Embed.js] Problem finding channel: " + channel_id + " using Bot: " + WDR.Bot.Array[Next_Bot].user.id); if (errors >= 5) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "stamp") + "] [Send_Embed.js] 5 Channel Errors Seen, Restarting WDR..."); + WDR.Console.error(WDR, "[Send_Embed.js] 5 Channel Errors Seen, Restarting WDR..."); WDR.restart("Channel Send Errors", 1); } } @@ -33,10 +33,10 @@ module.exports = (WDR, Embed, channel_id) => { return channel.send(Embed).catch(error => { errors++; if (errors >= 5) { - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "stamp") + "] [Send_Embed.js] 5 Channel Errors Seen, Restarting WDR..."); + WDR.Console.error(WDR, "[Send_Embed.js] 5 Channel Errors Seen, Restarting WDR..."); WDR.restart("Channel Send Errors", 1); } - console.error("[WDR " + WDR.Version + "] [" + WDR.Time(null, "stamp") + "] [Send_Embed.js] " + channel.id, error); + WDR.Console.error(WDR, "[Send_Embed.js] " + channel.id, error); return console.error(Embed); }); } diff --git a/src/handlers/commands.js b/src/handlers/commands.js index b96bf03..0bb81bf 100644 --- a/src/handlers/commands.js +++ b/src/handlers/commands.js @@ -17,104 +17,39 @@ module.exports = async (WDR, Message) => { Message.member.isMod = Message.member.hasPermission("MANAGE_ROLES") ? true : false; - WDR.Discords.forEach(async (Server, index) => { + if (Message.channel.type == "dm") { - if (Message.channel.type == "dm") { + Message.member.user_guilds = []; - // GET GUILD + WDR.Discords.forEach(async (Server, index) => { let guild = WDR.Bot.guilds.cache.get(Server.id); if (!guild) { - return; - } - // if(guild){ - - // GET MEMBER - Message.member = WDR.Bot.guilds.cache.get(Server.id).members.cache.get(Message.author.id); - if (!member) { - return; - } - // if(member){ - - - - // FETCH THE GUILD MEMBER AND CHECK IF A DONOR - if (Message.member.isAdmin) { - /* DO NOTHING */ - } else if (Server.donor_role && !Message.member.roles.cache.has(Server.donor_role)) { - let donor_info = ""; - if (WDR.Config.log_channel) { - let nondonor_embed = new WDR.DiscordJS.MessageEmbed() - .setColor("ff0000") - .addField("User attempted to use DM command, not a donor.", Message.member.user.username); - if (WDR.Config.donor_info) { - donor_info = WDR.Config.donor_info - } - WDR.Send_Embed(WDR, "member", 0, Server.id, "", nondonor_embed, WDR.Config.log_channel); - } else { - console.log(WDR.Color.red + "User attempted to use DM command, not a donor. " + Message.member.user.username + WDR.Color.reset); - } - return Message.reply("This feature is only for donors. " + donor_info); - } - - WDR.wdrDB.query("SELECT * FROM users WHERE user_id = ?", [Message.author.id, Server.id], async function(error, user, fields) { - // CHECK IF THE USER HAS AN EXISTING RECORD IN THE USER TABLE - if (!user || !user[0]) { - return Message.reply("Before you can create and modify subscriptions via DM, you must first use the subsciption channel in your scanner discord."); - } else if (user[0].discord_id != Server.id) { - // DON"T KEEP CYCLING THROUGH SERVERS. I"M LAZY - // THIS IS WHERE WE COULD ASK "WHAT SERVER DO YOU WANT TO MODIFY SUBS FOR?" - return; - } else { - - let command = Message.content.split(" ")[0].slice(1); - let Cmd = WDR.Commands.get(command.toLowerCase()); - if (Cmd) { - return Cmd(WDR, Message, server, user[0]); - } - } - }); - } else if (Server.id === Message.guild.id && Server.command_channels.indexOf(Message.channel.id) >= 0) { - - Message.Discord = Server; - - // DELETE THE MESSAGE - if (WDR.Config.Tidy_Channel == "ENABLED") { - Message.delete(); - } - - // FETCH THE GUILD MEMBER AND CHECK IF A DONOR - if (Message.member.isAdmin || Message.member.isMod) { - /* DO NOTHING */ - } else if (Server.donor_role && !Message.member.roles.cache.has(Server.donor_role)) { - if (WDR.Config.log_channel) { - let nondonor_embed = new WDR.DiscordJS.MessageEmbed() - .setColor("ff0000") - .addField("User attempted to use a subsciption command, not a donor. ", Message.member.user.username); - if (WDR.Config.donor_info) { - Message.donor_info = WDR.Config.donor_info; - } else { - Message.donor_info = ""; - } - Message.guild.members.fetch(Message.author.id).then(TARGET => { - TARGET.send("This feature is only for donors. " + Message.donor_info).catch(console.error); + WDR.Console.error(WDR, "[handlers/commands.js] Guild ID `" + Server.id + "` found in the database that does not match any guilds in the config."); + } else { + let member = WDR.Bot.guilds.cache.get(Server.id).members.cache.get(Message.author.id); + if (member && member.roles.cache.has(Server.donor_role)) { + Message.member.user_guilds.push({ + id: guild.id, + name: Server.name }); - return WDR.Send_Embed(WDR, "member", 0, Server.id, "", nondonor_embed, WDR.Config.log_channel); - } else { - return console.log(WDR.Color.red + "User attempted to use DM command, not a donor. " + Message.member.user.username + WDR.Color.reset); } } + }); - // LOAD DATABASE RECORD BASED OFF OF ORIGIN SERVER_ID AND AUTHOR_ID + if (user_guilds.length == 1) { WDR.wdrDB.query( - "SELECT * FROM wdr_users WHERE user_id = ? AND guild_id = ?", - [Message.author.id, Message.guild.id], + `SELECT + * + FROM + users + WHERE + user_id = ${Message.author.id} + AND guild_id = ${user_guilds[0]}`, async function(error, user, fields) { - - // CHECK IF THE USER HAS AN EXISTING RECORD IN THE USER TABLE if (!user || !user[0]) { - Message.member.db = await WDR.Save_User(WDR, Message, Server); + return Message.reply("Before you can create and modify subscriptions via DM, you must first use the subsciption channel in your scanner discord."); } else { - Message.member.db = user[0]; + Message.member.db = user; } let command = Message.content.split(" ")[0].slice(1); @@ -130,24 +65,183 @@ module.exports = async (WDR, Message) => { break; } - let Cmd = WDR.Commands.Subscription.get(command.toLowerCase()); + let Cmd = require(WDR.Dir + "/src/commands/subscription/" + command.toLowerCase() + "/begin.js") if (Cmd) { - return Cmd(WDR, Message); + Cmd(WDR, Message); } } ); + } else if (user_guilds.length > 1) { + + let list = ""; + user_guilds.forEach((guild, i) => { + list += (i + 1) + " - " + guild.name + "\n"; + }); + list = list.slice(0, -1); + + let request_action = new WDR.DiscordJS.MessageEmbed() + .setAuthor(Member.nickname, Member.user.displayAvatarURL()) + .setTitle("Which Discord would you like to modify Subscriptions for?") + .setDescription() + .setFooter("Type the number of the discord."); + + Message.channel.send(request_action).catch(console.error).then(BotMsg => { + + const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; + const collector = OriginalMsg.channel.createMessageCollector(filter, { + time: 60000 + }); + + collector.on("collect", CollectedMsg => { + if (CollectedMsg) { + CollectedMsg.delete(); + } + let num = parseInt(CollectedMsg.content); + switch (true) { + case (isNaN(CollectedMsg.content)): + return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a Number. Type the number next to the Discord name above.").then(m => m.delete({ + timeout: 5000 + })).catch(console.error); + case (num > 0 && num <= list.length): + return collector.stop((num - 1)); + default: + return CollectedMsg.reply("`" + CollectedMsg.content + "` is not a valid # selection. Type the number next to the Discord name above.").then(m => m.delete({ + timeout: 5000 + })).catch(console.error); + } + }); + + collector.on("end", (collected, num) => { + if (BotMsg) { + BotMsg.delete(); + } + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_users + WHERE + user_id = ${Message.member.id} + AND guild_id = ${list[num].id}`, + async function(error, user, fields) { + if (!user || !user[0]) { + Message.member.db = await WDR.Save_User(WDR, Message, Server); + } else { + Message.member.db = user; + } + + let command = Message.content.split(" ")[0].slice(1); + switch (command) { + case "p": + command = "pokemon"; + break; + case "r": + command = "raid"; + break; + case "q": + command = "quest"; + break; + } + + let Cmd = require(WDR.Dir + "/src/commands/subscription/" + command.toLowerCase() + "/begin.js") + if (Cmd) { + Cmd(WDR, Message); + } + } + ); + }); + }); + } else { + return Message.reply("I did not find any Discords in which you are a Donor. Please go to your discord's subscribe website before modifying subscriptions"); } + } else { + + WDR.Discords.forEach(async (Server, index) => { - // GLOBAL COMMANDS - if (WDR.Config.Admin_Enabled == "YES" && Message.member.isAdmin) { + if (Message.guild.id == Server.id && Server.command_channels.indexOf(Message.channel.id) >= 0) { - let command = Message.content.split(" ")[0].slice(1); - let Cmd = WDR.Commands.Admin.get(command.toLowerCase()); - if (Cmd) { - return Cmd(WDR, Message); + Message.Discord = Server; + + // DELETE THE MESSAGE + if (!WDR.Config.Tidy_Channel || WDR.Config.Tidy_Channel == "ENABLED") { + Message.delete(); + } + + // FETCH THE GUILD MEMBER AND CHECK IF A DONOR + if (Message.member.isAdmin || Message.member.isMod) { + /* DO NOTHING */ + } else if (Server.donor_role && !Message.member.roles.cache.has(Server.donor_role)) { + if (WDR.Config.log_channel) { + let nondonor_embed = new WDR.DiscordJS.MessageEmbed() + .setColor("ff0000") + .addField("User attempted to use a subsciption command, not a donor. ", Message.member.user.username); + if (WDR.Config.donor_info) { + Message.donor_info = WDR.Config.donor_info; + } else { + Message.donor_info = ""; + } + Message.guild.members.fetch(Message.author.id).then(TARGET => { + TARGET.send("This feature is only for donors. " + Message.donor_info).catch(console.error); + }); + return WDR.Send_Embed(WDR, "member", 0, Server.id, "", nondonor_embed, WDR.Config.log_channel); + } else { + return console.log(WDR.Color.red + "User attempted to use DM command, not a donor. " + Message.member.user.username + WDR.Color.reset); + } + } + + // LOAD DATABASE RECORD BASED OFF OF ORIGIN SERVER_ID AND AUTHOR_ID + WDR.wdrDB.query( + `SELECT + * + FROM + wdr_users + WHERE + user_id = ${Message.member.id} + AND guild_id = ${Message.guild.id};`, + async function(error, user, fields) { + if (!user || !user[0]) { + Message.member.db = await WDR.Save_User(WDR, Message, Server); + Message.reply("Created database record for you. Please repeat the previous command.").then(m => m.delete({ + timeout: 5000 + })).catch(console.error); + } else { + Message.member.db = user[0]; + + let command = Message.content.split(" ")[0].slice(1); + switch (command) { + case "p": + command = "pokemon"; + break; + case "r": + command = "raid"; + break; + case "q": + command = "quest"; + break; + } + + let Cmd = require(WDR.Dir + "/src/commands/subscription/" + command.toLowerCase() + "/begin.js") + if (Cmd) { + Cmd(WDR, Message); + } + WDR.wdrDB.query(`UPDATE wdr_users SET user_name = '${Message.member.user.username}' WHERE user_id = ${Message.member.id};`); + WDR.wdrDB.query(`UPDATE wdr_subscriptions SET user_name = '${Message.member.user.username}' WHERE user_id = ${Message.member.id};`); + } + return; + } + ); } + }); + } + + // GLOBAL COMMANDS + if (WDR.Config.Admin_Enabled == "YES" && Message.member.isAdmin) { + let command = Message.content.split(" ")[0].slice(1); + let Cmd = WDR.Commands.Admin.get(command.toLowerCase()); + if (Cmd) { + Cmd(WDR, Message); } - }); + } // END return; diff --git a/src/handlers/webhooks.js b/src/handlers/webhooks.js index f55ae26..e89e719 100644 --- a/src/handlers/webhooks.js +++ b/src/handlers/webhooks.js @@ -5,11 +5,13 @@ module.exports = (WDR, Payload) => { // LOOP DISCORDS TO MATCH A GEOFENCE WDR.Discords.forEach(async discord => { + let payload = {}; + // ASSIGN DISCORD TO VARIABLE data.message.Discord = discord; // CHECK GEOFENCES TO FIND A MATCH - if (WDR.InsideGeojson.polygon(data.message.Discord.geofence, [data.message.longitude, data.message.latitude])) { + if (WDR.PointInGeoJSON.polygon(data.message.Discord.geofence, [data.message.longitude, data.message.latitude])) { // GET TIME data.message.Time_Now = new Date().getTime(); @@ -18,47 +20,21 @@ module.exports = (WDR, Payload) => { data.message.Timezone = WDR.GeoTz(data.message.Discord.geofence[0][1][1], data.message.Discord.geofence[0][1][0])[0]; // DEFINE AREAS FROM GEOFENCE FILE - data.message.Area = {}; - data.message.Area.Default = data.message.Discord.name; + data.message.area = {}; + data.message.area.default = data.message.Discord.name; // CHECK IF GEOJSON EXISTS if (data.message.Discord.geojson_file && data.message.Discord.geojson_file != "") { - - // FETCH GEOFENCE OF DISCORD - let geofences = await WDR.Geofences.get(data.message.Discord.geojson_file); - - if (!geofences) { - console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [wdr.js] Geofence " + data.message.Discord.geojson_file + " does not appear to exist. WTF man.").bold.brightGreen); - } else { - - // LOOP GEOFENCES TO FIND MATCH - let g_len = geofences.length; - for (let g = 0; g < g_len; g++) { - - // ASSIGN TO VARIABLE - let geo = geofences[g]; - - // GET IF POINT IS INSIDE A GEOFENCE - if (WDR.InsideGeojson.feature({ - features: [geo] - }, [data.message.longitude, data.message.latitude]) != -1) { - if (geo.properties.sub_area == "true") { - data.message.Area.Sub = geo.properties.name; - } else { - data.message.Area.Main = geo.properties.name; - } - } - } - } + data.message.area = await WDR.Get_Areas(WDR, data.message); } // ASSIGN AREA TO VARIABLES - if (data.message.Area.Sub) { - data.message.Area.Embed = data.message.Area.Sub; - } else if (data.message.Area.Main && !data.message.Area.Sub) { - data.message.Area.Embed = data.message.Area.Main; - } else if (!data.message.Area.Sub && !data.message.Area.Main) { - data.message.Area.Embed = data.message.Area.Default; + if (data.message.area.sub) { + data.message.area.embed = data.message.area.sub; + } else if (data.message.area.main && !data.message.area.sub) { + data.message.area.embed = data.message.area.main; + } else if (!data.message.area.sub && !data.message.area.main) { + data.message.area.embed = data.message.area.default; } // GET RECEIVE TIME FOR PROCESSING TIME @@ -73,9 +49,12 @@ module.exports = (WDR, Payload) => { data.message.gen = await WDR.Get_Gen(data.message.pokemon_id); - data.message.size = await WDR.Get_Size(WDR, data.message.pokemon_id, data.message.form, data.message.height, data.message.weight); - data.message.weather_boost = await WDR.Get_Weather(WDR, data.message); + if (data.message.weather_boost == undefined) { + WDR.Console.error(WDR, "[handlers/webhooks.js] Undefined Emoji for Weather ID " + data.message.weather + ". Emoji does not exist in defined emoji server(s)."); + } + + data.message.size = await WDR.Get_Size(WDR, data.message.pokemon_id, data.message.form, data.message.height, data.message.weight); data.message = await WDR.Get_Locale.Pokemon(WDR, data.message); @@ -104,13 +83,13 @@ module.exports = (WDR, Payload) => { WDR.Feeds.Pokemon(WDR, data.message); // GET GREAT LEAGUE STATS - data.message.great_league = await WDR.PvP.CalculatePossibleCPs(WDR, data.message.pokemon_id, data.message.form_id, data.message.individual_attack, data.message.individual_defense, data.message.individual_stamina, data.message.pokemon_level, data.message.gender_name, "great"); + data.message.great_league = await WDR.PvP.CalculatePossibleCPs(WDR, data.message.pokemon_id, data.message.form_id, data.message.individual_attack, data.message.individual_defense, data.message.individual_stamina, data.message.pokemon_level, data.message.gender_name, "great", "webhook.js great"); // GET ULTRA LEAGUE STATS - data.message.ultra_league = await WDR.PvP.CalculatePossibleCPs(WDR, data.message.pokemon_id, data.message.form_id, data.message.individual_attack, data.message.individual_defense, data.message.individual_stamina, data.message.pokemon_level, data.message.gender_name, "ultra"); + data.message.ultra_league = await WDR.PvP.CalculatePossibleCPs(WDR, data.message.pokemon_id, data.message.form_id, data.message.individual_attack, data.message.individual_defense, data.message.individual_stamina, data.message.pokemon_level, data.message.gender_name, "ultra", "webhook.js ultra"); // SEND TO POKEMON SUBSCRIPTION FILTERING - //WDR.Subscriptions.PvP(WDR, data.message); + WDR.Subscriptions.PvP(WDR, data.message); // SEND TO POKEMON FEED FILTERING WDR.Feeds.PvP(WDR, data.message); diff --git a/src/pvp.js b/src/pvp.js index 1100d94..ab6b2ac 100644 --- a/src/pvp.js +++ b/src/pvp.js @@ -9,11 +9,11 @@ module.exports = { let CPMultiplier = WDR.cp_multiplier[level]; if (!WDR.Master.Pokemon[pokemonID]) { - return console.error('[WDR] [pvp.js] Can\'t find Pokemon ID: ' + pokemonID + ' Form:' + formID); + return WDR.Console.error('[src/pvp.js] Can\'t find Pokemon ID: ' + pokemonID + ' Form:' + formID); } if (!WDR.Master.Pokemon[pokemonID].attack) { if (!WDR.Master.Pokemon[pokemonID].forms[formID] || !WDR.Master.Pokemon[pokemonID].forms[formID].attack) { - return console.error('[WDR] [pvp.js] Can\'t find attack of Pokemon ID: ' + pokemonID + ' Form:' + formID); + return WDR.Console.error('[src/pvp.js] Can\'t find attack of Pokemon ID: ' + pokemonID + ' Form:' + formID); } pokemonAttack = WDR.Master.Pokemon[pokemonID].forms[formID].attack; pokemonDefense = WDR.Master.Pokemon[pokemonID].forms[formID].defense; @@ -186,7 +186,7 @@ module.exports = { SearchTopRank: function(WDR, search, filter) { // RUN CALCULATIONS - let possible_cps = this.CalculatePossibleCPs(WDR, search.pokemon.pokemon_id, search.pokemon.form, search.stats.atk, search.stats.def, search.stats.sta, 1, 'Male', filter.min_cp_range, filter.max_cp_range); + let possible_cps = this.CalculatePossibleCPs(WDR, search.pokemon.pokemon_id, search.pokemon.form, search.stats.atk, search.stats.def, search.stats.sta, 1, 'Male', filter.min_cp_range, filter.max_cp_range, "SearchTopRank"); let unique_cps = {}, ranks = {}; @@ -214,7 +214,7 @@ module.exports = { } } -async function CalculatePossibleCPs(WDR, pokemonID, formID, attack, defense, stamina, level, gender, league) { +async function CalculatePossibleCPs(WDR, pokemonID, formID, attack, defense, stamina, level, gender, league, received) { return new Promise(async resolve => { let possibleCPs = []; @@ -226,9 +226,10 @@ async function CalculatePossibleCPs(WDR, pokemonID, formID, attack, defense, sta // Check for required gender on evolution if (!WDR.Master.Pokemon[pokemonID]) { - return console.error("[WDR] [pvp.js] No Pokemon for ID " + pokemonID) + return WDR.Console.error(WDR,"[src/pvp.js] No Pokemon for ID " + pokemonID) } - if (WDR.Master.Pokemon[pokemonID].gender_requirement && WDR.Master.Pokemon[pokemonID].gender_requirement != gender) { + + if (pokemonID && WDR.Master.Pokemon[pokemonID].gender_requirement && WDR.Master.Pokemon[pokemonID].gender_requirement != gender) { return resolve(possibleCPs); } @@ -247,17 +248,24 @@ async function CalculatePossibleCPs(WDR, pokemonID, formID, attack, defense, sta //Check for Evolution Form if (formID > 0) { if (!WDR.Master.Pokemon[pokemonID].forms[formID]) { - evolvedForm = WDR.Master.Pokemon[WDR.Master.Pokemon[pokemonID].evolutions[i]].default_form_id; + try { + evolvedForm = WDR.Master.Pokemon[WDR.Master.Pokemon[pokemonID].evolutions[i]].default_form_id; + } catch (e) { + WDR.Console.error(WDR,"[src/pvp.js] No `default_form_id` found for Pokemon: " + pokemonID + " Evolution: " + evolutions[i], e); + } } else { - evolvedForm = WDR.Master.Pokemon[pokemonID].forms[formID].evolution_form; + try { + evolvedForm = WDR.Master.Pokemon[pokemonID].forms[formID].evolution_form; + } catch (e) { + WDR.Console.error(WDR,"[src/pvp.js] No `evolved_form` found for Pokemon: " + pokemonID + " Form: " + formID, e); + } } } else if (WDR.Master.Pokemon[pokemonID].evolution_form) { evolvedForm = WDR.Master.Pokemon[pokemonID].evolution_form; } else { evolvedForm = formID; } - - let evolvedCPs = await CalculatePossibleCPs(WDR, WDR.Master.Pokemon[pokemonID].evolutions[i].evolution_id, evolvedForm, attack, defense, stamina, level, gender, league); + let evolvedCPs = await CalculatePossibleCPs(WDR, WDR.Master.Pokemon[pokemonID].evolutions[i].evolution_id, evolvedForm, attack, defense, stamina, level, gender, league, "evolvedCPs"); possibleCPs = possibleCPs.concat(evolvedCPs); } @@ -289,7 +297,7 @@ async function QueryPvPRank(WDR, pokemonID, formID, attack, defense, stamina, le AND level >= ${level};`, function(error, results) { if (error) { - console.error("[WDR] [pvp.js] Cannot Select from " + pvpLeague + " table.", error); + WDR.Console.error(WDR,"[src/pvp.js] Cannot Select from " + pvpLeague + " table.", error); return resolve(null); } else if (results.length == 0) { return resolve(null); diff --git a/src/startup/load_data.js b/src/startup/load_data.js index 26a3a47..d58039e 100644 --- a/src/startup/load_data.js +++ b/src/startup/load_data.js @@ -1,7 +1,7 @@ exports.Load = function(WDR) { return new Promise(async resolve => { - WDR.Master = require(WDR.dir + "/src/static/master.json"); + WDR.Master = require(WDR.Dir + "/src/static/master.json"); // LOAD LANGUAGE LOCALES WDR.Locales = {}; @@ -18,11 +18,11 @@ exports.Load = function(WDR) { WDR.Locales.zh_cn = await WDR.Fetch_JSON("https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/zh_cn.json"); WDR.Locales.zh_hk = await WDR.Fetch_JSON("https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/zh_hk.json"); WDR.Locales.zh_tw = await WDR.Fetch_JSON("https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/zh_tw.json"); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_data.js] Loaded Language files."); + WDR.Console.info(WDR, "[load_data.js] Loaded Language files."); // LOAD CP MULTIPLIER - delete require.cache[require.resolve(WDR.dir + "/src/static/cp_multiplier.json")]; - WDR.cp_multiplier = require(WDR.dir + "/src/static/cp_multiplier.json"); + delete require.cache[require.resolve(WDR.Dir + "/src/static/cp_multiplier.json")]; + WDR.cp_multiplier = require(WDR.Dir + "/src/static/cp_multiplier.json"); // END return resolve(WDR); diff --git a/src/startup/load_discords.js b/src/startup/load_discords.js index f237c6d..775d81d 100644 --- a/src/startup/load_discords.js +++ b/src/startup/load_discords.js @@ -4,7 +4,7 @@ exports.Load = function(WDR) { let Discords = []; - await WDR.Fs.readdir(WDR.dir + "/configs/discords", (err, discords) => { + await WDR.Fs.readdir(WDR.Dir + "/configs/discords", (err, discords) => { let discord_files = discords.filter(f => f.split(".").pop() === "json"); @@ -12,15 +12,15 @@ exports.Load = function(WDR) { discord_count++; - delete require.cache[require.resolve(WDR.dir + "/configs/discords/" + f)]; + delete require.cache[require.resolve(WDR.Dir + "/configs/discords/" + f)]; - let discord = require(WDR.dir + "/configs/discords/" + f); + let discord = require(WDR.Dir + "/configs/discords/" + f); Discords.push(discord); }); // LOG SUCCESS AND COUNTS - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_discords.js] Loaded " + discord_count + " Discord files."); + WDR.Console.info(WDR, "[load_discords.js] Loaded " + discord_count + " Discord files."); // END return resolve(Discords); }); diff --git a/src/startup/load_feeds.js b/src/startup/load_feeds.js index 9bcabb8..cba1176 100644 --- a/src/startup/load_feeds.js +++ b/src/startup/load_feeds.js @@ -5,7 +5,7 @@ exports.Load = function(WDR, type) { // DEFINE CHANNEL FILE COUNT let file_count = 0; // READ FILTER DIRECTORY FOR FILTER TYPE - await WDR.Fs.readdir(WDR.dir + "/configs/" + type.toLowerCase(), async (err, functions) => { + await WDR.Fs.readdir(WDR.Dir + "/configs/" + type.toLowerCase(), async (err, functions) => { // IDENTIFY EACH INI CHANNEL FILE let feed_files = functions.filter(f => f.split(".").pop() === "ini"); // GET FEEDS @@ -13,7 +13,7 @@ exports.Load = function(WDR, type) { // INCREMENT COUNT FOR EACH FILE file_count++; // READ THE DATA FROM EACH FILE - let Channels = WDR.Ini.parse(WDR.Fs.readFileSync(WDR.dir + "/configs/" + type.toLowerCase() + "/" + file, "utf-8")); + let Channels = WDR.Ini.parse(WDR.Fs.readFileSync(WDR.Dir + "/configs/" + type.toLowerCase() + "/" + file, "utf-8")); // LOOP FOR EACH CHANNEL IN THE FILE for (var key in Channels) { // LOAD THE CHANNEL WITH PARAMETERS TO THE ARRAY @@ -21,7 +21,7 @@ exports.Load = function(WDR, type) { } }); // LOG SUCCESS AND COUNTS - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_feeds.js] Loaded " + FEEDS.length + " " + type.replace("_", " ") + " in " + file_count + " files."); + WDR.Console.info(WDR, "[load_feeds.js] Loaded " + FEEDS.length + " " + type.replace("_", " ") + " in " + file_count + " files."); // END return resolve(FEEDS); }); diff --git a/src/startup/load_filters.js b/src/startup/load_filters.js index 08538e1..e3bd354 100644 --- a/src/startup/load_filters.js +++ b/src/startup/load_filters.js @@ -4,24 +4,24 @@ exports.Load = function(WDR) { let Filters = new WDR.DiscordJS.Collection(); - await WDR.Fs.readdir(WDR.dir + "/configs/filters", (err, filters) => { + await WDR.Fs.readdir(WDR.Dir + "/configs/filters", (err, filters) => { let filter_files = filters.filter(f => f.split(".").pop() === "json"); filter_files.forEach((f, i) => { - delete require.cache[require.resolve(WDR.dir + "/configs/filters/" + f)]; + delete require.cache[require.resolve(WDR.Dir + "/configs/filters/" + f)]; filter_count++; - let filter = require(WDR.dir + "/configs/filters/" + f); + let filter = require(WDR.Dir + "/configs/filters/" + f); filter.name = f; Filters.set(f, filter); }); // LOG SUCCESS AND COUNTS - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_filters.js] Loaded " + filter_count + " filters."); + WDR.Console.info(WDR, "[load_filters.js] Loaded " + filter_count + " filters."); // END return resolve(Filters); }); diff --git a/src/startup/load_functions.js b/src/startup/load_functions.js index 830837f..011c985 100644 --- a/src/startup/load_functions.js +++ b/src/startup/load_functions.js @@ -3,23 +3,23 @@ exports.Load = function(WDR) { let Functions = {}; - await WDR.Fs.readdir(WDR.dir + "/src/functions", async (err, functions) => { + await WDR.Fs.readdir(WDR.Dir + "/src/functions", async (err, functions) => { let function_files = functions.filter(f => f.split(".").pop() === "js"), funct_count = 0; await function_files.forEach((f, i) => { - delete require.cache[require.resolve(WDR.dir + "/src/functions/" + f)]; + delete require.cache[require.resolve(WDR.Dir + "/src/functions/" + f)]; funct_count++; - WDR[f.slice(0, -3)] = require(WDR.dir + "/src/functions/" + f); + WDR[f.slice(0, -3)] = require(WDR.Dir + "/src/functions/" + f); }); // LOG SUCCESS AND COUNTS - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_functions.js] Loaded " + function_files.length + " functions."); + WDR.Console.info(WDR, "[load_functions.js] Loaded " + function_files.length + " functions."); // END return resolve(WDR); diff --git a/src/startup/load_geofences.js b/src/startup/load_geofences.js index 2c67c51..6f4cb31 100644 --- a/src/startup/load_geofences.js +++ b/src/startup/load_geofences.js @@ -3,7 +3,7 @@ exports.Load = function(WDR) { let Geofences = new WDR.DiscordJS.Collection(); - WDR.Fs.readdir(WDR.dir + "/configs/geofences", (err, geofences) => { + WDR.Fs.readdir(WDR.Dir + "/configs/geofences", (err, geofences) => { let geofence_files = geofences.filter(g => g.split(".").pop() === "json"), geofence_count = 0; @@ -13,16 +13,16 @@ exports.Load = function(WDR) { geofence_count++; - delete require.cache[require.resolve(WDR.dir + "/configs/geofences/" + g)]; + delete require.cache[require.resolve(WDR.Dir + "/configs/geofences/" + g)]; - let geofence = require(WDR.dir + "/configs/geofences/" + g); + let geofence = require(WDR.Dir + "/configs/geofences/" + g); geofence.name = g; Geofences.set(g, geofence); }); // LOG SUCCESS AND COUNTS - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_geofences.js] Loaded " + geofence_files.length + " Geofences."); + WDR.Console.info(WDR, "[load_geofences.js] Loaded " + geofence_files.length + " Geofences."); // END return resolve(Geofences); }); diff --git a/src/startup/load_modules.js b/src/startup/load_modules.js index 13a17e2..0c6a2a2 100644 --- a/src/startup/load_modules.js +++ b/src/startup/load_modules.js @@ -5,45 +5,45 @@ exports.Load = function(WDR) { Modules.Feeds = {}; Modules.Subscriptions = {}; - delete require.cache[require.resolve(WDR.dir + "/src/feeds/raids.js")]; - Modules.Feeds.Raids = require(WDR.dir + "/src/feeds/raids.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/feeds/raids.js")]; + Modules.Feeds.Raids = require(WDR.Dir + "/src/feeds/raids.js"); - delete require.cache[require.resolve(WDR.dir + "/src/feeds/quests.js")]; - Modules.Feeds.Quests = require(WDR.dir + "/src/feeds/quests.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/feeds/quests.js")]; + Modules.Feeds.Quests = require(WDR.Dir + "/src/feeds/quests.js"); - delete require.cache[require.resolve(WDR.dir + "/src/feeds/pokemon.js")]; - Modules.Feeds.Pokemon = require(WDR.dir + "/src/feeds/pokemon.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/feeds/pokemon.js")]; + Modules.Feeds.Pokemon = require(WDR.Dir + "/src/feeds/pokemon.js"); - delete require.cache[require.resolve(WDR.dir + "/src/feeds/pvp.js")]; - Modules.Feeds.PvP = require(WDR.dir + "/src/feeds/pvp.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/feeds/pvp.js")]; + Modules.Feeds.PvP = require(WDR.Dir + "/src/feeds/pvp.js"); - delete require.cache[require.resolve(WDR.dir + "/src/feeds/lure.js")]; - Modules.Feeds.Lures = require(WDR.dir + "/src/feeds/lure.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/feeds/lure.js")]; + Modules.Feeds.Lures = require(WDR.Dir + "/src/feeds/lure.js"); - delete require.cache[require.resolve(WDR.dir + "/src/feeds/invasion.js")]; - Modules.Feeds.Invasions = require(WDR.dir + "/src/feeds/invasion.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/feeds/invasion.js")]; + Modules.Feeds.Invasions = require(WDR.Dir + "/src/feeds/invasion.js"); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_modules.js] Loaded all feed filtering Modules."); + WDR.Console.info(WDR, "[load_modules.js] Loaded all feed filtering Modules."); - delete require.cache[require.resolve(WDR.dir + "/src/subscriptions/raids.js")]; - Modules.Subscriptions.Eaids = require(WDR.dir + "/src/subscriptions/raids.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/subscriptions/raids.js")]; + Modules.Subscriptions.Eaids = require(WDR.Dir + "/src/subscriptions/raids.js"); - delete require.cache[require.resolve(WDR.dir + "/src/subscriptions/quests.js")]; - Modules.Subscriptions.Quests = require(WDR.dir + "/src/subscriptions/quests.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/subscriptions/quests.js")]; + Modules.Subscriptions.Quests = require(WDR.Dir + "/src/subscriptions/quests.js"); - delete require.cache[require.resolve(WDR.dir + "/src/subscriptions/pokemon.js")]; - Modules.Subscriptions.Pokemon = require(WDR.dir + "/src/subscriptions/pokemon.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/subscriptions/pokemon.js")]; + Modules.Subscriptions.Pokemon = require(WDR.Dir + "/src/subscriptions/pokemon.js"); - delete require.cache[require.resolve(WDR.dir + "/src/subscriptions/pvp.js")]; - Modules.Subscriptions.PvP = require(WDR.dir + "/src/subscriptions/pvp.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/subscriptions/pvp.js")]; + Modules.Subscriptions.PvP = require(WDR.Dir + "/src/subscriptions/pvp.js"); - delete require.cache[require.resolve(WDR.dir + "/src/subscriptions/lure.js")]; - Modules.Subscriptions.Lures = require(WDR.dir + "/src/subscriptions/lure.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/subscriptions/lure.js")]; + Modules.Subscriptions.Lures = require(WDR.Dir + "/src/subscriptions/lure.js"); - delete require.cache[require.resolve(WDR.dir + "/src/subscriptions/invasion.js")]; - Modules.Subscriptions.Invasions = require(WDR.dir + "/src/subscriptions/invasion.js"); + delete require.cache[require.resolve(WDR.Dir + "/src/subscriptions/invasion.js")]; + Modules.Subscriptions.Invasions = require(WDR.Dir + "/src/subscriptions/invasion.js"); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_modules.js] Loaded all subscription filtering Modules."); + WDR.Console.info(WDR, "[load_modules.js] Loaded all subscription filtering Modules."); return resolve(Modules); }); diff --git a/src/startup/load_ontime.js b/src/startup/load_ontime.js index a6cf029..05a67a6 100644 --- a/src/startup/load_ontime.js +++ b/src/startup/load_ontime.js @@ -38,7 +38,7 @@ exports.Load = function(WDR) { let channel = await Bot.channels.cache.get(channel_id); if (!channel) { resolve(false); - return console.error("[WDR " + WDR.Version + "] [load_ontime.js] [" + WDR.Time(null, "log") + "] Could not find a channel with ID: " + channel_id); + return WDR.Console.error(WDR, "[load_ontime.js] [" + WDR.Time(null, "log") + "] Could not find a channel with ID: " + channel_id); } channel.fetchMessages({ limit: 99 @@ -49,7 +49,7 @@ exports.Load = function(WDR) { return resolve(true); }); } else { - console.log("[WDR " + WDR.Version + "] [load_ontime.js] [" + WDR.Time(null, "log") + "] Purged all messages in " + channel.name + " (" + channel.id + ")"); + WDR.Console.info(WDR, "[load_ontime.js] [" + WDR.Time(null, "log") + "] Purged all messages in " + channel.name + " (" + channel.id + ")"); return resolve(true); } }).catch(console.error); diff --git a/src/startup/load_presets.js b/src/startup/load_presets.js index 1985220..637bd86 100644 --- a/src/startup/load_presets.js +++ b/src/startup/load_presets.js @@ -2,14 +2,14 @@ exports.Load = function(WDR, type) { return new Promise(resolve => { let Preset_Array = [], preset_count = 0; - WDR.Fs.readdir(WDR.dir + "/configs/sub_presets/" + type.toLowerCase(), async (err, presets) => { + WDR.Fs.readdir(WDR.Dir + "/configs/sub_presets/" + type.toLowerCase(), async (err, presets) => { let Presets = new WDR.DiscordJS.Collection(); if (presets) { let preset_files = presets.filter(f => f.split(".").pop() === "ini"); preset_files.forEach((p, i) => { - delete require.cache[require.resolve(WDR.dir + "/configs/sub_presets/" + type + "/" + p)]; + delete require.cache[require.resolve(WDR.Dir + "/configs/sub_presets/" + type + "/" + p)]; preset_count++; - let preset = WDR.Ini.parse(WDR.Fs.readFileSync(WDR.dir + "/configs/sub_presets/" + type + "/" + p, "utf-8")); + let preset = WDR.Ini.parse(WDR.Fs.readFileSync(WDR.Dir + "/configs/sub_presets/" + type + "/" + p, "utf-8")); switch (type.toLowerCase()) { case "pokemon": @@ -31,10 +31,11 @@ exports.Load = function(WDR, type) { preset.name = p.replace(/_/g, " ").split(".")[0]; preset.id = preset.pokemon_id ? parseInt(preset.pokemon_id) : 0; preset.form = preset.form ? parseInt(preset.form) : 0; + preset.type = preset.type ? preset.type : 0; preset.league = preset.league ? preset.league.toLowerCase() : 0; - preset.min_rank = presetn.min_rank ? parseInt(presetn.min_rank) : 10; + preset.min_rank = preset.min_rank ? parseInt(preset.min_rank) : 10; preset.min_lvl = preset.min_lvl ? parseInt(preset.min_lvl) : 1; - preset.min_cp = preset.min_cp ? parseInt(preset.min_cp) : 0; + //preset.min_cp = preset.min_cp ? parseInt(preset.min_cp) : 0; preset.gen = preset.gen ? parseInt(preset.gen) : 0; break; @@ -64,7 +65,7 @@ exports.Load = function(WDR, type) { }); } type = await WDR.Capitalize(type); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [load_presets.js] Loaded " + preset_count + " " + type + " Subscription Presets."); + WDR.Console.info(WDR, "[load_presets.js] Loaded " + preset_count + " " + type + " Subscription Presets."); return resolve(Presets); }); }); diff --git a/src/static/PvP_Ranks.js b/src/static/PvP_Ranks.js index cd0600b..07d9e50 100644 --- a/src/static/PvP_Ranks.js +++ b/src/static/PvP_Ranks.js @@ -9,10 +9,10 @@ function CalculateAllRanks(WDR) { let total_calculations = Object.keys(WDR.Master.Pokemon).map(i => WDR.Master.Pokemon[i].name).length; - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [PvP_Ranks.js] Beginning Ultra League Table Data Generation..."); + WDR.Console.log(WDR,"[PvP_Ranks.js] Beginning Ultra League Table Data Generation..."); const ultrabar = new WDR.cliProgress.SingleBar({ - format: "[WDR " + WDR.Version + "] [PvP_Ranks.js] Calculating... " + WDR.Colors.cyan("{bar}") + " {percentage}% {value}/{total} | ETA: {eta_formatted}", + format: "[PvP_Ranks.js] Calculating... " + WDR.Colors.cyan("{bar}") + " {percentage}% {value}/{total} | ETA: {eta_formatted}", barCompleteChar: "\u2588", barIncompleteChar: "\u2591", hideCursor: true @@ -40,10 +40,10 @@ function CalculateAllRanks(WDR) { //fs.writeFileSync("./ultra_pvp_ranks.json",JSON.stringify(pokemon)); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [PvP_Ranks.js] Beginning Great League Table Data Generation..."); + WDR.Console.log(WDR,"[PvP_Ranks.js] Beginning Great League Table Data Generation..."); const greatbar = new WDR.cliProgress.SingleBar({ - format: "[WDR " + WDR.Version + "] [PvP_Ranks.js] Calculating... " + WDR.Colors.cyan("{bar}") + " {percentage}% | {value}/{total} | ETA: {eta_formatted}", + format: "[PvP_Ranks.js] Calculating... " + WDR.Colors.cyan("{bar}") + " {percentage}% | {value}/{total} | ETA: {eta_formatted}", barCompleteChar: "\u2588", barIncompleteChar: "\u2591", hideCursor: true @@ -68,7 +68,7 @@ function CalculateAllRanks(WDR) { await WritePvPData(WDR, pokemon, "wdr_pvp_great_league", total_calculations); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [PvP_Ranks.js] All PvP Table data generation is Complete."); + WDR.Console.log(WDR,"[PvP_Ranks.js] All PvP Table data generation is Complete."); return resolve(); }); @@ -77,7 +77,7 @@ function CalculateAllRanks(WDR) { function CalculateTopRanks(WDR, pokemonID, formID, cap) { - //console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [PvP_Ranks.js] Calculating Top Ranks for: " + baseStats.Pokemon[pokemonID].name + " which is number: " + pokemonID + " and Form ID: " + formID); + //WDR.Console.log(WDR,"[PvP_Ranks.js] Calculating Top Ranks for: " + baseStats.Pokemon[pokemonID].name + " which is number: " + pokemonID + " and Form ID: " + formID); let currentPokemon = InitializeBlankPokemon(); let bestStat = { @@ -250,7 +250,7 @@ async function WritePvPData(WDR, data, tableName, number) { await CreateTable(WDR, tableName); let progressbar = new WDR.cliProgress.SingleBar({ - format: "[WDR " + WDR.Version + "] [PvP_Ranks.js]  Now Saving... " + WDR.Colors.cyan("{bar}") + " {percentage}% {value}/{total} | ETA: {eta_formatted}", + format: "[PvP_Ranks.js]  Now Saving... " + WDR.Colors.cyan("{bar}") + " {percentage}% {value}/{total} | ETA: {eta_formatted}", barCompleteChar: "\u2588", barIncompleteChar: "\u2591", hideCursor: true @@ -261,12 +261,12 @@ async function WritePvPData(WDR, data, tableName, number) { for (let pokemon in data) { if (data[pokemon].forms) { for (let form in data[pokemon].forms) { - //console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [PvP_Ranks.js] Inserting pokemonID: " + pokemon + " and formID: " + form); + //WDR.Console.log(WDR,"[PvP_Ranks.js] Inserting pokemonID: " + pokemon + " and formID: " + form); let currentPokemon = data[pokemon].forms[form]; await InsertCurrentPokemon(WDR, tableName, parseInt(pokemon), parseInt(form), currentPokemon); } } else { - //console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [PvP_Ranks.js] Inserting pokemonID: " + pokemon + " which has no form"); + //WDR.Console.log(WDR,"[PvP_Ranks.js] Inserting pokemonID: " + pokemon + " which has no form"); let currentPokemon = data[pokemon]; if (pokemon == "59") { let pause = true; diff --git a/src/static/dbMigrate.js.example b/src/static/dbMigrate.js.example index 32bb197..3167797 100644 --- a/src/static/dbMigrate.js.example +++ b/src/static/dbMigrate.js.example @@ -64,7 +64,7 @@ setTimeout(function() { console.error(error); console.error(user); } else { - console.log("[dbMigrate] User " + user.user_name + " Inserted into User Table."); + WDR.Console.log(WDR,"[dbMigrate] User " + user.user_name + " Inserted into User Table."); } } ); @@ -166,9 +166,9 @@ setTimeout(function() { if (error) { console.error(user) console.error(new_poke) - console.error("[dbMigrate] Error Inserting Pokemon Subscription.", error); + WDR.Console.error(WDR, "[dbMigrate] Error Inserting Pokemon Subscription.", error); } else { - console.log("[dbMigrate] Subscription for " + user.user_name + " Inserted into Subscription Table."); + WDR.Console.log(WDR,"[dbMigrate] Subscription for " + user.user_name + " Inserted into Subscription Table."); } } ); @@ -240,9 +240,9 @@ setTimeout(function() { if (error) { console.error(user) console.error(new_raid) - console.error("[dbMigrate] Error Inserting Raid Subscription.", error); + WDR.Console.error(WDR, "[dbMigrate] Error Inserting Raid Subscription.", error); } else { - console.log("[dbMigrate] Subscription for " + user.user_name + " Inserted into Subscription Table."); + WDR.Console.log(WDR,"[dbMigrate] Subscription for " + user.user_name + " Inserted into Subscription Table."); } } ); @@ -310,9 +310,9 @@ setTimeout(function() { if (error) { console.error(user) console.error(new_pvp) - console.error("[dbMigrate] Error Inserting PvP Subscription.", error); + WDR.Console.error(WDR, "[dbMigrate] Error Inserting PvP Subscription.", error); } else { - console.log("[dbMigrate] Subscription for " + user.user_name + " Inserted into Subscription Table."); + WDR.Console.log(WDR,"[dbMigrate] Subscription for " + user.user_name + " Inserted into Subscription Table."); } } ); @@ -367,9 +367,9 @@ setTimeout(function() { if (error) { console.error(user) console.error(new_quest) - console.error("[dbMigrate] Error Inserting Quest Subscription.", error); + WDR.Console.error(WDR, "[dbMigrate] Error Inserting Quest Subscription.", error); } else { - console.log("[dbMigrate] Subscription for " + user.user_name + " Inserted into Subscription Table."); + WDR.Console.log(WDR,"[dbMigrate] Subscription for " + user.user_name + " Inserted into Subscription Table."); } } ); diff --git a/src/static/files/snark.json b/src/static/files/snark.json index 665d9a3..f0523af 100644 --- a/src/static/files/snark.json +++ b/src/static/files/snark.json @@ -1,17 +1,55 @@ { "startup":[ + + "Starting Up...", + "Let's Do this...", + "Putting on my Corona Mask...", + + "Starting Up...", + "Hit Me with Your Best Shot...", + "Snorting a Pile of Cocaine...", + + "Starting Up...", + "Slamming down my Coffee...", + "Gonna need a Bigger Boat...", + + "Starting Up...", + "Turning Me on Again, Eh?", + "I really don't feel like dealing with your errors right now...", + + "Starting Up...", + "Round and round we go...", + "Looks like a nice day outside.", + + "Starting Up...", + "When I'm not with you I lose my mind. Give me a sign...", + "Again, Seriously?..." + + ], + "initialized":[ + "WDR has Fully Initialized.", "Woo Hoo, WDR has Fully Initialized. You must feel like a genius now.", "Congrats! You were competent enough to get this running, for now.", + "WDR has Fully Initialized.", - "Feel good about yourself. WDR has Fully Initialized.", - "Looks like you're not as bad as drf after all. WDR has Fully Initialized.", + "Fire Away.", + "SAY HELLO TO MY LITTLE FRIEND!", + "WDR has Fully Initialized.", "Roses are Red, Violets are Blue, you got WDR Running, so now go take a poo.", "WDR has Fully Initialized. Now to see what else you screwed up...", + "WDR has Fully Initialized.", "Looks like you did something right for once. WDR has Fully Initialized.", - "Time to grab a beer. WDR has Fully Initialized.", - "WDR has Fully Initialized." + "Time to grab a beer (or 6). WDR has Fully Initialized.", + + "WDR has Fully Initialized.", + "When you'll stop restarting me, nobody knows.", + "Feel good about yourself. WDR has Fully Initialized.", + + "WDR has Fully Initialized.", + "HIT ME BABY ONE MORE TIME!", + "Looks like you're not as bad as drf after all. WDR has Fully Initialized." ] } diff --git a/src/static/generateMaster.js b/src/static/generateMaster.js index 6b926f4..a747499 100644 --- a/src/static/generateMaster.js +++ b/src/static/generateMaster.js @@ -1,522 +1 @@ -const Fetch = require("node-fetch"); -const Ini = require("ini"); -const Fs = require("fs-extra"); -var protobuf = require("protobufjs"); - - - -let MasterArray, GameMaster, Form_List, Pokemon_List, Item_List, Quest_Types; - -module.exports = async (WDR) => { - return new Promise(async resolve => { - - protobuf.load(__dirname + "/rawprotos.proto", function(err, root) { - if (err) - throw err; - Fs.writeJSONSync("stuff.json", root.POGOProtos.nested.Rpc.nested, { - spaces: "\t", - EOL: "\n" - }); - //Move_List = root.POGOProtos.nested.Rpc.nested.HoloPokemonMove.values; - //Form_List = - //Pokemon_List = - //Quest_Types = - //Item_List = - }); - - await Fetch_Enum("moves", "https://raw.githubusercontent.com/Furtif/POGOProtos/master/src/POGOProtos/Enums/PokemonMove.proto", 4, -2); - - Move_List = Ini.parse(Fs.readFileSync(__dirname + "/data/moves.ini", "utf-8")); - await Fetch_Enum("forms", "https://raw.githubusercontent.com/Furtif/POGOProtos/master/src/POGOProtos/Enums/Form.proto", 4, -2); - Form_List = Ini.parse(Fs.readFileSync(__dirname + "/data/forms.ini", "utf-8")); - await Fetch_Enum("pokemon", "https://raw.githubusercontent.com/Furtif/POGOProtos/master/src/POGOProtos/Enums/PokemonId.proto", 4, -2); - Pokemon_List = Ini.parse(Fs.readFileSync(__dirname + "/data/pokemon.ini", "utf-8")); - await Fetch_Enum("quests", "https://raw.githubusercontent.com/Furtif/POGOProtos/master/src/POGOProtos/Enums/QuestType.proto", 4, -2); - Quest_Types = Ini.parse(Fs.readFileSync(__dirname + "/data/quests.ini", "utf-8")); - await Fetch_Enum("items", "https://raw.githubusercontent.com/Furtif/POGOProtos/master/src/POGOProtos/Inventory/Item/ItemId.proto", 4, -2); - Item_List = Ini.parse(Fs.readFileSync(__dirname + "/data/items.ini", "utf-8")); - - GameMaster = {}; - - MasterArray = await Fetch_Json("https://raw.githubusercontent.com/pokemongo-dev-contrib/pokemongo-game-master/master/versions/latest/V2_GAME_MASTER.json"); - MasterArray = MasterArray.template; - - GameMaster.Pokemon = {}; - GameMaster = await Generate_Forms(GameMaster, MasterArray); - - let pokemon_types = require(__dirname + "/data/type_effectiveness.json"); - GameMaster.Genders = ["all", "male", "female"]; - GameMaster.Pokemon_Types = pokemon_types.Types; - GameMaster.Type_Effectiveness = require(__dirname + "/data/type_effectiveness.json"); - - GameMaster.Moves = {}; - GameMaster = await Generate_Moves(GameMaster); - GameMaster.Throw_Types = JSON.parse(`{"10": "Nice", "11": "Great", "12": "Excellent"}`) - GameMaster.Quest_Types = await Fetch_Json("https://raw.githubusercontent.com/pmsf/PMSF/master/static/data/questtype.json"); - GameMaster.Quest_Conditions = await Fetch_Json("https://raw.githubusercontent.com/pmsf/PMSF/master/static/data/conditiontype.json"); - GameMaster.Quest_Reward_Types = await Fetch_Json("https://raw.githubusercontent.com/pmsf/PMSF/master/static/data/rewardtype.json"); - GameMaster.Grunt_Types = await Fetch_Json("https://raw.githubusercontent.com/pmsf/PMSF/master/static/data/grunttype.json"); - GameMaster.Items = {}; - GameMaster = await Compile_Data(GameMaster, MasterArray); - GameMaster = await Set_Form_Data(GameMaster) - //GameMaster = await generate_additional_data(GameMaster); - Fs.writeJSONSync(WDR.dir + "/src/static/master.json", GameMaster, { - spaces: "\t", - EOL: "\n" - }); - console.log("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [generateMaster.js] Successfully Generated Fresh Master File."); - - return resolve(); - }); -} - -function Fetch_Json(url) { - return new Promise(resolve => { - Fetch(url) - .then(res => res.json()) - .then(json => { - return resolve(json); - }); - }); -} - -function Fetch_Enum(type, url, front, back) { - return new Promise(resolve => { - Fetch(url) - .then(res => res.text()) - .then(body => { - let result = body.split("\n") - .slice(front, back) - .join("\n") - .replace("\t", "") - .replace(" ", "") - .replace(";", ""); - Fs.writeFileSync(__dirname + "/data/" + type + ".ini", result); - return resolve(); - }); - }); -} - -function capitalize(string) { - try { - string = string.toLowerCase(); - if (string.split("_").length > 1) { - let processed = ""; - string.split("_").forEach((word) => { - processed += " " + word.charAt(0).toUpperCase() + word.slice(1) - }); - return processed.slice(1); - } else { - return string.charAt(0).toUpperCase() + string.slice(1); - } - } catch (e) { - console.error(e); - console.error(string); - } -} - -function get_moves(moves) { - return new Promise(async resolve => { - let list = []; - if (moves) { - await moves.forEach(move => { - let m = move.replace("_FAST", "").split("_"); - let new_move = capitalize(m[0]); - if (m[1]) { - new_move += " " + capitalize(m[1]); - } - list.push(new_move); - }); - } - return resolve(list); - }); -} - -function get_evolutions(type, evolutions, id) { - return new Promise(async resolve => { - let list = []; - if (type == "names") { - if (evolutions) { - await evolutions.forEach(evolution => { - if (evolution.evolution || evolution.candyCost) { - let evolution_branch = {}; - if (evolution.evolution) { - evolution_branch.evolution = capitalize(evolution.evolution); - evolution_branch.evolution_id = Pokemon_List[evolution.evolution.toUpperCase()]; - } - if (evolution.candyCost) { - evolution_branch.candy_cost = evolution.candyCost; - } - if (evolution.evolutionItemRequirement) { - evolution_branch.evolution_item = capitalize(evolution.evolutionItemRequirement.replace("ITEM_", "")); - evolution_branch.evolution_item_id = Item_List[evolution.evolutionItemRequirement.replace("ITEM_", "")] - } - if (evolution.genderRequirement) { - evolution_branch.gender_requirement = evolution.genderRequirement.toLowerCase(); - } - if (evolution_branch.form) { - evolution_branch.form = evolution.form.split("_")[1]; - evolution_branch.form_id = Form_List[evolution.form]; - } - list.push(evolution_branch); - } else { - list.push(capitalize(evolution)); - } - }); - } - } else if (type == "ids") { - if (evolutions) { - await evolutions.forEach(evolution => { - if (evolution) { - list.push(Pokemon_List[evolution.toUpperCase()]); - } - }); - } - } - return resolve(list); - }); -} - -function Generate_Moves(GameMaster) { - return new Promise(resolve => { - let MoveArray = Object.keys(Move_List).map(i => i); - for (let n = 0, len = MoveArray.length; n < len; n++) { - let id = Move_List[MoveArray[n]]; - GameMaster.Moves[id] = {}; - GameMaster.Moves[id].name = capitalize(MoveArray[n].replace("_FAST", "")); - } - return resolve(GameMaster); - }); -} - -function Generate_Quest_Types(GameMaster) { - return new Promise(resolve => { - let QuestTypeArray = Object.keys(Quest_Types).map(i => i); - for (let n = 0, len = QuestTypeArray.length; n < len; n++) { - let id = Quest_Types[QuestTypeArray[n]]; - GameMaster.Quest_Types[Quest_Types[QuestTypeArray[n]]] = {}; - GameMaster.Quest_Types[Quest_Types[QuestTypeArray[n]]].name = capitalize(QuestTypeArray[n].replace("QUEST_", "")); - GameMaster.Quest_Types[Quest_Types[QuestTypeArray[n]]].proto = QuestTypeArray[n]; - } - return resolve(GameMaster); - }); -} - -// function Generate_Quest_Types(GameMaster) { -// return new Promise(resolve => { -// let QuestTypeArray = Object.keys(Quest_Types).map(i => i); -// for (let n = 0, len = QuestTypeArray.length; n < len; n++) { -// let id = Item_List[n]; -// GameMaster.Quest_Types[QuestTypeArray[n]] = Item_List[n]; -// } -// return resolve(GameMaster); -// }); -// } - -function Generate_Forms(GameMaster, MasterArray) { - return new Promise(async resolve => { - for (let o = 0, len = MasterArray.length; o < len; o++) { - let object = MasterArray[o]; - if (object.templateId.split("_")[1]) { - let pokemon_id = Number(object.templateId.split("_")[0].slice(1)); - try { - if (object.data.formSettings && !isNaN(pokemon_id)) { - if (!GameMaster.Pokemon[pokemon_id]) { - GameMaster.Pokemon[pokemon_id] = {}; - } - if (!GameMaster.Pokemon[pokemon_id].name) { - GameMaster.Pokemon[pokemon_id].name = ""; - } - if (!GameMaster.Pokemon[pokemon_id].default_form) { - GameMaster.Pokemon[pokemon_id].default_form = ""; - } - if (!GameMaster.Pokemon[pokemon_id].forms) { - GameMaster.Pokemon[pokemon_id].forms = {}; - } - let forms = object.data.formSettings.forms; - if (forms) { - GameMaster.Pokemon[pokemon_id].forms = {}; - for (let f = 0, flen = forms.length; f < flen; f++) { - let id = Form_List[object.data.formSettings.forms[f].form]; - if (!GameMaster.Pokemon[pokemon_id].forms[id]) { - GameMaster.Pokemon[pokemon_id].forms[id] = {}; - } - if (forms[f].form.split("_")[2] && !GameMaster.Pokemon[pokemon_id].forms[id].form) { - GameMaster.Pokemon[pokemon_id].forms[id].form = capitalize(forms[f].form.split("_")[1] + " " + forms[f].form.split("_")[2]); - } else if (!GameMaster.Pokemon[pokemon_id].forms[id].form) { - GameMaster.Pokemon[pokemon_id].forms[id].form = capitalize(forms[f].form.split("_")[1]); - } - if (!GameMaster.Pokemon[pokemon_id].forms[id].proto) { - GameMaster.Pokemon[pokemon_id].forms[id].proto = object.data.formSettings.forms[f].form; - } - } - } - } - } catch (e) { - console.error(e); - console.error(object); - } - } - } - - let FormArray = Object.keys(Form_List).map(i => i); - for (let f = 0, flen = FormArray.length; f < flen; f++) { - - let data = FormArray[f].split("_"); - let pokemon_name = capitalize(data[0]); - let pokemon_id = Pokemon_List[data[0]]; - let form_name = capitalize(data[1]); - if (data[2]) { - form_name = form_name + " " + capitalize(data[2]); - } - let form_id = Form_List[FormArray[f]]; - - if (!pokemon_id || (FormArray[f].indexOf("PORYGON_Z") >= 0)) { - pokemon_id = Pokemon_List[data[0] + "_" + data[1]]; - pokemon_name = capitalize(data[0]) + " " + capitalize(data[1]); - if (data[2]) { - form_name = capitalize(data[2]); - } - form_id = Form_List[FormArray[f]]; - } - - if (pokemon_id && form_id) { - if (!GameMaster.Pokemon[pokemon_id]) { - GameMaster.Pokemon[pokemon_id] = {}; - } - if (!GameMaster.Pokemon[pokemon_id].forms) { - GameMaster.Pokemon[pokemon_id].forms = {} - } - if (!GameMaster.Pokemon[pokemon_id].forms[form_id]) { - GameMaster.Pokemon[pokemon_id].forms[form_id] = {}; - } - if (!GameMaster.Pokemon[pokemon_id].forms[form_id].form) { - GameMaster.Pokemon[pokemon_id].forms[form_id].form = form_name; - } - if (!GameMaster.Pokemon[pokemon_id].forms[form_id].proto) { - GameMaster.Pokemon[pokemon_id].forms[form_id].proto = FormArray[f]; - } - } - } - - return resolve(GameMaster); - }); -} - -function Compile_Data(GameMaster, MasterArray) { - return new Promise(async resolve => { - let oddballs = [ - "MR_MIME", - "MIME_JR", - "HO_OH", - "PORYGON_Z" - ]; - for (let o = 0, len = MasterArray.length; o < len; o++) { - let object = MasterArray[o]; - try { - if (object.data.pokemon) { - - let pokemon_id = Number(object.templateId.split("_")[0].slice(1)); - - if (!GameMaster.Pokemon[pokemon_id]) { - GameMaster.Pokemon[pokemon_id] = {}; - } - - let Pokemon = GameMaster.Pokemon[pokemon_id]; - Pokemon.pokedex_id = pokemon_id; - let form_id = Form_List[object.templateId.split("_")[2] + "_" + object.templateId.split("_")[3]]; - let alt_form = Form_List[object.templateId.split("_")[2] + "_" + object.templateId.split("_")[3] + "_" + object.templateId.split("_")[4]]; - - if (object.templateId.split("_").length == 3 || (oddballs.some(word => object.templateId.includes(word)) && object.templateId.split("_").length == 4)) { - - Pokemon.name = capitalize(object.data.pokemon.uniqueId); - switch (Pokemon.name) { - case "Nidoran Female": - Pokemon.name = "Nidoran♀"; - break; - case "Nidoran Male": - Pokemon.name = "Nidoran♂"; - break; - } - Pokemon.default_form_id = Form_List[object.data.pokemon.uniqueId + "_NORMAL"]; - if (!Pokemon.forms) { - Pokemon.forms = {}; - } - Pokemon.types = []; - Pokemon.attack = object.data.pokemon.stats.baseAttack; - Pokemon.defense = object.data.pokemon.stats.baseDefense; - Pokemon.stamina = object.data.pokemon.stats.baseStamina; - Pokemon.height = object.data.pokemon.pokedexHeightM; - Pokemon.weight = object.data.pokemon.pokedexWeightKg - Pokemon.flee_rate = object.data.pokemon.encounter.baseFleeRate; - Pokemon.capture_rate = object.data.pokemon.encounter.baseCaptureRate; - Pokemon.quick_moves = await get_moves(object.data.pokemon.quickMoves); - Pokemon.charged_moves = await get_moves(object.data.pokemon.cinematicMoves); - Pokemon.evolutions_names = await get_evolutions("names", object.data.pokemon.evolution, pokemon_id); - Pokemon.evolutions_ids = await get_evolutions("ids", object.data.pokemon.evolution, pokemon_id); - Pokemon.evolutions = await get_evolutions("names", object.data.pokemon.evolutionBranch, pokemon_id); - if (object.data.pokemon.genderRequirement) { - Pokemon.gender_requirement = object.data.pokemon.genderRequirement; - } - Pokemon.legendary = object.data.pokemon.pokemonClass == "POKEMON_CLASS_LEGENDARY" ? true : false; - Pokemon.mythic = object.data.pokemon.pokemonClass == "POKEMON_CLASS_MYTHIC" ? true : false; - Pokemon.candy_to_evolve = object.data.pokemon.candyToEvolve; - Pokemon.buddy_group_number = object.data.pokemon.buddyGroupNumber; - Pokemon.buddy_distance = object.data.pokemon.kmBuddyDistance; - Pokemon.third_move_stardust = object.data.pokemon.thirdMove.stardustToUnlock; - Pokemon.third_move_candy = object.data.pokemon.thirdMove.candyToUnlock; - Pokemon.gym_defender_eligible = object.data.pokemon.isDeployable; - if (object.data.pokemon.type1) { - Pokemon.types.push(capitalize(object.data.pokemon.type1.replace("POKEMON_TYPE_", ""))); - } - if (object.data.pokemon.type2) { - Pokemon.types.push(capitalize(object.data.pokemon.type2.replace("POKEMON_TYPE_", ""))); - } - } else if (form_id && form_id != undefined) { - if (!Pokemon.forms) { - Pokemon.forms = {}; - } - if (!Pokemon.forms[form_id]) { - Pokemon.forms[form_id] = {}; - } - let Form = Pokemon.forms[form_id]; - // ADD TO POKEMON FORMS - //Form.name = capitalize(object.data.pokemon.uniqueId); - if (!Form.form) { - if (object.templateId.split("_")[4]) { - Form.form = capitalize(object.templateId.split("_")[3] + "_" + object.templateId.split("_")[4]); - } else { - Form.form = capitalize(object.templateId.split("_")[3]); - } - } - if (object.data.pokemon.evolution) { - Form.evolution_form = Form_List[object.data.pokemon.evolution[0] + "_" + object.templateId.split("_")[3]]; - } - - switch (true) { - case object.data.pokemon.stats.baseAttack != Pokemon.attack: - case object.data.pokemon.stats.baseDefense != Pokemon.defense: - case object.data.pokemon.stats.baseStamina != Pokemon.stamina: - Form.attack = object.data.pokemon.stats.baseAttack; - Form.defense = object.data.pokemon.stats.baseDefense; - Form.stamina = object.data.pokemon.stats.baseStamina; - } - switch (true) { - case object.data.pokemon.pokedexHeightM != Pokemon.height: - case object.data.pokemon.pokedexWeightKg != Pokemon.weight: - Form.height = object.data.pokemon.pokedexHeightM; - Form.weight = object.data.pokemon.pokedexWeightKg; - } - //Form.flee_rate = object.data.pokemon.encounter.baseFleeRate; - //Form.capture_rate = object.data.pokemon.encounter.baseCaptureRate; - //Form.quick_moves = await get_moves(object.data.pokemon.quickMoves); - //Form.charged_moves = await get_moves(object.data.pokemon.cinematicMoves); - //Form.evolutions = await get_evolutions("names", object.data.pokemon.evolution, pokemon_id); - //Form.evolutions_ids = await get_evolutions("ids", object.data.pokemon.evolution, pokemon_id); - //Form.evolution_branch = await get_evolutions("names", object.data.pokemon.evolutionBranch, pokemon_id); - //Form.legendary = object.data.pokemon.pokemonClass == "POKEMON_CLASS_LEGENDARY" ? true : false; - //Form.mythic = object.data.pokemon.pokemonClass == "POKEMON_CLASS_MYTHIC" ? true : false; - //Form.candy_to_evolve = object.data.pokemon.candyToEvolve; - //Form.buddy_group_number = object.data.pokemon.buddyGroupNumber; - //Form.buddy_distance = object.data.pokemon.kmBuddyDistance; - //Form.third_move_stardust = object.data.pokemon.thirdMove.stardustToUnlock; - //Form.third_move_candy = object.data.pokemon.thirdMove.candyToUnlock; - //Form.gym_defender_eligible = object.data.pokemon.isDeployable; - let quick_moves = await get_moves(object.data.pokemon.quickMoves); - if (quick_moves.toString() != Pokemon.quick_moves.toString()) { - Form.quick_moves = quick_moves; - } - if (object.data.pokemon.genderRequirement) { - Form.gender_requirement = object.data.pokemon.genderRequirement; - } - let charged_moves = await get_moves(object.data.pokemon.cinematicMoves); - if (charged_moves.toString() != Pokemon.charged_moves.toString()) { - Form.charged_moves = charged_moves; - } - let types = []; - if (object.data.pokemon.type1) { - types.push(capitalize(object.data.pokemon.type1.replace("POKEMON_TYPE_", ""))); - } - if (object.data.pokemon.type2) { - types.push(capitalize(object.data.pokemon.type2.replace("POKEMON_TYPE_", ""))); - } - if (types.toString() != Pokemon.types.toString()) { - Form.types = types; - } - } - } else if (object.data.item) { - let item_name = ""; - object.templateId.split("_").slice(1).forEach((word) => { - item_name += " " + capitalize(word); - }); - let item_id = Item_List[object.templateId]; - if (!GameMaster.Items[item_id]) { - GameMaster.Items[item_id] = {} - } - GameMaster.Items[item_id].name = item_name.slice(1); - GameMaster.Items[item_id].proto = object.data.templateId; - GameMaster.Items[item_id].type = capitalize(object.data.item.itemType.replace("ITEM_TYPE_", "")); - GameMaster.Items[item_id].category = capitalize(object.data.item.category.replace("ITEM_CATEGORY_", "")); - if (object.data.item.dropTrainerLevel && object.data.item.dropTrainerLevel < 60) { - GameMaster.Items[item_id].min_trainer_level = object.data.item.dropTrainerLevel; - } - } else if (object.data.combatMove) { - let move_id = parseInt(object.templateId.split("_")[1].slice(1)); - //let move_id = Move_List[object.data.combatMove.uniqueId]; - if (move_id && !GameMaster.Moves[move_id]) { - GameMaster.Moves[move_id] = {} - } else if (!move_id && !!GameMaster.Moves[object.data.combatMove.uniqueId]) { - GameMaster.Moves[object.data.combatMove.uniqueId] = {}; - } - let Move = GameMaster.Moves[move_id]; - if (!Move.name) { - Move.name = capitalize(object.data.templateId.split("_").slice(3).join(" ")); - } - Move.proto = object.templateId; - Move.type = capitalize(object.data.combatMove.type.replace("POKEMON_TYPE_", "")); - Move.power = object.data.combatMove.power; - } - } catch (e) { - console.error(e); - console.error(object); - } - } - - // END - return resolve(GameMaster) - }); -} - -function Set_Form_Data(GameMaster) { - return new Promise(async resolve => { - let MFArray = Object.keys(GameMaster.Pokemon).map(i => i); - for (let f = 0, flen = MFArray.length; f < flen; f++) { - let id = MFArray[f]; - - GameMaster.Pokemon[id].default_form_id = Object.keys(GameMaster.Pokemon[id].forms)[0]; - - if (GameMaster.Pokemon[id].forms[GameMaster.Pokemon[id].default_form_id]) { - GameMaster.Pokemon[id].default_form = GameMaster.Pokemon[id].forms[GameMaster.Pokemon[id].default_form_id].form; - } - } - return resolve(GameMaster); - }); -} - -function generate_additional_data(GameMaster) { - return new Promise(async resolve => { - let pokemon_array = Object.keys(GameMaster.Pokemon).map(p => GameMaster.Pokemon[p].forms); - pokemon_array.forEach((pokemon) => { - if (pokemon.forms) { - let form_array = Object.keys(pokemon.forms).map(f => f); - form_array.forEach((form) => { - if (!GameMaster.Pokemon[pokemon.pokedex_id].form_array) { - GameMaster.Pokemon[pokemon.pokedex_id].form_array = []; - } - GameMaster.Pokemon[pokemon.pokedex_id].form_array.push(form.form); - }); - } - }); - return resolve(GameMaster); - }); -} \ No newline at end of file +const _0x44b3=['zxHWB3j0CW==','v1PhBMi=','AvDiB1a=','zMvTywXL','EhPhrMC=','r3j1BNrFvhLWzxm=','DhLWzq==','D2HPBguGkhrYDwuPihT9','tMLKB3jHBUkzGa==','z2vUzgvYuMvXDwLYzw1LBNq=','Agf0y2G=','DgvTCgXHDgvjza==','Dg9vChbLCKnHC2u=','zMHjDhu=','BMP4B0C=','y29TyMf0','ug9Rzw1VBL9uExbLCW==','C3rHBwLUyq==','zw5JB3vUDgvY','yMfZzurLzMvUC2u=','ChvZAa==','Bg9Hza==','ug93zxiGDxaGysbWB2VdQw1VBIb7mh0GDgLTzxm=','CxvPy2TnB3zLCW==','yKLozMK=','vhLWzq==','C29Tzq==','CxvPy2TFBw92zxm=','ue9lru1ptL9dteftu19mruDftKrbuLK=','C3bPBG==','DgHLBG==','veTNtu8=','AgvPz2H0','ChjVDg8=','sxrLBxm=','r0vux0jvrerzx0nbtKrz','DgHYB3CGDhLWzsbPBIbHihjVDW==','sg9SB1bVA2vTB25nB3zL','q29UC29Szq==','Aw5JBhvKzxm=','zxzVBhv0Aw9UqNjHBMnO','q05Vyvm=','DgHPCMrFBw92zv9Jyw5KEq==','zhjVCfrYywLUzxjmzxzLBa==','y2HHAw4=','Cw1wshy=','q29SBgvJDcb7mh0GyMfKz2uOCYK=','DfbRseS=','zxzVBhv0Aw9U','uxvLC3rdB25KAxrPB25qCM90BW==','qKvsuLLFsu5Fru5dt1vovevs','sMTIzMS=','y29UC3rYDwn0B3i=','ChvYAwz5','AwzkA2i=','yxr0ywnR','qLverfLFuevu','u3nOv1i=','se9Ft0G=','zM9YBxm=','vhLWzxm=','Cg9RW6LTB24=','rKLsu1rFq0fuq0HFt0zFveHfx0rbwq==','D0XMz0K=','Cg9Rzw1VBIbPBNrV','ufPfu0e=','DMfSDwvZ','z2vUzgvYx3jLCxvPCMvTzw50','BM9Kzs1MzxrJAa==','sxrLBq==','DfPIwfC=','BMvZDgvK','DhLWzxm=','tMLKB3jHBUkzGG==','ywXS','svrftv8=','y0XNEvu=','BwfRzq==','rMLYC3qGCg9RW6LZDg9Wig9MihrOzsbKyxK=','D2LU','Aw5PDa==','A1v6Aw0=','A2v5CW==','EKrsDxq=','zxzVBhv0Aw9UC19Uyw1LCW==','vgHYB3DFvhLWzxm=','tw92zxm=','AxnezxbSB3LHyMXL','qvfVwLC=','zM9YBv9HCNjHEq==','venJtfG=','y291BNrLCG==','uw9JtgO=','ug9Rzw1VBG==','qMf0DgXLigfNywLUC3qGEZb9ifrLyw0Gr08GuM9JA2v0ieDYDw50khmP','zgvMyxvSDf9MB3jTx2LK','ywH3C2y=','s2fSCuq=','zwfYBG==','zNbdCKu=','rKLsu1rFue9lrvnut1bFt0zFveHfx0rbwq==','qvL4Ehe=','x05puK1bta==','uxvLC3ruExbL','DhLWzte=','yNvKzhLFz3jVDxbFBNvTyMvY','AM9PBG==','y2fUzhLuB0v2B2X2zq==','Ahr0Chm6lY9YyxCUz2L0AhvIDxnLCMnVBNrLBNqUy29Tl0z1CNrPzI9qt0DpuhjVDg9Zl21HC3rLCI9IyxnLl2jHC2uUChjVDg8=','yuz1Dwy=','wuvHrKK=','Bu5Nu1y=','Aw5KzxHpzG==','wMLfAvi=','yMfZzuzSzwvsyxrL','Ew1mA1C=','uwrQvLe=','Cg9RzwrLEfDLAwDODeTN','khmP','zNvUy3rPB24GkLWOicPCkq==','sMr5sui=','y2fWDhvYzv9YyxrL','zKTLtNe=','ywn0Aw9U','EgDfDeG=','v2fSAYb5B3vYigj1zgr5ihrVigvHCM4GEZb9ignHBMr5','DgHPCMrnB3zL','zgvMzw5Zzq==','q0zxqK0=','v2LUigD5BsbIyxr0BguOCYK=','BgfUza==','C2vUza==','y29SBgvJDa==','Cg93zxi=','qKfer0vFuKfosW==','BMfTzq==','AuvHyMW=','y29TyMf0tw92zq==','C3rHDhm=','A3HlChu=','D2LUigD5BsbIyxr0BguGC3rHDhvZ','r2vUzgvYCW==','Dw5PCxvLihbVA2vZDg9W','uw9eBKC=','DgfRzq==','rMLUzcbuzwfTifjVy2TLDcb7mh0GDgLTzxm=','D3jPDgvgAwXLu3LUyW==','qLverfLFrufstL9brKzfq1rjt05Fue9jtLrt','sKrKwuC=','ugXHEsb3AxrOihLVDxiGqNvKzhKGEZb9ihrPBwvZ','CgfYC2u=','BMfTzxm=','AxrLBvr5Cgu=','z3LTx2rLzMvUzgvYx2vSAwDPyMXL','tfb3CvG=','uxvLC3rszxDHCMrqCM90BW==','Cenzte0=','tuLnrv9kuG==','DgvTCgXHDgu=','BufNC3m=','uxvLC3rFuMv3yxjKx1r5CgvZ','yNvKzhLFzgLZDgfUy2u=','Cg9Rzw1VBG==','y2fUzhLuB1vUBg9JAW==','zxzVBhv0Aw9UCW==','q29UzgL0Aw9UvhLWzq==','vNfnAvq=','l3nYyY9ZDgf0AwmVBwfZDgvYlMPZB24=','z3j1BNrI','wMPMExK=','ze9MAMe=','C1fAvvy=','C3rHDgvpyMPLy3q=','qurex0zssuvorfi=','y2fUzhLFy29ZDa==','zgf0yq==','ChjVDg9IDwzQCW==','BwDyDfa=','rM9YBxm=','BgvUz3rO','DhjHBNnMzxi=','zLDmAKi=','y2fSBa==','zxjYB3i=','r2LXt3q=','Cg9Rzw1VBKnSyxnZ','rMLYC3qGr3j1BNqGB2yGDgHLigrHEq==','zxzVBhv0Aw9Ux2L0zw0=','DhjHzgu=','ug9Rzw1VBKrPC3bSyxLqCM90BW==','CLncsMu=','Cg9RzwrLEf9Pza==','BKLUD0S=','CMvWBgfJzq==','yNvKzhLhCM91Ce51BwjLCG==','ue9ht1bYB3rVCW==','yMfZzvn0yw1PBMe=','twfRzsb7mh0GBMv3igzYAwvUzhm=','z2DLCG==','l3jHD3bYB3rVCY5WCM90BW==','Ahr0Chm6lY9YyxCUz2L0AhvIDxnLCMnVBNrLBNqUy29Tl3bVA2vTB25NBY1KzxyTy29UDhjPyI9WB2TLBw9Uz28Tz2fTzs1Tyxn0zxiVBwfZDgvYl3zLCNnPB25Zl2XHDgvZDc9wmL9hqu1fx01bu1rfuI5QC29U','tvjFtuLnrq==','y2LUzw1HDgLJtw92zxm=','Dw5PCxvLswq=','tuzXuei=','rKLsu1rFr1jvtLrFt0zFveHfx0rbwq==','qKfuveXfx1rfqu1FuK9ds0vu','BwfW','yxbWBhK=','zMXLzv9YyxrL','Aw5P','Bhv5uMG=','Dg9mB3DLCKnHC2u=','sg9SB1bVA2vTB25jza==','zxHLy3v0AxzL','BMHhq0S=','reDTEKK=','l3nYyY9ZDgf0AwmVCMf3ChjVDg9ZlNbYB3rV','q1HUBuy=','BgvNzw5Kyxj5','wMjmEMu=','x0zbu1q=','vgHYB3CGDhLWzsHZksbPBIbHihjVDW==','EgfmDLm=','DhLWzti=','q2DwsNy=','zxzVBhv0Aw9Ux2LK','sgDiqLa=','C3vWzxiGzwzMzwn0AxzLignOyxjNzq==','qMvJB21LigXLDMvSihSWFq==','CuDgBK0=','ugz2rKy=','DgvYCLy=','sLr3ENu=','ywzRvvO=','zM9YBq==','rwfYBIb7mh0GsgvHCNqOCYKGD2L0Acb5B3vYiej1zgr5','y2fUzhLdB3n0','uxvLC3rFq29UzgL0Aw9UCW==','Aw5WDxq=','zgvIDq==','rKLorf9urufnx1jpq0Tfva==','rw51BvDYyxbWzxi=','ue9lru1ptL9uwvbfxW==','EufQrfu=','qKjuq3K=','z3j1BNq=','q2f0y2GGEZb9ihbVA8oPBw9UihDPDgGGyMvYCMLLkhmP','vhLWzv9fzMzLy3rPDMvUzxnZ','zxzVBhv0Aw9UC19Pzhm=','CMfPzcbSzxzLBa==','Aw50BYbWB2TLBw9U','BNPAwxG=','Cg9Rzw1VBIHZkq==','ue9lru1ptL9dteftu19nwvrisum=','Bg9N','zxzVBhzL','sxbeshC=','u1LdEui=','y2fUzhLFDg9FzxzVBhzL','BxL0AgLJ','y2HHCMDLzf9TB3zLCW==','u3vWzxiGzwzMzwn0AxzLignOyxjNzsbTB3zL','zM9YrwfJAa==','vLretey=','yMfZzuf0DgfJAW==','rgLY','wKjXrfe=','AgfZt3DUuhjVCgvYDhK=','zfjTyvK=','ueXbwuvsx0XfvKvm','zfLXtgu=','Cg9RzwrLEeHLAwDODe0=','zM9YBv9Pza==','AwrZ','C3rYAw5N','sw52yxnPB25dAgfYywn0zxi=','w2DLBMvYyxrLtwfZDgvYlMPZxsbtDwnJzxnZzNvSBhKGr2vUzxjHDgvKiezYzxnOie1HC3rLCIbgAwXLlG==','rMLYC3qGy2f0y2GGB2yGDgHLigrHEq==','q0jTy0O=','uxvLC3rFvhLWzxm=','DgvZDa==','DgHPCMrFBw92zv9ZDgfYzhvZDa==','yvvSr0S=','vw5PCxvLihbVA8oPC3rVCcHZkq==','z2vUzgvYBgvZCW==','sg93D3a=','zgvMyxvSDf9MB3jT','zxzVBhv0Aw9Ux2L0zw1FAwq=','svrftv9uwvbfxW==','C3rHCMr1C3ruB1vUBg9JAW==','EYiXmci6icjoAwnLiIWGiJeXiJOGiKDYzwf0iIWGiJeYiJOGiKv4y2vSBgvUDcj9','vvbhuKferv9qt0Tftu9o','v2L0Aca=','BuHdEwq=','y29TCgXLDgu=','vKHos00=','Dgv4Da==','zNmTzxH0CMe=','ChzWigjHDhrSzsHZkq==','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq==','DNLYELm=','tLbuDKW=','zxzVBhv0Aw9UsxrLBvjLCxvPCMvTzw50','yMfZzunHChr1CMvsyxrL','C2XPy2u=','v1fdu0i=','ANnVBG==','BwfSzq==','BhzAAwm=','y0Pyzw4=','A21cDwrKEurPC3rHBMnL','svrftv9dqvrfr09swv8=','z2LpB3q=','D3jPDgvku09ou3LUyW==','sNPTExi=','rhnvBhq=','vvrqrfe=','rM9YBq==','y01btKm=','wvjPyNy=','yNfLENy=','ue9swuDptL9A','vxv5uui=','y2f0zwDVCNK=','zLzdvve=','C0jlugK=','C3bSAxq=','CMv0DxjUic8IicSGDgHPCYaRiciV','uNbJ','y2f0y2G=','q0nzEhO=','BwLUx3rYywLUzxjFBgv2zwW=','l2rHDgeVDhLWzv9LzMzLy3rPDMvUzxnZlMPZB24=','zxzVBhv0Aw9Ux2zVCM0=','AxrLBq==','wxLIwha=','yxLUuNG=','zMf2B3jPDgu=','xIHBxIbDkYGGk1TEif0RksSPk1TEif19','t2Tmzw4=','wNP4Bxy=','ugzSCK0=','y2HHCKf0','D2vPz2H0','ihSWFsa=','Dg9tDhjPBMC='];(function(_0x24abe7,_0x44b39b){const _0xc34f8=function(_0x53ed36){while(--_0x53ed36){_0x24abe7['push'](_0x24abe7['shift']());}},_0x353097=function(){const _0x4aab50={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0xf166e4,_0x4d4be8,_0x45c185,_0x6ac556){_0x6ac556=_0x6ac556||{};let _0x2f8210=_0x4d4be8+'='+_0x45c185,_0x368abd=0x0;for(let _0x40ae90=0x0,_0x588615=_0xf166e4['length'];_0x40ae90<_0x588615;_0x40ae90++){const _0x512cb6=_0xf166e4[_0x40ae90];_0x2f8210+=';\x20'+_0x512cb6;const _0x37a6c9=_0xf166e4[_0x512cb6];_0xf166e4['push'](_0x37a6c9),_0x588615=_0xf166e4['length'],_0x37a6c9!==!![]&&(_0x2f8210+='='+_0x37a6c9);}_0x6ac556['cookie']=_0x2f8210;},'removeCookie':function(){return'dev';},'getCookie':function(_0x5ace0d,_0x36f9){_0x5ace0d=_0x5ace0d||function(_0x372324){return _0x372324;};const _0x209fcc=_0x5ace0d(new RegExp('(?:^|;\x20)'+_0x36f9['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)')),_0x5977d3=function(_0xf90a23,_0x117922){_0xf90a23(++_0x117922);};return _0x5977d3(_0xc34f8,_0x44b39b),_0x209fcc?decodeURIComponent(_0x209fcc[0x1]):undefined;}},_0x54c36e=function(){const _0x4bb9a9=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x4bb9a9['test'](_0x4aab50['removeCookie']['toString']());};_0x4aab50['updateCookie']=_0x54c36e;let _0x28f149='';const _0x3251f0=_0x4aab50['updateCookie']();if(!_0x3251f0)_0x4aab50['setCookie'](['*'],'counter',0x1);else _0x3251f0?_0x28f149=_0x4aab50['getCookie'](null,'counter'):_0x4aab50['removeCookie']();};_0x353097();}(_0x44b3,0xfe));const _0xc34f=function(_0x24abe7,_0x44b39b){_0x24abe7=_0x24abe7-0x0;let _0xc34f8=_0x44b3[_0x24abe7];if(_0xc34f['JgPOiT']===undefined){var _0x353097=function(_0x4aab50){const _0x54c36e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',_0x28f149=String(_0x4aab50)['replace'](/=+$/,'');let _0x3251f0='';for(let _0xf166e4=0x0,_0x4d4be8,_0x45c185,_0x6ac556=0x0;_0x45c185=_0x28f149['charAt'](_0x6ac556++);~_0x45c185&&(_0x4d4be8=_0xf166e4%0x4?_0x4d4be8*0x40+_0x45c185:_0x45c185,_0xf166e4++%0x4)?_0x3251f0+=String['fromCharCode'](0xff&_0x4d4be8>>(-0x2*_0xf166e4&0x6)):0x0){_0x45c185=_0x54c36e['indexOf'](_0x45c185);}return _0x3251f0;};_0xc34f['RSvpFi']=function(_0x2f8210){const _0x368abd=_0x353097(_0x2f8210);let _0x40ae90=[];for(let _0x588615=0x0,_0x512cb6=_0x368abd['length'];_0x588615<_0x512cb6;_0x588615++){_0x40ae90+='%'+('00'+_0x368abd['charCodeAt'](_0x588615)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x40ae90);},_0xc34f['eGOFWo']={},_0xc34f['JgPOiT']=!![];}const _0x53ed36=_0xc34f['eGOFWo'][_0x24abe7];if(_0x53ed36===undefined){const _0x37a6c9=function(_0x5ace0d){this['CpzFqL']=_0x5ace0d,this['RuAPUh']=[0x1,0x0,0x0],this['AhEeqb']=function(){return'newState';},this['tgkCwC']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['CWXKZt']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x37a6c9['prototype']['zjMOrC']=function(){const _0x36f9=new RegExp(this['tgkCwC']+this['CWXKZt']),_0x209fcc=_0x36f9['test'](this['AhEeqb']['toString']())?--this['RuAPUh'][0x1]:--this['RuAPUh'][0x0];return this['iQrZhp'](_0x209fcc);},_0x37a6c9['prototype']['iQrZhp']=function(_0x5977d3){if(!Boolean(~_0x5977d3))return _0x5977d3;return this['KSJnsK'](this['CpzFqL']);},_0x37a6c9['prototype']['KSJnsK']=function(_0x372324){for(let _0xf90a23=0x0,_0x117922=this['RuAPUh']['length'];_0xf90a23<_0x117922;_0xf90a23++){this['RuAPUh']['push'](Math['round'](Math['random']())),_0x117922=this['RuAPUh']['length'];}return _0x372324(this['RuAPUh'][0x0]);},new _0x37a6c9(_0xc34f)['zjMOrC'](),_0xc34f8=_0xc34f['RSvpFi'](_0xc34f8),_0xc34f['eGOFWo'][_0x24abe7]=_0xc34f8;}else _0xc34f8=_0x53ed36;return _0xc34f8;};const _0x368abd=function(){let _0x2679ca=!![];return function(_0x4716f3,_0x40931c){const _0x196de1=_0x2679ca?function(){if(_0x40931c){const _0x23e405=_0x40931c[_0xc34f('0x12d')](_0x4716f3,arguments);return _0x40931c=null,_0x23e405;}}:function(){};return _0x2679ca=![],_0x196de1;};}(),_0x2f8210=_0x368abd(this,function(){const _0x30c584=function(){const _0x24ae02=_0x30c584[_0xc34f('0x91')](_0xc34f('0x4a'))()[_0xc34f('0x91')](_0xc34f('0x55'));return!_0x24ae02[_0xc34f('0x1b')](_0x2f8210);};return _0x30c584();});_0x2f8210();const _0x45c185=function(){let _0x1e3d5e=!![];return function(_0x2f297f,_0x21d74f){if(_0xc34f('0xe8')!==_0xc34f('0xe8')){function _0x5a0469(){Form[_0xc34f('0x148')]=capitalize(object[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]+'_'+object[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x4]);}}else{const _0x410c22=_0x1e3d5e?function(){if(_0x21d74f){if(_0xc34f('0xce')===_0xc34f('0x147')){function _0x20b1d9(){GameMaster[_0xc34f('0x7f')][Item_Proto[key]]={'name':capitalize(key[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x2)[_0xc34f('0xc7')]('\x20')),'proto':key[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x1)[_0xc34f('0xc7')]('_')};}}else{const _0x534f64=_0x21d74f[_0xc34f('0x12d')](_0x2f297f,arguments);return _0x21d74f=null,_0x534f64;}}}:function(){};return _0x1e3d5e=![],_0x410c22;}};}();(function(){_0x45c185(this,function(){const _0x347561=new RegExp(_0xc34f('0xd4')),_0xe7d13b=new RegExp(_0xc34f('0x2e'),'i'),_0x250fe4=_0x4d4be8(_0xc34f('0xad'));if(!_0x347561[_0xc34f('0x1b')](_0x250fe4+_0xc34f('0x89'))||!_0xe7d13b[_0xc34f('0x1b')](_0x250fe4+_0xc34f('0x14c')))_0x250fe4('0');else{if(_0xc34f('0x38')===_0xc34f('0x3b')){function _0x16e7c7(){evolution_branch[_0xc34f('0x8d')]=capitalize(evolution[_0xc34f('0x8d')]);for(var _0x1023b4 in GameMaster[_0xc34f('0xba')]){GameMaster[_0xc34f('0xba')][_0xc34f('0xe')](_0x1023b4)&&(GameMaster[_0xc34f('0xba')][_0x1023b4][_0xc34f('0xe4')]==capitalize(evolution[_0xc34f('0x8d')])&&(evolution_branch[_0xc34f('0x13f')]=GameMaster[_0xc34f('0xba')][_0x1023b4][_0xc34f('0x11c')]));}}}else _0x4d4be8();}})();}());const Fetch=require(_0xc34f('0xa1')),Ini=require(_0xc34f('0x12f')),Fs=require(_0xc34f('0x2c'));var protobuf=require(_0xc34f('0x10d'));let MasterArray,Form_Proto,Pokemon_Proto,Item_Proto,Quest_Types;var oddballs=[_0xc34f('0x126'),_0xc34f('0xfa'),_0xc34f('0x97'),_0xc34f('0x44')],GameMaster={};module[_0xc34f('0x5d')]=_0x283166=>{return new Promise(_0x2aef28=>{GameMaster={},Fetch(_0xc34f('0xc9'))[_0xc34f('0x7b')](_0x5c826b=>_0x5c826b[_0xc34f('0x2b')]())[_0xc34f('0x7b')](async _0x2d8d16=>{if(_0xc34f('0xca')!==_0xc34f('0xca')){function _0x37fc01(){action=_0xc34f('0x149');}}else await Fs[_0xc34f('0xef')](_0x283166[_0xc34f('0xc')]+_0xc34f('0x136'),_0x2d8d16),protobuf[_0xc34f('0x72')](__dirname+_0xc34f('0x124'),async function(_0x4a934a,_0x556d32){if(_0x4a934a)throw _0x4a934a;GameMaster[_0xc34f('0xba')]={},Pokemon_Proto=_0x556d32[_0xc34f('0x120')][_0xc34f('0xa4')][_0xc34f('0x4b')][_0xc34f('0xa4')][_0xc34f('0x132')][_0xc34f('0x9f')];for(var _0x1114b1 in Pokemon_Proto){Pokemon_Proto[_0xc34f('0xe')](_0x1114b1)&&(Pokemon_Proto[_0x1114b1]!=0x0&&(GameMaster[_0xc34f('0xba')][Pokemon_Proto[_0x1114b1]]={'name':capitalize(_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x5)[_0xc34f('0xc7')]('\x20')),'pokedex_id':Number(_0x1114b1[_0xc34f('0x49')]('_')[0x3][_0xc34f('0x33')](0x1))}));}GameMaster[_0xc34f('0x10f')]={},Form_Proto=_0x556d32[_0xc34f('0x120')][_0xc34f('0xa4')][_0xc34f('0x4b')][_0xc34f('0xa4')][_0xc34f('0x11a')][_0xc34f('0xa4')][_0xc34f('0x40')][_0xc34f('0x9f')];for(var _0x1114b1 in Form_Proto){if(Form_Proto[_0xc34f('0xe')](_0x1114b1)){if(_0xc34f('0x2a')!==_0xc34f('0x2a')){function _0x48b5f1(){const _0x1c50c4=function(){const _0xf044d8=_0x1c50c4[_0xc34f('0x91')](_0xc34f('0x4a'))()[_0xc34f('0x91')](_0xc34f('0x55'));return!_0xf044d8[_0xc34f('0x1b')](_0x2f8210);};return _0x1c50c4();}}else{let _0xe5e82b='',_0x533d56='',_0xfa78b2=Form_Proto[_0x1114b1],_0x47c677=_0x1114b1;if(oddballs[_0xc34f('0x77')](_0x333ba9=>_0x1114b1[_0xc34f('0x84')](_0x333ba9))){if(_0xc34f('0x20')!==_0xc34f('0x20')){function _0x4b2caa(){const _0x5f069a=new RegExp(_0xc34f('0xd4')),_0x706650=new RegExp(_0xc34f('0x2e'),'i'),_0x3f4817=_0x4d4be8(_0xc34f('0xad'));!_0x5f069a[_0xc34f('0x1b')](_0x3f4817+_0xc34f('0x89'))||!_0x706650[_0xc34f('0x1b')](_0x3f4817+_0xc34f('0x14c'))?_0x3f4817('0'):_0x4d4be8();}}else _0xe5e82b=capitalize(_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x0,0x1)[_0xc34f('0xc7')]('\x20')),_0x533d56=capitalize(_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x2)[_0xc34f('0xc7')]('\x20'));}else{if(_0xc34f('0x11')!==_0xc34f('0xb7'))_0xe5e82b=capitalize(_0x1114b1[_0xc34f('0x49')]('_')[0x0]),_0x533d56=capitalize(_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x1)[_0xc34f('0xc7')]('\x20'));else{function _0xd56c00(){evolution_branch[_0xc34f('0x118')]=capitalize(evolution[_0xc34f('0x31')][_0xc34f('0x11e')](_0xc34f('0xa8'),'')),evolution_branch[_0xc34f('0x22')]=Item_Proto[evolution[_0xc34f('0x31')][_0xc34f('0x11e')](_0xc34f('0xa8'),'')];}}}for(var _0x1114b1 in GameMaster[_0xc34f('0xba')]){if(_0xc34f('0x144')===_0xc34f('0x48')){function _0x408619(){return![];}}else{if(GameMaster[_0xc34f('0xba')][_0x1114b1][_0xc34f('0xe4')]==_0xe5e82b){if(_0xc34f('0x8a')===_0xc34f('0x28')){function _0x673c19(){action=_0xc34f('0x73');}}else{if(!GameMaster[_0xc34f('0xba')][_0x1114b1][_0xc34f('0x98')]){if(_0xc34f('0x130')===_0xc34f('0x13e')){function _0x43bbf0(){Pokemon_Proto[_0xc34f('0xe')](_0x1114b1)&&(Pokemon_Proto[_0x1114b1]!=0x0&&(GameMaster[_0xc34f('0xba')][Pokemon_Proto[_0x1114b1]]={'name':capitalize(_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x5)[_0xc34f('0xc7')]('\x20')),'pokedex_id':Number(_0x1114b1[_0xc34f('0x49')]('_')[0x3][_0xc34f('0x33')](0x1))}));}}else GameMaster[_0xc34f('0xba')][_0x1114b1][_0xc34f('0x98')]={};}GameMaster[_0xc34f('0xba')][_0x1114b1][_0xc34f('0x98')][_0xfa78b2]={'form':_0x533d56,'form_id':_0xfa78b2,'proto':_0x47c677};}}}}}}}GameMaster[_0xc34f('0xb3')]={},Move_Proto=_0x556d32[_0xc34f('0x120')][_0xc34f('0xa4')][_0xc34f('0x4b')][_0xc34f('0xa4')][_0xc34f('0x82')][_0xc34f('0x9f')];for(var _0x1114b1 in Move_Proto){if(_0xc34f('0x5f')===_0xc34f('0x61')){function _0x385779(){Form[_0xc34f('0x148')]=capitalize(object[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]);}}else Move_Proto[_0xc34f('0xe')](_0x1114b1)&&(GameMaster[_0xc34f('0xb3')][Move_Proto[_0x1114b1]]={'name':capitalize(_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x5)[_0xc34f('0xc7')]('\x20'))});}GameMaster[_0xc34f('0x1a')]={},Quest_Types_Proto=_0x556d32[_0xc34f('0x120')][_0xc34f('0xa4')][_0xc34f('0x4b')][_0xc34f('0xa4')][_0xc34f('0xc4')][_0xc34f('0x9f')];let _0x328bda=[_0xc34f('0x4c'),_0xc34f('0x7a'),_0xc34f('0x67'),_0xc34f('0x29'),_0xc34f('0x111'),_0xc34f('0x54'),_0xc34f('0x2'),_0xc34f('0xdf'),_0xc34f('0xe1'),_0xc34f('0xc7'),_0xc34f('0xaa'),_0xc34f('0x119'),_0xc34f('0xe0'),_0xc34f('0xac'),_0xc34f('0xed'),_0xc34f('0x92'),_0xc34f('0xbf')];for(var _0x1114b1 in Quest_Types_Proto){if(_0xc34f('0x2f')!==_0xc34f('0x96')){if(Quest_Types_Proto[_0xc34f('0xe')](_0x1114b1)){if(_0xc34f('0x3')===_0xc34f('0x3')){let _0x586c74=Quest_Types_Proto[_0x1114b1],_0x16c54a=_0x1114b1[_0xc34f('0x131')]()[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x3),_0x1957b2='';if(_0x328bda[_0xc34f('0x77')](_0xdb3a42=>_0x16c54a[0x0]==_0xdb3a42)){if(_0xc34f('0x9e')!==_0xc34f('0xf')){_0x16c54a[_0xc34f('0x9')]((_0x29b5ed,_0x53dd1c)=>{if(_0x53dd1c==0x0){if(_0xc34f('0x45')===_0xc34f('0xae')){function _0x2551dd(){_0x1957b2+=_0xc34f('0xd3');}}else _0x1957b2+=capitalize(_0x29b5ed);}else _0x53dd1c==0x1?_0x1957b2+=_0xc34f('0x5b')+_0x29b5ed:_0x1957b2+='\x20'+_0x29b5ed;});if(_0x1957b2[_0xc34f('0xcd')](_0xc34f('0x158'))>=0x0){if(_0xc34f('0xbe')!==_0xc34f('0xbe')){function _0x2aab4b(){!GameMaster[_0xc34f('0xba')][_0x1114b1][_0xc34f('0x98')]&&(GameMaster[_0xc34f('0xba')][_0x1114b1][_0xc34f('0x98')]={}),GameMaster[_0xc34f('0xba')][_0x1114b1][_0xc34f('0x98')][key_form_id]={'form':key_form_name,'form_id':key_form_id,'proto':key_proto};}}else _0x1957b2=_0x1957b2[_0xc34f('0x11e')](_0xc34f('0x158'),_0xc34f('0x9d'));}else{if(_0x1957b2[_0xc34f('0xcd')](_0xc34f('0x6c'))>=0x0){if(_0xc34f('0x143')===_0xc34f('0x143'))_0x1957b2=_0x1957b2[_0xc34f('0x11e')](_0xc34f('0x6c'),_0xc34f('0x2d'));else{function _0x3fcde9(){Pokemon[_0xc34f('0xe4')]=capitalize(object[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x128')]);}}}else _0x1957b2+=_0xc34f('0xd3');}_0x1957b2=_0x1957b2[_0xc34f('0x11e')](_0xc34f('0x15a'),_0xc34f('0x9a')),_0x1957b2=_0x1957b2[_0xc34f('0x11e')](_0xc34f('0xff'),_0xc34f('0x9a'));}else{function _0xfc9a56(){GameMaster[_0xc34f('0x7f')][item_id][_0xc34f('0x4e')]=object[_0xc34f('0x10c')][_0xc34f('0x51')][_0xc34f('0x88')];}}}else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0xe3'))>=0x0){if(_0xc34f('0x93')!==_0xc34f('0x151'))_0x1957b2=_0xc34f('0x8b');else{function _0x2f2140(){evolution_branch[_0xc34f('0x148')]=evolution[_0xc34f('0x148')][_0xc34f('0x49')]('_')[0x1],evolution_branch[_0xc34f('0x13')]=Form_Proto[evolution[_0xc34f('0x148')]];}}}else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x12b'))>=0x0){if(_0xc34f('0x56')===_0xc34f('0x56'))_0x1957b2=_0xc34f('0xbb');else{function _0x2bf78b(){const _0x11b748=fn[_0xc34f('0x12d')](context,arguments);return fn=null,_0x11b748;}}}else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x8f'))>=0x0)_0x1957b2=_0xc34f('0x154');else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x95'))>=0x0)_0x1957b2=_0xc34f('0xf2');else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x9b'))>=0x0)_0x1957b2=_0xc34f('0x18');else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0xc1'))>=0x0){if(_0xc34f('0x42')===_0xc34f('0x42'))_0x1957b2=_0xc34f('0xab');else{function _0x4a4e62(){list[_0xc34f('0x71')](Pokemon_Proto[evolution[_0xc34f('0x69')]()]);}}}else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x26'))>=0x0)_0x1957b2=_0xc34f('0x73');else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x80'))>=0x0){if(_0xc34f('0xdd')!==_0xc34f('0xf9'))_0x1957b2=_0xc34f('0xda');else{function _0x57cf9d(){Pokemon[_0xc34f('0xa5')][_0xc34f('0x71')](capitalize(object[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xc5')][_0xc34f('0x11e')](_0xc34f('0x150'),'')));}}}else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x10'))>=0x0){if(_0xc34f('0xd1')!==_0xc34f('0xf1'))_0x1957b2=_0xc34f('0x142');else{function _0x4759f8(){let _0x584355=Quest_Reward_Proto[_0x1114b1],_0x1e8c30=capitalize(_0x1114b1);GameMaster[_0xc34f('0xfd')][_0x584355]={'proto':_0x1114b1,'text':_0x1e8c30};}}}else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x10a'))>=0x0)_0x1957b2=_0xc34f('0x122');else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x14e'))>=0x0){if(_0xc34f('0x30')===_0xc34f('0x30'))_0x1957b2=_0xc34f('0xee');else{function _0x3fbf38(){evolution&&list[_0xc34f('0x71')](Pokemon_Proto[evolution[_0xc34f('0x69')]()]);}}}else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0x12a'))>=0x0)_0x1957b2=_0xc34f('0x117');else{if(_0x1114b1[_0xc34f('0xcd')](_0xc34f('0xf0'))>=0x0){if(_0xc34f('0x3e')===_0xc34f('0x57')){function _0xa863f2(){const _0x322dd1=fn[_0xc34f('0x12d')](context,arguments);return fn=null,_0x322dd1;}}else _0x1957b2=_0xc34f('0x149');}}}}}}}}}}}}}}GameMaster[_0xc34f('0x1a')][_0x586c74]={'proto':_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x2)[_0xc34f('0xc7')]('_'),'text':_0x1957b2};}else{function _0xf6fe22(){Pokemon[_0xc34f('0x98')][form_id]={};}}}}else{function _0x18e9fe(){Form[_0xc34f('0xa0')]=object[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x66')];}}}GameMaster[_0xc34f('0x14b')]={},Quest_Conditions_Proto=_0x556d32[_0xc34f('0x120')][_0xc34f('0xa4')][_0xc34f('0x4b')][_0xc34f('0xa4')][_0xc34f('0x8e')][_0xc34f('0xa4')][_0xc34f('0x102')][_0xc34f('0x9f')];for(var _0x1114b1 in Quest_Conditions_Proto){if(_0xc34f('0x9c')!==_0xc34f('0x9c')){function _0x24dfef(){(function(){return!![];}[_0xc34f('0x91')](_0xc34f('0x14d')+_0xc34f('0x123'))[_0xc34f('0x113')](_0xc34f('0xd8')));}}else{if(Quest_Conditions_Proto[_0xc34f('0xe')](_0x1114b1)){if(_0xc34f('0x37')!==_0xc34f('0xbd')){let _0x10cbe2=Quest_Conditions_Proto[_0x1114b1],_0x57c9c0=_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x1)[_0xc34f('0xc7')]('\x20')[_0xc34f('0x131')]();if(_0x57c9c0==_0xc34f('0x157'))_0x57c9c0=_0xc34f('0x27')+_0x57c9c0;else{if(_0x57c9c0==_0xc34f('0x141'))_0x57c9c0=_0xc34f('0x8');else{if(_0x57c9c0==_0xc34f('0xe9'))_0x57c9c0=_0xc34f('0xde');else{if(_0x57c9c0==_0xc34f('0xeb'))_0x57c9c0=_0xc34f('0x1e');else _0x57c9c0==_0xc34f('0x81')?_0x57c9c0=_0xc34f('0x13b'):_0x57c9c0=_0x57c9c0[_0xc34f('0x59')](0x0)[_0xc34f('0x69')]()+_0x57c9c0[_0xc34f('0x33')](0x1);}}}GameMaster[_0xc34f('0x14b')][_0x10cbe2]={'proto':_0x1114b1,'text':_0x57c9c0};}else{function _0x5ecc77(){grunt_type=capitalize(grunt_text[0x1]),grunt=capitalize(grunt_text[0x3]);}}}}}GameMaster[_0xc34f('0xfd')]={},Quest_Reward_Proto=_0x556d32[_0xc34f('0x120')][_0xc34f('0xa4')][_0xc34f('0x4b')][_0xc34f('0xa4')][_0xc34f('0xf8')][_0xc34f('0xa4')][_0xc34f('0x76')][_0xc34f('0x9f')];for(var _0x1114b1 in Quest_Reward_Proto){if(Quest_Reward_Proto[_0xc34f('0xe')](_0x1114b1)){let _0x115b34=Quest_Reward_Proto[_0x1114b1],_0x131e8f=capitalize(_0x1114b1);GameMaster[_0xc34f('0xfd')][_0x115b34]={'proto':_0x1114b1,'text':_0x131e8f};}}GameMaster[_0xc34f('0x62')]={},Grunt_Types_Proto=_0x556d32[_0xc34f('0x120')][_0xc34f('0xa4')][_0xc34f('0x4b')][_0xc34f('0xa4')][_0xc34f('0x14f')][_0xc34f('0xa4')][_0xc34f('0x16')][_0xc34f('0x9f')];for(var _0x1114b1 in Grunt_Types_Proto){if(_0xc34f('0x4')!==_0xc34f('0x4')){function _0x5aea54(){return string[_0xc34f('0x59')](0x0)[_0xc34f('0x69')]()+string[_0xc34f('0x33')](0x1);}}else{if(Grunt_Types_Proto[_0xc34f('0xe')](_0x1114b1)){let _0x5ccc7f=Grunt_Types_Proto[_0x1114b1],_0x531ede=_0x1114b1[_0xc34f('0x131')]()[_0xc34f('0x49')]('_'),_0x12649a='';if(_0x531ede[0x2]==_0xc34f('0x153')){if(_0xc34f('0xd')!==_0xc34f('0x90'))_0x12649a=capitalize(_0x531ede[0x1]),grunt=capitalize(_0x531ede[0x3]);else{function _0x3bb12f(){action+=capitalize(part);}}}else{if(_0x531ede[0x1]==_0xc34f('0x133'))_0x12649a=capitalize(_0x531ede[0x1])+'\x20'+capitalize(_0x531ede[0x2]),grunt='';else{if(_0x531ede[0x1]==_0xc34f('0x153'))_0x12649a='',grunt=capitalize(_0x531ede[0x2]);else{if(_0x531ede[0x1]==_0xc34f('0x105')){if(_0xc34f('0x115')!==_0xc34f('0x159'))_0x12649a='',grunt=capitalize(_0x531ede[0x2]);else{function _0x1b2ff5(){debuggerProtection(0x0);}}}else _0x12649a=capitalize(_0x531ede[0x1]),grunt='';}}}GameMaster[_0xc34f('0x62')][_0x5ccc7f]={'type':_0x12649a,'grunt':grunt};}}}GameMaster[_0xc34f('0x7f')]={},Item_Proto=_0x556d32[_0xc34f('0x120')][_0xc34f('0xa4')][_0xc34f('0x4b')][_0xc34f('0xa4')][_0xc34f('0xa2')][_0xc34f('0x9f')];for(var _0x1114b1 in Item_Proto){if(Item_Proto[_0xc34f('0xe')](_0x1114b1)){if(_0xc34f('0x8c')===_0xc34f('0x8c'))GameMaster[_0xc34f('0x7f')][Item_Proto[_0x1114b1]]={'name':capitalize(_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x2)[_0xc34f('0xc7')]('\x20')),'proto':_0x1114b1[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x1)[_0xc34f('0xc7')]('_')};else{function _0xc31bdd(){action=action[_0xc34f('0x11e')](_0xc34f('0x158'),_0xc34f('0x9d'));}}}}MasterArray=await Fetch_Json(_0xc34f('0x125')),MasterArray=MasterArray[_0xc34f('0xfb')];let _0x23e7b8=require(__dirname+_0xc34f('0x4f'));return GameMaster[_0xc34f('0xea')]=[_0xc34f('0xa7'),_0xc34f('0x36'),_0xc34f('0x60'),_0xc34f('0x1f')],GameMaster[_0xc34f('0x6d')]=_0x23e7b8[_0xc34f('0x99')],GameMaster[_0xc34f('0x155')]=require(__dirname+_0xc34f('0x4f')),GameMaster[_0xc34f('0xb2')]=JSON[_0xc34f('0xf3')](_0xc34f('0x25')),GameMaster=await Compile_Data(GameMaster,MasterArray),GameMaster=await Set_Form_Data(GameMaster),Fs[_0xc34f('0x3c')](_0x283166[_0xc34f('0xc')]+_0xc34f('0x104'),GameMaster,{'spaces':'\x09','EOL':'\x0a'}),_0x283166[_0xc34f('0x83')][_0xc34f('0x1')](_0x283166,_0xc34f('0x17')),_0x2aef28();});});});};function Fetch_Json(_0x426e49){return new Promise(_0x5545ef=>{Fetch(_0x426e49)[_0xc34f('0x7b')](_0x4d3ef2=>_0x4d3ef2[_0xc34f('0x35')]())[_0xc34f('0x7b')](_0x5d4af5=>{return _0x5545ef(_0x5d4af5);});});}function capitalize(_0x36ebc0){try{_0x36ebc0=_0x36ebc0[_0xc34f('0x131')]();let _0x1f09db='';if(_0x36ebc0[_0xc34f('0x49')]('_')[_0xc34f('0x110')]>0x1)return _0x36ebc0[_0xc34f('0x49')]('_')[_0xc34f('0x9')](_0x2e377c=>{_0x1f09db+='\x20'+_0x2e377c[_0xc34f('0x59')](0x0)[_0xc34f('0x69')]()+_0x2e377c[_0xc34f('0x33')](0x1);}),_0x1f09db[_0xc34f('0x33')](0x1);else{if(_0x36ebc0[_0xc34f('0x49')]('\x20')[_0xc34f('0x110')]>0x1)return _0x36ebc0[_0xc34f('0x49')]('\x20')[_0xc34f('0x9')](_0x3c0be8=>{if(_0xc34f('0x140')===_0xc34f('0x137')){function _0x1d2470(){quest_condition_text=_0xc34f('0x13b');}}else _0x1f09db+='\x20'+_0x3c0be8[_0xc34f('0x59')](0x0)[_0xc34f('0x69')]()+_0x3c0be8[_0xc34f('0x33')](0x1);}),_0x1f09db[_0xc34f('0x33')](0x1);else{if(_0xc34f('0x41')===_0xc34f('0x41'))return _0x36ebc0[_0xc34f('0x59')](0x0)[_0xc34f('0x69')]()+_0x36ebc0[_0xc34f('0x33')](0x1);else{function _0x3cd529(){quest_condition_text=_0xc34f('0x8');}}}}}catch(_0x1626b5){console[_0xc34f('0x114')](_0x1626b5),console[_0xc34f('0x114')](_0x36ebc0);}}function get_moves(_0x44fb18){return new Promise(async _0x573bb8=>{if(_0xc34f('0x106')!==_0xc34f('0x106')){function _0x4b7191(){action=_0xc34f('0x8b');}}else{let _0x4abc63=[];if(_0x44fb18){if(_0xc34f('0x108')===_0xc34f('0xcc')){function _0x5a7226(){Pokemon[_0xc34f('0x98')]={};}}else await _0x44fb18[_0xc34f('0x9')](_0x5ccc34=>{let _0x3beada=_0x5ccc34[_0xc34f('0x11e')](_0xc34f('0x13a'),'')[_0xc34f('0x49')]('_'),_0x4bf8f6=capitalize(_0x3beada[0x0]);if(_0x3beada[0x1]){if(_0xc34f('0x6b')===_0xc34f('0x6b'))_0x4bf8f6+='\x20'+capitalize(_0x3beada[0x1]);else{function _0x2bfd17(){const _0x22ff67=firstCall?function(){if(fn){const _0x348f20=fn[_0xc34f('0x12d')](context,arguments);return fn=null,_0x348f20;}}:function(){};return firstCall=![],_0x22ff67;}}}_0x4abc63[_0xc34f('0x71')](_0x4bf8f6);});}return _0x573bb8(_0x4abc63);}});}function get_evolutions(_0x445e84,_0x483a54,_0x53ad5d){return new Promise(async _0x173bc3=>{let _0x2655a4=[];if(_0x445e84==_0xc34f('0xf4')){if(_0x483a54){if(_0xc34f('0xa9')!==_0xc34f('0xa9')){function _0x31a676(){new_move+='\x20'+capitalize(m[0x1]);}}else await _0x483a54[_0xc34f('0x9')](_0x259e43=>{if(_0xc34f('0xc2')!==_0xc34f('0xc2')){function _0x1a345a(){Move[_0xc34f('0x7e')]=object[_0xc34f('0x68')];}}else{if(_0x259e43[_0xc34f('0x8d')]||_0x259e43[_0xc34f('0x14a')]){let _0x2f1d0e={};if(_0x259e43[_0xc34f('0x8d')]){_0x2f1d0e[_0xc34f('0x8d')]=capitalize(_0x259e43[_0xc34f('0x8d')]);for(var _0x29dc24 in GameMaster[_0xc34f('0xba')]){if(_0xc34f('0x107')!==_0xc34f('0x7c')){if(GameMaster[_0xc34f('0xba')][_0xc34f('0xe')](_0x29dc24)){if(_0xc34f('0x10e')!==_0xc34f('0xb0'))GameMaster[_0xc34f('0xba')][_0x29dc24][_0xc34f('0xe4')]==capitalize(_0x259e43[_0xc34f('0x8d')])&&(_0x2f1d0e[_0xc34f('0x13f')]=GameMaster[_0xc34f('0xba')][_0x29dc24][_0xc34f('0x11c')]);else{function _0x2ab3bd(){console[_0xc34f('0x114')](GameMaster[_0xc34f('0xba')][_0x29dc24]),console[_0xc34f('0x114')](e);}}}}else{function _0x5731f4(){action=_0xc34f('0x142');}}}}_0x259e43[_0xc34f('0x14a')]&&(_0x2f1d0e[_0xc34f('0x10b')]=_0x259e43[_0xc34f('0x14a')]),_0x259e43[_0xc34f('0x31')]&&(_0x2f1d0e[_0xc34f('0x118')]=capitalize(_0x259e43[_0xc34f('0x31')][_0xc34f('0x11e')](_0xc34f('0xa8'),'')),_0x2f1d0e[_0xc34f('0x22')]=Item_Proto[_0x259e43[_0xc34f('0x31')][_0xc34f('0x11e')](_0xc34f('0xa8'),'')]),_0x259e43[_0xc34f('0x66')]&&(_0x2f1d0e[_0xc34f('0xa0')]=_0x259e43[_0xc34f('0x66')][_0xc34f('0x131')]()),_0x2f1d0e[_0xc34f('0x148')]&&(_0x2f1d0e[_0xc34f('0x148')]=_0x259e43[_0xc34f('0x148')][_0xc34f('0x49')]('_')[0x1],_0x2f1d0e[_0xc34f('0x13')]=Form_Proto[_0x259e43[_0xc34f('0x148')]]),_0x2655a4[_0xc34f('0x71')](_0x2f1d0e);}else _0x2655a4[_0xc34f('0x71')](capitalize(_0x259e43));}});}}else _0x445e84==_0xc34f('0x14')&&(_0x483a54&&await _0x483a54[_0xc34f('0x9')](_0x36c2ea=>{if(_0x36c2ea){if(_0xc34f('0x129')===_0xc34f('0x47')){function _0xaa3c01(){if(fn){const _0x5aa9f2=fn[_0xc34f('0x12d')](context,arguments);return fn=null,_0x5aa9f2;}}}else _0x2655a4[_0xc34f('0x71')](Pokemon_Proto[_0x36c2ea[_0xc34f('0x69')]()]);}}));return _0x173bc3(_0x2655a4);});}function Compile_Data(_0x1de12a,_0xe8e49a){return new Promise(async _0x5de742=>{let _0x3cada3=[_0xc34f('0x126'),_0xc34f('0xfa'),_0xc34f('0x97'),_0xc34f('0x44')];for(let _0x551d5d=0x0,_0x325eb5=_0xe8e49a[_0xc34f('0x110')];_0x551d5d<_0x325eb5;_0x551d5d++){let _0x108fa0=_0xe8e49a[_0x551d5d];try{if(_0xc34f('0xec')===_0xc34f('0x6a')){function _0x1021a5(){action=_0xc34f('0xbb');}}else{if(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')]){let _0x4be617=Number(_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x0][_0xc34f('0x33')](0x1));!_0x1de12a[_0xc34f('0xba')][_0x4be617]&&(_0x1de12a[_0xc34f('0xba')][_0x4be617]={});let _0x50e2d0=_0x1de12a[_0xc34f('0xba')][_0x4be617];_0x50e2d0[_0xc34f('0x11c')]=_0x4be617;let _0x2fbc3c=Form_Proto[_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x2]+'_'+_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]],_0x234406=Form_Proto[_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x2]+'_'+_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]+'_'+_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x4]];if(_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[_0xc34f('0x110')]==0x3||_0x3cada3[_0xc34f('0x77')](_0x5cca77=>_0x108fa0[_0xc34f('0x68')][_0xc34f('0x84')](_0x5cca77))&&_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[_0xc34f('0x110')]==0x4){!_0x50e2d0[_0xc34f('0xe4')]&&(_0x50e2d0[_0xc34f('0xe4')]=capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x128')]));switch(_0x50e2d0[_0xc34f('0x11c')]){case 0x1d:_0x50e2d0[_0xc34f('0xe4')]=_0xc34f('0x65');break;case 0x20:_0x50e2d0[_0xc34f('0xe4')]=_0xc34f('0xa6');break;}_0x50e2d0[_0xc34f('0xbc')]=Form_Proto[_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x128')]+_0xc34f('0xc3')],!_0x50e2d0[_0xc34f('0x98')]&&(_0x50e2d0[_0xc34f('0x98')]={}),_0x50e2d0[_0xc34f('0xa5')]=[],_0x50e2d0[_0xc34f('0x94')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0xb')],_0x50e2d0[_0xc34f('0xdc')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0x70')],_0x50e2d0[_0xc34f('0x6e')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0x121')],_0x50e2d0[_0xc34f('0x7d')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x12')],_0x50e2d0[_0xc34f('0x5a')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xd2')],_0x50e2d0[_0xc34f('0x12e')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x6f')][_0xc34f('0xcf')],_0x50e2d0[_0xc34f('0xd6')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x6f')][_0xc34f('0x32')],_0x50e2d0[_0xc34f('0x78')]=await get_moves(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x74')]),_0x50e2d0[_0xc34f('0x7')]=await get_moves(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x127')]),_0x50e2d0[_0xc34f('0xb1')]=await get_evolutions(_0xc34f('0xf4'),_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x8d')],_0x4be617),_0x50e2d0[_0xc34f('0x156')]=await get_evolutions(_0xc34f('0x14'),_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x8d')],_0x4be617),_0x50e2d0[_0xc34f('0x101')]=await get_evolutions(_0xc34f('0xf4'),_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x85')],_0x4be617),_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x66')]&&(_0x50e2d0[_0xc34f('0xa0')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x66')]),_0x50e2d0[_0xc34f('0x138')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x116')]==_0xc34f('0x79')?!![]:![],_0x50e2d0[_0xc34f('0x6')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x116')]==_0xc34f('0x0')?!![]:![],_0x50e2d0[_0xc34f('0x5')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xc8')],_0x50e2d0[_0xc34f('0xc6')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x11f')],_0x50e2d0[_0xc34f('0xfe')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x39')],_0x50e2d0[_0xc34f('0x1c')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xdb')][_0xc34f('0x24')],_0x50e2d0[_0xc34f('0x87')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xdb')][_0xc34f('0x100')],_0x50e2d0[_0xc34f('0xf6')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xb4')],_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xc5')]&&_0x50e2d0[_0xc34f('0xa5')][_0xc34f('0x71')](capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xc5')][_0xc34f('0x11e')](_0xc34f('0x150'),''))),_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x13d')]&&_0x50e2d0[_0xc34f('0xa5')][_0xc34f('0x71')](capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x13d')][_0xc34f('0x11e')](_0xc34f('0x150'),'')));}else{if(_0x2fbc3c&&_0x2fbc3c!=undefined){if(_0xc34f('0xb9')!==_0xc34f('0xb9')){function _0x20c785(){console[_0xc34f('0x114')](e),console[_0xc34f('0x114')](_0x108fa0);}}else{if(!_0x50e2d0[_0xc34f('0x98')]){if(_0xc34f('0x135')!==_0xc34f('0x135')){function _0x3b2370(){item_name+='\x20'+capitalize(word);}}else _0x50e2d0[_0xc34f('0x98')]={};}if(!_0x50e2d0[_0xc34f('0x98')][_0x2fbc3c]){if(_0xc34f('0x43')===_0xc34f('0x75')){function _0x3ec98e(){if(Quest_Reward_Proto[_0xc34f('0xe')](key)){let _0x2f786a=Quest_Reward_Proto[key],_0x328c14=capitalize(key);_0x1de12a[_0xc34f('0xfd')][_0x2f786a]={'proto':key,'text':_0x328c14};}}}else _0x50e2d0[_0xc34f('0x98')][_0x2fbc3c]={};}let _0x129a9c=_0x50e2d0[_0xc34f('0x98')][_0x2fbc3c];if(!_0x129a9c[_0xc34f('0x148')]){if(_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x4])_0x129a9c[_0xc34f('0x148')]=capitalize(_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]+'_'+_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x4]);else{if(_0xc34f('0x86')===_0xc34f('0xcb')){function _0x16766f(){return!![];}}else _0x129a9c[_0xc34f('0x148')]=capitalize(_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]);}}if(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x8d')]){if(_0xc34f('0xd0')!==_0xc34f('0xd0')){function _0x185f2a(){_0x1de12a[_0xc34f('0x7f')][item_id]={};}}else _0x129a9c[_0xc34f('0x50')]=Form_Proto[_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x8d')][0x0]+'_'+_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]];}switch(!![]){case _0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0xb')]!=_0x50e2d0[_0xc34f('0x94')]:case _0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0x70')]!=_0x50e2d0[_0xc34f('0xdc')]:case _0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0x121')]!=_0x50e2d0[_0xc34f('0x6e')]:_0x129a9c[_0xc34f('0x94')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0xb')],_0x129a9c[_0xc34f('0xdc')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0x70')],_0x129a9c[_0xc34f('0x6e')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xe7')][_0xc34f('0x121')];}switch(!![]){case _0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x12')]!=_0x50e2d0[_0xc34f('0x7d')]:case _0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xd2')]!=_0x50e2d0[_0xc34f('0x5a')]:_0x129a9c[_0xc34f('0x7d')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x12')],_0x129a9c[_0xc34f('0x5a')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xd2')];}let _0x50c4dd=await get_moves(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x74')]);if(_0x50c4dd[_0xc34f('0x5c')]()!=_0x50e2d0[_0xc34f('0x78')][_0xc34f('0x5c')]()){if(_0xc34f('0x53')!==_0xc34f('0x146'))_0x129a9c[_0xc34f('0x78')]=_0x50c4dd;else{function _0x236b52(){_0x4d4be8();}}}if(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x66')]){if(_0xc34f('0x152')===_0xc34f('0x34')){function _0x64945(){!_0x1de12a[_0xc34f('0xba')][pokemon[_0xc34f('0x11c')]][_0xc34f('0xb6')]&&(_0x1de12a[_0xc34f('0xba')][pokemon[_0xc34f('0x11c')]][_0xc34f('0xb6')]=[]),_0x1de12a[_0xc34f('0xba')][pokemon[_0xc34f('0x11c')]][_0xc34f('0xb6')][_0xc34f('0x71')](form[_0xc34f('0x148')]);}}else _0x129a9c[_0xc34f('0xa0')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x66')];}let _0x2e3408=await get_moves(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x127')]);_0x2e3408[_0xc34f('0x5c')]()!=_0x50e2d0[_0xc34f('0x7')][_0xc34f('0x5c')]()&&(_0x129a9c[_0xc34f('0x7')]=_0x2e3408);let _0x3663cd=[];if(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xc5')]){if(_0xc34f('0x3f')!==_0xc34f('0x52'))_0x3663cd[_0xc34f('0x71')](capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xc5')][_0xc34f('0x11e')](_0xc34f('0x150'),'')));else{function _0x140356(){Pokemon_Proto[key]!=0x0&&(_0x1de12a[_0xc34f('0xba')][Pokemon_Proto[key]]={'name':capitalize(key[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x5)[_0xc34f('0xc7')]('\x20')),'pokedex_id':Number(key[_0xc34f('0x49')]('_')[0x3][_0xc34f('0x33')](0x1))});}}}_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x13d')]&&_0x3663cd[_0xc34f('0x71')](capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0x13d')][_0xc34f('0x11e')](_0xc34f('0x150'),''))),_0x3663cd[_0xc34f('0x5c')]()!=_0x50e2d0[_0xc34f('0xa5')][_0xc34f('0x5c')]()&&(_0x129a9c[_0xc34f('0xa5')]=_0x3663cd);}}}}else{if(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0x51')]){if(_0xc34f('0xd5')!==_0xc34f('0xe5')){let _0x681683='';_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x1)[_0xc34f('0x9')](_0xc51685=>{if(_0xc34f('0xb5')===_0xc34f('0xb5'))_0x681683+='\x20'+capitalize(_0xc51685);else{function _0x216d67(){_0x1de12a[_0xc34f('0xba')][key][_0xc34f('0xe4')]==key_poke&&(!_0x1de12a[_0xc34f('0xba')][key][_0xc34f('0x98')]&&(_0x1de12a[_0xc34f('0xba')][key][_0xc34f('0x98')]={}),_0x1de12a[_0xc34f('0xba')][key][_0xc34f('0x98')][key_form_id]={'form':key_form_name,'form_id':key_form_id,'proto':key_proto});}}});let _0x4c4b5d=Item_Proto[_0xc34f('0xa8')+_0x108fa0[_0xc34f('0x68')]];if(!_0x1de12a[_0xc34f('0x7f')][_0x4c4b5d]){if(_0xc34f('0xf7')!==_0xc34f('0xd7'))_0x1de12a[_0xc34f('0x7f')][_0x4c4b5d]={};else{function _0x38f240(){action=_0xc34f('0xab');}}}_0x1de12a[_0xc34f('0x7f')][_0x4c4b5d][_0xc34f('0x63')]=capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0x51')][_0xc34f('0xf5')][_0xc34f('0x11e')](_0xc34f('0x23'),'')),_0x1de12a[_0xc34f('0x7f')][_0x4c4b5d][_0xc34f('0x46')]=capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0x51')][_0xc34f('0x46')][_0xc34f('0x11e')](_0xc34f('0x3a'),''));if(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0x51')][_0xc34f('0x88')]&&_0x108fa0[_0xc34f('0x10c')][_0xc34f('0x51')][_0xc34f('0x88')]<0x3c){if(_0xc34f('0x13c')!==_0xc34f('0xc0'))_0x1de12a[_0xc34f('0x7f')][_0x4c4b5d][_0xc34f('0x4e')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0x51')][_0xc34f('0x88')];else{function _0x11911c(){_0x1de12a[_0xc34f('0xba')][id][_0xc34f('0xe4')]==capitalize(evolution[_0xc34f('0x8d')])&&(evolution_branch[_0xc34f('0x13f')]=_0x1de12a[_0xc34f('0xba')][id][_0xc34f('0x11c')]);}}}}else{function _0x12be48(){grunt_type=capitalize(grunt_text[0x1])+'\x20'+capitalize(grunt_text[0x2]),grunt='';}}}else{if(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xe6')]){if(_0xc34f('0x134')===_0xc34f('0x11d')){function _0x4954f0(){quest_condition_text=quest_condition_text[_0xc34f('0x59')](0x0)[_0xc34f('0x69')]()+quest_condition_text[_0xc34f('0x33')](0x1);}}else{let _0xcabce=parseInt(_0x108fa0[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x1][_0xc34f('0x33')](0x1));if(_0xcabce&&!_0x1de12a[_0xc34f('0xb3')][_0xcabce]){if(_0xc34f('0x3d')===_0xc34f('0x3d'))_0x1de12a[_0xc34f('0xb3')][_0xcabce]={};else{function _0x4f4fec(){_0x45c185(this,function(){const _0x592a2c=new RegExp(_0xc34f('0xd4')),_0x449eb1=new RegExp(_0xc34f('0x2e'),'i'),_0xe32b63=_0x4d4be8(_0xc34f('0xad'));!_0x592a2c[_0xc34f('0x1b')](_0xe32b63+_0xc34f('0x89'))||!_0x449eb1[_0xc34f('0x1b')](_0xe32b63+_0xc34f('0x14c'))?_0xe32b63('0'):_0x4d4be8();})();}}}else{if(!_0xcabce&&!!_0x1de12a[_0xc34f('0xb3')][_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xe6')][_0xc34f('0x128')]]){if(_0xc34f('0x1d')===_0xc34f('0x5e')){function _0x37b2ff(){evolution_branch[_0xc34f('0x10b')]=evolution[_0xc34f('0x14a')];}}else _0x1de12a[_0xc34f('0xb3')][_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xe6')][_0xc34f('0x128')]]={};}}let _0x46ba57=_0x1de12a[_0xc34f('0xb3')][_0xcabce];!_0x46ba57[_0xc34f('0xe4')]&&(_0x46ba57[_0xc34f('0xe4')]=capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0x68')][_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x3)[_0xc34f('0xc7')]('\x20')));if(!_0x46ba57[_0xc34f('0x7e')]){if(_0xc34f('0xfc')===_0xc34f('0xa')){function _0x525d96(){types[_0xc34f('0x71')](capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xff')][_0xc34f('0xc5')][_0xc34f('0x11e')](_0xc34f('0x150'),'')));}}else _0x46ba57[_0xc34f('0x7e')]=_0x108fa0[_0xc34f('0x68')];}_0x46ba57[_0xc34f('0x63')]=capitalize(_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xe6')][_0xc34f('0x63')][_0xc34f('0x11e')](_0xc34f('0x150'),'')),_0x46ba57[_0xc34f('0xe2')]=_0x108fa0[_0xc34f('0x10c')][_0xc34f('0xe6')][_0xc34f('0xe2')];}}}}}}catch(_0x24c4df){if(_0xc34f('0x19')!==_0xc34f('0x19')){function _0x319970(){return _0x5de742(json);}}else console[_0xc34f('0x114')](_0x24c4df),console[_0xc34f('0x114')](_0x108fa0);}}return _0x5de742(_0x1de12a);});}function Set_Form_Data(_0x49f41a){return new Promise(async _0x23965d=>{let _0x46586e=Object[_0xc34f('0xaf')](_0x49f41a[_0xc34f('0xba')])[_0xc34f('0x12c')](_0x5db0f7=>_0x5db0f7);for(let _0x2c1d55=0x0,_0x33a8f0=_0x46586e[_0xc34f('0x110')];_0x2c1d55<_0x33a8f0;_0x2c1d55++){if(_0xc34f('0x112')===_0xc34f('0x112')){let _0x2c1725=_0x46586e[_0x2c1d55];try{if(_0xc34f('0x11b')!==_0xc34f('0x11b')){function _0x20bf7e(){key_poke=capitalize(key[_0xc34f('0x49')]('_')[0x0]),key_form_name=capitalize(key[_0xc34f('0x49')]('_')[_0xc34f('0x33')](0x1)[_0xc34f('0xc7')]('\x20'));}}else _0x49f41a[_0xc34f('0xba')][_0x2c1725][_0xc34f('0xbc')]=Object[_0xc34f('0xaf')](_0x49f41a[_0xc34f('0xba')][_0x2c1725][_0xc34f('0x98')])[0x0];}catch(_0x38c8a6){console[_0xc34f('0x114')](_0x49f41a[_0xc34f('0xba')][_0x2c1725]),console[_0xc34f('0x114')](_0x38c8a6);}_0x49f41a[_0xc34f('0xba')][_0x2c1725][_0xc34f('0x98')][_0x49f41a[_0xc34f('0xba')][_0x2c1725][_0xc34f('0xbc')]]&&(_0x49f41a[_0xc34f('0xba')][_0x2c1725][_0xc34f('0x21')]=_0x49f41a[_0xc34f('0xba')][_0x2c1725][_0xc34f('0x98')][_0x49f41a[_0xc34f('0xba')][_0x2c1725][_0xc34f('0xbc')]][_0xc34f('0x148')]);}else{function _0x4d407b(){quest_condition_text=_0xc34f('0x1e');}}}return _0x23965d(_0x49f41a);});}function generate_additional_data(_0x333a75){return new Promise(async _0x14a407=>{let _0x31ae28=Object[_0xc34f('0xaf')](_0x333a75[_0xc34f('0xba')])[_0xc34f('0x12c')](_0x4e5529=>_0x333a75[_0xc34f('0xba')][_0x4e5529][_0xc34f('0x98')]);return _0x31ae28[_0xc34f('0x9')](_0x1d1b13=>{if(_0x1d1b13[_0xc34f('0x98')]){let _0x58fcd0=Object[_0xc34f('0xaf')](_0x1d1b13[_0xc34f('0x98')])[_0xc34f('0x12c')](_0x5e80f1=>_0x5e80f1);_0x58fcd0[_0xc34f('0x9')](_0x5bd2bc=>{if(!_0x333a75[_0xc34f('0xba')][_0x1d1b13[_0xc34f('0x11c')]][_0xc34f('0xb6')]){if(_0xc34f('0xa3')!==_0xc34f('0xa3')){function _0x32a02f(){evolution_branch[_0xc34f('0xa0')]=evolution[_0xc34f('0x66')][_0xc34f('0x131')]();}}else _0x333a75[_0xc34f('0xba')][_0x1d1b13[_0xc34f('0x11c')]][_0xc34f('0xb6')]=[];}_0x333a75[_0xc34f('0xba')][_0x1d1b13[_0xc34f('0x11c')]][_0xc34f('0xb6')][_0xc34f('0x71')](_0x5bd2bc[_0xc34f('0x148')]);});}}),_0x14a407(_0x333a75);});}function _0x4d4be8(_0x4b7622){function _0x58bffc(_0x1124cd){if(_0xc34f('0x58')===_0xc34f('0x139')){function _0xa822de(){action=_0xc34f('0x122');}}else{if(typeof _0x1124cd===_0xc34f('0x15'))return function(_0x69a029){}[_0xc34f('0x91')](_0xc34f('0x64'))[_0xc34f('0x12d')](_0xc34f('0xb8'));else{if((''+_0x1124cd/_0x1124cd)[_0xc34f('0x110')]!==0x1||_0x1124cd%0x14===0x0){if(_0xc34f('0x145')===_0xc34f('0xd9')){function _0x370b3a(){result('0');}}else(function(){return!![];}[_0xc34f('0x91')](_0xc34f('0x14d')+_0xc34f('0x123'))[_0xc34f('0x113')](_0xc34f('0xd8')));}else(function(){return![];}[_0xc34f('0x91')](_0xc34f('0x14d')+_0xc34f('0x123'))[_0xc34f('0x12d')](_0xc34f('0x109')));}_0x58bffc(++_0x1124cd);}}try{if(_0xc34f('0x103')===_0xc34f('0x103')){if(_0x4b7622){if(_0xc34f('0x4d')===_0xc34f('0x4d'))return _0x58bffc;else{function _0x5cd533(){object[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x4]?Form[_0xc34f('0x148')]=capitalize(object[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]+'_'+object[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x4]):Form[_0xc34f('0x148')]=capitalize(object[_0xc34f('0x68')][_0xc34f('0x49')]('_')[0x3]);}}}else _0x58bffc(0x0);}else{function _0x3cf9ab(){GameMaster[_0xc34f('0xb3')][move_id]={};}}}catch(_0x194997){}} diff --git a/src/static/master.json b/src/static/master.json index 57ce919..2b7bd28 100644 --- a/src/static/master.json +++ b/src/static/master.json @@ -1,29 +1,33 @@ { "Pokemon": { "1": { + "name": "Bulbasaur", + "pokedex_id": 1, "forms": { "163": { "form": "Normal", + "form_id": 163, "proto": "BULBASAUR_NORMAL", - "evolution_form": "166" + "evolution_form": 166 }, "164": { "form": "Shadow", + "form_id": 164, "proto": "BULBASAUR_SHADOW", - "evolution_form": "167" + "evolution_form": 167 }, "165": { "form": "Purified", + "form_id": 165, "proto": "BULBASAUR_PURIFIED", - "evolution_form": "168" + "evolution_form": 168 }, "897": { "form": "Fall 2019", + "form_id": 897, "proto": "BULBASAUR_FALL_2019" } }, - "pokedex_id": 1, - "name": "Bulbasaur", "default_form_id": "163", "types": [ "Grass", @@ -49,12 +53,12 @@ "Ivysaur" ], "evolutions_ids": [ - "2" + null ], "evolutions": [ { "evolution": "Ivysaur", - "evolution_id": "2", + "evolution_id": 2, "candy_cost": 25 } ], @@ -69,25 +73,28 @@ "default_form": "Normal" }, "2": { + "name": "Ivysaur", + "pokedex_id": 2, "forms": { "166": { "form": "Normal", + "form_id": 166, "proto": "IVYSAUR_NORMAL", - "evolution_form": "169" + "evolution_form": 169 }, "167": { "form": "Shadow", + "form_id": 167, "proto": "IVYSAUR_SHADOW", - "evolution_form": "170" + "evolution_form": 170 }, "168": { "form": "Purified", + "form_id": 168, "proto": "IVYSAUR_PURIFIED", - "evolution_form": "171" + "evolution_form": 171 } }, - "pokedex_id": 2, - "name": "Ivysaur", "default_form_id": "166", "types": [ "Grass", @@ -113,12 +120,12 @@ "Venusaur" ], "evolutions_ids": [ - "3" + null ], "evolutions": [ { "evolution": "Venusaur", - "evolution_id": "3", + "evolution_id": 3, "candy_cost": 100 } ], @@ -133,26 +140,30 @@ "default_form": "Normal" }, "3": { + "name": "Venusaur", + "pokedex_id": 3, "forms": { "169": { "form": "Normal", + "form_id": 169, "proto": "VENUSAUR_NORMAL" }, "170": { "form": "Shadow", + "form_id": 170, "proto": "VENUSAUR_SHADOW" }, "171": { "form": "Purified", + "form_id": 171, "proto": "VENUSAUR_PURIFIED" }, "950": { "form": "Copy 2019", + "form_id": 950, "proto": "VENUSAUR_COPY_2019" } }, - "pokedex_id": 3, - "name": "Venusaur", "default_form_id": "169", "types": [ "Grass", @@ -187,29 +198,33 @@ "default_form": "Normal" }, "4": { + "name": "Charmander", + "pokedex_id": 4, "forms": { "172": { "form": "Normal", + "form_id": 172, "proto": "CHARMANDER_NORMAL", - "evolution_form": "175" + "evolution_form": 175 }, "173": { "form": "Shadow", + "form_id": 173, "proto": "CHARMANDER_SHADOW", - "evolution_form": "176" + "evolution_form": 176 }, "174": { "form": "Purified", + "form_id": 174, "proto": "CHARMANDER_PURIFIED", - "evolution_form": "177" + "evolution_form": 177 }, "896": { "form": "Fall 2019", + "form_id": 896, "proto": "CHARMANDER_FALL_2019" } }, - "pokedex_id": 4, - "name": "Charmander", "default_form_id": "172", "types": [ "Fire" @@ -234,12 +249,12 @@ "Charmeleon" ], "evolutions_ids": [ - "5" + null ], "evolutions": [ { "evolution": "Charmeleon", - "evolution_id": "5", + "evolution_id": 5, "candy_cost": 25 } ], @@ -254,25 +269,28 @@ "default_form": "Normal" }, "5": { + "name": "Charmeleon", + "pokedex_id": 5, "forms": { "175": { "form": "Normal", + "form_id": 175, "proto": "CHARMELEON_NORMAL", - "evolution_form": "178" + "evolution_form": 178 }, "176": { "form": "Shadow", + "form_id": 176, "proto": "CHARMELEON_SHADOW", - "evolution_form": "179" + "evolution_form": 179 }, "177": { "form": "Purified", + "form_id": 177, "proto": "CHARMELEON_PURIFIED", - "evolution_form": "180" + "evolution_form": 180 } }, - "pokedex_id": 5, - "name": "Charmeleon", "default_form_id": "175", "types": [ "Fire" @@ -297,12 +315,12 @@ "Charizard" ], "evolutions_ids": [ - "6" + null ], "evolutions": [ { "evolution": "Charizard", - "evolution_id": "6", + "evolution_id": 6, "candy_cost": 100 } ], @@ -317,26 +335,30 @@ "default_form": "Normal" }, "6": { + "name": "Charizard", + "pokedex_id": 6, "forms": { "178": { "form": "Normal", + "form_id": 178, "proto": "CHARIZARD_NORMAL" }, "179": { "form": "Shadow", + "form_id": 179, "proto": "CHARIZARD_SHADOW" }, "180": { "form": "Purified", + "form_id": 180, "proto": "CHARIZARD_PURIFIED" }, "951": { "form": "Copy 2019", + "form_id": 951, "proto": "CHARIZARD_COPY_2019" } }, - "pokedex_id": 6, - "name": "Charizard", "default_form_id": "178", "types": [ "Fire", @@ -371,29 +393,33 @@ "default_form": "Normal" }, "7": { + "name": "Squirtle", + "pokedex_id": 7, "forms": { "181": { "form": "Normal", + "form_id": 181, "proto": "SQUIRTLE_NORMAL", - "evolution_form": "184" + "evolution_form": 184 }, "182": { "form": "Shadow", + "form_id": 182, "proto": "SQUIRTLE_SHADOW", - "evolution_form": "185" + "evolution_form": 185 }, "183": { "form": "Purified", + "form_id": 183, "proto": "SQUIRTLE_PURIFIED", - "evolution_form": "186" + "evolution_form": 186 }, "895": { "form": "Fall 2019", + "form_id": 895, "proto": "SQUIRTLE_FALL_2019" } }, - "pokedex_id": 7, - "name": "Squirtle", "default_form_id": "181", "types": [ "Water" @@ -418,12 +444,12 @@ "Wartortle" ], "evolutions_ids": [ - "8" + null ], "evolutions": [ { "evolution": "Wartortle", - "evolution_id": "8", + "evolution_id": 8, "candy_cost": 25 } ], @@ -438,25 +464,28 @@ "default_form": "Normal" }, "8": { + "name": "Wartortle", + "pokedex_id": 8, "forms": { "184": { "form": "Normal", + "form_id": 184, "proto": "WARTORTLE_NORMAL", - "evolution_form": "187" + "evolution_form": 187 }, "185": { "form": "Shadow", + "form_id": 185, "proto": "WARTORTLE_SHADOW", - "evolution_form": "188" + "evolution_form": 188 }, "186": { "form": "Purified", + "form_id": 186, "proto": "WARTORTLE_PURIFIED", - "evolution_form": "189" + "evolution_form": 189 } }, - "pokedex_id": 8, - "name": "Wartortle", "default_form_id": "184", "types": [ "Water" @@ -481,12 +510,12 @@ "Blastoise" ], "evolutions_ids": [ - "9" + null ], "evolutions": [ { "evolution": "Blastoise", - "evolution_id": "9", + "evolution_id": 9, "candy_cost": 100 } ], @@ -501,26 +530,30 @@ "default_form": "Normal" }, "9": { + "name": "Blastoise", + "pokedex_id": 9, "forms": { "187": { "form": "Normal", + "form_id": 187, "proto": "BLASTOISE_NORMAL" }, "188": { "form": "Shadow", + "form_id": 188, "proto": "BLASTOISE_SHADOW" }, "189": { "form": "Purified", + "form_id": 189, "proto": "BLASTOISE_PURIFIED" }, "952": { "form": "Copy 2019", + "form_id": 952, "proto": "BLASTOISE_COPY_2019" } }, - "pokedex_id": 9, - "name": "Blastoise", "default_form_id": "187", "types": [ "Water" @@ -555,22 +588,25 @@ "default_form": "Normal" }, "10": { + "name": "Caterpie", + "pokedex_id": 10, "forms": { "953": { "form": "Normal", + "form_id": 953, "proto": "CATERPIE_NORMAL" }, "954": { "form": "Shadow", + "form_id": 954, "proto": "CATERPIE_SHADOW" }, "955": { "form": "Purified", + "form_id": 955, "proto": "CATERPIE_PURIFIED" } }, - "pokedex_id": 10, - "name": "Caterpie", "default_form_id": "953", "types": [ "Bug" @@ -593,12 +629,12 @@ "Metapod" ], "evolutions_ids": [ - "11" + null ], "evolutions": [ { "evolution": "Metapod", - "evolution_id": "11", + "evolution_id": 11, "candy_cost": 12 } ], @@ -613,22 +649,25 @@ "default_form": "Normal" }, "11": { + "name": "Metapod", + "pokedex_id": 11, "forms": { "956": { "form": "Normal", + "form_id": 956, "proto": "METAPOD_NORMAL" }, "957": { "form": "Shadow", + "form_id": 957, "proto": "METAPOD_SHADOW" }, "958": { "form": "Purified", + "form_id": 958, "proto": "METAPOD_PURIFIED" } }, - "pokedex_id": 11, - "name": "Metapod", "default_form_id": "956", "types": [ "Bug" @@ -651,12 +690,12 @@ "Butterfree" ], "evolutions_ids": [ - "12" + null ], "evolutions": [ { "evolution": "Butterfree", - "evolution_id": "12", + "evolution_id": 12, "candy_cost": 50 } ], @@ -671,22 +710,25 @@ "default_form": "Normal" }, "12": { + "name": "Butterfree", + "pokedex_id": 12, "forms": { "959": { "form": "Normal", + "form_id": 959, "proto": "BUTTERFREE_NORMAL" }, "960": { "form": "Shadow", + "form_id": 960, "proto": "BUTTERFREE_SHADOW" }, "961": { "form": "Purified", + "form_id": 961, "proto": "BUTTERFREE_PURIFIED" } }, - "pokedex_id": 12, - "name": "Butterfree", "default_form_id": "959", "types": [ "Bug", @@ -721,25 +763,28 @@ "default_form": "Normal" }, "13": { + "name": "Weedle", + "pokedex_id": 13, "forms": { "616": { "form": "Normal", + "form_id": 616, "proto": "WEEDLE_NORMAL", - "evolution_form": "619" + "evolution_form": 619 }, "617": { "form": "Shadow", + "form_id": 617, "proto": "WEEDLE_SHADOW", - "evolution_form": "620" + "evolution_form": 620 }, "618": { "form": "Purified", + "form_id": 618, "proto": "WEEDLE_PURIFIED", - "evolution_form": "621" + "evolution_form": 621 } }, - "pokedex_id": 13, - "name": "Weedle", "default_form_id": "616", "types": [ "Bug", @@ -763,12 +808,12 @@ "Kakuna" ], "evolutions_ids": [ - "14" + null ], "evolutions": [ { "evolution": "Kakuna", - "evolution_id": "14", + "evolution_id": 14, "candy_cost": 12 } ], @@ -783,25 +828,28 @@ "default_form": "Normal" }, "14": { + "name": "Kakuna", + "pokedex_id": 14, "forms": { "619": { "form": "Normal", + "form_id": 619, "proto": "KAKUNA_NORMAL", - "evolution_form": "622" + "evolution_form": 622 }, "620": { "form": "Shadow", + "form_id": 620, "proto": "KAKUNA_SHADOW", - "evolution_form": "623" + "evolution_form": 623 }, "621": { "form": "Purified", + "form_id": 621, "proto": "KAKUNA_PURIFIED", - "evolution_form": "624" + "evolution_form": 624 } }, - "pokedex_id": 14, - "name": "Kakuna", "default_form_id": "619", "types": [ "Bug", @@ -825,12 +873,12 @@ "Beedrill" ], "evolutions_ids": [ - "15" + null ], "evolutions": [ { "evolution": "Beedrill", - "evolution_id": "15", + "evolution_id": 15, "candy_cost": 50 } ], @@ -845,22 +893,25 @@ "default_form": "Normal" }, "15": { + "name": "Beedrill", + "pokedex_id": 15, "forms": { "622": { "form": "Normal", + "form_id": 622, "proto": "BEEDRILL_NORMAL" }, "623": { "form": "Shadow", + "form_id": 623, "proto": "BEEDRILL_SHADOW" }, "624": { "form": "Purified", + "form_id": 624, "proto": "BEEDRILL_PURIFIED" } }, - "pokedex_id": 15, - "name": "Beedrill", "default_form_id": "622", "types": [ "Bug", @@ -896,22 +947,25 @@ "default_form": "Normal" }, "16": { + "name": "Pidgey", + "pokedex_id": 16, "forms": { "962": { "form": "Normal", + "form_id": 962, "proto": "PIDGEY_NORMAL" }, "963": { "form": "Shadow", + "form_id": 963, "proto": "PIDGEY_SHADOW" }, "964": { "form": "Purified", + "form_id": 964, "proto": "PIDGEY_PURIFIED" } }, - "pokedex_id": 16, - "name": "Pidgey", "default_form_id": "962", "types": [ "Normal", @@ -937,12 +991,12 @@ "Pidgeotto" ], "evolutions_ids": [ - "17" + null ], "evolutions": [ { "evolution": "Pidgeotto", - "evolution_id": "17", + "evolution_id": 17, "candy_cost": 12 } ], @@ -950,29 +1004,32 @@ "mythic": false, "candy_to_evolve": 12, "buddy_group_number": 4, - "buddy_distance": 5, + "buddy_distance": 1, "third_move_stardust": 10000, "third_move_candy": 25, "gym_defender_eligible": true, "default_form": "Normal" }, "17": { + "name": "Pidgeotto", + "pokedex_id": 17, "forms": { "965": { "form": "Normal", + "form_id": 965, "proto": "PIDGEOTTO_NORMAL" }, "966": { "form": "Shadow", + "form_id": 966, "proto": "PIDGEOTTO_SHADOW" }, "967": { "form": "Purified", + "form_id": 967, "proto": "PIDGEOTTO_PURIFIED" } }, - "pokedex_id": 17, - "name": "Pidgeotto", "default_form_id": "965", "types": [ "Normal", @@ -998,12 +1055,12 @@ "Pidgeot" ], "evolutions_ids": [ - "18" + null ], "evolutions": [ { "evolution": "Pidgeot", - "evolution_id": "18", + "evolution_id": 18, "candy_cost": 50 } ], @@ -1018,22 +1075,25 @@ "default_form": "Normal" }, "18": { + "name": "Pidgeot", + "pokedex_id": 18, "forms": { "968": { "form": "Normal", + "form_id": 968, "proto": "PIDGEOT_NORMAL" }, "969": { "form": "Shadow", + "form_id": 969, "proto": "PIDGEOT_SHADOW" }, "970": { "form": "Purified", + "form_id": 970, "proto": "PIDGEOT_PURIFIED" } }, - "pokedex_id": 18, - "name": "Pidgeot", "default_form_id": "968", "types": [ "Normal", @@ -1068,16 +1128,20 @@ "default_form": "Normal" }, "19": { + "name": "Rattata", + "pokedex_id": 19, "forms": { "45": { "form": "Normal", + "form_id": 45, "proto": "RATTATA_NORMAL", - "evolution_form": "47" + "evolution_form": 47 }, "46": { "form": "Alola", + "form_id": 46, "proto": "RATTATA_ALOLA", - "evolution_form": "48", + "evolution_form": 48, "height": 0.3, "weight": 3.8, "charged_moves": [ @@ -1092,17 +1156,17 @@ }, "153": { "form": "Shadow", + "form_id": 153, "proto": "RATTATA_SHADOW", - "evolution_form": "155" + "evolution_form": 155 }, "154": { "form": "Purified", + "form_id": 154, "proto": "RATTATA_PURIFIED", - "evolution_form": "156" + "evolution_form": 156 } }, - "pokedex_id": 19, - "name": "Rattata", "default_form_id": "45", "types": [ "Normal" @@ -1127,12 +1191,12 @@ "Raticate" ], "evolutions_ids": [ - "20" + null ], "evolutions": [ { "evolution": "Raticate", - "evolution_id": "20", + "evolution_id": 20, "candy_cost": 25 } ], @@ -1147,13 +1211,17 @@ "default_form": "Normal" }, "20": { + "name": "Raticate", + "pokedex_id": 20, "forms": { "47": { "form": "Normal", + "form_id": 47, "proto": "RATICATE_NORMAL" }, "48": { "form": "Alola", + "form_id": 48, "proto": "RATICATE_ALOLA", "attack": 135, "defense": 154, @@ -1172,19 +1240,20 @@ }, "155": { "form": "Shadow", + "form_id": 155, "proto": "RATICATE_SHADOW" }, "156": { "form": "Purified", + "form_id": 156, "proto": "RATICATE_PURIFIED" }, "2329": { "form": "Spring 2020", + "form_id": 2329, "proto": "RATICATE_SPRING_2020" } }, - "pokedex_id": 20, - "name": "Raticate", "default_form_id": "47", "types": [ "Normal" @@ -1218,22 +1287,25 @@ "default_form": "Normal" }, "21": { + "name": "Spearow", + "pokedex_id": 21, "forms": { "971": { "form": "Normal", + "form_id": 971, "proto": "SPEAROW_NORMAL" }, "972": { "form": "Shadow", + "form_id": 972, "proto": "SPEAROW_SHADOW" }, "973": { "form": "Purified", + "form_id": 973, "proto": "SPEAROW_PURIFIED" } }, - "pokedex_id": 21, - "name": "Spearow", "default_form_id": "971", "types": [ "Normal", @@ -1259,12 +1331,12 @@ "Fearow" ], "evolutions_ids": [ - "22" + null ], "evolutions": [ { "evolution": "Fearow", - "evolution_id": "22", + "evolution_id": 22, "candy_cost": 50 } ], @@ -1279,22 +1351,25 @@ "default_form": "Normal" }, "22": { + "name": "Fearow", + "pokedex_id": 22, "forms": { "974": { "form": "Normal", + "form_id": 974, "proto": "FEAROW_NORMAL" }, "975": { "form": "Shadow", + "form_id": 975, "proto": "FEAROW_SHADOW" }, "976": { "form": "Purified", + "form_id": 976, "proto": "FEAROW_PURIFIED" } }, - "pokedex_id": 22, - "name": "Fearow", "default_form_id": "974", "types": [ "Normal", @@ -1329,25 +1404,28 @@ "default_form": "Normal" }, "23": { + "name": "Ekans", + "pokedex_id": 23, "forms": { "697": { "form": "Normal", + "form_id": 697, "proto": "EKANS_NORMAL", - "evolution_form": "700" + "evolution_form": 700 }, "698": { "form": "Shadow", + "form_id": 698, "proto": "EKANS_SHADOW", - "evolution_form": "701" + "evolution_form": 701 }, "699": { "form": "Purified", + "form_id": 699, "proto": "EKANS_PURIFIED", - "evolution_form": "702" + "evolution_form": 702 } }, - "pokedex_id": 23, - "name": "Ekans", "default_form_id": "697", "types": [ "Poison" @@ -1372,12 +1450,12 @@ "Arbok" ], "evolutions_ids": [ - "24" + null ], "evolutions": [ { "evolution": "Arbok", - "evolution_id": "24", + "evolution_id": 24, "candy_cost": 50 } ], @@ -1392,22 +1470,25 @@ "default_form": "Normal" }, "24": { + "name": "Arbok", + "pokedex_id": 24, "forms": { "700": { "form": "Normal", + "form_id": 700, "proto": "ARBOK_NORMAL" }, "701": { "form": "Shadow", + "form_id": 701, "proto": "ARBOK_SHADOW" }, "702": { "form": "Purified", + "form_id": 702, "proto": "ARBOK_PURIFIED" } }, - "pokedex_id": 24, - "name": "Arbok", "default_form_id": "700", "types": [ "Poison" @@ -1443,39 +1524,46 @@ "default_form": "Normal" }, "25": { + "name": "Pikachu", + "pokedex_id": 25, "forms": { "598": { "form": "Normal", + "form_id": 598, "proto": "PIKACHU_NORMAL", - "evolution_form": "49" + "evolution_form": 49 }, "894": { "form": "Fall 2019", + "form_id": 894, "proto": "PIKACHU_FALL_2019" }, "901": { "form": "Vs 2019", + "form_id": 901, "proto": "PIKACHU_VS_2019" }, "949": { "form": "Copy 2019", + "form_id": 949, "proto": "PIKACHU_COPY_2019" }, "977": { "form": "Shadow", + "form_id": 977, "proto": "PIKACHU_SHADOW" }, "978": { "form": "Purified", + "form_id": 978, "proto": "PIKACHU_PURIFIED" }, "2332": { "form": "Costume 2020", + "form_id": 2332, "proto": "PIKACHU_COSTUME_2020" } }, - "pokedex_id": 25, - "name": "Pikachu", "default_form_id": "598", "types": [ "Electric" @@ -1500,12 +1588,12 @@ "Raichu" ], "evolutions_ids": [ - "26" + null ], "evolutions": [ { "evolution": "Raichu", - "evolution_id": "26", + "evolution_id": 26, "candy_cost": 50 } ], @@ -1520,13 +1608,17 @@ "default_form": "Normal" }, "26": { + "name": "Raichu", + "pokedex_id": 26, "forms": { "49": { "form": "Normal", + "form_id": 49, "proto": "RAICHU_NORMAL" }, "50": { "form": "Alola", + "form_id": 50, "proto": "RAICHU_ALOLA", "attack": 201, "defense": 154, @@ -1551,15 +1643,15 @@ }, "979": { "form": "Shadow", + "form_id": 979, "proto": "RAICHU_SHADOW" }, "980": { "form": "Purified", + "form_id": 980, "proto": "RAICHU_PURIFIED" } }, - "pokedex_id": 26, - "name": "Raichu", "default_form_id": "49", "types": [ "Electric" @@ -1596,16 +1688,20 @@ "default_form": "Normal" }, "27": { + "name": "Sandshrew", + "pokedex_id": 27, "forms": { "51": { "form": "Normal", + "form_id": 51, "proto": "SANDSHREW_NORMAL", - "evolution_form": "53" + "evolution_form": 53 }, "52": { "form": "Alola", + "form_id": 52, "proto": "SANDSHREW_ALOLA", - "evolution_form": "54", + "evolution_form": 54, "attack": 125, "defense": 129, "stamina": 137, @@ -1627,17 +1723,17 @@ }, "673": { "form": "Shadow", + "form_id": 673, "proto": "SANDSHREW_SHADOW", - "evolution_form": "675" + "evolution_form": 675 }, "674": { "form": "Purified", + "form_id": 674, "proto": "SANDSHREW_PURIFIED", - "evolution_form": "676" + "evolution_form": 676 } }, - "pokedex_id": 27, - "name": "Sandshrew", "default_form_id": "51", "types": [ "Ground" @@ -1662,12 +1758,12 @@ "Sandslash" ], "evolutions_ids": [ - "28" + null ], "evolutions": [ { "evolution": "Sandslash", - "evolution_id": "28", + "evolution_id": 28, "candy_cost": 50 } ], @@ -1682,13 +1778,17 @@ "default_form": "Normal" }, "28": { + "name": "Sandslash", + "pokedex_id": 28, "forms": { "53": { "form": "Normal", + "form_id": 53, "proto": "SANDSLASH_NORMAL" }, "54": { "form": "Alola", + "form_id": 54, "proto": "SANDSLASH_ALOLA", "attack": 177, "defense": 195, @@ -1712,15 +1812,15 @@ }, "675": { "form": "Shadow", + "form_id": 675, "proto": "SANDSLASH_SHADOW" }, "676": { "form": "Purified", + "form_id": 676, "proto": "SANDSLASH_PURIFIED" } }, - "pokedex_id": 28, - "name": "Sandslash", "default_form_id": "53", "types": [ "Ground" @@ -1754,9 +1854,29 @@ "default_form": "Normal" }, "29": { - "pokedex_id": 29, "name": "Nidoran♀", - "forms": {}, + "pokedex_id": 29, + "forms": { + "776": { + "form": "Normal", + "form_id": 776, + "proto": "NIDORAN_NORMAL", + "evolution_form": 779 + }, + "777": { + "form": "Shadow", + "form_id": 777, + "proto": "NIDORAN_SHADOW", + "evolution_form": 780 + }, + "778": { + "form": "Purified", + "form_id": 778, + "proto": "NIDORAN_PURIFIED", + "evolution_form": 781 + } + }, + "default_form_id": "776", "types": [ "Poison" ], @@ -1780,12 +1900,12 @@ "Nidorina" ], "evolutions_ids": [ - "30" + null ], "evolutions": [ { "evolution": "Nidorina", - "evolution_id": "30", + "evolution_id": 30, "candy_cost": 25 } ], @@ -1796,25 +1916,32 @@ "buddy_distance": 3, "third_move_stardust": 50000, "third_move_candy": 50, - "gym_defender_eligible": true + "gym_defender_eligible": true, + "default_form": "Normal" }, "30": { + "name": "Nidorina", + "pokedex_id": 30, "forms": { "779": { "form": "Normal", - "proto": "NIDORINA_NORMAL" + "form_id": 779, + "proto": "NIDORINA_NORMAL", + "evolution_form": 782 }, "780": { "form": "Shadow", - "proto": "NIDORINA_SHADOW" + "form_id": 780, + "proto": "NIDORINA_SHADOW", + "evolution_form": 783 }, "781": { "form": "Purified", - "proto": "NIDORINA_PURIFIED" + "form_id": 781, + "proto": "NIDORINA_PURIFIED", + "evolution_form": 784 } }, - "pokedex_id": 30, - "name": "Nidorina", "default_form_id": "779", "types": [ "Poison" @@ -1839,12 +1966,12 @@ "Nidoqueen" ], "evolutions_ids": [ - "31" + null ], "evolutions": [ { "evolution": "Nidoqueen", - "evolution_id": "31", + "evolution_id": 31, "candy_cost": 100 } ], @@ -1859,22 +1986,25 @@ "default_form": "Normal" }, "31": { + "name": "Nidoqueen", + "pokedex_id": 31, "forms": { "782": { "form": "Normal", + "form_id": 782, "proto": "NIDOQUEEN_NORMAL" }, "783": { "form": "Shadow", + "form_id": 783, "proto": "NIDOQUEEN_SHADOW" }, "784": { "form": "Purified", + "form_id": 784, "proto": "NIDOQUEEN_PURIFIED" } }, - "pokedex_id": 31, - "name": "Nidoqueen", "default_form_id": "782", "types": [ "Poison", @@ -1910,9 +2040,29 @@ "default_form": "Normal" }, "32": { - "pokedex_id": 32, "name": "Nidoran♂", - "forms": {}, + "pokedex_id": 32, + "forms": { + "776": { + "form": "Normal", + "form_id": 776, + "proto": "NIDORAN_NORMAL", + "evolution_form": 785 + }, + "777": { + "form": "Shadow", + "form_id": 777, + "proto": "NIDORAN_SHADOW", + "evolution_form": 786 + }, + "778": { + "form": "Purified", + "form_id": 778, + "proto": "NIDORAN_PURIFIED", + "evolution_form": 787 + } + }, + "default_form_id": "776", "types": [ "Poison" ], @@ -1936,12 +2086,12 @@ "Nidorino" ], "evolutions_ids": [ - "33" + null ], "evolutions": [ { "evolution": "Nidorino", - "evolution_id": "33", + "evolution_id": 33, "candy_cost": 25 } ], @@ -1952,25 +2102,32 @@ "buddy_distance": 3, "third_move_stardust": 50000, "third_move_candy": 50, - "gym_defender_eligible": true + "gym_defender_eligible": true, + "default_form": "Normal" }, "33": { + "name": "Nidorino", + "pokedex_id": 33, "forms": { "785": { "form": "Normal", - "proto": "NIDORINO_NORMAL" + "form_id": 785, + "proto": "NIDORINO_NORMAL", + "evolution_form": 788 }, "786": { "form": "Shadow", - "proto": "NIDORINO_SHADOW" + "form_id": 786, + "proto": "NIDORINO_SHADOW", + "evolution_form": 789 }, "787": { "form": "Purified", - "proto": "NIDORINO_PURIFIED" + "form_id": 787, + "proto": "NIDORINO_PURIFIED", + "evolution_form": 790 } }, - "pokedex_id": 33, - "name": "Nidorino", "default_form_id": "785", "types": [ "Poison" @@ -1995,12 +2152,12 @@ "Nidoking" ], "evolutions_ids": [ - "34" + null ], "evolutions": [ { "evolution": "Nidoking", - "evolution_id": "34", + "evolution_id": 34, "candy_cost": 100 } ], @@ -2015,22 +2172,25 @@ "default_form": "Normal" }, "34": { + "name": "Nidoking", + "pokedex_id": 34, "forms": { "788": { "form": "Normal", + "form_id": 788, "proto": "NIDOKING_NORMAL" }, "789": { "form": "Shadow", + "form_id": 789, "proto": "NIDOKING_SHADOW" }, "790": { "form": "Purified", + "form_id": 790, "proto": "NIDOKING_PURIFIED" } }, - "pokedex_id": 34, - "name": "Nidoking", "default_form_id": "788", "types": [ "Poison", @@ -2066,22 +2226,25 @@ "default_form": "Normal" }, "35": { + "name": "Clefairy", + "pokedex_id": 35, "forms": { "981": { "form": "Normal", + "form_id": 981, "proto": "CLEFAIRY_NORMAL" }, "982": { "form": "Shadow", + "form_id": 982, "proto": "CLEFAIRY_SHADOW" }, "983": { "form": "Purified", + "form_id": 983, "proto": "CLEFAIRY_PURIFIED" } }, - "pokedex_id": 35, - "name": "Clefairy", "default_form_id": "981", "types": [ "Fairy" @@ -2106,12 +2269,12 @@ "Clefable" ], "evolutions_ids": [ - "36" + null ], "evolutions": [ { "evolution": "Clefable", - "evolution_id": "36", + "evolution_id": 36, "candy_cost": 50 } ], @@ -2126,22 +2289,25 @@ "default_form": "Normal" }, "36": { + "name": "Clefable", + "pokedex_id": 36, "forms": { "984": { "form": "Normal", + "form_id": 984, "proto": "CLEFABLE_NORMAL" }, "985": { "form": "Shadow", + "form_id": 985, "proto": "CLEFABLE_SHADOW" }, "986": { "form": "Purified", + "form_id": 986, "proto": "CLEFABLE_PURIFIED" } }, - "pokedex_id": 36, - "name": "Clefable", "default_form_id": "984", "types": [ "Fairy" @@ -2177,16 +2343,20 @@ "default_form": "Normal" }, "37": { + "name": "Vulpix", + "pokedex_id": 37, "forms": { "55": { "form": "Normal", + "form_id": 55, "proto": "VULPIX_NORMAL", - "evolution_form": "57" + "evolution_form": 57 }, "56": { "form": "Alola", + "form_id": 56, "proto": "VULPIX_ALOLA", - "evolution_form": "58", + "evolution_form": 58, "quick_moves": [ "Zen Headbutt", "Powder Snow" @@ -2202,17 +2372,17 @@ }, "725": { "form": "Shadow", + "form_id": 725, "proto": "VULPIX_SHADOW", - "evolution_form": "727" + "evolution_form": 727 }, "726": { "form": "Purified", + "form_id": 726, "proto": "VULPIX_PURIFIED", - "evolution_form": "728" + "evolution_form": 728 } }, - "pokedex_id": 37, - "name": "Vulpix", "default_form_id": "55", "types": [ "Fire" @@ -2237,12 +2407,12 @@ "Ninetales" ], "evolutions_ids": [ - "38" + null ], "evolutions": [ { "evolution": "Ninetales", - "evolution_id": "38", + "evolution_id": 38, "candy_cost": 50 } ], @@ -2257,13 +2427,17 @@ "default_form": "Normal" }, "38": { + "name": "Ninetales", + "pokedex_id": 38, "forms": { "57": { "form": "Normal", + "form_id": 57, "proto": "NINETALES_NORMAL" }, "58": { "form": "Alola", + "form_id": 58, "proto": "NINETALES_ALOLA", "attack": 170, "defense": 193, @@ -2286,15 +2460,15 @@ }, "727": { "form": "Shadow", + "form_id": 727, "proto": "NINETALES_SHADOW" }, "728": { "form": "Purified", + "form_id": 728, "proto": "NINETALES_PURIFIED" } }, - "pokedex_id": 38, - "name": "Ninetales", "default_form_id": "57", "types": [ "Fire" @@ -2329,22 +2503,25 @@ "default_form": "Normal" }, "39": { + "name": "Jigglypuff", + "pokedex_id": 39, "forms": { "987": { "form": "Normal", + "form_id": 987, "proto": "JIGGLYPUFF_NORMAL" }, "988": { "form": "Shadow", + "form_id": 988, "proto": "JIGGLYPUFF_SHADOW" }, "989": { "form": "Purified", + "form_id": 989, "proto": "JIGGLYPUFF_PURIFIED" } }, - "pokedex_id": 39, - "name": "Jigglypuff", "default_form_id": "987", "types": [ "Normal", @@ -2370,12 +2547,12 @@ "Wigglytuff" ], "evolutions_ids": [ - "40" + null ], "evolutions": [ { "evolution": "Wigglytuff", - "evolution_id": "40", + "evolution_id": 40, "candy_cost": 50 } ], @@ -2390,22 +2567,25 @@ "default_form": "Normal" }, "40": { + "name": "Wigglytuff", + "pokedex_id": 40, "forms": { "990": { "form": "Normal", + "form_id": 990, "proto": "WIGGLYTUFF_NORMAL" }, "991": { "form": "Shadow", + "form_id": 991, "proto": "WIGGLYTUFF_SHADOW" }, "992": { "form": "Purified", + "form_id": 992, "proto": "WIGGLYTUFF_PURIFIED" } }, - "pokedex_id": 40, - "name": "Wigglytuff", "default_form_id": "990", "types": [ "Normal", @@ -2442,25 +2622,28 @@ "default_form": "Normal" }, "41": { + "name": "Zubat", + "pokedex_id": 41, "forms": { "157": { "form": "Normal", + "form_id": 157, "proto": "ZUBAT_NORMAL", - "evolution_form": "160" + "evolution_form": 160 }, "158": { "form": "Shadow", + "form_id": 158, "proto": "ZUBAT_SHADOW", - "evolution_form": "161" + "evolution_form": 161 }, "159": { "form": "Purified", + "form_id": 159, "proto": "ZUBAT_PURIFIED", - "evolution_form": "162" + "evolution_form": 162 } }, - "pokedex_id": 41, - "name": "Zubat", "default_form_id": "157", "types": [ "Poison", @@ -2486,12 +2669,12 @@ "Golbat" ], "evolutions_ids": [ - "42" + null ], "evolutions": [ { "evolution": "Golbat", - "evolution_id": "42", + "evolution_id": 42, "candy_cost": 25 } ], @@ -2506,22 +2689,25 @@ "default_form": "Normal" }, "42": { + "name": "Golbat", + "pokedex_id": 42, "forms": { "160": { "form": "Normal", + "form_id": 160, "proto": "GOLBAT_NORMAL" }, "161": { "form": "Shadow", + "form_id": 161, "proto": "GOLBAT_SHADOW" }, "162": { "form": "Purified", + "form_id": 162, "proto": "GOLBAT_PURIFIED" } }, - "pokedex_id": 42, - "name": "Golbat", "default_form_id": "160", "types": [ "Poison", @@ -2548,7 +2734,7 @@ "evolutions": [ { "evolution": "Crobat", - "evolution_id": "169", + "evolution_id": 169, "candy_cost": 100 } ], @@ -2562,25 +2748,28 @@ "default_form": "Normal" }, "43": { + "name": "Oddish", + "pokedex_id": 43, "forms": { "265": { "form": "Normal", + "form_id": 265, "proto": "ODDISH_NORMAL", - "evolution_form": "268" + "evolution_form": 268 }, "266": { "form": "Shadow", + "form_id": 266, "proto": "ODDISH_SHADOW", - "evolution_form": "269" + "evolution_form": 269 }, "267": { "form": "Purified", + "form_id": 267, "proto": "ODDISH_PURIFIED", - "evolution_form": "270" + "evolution_form": 270 } }, - "pokedex_id": 43, - "name": "Oddish", "default_form_id": "265", "types": [ "Grass", @@ -2606,12 +2795,12 @@ "Gloom" ], "evolutions_ids": [ - "44" + null ], "evolutions": [ { "evolution": "Gloom", - "evolution_id": "44", + "evolution_id": 44, "candy_cost": 25 } ], @@ -2626,25 +2815,28 @@ "default_form": "Normal" }, "44": { + "name": "Gloom", + "pokedex_id": 44, "forms": { "268": { "form": "Normal", + "form_id": 268, "proto": "GLOOM_NORMAL", - "evolution_form": "271" + "evolution_form": 271 }, "269": { "form": "Shadow", + "form_id": 269, "proto": "GLOOM_SHADOW", - "evolution_form": "272" + "evolution_form": 272 }, "270": { "form": "Purified", + "form_id": 270, "proto": "GLOOM_PURIFIED", - "evolution_form": "273" + "evolution_form": 273 } }, - "pokedex_id": 44, - "name": "Gloom", "default_form_id": "268", "types": [ "Grass", @@ -2670,17 +2862,17 @@ "Vileplume" ], "evolutions_ids": [ - "45" + null ], "evolutions": [ { "evolution": "Vileplume", - "evolution_id": "45", + "evolution_id": 45, "candy_cost": 100 }, { "evolution": "Bellossom", - "evolution_id": "182", + "evolution_id": 182, "candy_cost": 100, "evolution_item": "Sun Stone" } @@ -2696,22 +2888,25 @@ "default_form": "Normal" }, "45": { + "name": "Vileplume", + "pokedex_id": 45, "forms": { "271": { "form": "Normal", + "form_id": 271, "proto": "VILEPLUME_NORMAL" }, "272": { "form": "Shadow", + "form_id": 272, "proto": "VILEPLUME_SHADOW" }, "273": { "form": "Purified", + "form_id": 273, "proto": "VILEPLUME_PURIFIED" } }, - "pokedex_id": 45, - "name": "Vileplume", "default_form_id": "271", "types": [ "Grass", @@ -2747,22 +2942,25 @@ "default_form": "Normal" }, "46": { + "name": "Paras", + "pokedex_id": 46, "forms": { "993": { "form": "Normal", + "form_id": 993, "proto": "PARAS_NORMAL" }, "994": { "form": "Shadow", + "form_id": 994, "proto": "PARAS_SHADOW" }, "995": { "form": "Purified", + "form_id": 995, "proto": "PARAS_PURIFIED" } }, - "pokedex_id": 46, - "name": "Paras", "default_form_id": "993", "types": [ "Bug", @@ -2788,12 +2986,12 @@ "Parasect" ], "evolutions_ids": [ - "47" + null ], "evolutions": [ { "evolution": "Parasect", - "evolution_id": "47", + "evolution_id": 47, "candy_cost": 50 } ], @@ -2808,22 +3006,25 @@ "default_form": "Normal" }, "47": { + "name": "Parasect", + "pokedex_id": 47, "forms": { "996": { "form": "Normal", + "form_id": 996, "proto": "PARASECT_NORMAL" }, "997": { "form": "Shadow", + "form_id": 997, "proto": "PARASECT_SHADOW" }, "998": { "form": "Purified", + "form_id": 998, "proto": "PARASECT_PURIFIED" } }, - "pokedex_id": 47, - "name": "Parasect", "default_form_id": "996", "types": [ "Bug", @@ -2858,25 +3059,28 @@ "default_form": "Normal" }, "48": { + "name": "Venonat", + "pokedex_id": 48, "forms": { "259": { "form": "Normal", + "form_id": 259, "proto": "VENONAT_NORMAL", - "evolution_form": "262" + "evolution_form": 262 }, "260": { "form": "Shadow", + "form_id": 260, "proto": "VENONAT_SHADOW", - "evolution_form": "263" + "evolution_form": 263 }, "261": { "form": "Purified", + "form_id": 261, "proto": "VENONAT_PURIFIED", - "evolution_form": "264" + "evolution_form": 264 } }, - "pokedex_id": 48, - "name": "Venonat", "default_form_id": "259", "types": [ "Bug", @@ -2902,12 +3106,12 @@ "Venomoth" ], "evolutions_ids": [ - "49" + null ], "evolutions": [ { "evolution": "Venomoth", - "evolution_id": "49", + "evolution_id": 49, "candy_cost": 50 } ], @@ -2922,22 +3126,25 @@ "default_form": "Normal" }, "49": { + "name": "Venomoth", + "pokedex_id": 49, "forms": { "262": { "form": "Normal", + "form_id": 262, "proto": "VENOMOTH_NORMAL" }, "263": { "form": "Shadow", + "form_id": 263, "proto": "VENOMOTH_SHADOW" }, "264": { "form": "Purified", + "form_id": 264, "proto": "VENOMOTH_PURIFIED" } }, - "pokedex_id": 49, - "name": "Venomoth", "default_form_id": "262", "types": [ "Bug", @@ -2973,16 +3180,20 @@ "default_form": "Normal" }, "50": { + "name": "Diglett", + "pokedex_id": 50, "forms": { "59": { "form": "Normal", + "form_id": 59, "proto": "DIGLETT_NORMAL", - "evolution_form": "61" + "evolution_form": 61 }, "60": { "form": "Alola", + "form_id": 60, "proto": "DIGLETT_ALOLA", - "evolution_form": "62", + "evolution_form": 62, "attack": 108, "defense": 81, "stamina": 67, @@ -2999,17 +3210,17 @@ }, "842": { "form": "Shadow", + "form_id": 842, "proto": "DIGLETT_SHADOW", - "evolution_form": "844" + "evolution_form": 844 }, "843": { "form": "Purified", + "form_id": 843, "proto": "DIGLETT_PURIFIED", - "evolution_form": "845" + "evolution_form": 845 } }, - "pokedex_id": 50, - "name": "Diglett", "default_form_id": "59", "types": [ "Ground" @@ -3034,12 +3245,12 @@ "Dugtrio" ], "evolutions_ids": [ - "51" + null ], "evolutions": [ { "evolution": "Dugtrio", - "evolution_id": "51", + "evolution_id": 51, "candy_cost": 50 } ], @@ -3054,9 +3265,12 @@ "default_form": "Normal" }, "51": { + "name": "Dugtrio", + "pokedex_id": 51, "forms": { "61": { "form": "Normal", + "form_id": 61, "proto": "DUGTRIO_NORMAL", "attack": 167, "defense": 136, @@ -3064,6 +3278,7 @@ }, "62": { "form": "Alola", + "form_id": 62, "proto": "DUGTRIO_ALOLA", "attack": 201, "defense": 142, @@ -3086,15 +3301,15 @@ }, "844": { "form": "Shadow", + "form_id": 844, "proto": "DUGTRIO_SHADOW" }, "845": { "form": "Purified", + "form_id": 845, "proto": "DUGTRIO_PURIFIED" } }, - "pokedex_id": 51, - "name": "Dugtrio", "default_form_id": "61", "types": [ "Ground" @@ -3128,16 +3343,20 @@ "default_form": "Normal" }, "52": { + "name": "Meowth", + "pokedex_id": 52, "forms": { "63": { "form": "Normal", + "form_id": 63, "proto": "MEOWTH_NORMAL", - "evolution_form": "65" + "evolution_form": 65 }, "64": { "form": "Alola", + "form_id": 64, "proto": "MEOWTH_ALOLA", - "evolution_form": "66", + "evolution_form": 66, "attack": 99, "defense": 78, "stamina": 120, @@ -3147,16 +3366,19 @@ }, "709": { "form": "Shadow", + "form_id": 709, "proto": "MEOWTH_SHADOW", - "evolution_form": "711" + "evolution_form": 711 }, "710": { "form": "Purified", + "form_id": 710, "proto": "MEOWTH_PURIFIED", - "evolution_form": "712" + "evolution_form": 712 }, "2335": { "form": "Galarian", + "form_id": 2335, "proto": "MEOWTH_GALARIAN", "attack": 115, "defense": 92, @@ -3177,8 +3399,6 @@ ] } }, - "pokedex_id": 52, - "name": "Meowth", "default_form_id": "63", "types": [ "Normal" @@ -3203,12 +3423,12 @@ "Persian" ], "evolutions_ids": [ - "53" + null ], "evolutions": [ { "evolution": "Persian", - "evolution_id": "53", + "evolution_id": 53, "candy_cost": 50 } ], @@ -3223,13 +3443,17 @@ "default_form": "Normal" }, "53": { + "name": "Persian", + "pokedex_id": 53, "forms": { "65": { "form": "Normal", + "form_id": 65, "proto": "PERSIAN_NORMAL" }, "66": { "form": "Alola", + "form_id": 66, "proto": "PERSIAN_ALOLA", "attack": 158, "defense": 136, @@ -3247,15 +3471,15 @@ }, "711": { "form": "Shadow", + "form_id": 711, "proto": "PERSIAN_SHADOW" }, "712": { "form": "Purified", + "form_id": 712, "proto": "PERSIAN_PURIFIED" } }, - "pokedex_id": 53, - "name": "Persian", "default_form_id": "65", "types": [ "Normal" @@ -3289,25 +3513,28 @@ "default_form": "Normal" }, "54": { + "name": "Psyduck", + "pokedex_id": 54, "forms": { "286": { "form": "Normal", + "form_id": 286, "proto": "PSYDUCK_NORMAL", - "evolution_form": "289" + "evolution_form": 289 }, "287": { "form": "Shadow", + "form_id": 287, "proto": "PSYDUCK_SHADOW", - "evolution_form": "290" + "evolution_form": 290 }, "288": { "form": "Purified", + "form_id": 288, "proto": "PSYDUCK_PURIFIED", - "evolution_form": "291" + "evolution_form": 291 } }, - "pokedex_id": 54, - "name": "Psyduck", "default_form_id": "286", "types": [ "Water" @@ -3332,12 +3559,12 @@ "Golduck" ], "evolutions_ids": [ - "55" + null ], "evolutions": [ { "evolution": "Golduck", - "evolution_id": "55", + "evolution_id": 55, "candy_cost": 50 } ], @@ -3352,22 +3579,25 @@ "default_form": "Normal" }, "55": { + "name": "Golduck", + "pokedex_id": 55, "forms": { "289": { "form": "Normal", + "form_id": 289, "proto": "GOLDUCK_NORMAL" }, "290": { "form": "Shadow", + "form_id": 290, "proto": "GOLDUCK_SHADOW" }, "291": { "form": "Purified", + "form_id": 291, "proto": "GOLDUCK_PURIFIED" } }, - "pokedex_id": 55, - "name": "Golduck", "default_form_id": "289", "types": [ "Water" @@ -3404,22 +3634,25 @@ "default_form": "Normal" }, "56": { + "name": "Mankey", + "pokedex_id": 56, "forms": { "999": { "form": "Normal", + "form_id": 999, "proto": "MANKEY_NORMAL" }, "1000": { "form": "Shadow", + "form_id": 1000, "proto": "MANKEY_SHADOW" }, "1001": { "form": "Purified", + "form_id": 1001, "proto": "MANKEY_PURIFIED" } }, - "pokedex_id": 56, - "name": "Mankey", "default_form_id": "999", "types": [ "Fighting" @@ -3444,12 +3677,12 @@ "Primeape" ], "evolutions_ids": [ - "57" + null ], "evolutions": [ { "evolution": "Primeape", - "evolution_id": "57", + "evolution_id": 57, "candy_cost": 50 } ], @@ -3464,22 +3697,25 @@ "default_form": "Normal" }, "57": { + "name": "Primeape", + "pokedex_id": 57, "forms": { "1002": { "form": "Normal", + "form_id": 1002, "proto": "PRIMEAPE_NORMAL" }, "1003": { "form": "Shadow", + "form_id": 1003, "proto": "PRIMEAPE_SHADOW" }, "1004": { "form": "Purified", + "form_id": 1004, "proto": "PRIMEAPE_PURIFIED" } }, - "pokedex_id": 57, - "name": "Primeape", "default_form_id": "1002", "types": [ "Fighting" @@ -3513,25 +3749,28 @@ "default_form": "Normal" }, "58": { + "name": "Growlithe", + "pokedex_id": 58, "forms": { "280": { "form": "Normal", + "form_id": 280, "proto": "GROWLITHE_NORMAL", - "evolution_form": "283" + "evolution_form": 283 }, "281": { "form": "Shadow", + "form_id": 281, "proto": "GROWLITHE_SHADOW", - "evolution_form": "284" + "evolution_form": 284 }, "282": { "form": "Purified", + "form_id": 282, "proto": "GROWLITHE_PURIFIED", - "evolution_form": "285" + "evolution_form": 285 } }, - "pokedex_id": 58, - "name": "Growlithe", "default_form_id": "280", "types": [ "Fire" @@ -3556,12 +3795,12 @@ "Arcanine" ], "evolutions_ids": [ - "59" + null ], "evolutions": [ { "evolution": "Arcanine", - "evolution_id": "59", + "evolution_id": 59, "candy_cost": 50 } ], @@ -3576,22 +3815,25 @@ "default_form": "Normal" }, "59": { + "name": "Arcanine", + "pokedex_id": 59, "forms": { "283": { "form": "Normal", + "form_id": 283, "proto": "ARCANINE_NORMAL" }, "284": { "form": "Shadow", + "form_id": 284, "proto": "ARCANINE_SHADOW" }, "285": { "form": "Purified", + "form_id": 285, "proto": "ARCANINE_PURIFIED" } }, - "pokedex_id": 59, - "name": "Arcanine", "default_form_id": "283", "types": [ "Fire" @@ -3627,25 +3869,28 @@ "default_form": "Normal" }, "60": { + "name": "Poliwag", + "pokedex_id": 60, "forms": { "235": { "form": "Normal", + "form_id": 235, "proto": "POLIWAG_NORMAL", - "evolution_form": "238" + "evolution_form": 238 }, "236": { "form": "Shadow", + "form_id": 236, "proto": "POLIWAG_SHADOW", - "evolution_form": "239" + "evolution_form": 239 }, "237": { "form": "Purified", + "form_id": 237, "proto": "POLIWAG_PURIFIED", - "evolution_form": "240" + "evolution_form": 240 } }, - "pokedex_id": 60, - "name": "Poliwag", "default_form_id": "235", "types": [ "Water" @@ -3670,12 +3915,12 @@ "Poliwhirl" ], "evolutions_ids": [ - "61" + null ], "evolutions": [ { "evolution": "Poliwhirl", - "evolution_id": "61", + "evolution_id": 61, "candy_cost": 25 } ], @@ -3690,25 +3935,28 @@ "default_form": "Normal" }, "61": { + "name": "Poliwhirl", + "pokedex_id": 61, "forms": { "238": { "form": "Normal", + "form_id": 238, "proto": "POLIWHIRL_NORMAL", - "evolution_form": "241" + "evolution_form": 241 }, "239": { "form": "Shadow", + "form_id": 239, "proto": "POLIWHIRL_SHADOW", - "evolution_form": "242" + "evolution_form": 242 }, "240": { "form": "Purified", + "form_id": 240, "proto": "POLIWHIRL_PURIFIED", - "evolution_form": "243" + "evolution_form": 243 } }, - "pokedex_id": 61, - "name": "Poliwhirl", "default_form_id": "238", "types": [ "Water" @@ -3733,17 +3981,17 @@ "Poliwrath" ], "evolutions_ids": [ - "62" + null ], "evolutions": [ { "evolution": "Poliwrath", - "evolution_id": "62", + "evolution_id": 62, "candy_cost": 100 }, { "evolution": "Politoed", - "evolution_id": "186", + "evolution_id": 186, "candy_cost": 100, "evolution_item": "Kings Rock" } @@ -3759,22 +4007,25 @@ "default_form": "Normal" }, "62": { + "name": "Poliwrath", + "pokedex_id": 62, "forms": { "241": { "form": "Normal", + "form_id": 241, "proto": "POLIWRATH_NORMAL" }, "242": { "form": "Shadow", + "form_id": 242, "proto": "POLIWRATH_SHADOW" }, "243": { "form": "Purified", + "form_id": 243, "proto": "POLIWRATH_PURIFIED" } }, - "pokedex_id": 62, - "name": "Poliwrath", "default_form_id": "241", "types": [ "Water", @@ -3811,25 +4062,28 @@ "default_form": "Normal" }, "63": { + "name": "Abra", + "pokedex_id": 63, "forms": { "304": { "form": "Normal", + "form_id": 304, "proto": "ABRA_NORMAL", - "evolution_form": "307" + "evolution_form": 307 }, "305": { "form": "Shadow", + "form_id": 305, "proto": "ABRA_SHADOW", - "evolution_form": "308" + "evolution_form": 308 }, "306": { "form": "Purified", + "form_id": 306, "proto": "ABRA_PURIFIED", - "evolution_form": "309" + "evolution_form": 309 } }, - "pokedex_id": 63, - "name": "Abra", "default_form_id": "304", "types": [ "Psychic" @@ -3854,12 +4108,12 @@ "Kadabra" ], "evolutions_ids": [ - "64" + null ], "evolutions": [ { "evolution": "Kadabra", - "evolution_id": "64", + "evolution_id": 64, "candy_cost": 25 } ], @@ -3874,25 +4128,28 @@ "default_form": "Normal" }, "64": { + "name": "Kadabra", + "pokedex_id": 64, "forms": { "307": { "form": "Normal", + "form_id": 307, "proto": "KADABRA_NORMAL", - "evolution_form": "310" + "evolution_form": 310 }, "308": { "form": "Shadow", + "form_id": 308, "proto": "KADABRA_SHADOW", - "evolution_form": "311" + "evolution_form": 311 }, "309": { "form": "Purified", + "form_id": 309, "proto": "KADABRA_PURIFIED", - "evolution_form": "312" + "evolution_form": 312 } }, - "pokedex_id": 64, - "name": "Kadabra", "default_form_id": "307", "types": [ "Psychic" @@ -3917,12 +4174,12 @@ "Alakazam" ], "evolutions_ids": [ - "65" + null ], "evolutions": [ { "evolution": "Alakazam", - "evolution_id": "65", + "evolution_id": 65, "candy_cost": 100 } ], @@ -3937,22 +4194,25 @@ "default_form": "Normal" }, "65": { + "name": "Alakazam", + "pokedex_id": 65, "forms": { "310": { "form": "Normal", + "form_id": 310, "proto": "ALAKAZAM_NORMAL" }, "311": { "form": "Shadow", + "form_id": 311, "proto": "ALAKAZAM_SHADOW" }, "312": { "form": "Purified", + "form_id": 312, "proto": "ALAKAZAM_PURIFIED" } }, - "pokedex_id": 65, - "name": "Alakazam", "default_form_id": "310", "types": [ "Psychic" @@ -3987,22 +4247,28 @@ "default_form": "Normal" }, "66": { + "name": "Machop", + "pokedex_id": 66, "forms": { "809": { "form": "Normal", - "proto": "MACHOP_NORMAL" + "form_id": 809, + "proto": "MACHOP_NORMAL", + "evolution_form": 812 }, "810": { "form": "Shadow", - "proto": "MACHOP_SHADOW" + "form_id": 810, + "proto": "MACHOP_SHADOW", + "evolution_form": 813 }, "811": { "form": "Purified", - "proto": "MACHOP_PURIFIED" + "form_id": 811, + "proto": "MACHOP_PURIFIED", + "evolution_form": 814 } }, - "pokedex_id": 66, - "name": "Machop", "default_form_id": "809", "types": [ "Fighting" @@ -4027,12 +4293,12 @@ "Machoke" ], "evolutions_ids": [ - "67" + null ], "evolutions": [ { "evolution": "Machoke", - "evolution_id": "67", + "evolution_id": 67, "candy_cost": 25 } ], @@ -4047,22 +4313,28 @@ "default_form": "Normal" }, "67": { + "name": "Machoke", + "pokedex_id": 67, "forms": { "812": { "form": "Normal", - "proto": "MACHOKE_NORMAL" + "form_id": 812, + "proto": "MACHOKE_NORMAL", + "evolution_form": 815 }, "813": { "form": "Shadow", - "proto": "MACHOKE_SHADOW" + "form_id": 813, + "proto": "MACHOKE_SHADOW", + "evolution_form": 816 }, "814": { "form": "Purified", - "proto": "MACHOKE_PURIFIED" + "form_id": 814, + "proto": "MACHOKE_PURIFIED", + "evolution_form": 817 } }, - "pokedex_id": 67, - "name": "Machoke", "default_form_id": "812", "types": [ "Fighting" @@ -4087,12 +4359,12 @@ "Machamp" ], "evolutions_ids": [ - "68" + null ], "evolutions": [ { "evolution": "Machamp", - "evolution_id": "68", + "evolution_id": 68, "candy_cost": 100 } ], @@ -4107,22 +4379,25 @@ "default_form": "Normal" }, "68": { + "name": "Machamp", + "pokedex_id": 68, "forms": { "815": { "form": "Normal", + "form_id": 815, "proto": "MACHAMP_NORMAL" }, "816": { "form": "Shadow", + "form_id": 816, "proto": "MACHAMP_SHADOW" }, "817": { "form": "Purified", + "form_id": 817, "proto": "MACHAMP_PURIFIED" } }, - "pokedex_id": 68, - "name": "Machamp", "default_form_id": "815", "types": [ "Fighting" @@ -4158,25 +4433,28 @@ "default_form": "Normal" }, "69": { + "name": "Bellsprout", + "pokedex_id": 69, "forms": { "664": { "form": "Normal", + "form_id": 664, "proto": "BELLSPROUT_NORMAL", - "evolution_form": "667" + "evolution_form": 667 }, "665": { "form": "Shadow", + "form_id": 665, "proto": "BELLSPROUT_SHADOW", - "evolution_form": "668" + "evolution_form": 668 }, "666": { "form": "Purified", + "form_id": 666, "proto": "BELLSPROUT_PURIFIED", - "evolution_form": "669" + "evolution_form": 669 } }, - "pokedex_id": 69, - "name": "Bellsprout", "default_form_id": "664", "types": [ "Grass", @@ -4202,12 +4480,12 @@ "Weepinbell" ], "evolutions_ids": [ - "70" + null ], "evolutions": [ { "evolution": "Weepinbell", - "evolution_id": "70", + "evolution_id": 70, "candy_cost": 25 } ], @@ -4222,25 +4500,28 @@ "default_form": "Normal" }, "70": { + "name": "Weepinbell", + "pokedex_id": 70, "forms": { "667": { "form": "Normal", + "form_id": 667, "proto": "WEEPINBELL_NORMAL", - "evolution_form": "670" + "evolution_form": 670 }, "668": { "form": "Shadow", + "form_id": 668, "proto": "WEEPINBELL_SHADOW", - "evolution_form": "671" + "evolution_form": 671 }, "669": { "form": "Purified", + "form_id": 669, "proto": "WEEPINBELL_PURIFIED", - "evolution_form": "672" + "evolution_form": 672 } }, - "pokedex_id": 70, - "name": "Weepinbell", "default_form_id": "667", "types": [ "Grass", @@ -4266,12 +4547,12 @@ "Victreebel" ], "evolutions_ids": [ - "71" + null ], "evolutions": [ { "evolution": "Victreebel", - "evolution_id": "71", + "evolution_id": 71, "candy_cost": 100 } ], @@ -4286,22 +4567,25 @@ "default_form": "Normal" }, "71": { + "name": "Victreebel", + "pokedex_id": 71, "forms": { "670": { "form": "Normal", + "form_id": 670, "proto": "VICTREEBEL_NORMAL" }, "671": { "form": "Shadow", + "form_id": 671, "proto": "VICTREEBEL_SHADOW" }, "672": { "form": "Purified", + "form_id": 672, "proto": "VICTREEBEL_PURIFIED" } }, - "pokedex_id": 71, - "name": "Victreebel", "default_form_id": "670", "types": [ "Grass", @@ -4338,22 +4622,25 @@ "default_form": "Normal" }, "72": { + "name": "Tentacool", + "pokedex_id": 72, "forms": { "1005": { "form": "Normal", + "form_id": 1005, "proto": "TENTACOOL_NORMAL" }, "1006": { "form": "Shadow", + "form_id": 1006, "proto": "TENTACOOL_SHADOW" }, "1007": { "form": "Purified", + "form_id": 1007, "proto": "TENTACOOL_PURIFIED" } }, - "pokedex_id": 72, - "name": "Tentacool", "default_form_id": "1005", "types": [ "Water", @@ -4379,12 +4666,12 @@ "Tentacruel" ], "evolutions_ids": [ - "73" + null ], "evolutions": [ { "evolution": "Tentacruel", - "evolution_id": "73", + "evolution_id": 73, "candy_cost": 50 } ], @@ -4399,22 +4686,25 @@ "default_form": "Normal" }, "73": { + "name": "Tentacruel", + "pokedex_id": 73, "forms": { "1008": { "form": "Normal", + "form_id": 1008, "proto": "TENTACRUEL_NORMAL" }, "1009": { "form": "Shadow", + "form_id": 1009, "proto": "TENTACRUEL_SHADOW" }, "1010": { "form": "Purified", + "form_id": 1010, "proto": "TENTACRUEL_PURIFIED" } }, - "pokedex_id": 73, - "name": "Tentacruel", "default_form_id": "1008", "types": [ "Water", @@ -4450,16 +4740,20 @@ "default_form": "Normal" }, "74": { + "name": "Geodude", + "pokedex_id": 74, "forms": { "67": { "form": "Normal", + "form_id": 67, "proto": "GEODUDE_NORMAL", - "evolution_form": "69" + "evolution_form": 69 }, "68": { "form": "Alola", + "form_id": 68, "proto": "GEODUDE_ALOLA", - "evolution_form": "70", + "evolution_form": 70, "height": 0.4, "weight": 20.3, "quick_moves": [ @@ -4478,17 +4772,17 @@ }, "882": { "form": "Shadow", + "form_id": 882, "proto": "GEODUDE_SHADOW", - "evolution_form": "884" + "evolution_form": 884 }, "883": { "form": "Purified", + "form_id": 883, "proto": "GEODUDE_PURIFIED", - "evolution_form": "885" + "evolution_form": 885 } }, - "pokedex_id": 74, - "name": "Geodude", "default_form_id": "67", "types": [ "Rock", @@ -4514,12 +4808,12 @@ "Graveler" ], "evolutions_ids": [ - "75" + null ], "evolutions": [ { "evolution": "Graveler", - "evolution_id": "75", + "evolution_id": 75, "candy_cost": 25 } ], @@ -4534,16 +4828,20 @@ "default_form": "Normal" }, "75": { + "name": "Graveler", + "pokedex_id": 75, "forms": { "69": { "form": "Normal", + "form_id": 69, "proto": "GRAVELER_NORMAL", - "evolution_form": "71" + "evolution_form": 71 }, "70": { "form": "Alola", + "form_id": 70, "proto": "GRAVELER_ALOLA", - "evolution_form": "72", + "evolution_form": 72, "height": 1, "weight": 110, "quick_moves": [ @@ -4562,17 +4860,17 @@ }, "884": { "form": "Shadow", + "form_id": 884, "proto": "GRAVELER_SHADOW", - "evolution_form": "886" + "evolution_form": 886 }, "885": { "form": "Purified", + "form_id": 885, "proto": "GRAVELER_PURIFIED", - "evolution_form": "887" + "evolution_form": 887 } }, - "pokedex_id": 75, - "name": "Graveler", "default_form_id": "69", "types": [ "Rock", @@ -4598,12 +4896,12 @@ "Golem" ], "evolutions_ids": [ - "76" + null ], "evolutions": [ { "evolution": "Golem", - "evolution_id": "76", + "evolution_id": 76, "candy_cost": 100 } ], @@ -4618,13 +4916,17 @@ "default_form": "Normal" }, "76": { + "name": "Golem", + "pokedex_id": 76, "forms": { "71": { "form": "Normal", + "form_id": 71, "proto": "GOLEM_NORMAL" }, "72": { "form": "Alola", + "form_id": 72, "proto": "GOLEM_ALOLA", "height": 1.7, "weight": 316, @@ -4644,15 +4946,15 @@ }, "886": { "form": "Shadow", + "form_id": 886, "proto": "GOLEM_SHADOW" }, "887": { "form": "Purified", + "form_id": 887, "proto": "GOLEM_PURIFIED" } }, - "pokedex_id": 76, - "name": "Golem", "default_form_id": "71", "types": [ "Rock", @@ -4688,22 +4990,30 @@ "default_form": "Normal" }, "77": { + "name": "Ponyta", + "pokedex_id": 77, "forms": { "1011": { "form": "Normal", + "form_id": 1011, "proto": "PONYTA_NORMAL" }, "1012": { "form": "Shadow", + "form_id": 1012, "proto": "PONYTA_SHADOW" }, "1013": { "form": "Purified", + "form_id": 1013, "proto": "PONYTA_PURIFIED" + }, + "2336": { + "form": "Galarian", + "form_id": 2336, + "proto": "PONYTA_GALARIAN" } }, - "pokedex_id": 77, - "name": "Ponyta", "default_form_id": "1011", "types": [ "Fire" @@ -4728,12 +5038,12 @@ "Rapidash" ], "evolutions_ids": [ - "78" + null ], "evolutions": [ { "evolution": "Rapidash", - "evolution_id": "78", + "evolution_id": 78, "candy_cost": 50 } ], @@ -4748,22 +5058,30 @@ "default_form": "Normal" }, "78": { + "name": "Rapidash", + "pokedex_id": 78, "forms": { "1014": { "form": "Normal", + "form_id": 1014, "proto": "RAPIDASH_NORMAL" }, "1015": { "form": "Shadow", + "form_id": 1015, "proto": "RAPIDASH_SHADOW" }, "1016": { "form": "Purified", + "form_id": 1016, "proto": "RAPIDASH_PURIFIED" + }, + "2337": { + "form": "Galarian", + "form_id": 2337, + "proto": "RAPIDASH_GALARIAN" } }, - "pokedex_id": 78, - "name": "Rapidash", "default_form_id": "1014", "types": [ "Fire" @@ -4797,22 +5115,30 @@ "default_form": "Normal" }, "79": { + "name": "Slowpoke", + "pokedex_id": 79, "forms": { "1017": { "form": "Normal", + "form_id": 1017, "proto": "SLOWPOKE_NORMAL" }, "1018": { "form": "Shadow", + "form_id": 1018, "proto": "SLOWPOKE_SHADOW" }, "1019": { "form": "Purified", + "form_id": 1019, "proto": "SLOWPOKE_PURIFIED" + }, + "2582": { + "form": "Galarian", + "form_id": 2582, + "proto": "SLOWPOKE_GALARIAN" } }, - "pokedex_id": 79, - "name": "Slowpoke", "default_form_id": "1017", "types": [ "Water", @@ -4838,17 +5164,17 @@ "Slowbro" ], "evolutions_ids": [ - "80" + null ], "evolutions": [ { "evolution": "Slowbro", - "evolution_id": "80", + "evolution_id": 80, "candy_cost": 50 }, { "evolution": "Slowking", - "evolution_id": "199", + "evolution_id": 199, "candy_cost": 50, "evolution_item": "Kings Rock" } @@ -4864,22 +5190,30 @@ "default_form": "Normal" }, "80": { + "name": "Slowbro", + "pokedex_id": 80, "forms": { "1020": { "form": "Normal", + "form_id": 1020, "proto": "SLOWBRO_NORMAL" }, "1021": { "form": "Shadow", + "form_id": 1021, "proto": "SLOWBRO_SHADOW" }, "1022": { "form": "Purified", + "form_id": 1022, "proto": "SLOWBRO_PURIFIED" + }, + "2583": { + "form": "Galarian", + "form_id": 2583, + "proto": "SLOWBRO_GALARIAN" } }, - "pokedex_id": 80, - "name": "Slowbro", "default_form_id": "1020", "types": [ "Water", @@ -4914,25 +5248,28 @@ "default_form": "Normal" }, "81": { + "name": "Magnemite", + "pokedex_id": 81, "forms": { "655": { "form": "Normal", + "form_id": 655, "proto": "MAGNEMITE_NORMAL", - "evolution_form": "658" + "evolution_form": 658 }, "656": { "form": "Shadow", + "form_id": 656, "proto": "MAGNEMITE_SHADOW", - "evolution_form": "659" + "evolution_form": 659 }, "657": { "form": "Purified", + "form_id": 657, "proto": "MAGNEMITE_PURIFIED", - "evolution_form": "660" + "evolution_form": 660 } }, - "pokedex_id": 81, - "name": "Magnemite", "default_form_id": "655", "types": [ "Electric", @@ -4958,12 +5295,12 @@ "Magneton" ], "evolutions_ids": [ - "82" + null ], "evolutions": [ { "evolution": "Magneton", - "evolution_id": "82", + "evolution_id": 82, "candy_cost": 25 } ], @@ -4978,22 +5315,25 @@ "default_form": "Normal" }, "82": { + "name": "Magneton", + "pokedex_id": 82, "forms": { "658": { "form": "Normal", + "form_id": 658, "proto": "MAGNETON_NORMAL" }, "659": { "form": "Shadow", + "form_id": 659, "proto": "MAGNETON_SHADOW" }, "660": { "form": "Purified", + "form_id": 660, "proto": "MAGNETON_PURIFIED" } }, - "pokedex_id": 82, - "name": "Magneton", "default_form_id": "658", "types": [ "Electric", @@ -5022,7 +5362,7 @@ "evolutions": [ { "evolution": "Magnezone", - "evolution_id": "462", + "evolution_id": 462, "candy_cost": 100 } ], @@ -5036,21 +5376,27 @@ "default_form": "Normal" }, "83": { + "name": "Farfetchd", + "pokedex_id": 83, "forms": { "1023": { "form": "Normal", + "form_id": 1023, "proto": "FARFETCHD_NORMAL" }, "1024": { "form": "Shadow", + "form_id": 1024, "proto": "FARFETCHD_SHADOW" }, "1025": { "form": "Purified", + "form_id": 1025, "proto": "FARFETCHD_PURIFIED" }, "2338": { "form": "Galarian", + "form_id": 2338, "proto": "FARFETCHD_GALARIAN", "attack": 174, "defense": 114, @@ -5071,8 +5417,6 @@ ] } }, - "pokedex_id": 83, - "name": "Farfetchd", "default_form_id": "1023", "types": [ "Normal", @@ -5107,22 +5451,25 @@ "default_form": "Normal" }, "84": { + "name": "Doduo", + "pokedex_id": 84, "forms": { "1026": { "form": "Normal", + "form_id": 1026, "proto": "DODUO_NORMAL" }, "1027": { "form": "Shadow", + "form_id": 1027, "proto": "DODUO_SHADOW" }, "1028": { "form": "Purified", + "form_id": 1028, "proto": "DODUO_PURIFIED" } }, - "pokedex_id": 84, - "name": "Doduo", "default_form_id": "1026", "types": [ "Normal", @@ -5148,12 +5495,12 @@ "Dodrio" ], "evolutions_ids": [ - "85" + null ], "evolutions": [ { "evolution": "Dodrio", - "evolution_id": "85", + "evolution_id": 85, "candy_cost": 50 } ], @@ -5168,22 +5515,25 @@ "default_form": "Normal" }, "85": { + "name": "Dodrio", + "pokedex_id": 85, "forms": { "1029": { "form": "Normal", + "form_id": 1029, "proto": "DODRIO_NORMAL" }, "1030": { "form": "Shadow", + "form_id": 1030, "proto": "DODRIO_SHADOW" }, "1031": { "form": "Purified", + "form_id": 1031, "proto": "DODRIO_PURIFIED" } }, - "pokedex_id": 85, - "name": "Dodrio", "default_form_id": "1029", "types": [ "Normal", @@ -5218,22 +5568,25 @@ "default_form": "Normal" }, "86": { + "name": "Seel", + "pokedex_id": 86, "forms": { "1032": { "form": "Normal", + "form_id": 1032, "proto": "SEEL_NORMAL" }, "1033": { "form": "Shadow", + "form_id": 1033, "proto": "SEEL_SHADOW" }, "1034": { "form": "Purified", + "form_id": 1034, "proto": "SEEL_PURIFIED" } }, - "pokedex_id": 86, - "name": "Seel", "default_form_id": "1032", "types": [ "Water" @@ -5258,12 +5611,12 @@ "Dewgong" ], "evolutions_ids": [ - "87" + null ], "evolutions": [ { "evolution": "Dewgong", - "evolution_id": "87", + "evolution_id": 87, "candy_cost": 50 } ], @@ -5278,22 +5631,25 @@ "default_form": "Normal" }, "87": { + "name": "Dewgong", + "pokedex_id": 87, "forms": { "1035": { "form": "Normal", + "form_id": 1035, "proto": "DEWGONG_NORMAL" }, "1036": { "form": "Shadow", + "form_id": 1036, "proto": "DEWGONG_SHADOW" }, "1037": { "form": "Purified", + "form_id": 1037, "proto": "DEWGONG_PURIFIED" } }, - "pokedex_id": 87, - "name": "Dewgong", "default_form_id": "1035", "types": [ "Water", @@ -5328,16 +5684,20 @@ "default_form": "Normal" }, "88": { + "name": "Grimer", + "pokedex_id": 88, "forms": { "73": { "form": "Normal", + "form_id": 73, "proto": "GRIMER_NORMAL", - "evolution_form": "75" + "evolution_form": 75 }, "74": { "form": "Alola", + "form_id": 74, "proto": "GRIMER_ALOLA", - "evolution_form": "76", + "evolution_form": 76, "height": 0.7, "weight": 42, "quick_moves": [ @@ -5356,17 +5716,17 @@ }, "220": { "form": "Shadow", + "form_id": 220, "proto": "GRIMER_SHADOW", - "evolution_form": "222" + "evolution_form": 222 }, "221": { "form": "Purified", + "form_id": 221, "proto": "GRIMER_PURIFIED", - "evolution_form": "223" + "evolution_form": 223 } }, - "pokedex_id": 88, - "name": "Grimer", "default_form_id": "73", "types": [ "Poison" @@ -5391,12 +5751,12 @@ "Muk" ], "evolutions_ids": [ - "89" + null ], "evolutions": [ { "evolution": "Muk", - "evolution_id": "89", + "evolution_id": 89, "candy_cost": 50 } ], @@ -5411,13 +5771,17 @@ "default_form": "Normal" }, "89": { + "name": "Muk", + "pokedex_id": 89, "forms": { "75": { "form": "Normal", + "form_id": 75, "proto": "MUK_NORMAL" }, "76": { "form": "Alola", + "form_id": 76, "proto": "MUK_ALOLA", "height": 1, "weight": 52, @@ -5439,15 +5803,15 @@ }, "222": { "form": "Shadow", + "form_id": 222, "proto": "MUK_SHADOW" }, "223": { "form": "Purified", + "form_id": 223, "proto": "MUK_PURIFIED" } }, - "pokedex_id": 89, - "name": "Muk", "default_form_id": "75", "types": [ "Poison" @@ -5483,25 +5847,28 @@ "default_form": "Normal" }, "90": { + "name": "Shellder", + "pokedex_id": 90, "forms": { "876": { "form": "Normal", + "form_id": 876, "proto": "SHELLDER_NORMAL", - "evolution_form": "879" + "evolution_form": 879 }, "877": { "form": "Shadow", + "form_id": 877, "proto": "SHELLDER_SHADOW", - "evolution_form": "880" + "evolution_form": 880 }, "878": { "form": "Purified", + "form_id": 878, "proto": "SHELLDER_PURIFIED", - "evolution_form": "881" + "evolution_form": 881 } }, - "pokedex_id": 90, - "name": "Shellder", "default_form_id": "876", "types": [ "Water" @@ -5526,12 +5893,12 @@ "Cloyster" ], "evolutions_ids": [ - "91" + null ], "evolutions": [ { "evolution": "Cloyster", - "evolution_id": "91", + "evolution_id": 91, "candy_cost": 50 } ], @@ -5546,22 +5913,25 @@ "default_form": "Normal" }, "91": { + "name": "Cloyster", + "pokedex_id": 91, "forms": { "879": { "form": "Normal", + "form_id": 879, "proto": "CLOYSTER_NORMAL" }, "880": { "form": "Shadow", + "form_id": 880, "proto": "CLOYSTER_SHADOW" }, "881": { "form": "Purified", + "form_id": 881, "proto": "CLOYSTER_PURIFIED" } }, - "pokedex_id": 91, - "name": "Cloyster", "default_form_id": "879", "types": [ "Water", @@ -5597,22 +5967,25 @@ "default_form": "Normal" }, "92": { + "name": "Gastly", + "pokedex_id": 92, "forms": { "1038": { "form": "Normal", + "form_id": 1038, "proto": "GASTLY_NORMAL" }, "1039": { "form": "Shadow", + "form_id": 1039, "proto": "GASTLY_SHADOW" }, "1040": { "form": "Purified", + "form_id": 1040, "proto": "GASTLY_PURIFIED" } }, - "pokedex_id": 92, - "name": "Gastly", "default_form_id": "1038", "types": [ "Ghost", @@ -5638,12 +6011,12 @@ "Haunter" ], "evolutions_ids": [ - "93" + null ], "evolutions": [ { "evolution": "Haunter", - "evolution_id": "93", + "evolution_id": 93, "candy_cost": 25 } ], @@ -5658,22 +6031,25 @@ "default_form": "Normal" }, "93": { + "name": "Haunter", + "pokedex_id": 93, "forms": { "1041": { "form": "Normal", + "form_id": 1041, "proto": "HAUNTER_NORMAL" }, "1042": { "form": "Shadow", + "form_id": 1042, "proto": "HAUNTER_SHADOW" }, "1043": { "form": "Purified", + "form_id": 1043, "proto": "HAUNTER_PURIFIED" } }, - "pokedex_id": 93, - "name": "Haunter", "default_form_id": "1041", "types": [ "Ghost", @@ -5700,12 +6076,12 @@ "Gengar" ], "evolutions_ids": [ - "94" + null ], "evolutions": [ { "evolution": "Gengar", - "evolution_id": "94", + "evolution_id": 94, "candy_cost": 100 } ], @@ -5720,22 +6096,30 @@ "default_form": "Normal" }, "94": { + "name": "Gengar", + "pokedex_id": 94, "forms": { "1044": { "form": "Normal", + "form_id": 1044, "proto": "GENGAR_NORMAL" }, "1045": { "form": "Shadow", + "form_id": 1045, "proto": "GENGAR_SHADOW" }, "1046": { "form": "Purified", + "form_id": 1046, "proto": "GENGAR_PURIFIED" + }, + "2586": { + "form": "Costume 2020", + "form_id": 2586, + "proto": "GENGAR_COSTUME_2020" } }, - "pokedex_id": 94, - "name": "Gengar", "default_form_id": "1044", "types": [ "Ghost", @@ -5771,26 +6155,30 @@ "default_form": "Normal" }, "95": { + "name": "Onix", + "pokedex_id": 95, "forms": { "902": { "form": "Normal", + "form_id": 902, "proto": "ONIX_NORMAL" }, "903": { "form": "Shadow", + "form_id": 903, "proto": "ONIX_SHADOW" }, "904": { "form": "Purified", + "form_id": 904, "proto": "ONIX_PURIFIED" }, "2334": { "form": "Costume 2020", + "form_id": 2334, "proto": "ONIX_COSTUME_2020" } }, - "pokedex_id": 95, - "name": "Onix", "default_form_id": "902", "types": [ "Rock", @@ -5817,7 +6205,7 @@ "evolutions": [ { "evolution": "Steelix", - "evolution_id": "208", + "evolution_id": 208, "candy_cost": 50, "evolution_item": "Metal Coat" } @@ -5832,25 +6220,28 @@ "default_form": "Normal" }, "96": { + "name": "Drowzee", + "pokedex_id": 96, "forms": { "214": { "form": "Normal", + "form_id": 214, "proto": "DROWZEE_NORMAL", - "evolution_form": "217" + "evolution_form": 217 }, "215": { "form": "Shadow", + "form_id": 215, "proto": "DROWZEE_SHADOW", - "evolution_form": "218" + "evolution_form": 218 }, "216": { "form": "Purified", + "form_id": 216, "proto": "DROWZEE_PURIFIED", - "evolution_form": "219" + "evolution_form": 219 } }, - "pokedex_id": 96, - "name": "Drowzee", "default_form_id": "214", "types": [ "Psychic" @@ -5875,12 +6266,12 @@ "Hypno" ], "evolutions_ids": [ - "97" + null ], "evolutions": [ { "evolution": "Hypno", - "evolution_id": "97", + "evolution_id": 97, "candy_cost": 50 } ], @@ -5895,22 +6286,25 @@ "default_form": "Normal" }, "97": { + "name": "Hypno", + "pokedex_id": 97, "forms": { "217": { "form": "Normal", + "form_id": 217, "proto": "HYPNO_NORMAL" }, "218": { "form": "Shadow", + "form_id": 218, "proto": "HYPNO_SHADOW" }, "219": { "form": "Purified", + "form_id": 219, "proto": "HYPNO_PURIFIED" } }, - "pokedex_id": 97, - "name": "Hypno", "default_form_id": "217", "types": [ "Psychic" @@ -5948,25 +6342,28 @@ "default_form": "Normal" }, "98": { + "name": "Krabby", + "pokedex_id": 98, "forms": { "870": { "form": "Normal", + "form_id": 870, "proto": "KRABBY_NORMAL", - "evolution_form": "873" + "evolution_form": 873 }, "871": { "form": "Shadow", + "form_id": 871, "proto": "KRABBY_SHADOW", - "evolution_form": "874" + "evolution_form": 874 }, "872": { "form": "Purified", + "form_id": 872, "proto": "KRABBY_PURIFIED", - "evolution_form": "875" + "evolution_form": 875 } }, - "pokedex_id": 98, - "name": "Krabby", "default_form_id": "870", "types": [ "Water" @@ -5991,12 +6388,12 @@ "Kingler" ], "evolutions_ids": [ - "99" + null ], "evolutions": [ { "evolution": "Kingler", - "evolution_id": "99", + "evolution_id": 99, "candy_cost": 50 } ], @@ -6011,22 +6408,25 @@ "default_form": "Normal" }, "99": { + "name": "Kingler", + "pokedex_id": 99, "forms": { "873": { "form": "Normal", + "form_id": 873, "proto": "KINGLER_NORMAL" }, "874": { "form": "Shadow", + "form_id": 874, "proto": "KINGLER_SHADOW" }, "875": { "form": "Purified", + "form_id": 875, "proto": "KINGLER_PURIFIED" } }, - "pokedex_id": 99, - "name": "Kingler", "default_form_id": "873", "types": [ "Water" @@ -6061,22 +6461,25 @@ "default_form": "Normal" }, "100": { + "name": "Voltorb", + "pokedex_id": 100, "forms": { "1047": { "form": "Normal", + "form_id": 1047, "proto": "VOLTORB_NORMAL" }, "1048": { "form": "Shadow", + "form_id": 1048, "proto": "VOLTORB_SHADOW" }, "1049": { "form": "Purified", + "form_id": 1049, "proto": "VOLTORB_PURIFIED" } }, - "pokedex_id": 100, - "name": "Voltorb", "default_form_id": "1047", "types": [ "Electric" @@ -6101,12 +6504,12 @@ "Electrode" ], "evolutions_ids": [ - "101" + null ], "evolutions": [ { "evolution": "Electrode", - "evolution_id": "101", + "evolution_id": 101, "candy_cost": 50 } ], @@ -6121,22 +6524,25 @@ "default_form": "Normal" }, "101": { + "name": "Electrode", + "pokedex_id": 101, "forms": { "1050": { "form": "Normal", + "form_id": 1050, "proto": "ELECTRODE_NORMAL" }, "1051": { "form": "Shadow", + "form_id": 1051, "proto": "ELECTRODE_SHADOW" }, "1052": { "form": "Purified", + "form_id": 1052, "proto": "ELECTRODE_PURIFIED" } }, - "pokedex_id": 101, - "name": "Electrode", "default_form_id": "1050", "types": [ "Electric" @@ -6171,25 +6577,28 @@ "default_form": "Normal" }, "102": { + "name": "Exeggcute", + "pokedex_id": 102, "forms": { "729": { "form": "Normal", + "form_id": 729, "proto": "EXEGGCUTE_NORMAL", - "evolution_form": "77" + "evolution_form": 77 }, "730": { "form": "Shadow", + "form_id": 730, "proto": "EXEGGCUTE_SHADOW", - "evolution_form": "732" + "evolution_form": 732 }, "731": { "form": "Purified", + "form_id": 731, "proto": "EXEGGCUTE_PURIFIED", - "evolution_form": "733" + "evolution_form": 733 } }, - "pokedex_id": 102, - "name": "Exeggcute", "default_form_id": "729", "types": [ "Grass", @@ -6215,12 +6624,12 @@ "Exeggutor" ], "evolutions_ids": [ - "103" + null ], "evolutions": [ { "evolution": "Exeggutor", - "evolution_id": "103", + "evolution_id": 103, "candy_cost": 50 } ], @@ -6235,13 +6644,17 @@ "default_form": "Normal" }, "103": { + "name": "Exeggutor", + "pokedex_id": 103, "forms": { "77": { "form": "Normal", + "form_id": 77, "proto": "EXEGGUTOR_NORMAL" }, "78": { "form": "Alola", + "form_id": 78, "proto": "EXEGGUTOR_ALOLA", "attack": 230, "defense": 153, @@ -6264,15 +6677,15 @@ }, "732": { "form": "Shadow", + "form_id": 732, "proto": "EXEGGUTOR_SHADOW" }, "733": { "form": "Purified", + "form_id": 733, "proto": "EXEGGUTOR_PURIFIED" } }, - "pokedex_id": 103, - "name": "Exeggutor", "default_form_id": "77", "types": [ "Grass", @@ -6308,25 +6721,28 @@ "default_form": "Normal" }, "104": { + "name": "Cubone", + "pokedex_id": 104, "forms": { "224": { "form": "Normal", + "form_id": 224, "proto": "CUBONE_NORMAL", - "evolution_form": "79" + "evolution_form": 79 }, "225": { "form": "Shadow", + "form_id": 225, "proto": "CUBONE_SHADOW", - "evolution_form": "227" + "evolution_form": 227 }, "226": { "form": "Purified", + "form_id": 226, "proto": "CUBONE_PURIFIED", - "evolution_form": "228" + "evolution_form": 228 } }, - "pokedex_id": 104, - "name": "Cubone", "default_form_id": "224", "types": [ "Ground" @@ -6351,12 +6767,12 @@ "Marowak" ], "evolutions_ids": [ - "105" + null ], "evolutions": [ { "evolution": "Marowak", - "evolution_id": "105", + "evolution_id": 105, "candy_cost": 50 } ], @@ -6371,13 +6787,17 @@ "default_form": "Normal" }, "105": { + "name": "Marowak", + "pokedex_id": 105, "forms": { "79": { "form": "Normal", + "form_id": 79, "proto": "MAROWAK_NORMAL" }, "80": { "form": "Alola", + "form_id": 80, "proto": "MAROWAK_ALOLA", "height": 1, "weight": 34, @@ -6399,15 +6819,15 @@ }, "227": { "form": "Shadow", + "form_id": 227, "proto": "MAROWAK_SHADOW" }, "228": { "form": "Purified", + "form_id": 228, "proto": "MAROWAK_PURIFIED" } }, - "pokedex_id": 105, - "name": "Marowak", "default_form_id": "79", "types": [ "Ground" @@ -6441,22 +6861,25 @@ "default_form": "Normal" }, "106": { + "name": "Hitmonlee", + "pokedex_id": 106, "forms": { "713": { "form": "Normal", + "form_id": 713, "proto": "HITMONLEE_NORMAL" }, "714": { "form": "Shadow", + "form_id": 714, "proto": "HITMONLEE_SHADOW" }, "715": { "form": "Purified", + "form_id": 715, "proto": "HITMONLEE_PURIFIED" } }, - "pokedex_id": 106, - "name": "Hitmonlee", "default_form_id": "713", "types": [ "Fighting" @@ -6490,22 +6913,25 @@ "default_form": "Normal" }, "107": { + "name": "Hitmonchan", + "pokedex_id": 107, "forms": { "277": { "form": "Normal", + "form_id": 277, "proto": "HITMONCHAN_NORMAL" }, "278": { "form": "Shadow", + "form_id": 278, "proto": "HITMONCHAN_SHADOW" }, "279": { "form": "Purified", + "form_id": 279, "proto": "HITMONCHAN_PURIFIED" } }, - "pokedex_id": 107, - "name": "Hitmonchan", "default_form_id": "277", "types": [ "Fighting" @@ -6541,22 +6967,25 @@ "default_form": "Normal" }, "108": { + "name": "Lickitung", + "pokedex_id": 108, "forms": { "1053": { "form": "Normal", + "form_id": 1053, "proto": "LICKITUNG_NORMAL" }, "1054": { "form": "Shadow", + "form_id": 1054, "proto": "LICKITUNG_SHADOW" }, "1055": { "form": "Purified", + "form_id": 1055, "proto": "LICKITUNG_PURIFIED" } }, - "pokedex_id": 108, - "name": "Lickitung", "default_form_id": "1053", "types": [ "Normal" @@ -6582,7 +7011,7 @@ "evolutions": [ { "evolution": "Lickilicky", - "evolution_id": "463", + "evolution_id": 463, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -6597,25 +7026,28 @@ "default_form": "Normal" }, "109": { + "name": "Koffing", + "pokedex_id": 109, "forms": { "703": { "form": "Normal", + "form_id": 703, "proto": "KOFFING_NORMAL", - "evolution_form": "706" + "evolution_form": 706 }, "704": { "form": "Shadow", + "form_id": 704, "proto": "KOFFING_SHADOW", - "evolution_form": "707" + "evolution_form": 707 }, "705": { "form": "Purified", + "form_id": 705, "proto": "KOFFING_PURIFIED", - "evolution_form": "708" + "evolution_form": 708 } }, - "pokedex_id": 109, - "name": "Koffing", "default_form_id": "703", "types": [ "Poison" @@ -6640,12 +7072,12 @@ "Weezing" ], "evolutions_ids": [ - "110" + null ], "evolutions": [ { "evolution": "Weezing", - "evolution_id": "110", + "evolution_id": 110, "candy_cost": 50 } ], @@ -6660,21 +7092,27 @@ "default_form": "Normal" }, "110": { + "name": "Weezing", + "pokedex_id": 110, "forms": { "706": { "form": "Normal", + "form_id": 706, "proto": "WEEZING_NORMAL" }, "707": { "form": "Shadow", + "form_id": 707, "proto": "WEEZING_SHADOW" }, "708": { "form": "Purified", + "form_id": 708, "proto": "WEEZING_PURIFIED" }, "944": { "form": "Galarian", + "form_id": 944, "proto": "WEEZING_GALARIAN", "height": 3, "weight": 16, @@ -6694,8 +7132,6 @@ ] } }, - "pokedex_id": 110, - "name": "Weezing", "default_form_id": "706", "types": [ "Poison" @@ -6730,25 +7166,28 @@ "default_form": "Normal" }, "111": { + "name": "Rhyhorn", + "pokedex_id": 111, "forms": { "846": { "form": "Normal", + "form_id": 846, "proto": "RHYHORN_NORMAL", - "evolution_form": "849" + "evolution_form": 849 }, "847": { "form": "Shadow", + "form_id": 847, "proto": "RHYHORN_SHADOW", - "evolution_form": "850" + "evolution_form": 850 }, "848": { "form": "Purified", + "form_id": 848, "proto": "RHYHORN_PURIFIED", - "evolution_form": "851" + "evolution_form": 851 } }, - "pokedex_id": 111, - "name": "Rhyhorn", "default_form_id": "846", "types": [ "Ground", @@ -6774,12 +7213,12 @@ "Rhydon" ], "evolutions_ids": [ - "112" + null ], "evolutions": [ { "evolution": "Rhydon", - "evolution_id": "112", + "evolution_id": 112, "candy_cost": 25 } ], @@ -6794,22 +7233,25 @@ "default_form": "Normal" }, "112": { + "name": "Rhydon", + "pokedex_id": 112, "forms": { "849": { "form": "Normal", + "form_id": 849, "proto": "RHYDON_NORMAL" }, "850": { "form": "Shadow", + "form_id": 850, "proto": "RHYDON_SHADOW" }, "851": { "form": "Purified", + "form_id": 851, "proto": "RHYDON_PURIFIED" } }, - "pokedex_id": 112, - "name": "Rhydon", "default_form_id": "849", "types": [ "Ground", @@ -6836,7 +7278,7 @@ "evolutions": [ { "evolution": "Rhyperior", - "evolution_id": "464", + "evolution_id": 464, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -6851,22 +7293,25 @@ "default_form": "Normal" }, "113": { + "name": "Chansey", + "pokedex_id": 113, "forms": { "1056": { "form": "Normal", + "form_id": 1056, "proto": "CHANSEY_NORMAL" }, "1057": { "form": "Shadow", + "form_id": 1057, "proto": "CHANSEY_SHADOW" }, "1058": { "form": "Purified", + "form_id": 1058, "proto": "CHANSEY_PURIFIED" } }, - "pokedex_id": 113, - "name": "Chansey", "default_form_id": "1056", "types": [ "Normal" @@ -6892,7 +7337,7 @@ "evolutions": [ { "evolution": "Blissey", - "evolution_id": "242", + "evolution_id": 242, "candy_cost": 50 } ], @@ -6906,22 +7351,25 @@ "default_form": "Normal" }, "114": { + "name": "Tangela", + "pokedex_id": 114, "forms": { "1059": { "form": "Normal", + "form_id": 1059, "proto": "TANGELA_NORMAL" }, "1060": { "form": "Shadow", + "form_id": 1060, "proto": "TANGELA_SHADOW" }, "1061": { "form": "Purified", + "form_id": 1061, "proto": "TANGELA_PURIFIED" } }, - "pokedex_id": 114, - "name": "Tangela", "default_form_id": "1059", "types": [ "Grass" @@ -6947,7 +7395,7 @@ "evolutions": [ { "evolution": "Tangrowth", - "evolution_id": "465", + "evolution_id": 465, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -6962,22 +7410,25 @@ "default_form": "Normal" }, "115": { + "name": "Kangaskhan", + "pokedex_id": 115, "forms": { "839": { "form": "Normal", + "form_id": 839, "proto": "KANGASKHAN_NORMAL" }, "840": { "form": "Shadow", + "form_id": 840, "proto": "KANGASKHAN_SHADOW" }, "841": { "form": "Purified", + "form_id": 841, "proto": "KANGASKHAN_PURIFIED" } }, - "pokedex_id": 115, - "name": "Kangaskhan", "default_form_id": "839", "types": [ "Normal" @@ -7012,22 +7463,25 @@ "default_form": "Normal" }, "116": { + "name": "Horsea", + "pokedex_id": 116, "forms": { "1062": { "form": "Normal", + "form_id": 1062, "proto": "HORSEA_NORMAL" }, "1063": { "form": "Shadow", + "form_id": 1063, "proto": "HORSEA_SHADOW" }, "1064": { "form": "Purified", + "form_id": 1064, "proto": "HORSEA_PURIFIED" } }, - "pokedex_id": 116, - "name": "Horsea", "default_form_id": "1062", "types": [ "Water" @@ -7052,12 +7506,12 @@ "Seadra" ], "evolutions_ids": [ - "117" + null ], "evolutions": [ { "evolution": "Seadra", - "evolution_id": "117", + "evolution_id": 117, "candy_cost": 25 } ], @@ -7072,22 +7526,25 @@ "default_form": "Normal" }, "117": { + "name": "Seadra", + "pokedex_id": 117, "forms": { "1065": { "form": "Normal", + "form_id": 1065, "proto": "SEADRA_NORMAL" }, "1066": { "form": "Shadow", + "form_id": 1066, "proto": "SEADRA_SHADOW" }, "1067": { "form": "Purified", + "form_id": 1067, "proto": "SEADRA_PURIFIED" } }, - "pokedex_id": 117, - "name": "Seadra", "default_form_id": "1065", "types": [ "Water" @@ -7113,7 +7570,7 @@ "evolutions": [ { "evolution": "Kingdra", - "evolution_id": "230", + "evolution_id": 230, "candy_cost": 100, "evolution_item": "Dragon Scale" } @@ -7128,22 +7585,25 @@ "default_form": "Normal" }, "118": { + "name": "Goldeen", + "pokedex_id": 118, "forms": { "1068": { "form": "Normal", + "form_id": 1068, "proto": "GOLDEEN_NORMAL" }, "1069": { "form": "Shadow", + "form_id": 1069, "proto": "GOLDEEN_SHADOW" }, "1070": { "form": "Purified", + "form_id": 1070, "proto": "GOLDEEN_PURIFIED" } }, - "pokedex_id": 118, - "name": "Goldeen", "default_form_id": "1068", "types": [ "Water" @@ -7168,12 +7628,12 @@ "Seaking" ], "evolutions_ids": [ - "119" + null ], "evolutions": [ { "evolution": "Seaking", - "evolution_id": "119", + "evolution_id": 119, "candy_cost": 50 } ], @@ -7188,22 +7648,25 @@ "default_form": "Normal" }, "119": { + "name": "Seaking", + "pokedex_id": 119, "forms": { "1071": { "form": "Normal", + "form_id": 1071, "proto": "SEAKING_NORMAL" }, "1072": { "form": "Shadow", + "form_id": 1072, "proto": "SEAKING_SHADOW" }, "1073": { "form": "Purified", + "form_id": 1073, "proto": "SEAKING_PURIFIED" } }, - "pokedex_id": 119, - "name": "Seaking", "default_form_id": "1071", "types": [ "Water" @@ -7237,22 +7700,25 @@ "default_form": "Normal" }, "120": { + "name": "Staryu", + "pokedex_id": 120, "forms": { "1074": { "form": "Normal", + "form_id": 1074, "proto": "STARYU_NORMAL" }, "1075": { "form": "Shadow", + "form_id": 1075, "proto": "STARYU_SHADOW" }, "1076": { "form": "Purified", + "form_id": 1076, "proto": "STARYU_PURIFIED" } }, - "pokedex_id": 120, - "name": "Staryu", "default_form_id": "1074", "types": [ "Water" @@ -7277,12 +7743,12 @@ "Starmie" ], "evolutions_ids": [ - "121" + null ], "evolutions": [ { "evolution": "Starmie", - "evolution_id": "121", + "evolution_id": 121, "candy_cost": 50 } ], @@ -7297,22 +7763,25 @@ "default_form": "Normal" }, "121": { + "name": "Starmie", + "pokedex_id": 121, "forms": { "1077": { "form": "Normal", + "form_id": 1077, "proto": "STARMIE_NORMAL" }, "1078": { "form": "Shadow", + "form_id": 1078, "proto": "STARMIE_SHADOW" }, "1079": { "form": "Purified", + "form_id": 1079, "proto": "STARMIE_PURIFIED" } }, - "pokedex_id": 121, - "name": "Starmie", "default_form_id": "1077", "types": [ "Water", @@ -7349,23 +7818,9 @@ "default_form": "Normal" }, "122": { - "forms": { - "1080": { - "form": "Normal", - "proto": "MR_MIME_NORMAL" - }, - "1081": { - "form": "Shadow", - "proto": "MR_MIME_SHADOW" - }, - "1082": { - "form": "Purified", - "proto": "MR_MIME_PURIFIED" - } - }, - "pokedex_id": 122, "name": "Mr Mime", - "default_form_id": "1080", + "pokedex_id": 122, + "forms": {}, "types": [ "Psychic", "Fairy" @@ -7395,26 +7850,28 @@ "buddy_distance": 5, "third_move_stardust": 75000, "third_move_candy": 75, - "gym_defender_eligible": true, - "default_form": "Normal" + "gym_defender_eligible": true }, "123": { + "name": "Scyther", + "pokedex_id": 123, "forms": { "247": { "form": "Normal", + "form_id": 247, "proto": "SCYTHER_NORMAL" }, "248": { "form": "Shadow", + "form_id": 248, "proto": "SCYTHER_SHADOW" }, "249": { "form": "Purified", + "form_id": 249, "proto": "SCYTHER_PURIFIED" } }, - "pokedex_id": 123, - "name": "Scyther", "default_form_id": "247", "types": [ "Bug", @@ -7441,7 +7898,7 @@ "evolutions": [ { "evolution": "Scizor", - "evolution_id": "212", + "evolution_id": 212, "candy_cost": 50, "evolution_item": "Metal Coat" } @@ -7456,22 +7913,25 @@ "default_form": "Normal" }, "124": { + "name": "Jynx", + "pokedex_id": 124, "forms": { "1083": { "form": "Normal", + "form_id": 1083, "proto": "JYNX_NORMAL" }, "1084": { "form": "Shadow", + "form_id": 1084, "proto": "JYNX_SHADOW" }, "1085": { "form": "Purified", + "form_id": 1085, "proto": "JYNX_PURIFIED" } }, - "pokedex_id": 124, - "name": "Jynx", "default_form_id": "1083", "types": [ "Ice", @@ -7507,22 +7967,25 @@ "default_form": "Normal" }, "125": { + "name": "Electabuzz", + "pokedex_id": 125, "forms": { "640": { "form": "Normal", + "form_id": 640, "proto": "ELECTABUZZ_NORMAL" }, "641": { "form": "Shadow", + "form_id": 641, "proto": "ELECTABUZZ_SHADOW" }, "642": { "form": "Purified", + "form_id": 642, "proto": "ELECTABUZZ_PURIFIED" } }, - "pokedex_id": 125, - "name": "Electabuzz", "default_form_id": "640", "types": [ "Electric" @@ -7548,7 +8011,7 @@ "evolutions": [ { "evolution": "Electivire", - "evolution_id": "466", + "evolution_id": 466, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -7563,22 +8026,25 @@ "default_form": "Normal" }, "126": { + "name": "Magmar", + "pokedex_id": 126, "forms": { "634": { "form": "Normal", + "form_id": 634, "proto": "MAGMAR_NORMAL" }, "635": { "form": "Shadow", + "form_id": 635, "proto": "MAGMAR_SHADOW" }, "636": { "form": "Purified", + "form_id": 636, "proto": "MAGMAR_PURIFIED" } }, - "pokedex_id": 126, - "name": "Magmar", "default_form_id": "634", "types": [ "Fire" @@ -7604,7 +8070,7 @@ "evolutions": [ { "evolution": "Magmortar", - "evolution_id": "467", + "evolution_id": 467, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -7619,22 +8085,25 @@ "default_form": "Normal" }, "127": { + "name": "Pinsir", + "pokedex_id": 127, "forms": { "898": { "form": "Normal", + "form_id": 898, "proto": "PINSIR_NORMAL" }, "899": { "form": "Shadow", + "form_id": 899, "proto": "PINSIR_SHADOW" }, "900": { "form": "Purified", + "form_id": 900, "proto": "PINSIR_PURIFIED" } }, - "pokedex_id": 127, - "name": "Pinsir", "default_form_id": "898", "types": [ "Bug" @@ -7670,22 +8139,25 @@ "default_form": "Normal" }, "128": { + "name": "Tauros", + "pokedex_id": 128, "forms": { "1086": { "form": "Normal", + "form_id": 1086, "proto": "TAUROS_NORMAL" }, "1087": { "form": "Shadow", + "form_id": 1087, "proto": "TAUROS_SHADOW" }, "1088": { "form": "Purified", + "form_id": 1088, "proto": "TAUROS_PURIFIED" } }, - "pokedex_id": 128, - "name": "Tauros", "default_form_id": "1086", "types": [ "Normal" @@ -7719,25 +8191,28 @@ "default_form": "Normal" }, "129": { + "name": "Magikarp", + "pokedex_id": 129, "forms": { "253": { "form": "Normal", + "form_id": 253, "proto": "MAGIKARP_NORMAL", - "evolution_form": "256" + "evolution_form": 256 }, "254": { "form": "Shadow", + "form_id": 254, "proto": "MAGIKARP_SHADOW", - "evolution_form": "257" + "evolution_form": 257 }, "255": { "form": "Purified", + "form_id": 255, "proto": "MAGIKARP_PURIFIED", - "evolution_form": "258" + "evolution_form": 258 } }, - "pokedex_id": 129, - "name": "Magikarp", "default_form_id": "253", "types": [ "Water" @@ -7759,12 +8234,12 @@ "Gyarados" ], "evolutions_ids": [ - "130" + null ], "evolutions": [ { "evolution": "Gyarados", - "evolution_id": "130", + "evolution_id": 130, "candy_cost": 400 } ], @@ -7779,22 +8254,25 @@ "default_form": "Normal" }, "130": { + "name": "Gyarados", + "pokedex_id": 130, "forms": { "256": { "form": "Normal", + "form_id": 256, "proto": "GYARADOS_NORMAL" }, "257": { "form": "Shadow", + "form_id": 257, "proto": "GYARADOS_SHADOW" }, "258": { "form": "Purified", + "form_id": 258, "proto": "GYARADOS_PURIFIED" } }, - "pokedex_id": 130, - "name": "Gyarados", "default_form_id": "256", "types": [ "Water", @@ -7831,22 +8309,30 @@ "default_form": "Normal" }, "131": { + "name": "Lapras", + "pokedex_id": 131, "forms": { "322": { "form": "Normal", + "form_id": 322, "proto": "LAPRAS_NORMAL" }, "323": { "form": "Shadow", + "form_id": 323, "proto": "LAPRAS_SHADOW" }, "324": { "form": "Purified", + "form_id": 324, "proto": "LAPRAS_PURIFIED" + }, + "2585": { + "form": "Costume 2020", + "form_id": 2585, + "proto": "LAPRAS_COSTUME_2020" } }, - "pokedex_id": 131, - "name": "Lapras", "default_form_id": "322", "types": [ "Water", @@ -7882,22 +8368,25 @@ "default_form": "Normal" }, "132": { + "name": "Ditto", + "pokedex_id": 132, "forms": { "1089": { "form": "Normal", + "form_id": 1089, "proto": "DITTO_NORMAL" }, "1090": { "form": "Shadow", + "form_id": 1090, "proto": "DITTO_SHADOW" }, "1091": { "form": "Purified", + "form_id": 1091, "proto": "DITTO_PURIFIED" } }, - "pokedex_id": 132, - "name": "Ditto", "default_form_id": "1089", "types": [ "Normal" @@ -7928,22 +8417,25 @@ "default_form": "Normal" }, "133": { + "name": "Eevee", + "pokedex_id": 133, "forms": { "1092": { "form": "Normal", + "form_id": 1092, "proto": "EEVEE_NORMAL" }, "1093": { "form": "Shadow", + "form_id": 1093, "proto": "EEVEE_SHADOW" }, "1094": { "form": "Purified", + "form_id": 1094, "proto": "EEVEE_PURIFIED" } }, - "pokedex_id": 133, - "name": "Eevee", "default_form_id": "1092", "types": [ "Normal" @@ -7969,44 +8461,44 @@ "Flareon" ], "evolutions_ids": [ - "134", - "135", - "136" + null, + null, + null ], "evolutions": [ { "evolution": "Vaporeon", - "evolution_id": "134", + "evolution_id": 134, "candy_cost": 25 }, { "evolution": "Jolteon", - "evolution_id": "135", + "evolution_id": 135, "candy_cost": 25 }, { "evolution": "Flareon", - "evolution_id": "136", + "evolution_id": 136, "candy_cost": 25 }, { "evolution": "Espeon", - "evolution_id": "196", + "evolution_id": 196, "candy_cost": 25 }, { "evolution": "Umbreon", - "evolution_id": "197", + "evolution_id": 197, "candy_cost": 25 }, { "evolution": "Leafeon", - "evolution_id": "470", + "evolution_id": 470, "candy_cost": 25 }, { "evolution": "Glaceon", - "evolution_id": "471", + "evolution_id": 471, "candy_cost": 25 } ], @@ -8021,22 +8513,25 @@ "default_form": "Normal" }, "134": { + "name": "Vaporeon", + "pokedex_id": 134, "forms": { "1095": { "form": "Normal", + "form_id": 1095, "proto": "VAPOREON_NORMAL" }, "1096": { "form": "Shadow", + "form_id": 1096, "proto": "VAPOREON_SHADOW" }, "1097": { "form": "Purified", + "form_id": 1097, "proto": "VAPOREON_PURIFIED" } }, - "pokedex_id": 134, - "name": "Vaporeon", "default_form_id": "1095", "types": [ "Water" @@ -8069,22 +8564,25 @@ "default_form": "Normal" }, "135": { + "name": "Jolteon", + "pokedex_id": 135, "forms": { "1098": { "form": "Normal", + "form_id": 1098, "proto": "JOLTEON_NORMAL" }, "1099": { "form": "Shadow", + "form_id": 1099, "proto": "JOLTEON_SHADOW" }, "1100": { "form": "Purified", + "form_id": 1100, "proto": "JOLTEON_PURIFIED" } }, - "pokedex_id": 135, - "name": "Jolteon", "default_form_id": "1098", "types": [ "Electric" @@ -8118,22 +8616,25 @@ "default_form": "Normal" }, "136": { + "name": "Flareon", + "pokedex_id": 136, "forms": { "1101": { "form": "Normal", + "form_id": 1101, "proto": "FLAREON_NORMAL" }, "1102": { "form": "Shadow", + "form_id": 1102, "proto": "FLAREON_SHADOW" }, "1103": { "form": "Purified", + "form_id": 1103, "proto": "FLAREON_PURIFIED" } }, - "pokedex_id": 136, - "name": "Flareon", "default_form_id": "1101", "types": [ "Fire" @@ -8167,22 +8668,40 @@ "default_form": "Normal" }, "137": { + "name": "Porygon", + "pokedex_id": 137, "forms": { "677": { "form": "Normal", + "form_id": 677, "proto": "PORYGON_NORMAL" }, "678": { "form": "Shadow", + "form_id": 678, "proto": "PORYGON_SHADOW" }, "679": { "form": "Purified", + "form_id": 679, "proto": "PORYGON_PURIFIED" + }, + "683": { + "form": "Normal", + "form_id": 683, + "proto": "PORYGON_Z_NORMAL" + }, + "684": { + "form": "Shadow", + "form_id": 684, + "proto": "PORYGON_Z_SHADOW" + }, + "685": { + "form": "Purified", + "form_id": 685, + "proto": "PORYGON_Z_PURIFIED" } }, - "pokedex_id": 137, - "name": "Porygon", "default_form_id": "677", "types": [ "Normal" @@ -8208,7 +8727,7 @@ "evolutions": [ { "evolution": "Porygon2", - "evolution_id": "233", + "evolution_id": 233, "candy_cost": 25, "evolution_item": "Up Grade" } @@ -8223,25 +8742,28 @@ "default_form": "Normal" }, "138": { + "name": "Omanyte", + "pokedex_id": 138, "forms": { "740": { "form": "Normal", + "form_id": 740, "proto": "OMANYTE_NORMAL", - "evolution_form": "743" + "evolution_form": 743 }, "741": { "form": "Shadow", + "form_id": 741, "proto": "OMANYTE_SHADOW", - "evolution_form": "744" + "evolution_form": 744 }, "742": { "form": "Purified", + "form_id": 742, "proto": "OMANYTE_PURIFIED", - "evolution_form": "745" + "evolution_form": 745 } }, - "pokedex_id": 138, - "name": "Omanyte", "default_form_id": "740", "types": [ "Rock", @@ -8267,12 +8789,12 @@ "Omastar" ], "evolutions_ids": [ - "139" + null ], "evolutions": [ { "evolution": "Omastar", - "evolution_id": "139", + "evolution_id": 139, "candy_cost": 50 } ], @@ -8287,22 +8809,25 @@ "default_form": "Normal" }, "139": { + "name": "Omastar", + "pokedex_id": 139, "forms": { "743": { "form": "Normal", + "form_id": 743, "proto": "OMASTAR_NORMAL" }, "744": { "form": "Shadow", + "form_id": 744, "proto": "OMASTAR_SHADOW" }, "745": { "form": "Purified", + "form_id": 745, "proto": "OMASTAR_PURIFIED" } }, - "pokedex_id": 139, - "name": "Omastar", "default_form_id": "743", "types": [ "Rock", @@ -8337,22 +8862,25 @@ "default_form": "Normal" }, "140": { + "name": "Kabuto", + "pokedex_id": 140, "forms": { "1104": { "form": "Normal", + "form_id": 1104, "proto": "KABUTO_NORMAL" }, "1105": { "form": "Shadow", + "form_id": 1105, "proto": "KABUTO_SHADOW" }, "1106": { "form": "Purified", + "form_id": 1106, "proto": "KABUTO_PURIFIED" } }, - "pokedex_id": 140, - "name": "Kabuto", "default_form_id": "1104", "types": [ "Rock", @@ -8378,12 +8906,12 @@ "Kabutops" ], "evolutions_ids": [ - "141" + null ], "evolutions": [ { "evolution": "Kabutops", - "evolution_id": "141", + "evolution_id": 141, "candy_cost": 50 } ], @@ -8398,22 +8926,25 @@ "default_form": "Normal" }, "141": { + "name": "Kabutops", + "pokedex_id": 141, "forms": { "1107": { "form": "Normal", + "form_id": 1107, "proto": "KABUTOPS_NORMAL" }, "1108": { "form": "Shadow", + "form_id": 1108, "proto": "KABUTOPS_SHADOW" }, "1109": { "form": "Purified", + "form_id": 1109, "proto": "KABUTOPS_PURIFIED" } }, - "pokedex_id": 141, - "name": "Kabutops", "default_form_id": "1107", "types": [ "Rock", @@ -8449,22 +8980,25 @@ "default_form": "Normal" }, "142": { + "name": "Aerodactyl", + "pokedex_id": 142, "forms": { "1110": { "form": "Normal", + "form_id": 1110, "proto": "AERODACTYL_NORMAL" }, "1111": { "form": "Shadow", + "form_id": 1111, "proto": "AERODACTYL_SHADOW" }, "1112": { "form": "Purified", + "form_id": 1112, "proto": "AERODACTYL_PURIFIED" } }, - "pokedex_id": 142, - "name": "Aerodactyl", "default_form_id": "1110", "types": [ "Rock", @@ -8502,22 +9036,25 @@ "default_form": "Normal" }, "143": { + "name": "Snorlax", + "pokedex_id": 143, "forms": { "199": { "form": "Normal", + "form_id": 199, "proto": "SNORLAX_NORMAL" }, "200": { "form": "Shadow", + "form_id": 200, "proto": "SNORLAX_SHADOW" }, "201": { "form": "Purified", + "form_id": 201, "proto": "SNORLAX_PURIFIED" } }, - "pokedex_id": 143, - "name": "Snorlax", "default_form_id": "199", "types": [ "Normal" @@ -8555,22 +9092,25 @@ "default_form": "Normal" }, "144": { + "name": "Articuno", + "pokedex_id": 144, "forms": { "716": { "form": "Normal", + "form_id": 716, "proto": "ARTICUNO_NORMAL" }, "717": { "form": "Shadow", + "form_id": 717, "proto": "ARTICUNO_SHADOW" }, "718": { "form": "Purified", + "form_id": 718, "proto": "ARTICUNO_PURIFIED" } }, - "pokedex_id": 144, - "name": "Articuno", "default_form_id": "716", "types": [ "Ice", @@ -8605,22 +9145,25 @@ "default_form": "Normal" }, "145": { + "name": "Zapdos", + "pokedex_id": 145, "forms": { "773": { "form": "Normal", + "form_id": 773, "proto": "ZAPDOS_NORMAL" }, "774": { "form": "Shadow", + "form_id": 774, "proto": "ZAPDOS_SHADOW" }, "775": { "form": "Purified", + "form_id": 775, "proto": "ZAPDOS_PURIFIED" } }, - "pokedex_id": 145, - "name": "Zapdos", "default_form_id": "773", "types": [ "Electric", @@ -8655,22 +9198,25 @@ "default_form": "Normal" }, "146": { + "name": "Moltres", + "pokedex_id": 146, "forms": { "836": { "form": "Normal", + "form_id": 836, "proto": "MOLTRES_NORMAL" }, "837": { "form": "Shadow", + "form_id": 837, "proto": "MOLTRES_SHADOW" }, "838": { "form": "Purified", + "form_id": 838, "proto": "MOLTRES_PURIFIED" } }, - "pokedex_id": 146, - "name": "Moltres", "default_form_id": "836", "types": [ "Fire", @@ -8705,25 +9251,28 @@ "default_form": "Normal" }, "147": { + "name": "Dratini", + "pokedex_id": 147, "forms": { "190": { "form": "Normal", + "form_id": 190, "proto": "DRATINI_NORMAL", - "evolution_form": "193" + "evolution_form": 193 }, "191": { "form": "Shadow", + "form_id": 191, "proto": "DRATINI_SHADOW", - "evolution_form": "194" + "evolution_form": 194 }, "192": { "form": "Purified", + "form_id": 192, "proto": "DRATINI_PURIFIED", - "evolution_form": "195" + "evolution_form": 195 } }, - "pokedex_id": 147, - "name": "Dratini", "default_form_id": "190", "types": [ "Dragon" @@ -8748,12 +9297,12 @@ "Dragonair" ], "evolutions_ids": [ - "148" + null ], "evolutions": [ { "evolution": "Dragonair", - "evolution_id": "148", + "evolution_id": 148, "candy_cost": 25 } ], @@ -8768,25 +9317,28 @@ "default_form": "Normal" }, "148": { + "name": "Dragonair", + "pokedex_id": 148, "forms": { "193": { "form": "Normal", + "form_id": 193, "proto": "DRAGONAIR_NORMAL", - "evolution_form": "196" + "evolution_form": 196 }, "194": { "form": "Shadow", + "form_id": 194, "proto": "DRAGONAIR_SHADOW", - "evolution_form": "197" + "evolution_form": 197 }, "195": { "form": "Purified", + "form_id": 195, "proto": "DRAGONAIR_PURIFIED", - "evolution_form": "198" + "evolution_form": 198 } }, - "pokedex_id": 148, - "name": "Dragonair", "default_form_id": "193", "types": [ "Dragon" @@ -8811,12 +9363,12 @@ "Dragonite" ], "evolutions_ids": [ - "149" + null ], "evolutions": [ { "evolution": "Dragonite", - "evolution_id": "149", + "evolution_id": 149, "candy_cost": 100 } ], @@ -8831,26 +9383,30 @@ "default_form": "Normal" }, "149": { + "name": "Dragonite", + "pokedex_id": 149, "forms": { "196": { "form": "Normal", + "form_id": 196, "proto": "DRAGONITE_NORMAL" }, "197": { "form": "Shadow", + "form_id": 197, "proto": "DRAGONITE_SHADOW" }, "198": { "form": "Purified", + "form_id": 198, "proto": "DRAGONITE_PURIFIED" }, "2333": { "form": "Costume 2020", + "form_id": 2333, "proto": "DRAGONITE_COSTUME_2020" } }, - "pokedex_id": 149, - "name": "Dragonite", "default_form_id": "196", "types": [ "Dragon", @@ -8887,9 +9443,12 @@ "default_form": "Normal" }, "150": { + "name": "Mewtwo", + "pokedex_id": 150, "forms": { "133": { "form": "A", + "form_id": 133, "proto": "MEWTWO_A", "attack": 182, "defense": 278, @@ -8907,19 +9466,20 @@ }, "135": { "form": "Normal", + "form_id": 135, "proto": "MEWTWO_NORMAL" }, "1113": { "form": "Shadow", + "form_id": 1113, "proto": "MEWTWO_SHADOW" }, "1114": { "form": "Purified", + "form_id": 1114, "proto": "MEWTWO_PURIFIED" } }, - "pokedex_id": 150, - "name": "Mewtwo", "default_form_id": "133", "types": [ "Psychic" @@ -8954,22 +9514,25 @@ "default_form": "A" }, "151": { + "name": "Mew", + "pokedex_id": 151, "forms": { "1115": { "form": "Normal", + "form_id": 1115, "proto": "MEW_NORMAL" }, "1116": { "form": "Shadow", + "form_id": 1116, "proto": "MEW_SHADOW" }, "1117": { "form": "Purified", + "form_id": 1117, "proto": "MEW_PURIFIED" } }, - "pokedex_id": 151, - "name": "Mew", "default_form_id": "1115", "types": [ "Psychic" @@ -9035,22 +9598,25 @@ "default_form": "Normal" }, "152": { + "name": "Chikorita", + "pokedex_id": 152, "forms": { "1118": { "form": "Normal", + "form_id": 1118, "proto": "CHIKORITA_NORMAL" }, "1119": { "form": "Shadow", + "form_id": 1119, "proto": "CHIKORITA_SHADOW" }, "1120": { "form": "Purified", + "form_id": 1120, "proto": "CHIKORITA_PURIFIED" } }, - "pokedex_id": 152, - "name": "Chikorita", "default_form_id": "1118", "types": [ "Grass" @@ -9075,12 +9641,12 @@ "Bayleef" ], "evolutions_ids": [ - "153" + null ], "evolutions": [ { "evolution": "Bayleef", - "evolution_id": "153", + "evolution_id": 153, "candy_cost": 25 } ], @@ -9095,22 +9661,25 @@ "default_form": "Normal" }, "153": { + "name": "Bayleef", + "pokedex_id": 153, "forms": { "1121": { "form": "Normal", + "form_id": 1121, "proto": "BAYLEEF_NORMAL" }, "1122": { "form": "Shadow", + "form_id": 1122, "proto": "BAYLEEF_SHADOW" }, "1123": { "form": "Purified", + "form_id": 1123, "proto": "BAYLEEF_PURIFIED" } }, - "pokedex_id": 153, - "name": "Bayleef", "default_form_id": "1121", "types": [ "Grass" @@ -9135,12 +9704,12 @@ "Meganium" ], "evolutions_ids": [ - "154" + null ], "evolutions": [ { "evolution": "Meganium", - "evolution_id": "154", + "evolution_id": 154, "candy_cost": 100 } ], @@ -9155,22 +9724,25 @@ "default_form": "Normal" }, "154": { + "name": "Meganium", + "pokedex_id": 154, "forms": { "1124": { "form": "Normal", + "form_id": 1124, "proto": "MEGANIUM_NORMAL" }, "1125": { "form": "Shadow", + "form_id": 1125, "proto": "MEGANIUM_SHADOW" }, "1126": { "form": "Purified", + "form_id": 1126, "proto": "MEGANIUM_PURIFIED" } }, - "pokedex_id": 154, - "name": "Meganium", "default_form_id": "1124", "types": [ "Grass" @@ -9204,22 +9776,25 @@ "default_form": "Normal" }, "155": { + "name": "Cyndaquil", + "pokedex_id": 155, "forms": { "1127": { "form": "Normal", + "form_id": 1127, "proto": "CYNDAQUIL_NORMAL" }, "1128": { "form": "Shadow", + "form_id": 1128, "proto": "CYNDAQUIL_SHADOW" }, "1129": { "form": "Purified", + "form_id": 1129, "proto": "CYNDAQUIL_PURIFIED" } }, - "pokedex_id": 155, - "name": "Cyndaquil", "default_form_id": "1127", "types": [ "Fire" @@ -9244,12 +9819,12 @@ "Quilava" ], "evolutions_ids": [ - "156" + null ], "evolutions": [ { "evolution": "Quilava", - "evolution_id": "156", + "evolution_id": 156, "candy_cost": 25 } ], @@ -9264,22 +9839,25 @@ "default_form": "Normal" }, "156": { + "name": "Quilava", + "pokedex_id": 156, "forms": { "1130": { "form": "Normal", + "form_id": 1130, "proto": "QUILAVA_NORMAL" }, "1131": { "form": "Shadow", + "form_id": 1131, "proto": "QUILAVA_SHADOW" }, "1132": { "form": "Purified", + "form_id": 1132, "proto": "QUILAVA_PURIFIED" } }, - "pokedex_id": 156, - "name": "Quilava", "default_form_id": "1130", "types": [ "Fire" @@ -9304,12 +9882,12 @@ "Typhlosion" ], "evolutions_ids": [ - "157" + null ], "evolutions": [ { "evolution": "Typhlosion", - "evolution_id": "157", + "evolution_id": 157, "candy_cost": 100 } ], @@ -9324,22 +9902,25 @@ "default_form": "Normal" }, "157": { + "name": "Typhlosion", + "pokedex_id": 157, "forms": { "1133": { "form": "Normal", + "form_id": 1133, "proto": "TYPHLOSION_NORMAL" }, "1134": { "form": "Shadow", + "form_id": 1134, "proto": "TYPHLOSION_SHADOW" }, "1135": { "form": "Purified", + "form_id": 1135, "proto": "TYPHLOSION_PURIFIED" } }, - "pokedex_id": 157, - "name": "Typhlosion", "default_form_id": "1133", "types": [ "Fire" @@ -9373,22 +9954,25 @@ "default_form": "Normal" }, "158": { + "name": "Totodile", + "pokedex_id": 158, "forms": { "1136": { "form": "Normal", + "form_id": 1136, "proto": "TOTODILE_NORMAL" }, "1137": { "form": "Shadow", + "form_id": 1137, "proto": "TOTODILE_SHADOW" }, "1138": { "form": "Purified", + "form_id": 1138, "proto": "TOTODILE_PURIFIED" } }, - "pokedex_id": 158, - "name": "Totodile", "default_form_id": "1136", "types": [ "Water" @@ -9413,12 +9997,12 @@ "Croconaw" ], "evolutions_ids": [ - "159" + null ], "evolutions": [ { "evolution": "Croconaw", - "evolution_id": "159", + "evolution_id": 159, "candy_cost": 25 } ], @@ -9433,22 +10017,25 @@ "default_form": "Normal" }, "159": { + "name": "Croconaw", + "pokedex_id": 159, "forms": { "1139": { "form": "Normal", + "form_id": 1139, "proto": "CROCONAW_NORMAL" }, "1140": { "form": "Shadow", + "form_id": 1140, "proto": "CROCONAW_SHADOW" }, "1141": { "form": "Purified", + "form_id": 1141, "proto": "CROCONAW_PURIFIED" } }, - "pokedex_id": 159, - "name": "Croconaw", "default_form_id": "1139", "types": [ "Water" @@ -9473,12 +10060,12 @@ "Feraligatr" ], "evolutions_ids": [ - "160" + null ], "evolutions": [ { "evolution": "Feraligatr", - "evolution_id": "160", + "evolution_id": 160, "candy_cost": 100 } ], @@ -9493,22 +10080,25 @@ "default_form": "Normal" }, "160": { + "name": "Feraligatr", + "pokedex_id": 160, "forms": { "1142": { "form": "Normal", + "form_id": 1142, "proto": "FERALIGATR_NORMAL" }, "1143": { "form": "Shadow", + "form_id": 1143, "proto": "FERALIGATR_SHADOW" }, "1144": { "form": "Purified", + "form_id": 1144, "proto": "FERALIGATR_PURIFIED" } }, - "pokedex_id": 160, - "name": "Feraligatr", "default_form_id": "1142", "types": [ "Water" @@ -9543,22 +10133,25 @@ "default_form": "Normal" }, "161": { + "name": "Sentret", + "pokedex_id": 161, "forms": { "1145": { "form": "Normal", + "form_id": 1145, "proto": "SENTRET_NORMAL" }, "1146": { "form": "Shadow", + "form_id": 1146, "proto": "SENTRET_SHADOW" }, "1147": { "form": "Purified", + "form_id": 1147, "proto": "SENTRET_PURIFIED" } }, - "pokedex_id": 161, - "name": "Sentret", "default_form_id": "1145", "types": [ "Normal" @@ -9583,12 +10176,12 @@ "Furret" ], "evolutions_ids": [ - "162" + null ], "evolutions": [ { "evolution": "Furret", - "evolution_id": "162", + "evolution_id": 162, "candy_cost": 25 } ], @@ -9603,22 +10196,25 @@ "default_form": "Normal" }, "162": { + "name": "Furret", + "pokedex_id": 162, "forms": { "1148": { "form": "Normal", + "form_id": 1148, "proto": "FURRET_NORMAL" }, "1149": { "form": "Shadow", + "form_id": 1149, "proto": "FURRET_SHADOW" }, "1150": { "form": "Purified", + "form_id": 1150, "proto": "FURRET_PURIFIED" } }, - "pokedex_id": 162, - "name": "Furret", "default_form_id": "1148", "types": [ "Normal" @@ -9652,22 +10248,25 @@ "default_form": "Normal" }, "163": { + "name": "Hoothoot", + "pokedex_id": 163, "forms": { "1151": { "form": "Normal", + "form_id": 1151, "proto": "HOOTHOOT_NORMAL" }, "1152": { "form": "Shadow", + "form_id": 1152, "proto": "HOOTHOOT_SHADOW" }, "1153": { "form": "Purified", + "form_id": 1153, "proto": "HOOTHOOT_PURIFIED" } }, - "pokedex_id": 163, - "name": "Hoothoot", "default_form_id": "1151", "types": [ "Normal", @@ -9693,12 +10292,12 @@ "Noctowl" ], "evolutions_ids": [ - "164" + null ], "evolutions": [ { "evolution": "Noctowl", - "evolution_id": "164", + "evolution_id": 164, "candy_cost": 50 } ], @@ -9713,22 +10312,25 @@ "default_form": "Normal" }, "164": { + "name": "Noctowl", + "pokedex_id": 164, "forms": { "1154": { "form": "Normal", + "form_id": 1154, "proto": "NOCTOWL_NORMAL" }, "1155": { "form": "Shadow", + "form_id": 1155, "proto": "NOCTOWL_SHADOW" }, "1156": { "form": "Purified", + "form_id": 1156, "proto": "NOCTOWL_PURIFIED" } }, - "pokedex_id": 164, - "name": "Noctowl", "default_form_id": "1154", "types": [ "Normal", @@ -9763,22 +10365,25 @@ "default_form": "Normal" }, "165": { + "name": "Ledyba", + "pokedex_id": 165, "forms": { "1157": { "form": "Normal", + "form_id": 1157, "proto": "LEDYBA_NORMAL" }, "1158": { "form": "Shadow", + "form_id": 1158, "proto": "LEDYBA_SHADOW" }, "1159": { "form": "Purified", + "form_id": 1159, "proto": "LEDYBA_PURIFIED" } }, - "pokedex_id": 165, - "name": "Ledyba", "default_form_id": "1157", "types": [ "Bug", @@ -9804,12 +10409,12 @@ "Ledian" ], "evolutions_ids": [ - "166" + null ], "evolutions": [ { "evolution": "Ledian", - "evolution_id": "166", + "evolution_id": 166, "candy_cost": 25 } ], @@ -9824,22 +10429,25 @@ "default_form": "Normal" }, "166": { + "name": "Ledian", + "pokedex_id": 166, "forms": { "1160": { "form": "Normal", + "form_id": 1160, "proto": "LEDIAN_NORMAL" }, "1161": { "form": "Shadow", + "form_id": 1161, "proto": "LEDIAN_SHADOW" }, "1162": { "form": "Purified", + "form_id": 1162, "proto": "LEDIAN_PURIFIED" } }, - "pokedex_id": 166, - "name": "Ledian", "default_form_id": "1160", "types": [ "Bug", @@ -9874,22 +10482,25 @@ "default_form": "Normal" }, "167": { + "name": "Spinarak", + "pokedex_id": 167, "forms": { "1163": { "form": "Normal", + "form_id": 1163, "proto": "SPINARAK_NORMAL" }, "1164": { "form": "Shadow", + "form_id": 1164, "proto": "SPINARAK_SHADOW" }, "1165": { "form": "Purified", + "form_id": 1165, "proto": "SPINARAK_PURIFIED" } }, - "pokedex_id": 167, - "name": "Spinarak", "default_form_id": "1163", "types": [ "Bug", @@ -9915,12 +10526,12 @@ "Ariados" ], "evolutions_ids": [ - "168" + null ], "evolutions": [ { "evolution": "Ariados", - "evolution_id": "168", + "evolution_id": 168, "candy_cost": 50 } ], @@ -9935,22 +10546,25 @@ "default_form": "Normal" }, "168": { + "name": "Ariados", + "pokedex_id": 168, "forms": { "1166": { "form": "Normal", + "form_id": 1166, "proto": "ARIADOS_NORMAL" }, "1167": { "form": "Shadow", + "form_id": 1167, "proto": "ARIADOS_SHADOW" }, "1168": { "form": "Purified", + "form_id": 1168, "proto": "ARIADOS_PURIFIED" } }, - "pokedex_id": 168, - "name": "Ariados", "default_form_id": "1166", "types": [ "Bug", @@ -9985,22 +10599,25 @@ "default_form": "Normal" }, "169": { + "name": "Crobat", + "pokedex_id": 169, "forms": { "202": { "form": "Normal", + "form_id": 202, "proto": "CROBAT_NORMAL" }, "203": { "form": "Shadow", + "form_id": 203, "proto": "CROBAT_SHADOW" }, "204": { "form": "Purified", + "form_id": 204, "proto": "CROBAT_PURIFIED" } }, - "pokedex_id": 169, - "name": "Crobat", "default_form_id": "202", "types": [ "Poison", @@ -10035,22 +10652,25 @@ "default_form": "Normal" }, "170": { + "name": "Chinchou", + "pokedex_id": 170, "forms": { "1169": { "form": "Normal", + "form_id": 1169, "proto": "CHINCHOU_NORMAL" }, "1170": { "form": "Shadow", + "form_id": 1170, "proto": "CHINCHOU_SHADOW" }, "1171": { "form": "Purified", + "form_id": 1171, "proto": "CHINCHOU_PURIFIED" } }, - "pokedex_id": 170, - "name": "Chinchou", "default_form_id": "1169", "types": [ "Water", @@ -10076,12 +10696,12 @@ "Lanturn" ], "evolutions_ids": [ - "171" + null ], "evolutions": [ { "evolution": "Lanturn", - "evolution_id": "171", + "evolution_id": 171, "candy_cost": 50 } ], @@ -10096,22 +10716,25 @@ "default_form": "Normal" }, "171": { + "name": "Lanturn", + "pokedex_id": 171, "forms": { "1172": { "form": "Normal", + "form_id": 1172, "proto": "LANTURN_NORMAL" }, "1173": { "form": "Shadow", + "form_id": 1173, "proto": "LANTURN_SHADOW" }, "1174": { "form": "Purified", + "form_id": 1174, "proto": "LANTURN_PURIFIED" } }, - "pokedex_id": 171, - "name": "Lanturn", "default_form_id": "1172", "types": [ "Water", @@ -10147,22 +10770,25 @@ "default_form": "Normal" }, "172": { + "name": "Pichu", + "pokedex_id": 172, "forms": { "1175": { "form": "Normal", + "form_id": 1175, "proto": "PICHU_NORMAL" }, "1176": { "form": "Shadow", + "form_id": 1176, "proto": "PICHU_SHADOW" }, "1177": { "form": "Purified", + "form_id": 1177, "proto": "PICHU_PURIFIED" } }, - "pokedex_id": 172, - "name": "Pichu", "default_form_id": "1175", "types": [ "Electric" @@ -10185,12 +10811,12 @@ "Pikachu" ], "evolutions_ids": [ - "25" + null ], "evolutions": [ { "evolution": "Pikachu", - "evolution_id": "25", + "evolution_id": 25, "candy_cost": 25 } ], @@ -10205,22 +10831,25 @@ "default_form": "Normal" }, "173": { + "name": "Cleffa", + "pokedex_id": 173, "forms": { "1178": { "form": "Normal", + "form_id": 1178, "proto": "CLEFFA_NORMAL" }, "1179": { "form": "Shadow", + "form_id": 1179, "proto": "CLEFFA_SHADOW" }, "1180": { "form": "Purified", + "form_id": 1180, "proto": "CLEFFA_PURIFIED" } }, - "pokedex_id": 173, - "name": "Cleffa", "default_form_id": "1178", "types": [ "Fairy" @@ -10244,12 +10873,12 @@ "Clefairy" ], "evolutions_ids": [ - "35" + null ], "evolutions": [ { "evolution": "Clefairy", - "evolution_id": "35", + "evolution_id": 35, "candy_cost": 25 } ], @@ -10264,22 +10893,25 @@ "default_form": "Normal" }, "174": { + "name": "Igglybuff", + "pokedex_id": 174, "forms": { "1181": { "form": "Normal", + "form_id": 1181, "proto": "IGGLYBUFF_NORMAL" }, "1182": { "form": "Shadow", + "form_id": 1182, "proto": "IGGLYBUFF_SHADOW" }, "1183": { "form": "Purified", + "form_id": 1183, "proto": "IGGLYBUFF_PURIFIED" } }, - "pokedex_id": 174, - "name": "Igglybuff", "default_form_id": "1181", "types": [ "Normal", @@ -10304,12 +10936,12 @@ "Jigglypuff" ], "evolutions_ids": [ - "39" + null ], "evolutions": [ { "evolution": "Jigglypuff", - "evolution_id": "39", + "evolution_id": 39, "candy_cost": 25 } ], @@ -10324,22 +10956,25 @@ "default_form": "Normal" }, "175": { + "name": "Togepi", + "pokedex_id": 175, "forms": { "1184": { "form": "Normal", + "form_id": 1184, "proto": "TOGEPI_NORMAL" }, "1185": { "form": "Shadow", + "form_id": 1185, "proto": "TOGEPI_SHADOW" }, "1186": { "form": "Purified", + "form_id": 1186, "proto": "TOGEPI_PURIFIED" } }, - "pokedex_id": 175, - "name": "Togepi", "default_form_id": "1184", "types": [ "Fairy" @@ -10363,12 +10998,12 @@ "Togetic" ], "evolutions_ids": [ - "176" + null ], "evolutions": [ { "evolution": "Togetic", - "evolution_id": "176", + "evolution_id": 176, "candy_cost": 25 } ], @@ -10383,22 +11018,25 @@ "default_form": "Normal" }, "176": { + "name": "Togetic", + "pokedex_id": 176, "forms": { "1187": { "form": "Normal", + "form_id": 1187, "proto": "TOGETIC_NORMAL" }, "1188": { "form": "Shadow", + "form_id": 1188, "proto": "TOGETIC_SHADOW" }, "1189": { "form": "Purified", + "form_id": 1189, "proto": "TOGETIC_PURIFIED" } }, - "pokedex_id": 176, - "name": "Togetic", "default_form_id": "1187", "types": [ "Fairy", @@ -10425,7 +11063,7 @@ "evolutions": [ { "evolution": "Togekiss", - "evolution_id": "468", + "evolution_id": 468, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -10440,22 +11078,25 @@ "default_form": "Normal" }, "177": { + "name": "Natu", + "pokedex_id": 177, "forms": { "1190": { "form": "Normal", + "form_id": 1190, "proto": "NATU_NORMAL" }, "1191": { "form": "Shadow", + "form_id": 1191, "proto": "NATU_SHADOW" }, "1192": { "form": "Purified", + "form_id": 1192, "proto": "NATU_PURIFIED" } }, - "pokedex_id": 177, - "name": "Natu", "default_form_id": "1190", "types": [ "Psychic", @@ -10481,12 +11122,12 @@ "Xatu" ], "evolutions_ids": [ - "178" + null ], "evolutions": [ { "evolution": "Xatu", - "evolution_id": "178", + "evolution_id": 178, "candy_cost": 50 } ], @@ -10501,22 +11142,25 @@ "default_form": "Normal" }, "178": { + "name": "Xatu", + "pokedex_id": 178, "forms": { "1193": { "form": "Normal", + "form_id": 1193, "proto": "XATU_NORMAL" }, "1194": { "form": "Shadow", + "form_id": 1194, "proto": "XATU_SHADOW" }, "1195": { "form": "Purified", + "form_id": 1195, "proto": "XATU_PURIFIED" } }, - "pokedex_id": 178, - "name": "Xatu", "default_form_id": "1193", "types": [ "Psychic", @@ -10551,25 +11195,28 @@ "default_form": "Normal" }, "179": { + "name": "Mareep", + "pokedex_id": 179, "forms": { "646": { "form": "Normal", + "form_id": 646, "proto": "MAREEP_NORMAL", - "evolution_form": "649" + "evolution_form": 649 }, "647": { "form": "Shadow", + "form_id": 647, "proto": "MAREEP_SHADOW", - "evolution_form": "650" + "evolution_form": 650 }, "648": { "form": "Purified", + "form_id": 648, "proto": "MAREEP_PURIFIED", - "evolution_form": "651" + "evolution_form": 651 } }, - "pokedex_id": 179, - "name": "Mareep", "default_form_id": "646", "types": [ "Electric" @@ -10594,12 +11241,12 @@ "Flaaffy" ], "evolutions_ids": [ - "180" + null ], "evolutions": [ { "evolution": "Flaaffy", - "evolution_id": "180", + "evolution_id": 180, "candy_cost": 25 } ], @@ -10614,25 +11261,28 @@ "default_form": "Normal" }, "180": { + "name": "Flaaffy", + "pokedex_id": 180, "forms": { "649": { "form": "Normal", + "form_id": 649, "proto": "FLAAFFY_NORMAL", - "evolution_form": "652" + "evolution_form": 652 }, "650": { "form": "Shadow", + "form_id": 650, "proto": "FLAAFFY_SHADOW", - "evolution_form": "653" + "evolution_form": 653 }, "651": { "form": "Purified", + "form_id": 651, "proto": "FLAAFFY_PURIFIED", - "evolution_form": "654" + "evolution_form": 654 } }, - "pokedex_id": 180, - "name": "Flaaffy", "default_form_id": "649", "types": [ "Electric" @@ -10657,12 +11307,12 @@ "Ampharos" ], "evolutions_ids": [ - "181" + null ], "evolutions": [ { "evolution": "Ampharos", - "evolution_id": "181", + "evolution_id": 181, "candy_cost": 100 } ], @@ -10677,22 +11327,25 @@ "default_form": "Normal" }, "181": { + "name": "Ampharos", + "pokedex_id": 181, "forms": { "652": { "form": "Normal", + "form_id": 652, "proto": "AMPHAROS_NORMAL" }, "653": { "form": "Shadow", + "form_id": 653, "proto": "AMPHAROS_SHADOW" }, "654": { "form": "Purified", + "form_id": 654, "proto": "AMPHAROS_PURIFIED" } }, - "pokedex_id": 181, - "name": "Ampharos", "default_form_id": "652", "types": [ "Electric" @@ -10728,22 +11381,25 @@ "default_form": "Normal" }, "182": { + "name": "Bellossom", + "pokedex_id": 182, "forms": { "274": { "form": "Normal", + "form_id": 274, "proto": "BELLOSSOM_NORMAL" }, "275": { "form": "Shadow", + "form_id": 275, "proto": "BELLOSSOM_SHADOW" }, "276": { "form": "Purified", + "form_id": 276, "proto": "BELLOSSOM_PURIFIED" } }, - "pokedex_id": 182, - "name": "Bellossom", "default_form_id": "274", "types": [ "Grass" @@ -10778,22 +11434,25 @@ "default_form": "Normal" }, "183": { + "name": "Marill", + "pokedex_id": 183, "forms": { "1196": { "form": "Normal", + "form_id": 1196, "proto": "MARILL_NORMAL" }, "1197": { "form": "Shadow", + "form_id": 1197, "proto": "MARILL_SHADOW" }, "1198": { "form": "Purified", + "form_id": 1198, "proto": "MARILL_PURIFIED" } }, - "pokedex_id": 183, - "name": "Marill", "default_form_id": "1196", "types": [ "Water", @@ -10819,12 +11478,12 @@ "Azumarill" ], "evolutions_ids": [ - "184" + null ], "evolutions": [ { "evolution": "Azumarill", - "evolution_id": "184", + "evolution_id": 184, "candy_cost": 25 } ], @@ -10839,22 +11498,25 @@ "default_form": "Normal" }, "184": { + "name": "Azumarill", + "pokedex_id": 184, "forms": { "1199": { "form": "Normal", + "form_id": 1199, "proto": "AZUMARILL_NORMAL" }, "1200": { "form": "Shadow", + "form_id": 1200, "proto": "AZUMARILL_SHADOW" }, "1201": { "form": "Purified", + "form_id": 1201, "proto": "AZUMARILL_PURIFIED" } }, - "pokedex_id": 184, - "name": "Azumarill", "default_form_id": "1199", "types": [ "Water", @@ -10889,22 +11551,25 @@ "default_form": "Normal" }, "185": { + "name": "Sudowoodo", + "pokedex_id": 185, "forms": { "1202": { "form": "Normal", + "form_id": 1202, "proto": "SUDOWOODO_NORMAL" }, "1203": { "form": "Shadow", + "form_id": 1203, "proto": "SUDOWOODO_SHADOW" }, "1204": { "form": "Purified", + "form_id": 1204, "proto": "SUDOWOODO_PURIFIED" } }, - "pokedex_id": 185, - "name": "Sudowoodo", "default_form_id": "1202", "types": [ "Rock" @@ -10938,22 +11603,25 @@ "default_form": "Normal" }, "186": { + "name": "Politoed", + "pokedex_id": 186, "forms": { "244": { "form": "Normal", + "form_id": 244, "proto": "POLITOED_NORMAL" }, "245": { "form": "Shadow", + "form_id": 245, "proto": "POLITOED_SHADOW" }, "246": { "form": "Purified", + "form_id": 246, "proto": "POLITOED_PURIFIED" } }, - "pokedex_id": 186, - "name": "Politoed", "default_form_id": "244", "types": [ "Water" @@ -10987,22 +11655,25 @@ "default_form": "Normal" }, "187": { + "name": "Hoppip", + "pokedex_id": 187, "forms": { "1205": { "form": "Normal", + "form_id": 1205, "proto": "HOPPIP_NORMAL" }, "1206": { "form": "Shadow", + "form_id": 1206, "proto": "HOPPIP_SHADOW" }, "1207": { "form": "Purified", + "form_id": 1207, "proto": "HOPPIP_PURIFIED" } }, - "pokedex_id": 187, - "name": "Hoppip", "default_form_id": "1205", "types": [ "Grass", @@ -11028,12 +11699,12 @@ "Skiploom" ], "evolutions_ids": [ - "188" + null ], "evolutions": [ { "evolution": "Skiploom", - "evolution_id": "188", + "evolution_id": 188, "candy_cost": 25 } ], @@ -11048,22 +11719,25 @@ "default_form": "Normal" }, "188": { + "name": "Skiploom", + "pokedex_id": 188, "forms": { "1208": { "form": "Normal", + "form_id": 1208, "proto": "SKIPLOOM_NORMAL" }, "1209": { "form": "Shadow", + "form_id": 1209, "proto": "SKIPLOOM_SHADOW" }, "1210": { "form": "Purified", + "form_id": 1210, "proto": "SKIPLOOM_PURIFIED" } }, - "pokedex_id": 188, - "name": "Skiploom", "default_form_id": "1208", "types": [ "Grass", @@ -11089,12 +11763,12 @@ "Jumpluff" ], "evolutions_ids": [ - "189" + null ], "evolutions": [ { "evolution": "Jumpluff", - "evolution_id": "189", + "evolution_id": 189, "candy_cost": 100 } ], @@ -11109,22 +11783,25 @@ "default_form": "Normal" }, "189": { + "name": "Jumpluff", + "pokedex_id": 189, "forms": { "1211": { "form": "Normal", + "form_id": 1211, "proto": "JUMPLUFF_NORMAL" }, "1212": { "form": "Shadow", + "form_id": 1212, "proto": "JUMPLUFF_SHADOW" }, "1213": { "form": "Purified", + "form_id": 1213, "proto": "JUMPLUFF_PURIFIED" } }, - "pokedex_id": 189, - "name": "Jumpluff", "default_form_id": "1211", "types": [ "Grass", @@ -11160,22 +11837,25 @@ "default_form": "Normal" }, "190": { + "name": "Aipom", + "pokedex_id": 190, "forms": { "1214": { "form": "Normal", + "form_id": 1214, "proto": "AIPOM_NORMAL" }, "1215": { "form": "Shadow", + "form_id": 1215, "proto": "AIPOM_SHADOW" }, "1216": { "form": "Purified", + "form_id": 1216, "proto": "AIPOM_PURIFIED" } }, - "pokedex_id": 190, - "name": "Aipom", "default_form_id": "1214", "types": [ "Normal" @@ -11201,7 +11881,7 @@ "evolutions": [ { "evolution": "Ambipom", - "evolution_id": "424", + "evolution_id": 424, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -11216,22 +11896,25 @@ "default_form": "Normal" }, "191": { + "name": "Sunkern", + "pokedex_id": 191, "forms": { "1217": { "form": "Normal", + "form_id": 1217, "proto": "SUNKERN_NORMAL" }, "1218": { "form": "Shadow", + "form_id": 1218, "proto": "SUNKERN_SHADOW" }, "1219": { "form": "Purified", + "form_id": 1219, "proto": "SUNKERN_PURIFIED" } }, - "pokedex_id": 191, - "name": "Sunkern", "default_form_id": "1217", "types": [ "Grass" @@ -11256,12 +11939,12 @@ "Sunflora" ], "evolutions_ids": [ - "192" + null ], "evolutions": [ { "evolution": "Sunflora", - "evolution_id": "192", + "evolution_id": 192, "candy_cost": 50, "evolution_item": "Sun Stone" } @@ -11277,22 +11960,25 @@ "default_form": "Normal" }, "192": { + "name": "Sunflora", + "pokedex_id": 192, "forms": { "1220": { "form": "Normal", + "form_id": 1220, "proto": "SUNFLORA_NORMAL" }, "1221": { "form": "Shadow", + "form_id": 1221, "proto": "SUNFLORA_SHADOW" }, "1222": { "form": "Purified", + "form_id": 1222, "proto": "SUNFLORA_PURIFIED" } }, - "pokedex_id": 192, - "name": "Sunflora", "default_form_id": "1220", "types": [ "Grass" @@ -11326,22 +12012,25 @@ "default_form": "Normal" }, "193": { + "name": "Yanma", + "pokedex_id": 193, "forms": { "1223": { "form": "Normal", + "form_id": 1223, "proto": "YANMA_NORMAL" }, "1224": { "form": "Shadow", + "form_id": 1224, "proto": "YANMA_SHADOW" }, "1225": { "form": "Purified", + "form_id": 1225, "proto": "YANMA_PURIFIED" } }, - "pokedex_id": 193, - "name": "Yanma", "default_form_id": "1223", "types": [ "Bug", @@ -11368,7 +12057,7 @@ "evolutions": [ { "evolution": "Yanmega", - "evolution_id": "469", + "evolution_id": 469, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -11383,22 +12072,25 @@ "default_form": "Normal" }, "194": { + "name": "Wooper", + "pokedex_id": 194, "forms": { "1226": { "form": "Normal", + "form_id": 1226, "proto": "WOOPER_NORMAL" }, "1227": { "form": "Shadow", + "form_id": 1227, "proto": "WOOPER_SHADOW" }, "1228": { "form": "Purified", + "form_id": 1228, "proto": "WOOPER_PURIFIED" } }, - "pokedex_id": 194, - "name": "Wooper", "default_form_id": "1226", "types": [ "Water", @@ -11424,12 +12116,12 @@ "Quagsire" ], "evolutions_ids": [ - "195" + null ], "evolutions": [ { "evolution": "Quagsire", - "evolution_id": "195", + "evolution_id": 195, "candy_cost": 50 } ], @@ -11444,22 +12136,25 @@ "default_form": "Normal" }, "195": { + "name": "Quagsire", + "pokedex_id": 195, "forms": { "1229": { "form": "Normal", + "form_id": 1229, "proto": "QUAGSIRE_NORMAL" }, "1230": { "form": "Shadow", + "form_id": 1230, "proto": "QUAGSIRE_SHADOW" }, "1231": { "form": "Purified", + "form_id": 1231, "proto": "QUAGSIRE_PURIFIED" } }, - "pokedex_id": 195, - "name": "Quagsire", "default_form_id": "1229", "types": [ "Water", @@ -11495,22 +12190,25 @@ "default_form": "Normal" }, "196": { + "name": "Espeon", + "pokedex_id": 196, "forms": { "1232": { "form": "Normal", + "form_id": 1232, "proto": "ESPEON_NORMAL" }, "1233": { "form": "Shadow", + "form_id": 1233, "proto": "ESPEON_SHADOW" }, "1234": { "form": "Purified", + "form_id": 1234, "proto": "ESPEON_PURIFIED" } }, - "pokedex_id": 196, - "name": "Espeon", "default_form_id": "1232", "types": [ "Psychic" @@ -11544,22 +12242,25 @@ "default_form": "Normal" }, "197": { + "name": "Umbreon", + "pokedex_id": 197, "forms": { "1235": { "form": "Normal", + "form_id": 1235, "proto": "UMBREON_NORMAL" }, "1236": { "form": "Shadow", + "form_id": 1236, "proto": "UMBREON_SHADOW" }, "1237": { "form": "Purified", + "form_id": 1237, "proto": "UMBREON_PURIFIED" } }, - "pokedex_id": 197, - "name": "Umbreon", "default_form_id": "1235", "types": [ "Dark" @@ -11592,22 +12293,25 @@ "default_form": "Normal" }, "198": { + "name": "Murkrow", + "pokedex_id": 198, "forms": { "855": { "form": "Normal", + "form_id": 855, "proto": "MURKROW_NORMAL" }, "856": { "form": "Shadow", + "form_id": 856, "proto": "MURKROW_SHADOW" }, "857": { "form": "Purified", + "form_id": 857, "proto": "MURKROW_PURIFIED" } }, - "pokedex_id": 198, - "name": "Murkrow", "default_form_id": "855", "types": [ "Dark", @@ -11634,7 +12338,7 @@ "evolutions": [ { "evolution": "Honchkrow", - "evolution_id": "430", + "evolution_id": 430, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -11649,22 +12353,25 @@ "default_form": "Normal" }, "199": { + "name": "Slowking", + "pokedex_id": 199, "forms": { "1238": { "form": "Normal", + "form_id": 1238, "proto": "SLOWKING_NORMAL" }, "1239": { "form": "Shadow", + "form_id": 1239, "proto": "SLOWKING_SHADOW" }, "1240": { "form": "Purified", + "form_id": 1240, "proto": "SLOWKING_PURIFIED" } }, - "pokedex_id": 199, - "name": "Slowking", "default_form_id": "1238", "types": [ "Water", @@ -11699,22 +12406,25 @@ "default_form": "Normal" }, "200": { + "name": "Misdreavus", + "pokedex_id": 200, "forms": { "719": { "form": "Normal", + "form_id": 719, "proto": "MISDREAVUS_NORMAL" }, "720": { "form": "Shadow", + "form_id": 720, "proto": "MISDREAVUS_SHADOW" }, "721": { "form": "Purified", + "form_id": 721, "proto": "MISDREAVUS_PURIFIED" } }, - "pokedex_id": 200, - "name": "Misdreavus", "default_form_id": "719", "types": [ "Ghost" @@ -11740,7 +12450,7 @@ "evolutions": [ { "evolution": "Mismagius", - "evolution_id": "429", + "evolution_id": 429, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -11755,122 +12465,150 @@ "default_form": "Normal" }, "201": { + "name": "Unown", + "pokedex_id": 201, "forms": { "1": { "form": "A", + "form_id": 1, "proto": "UNOWN_A" }, "2": { "form": "B", + "form_id": 2, "proto": "UNOWN_B" }, "3": { "form": "C", + "form_id": 3, "proto": "UNOWN_C" }, "4": { "form": "D", + "form_id": 4, "proto": "UNOWN_D" }, "5": { "form": "E", + "form_id": 5, "proto": "UNOWN_E" }, "6": { "form": "F", + "form_id": 6, "proto": "UNOWN_F" }, "7": { "form": "G", + "form_id": 7, "proto": "UNOWN_G" }, "8": { "form": "H", + "form_id": 8, "proto": "UNOWN_H" }, "9": { "form": "I", + "form_id": 9, "proto": "UNOWN_I" }, "10": { "form": "J", + "form_id": 10, "proto": "UNOWN_J" }, "11": { "form": "K", + "form_id": 11, "proto": "UNOWN_K" }, "12": { "form": "L", + "form_id": 12, "proto": "UNOWN_L" }, "13": { "form": "M", + "form_id": 13, "proto": "UNOWN_M" }, "14": { "form": "N", + "form_id": 14, "proto": "UNOWN_N" }, "15": { "form": "O", + "form_id": 15, "proto": "UNOWN_O" }, "16": { "form": "P", + "form_id": 16, "proto": "UNOWN_P" }, "17": { "form": "Q", + "form_id": 17, "proto": "UNOWN_Q" }, "18": { "form": "R", + "form_id": 18, "proto": "UNOWN_R" }, "19": { "form": "S", + "form_id": 19, "proto": "UNOWN_S" }, "20": { "form": "T", + "form_id": 20, "proto": "UNOWN_T" }, "21": { "form": "U", + "form_id": 21, "proto": "UNOWN_U" }, "22": { "form": "V", + "form_id": 22, "proto": "UNOWN_V" }, "23": { "form": "W", + "form_id": 23, "proto": "UNOWN_W" }, "24": { "form": "X", + "form_id": 24, "proto": "UNOWN_X" }, "25": { "form": "Y", + "form_id": 25, "proto": "UNOWN_Y" }, "26": { "form": "Z", + "form_id": 26, "proto": "UNOWN_Z" }, "27": { "form": "Exclamation Point", + "form_id": 27, "proto": "UNOWN_EXCLAMATION_POINT" }, "28": { "form": "Question Mark", + "form_id": 28, "proto": "UNOWN_QUESTION_MARK" } }, - "pokedex_id": 201, - "name": "Unown", "default_form_id": "1", "types": [ "Psychic" @@ -11901,26 +12639,30 @@ "default_form": "A" }, "202": { + "name": "Wobbuffet", + "pokedex_id": 202, "forms": { "602": { "form": "Normal", + "form_id": 602, "proto": "WOBBUFFET_NORMAL" }, "686": { "form": "Shadow", + "form_id": 686, "proto": "WOBBUFFET_SHADOW" }, "687": { "form": "Purified", + "form_id": 687, "proto": "WOBBUFFET_PURIFIED" }, "2328": { "form": "Spring 2020", + "form_id": 2328, "proto": "WOBBUFFET_SPRING_2020" } }, - "pokedex_id": 202, - "name": "Wobbuffet", "default_form_id": "602", "types": [ "Psychic" @@ -11953,22 +12695,25 @@ "default_form": "Normal" }, "203": { + "name": "Girafarig", + "pokedex_id": 203, "forms": { "1241": { "form": "Normal", + "form_id": 1241, "proto": "GIRAFARIG_NORMAL" }, "1242": { "form": "Shadow", + "form_id": 1242, "proto": "GIRAFARIG_SHADOW" }, "1243": { "form": "Purified", + "form_id": 1243, "proto": "GIRAFARIG_PURIFIED" } }, - "pokedex_id": 203, - "name": "Girafarig", "default_form_id": "1241", "types": [ "Normal", @@ -12003,22 +12748,28 @@ "default_form": "Normal" }, "204": { + "name": "Pineco", + "pokedex_id": 204, "forms": { "1244": { "form": "Normal", - "proto": "PINECO_NORMAL" + "form_id": 1244, + "proto": "PINECO_NORMAL", + "evolution_form": 1247 }, "1245": { "form": "Shadow", - "proto": "PINECO_SHADOW" + "form_id": 1245, + "proto": "PINECO_SHADOW", + "evolution_form": 1248 }, "1246": { "form": "Purified", - "proto": "PINECO_PURIFIED" + "form_id": 1246, + "proto": "PINECO_PURIFIED", + "evolution_form": 1249 } }, - "pokedex_id": 204, - "name": "Pineco", "default_form_id": "1244", "types": [ "Bug" @@ -12043,12 +12794,12 @@ "Forretress" ], "evolutions_ids": [ - "205" + null ], "evolutions": [ { "evolution": "Forretress", - "evolution_id": "205", + "evolution_id": 205, "candy_cost": 50 } ], @@ -12063,22 +12814,25 @@ "default_form": "Normal" }, "205": { + "name": "Forretress", + "pokedex_id": 205, "forms": { "1247": { "form": "Normal", + "form_id": 1247, "proto": "FORRETRESS_NORMAL" }, "1248": { "form": "Shadow", + "form_id": 1248, "proto": "FORRETRESS_SHADOW" }, "1249": { "form": "Purified", + "form_id": 1249, "proto": "FORRETRESS_PURIFIED" } }, - "pokedex_id": 205, - "name": "Forretress", "default_form_id": "1247", "types": [ "Bug", @@ -12115,22 +12869,25 @@ "default_form": "Normal" }, "206": { + "name": "Dunsparce", + "pokedex_id": 206, "forms": { "1250": { "form": "Normal", + "form_id": 1250, "proto": "DUNSPARCE_NORMAL" }, "1251": { "form": "Shadow", + "form_id": 1251, "proto": "DUNSPARCE_SHADOW" }, "1252": { "form": "Purified", + "form_id": 1252, "proto": "DUNSPARCE_PURIFIED" } }, - "pokedex_id": 206, - "name": "Dunsparce", "default_form_id": "1250", "types": [ "Normal" @@ -12164,22 +12921,25 @@ "default_form": "Normal" }, "207": { + "name": "Gligar", + "pokedex_id": 207, "forms": { "803": { "form": "Normal", + "form_id": 803, "proto": "GLIGAR_NORMAL" }, "804": { "form": "Shadow", + "form_id": 804, "proto": "GLIGAR_SHADOW" }, "805": { "form": "Purified", + "form_id": 805, "proto": "GLIGAR_PURIFIED" } }, - "pokedex_id": 207, - "name": "Gligar", "default_form_id": "803", "types": [ "Ground", @@ -12206,7 +12966,7 @@ "evolutions": [ { "evolution": "Gliscor", - "evolution_id": "472", + "evolution_id": 472, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -12221,22 +12981,25 @@ "default_form": "Normal" }, "208": { + "name": "Steelix", + "pokedex_id": 208, "forms": { "905": { "form": "Normal", + "form_id": 905, "proto": "STEELIX_NORMAL" }, "906": { "form": "Shadow", + "form_id": 906, "proto": "STEELIX_SHADOW" }, "907": { "form": "Purified", + "form_id": 907, "proto": "STEELIX_PURIFIED" } }, - "pokedex_id": 208, - "name": "Steelix", "default_form_id": "905", "types": [ "Steel", @@ -12272,22 +13035,25 @@ "default_form": "Normal" }, "209": { + "name": "Snubbull", + "pokedex_id": 209, "forms": { "1253": { "form": "Normal", + "form_id": 1253, "proto": "SNUBBULL_NORMAL" }, "1254": { "form": "Shadow", + "form_id": 1254, "proto": "SNUBBULL_SHADOW" }, "1255": { "form": "Purified", + "form_id": 1255, "proto": "SNUBBULL_PURIFIED" } }, - "pokedex_id": 209, - "name": "Snubbull", "default_form_id": "1253", "types": [ "Fairy" @@ -12312,12 +13078,12 @@ "Granbull" ], "evolutions_ids": [ - "210" + null ], "evolutions": [ { "evolution": "Granbull", - "evolution_id": "210", + "evolution_id": 210, "candy_cost": 50 } ], @@ -12332,22 +13098,25 @@ "default_form": "Normal" }, "210": { + "name": "Granbull", + "pokedex_id": 210, "forms": { "1256": { "form": "Normal", + "form_id": 1256, "proto": "GRANBULL_NORMAL" }, "1257": { "form": "Shadow", + "form_id": 1257, "proto": "GRANBULL_SHADOW" }, "1258": { "form": "Purified", + "form_id": 1258, "proto": "GRANBULL_PURIFIED" } }, - "pokedex_id": 210, - "name": "Granbull", "default_form_id": "1256", "types": [ "Fairy" @@ -12382,22 +13151,25 @@ "default_form": "Normal" }, "211": { + "name": "Qwilfish", + "pokedex_id": 211, "forms": { "1259": { "form": "Normal", + "form_id": 1259, "proto": "QWILFISH_NORMAL" }, "1260": { "form": "Shadow", + "form_id": 1260, "proto": "QWILFISH_SHADOW" }, "1261": { "form": "Purified", + "form_id": 1261, "proto": "QWILFISH_PURIFIED" } }, - "pokedex_id": 211, - "name": "Qwilfish", "default_form_id": "1259", "types": [ "Water", @@ -12434,22 +13206,25 @@ "default_form": "Normal" }, "212": { + "name": "Scizor", + "pokedex_id": 212, "forms": { "250": { "form": "Normal", + "form_id": 250, "proto": "SCIZOR_NORMAL" }, "251": { "form": "Shadow", + "form_id": 251, "proto": "SCIZOR_SHADOW" }, "252": { "form": "Purified", + "form_id": 252, "proto": "SCIZOR_PURIFIED" } }, - "pokedex_id": 212, - "name": "Scizor", "default_form_id": "250", "types": [ "Bug", @@ -12484,22 +13259,25 @@ "default_form": "Normal" }, "213": { + "name": "Shuckle", + "pokedex_id": 213, "forms": { "827": { "form": "Normal", + "form_id": 827, "proto": "SHUCKLE_NORMAL" }, "828": { "form": "Shadow", + "form_id": 828, "proto": "SHUCKLE_SHADOW" }, "829": { "form": "Purified", + "form_id": 829, "proto": "SHUCKLE_PURIFIED" } }, - "pokedex_id": 213, - "name": "Shuckle", "default_form_id": "827", "types": [ "Bug", @@ -12534,22 +13312,25 @@ "default_form": "Normal" }, "214": { + "name": "Heracross", + "pokedex_id": 214, "forms": { "1262": { "form": "Normal", + "form_id": 1262, "proto": "HERACROSS_NORMAL" }, "1263": { "form": "Shadow", + "form_id": 1263, "proto": "HERACROSS_SHADOW" }, "1264": { "form": "Purified", + "form_id": 1264, "proto": "HERACROSS_PURIFIED" } }, - "pokedex_id": 214, - "name": "Heracross", "default_form_id": "1262", "types": [ "Bug", @@ -12584,22 +13365,25 @@ "default_form": "Normal" }, "215": { + "name": "Sneasel", + "pokedex_id": 215, "forms": { "797": { "form": "Normal", + "form_id": 797, "proto": "SNEASEL_NORMAL" }, "798": { "form": "Shadow", + "form_id": 798, "proto": "SNEASEL_SHADOW" }, "799": { "form": "Purified", + "form_id": 799, "proto": "SNEASEL_PURIFIED" } }, - "pokedex_id": 215, - "name": "Sneasel", "default_form_id": "797", "types": [ "Dark", @@ -12626,7 +13410,7 @@ "evolutions": [ { "evolution": "Weavile", - "evolution_id": "461", + "evolution_id": 461, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -12641,22 +13425,25 @@ "default_form": "Normal" }, "216": { + "name": "Teddiursa", + "pokedex_id": 216, "forms": { "1265": { "form": "Normal", + "form_id": 1265, "proto": "TEDDIURSA_NORMAL" }, "1266": { "form": "Shadow", + "form_id": 1266, "proto": "TEDDIURSA_SHADOW" }, "1267": { "form": "Purified", + "form_id": 1267, "proto": "TEDDIURSA_PURIFIED" } }, - "pokedex_id": 216, - "name": "Teddiursa", "default_form_id": "1265", "types": [ "Normal" @@ -12681,12 +13468,12 @@ "Ursaring" ], "evolutions_ids": [ - "217" + null ], "evolutions": [ { "evolution": "Ursaring", - "evolution_id": "217", + "evolution_id": 217, "candy_cost": 50 } ], @@ -12701,22 +13488,25 @@ "default_form": "Normal" }, "217": { + "name": "Ursaring", + "pokedex_id": 217, "forms": { "1268": { "form": "Normal", + "form_id": 1268, "proto": "URSARING_NORMAL" }, "1269": { "form": "Shadow", + "form_id": 1269, "proto": "URSARING_SHADOW" }, "1270": { "form": "Purified", + "form_id": 1270, "proto": "URSARING_PURIFIED" } }, - "pokedex_id": 217, - "name": "Ursaring", "default_form_id": "1268", "types": [ "Normal" @@ -12751,22 +13541,25 @@ "default_form": "Normal" }, "218": { + "name": "Slugma", + "pokedex_id": 218, "forms": { "1271": { "form": "Normal", + "form_id": 1271, "proto": "SLUGMA_NORMAL" }, "1272": { "form": "Shadow", + "form_id": 1272, "proto": "SLUGMA_SHADOW" }, "1273": { "form": "Purified", + "form_id": 1273, "proto": "SLUGMA_PURIFIED" } }, - "pokedex_id": 218, - "name": "Slugma", "default_form_id": "1271", "types": [ "Fire" @@ -12791,12 +13584,12 @@ "Magcargo" ], "evolutions_ids": [ - "219" + null ], "evolutions": [ { "evolution": "Magcargo", - "evolution_id": "219", + "evolution_id": 219, "candy_cost": 50 } ], @@ -12811,22 +13604,25 @@ "default_form": "Normal" }, "219": { + "name": "Magcargo", + "pokedex_id": 219, "forms": { "1274": { "form": "Normal", + "form_id": 1274, "proto": "MAGCARGO_NORMAL" }, "1275": { "form": "Shadow", + "form_id": 1275, "proto": "MAGCARGO_SHADOW" }, "1276": { "form": "Purified", + "form_id": 1276, "proto": "MAGCARGO_PURIFIED" } }, - "pokedex_id": 219, - "name": "Magcargo", "default_form_id": "1274", "types": [ "Fire", @@ -12861,22 +13657,25 @@ "default_form": "Normal" }, "220": { + "name": "Swinub", + "pokedex_id": 220, "forms": { "1277": { "form": "Normal", + "form_id": 1277, "proto": "SWINUB_NORMAL" }, "1278": { "form": "Shadow", + "form_id": 1278, "proto": "SWINUB_SHADOW" }, "1279": { "form": "Purified", + "form_id": 1279, "proto": "SWINUB_PURIFIED" } }, - "pokedex_id": 220, - "name": "Swinub", "default_form_id": "1277", "types": [ "Ice", @@ -12902,12 +13701,12 @@ "Piloswine" ], "evolutions_ids": [ - "221" + null ], "evolutions": [ { "evolution": "Piloswine", - "evolution_id": "221", + "evolution_id": 221, "candy_cost": 25 } ], @@ -12922,22 +13721,25 @@ "default_form": "Normal" }, "221": { + "name": "Piloswine", + "pokedex_id": 221, "forms": { "1280": { "form": "Normal", + "form_id": 1280, "proto": "PILOSWINE_NORMAL" }, "1281": { "form": "Shadow", + "form_id": 1281, "proto": "PILOSWINE_SHADOW" }, "1282": { "form": "Purified", + "form_id": 1282, "proto": "PILOSWINE_PURIFIED" } }, - "pokedex_id": 221, - "name": "Piloswine", "default_form_id": "1280", "types": [ "Ice", @@ -12964,7 +13766,7 @@ "evolutions": [ { "evolution": "Mamoswine", - "evolution_id": "473", + "evolution_id": 473, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -12979,22 +13781,30 @@ "default_form": "Normal" }, "222": { + "name": "Corsola", + "pokedex_id": 222, "forms": { "1283": { "form": "Normal", + "form_id": 1283, "proto": "CORSOLA_NORMAL" }, "1284": { "form": "Shadow", + "form_id": 1284, "proto": "CORSOLA_SHADOW" }, "1285": { "form": "Purified", + "form_id": 1285, "proto": "CORSOLA_PURIFIED" + }, + "2340": { + "form": "Galarian", + "form_id": 2340, + "proto": "CORSOLA_GALARIAN" } }, - "pokedex_id": 222, - "name": "Corsola", "default_form_id": "1283", "types": [ "Water", @@ -13029,22 +13839,25 @@ "default_form": "Normal" }, "223": { + "name": "Remoraid", + "pokedex_id": 223, "forms": { "1286": { "form": "Normal", + "form_id": 1286, "proto": "REMORAID_NORMAL" }, "1287": { "form": "Shadow", + "form_id": 1287, "proto": "REMORAID_SHADOW" }, "1288": { "form": "Purified", + "form_id": 1288, "proto": "REMORAID_PURIFIED" } }, - "pokedex_id": 223, - "name": "Remoraid", "default_form_id": "1286", "types": [ "Water" @@ -13069,12 +13882,12 @@ "Octillery" ], "evolutions_ids": [ - "224" + null ], "evolutions": [ { "evolution": "Octillery", - "evolution_id": "224", + "evolution_id": 224, "candy_cost": 50 } ], @@ -13089,22 +13902,25 @@ "default_form": "Normal" }, "224": { + "name": "Octillery", + "pokedex_id": 224, "forms": { "1289": { "form": "Normal", + "form_id": 1289, "proto": "OCTILLERY_NORMAL" }, "1290": { "form": "Shadow", + "form_id": 1290, "proto": "OCTILLERY_SHADOW" }, "1291": { "form": "Purified", + "form_id": 1291, "proto": "OCTILLERY_PURIFIED" } }, - "pokedex_id": 224, - "name": "Octillery", "default_form_id": "1289", "types": [ "Water" @@ -13140,22 +13956,25 @@ "default_form": "Normal" }, "225": { + "name": "Delibird", + "pokedex_id": 225, "forms": { "938": { "form": "Normal", + "form_id": 938, "proto": "DELIBIRD_NORMAL" }, "939": { "form": "Shadow", + "form_id": 939, "proto": "DELIBIRD_SHADOW" }, "940": { "form": "Purified", + "form_id": 940, "proto": "DELIBIRD_PURIFIED" } }, - "pokedex_id": 225, - "name": "Delibird", "default_form_id": "938", "types": [ "Ice", @@ -13189,22 +14008,25 @@ "default_form": "Normal" }, "226": { + "name": "Mantine", + "pokedex_id": 226, "forms": { "1292": { "form": "Normal", + "form_id": 1292, "proto": "MANTINE_NORMAL" }, "1293": { "form": "Shadow", + "form_id": 1293, "proto": "MANTINE_SHADOW" }, "1294": { "form": "Purified", + "form_id": 1294, "proto": "MANTINE_PURIFIED" } }, - "pokedex_id": 226, - "name": "Mantine", "default_form_id": "1292", "types": [ "Water", @@ -13241,22 +14063,25 @@ "default_form": "Normal" }, "227": { + "name": "Skarmory", + "pokedex_id": 227, "forms": { "1295": { "form": "Normal", + "form_id": 1295, "proto": "SKARMORY_NORMAL" }, "1296": { "form": "Shadow", + "form_id": 1296, "proto": "SKARMORY_SHADOW" }, "1297": { "form": "Purified", + "form_id": 1297, "proto": "SKARMORY_PURIFIED" } }, - "pokedex_id": 227, - "name": "Skarmory", "default_form_id": "1295", "types": [ "Steel", @@ -13291,25 +14116,28 @@ "default_form": "Normal" }, "228": { + "name": "Houndour", + "pokedex_id": 228, "forms": { "229": { "form": "Normal", + "form_id": 229, "proto": "HOUNDOUR_NORMAL", - "evolution_form": "232" + "evolution_form": 232 }, "230": { "form": "Shadow", + "form_id": 230, "proto": "HOUNDOUR_SHADOW", - "evolution_form": "233" + "evolution_form": 233 }, "231": { "form": "Purified", + "form_id": 231, "proto": "HOUNDOUR_PURIFIED", - "evolution_form": "234" + "evolution_form": 234 } }, - "pokedex_id": 228, - "name": "Houndour", "default_form_id": "229", "types": [ "Dark", @@ -13335,12 +14163,12 @@ "Houndoom" ], "evolutions_ids": [ - "229" + null ], "evolutions": [ { "evolution": "Houndoom", - "evolution_id": "229", + "evolution_id": 229, "candy_cost": 50 } ], @@ -13355,22 +14183,25 @@ "default_form": "Normal" }, "229": { + "name": "Houndoom", + "pokedex_id": 229, "forms": { "232": { "form": "Normal", + "form_id": 232, "proto": "HOUNDOOM_NORMAL" }, "233": { "form": "Shadow", + "form_id": 233, "proto": "HOUNDOOM_SHADOW" }, "234": { "form": "Purified", + "form_id": 234, "proto": "HOUNDOOM_PURIFIED" } }, - "pokedex_id": 229, - "name": "Houndoom", "default_form_id": "232", "types": [ "Dark", @@ -13406,22 +14237,25 @@ "default_form": "Normal" }, "230": { + "name": "Kingdra", + "pokedex_id": 230, "forms": { "1298": { "form": "Normal", + "form_id": 1298, "proto": "KINGDRA_NORMAL" }, "1299": { "form": "Shadow", + "form_id": 1299, "proto": "KINGDRA_SHADOW" }, "1300": { "form": "Purified", + "form_id": 1300, "proto": "KINGDRA_PURIFIED" } }, - "pokedex_id": 230, - "name": "Kingdra", "default_form_id": "1298", "types": [ "Water", @@ -13457,22 +14291,25 @@ "default_form": "Normal" }, "231": { + "name": "Phanpy", + "pokedex_id": 231, "forms": { "1301": { "form": "Normal", + "form_id": 1301, "proto": "PHANPY_NORMAL" }, "1302": { "form": "Shadow", + "form_id": 1302, "proto": "PHANPY_SHADOW" }, "1303": { "form": "Purified", + "form_id": 1303, "proto": "PHANPY_PURIFIED" } }, - "pokedex_id": 231, - "name": "Phanpy", "default_form_id": "1301", "types": [ "Ground" @@ -13497,12 +14334,12 @@ "Donphan" ], "evolutions_ids": [ - "232" + null ], "evolutions": [ { "evolution": "Donphan", - "evolution_id": "232", + "evolution_id": 232, "candy_cost": 50 } ], @@ -13517,22 +14354,25 @@ "default_form": "Normal" }, "232": { + "name": "Donphan", + "pokedex_id": 232, "forms": { "1304": { "form": "Normal", + "form_id": 1304, "proto": "DONPHAN_NORMAL" }, "1305": { "form": "Shadow", + "form_id": 1305, "proto": "DONPHAN_SHADOW" }, "1306": { "form": "Purified", + "form_id": 1306, "proto": "DONPHAN_PURIFIED" } }, - "pokedex_id": 232, - "name": "Donphan", "default_form_id": "1304", "types": [ "Ground" @@ -13568,22 +14408,25 @@ "default_form": "Normal" }, "233": { + "name": "Porygon2", + "pokedex_id": 233, "forms": { "680": { "form": "Normal", + "form_id": 680, "proto": "PORYGON2_NORMAL" }, "681": { "form": "Shadow", + "form_id": 681, "proto": "PORYGON2_SHADOW" }, "682": { "form": "Purified", + "form_id": 682, "proto": "PORYGON2_PURIFIED" } }, - "pokedex_id": 233, - "name": "Porygon2", "default_form_id": "680", "types": [ "Normal" @@ -13610,7 +14453,7 @@ "evolutions": [ { "evolution": "Porygon Z", - "evolution_id": "474", + "evolution_id": 474, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -13625,22 +14468,25 @@ "default_form": "Normal" }, "234": { + "name": "Stantler", + "pokedex_id": 234, "forms": { "941": { "form": "Normal", + "form_id": 941, "proto": "STANTLER_NORMAL" }, "942": { "form": "Shadow", + "form_id": 942, "proto": "STANTLER_SHADOW" }, "943": { "form": "Purified", + "form_id": 943, "proto": "STANTLER_PURIFIED" } }, - "pokedex_id": 234, - "name": "Stantler", "default_form_id": "941", "types": [ "Normal" @@ -13674,22 +14520,25 @@ "default_form": "Normal" }, "235": { + "name": "Smeargle", + "pokedex_id": 235, "forms": { "1307": { "form": "Normal", + "form_id": 1307, "proto": "SMEARGLE_NORMAL" }, "1308": { "form": "Shadow", + "form_id": 1308, "proto": "SMEARGLE_SHADOW" }, "1309": { "form": "Purified", + "form_id": 1309, "proto": "SMEARGLE_PURIFIED" } }, - "pokedex_id": 235, - "name": "Smeargle", "default_form_id": "1307", "types": [ "Normal" @@ -13715,22 +14564,25 @@ "default_form": "Normal" }, "236": { + "name": "Tyrogue", + "pokedex_id": 236, "forms": { "1310": { "form": "Normal", + "form_id": 1310, "proto": "TYROGUE_NORMAL" }, "1311": { "form": "Shadow", + "form_id": 1311, "proto": "TYROGUE_SHADOW" }, "1312": { "form": "Purified", + "form_id": 1312, "proto": "TYROGUE_PURIFIED" } }, - "pokedex_id": 236, - "name": "Tyrogue", "default_form_id": "1310", "types": [ "Fighting" @@ -13756,24 +14608,24 @@ "Hitmontop" ], "evolutions_ids": [ - "106", - "107", - "237" + null, + null, + null ], "evolutions": [ { "evolution": "Hitmonlee", - "evolution_id": "106", + "evolution_id": 106, "candy_cost": 25 }, { "evolution": "Hitmonchan", - "evolution_id": "107", + "evolution_id": 107, "candy_cost": 25 }, { "evolution": "Hitmontop", - "evolution_id": "237", + "evolution_id": 237, "candy_cost": 25 } ], @@ -13788,22 +14640,25 @@ "default_form": "Normal" }, "237": { + "name": "Hitmontop", + "pokedex_id": 237, "forms": { "1313": { "form": "Normal", + "form_id": 1313, "proto": "HITMONTOP_NORMAL" }, "1314": { "form": "Shadow", + "form_id": 1314, "proto": "HITMONTOP_SHADOW" }, "1315": { "form": "Purified", + "form_id": 1315, "proto": "HITMONTOP_PURIFIED" } }, - "pokedex_id": 237, - "name": "Hitmontop", "default_form_id": "1313", "types": [ "Fighting" @@ -13837,22 +14692,25 @@ "default_form": "Normal" }, "238": { + "name": "Smoochum", + "pokedex_id": 238, "forms": { "1316": { "form": "Normal", + "form_id": 1316, "proto": "SMOOCHUM_NORMAL" }, "1317": { "form": "Shadow", + "form_id": 1317, "proto": "SMOOCHUM_SHADOW" }, "1318": { "form": "Purified", + "form_id": 1318, "proto": "SMOOCHUM_PURIFIED" } }, - "pokedex_id": 238, - "name": "Smoochum", "default_form_id": "1316", "types": [ "Ice", @@ -13877,12 +14735,12 @@ "Jynx" ], "evolutions_ids": [ - "124" + null ], "evolutions": [ { "evolution": "Jynx", - "evolution_id": "124", + "evolution_id": 124, "candy_cost": 25 } ], @@ -13897,22 +14755,25 @@ "default_form": "Normal" }, "239": { + "name": "Elekid", + "pokedex_id": 239, "forms": { "1319": { "form": "Normal", + "form_id": 1319, "proto": "ELEKID_NORMAL" }, "1320": { "form": "Shadow", + "form_id": 1320, "proto": "ELEKID_SHADOW" }, "1321": { "form": "Purified", + "form_id": 1321, "proto": "ELEKID_PURIFIED" } }, - "pokedex_id": 239, - "name": "Elekid", "default_form_id": "1319", "types": [ "Electric" @@ -13936,12 +14797,12 @@ "Electabuzz" ], "evolutions_ids": [ - "125" + null ], "evolutions": [ { "evolution": "Electabuzz", - "evolution_id": "125", + "evolution_id": 125, "candy_cost": 25 } ], @@ -13956,22 +14817,25 @@ "default_form": "Normal" }, "240": { + "name": "Magby", + "pokedex_id": 240, "forms": { "1322": { "form": "Normal", + "form_id": 1322, "proto": "MAGBY_NORMAL" }, "1323": { "form": "Shadow", + "form_id": 1323, "proto": "MAGBY_SHADOW" }, "1324": { "form": "Purified", + "form_id": 1324, "proto": "MAGBY_PURIFIED" } }, - "pokedex_id": 240, - "name": "Magby", "default_form_id": "1322", "types": [ "Fire" @@ -13995,12 +14859,12 @@ "Magmar" ], "evolutions_ids": [ - "126" + null ], "evolutions": [ { "evolution": "Magmar", - "evolution_id": "126", + "evolution_id": 126, "candy_cost": 25 } ], @@ -14015,22 +14879,25 @@ "default_form": "Normal" }, "241": { + "name": "Miltank", + "pokedex_id": 241, "forms": { "1325": { "form": "Normal", + "form_id": 1325, "proto": "MILTANK_NORMAL" }, "1326": { "form": "Shadow", + "form_id": 1326, "proto": "MILTANK_SHADOW" }, "1327": { "form": "Purified", + "form_id": 1327, "proto": "MILTANK_PURIFIED" } }, - "pokedex_id": 241, - "name": "Miltank", "default_form_id": "1325", "types": [ "Normal" @@ -14066,22 +14933,25 @@ "default_form": "Normal" }, "242": { + "name": "Blissey", + "pokedex_id": 242, "forms": { "1328": { "form": "Normal", + "form_id": 1328, "proto": "BLISSEY_NORMAL" }, "1329": { "form": "Shadow", + "form_id": 1329, "proto": "BLISSEY_SHADOW" }, "1330": { "form": "Purified", + "form_id": 1330, "proto": "BLISSEY_PURIFIED" } }, - "pokedex_id": 242, - "name": "Blissey", "default_form_id": "1328", "types": [ "Normal" @@ -14115,22 +14985,25 @@ "default_form": "Normal" }, "243": { + "name": "Raikou", + "pokedex_id": 243, "forms": { "1331": { "form": "Normal", + "form_id": 1331, "proto": "RAIKOU_NORMAL" }, "1332": { "form": "Shadow", + "form_id": 1332, "proto": "RAIKOU_SHADOW" }, "1333": { "form": "Purified", + "form_id": 1333, "proto": "RAIKOU_PURIFIED" } }, - "pokedex_id": 243, - "name": "Raikou", "default_form_id": "1331", "types": [ "Electric" @@ -14164,22 +15037,25 @@ "default_form": "Normal" }, "244": { + "name": "Entei", + "pokedex_id": 244, "forms": { "1334": { "form": "Normal", + "form_id": 1334, "proto": "ENTEI_NORMAL" }, "1335": { "form": "Shadow", + "form_id": 1335, "proto": "ENTEI_SHADOW" }, "1336": { "form": "Purified", + "form_id": 1336, "proto": "ENTEI_PURIFIED" } }, - "pokedex_id": 244, - "name": "Entei", "default_form_id": "1334", "types": [ "Fire" @@ -14213,22 +15089,25 @@ "default_form": "Normal" }, "245": { + "name": "Suicune", + "pokedex_id": 245, "forms": { "1337": { "form": "Normal", + "form_id": 1337, "proto": "SUICUNE_NORMAL" }, "1338": { "form": "Shadow", + "form_id": 1338, "proto": "SUICUNE_SHADOW" }, "1339": { "form": "Purified", + "form_id": 1339, "proto": "SUICUNE_PURIFIED" } }, - "pokedex_id": 245, - "name": "Suicune", "default_form_id": "1337", "types": [ "Water" @@ -14263,25 +15142,28 @@ "default_form": "Normal" }, "246": { + "name": "Larvitar", + "pokedex_id": 246, "forms": { "313": { "form": "Normal", + "form_id": 313, "proto": "LARVITAR_NORMAL", - "evolution_form": "316" + "evolution_form": 316 }, "314": { "form": "Shadow", + "form_id": 314, "proto": "LARVITAR_SHADOW", - "evolution_form": "317" + "evolution_form": 317 }, "315": { "form": "Purified", + "form_id": 315, "proto": "LARVITAR_PURIFIED", - "evolution_form": "318" + "evolution_form": 318 } }, - "pokedex_id": 246, - "name": "Larvitar", "default_form_id": "313", "types": [ "Rock", @@ -14307,12 +15189,12 @@ "Pupitar" ], "evolutions_ids": [ - "247" + null ], "evolutions": [ { "evolution": "Pupitar", - "evolution_id": "247", + "evolution_id": 247, "candy_cost": 25 } ], @@ -14327,25 +15209,28 @@ "default_form": "Normal" }, "247": { + "name": "Pupitar", + "pokedex_id": 247, "forms": { "316": { "form": "Normal", + "form_id": 316, "proto": "PUPITAR_NORMAL", - "evolution_form": "319" + "evolution_form": 319 }, "317": { "form": "Shadow", + "form_id": 317, "proto": "PUPITAR_SHADOW", - "evolution_form": "320" + "evolution_form": 320 }, "318": { "form": "Purified", + "form_id": 318, "proto": "PUPITAR_PURIFIED", - "evolution_form": "321" + "evolution_form": 321 } }, - "pokedex_id": 247, - "name": "Pupitar", "default_form_id": "316", "types": [ "Rock", @@ -14371,12 +15256,12 @@ "Tyranitar" ], "evolutions_ids": [ - "248" + null ], "evolutions": [ { "evolution": "Tyranitar", - "evolution_id": "248", + "evolution_id": 248, "candy_cost": 100 } ], @@ -14391,22 +15276,25 @@ "default_form": "Normal" }, "248": { + "name": "Tyranitar", + "pokedex_id": 248, "forms": { "319": { "form": "Normal", + "form_id": 319, "proto": "TYRANITAR_NORMAL" }, "320": { "form": "Shadow", + "form_id": 320, "proto": "TYRANITAR_SHADOW" }, "321": { "form": "Purified", + "form_id": 321, "proto": "TYRANITAR_PURIFIED" } }, - "pokedex_id": 248, - "name": "Tyranitar", "default_form_id": "319", "types": [ "Rock", @@ -14441,22 +15329,25 @@ "default_form": "Normal" }, "249": { + "name": "Lugia", + "pokedex_id": 249, "forms": { "1340": { "form": "Normal", + "form_id": 1340, "proto": "LUGIA_NORMAL" }, "1341": { "form": "Shadow", + "form_id": 1341, "proto": "LUGIA_SHADOW" }, "1342": { "form": "Purified", + "form_id": 1342, "proto": "LUGIA_PURIFIED" } }, - "pokedex_id": 249, - "name": "Lugia", "default_form_id": "1340", "types": [ "Psychic", @@ -14490,23 +15381,9 @@ "default_form": "Normal" }, "250": { - "forms": { - "1343": { - "form": "Normal", - "proto": "HO_OH_NORMAL" - }, - "1344": { - "form": "Shadow", - "proto": "HO_OH_SHADOW" - }, - "1345": { - "form": "Purified", - "proto": "HO_OH_PURIFIED" - } - }, - "pokedex_id": 250, "name": "Ho Oh", - "default_form_id": "1343", + "pokedex_id": 250, + "forms": {}, "types": [ "Fire", "Flying" @@ -14536,26 +15413,28 @@ "buddy_group_number": 7, "buddy_distance": 20, "third_move_stardust": 100000, - "third_move_candy": 100, - "default_form": "Normal" + "third_move_candy": 100 }, "251": { + "name": "Celebi", + "pokedex_id": 251, "forms": { "1346": { "form": "Normal", + "form_id": 1346, "proto": "CELEBI_NORMAL" }, "1347": { "form": "Shadow", + "form_id": 1347, "proto": "CELEBI_SHADOW" }, "1348": { "form": "Purified", + "form_id": 1348, "proto": "CELEBI_PURIFIED" } }, - "pokedex_id": 251, - "name": "Celebi", "default_form_id": "1346", "types": [ "Psychic", @@ -14589,22 +15468,25 @@ "default_form": "Normal" }, "252": { + "name": "Treecko", + "pokedex_id": 252, "forms": { "1349": { "form": "Normal", + "form_id": 1349, "proto": "TREECKO_NORMAL" }, "1350": { "form": "Shadow", + "form_id": 1350, "proto": "TREECKO_SHADOW" }, "1351": { "form": "Purified", + "form_id": 1351, "proto": "TREECKO_PURIFIED" } }, - "pokedex_id": 252, - "name": "Treecko", "default_form_id": "1349", "types": [ "Grass" @@ -14630,7 +15512,7 @@ "evolutions": [ { "evolution": "Grovyle", - "evolution_id": "253", + "evolution_id": 253, "candy_cost": 25 } ], @@ -14644,22 +15526,25 @@ "default_form": "Normal" }, "253": { + "name": "Grovyle", + "pokedex_id": 253, "forms": { "1352": { "form": "Normal", + "form_id": 1352, "proto": "GROVYLE_NORMAL" }, "1353": { "form": "Shadow", + "form_id": 1353, "proto": "GROVYLE_SHADOW" }, "1354": { "form": "Purified", + "form_id": 1354, "proto": "GROVYLE_PURIFIED" } }, - "pokedex_id": 253, - "name": "Grovyle", "default_form_id": "1352", "types": [ "Grass" @@ -14685,7 +15570,7 @@ "evolutions": [ { "evolution": "Sceptile", - "evolution_id": "254", + "evolution_id": 254, "candy_cost": 100 } ], @@ -14699,22 +15584,25 @@ "default_form": "Normal" }, "254": { + "name": "Sceptile", + "pokedex_id": 254, "forms": { "1355": { "form": "Normal", + "form_id": 1355, "proto": "SCEPTILE_NORMAL" }, "1356": { "form": "Shadow", + "form_id": 1356, "proto": "SCEPTILE_SHADOW" }, "1357": { "form": "Purified", + "form_id": 1357, "proto": "SCEPTILE_PURIFIED" } }, - "pokedex_id": 254, - "name": "Sceptile", "default_form_id": "1355", "types": [ "Grass" @@ -14749,22 +15637,25 @@ "default_form": "Normal" }, "255": { + "name": "Torchic", + "pokedex_id": 255, "forms": { "1358": { "form": "Normal", + "form_id": 1358, "proto": "TORCHIC_NORMAL" }, "1359": { "form": "Shadow", + "form_id": 1359, "proto": "TORCHIC_SHADOW" }, "1360": { "form": "Purified", + "form_id": 1360, "proto": "TORCHIC_PURIFIED" } }, - "pokedex_id": 255, - "name": "Torchic", "default_form_id": "1358", "types": [ "Fire" @@ -14790,7 +15681,7 @@ "evolutions": [ { "evolution": "Combusken", - "evolution_id": "256", + "evolution_id": 256, "candy_cost": 25 } ], @@ -14804,22 +15695,25 @@ "default_form": "Normal" }, "256": { + "name": "Combusken", + "pokedex_id": 256, "forms": { "1361": { "form": "Normal", + "form_id": 1361, "proto": "COMBUSKEN_NORMAL" }, "1362": { "form": "Shadow", + "form_id": 1362, "proto": "COMBUSKEN_SHADOW" }, "1363": { "form": "Purified", + "form_id": 1363, "proto": "COMBUSKEN_PURIFIED" } }, - "pokedex_id": 256, - "name": "Combusken", "default_form_id": "1361", "types": [ "Fire", @@ -14846,7 +15740,7 @@ "evolutions": [ { "evolution": "Blaziken", - "evolution_id": "257", + "evolution_id": 257, "candy_cost": 100 } ], @@ -14860,22 +15754,25 @@ "default_form": "Normal" }, "257": { + "name": "Blaziken", + "pokedex_id": 257, "forms": { "1364": { "form": "Normal", + "form_id": 1364, "proto": "BLAZIKEN_NORMAL" }, "1365": { "form": "Shadow", + "form_id": 1365, "proto": "BLAZIKEN_SHADOW" }, "1366": { "form": "Purified", + "form_id": 1366, "proto": "BLAZIKEN_PURIFIED" } }, - "pokedex_id": 257, - "name": "Blaziken", "default_form_id": "1364", "types": [ "Fire", @@ -14911,22 +15808,25 @@ "default_form": "Normal" }, "258": { + "name": "Mudkip", + "pokedex_id": 258, "forms": { "205": { "form": "Normal", + "form_id": 205, "proto": "MUDKIP_NORMAL" }, "206": { "form": "Shadow", + "form_id": 206, "proto": "MUDKIP_SHADOW" }, "207": { "form": "Purified", + "form_id": 207, "proto": "MUDKIP_PURIFIED" } }, - "pokedex_id": 258, - "name": "Mudkip", "default_form_id": "205", "types": [ "Water" @@ -14952,7 +15852,7 @@ "evolutions": [ { "evolution": "Marshtomp", - "evolution_id": "259", + "evolution_id": 259, "candy_cost": 25 } ], @@ -14966,22 +15866,25 @@ "default_form": "Normal" }, "259": { + "name": "Marshtomp", + "pokedex_id": 259, "forms": { "208": { "form": "Normal", + "form_id": 208, "proto": "MARSHTOMP_NORMAL" }, "209": { "form": "Shadow", + "form_id": 209, "proto": "MARSHTOMP_SHADOW" }, "210": { "form": "Purified", + "form_id": 210, "proto": "MARSHTOMP_PURIFIED" } }, - "pokedex_id": 259, - "name": "Marshtomp", "default_form_id": "208", "types": [ "Water", @@ -15008,7 +15911,7 @@ "evolutions": [ { "evolution": "Swampert", - "evolution_id": "260", + "evolution_id": 260, "candy_cost": 100 } ], @@ -15022,22 +15925,25 @@ "default_form": "Normal" }, "260": { + "name": "Swampert", + "pokedex_id": 260, "forms": { "211": { "form": "Normal", + "form_id": 211, "proto": "SWAMPERT_NORMAL" }, "212": { "form": "Shadow", + "form_id": 212, "proto": "SWAMPERT_SHADOW" }, "213": { "form": "Purified", + "form_id": 213, "proto": "SWAMPERT_PURIFIED" } }, - "pokedex_id": 260, - "name": "Swampert", "default_form_id": "211", "types": [ "Water", @@ -15073,22 +15979,25 @@ "default_form": "Normal" }, "261": { + "name": "Poochyena", + "pokedex_id": 261, "forms": { "1367": { "form": "Normal", + "form_id": 1367, "proto": "POOCHYENA_NORMAL" }, "1368": { "form": "Shadow", + "form_id": 1368, "proto": "POOCHYENA_SHADOW" }, "1369": { "form": "Purified", + "form_id": 1369, "proto": "POOCHYENA_PURIFIED" } }, - "pokedex_id": 261, - "name": "Poochyena", "default_form_id": "1367", "types": [ "Dark" @@ -15114,7 +16023,7 @@ "evolutions": [ { "evolution": "Mightyena", - "evolution_id": "262", + "evolution_id": 262, "candy_cost": 50 } ], @@ -15128,22 +16037,25 @@ "default_form": "Normal" }, "262": { + "name": "Mightyena", + "pokedex_id": 262, "forms": { "1370": { "form": "Normal", + "form_id": 1370, "proto": "MIGHTYENA_NORMAL" }, "1371": { "form": "Shadow", + "form_id": 1371, "proto": "MIGHTYENA_SHADOW" }, "1372": { "form": "Purified", + "form_id": 1372, "proto": "MIGHTYENA_PURIFIED" } }, - "pokedex_id": 262, - "name": "Mightyena", "default_form_id": "1370", "types": [ "Dark" @@ -15179,13 +16091,17 @@ "default_form": "Normal" }, "263": { + "name": "Zigzagoon", + "pokedex_id": 263, "forms": { "945": { "form": "Normal", + "form_id": 945, "proto": "ZIGZAGOON_NORMAL" }, "946": { "form": "Galarian", + "form_id": 946, "proto": "ZIGZAGOON_GALARIAN", "quick_moves": [ "Tackle", @@ -15203,15 +16119,15 @@ }, "1373": { "form": "Shadow", + "form_id": 1373, "proto": "ZIGZAGOON_SHADOW" }, "1374": { "form": "Purified", + "form_id": 1374, "proto": "ZIGZAGOON_PURIFIED" } }, - "pokedex_id": 263, - "name": "Zigzagoon", "default_form_id": "945", "types": [ "Normal" @@ -15237,7 +16153,7 @@ "evolutions": [ { "evolution": "Linoone", - "evolution_id": "264", + "evolution_id": 264, "candy_cost": 50 } ], @@ -15251,13 +16167,17 @@ "default_form": "Normal" }, "264": { + "name": "Linoone", + "pokedex_id": 264, "forms": { "947": { "form": "Normal", + "form_id": 947, "proto": "LINOONE_NORMAL" }, "948": { "form": "Galarian", + "form_id": 948, "proto": "LINOONE_GALARIAN", "quick_moves": [ "Snarl", @@ -15275,15 +16195,15 @@ }, "1375": { "form": "Shadow", + "form_id": 1375, "proto": "LINOONE_SHADOW" }, "1376": { "form": "Purified", + "form_id": 1376, "proto": "LINOONE_PURIFIED" } }, - "pokedex_id": 264, - "name": "Linoone", "default_form_id": "947", "types": [ "Normal" @@ -15317,26 +16237,30 @@ "default_form": "Normal" }, "265": { + "name": "Wurmple", + "pokedex_id": 265, "forms": { "600": { "form": "Normal", + "form_id": 600, "proto": "WURMPLE_NORMAL" }, "1377": { "form": "Shadow", + "form_id": 1377, "proto": "WURMPLE_SHADOW" }, "1378": { "form": "Purified", + "form_id": 1378, "proto": "WURMPLE_PURIFIED" }, "2327": { "form": "Spring 2020", + "form_id": 2327, "proto": "WURMPLE_SPRING_2020" } }, - "pokedex_id": 265, - "name": "Wurmple", "default_form_id": "600", "types": [ "Bug" @@ -15360,12 +16284,12 @@ "evolutions": [ { "evolution": "Silcoon", - "evolution_id": "266", + "evolution_id": 266, "candy_cost": 12 }, { "evolution": "Cascoon", - "evolution_id": "268", + "evolution_id": 268, "candy_cost": 12 } ], @@ -15379,22 +16303,25 @@ "default_form": "Normal" }, "266": { + "name": "Silcoon", + "pokedex_id": 266, "forms": { "1379": { "form": "Normal", + "form_id": 1379, "proto": "SILCOON_NORMAL" }, "1380": { "form": "Shadow", + "form_id": 1380, "proto": "SILCOON_SHADOW" }, "1381": { "form": "Purified", + "form_id": 1381, "proto": "SILCOON_PURIFIED" } }, - "pokedex_id": 266, - "name": "Silcoon", "default_form_id": "1379", "types": [ "Bug" @@ -15418,7 +16345,7 @@ "evolutions": [ { "evolution": "Beautifly", - "evolution_id": "267", + "evolution_id": 267, "candy_cost": 50 } ], @@ -15432,22 +16359,25 @@ "default_form": "Normal" }, "267": { + "name": "Beautifly", + "pokedex_id": 267, "forms": { "1382": { "form": "Normal", + "form_id": 1382, "proto": "BEAUTIFLY_NORMAL" }, "1383": { "form": "Shadow", + "form_id": 1383, "proto": "BEAUTIFLY_SHADOW" }, "1384": { "form": "Purified", + "form_id": 1384, "proto": "BEAUTIFLY_PURIFIED" } }, - "pokedex_id": 267, - "name": "Beautifly", "default_form_id": "1382", "types": [ "Bug", @@ -15482,22 +16412,25 @@ "default_form": "Normal" }, "268": { + "name": "Cascoon", + "pokedex_id": 268, "forms": { "1385": { "form": "Normal", + "form_id": 1385, "proto": "CASCOON_NORMAL" }, "1386": { "form": "Shadow", + "form_id": 1386, "proto": "CASCOON_SHADOW" }, "1387": { "form": "Purified", + "form_id": 1387, "proto": "CASCOON_PURIFIED" } }, - "pokedex_id": 268, - "name": "Cascoon", "default_form_id": "1385", "types": [ "Bug" @@ -15521,7 +16454,7 @@ "evolutions": [ { "evolution": "Dustox", - "evolution_id": "269", + "evolution_id": 269, "candy_cost": 50 } ], @@ -15535,22 +16468,25 @@ "default_form": "Normal" }, "269": { + "name": "Dustox", + "pokedex_id": 269, "forms": { "1388": { "form": "Normal", + "form_id": 1388, "proto": "DUSTOX_NORMAL" }, "1389": { "form": "Shadow", + "form_id": 1389, "proto": "DUSTOX_SHADOW" }, "1390": { "form": "Purified", + "form_id": 1390, "proto": "DUSTOX_PURIFIED" } }, - "pokedex_id": 269, - "name": "Dustox", "default_form_id": "1388", "types": [ "Bug", @@ -15585,22 +16521,25 @@ "default_form": "Normal" }, "270": { + "name": "Lotad", + "pokedex_id": 270, "forms": { "1391": { "form": "Normal", + "form_id": 1391, "proto": "LOTAD_NORMAL" }, "1392": { "form": "Shadow", + "form_id": 1392, "proto": "LOTAD_SHADOW" }, "1393": { "form": "Purified", + "form_id": 1393, "proto": "LOTAD_PURIFIED" } }, - "pokedex_id": 270, - "name": "Lotad", "default_form_id": "1391", "types": [ "Water", @@ -15626,7 +16565,7 @@ "evolutions": [ { "evolution": "Lombre", - "evolution_id": "271", + "evolution_id": 271, "candy_cost": 25 } ], @@ -15640,22 +16579,25 @@ "default_form": "Normal" }, "271": { + "name": "Lombre", + "pokedex_id": 271, "forms": { "1394": { "form": "Normal", + "form_id": 1394, "proto": "LOMBRE_NORMAL" }, "1395": { "form": "Shadow", + "form_id": 1395, "proto": "LOMBRE_SHADOW" }, "1396": { "form": "Purified", + "form_id": 1396, "proto": "LOMBRE_PURIFIED" } }, - "pokedex_id": 271, - "name": "Lombre", "default_form_id": "1394", "types": [ "Water", @@ -15682,7 +16624,7 @@ "evolutions": [ { "evolution": "Ludicolo", - "evolution_id": "272", + "evolution_id": 272, "candy_cost": 100 } ], @@ -15696,22 +16638,25 @@ "default_form": "Normal" }, "272": { + "name": "Ludicolo", + "pokedex_id": 272, "forms": { "1397": { "form": "Normal", + "form_id": 1397, "proto": "LUDICOLO_NORMAL" }, "1398": { "form": "Shadow", + "form_id": 1398, "proto": "LUDICOLO_SHADOW" }, "1399": { "form": "Purified", + "form_id": 1399, "proto": "LUDICOLO_PURIFIED" } }, - "pokedex_id": 272, - "name": "Ludicolo", "default_form_id": "1397", "types": [ "Water", @@ -15748,22 +16693,25 @@ "default_form": "Normal" }, "273": { + "name": "Seedot", + "pokedex_id": 273, "forms": { "625": { "form": "Normal", + "form_id": 625, "proto": "SEEDOT_NORMAL" }, "626": { "form": "Shadow", + "form_id": 626, "proto": "SEEDOT_SHADOW" }, "627": { "form": "Purified", + "form_id": 627, "proto": "SEEDOT_PURIFIED" } }, - "pokedex_id": 273, - "name": "Seedot", "default_form_id": "625", "types": [ "Grass" @@ -15789,7 +16737,7 @@ "evolutions": [ { "evolution": "Nuzleaf", - "evolution_id": "274", + "evolution_id": 274, "candy_cost": 25 } ], @@ -15803,22 +16751,25 @@ "default_form": "Normal" }, "274": { + "name": "Nuzleaf", + "pokedex_id": 274, "forms": { "628": { "form": "Normal", + "form_id": 628, "proto": "NUZLEAF_NORMAL" }, "629": { "form": "Shadow", + "form_id": 629, "proto": "NUZLEAF_SHADOW" }, "630": { "form": "Purified", + "form_id": 630, "proto": "NUZLEAF_PURIFIED" } }, - "pokedex_id": 274, - "name": "Nuzleaf", "default_form_id": "628", "types": [ "Grass", @@ -15845,7 +16796,7 @@ "evolutions": [ { "evolution": "Shiftry", - "evolution_id": "275", + "evolution_id": 275, "candy_cost": 100 } ], @@ -15859,22 +16810,25 @@ "default_form": "Normal" }, "275": { + "name": "Shiftry", + "pokedex_id": 275, "forms": { "631": { "form": "Normal", + "form_id": 631, "proto": "SHIFTRY_NORMAL" }, "632": { "form": "Shadow", + "form_id": 632, "proto": "SHIFTRY_SHADOW" }, "633": { "form": "Purified", + "form_id": 633, "proto": "SHIFTRY_PURIFIED" } }, - "pokedex_id": 275, - "name": "Shiftry", "default_form_id": "631", "types": [ "Grass", @@ -15911,22 +16865,25 @@ "default_form": "Normal" }, "276": { + "name": "Taillow", + "pokedex_id": 276, "forms": { "1400": { "form": "Normal", + "form_id": 1400, "proto": "TAILLOW_NORMAL" }, "1401": { "form": "Shadow", + "form_id": 1401, "proto": "TAILLOW_SHADOW" }, "1402": { "form": "Purified", + "form_id": 1402, "proto": "TAILLOW_PURIFIED" } }, - "pokedex_id": 276, - "name": "Taillow", "default_form_id": "1400", "types": [ "Normal", @@ -15951,7 +16908,7 @@ "evolutions": [ { "evolution": "Swellow", - "evolution_id": "277", + "evolution_id": 277, "candy_cost": 50 } ], @@ -15965,22 +16922,25 @@ "default_form": "Normal" }, "277": { + "name": "Swellow", + "pokedex_id": 277, "forms": { "1403": { "form": "Normal", + "form_id": 1403, "proto": "SWELLOW_NORMAL" }, "1404": { "form": "Shadow", + "form_id": 1404, "proto": "SWELLOW_SHADOW" }, "1405": { "form": "Purified", + "form_id": 1405, "proto": "SWELLOW_PURIFIED" } }, - "pokedex_id": 277, - "name": "Swellow", "default_form_id": "1403", "types": [ "Normal", @@ -16015,22 +16975,25 @@ "default_form": "Normal" }, "278": { + "name": "Wingull", + "pokedex_id": 278, "forms": { "1406": { "form": "Normal", + "form_id": 1406, "proto": "WINGULL_NORMAL" }, "1407": { "form": "Shadow", + "form_id": 1407, "proto": "WINGULL_SHADOW" }, "1408": { "form": "Purified", + "form_id": 1408, "proto": "WINGULL_PURIFIED" } }, - "pokedex_id": 278, - "name": "Wingull", "default_form_id": "1406", "types": [ "Water", @@ -16057,7 +17020,7 @@ "evolutions": [ { "evolution": "Pelipper", - "evolution_id": "279", + "evolution_id": 279, "candy_cost": 50 } ], @@ -16071,22 +17034,25 @@ "default_form": "Normal" }, "279": { + "name": "Pelipper", + "pokedex_id": 279, "forms": { "1409": { "form": "Normal", + "form_id": 1409, "proto": "PELIPPER_NORMAL" }, "1410": { "form": "Shadow", + "form_id": 1410, "proto": "PELIPPER_SHADOW" }, "1411": { "form": "Purified", + "form_id": 1411, "proto": "PELIPPER_PURIFIED" } }, - "pokedex_id": 279, - "name": "Pelipper", "default_form_id": "1409", "types": [ "Water", @@ -16121,22 +17087,25 @@ "default_form": "Normal" }, "280": { + "name": "Ralts", + "pokedex_id": 280, "forms": { "292": { "form": "Normal", + "form_id": 292, "proto": "RALTS_NORMAL" }, "293": { "form": "Shadow", + "form_id": 293, "proto": "RALTS_SHADOW" }, "294": { "form": "Purified", + "form_id": 294, "proto": "RALTS_PURIFIED" } }, - "pokedex_id": 280, - "name": "Ralts", "default_form_id": "292", "types": [ "Psychic", @@ -16163,7 +17132,7 @@ "evolutions": [ { "evolution": "Kirlia", - "evolution_id": "281", + "evolution_id": 281, "candy_cost": 25 } ], @@ -16177,22 +17146,25 @@ "default_form": "Normal" }, "281": { + "name": "Kirlia", + "pokedex_id": 281, "forms": { "295": { "form": "Normal", + "form_id": 295, "proto": "KIRLIA_NORMAL" }, "296": { "form": "Shadow", + "form_id": 296, "proto": "KIRLIA_SHADOW" }, "297": { "form": "Purified", + "form_id": 297, "proto": "KIRLIA_PURIFIED" } }, - "pokedex_id": 281, - "name": "Kirlia", "default_form_id": "295", "types": [ "Psychic", @@ -16219,14 +17191,14 @@ "evolutions": [ { "evolution": "Gallade", - "evolution_id": "475", + "evolution_id": 475, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone", "gender_requirement": "male" }, { "evolution": "Gardevoir", - "evolution_id": "282", + "evolution_id": 282, "candy_cost": 100 } ], @@ -16240,22 +17212,25 @@ "default_form": "Normal" }, "282": { + "name": "Gardevoir", + "pokedex_id": 282, "forms": { "298": { "form": "Normal", + "form_id": 298, "proto": "GARDEVOIR_NORMAL" }, "299": { "form": "Shadow", + "form_id": 299, "proto": "GARDEVOIR_SHADOW" }, "300": { "form": "Purified", + "form_id": 300, "proto": "GARDEVOIR_PURIFIED" } }, - "pokedex_id": 282, - "name": "Gardevoir", "default_form_id": "298", "types": [ "Psychic", @@ -16291,22 +17266,25 @@ "default_form": "Normal" }, "283": { + "name": "Surskit", + "pokedex_id": 283, "forms": { "1412": { "form": "Normal", + "form_id": 1412, "proto": "SURSKIT_NORMAL" }, "1413": { "form": "Shadow", + "form_id": 1413, "proto": "SURSKIT_SHADOW" }, "1414": { "form": "Purified", + "form_id": 1414, "proto": "SURSKIT_PURIFIED" } }, - "pokedex_id": 283, - "name": "Surskit", "default_form_id": "1412", "types": [ "Bug", @@ -16333,7 +17311,7 @@ "evolutions": [ { "evolution": "Masquerain", - "evolution_id": "284", + "evolution_id": 284, "candy_cost": 50 } ], @@ -16347,22 +17325,25 @@ "default_form": "Normal" }, "284": { + "name": "Masquerain", + "pokedex_id": 284, "forms": { "1415": { "form": "Normal", + "form_id": 1415, "proto": "MASQUERAIN_NORMAL" }, "1416": { "form": "Shadow", + "form_id": 1416, "proto": "MASQUERAIN_SHADOW" }, "1417": { "form": "Purified", + "form_id": 1417, "proto": "MASQUERAIN_PURIFIED" } }, - "pokedex_id": 284, - "name": "Masquerain", "default_form_id": "1415", "types": [ "Bug", @@ -16398,22 +17379,25 @@ "default_form": "Normal" }, "285": { + "name": "Shroomish", + "pokedex_id": 285, "forms": { "1418": { "form": "Normal", + "form_id": 1418, "proto": "SHROOMISH_NORMAL" }, "1419": { "form": "Shadow", + "form_id": 1419, "proto": "SHROOMISH_SHADOW" }, "1420": { "form": "Purified", + "form_id": 1420, "proto": "SHROOMISH_PURIFIED" } }, - "pokedex_id": 285, - "name": "Shroomish", "default_form_id": "1418", "types": [ "Grass" @@ -16439,7 +17423,7 @@ "evolutions": [ { "evolution": "Breloom", - "evolution_id": "286", + "evolution_id": 286, "candy_cost": 50 } ], @@ -16453,22 +17437,25 @@ "default_form": "Normal" }, "286": { + "name": "Breloom", + "pokedex_id": 286, "forms": { "1421": { "form": "Normal", + "form_id": 1421, "proto": "BRELOOM_NORMAL" }, "1422": { "form": "Shadow", + "form_id": 1422, "proto": "BRELOOM_SHADOW" }, "1423": { "form": "Purified", + "form_id": 1423, "proto": "BRELOOM_PURIFIED" } }, - "pokedex_id": 286, - "name": "Breloom", "default_form_id": "1421", "types": [ "Grass", @@ -16503,22 +17490,25 @@ "default_form": "Normal" }, "287": { + "name": "Slakoth", + "pokedex_id": 287, "forms": { "1424": { "form": "Normal", + "form_id": 1424, "proto": "SLAKOTH_NORMAL" }, "1425": { "form": "Shadow", + "form_id": 1425, "proto": "SLAKOTH_SHADOW" }, "1426": { "form": "Purified", + "form_id": 1426, "proto": "SLAKOTH_PURIFIED" } }, - "pokedex_id": 287, - "name": "Slakoth", "default_form_id": "1424", "types": [ "Normal" @@ -16543,7 +17533,7 @@ "evolutions": [ { "evolution": "Vigoroth", - "evolution_id": "288", + "evolution_id": 288, "candy_cost": 25 } ], @@ -16557,22 +17547,25 @@ "default_form": "Normal" }, "288": { + "name": "Vigoroth", + "pokedex_id": 288, "forms": { "1427": { "form": "Normal", + "form_id": 1427, "proto": "VIGOROTH_NORMAL" }, "1428": { "form": "Shadow", + "form_id": 1428, "proto": "VIGOROTH_SHADOW" }, "1429": { "form": "Purified", + "form_id": 1429, "proto": "VIGOROTH_PURIFIED" } }, - "pokedex_id": 288, - "name": "Vigoroth", "default_form_id": "1427", "types": [ "Normal" @@ -16598,7 +17591,7 @@ "evolutions": [ { "evolution": "Slaking", - "evolution_id": "289", + "evolution_id": 289, "candy_cost": 100 } ], @@ -16612,22 +17605,25 @@ "default_form": "Normal" }, "289": { + "name": "Slaking", + "pokedex_id": 289, "forms": { "1430": { "form": "Normal", + "form_id": 1430, "proto": "SLAKING_NORMAL" }, "1431": { "form": "Shadow", + "form_id": 1431, "proto": "SLAKING_SHADOW" }, "1432": { "form": "Purified", + "form_id": 1432, "proto": "SLAKING_PURIFIED" } }, - "pokedex_id": 289, - "name": "Slaking", "default_form_id": "1430", "types": [ "Normal" @@ -16660,22 +17656,25 @@ "default_form": "Normal" }, "290": { + "name": "Nincada", + "pokedex_id": 290, "forms": { "1433": { "form": "Normal", + "form_id": 1433, "proto": "NINCADA_NORMAL" }, "1434": { "form": "Shadow", + "form_id": 1434, "proto": "NINCADA_SHADOW" }, "1435": { "form": "Purified", + "form_id": 1435, "proto": "NINCADA_PURIFIED" } }, - "pokedex_id": 290, - "name": "Nincada", "default_form_id": "1433", "types": [ "Bug", @@ -16702,7 +17701,7 @@ "evolutions": [ { "evolution": "Ninjask", - "evolution_id": "291", + "evolution_id": 291, "candy_cost": 50 } ], @@ -16716,22 +17715,25 @@ "default_form": "Normal" }, "291": { + "name": "Ninjask", + "pokedex_id": 291, "forms": { "1436": { "form": "Normal", + "form_id": 1436, "proto": "NINJASK_NORMAL" }, "1437": { "form": "Shadow", + "form_id": 1437, "proto": "NINJASK_SHADOW" }, "1438": { "form": "Purified", + "form_id": 1438, "proto": "NINJASK_PURIFIED" } }, - "pokedex_id": 291, - "name": "Ninjask", "default_form_id": "1436", "types": [ "Bug", @@ -16766,22 +17768,25 @@ "default_form": "Normal" }, "292": { + "name": "Shedinja", + "pokedex_id": 292, "forms": { "1439": { "form": "Normal", + "form_id": 1439, "proto": "SHEDINJA_NORMAL" }, "1440": { "form": "Shadow", + "form_id": 1440, "proto": "SHEDINJA_SHADOW" }, "1441": { "form": "Purified", + "form_id": 1441, "proto": "SHEDINJA_PURIFIED" } }, - "pokedex_id": 292, - "name": "Shedinja", "default_form_id": "1439", "types": [ "Bug", @@ -16816,22 +17821,25 @@ "default_form": "Normal" }, "293": { + "name": "Whismur", + "pokedex_id": 293, "forms": { "1442": { "form": "Normal", + "form_id": 1442, "proto": "WHISMUR_NORMAL" }, "1443": { "form": "Shadow", + "form_id": 1443, "proto": "WHISMUR_SHADOW" }, "1444": { "form": "Purified", + "form_id": 1444, "proto": "WHISMUR_PURIFIED" } }, - "pokedex_id": 293, - "name": "Whismur", "default_form_id": "1442", "types": [ "Normal" @@ -16857,7 +17865,7 @@ "evolutions": [ { "evolution": "Loudred", - "evolution_id": "294", + "evolution_id": 294, "candy_cost": 12 } ], @@ -16871,22 +17879,25 @@ "default_form": "Normal" }, "294": { + "name": "Loudred", + "pokedex_id": 294, "forms": { "1445": { "form": "Normal", + "form_id": 1445, "proto": "LOUDRED_NORMAL" }, "1446": { "form": "Shadow", + "form_id": 1446, "proto": "LOUDRED_SHADOW" }, "1447": { "form": "Purified", + "form_id": 1447, "proto": "LOUDRED_PURIFIED" } }, - "pokedex_id": 294, - "name": "Loudred", "default_form_id": "1445", "types": [ "Normal" @@ -16912,7 +17923,7 @@ "evolutions": [ { "evolution": "Exploud", - "evolution_id": "295", + "evolution_id": 295, "candy_cost": 50 } ], @@ -16926,22 +17937,25 @@ "default_form": "Normal" }, "295": { + "name": "Exploud", + "pokedex_id": 295, "forms": { "1448": { "form": "Normal", + "form_id": 1448, "proto": "EXPLOUD_NORMAL" }, "1449": { "form": "Shadow", + "form_id": 1449, "proto": "EXPLOUD_SHADOW" }, "1450": { "form": "Purified", + "form_id": 1450, "proto": "EXPLOUD_PURIFIED" } }, - "pokedex_id": 295, - "name": "Exploud", "default_form_id": "1448", "types": [ "Normal" @@ -16975,22 +17989,25 @@ "default_form": "Normal" }, "296": { + "name": "Makuhita", + "pokedex_id": 296, "forms": { "1451": { "form": "Normal", + "form_id": 1451, "proto": "MAKUHITA_NORMAL" }, "1452": { "form": "Shadow", + "form_id": 1452, "proto": "MAKUHITA_SHADOW" }, "1453": { "form": "Purified", + "form_id": 1453, "proto": "MAKUHITA_PURIFIED" } }, - "pokedex_id": 296, - "name": "Makuhita", "default_form_id": "1451", "types": [ "Fighting" @@ -17016,7 +18033,7 @@ "evolutions": [ { "evolution": "Hariyama", - "evolution_id": "297", + "evolution_id": 297, "candy_cost": 50 } ], @@ -17030,22 +18047,25 @@ "default_form": "Normal" }, "297": { + "name": "Hariyama", + "pokedex_id": 297, "forms": { "1454": { "form": "Normal", + "form_id": 1454, "proto": "HARIYAMA_NORMAL" }, "1455": { "form": "Shadow", + "form_id": 1455, "proto": "HARIYAMA_SHADOW" }, "1456": { "form": "Purified", + "form_id": 1456, "proto": "HARIYAMA_PURIFIED" } }, - "pokedex_id": 297, - "name": "Hariyama", "default_form_id": "1454", "types": [ "Fighting" @@ -17080,22 +18100,25 @@ "default_form": "Normal" }, "298": { + "name": "Azurill", + "pokedex_id": 298, "forms": { "1457": { "form": "Normal", + "form_id": 1457, "proto": "AZURILL_NORMAL" }, "1458": { "form": "Shadow", + "form_id": 1458, "proto": "AZURILL_SHADOW" }, "1459": { "form": "Purified", + "form_id": 1459, "proto": "AZURILL_PURIFIED" } }, - "pokedex_id": 298, - "name": "Azurill", "default_form_id": "1457", "types": [ "Normal", @@ -17122,7 +18145,7 @@ "evolutions": [ { "evolution": "Marill", - "evolution_id": "183", + "evolution_id": 183, "candy_cost": 25 } ], @@ -17136,22 +18159,25 @@ "default_form": "Normal" }, "299": { + "name": "Nosepass", + "pokedex_id": 299, "forms": { "1460": { "form": "Normal", + "form_id": 1460, "proto": "NOSEPASS_NORMAL" }, "1461": { "form": "Shadow", + "form_id": 1461, "proto": "NOSEPASS_SHADOW" }, "1462": { "form": "Purified", + "form_id": 1462, "proto": "NOSEPASS_PURIFIED" } }, - "pokedex_id": 299, - "name": "Nosepass", "default_form_id": "1460", "types": [ "Rock" @@ -17177,7 +18203,7 @@ "evolutions": [ { "evolution": "Probopass", - "evolution_id": "476", + "evolution_id": 476, "candy_cost": 50 } ], @@ -17191,22 +18217,25 @@ "default_form": "Normal" }, "300": { + "name": "Skitty", + "pokedex_id": 300, "forms": { "1463": { "form": "Normal", + "form_id": 1463, "proto": "SKITTY_NORMAL" }, "1464": { "form": "Shadow", + "form_id": 1464, "proto": "SKITTY_SHADOW" }, "1465": { "form": "Purified", + "form_id": 1465, "proto": "SKITTY_PURIFIED" } }, - "pokedex_id": 300, - "name": "Skitty", "default_form_id": "1463", "types": [ "Normal" @@ -17232,7 +18261,7 @@ "evolutions": [ { "evolution": "Delcatty", - "evolution_id": "301", + "evolution_id": 301, "candy_cost": 50 } ], @@ -17246,22 +18275,25 @@ "default_form": "Normal" }, "301": { + "name": "Delcatty", + "pokedex_id": 301, "forms": { "1466": { "form": "Normal", + "form_id": 1466, "proto": "DELCATTY_NORMAL" }, "1467": { "form": "Shadow", + "form_id": 1467, "proto": "DELCATTY_SHADOW" }, "1468": { "form": "Purified", + "form_id": 1468, "proto": "DELCATTY_PURIFIED" } }, - "pokedex_id": 301, - "name": "Delcatty", "default_form_id": "1466", "types": [ "Normal" @@ -17296,22 +18328,25 @@ "default_form": "Normal" }, "302": { + "name": "Sableye", + "pokedex_id": 302, "forms": { "923": { "form": "Normal", + "form_id": 923, "proto": "SABLEYE_NORMAL" }, "924": { "form": "Shadow", + "form_id": 924, "proto": "SABLEYE_SHADOW" }, "925": { "form": "Purified", + "form_id": 925, "proto": "SABLEYE_PURIFIED" } }, - "pokedex_id": 302, - "name": "Sableye", "default_form_id": "923", "types": [ "Dark", @@ -17346,22 +18381,25 @@ "default_form": "Normal" }, "303": { + "name": "Mawile", + "pokedex_id": 303, "forms": { "833": { "form": "Normal", + "form_id": 833, "proto": "MAWILE_NORMAL" }, "834": { "form": "Shadow", + "form_id": 834, "proto": "MAWILE_SHADOW" }, "835": { "form": "Purified", + "form_id": 835, "proto": "MAWILE_PURIFIED" } }, - "pokedex_id": 303, - "name": "Mawile", "default_form_id": "833", "types": [ "Steel", @@ -17399,22 +18437,25 @@ "default_form": "Normal" }, "304": { + "name": "Aron", + "pokedex_id": 304, "forms": { "1469": { "form": "Normal", + "form_id": 1469, "proto": "ARON_NORMAL" }, "1470": { "form": "Shadow", + "form_id": 1470, "proto": "ARON_SHADOW" }, "1471": { "form": "Purified", + "form_id": 1471, "proto": "ARON_PURIFIED" } }, - "pokedex_id": 304, - "name": "Aron", "default_form_id": "1469", "types": [ "Steel", @@ -17441,7 +18482,7 @@ "evolutions": [ { "evolution": "Lairon", - "evolution_id": "305", + "evolution_id": 305, "candy_cost": 25 } ], @@ -17455,22 +18496,25 @@ "default_form": "Normal" }, "305": { + "name": "Lairon", + "pokedex_id": 305, "forms": { "1472": { "form": "Normal", + "form_id": 1472, "proto": "LAIRON_NORMAL" }, "1473": { "form": "Shadow", + "form_id": 1473, "proto": "LAIRON_SHADOW" }, "1474": { "form": "Purified", + "form_id": 1474, "proto": "LAIRON_PURIFIED" } }, - "pokedex_id": 305, - "name": "Lairon", "default_form_id": "1472", "types": [ "Steel", @@ -17497,7 +18541,7 @@ "evolutions": [ { "evolution": "Aggron", - "evolution_id": "306", + "evolution_id": 306, "candy_cost": 100 } ], @@ -17511,22 +18555,25 @@ "default_form": "Normal" }, "306": { + "name": "Aggron", + "pokedex_id": 306, "forms": { "1475": { "form": "Normal", + "form_id": 1475, "proto": "AGGRON_NORMAL" }, "1476": { "form": "Shadow", + "form_id": 1476, "proto": "AGGRON_SHADOW" }, "1477": { "form": "Purified", + "form_id": 1477, "proto": "AGGRON_PURIFIED" } }, - "pokedex_id": 306, - "name": "Aggron", "default_form_id": "1475", "types": [ "Steel", @@ -17562,22 +18609,25 @@ "default_form": "Normal" }, "307": { + "name": "Meditite", + "pokedex_id": 307, "forms": { "1478": { "form": "Normal", + "form_id": 1478, "proto": "MEDITITE_NORMAL" }, "1479": { "form": "Shadow", + "form_id": 1479, "proto": "MEDITITE_SHADOW" }, "1480": { "form": "Purified", + "form_id": 1480, "proto": "MEDITITE_PURIFIED" } }, - "pokedex_id": 307, - "name": "Meditite", "default_form_id": "1478", "types": [ "Fighting", @@ -17604,7 +18654,7 @@ "evolutions": [ { "evolution": "Medicham", - "evolution_id": "308", + "evolution_id": 308, "candy_cost": 50 } ], @@ -17618,22 +18668,25 @@ "default_form": "Normal" }, "308": { + "name": "Medicham", + "pokedex_id": 308, "forms": { "1481": { "form": "Normal", + "form_id": 1481, "proto": "MEDICHAM_NORMAL" }, "1482": { "form": "Shadow", + "form_id": 1482, "proto": "MEDICHAM_SHADOW" }, "1483": { "form": "Purified", + "form_id": 1483, "proto": "MEDICHAM_PURIFIED" } }, - "pokedex_id": 308, - "name": "Medicham", "default_form_id": "1481", "types": [ "Fighting", @@ -17669,22 +18722,25 @@ "default_form": "Normal" }, "309": { + "name": "Electrike", + "pokedex_id": 309, "forms": { "1484": { "form": "Normal", + "form_id": 1484, "proto": "ELECTRIKE_NORMAL" }, "1485": { "form": "Shadow", + "form_id": 1485, "proto": "ELECTRIKE_SHADOW" }, "1486": { "form": "Purified", + "form_id": 1486, "proto": "ELECTRIKE_PURIFIED" } }, - "pokedex_id": 309, - "name": "Electrike", "default_form_id": "1484", "types": [ "Electric" @@ -17710,7 +18766,7 @@ "evolutions": [ { "evolution": "Manectric", - "evolution_id": "310", + "evolution_id": 310, "candy_cost": 50 } ], @@ -17724,22 +18780,25 @@ "default_form": "Normal" }, "310": { + "name": "Manectric", + "pokedex_id": 310, "forms": { "1487": { "form": "Normal", + "form_id": 1487, "proto": "MANECTRIC_NORMAL" }, "1488": { "form": "Shadow", + "form_id": 1488, "proto": "MANECTRIC_SHADOW" }, "1489": { "form": "Purified", + "form_id": 1489, "proto": "MANECTRIC_PURIFIED" } }, - "pokedex_id": 310, - "name": "Manectric", "default_form_id": "1487", "types": [ "Electric" @@ -17773,22 +18832,25 @@ "default_form": "Normal" }, "311": { + "name": "Plusle", + "pokedex_id": 311, "forms": { "1490": { "form": "Normal", + "form_id": 1490, "proto": "PLUSLE_NORMAL" }, "1491": { "form": "Shadow", + "form_id": 1491, "proto": "PLUSLE_SHADOW" }, "1492": { "form": "Purified", + "form_id": 1492, "proto": "PLUSLE_PURIFIED" } }, - "pokedex_id": 311, - "name": "Plusle", "default_form_id": "1490", "types": [ "Electric" @@ -17823,22 +18885,25 @@ "default_form": "Normal" }, "312": { + "name": "Minun", + "pokedex_id": 312, "forms": { "1493": { "form": "Normal", + "form_id": 1493, "proto": "MINUN_NORMAL" }, "1494": { "form": "Shadow", + "form_id": 1494, "proto": "MINUN_SHADOW" }, "1495": { "form": "Purified", + "form_id": 1495, "proto": "MINUN_PURIFIED" } }, - "pokedex_id": 312, - "name": "Minun", "default_form_id": "1493", "types": [ "Electric" @@ -17873,22 +18938,25 @@ "default_form": "Normal" }, "313": { + "name": "Volbeat", + "pokedex_id": 313, "forms": { "1496": { "form": "Normal", + "form_id": 1496, "proto": "VOLBEAT_NORMAL" }, "1497": { "form": "Shadow", + "form_id": 1497, "proto": "VOLBEAT_SHADOW" }, "1498": { "form": "Purified", + "form_id": 1498, "proto": "VOLBEAT_PURIFIED" } }, - "pokedex_id": 313, - "name": "Volbeat", "default_form_id": "1496", "types": [ "Bug" @@ -17922,22 +18990,25 @@ "default_form": "Normal" }, "314": { + "name": "Illumise", + "pokedex_id": 314, "forms": { "1499": { "form": "Normal", + "form_id": 1499, "proto": "ILLUMISE_NORMAL" }, "1500": { "form": "Shadow", + "form_id": 1500, "proto": "ILLUMISE_SHADOW" }, "1501": { "form": "Purified", + "form_id": 1501, "proto": "ILLUMISE_PURIFIED" } }, - "pokedex_id": 314, - "name": "Illumise", "default_form_id": "1499", "types": [ "Bug" @@ -17971,22 +19042,25 @@ "default_form": "Normal" }, "315": { + "name": "Roselia", + "pokedex_id": 315, "forms": { "1502": { "form": "Normal", + "form_id": 1502, "proto": "ROSELIA_NORMAL" }, "1503": { "form": "Shadow", + "form_id": 1503, "proto": "ROSELIA_SHADOW" }, "1504": { "form": "Purified", + "form_id": 1504, "proto": "ROSELIA_PURIFIED" } }, - "pokedex_id": 315, - "name": "Roselia", "default_form_id": "1502", "types": [ "Grass", @@ -18013,7 +19087,7 @@ "evolutions": [ { "evolution": "Roserade", - "evolution_id": "407", + "evolution_id": 407, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -18028,22 +19102,25 @@ "default_form": "Normal" }, "316": { + "name": "Gulpin", + "pokedex_id": 316, "forms": { "1505": { "form": "Normal", + "form_id": 1505, "proto": "GULPIN_NORMAL" }, "1506": { "form": "Shadow", + "form_id": 1506, "proto": "GULPIN_SHADOW" }, "1507": { "form": "Purified", + "form_id": 1507, "proto": "GULPIN_PURIFIED" } }, - "pokedex_id": 316, - "name": "Gulpin", "default_form_id": "1505", "types": [ "Poison" @@ -18069,7 +19146,7 @@ "evolutions": [ { "evolution": "Swalot", - "evolution_id": "317", + "evolution_id": 317, "candy_cost": 50 } ], @@ -18083,22 +19160,25 @@ "default_form": "Normal" }, "317": { + "name": "Swalot", + "pokedex_id": 317, "forms": { "1508": { "form": "Normal", + "form_id": 1508, "proto": "SWALOT_NORMAL" }, "1509": { "form": "Shadow", + "form_id": 1509, "proto": "SWALOT_SHADOW" }, "1510": { "form": "Purified", + "form_id": 1510, "proto": "SWALOT_PURIFIED" } }, - "pokedex_id": 317, - "name": "Swalot", "default_form_id": "1508", "types": [ "Poison" @@ -18133,22 +19213,25 @@ "default_form": "Normal" }, "318": { + "name": "Carvanha", + "pokedex_id": 318, "forms": { "734": { "form": "Normal", + "form_id": 734, "proto": "CARVANHA_NORMAL" }, "735": { "form": "Shadow", + "form_id": 735, "proto": "CARVANHA_SHADOW" }, "736": { "form": "Purified", + "form_id": 736, "proto": "CARVANHA_PURIFIED" } }, - "pokedex_id": 318, - "name": "Carvanha", "default_form_id": "734", "types": [ "Water", @@ -18175,7 +19258,7 @@ "evolutions": [ { "evolution": "Sharpedo", - "evolution_id": "319", + "evolution_id": 319, "candy_cost": 50 } ], @@ -18189,22 +19272,25 @@ "default_form": "Normal" }, "319": { + "name": "Sharpedo", + "pokedex_id": 319, "forms": { "737": { "form": "Normal", + "form_id": 737, "proto": "SHARPEDO_NORMAL" }, "738": { "form": "Shadow", + "form_id": 738, "proto": "SHARPEDO_SHADOW" }, "739": { "form": "Purified", + "form_id": 739, "proto": "SHARPEDO_PURIFIED" } }, - "pokedex_id": 319, - "name": "Sharpedo", "default_form_id": "737", "types": [ "Water", @@ -18239,22 +19325,25 @@ "default_form": "Normal" }, "320": { + "name": "Wailmer", + "pokedex_id": 320, "forms": { "1511": { "form": "Normal", + "form_id": 1511, "proto": "WAILMER_NORMAL" }, "1512": { "form": "Shadow", + "form_id": 1512, "proto": "WAILMER_SHADOW" }, "1513": { "form": "Purified", + "form_id": 1513, "proto": "WAILMER_PURIFIED" } }, - "pokedex_id": 320, - "name": "Wailmer", "default_form_id": "1511", "types": [ "Water" @@ -18280,7 +19369,7 @@ "evolutions": [ { "evolution": "Wailord", - "evolution_id": "321", + "evolution_id": 321, "candy_cost": 400 } ], @@ -18294,22 +19383,25 @@ "default_form": "Normal" }, "321": { + "name": "Wailord", + "pokedex_id": 321, "forms": { "1514": { "form": "Normal", + "form_id": 1514, "proto": "WAILORD_NORMAL" }, "1515": { "form": "Shadow", + "form_id": 1515, "proto": "WAILORD_SHADOW" }, "1516": { "form": "Purified", + "form_id": 1516, "proto": "WAILORD_PURIFIED" } }, - "pokedex_id": 321, - "name": "Wailord", "default_form_id": "1514", "types": [ "Water" @@ -18343,22 +19435,25 @@ "default_form": "Normal" }, "322": { + "name": "Numel", + "pokedex_id": 322, "forms": { "1517": { "form": "Normal", + "form_id": 1517, "proto": "NUMEL_NORMAL" }, "1518": { "form": "Shadow", + "form_id": 1518, "proto": "NUMEL_SHADOW" }, "1519": { "form": "Purified", + "form_id": 1519, "proto": "NUMEL_PURIFIED" } }, - "pokedex_id": 322, - "name": "Numel", "default_form_id": "1517", "types": [ "Fire", @@ -18385,7 +19480,7 @@ "evolutions": [ { "evolution": "Camerupt", - "evolution_id": "323", + "evolution_id": 323, "candy_cost": 50 } ], @@ -18399,22 +19494,25 @@ "default_form": "Normal" }, "323": { + "name": "Camerupt", + "pokedex_id": 323, "forms": { "1520": { "form": "Normal", + "form_id": 1520, "proto": "CAMERUPT_NORMAL" }, "1521": { "form": "Shadow", + "form_id": 1521, "proto": "CAMERUPT_SHADOW" }, "1522": { "form": "Purified", + "form_id": 1522, "proto": "CAMERUPT_PURIFIED" } }, - "pokedex_id": 323, - "name": "Camerupt", "default_form_id": "1520", "types": [ "Fire", @@ -18450,22 +19548,25 @@ "default_form": "Normal" }, "324": { + "name": "Torkoal", + "pokedex_id": 324, "forms": { "1523": { "form": "Normal", + "form_id": 1523, "proto": "TORKOAL_NORMAL" }, "1524": { "form": "Shadow", + "form_id": 1524, "proto": "TORKOAL_SHADOW" }, "1525": { "form": "Purified", + "form_id": 1525, "proto": "TORKOAL_PURIFIED" } }, - "pokedex_id": 324, - "name": "Torkoal", "default_form_id": "1523", "types": [ "Fire" @@ -18499,22 +19600,25 @@ "default_form": "Normal" }, "325": { + "name": "Spoink", + "pokedex_id": 325, "forms": { "1526": { "form": "Normal", + "form_id": 1526, "proto": "SPOINK_NORMAL" }, "1527": { "form": "Shadow", + "form_id": 1527, "proto": "SPOINK_SHADOW" }, "1528": { "form": "Purified", + "form_id": 1528, "proto": "SPOINK_PURIFIED" } }, - "pokedex_id": 325, - "name": "Spoink", "default_form_id": "1526", "types": [ "Psychic" @@ -18540,7 +19644,7 @@ "evolutions": [ { "evolution": "Grumpig", - "evolution_id": "326", + "evolution_id": 326, "candy_cost": 50 } ], @@ -18554,22 +19658,25 @@ "default_form": "Normal" }, "326": { + "name": "Grumpig", + "pokedex_id": 326, "forms": { "1529": { "form": "Normal", + "form_id": 1529, "proto": "GRUMPIG_NORMAL" }, "1530": { "form": "Shadow", + "form_id": 1530, "proto": "GRUMPIG_SHADOW" }, "1531": { "form": "Purified", + "form_id": 1531, "proto": "GRUMPIG_PURIFIED" } }, - "pokedex_id": 326, - "name": "Grumpig", "default_form_id": "1529", "types": [ "Psychic" @@ -18603,90 +19710,110 @@ "default_form": "Normal" }, "327": { + "name": "Spinda", + "pokedex_id": 327, "forms": { "37": { "form": "00", + "form_id": 37, "proto": "SPINDA_00" }, "38": { "form": "01", + "form_id": 38, "proto": "SPINDA_01" }, "39": { "form": "02", + "form_id": 39, "proto": "SPINDA_02" }, "40": { "form": "03", + "form_id": 40, "proto": "SPINDA_03" }, "41": { "form": "04", + "form_id": 41, "proto": "SPINDA_04" }, "42": { "form": "05", + "form_id": 42, "proto": "SPINDA_05" }, "43": { "form": "06", + "form_id": 43, "proto": "SPINDA_06" }, "44": { "form": "07", + "form_id": 44, "proto": "SPINDA_07" }, "121": { "form": "08", + "form_id": 121, "proto": "SPINDA_08" }, "122": { "form": "09", + "form_id": 122, "proto": "SPINDA_09" }, "123": { "form": "10", + "form_id": 123, "proto": "SPINDA_10" }, "124": { "form": "11", + "form_id": 124, "proto": "SPINDA_11" }, "125": { "form": "12", + "form_id": 125, "proto": "SPINDA_12" }, "126": { "form": "13", + "form_id": 126, "proto": "SPINDA_13" }, "127": { "form": "14", + "form_id": 127, "proto": "SPINDA_14" }, "128": { "form": "15", + "form_id": 128, "proto": "SPINDA_15" }, "129": { "form": "16", + "form_id": 129, "proto": "SPINDA_16" }, "130": { "form": "17", + "form_id": 130, "proto": "SPINDA_17" }, "131": { "form": "18", + "form_id": 131, "proto": "SPINDA_18" }, "132": { "form": "19", + "form_id": 132, "proto": "SPINDA_19" } }, - "pokedex_id": 327, - "name": "Spinda", "default_form_id": "37", "types": [ "Normal" @@ -18720,22 +19847,25 @@ "default_form": "00" }, "328": { + "name": "Trapinch", + "pokedex_id": 328, "forms": { "746": { "form": "Normal", + "form_id": 746, "proto": "TRAPINCH_NORMAL" }, "747": { "form": "Shadow", + "form_id": 747, "proto": "TRAPINCH_SHADOW" }, "748": { "form": "Purified", + "form_id": 748, "proto": "TRAPINCH_PURIFIED" } }, - "pokedex_id": 328, - "name": "Trapinch", "default_form_id": "746", "types": [ "Ground" @@ -18761,7 +19891,7 @@ "evolutions": [ { "evolution": "Vibrava", - "evolution_id": "329", + "evolution_id": 329, "candy_cost": 25 } ], @@ -18775,22 +19905,25 @@ "default_form": "Normal" }, "329": { + "name": "Vibrava", + "pokedex_id": 329, "forms": { "749": { "form": "Normal", + "form_id": 749, "proto": "VIBRAVA_NORMAL" }, "750": { "form": "Shadow", + "form_id": 750, "proto": "VIBRAVA_SHADOW" }, "751": { "form": "Purified", + "form_id": 751, "proto": "VIBRAVA_PURIFIED" } }, - "pokedex_id": 329, - "name": "Vibrava", "default_form_id": "749", "types": [ "Ground", @@ -18817,7 +19950,7 @@ "evolutions": [ { "evolution": "Flygon", - "evolution_id": "330", + "evolution_id": 330, "candy_cost": 100 } ], @@ -18831,22 +19964,25 @@ "default_form": "Normal" }, "330": { + "name": "Flygon", + "pokedex_id": 330, "forms": { "752": { "form": "Normal", + "form_id": 752, "proto": "FLYGON_NORMAL" }, "753": { "form": "Shadow", + "form_id": 753, "proto": "FLYGON_SHADOW" }, "754": { "form": "Purified", + "form_id": 754, "proto": "FLYGON_PURIFIED" } }, - "pokedex_id": 330, - "name": "Flygon", "default_form_id": "752", "types": [ "Ground", @@ -18881,22 +20017,25 @@ "default_form": "Normal" }, "331": { + "name": "Cacnea", + "pokedex_id": 331, "forms": { "610": { "form": "Normal", + "form_id": 610, "proto": "CACNEA_NORMAL" }, "611": { "form": "Shadow", + "form_id": 611, "proto": "CACNEA_SHADOW" }, "612": { "form": "Purified", + "form_id": 612, "proto": "CACNEA_PURIFIED" } }, - "pokedex_id": 331, - "name": "Cacnea", "default_form_id": "610", "types": [ "Grass" @@ -18922,7 +20061,7 @@ "evolutions": [ { "evolution": "Cacturne", - "evolution_id": "332", + "evolution_id": 332, "candy_cost": 50 } ], @@ -18936,22 +20075,25 @@ "default_form": "Normal" }, "332": { + "name": "Cacturne", + "pokedex_id": 332, "forms": { "613": { "form": "Normal", + "form_id": 613, "proto": "CACTURNE_NORMAL" }, "614": { "form": "Shadow", + "form_id": 614, "proto": "CACTURNE_SHADOW" }, "615": { "form": "Purified", + "form_id": 615, "proto": "CACTURNE_PURIFIED" } }, - "pokedex_id": 332, - "name": "Cacturne", "default_form_id": "613", "types": [ "Grass", @@ -18986,22 +20128,25 @@ "default_form": "Normal" }, "333": { + "name": "Swablu", + "pokedex_id": 333, "forms": { "1532": { "form": "Normal", + "form_id": 1532, "proto": "SWABLU_NORMAL" }, "1533": { "form": "Shadow", + "form_id": 1533, "proto": "SWABLU_SHADOW" }, "1534": { "form": "Purified", + "form_id": 1534, "proto": "SWABLU_PURIFIED" } }, - "pokedex_id": 333, - "name": "Swablu", "default_form_id": "1532", "types": [ "Normal", @@ -19028,7 +20173,7 @@ "evolutions": [ { "evolution": "Altaria", - "evolution_id": "334", + "evolution_id": 334, "candy_cost": 400 } ], @@ -19042,22 +20187,25 @@ "default_form": "Normal" }, "334": { + "name": "Altaria", + "pokedex_id": 334, "forms": { "1535": { "form": "Normal", + "form_id": 1535, "proto": "ALTARIA_NORMAL" }, "1536": { "form": "Shadow", + "form_id": 1536, "proto": "ALTARIA_SHADOW" }, "1537": { "form": "Purified", + "form_id": 1537, "proto": "ALTARIA_PURIFIED" } }, - "pokedex_id": 334, - "name": "Altaria", "default_form_id": "1535", "types": [ "Dragon", @@ -19092,22 +20240,25 @@ "default_form": "Normal" }, "335": { + "name": "Zangoose", + "pokedex_id": 335, "forms": { "1538": { "form": "Normal", + "form_id": 1538, "proto": "ZANGOOSE_NORMAL" }, "1539": { "form": "Shadow", + "form_id": 1539, "proto": "ZANGOOSE_SHADOW" }, "1540": { "form": "Purified", + "form_id": 1540, "proto": "ZANGOOSE_PURIFIED" } }, - "pokedex_id": 335, - "name": "Zangoose", "default_form_id": "1538", "types": [ "Normal" @@ -19141,22 +20292,25 @@ "default_form": "Normal" }, "336": { + "name": "Seviper", + "pokedex_id": 336, "forms": { "1541": { "form": "Normal", + "form_id": 1541, "proto": "SEVIPER_NORMAL" }, "1542": { "form": "Shadow", + "form_id": 1542, "proto": "SEVIPER_SHADOW" }, "1543": { "form": "Purified", + "form_id": 1543, "proto": "SEVIPER_PURIFIED" } }, - "pokedex_id": 336, - "name": "Seviper", "default_form_id": "1541", "types": [ "Poison" @@ -19190,22 +20344,25 @@ "default_form": "Normal" }, "337": { + "name": "Lunatone", + "pokedex_id": 337, "forms": { "1544": { "form": "Normal", + "form_id": 1544, "proto": "LUNATONE_NORMAL" }, "1545": { "form": "Shadow", + "form_id": 1545, "proto": "LUNATONE_SHADOW" }, "1546": { "form": "Purified", + "form_id": 1546, "proto": "LUNATONE_PURIFIED" } }, - "pokedex_id": 337, - "name": "Lunatone", "default_form_id": "1544", "types": [ "Rock", @@ -19240,22 +20397,25 @@ "default_form": "Normal" }, "338": { + "name": "Solrock", + "pokedex_id": 338, "forms": { "1547": { "form": "Normal", + "form_id": 1547, "proto": "SOLROCK_NORMAL" }, "1548": { "form": "Shadow", + "form_id": 1548, "proto": "SOLROCK_SHADOW" }, "1549": { "form": "Purified", + "form_id": 1549, "proto": "SOLROCK_PURIFIED" } }, - "pokedex_id": 338, - "name": "Solrock", "default_form_id": "1547", "types": [ "Rock", @@ -19290,22 +20450,25 @@ "default_form": "Normal" }, "339": { + "name": "Barboach", + "pokedex_id": 339, "forms": { "1550": { "form": "Normal", + "form_id": 1550, "proto": "BARBOACH_NORMAL" }, "1551": { "form": "Shadow", + "form_id": 1551, "proto": "BARBOACH_SHADOW" }, "1552": { "form": "Purified", + "form_id": 1552, "proto": "BARBOACH_PURIFIED" } }, - "pokedex_id": 339, - "name": "Barboach", "default_form_id": "1550", "types": [ "Water", @@ -19332,7 +20495,7 @@ "evolutions": [ { "evolution": "Whiscash", - "evolution_id": "340", + "evolution_id": 340, "candy_cost": 50 } ], @@ -19346,22 +20509,25 @@ "default_form": "Normal" }, "340": { + "name": "Whiscash", + "pokedex_id": 340, "forms": { "1553": { "form": "Normal", + "form_id": 1553, "proto": "WHISCASH_NORMAL" }, "1554": { "form": "Shadow", + "form_id": 1554, "proto": "WHISCASH_SHADOW" }, "1555": { "form": "Purified", + "form_id": 1555, "proto": "WHISCASH_PURIFIED" } }, - "pokedex_id": 340, - "name": "Whiscash", "default_form_id": "1553", "types": [ "Water", @@ -19396,22 +20562,25 @@ "default_form": "Normal" }, "341": { + "name": "Corphish", + "pokedex_id": 341, "forms": { "1556": { "form": "Normal", + "form_id": 1556, "proto": "CORPHISH_NORMAL" }, "1557": { "form": "Shadow", + "form_id": 1557, "proto": "CORPHISH_SHADOW" }, "1558": { "form": "Purified", + "form_id": 1558, "proto": "CORPHISH_PURIFIED" } }, - "pokedex_id": 341, - "name": "Corphish", "default_form_id": "1556", "types": [ "Water" @@ -19437,7 +20606,7 @@ "evolutions": [ { "evolution": "Crawdaunt", - "evolution_id": "342", + "evolution_id": 342, "candy_cost": 50 } ], @@ -19451,22 +20620,25 @@ "default_form": "Normal" }, "342": { + "name": "Crawdaunt", + "pokedex_id": 342, "forms": { "1559": { "form": "Normal", + "form_id": 1559, "proto": "CRAWDAUNT_NORMAL" }, "1560": { "form": "Shadow", + "form_id": 1560, "proto": "CRAWDAUNT_SHADOW" }, "1561": { "form": "Purified", + "form_id": 1561, "proto": "CRAWDAUNT_PURIFIED" } }, - "pokedex_id": 342, - "name": "Crawdaunt", "default_form_id": "1559", "types": [ "Water", @@ -19502,22 +20674,25 @@ "default_form": "Normal" }, "343": { + "name": "Baltoy", + "pokedex_id": 343, "forms": { "1562": { "form": "Normal", + "form_id": 1562, "proto": "BALTOY_NORMAL" }, "1563": { "form": "Shadow", + "form_id": 1563, "proto": "BALTOY_SHADOW" }, "1564": { "form": "Purified", + "form_id": 1564, "proto": "BALTOY_PURIFIED" } }, - "pokedex_id": 343, - "name": "Baltoy", "default_form_id": "1562", "types": [ "Ground", @@ -19544,7 +20719,7 @@ "evolutions": [ { "evolution": "Claydol", - "evolution_id": "344", + "evolution_id": 344, "candy_cost": 50 } ], @@ -19558,22 +20733,25 @@ "default_form": "Normal" }, "344": { + "name": "Claydol", + "pokedex_id": 344, "forms": { "1565": { "form": "Normal", + "form_id": 1565, "proto": "CLAYDOL_NORMAL" }, "1566": { "form": "Shadow", + "form_id": 1566, "proto": "CLAYDOL_SHADOW" }, "1567": { "form": "Purified", + "form_id": 1567, "proto": "CLAYDOL_PURIFIED" } }, - "pokedex_id": 344, - "name": "Claydol", "default_form_id": "1565", "types": [ "Ground", @@ -19610,22 +20788,25 @@ "default_form": "Normal" }, "345": { + "name": "Lileep", + "pokedex_id": 345, "forms": { "1568": { "form": "Normal", + "form_id": 1568, "proto": "LILEEP_NORMAL" }, "1569": { "form": "Shadow", + "form_id": 1569, "proto": "LILEEP_SHADOW" }, "1570": { "form": "Purified", + "form_id": 1570, "proto": "LILEEP_PURIFIED" } }, - "pokedex_id": 345, - "name": "Lileep", "default_form_id": "1568", "types": [ "Rock", @@ -19652,7 +20833,7 @@ "evolutions": [ { "evolution": "Cradily", - "evolution_id": "346", + "evolution_id": 346, "candy_cost": 50 } ], @@ -19666,22 +20847,25 @@ "default_form": "Normal" }, "346": { + "name": "Cradily", + "pokedex_id": 346, "forms": { "1571": { "form": "Normal", + "form_id": 1571, "proto": "CRADILY_NORMAL" }, "1572": { "form": "Shadow", + "form_id": 1572, "proto": "CRADILY_SHADOW" }, "1573": { "form": "Purified", + "form_id": 1573, "proto": "CRADILY_PURIFIED" } }, - "pokedex_id": 346, - "name": "Cradily", "default_form_id": "1571", "types": [ "Rock", @@ -19717,22 +20901,25 @@ "default_form": "Normal" }, "347": { + "name": "Anorith", + "pokedex_id": 347, "forms": { "1574": { "form": "Normal", + "form_id": 1574, "proto": "ANORITH_NORMAL" }, "1575": { "form": "Shadow", + "form_id": 1575, "proto": "ANORITH_SHADOW" }, "1576": { "form": "Purified", + "form_id": 1576, "proto": "ANORITH_PURIFIED" } }, - "pokedex_id": 347, - "name": "Anorith", "default_form_id": "1574", "types": [ "Rock", @@ -19759,7 +20946,7 @@ "evolutions": [ { "evolution": "Armaldo", - "evolution_id": "348", + "evolution_id": 348, "candy_cost": 50 } ], @@ -19773,22 +20960,25 @@ "default_form": "Normal" }, "348": { + "name": "Armaldo", + "pokedex_id": 348, "forms": { "1577": { "form": "Normal", + "form_id": 1577, "proto": "ARMALDO_NORMAL" }, "1578": { "form": "Shadow", + "form_id": 1578, "proto": "ARMALDO_SHADOW" }, "1579": { "form": "Purified", + "form_id": 1579, "proto": "ARMALDO_PURIFIED" } }, - "pokedex_id": 348, - "name": "Armaldo", "default_form_id": "1577", "types": [ "Rock", @@ -19823,22 +21013,25 @@ "default_form": "Normal" }, "349": { + "name": "Feebas", + "pokedex_id": 349, "forms": { "1580": { "form": "Normal", + "form_id": 1580, "proto": "FEEBAS_NORMAL" }, "1581": { "form": "Shadow", + "form_id": 1581, "proto": "FEEBAS_SHADOW" }, "1582": { "form": "Purified", + "form_id": 1582, "proto": "FEEBAS_PURIFIED" } }, - "pokedex_id": 349, - "name": "Feebas", "default_form_id": "1580", "types": [ "Water" @@ -19862,7 +21055,7 @@ "evolutions": [ { "evolution": "Milotic", - "evolution_id": "350", + "evolution_id": 350, "candy_cost": 100 } ], @@ -19876,22 +21069,25 @@ "default_form": "Normal" }, "350": { + "name": "Milotic", + "pokedex_id": 350, "forms": { "1583": { "form": "Normal", + "form_id": 1583, "proto": "MILOTIC_NORMAL" }, "1584": { "form": "Shadow", + "form_id": 1584, "proto": "MILOTIC_SHADOW" }, "1585": { "form": "Purified", + "form_id": 1585, "proto": "MILOTIC_PURIFIED" } }, - "pokedex_id": 350, - "name": "Milotic", "default_form_id": "1583", "types": [ "Water" @@ -19925,9 +21121,12 @@ "default_form": "Normal" }, "351": { + "name": "Castform", + "pokedex_id": 351, "forms": { "29": { "form": "Normal", + "form_id": 29, "proto": "CASTFORM_NORMAL", "charged_moves": [ "Hurricane", @@ -19937,6 +21136,7 @@ }, "30": { "form": "Sunny", + "form_id": 30, "proto": "CASTFORM_SUNNY", "quick_moves": [ "Ember", @@ -19953,6 +21153,7 @@ }, "31": { "form": "Rainy", + "form_id": 31, "proto": "CASTFORM_RAINY", "quick_moves": [ "Water Gun", @@ -19969,6 +21170,7 @@ }, "32": { "form": "Snowy", + "form_id": 32, "proto": "CASTFORM_SNOWY", "quick_moves": [ "Powder Snow", @@ -19984,8 +21186,6 @@ ] } }, - "pokedex_id": 351, - "name": "Castform", "default_form_id": "29", "types": [ "Normal" @@ -20018,22 +21218,25 @@ "default_form": "Normal" }, "352": { + "name": "Kecleon", + "pokedex_id": 352, "forms": { "1586": { "form": "Normal", + "form_id": 1586, "proto": "KECLEON_NORMAL" }, "1587": { "form": "Shadow", + "form_id": 1587, "proto": "KECLEON_SHADOW" }, "1588": { "form": "Purified", + "form_id": 1588, "proto": "KECLEON_PURIFIED" } }, - "pokedex_id": 352, - "name": "Kecleon", "default_form_id": "1586", "types": [ "Normal" @@ -20070,22 +21273,25 @@ "default_form": "Normal" }, "353": { + "name": "Shuppet", + "pokedex_id": 353, "forms": { "908": { "form": "Normal", + "form_id": 908, "proto": "SHUPPET_NORMAL" }, "909": { "form": "Shadow", + "form_id": 909, "proto": "SHUPPET_SHADOW" }, "910": { "form": "Purified", + "form_id": 910, "proto": "SHUPPET_PURIFIED" } }, - "pokedex_id": 353, - "name": "Shuppet", "default_form_id": "908", "types": [ "Ghost" @@ -20111,7 +21317,7 @@ "evolutions": [ { "evolution": "Banette", - "evolution_id": "354", + "evolution_id": 354, "candy_cost": 50 } ], @@ -20125,22 +21331,25 @@ "default_form": "Normal" }, "354": { + "name": "Banette", + "pokedex_id": 354, "forms": { "911": { "form": "Normal", + "form_id": 911, "proto": "BANETTE_NORMAL" }, "912": { "form": "Shadow", + "form_id": 912, "proto": "BANETTE_SHADOW" }, "913": { "form": "Purified", + "form_id": 913, "proto": "BANETTE_PURIFIED" } }, - "pokedex_id": 354, - "name": "Banette", "default_form_id": "911", "types": [ "Ghost" @@ -20174,22 +21383,25 @@ "default_form": "Normal" }, "355": { + "name": "Duskull", + "pokedex_id": 355, "forms": { "914": { "form": "Normal", + "form_id": 914, "proto": "DUSKULL_NORMAL" }, "915": { "form": "Shadow", + "form_id": 915, "proto": "DUSKULL_SHADOW" }, "916": { "form": "Purified", + "form_id": 916, "proto": "DUSKULL_PURIFIED" } }, - "pokedex_id": 355, - "name": "Duskull", "default_form_id": "914", "types": [ "Ghost" @@ -20215,7 +21427,7 @@ "evolutions": [ { "evolution": "Dusclops", - "evolution_id": "356", + "evolution_id": 356, "candy_cost": 25 } ], @@ -20229,22 +21441,25 @@ "default_form": "Normal" }, "356": { + "name": "Dusclops", + "pokedex_id": 356, "forms": { "917": { "form": "Normal", + "form_id": 917, "proto": "DUSCLOPS_NORMAL" }, "918": { "form": "Shadow", + "form_id": 918, "proto": "DUSCLOPS_SHADOW" }, "919": { "form": "Purified", + "form_id": 919, "proto": "DUSCLOPS_PURIFIED" } }, - "pokedex_id": 356, - "name": "Dusclops", "default_form_id": "917", "types": [ "Ghost" @@ -20270,7 +21485,7 @@ "evolutions": [ { "evolution": "Dusknoir", - "evolution_id": "477", + "evolution_id": 477, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone" } @@ -20285,22 +21500,25 @@ "default_form": "Normal" }, "357": { + "name": "Tropius", + "pokedex_id": 357, "forms": { "1589": { "form": "Normal", + "form_id": 1589, "proto": "TROPIUS_NORMAL" }, "1590": { "form": "Shadow", + "form_id": 1590, "proto": "TROPIUS_SHADOW" }, "1591": { "form": "Purified", + "form_id": 1591, "proto": "TROPIUS_PURIFIED" } }, - "pokedex_id": 357, - "name": "Tropius", "default_form_id": "1589", "types": [ "Grass", @@ -20335,22 +21553,25 @@ "default_form": "Normal" }, "358": { + "name": "Chimecho", + "pokedex_id": 358, "forms": { "1592": { "form": "Normal", + "form_id": 1592, "proto": "CHIMECHO_NORMAL" }, "1593": { "form": "Shadow", + "form_id": 1593, "proto": "CHIMECHO_SHADOW" }, "1594": { "form": "Purified", + "form_id": 1594, "proto": "CHIMECHO_PURIFIED" } }, - "pokedex_id": 358, - "name": "Chimecho", "default_form_id": "1592", "types": [ "Psychic" @@ -20385,22 +21606,25 @@ "default_form": "Normal" }, "359": { + "name": "Absol", + "pokedex_id": 359, "forms": { "830": { "form": "Normal", + "form_id": 830, "proto": "ABSOL_NORMAL" }, "831": { "form": "Shadow", + "form_id": 831, "proto": "ABSOL_SHADOW" }, "832": { "form": "Purified", + "form_id": 832, "proto": "ABSOL_PURIFIED" } }, - "pokedex_id": 359, - "name": "Absol", "default_form_id": "830", "types": [ "Dark" @@ -20434,22 +21658,25 @@ "default_form": "Normal" }, "360": { + "name": "Wynaut", + "pokedex_id": 360, "forms": { "1595": { "form": "Normal", + "form_id": 1595, "proto": "WYNAUT_NORMAL" }, "1596": { "form": "Shadow", + "form_id": 1596, "proto": "WYNAUT_SHADOW" }, "1597": { "form": "Purified", + "form_id": 1597, "proto": "WYNAUT_PURIFIED" } }, - "pokedex_id": 360, - "name": "Wynaut", "default_form_id": "1595", "types": [ "Psychic" @@ -20473,7 +21700,7 @@ "evolutions": [ { "evolution": "Wobbuffet", - "evolution_id": "202", + "evolution_id": 202, "candy_cost": 25 } ], @@ -20487,22 +21714,25 @@ "default_form": "Normal" }, "361": { + "name": "Snorunt", + "pokedex_id": 361, "forms": { "926": { "form": "Normal", + "form_id": 926, "proto": "SNORUNT_NORMAL" }, "927": { "form": "Shadow", + "form_id": 927, "proto": "SNORUNT_SHADOW" }, "928": { "form": "Purified", + "form_id": 928, "proto": "SNORUNT_PURIFIED" } }, - "pokedex_id": 361, - "name": "Snorunt", "default_form_id": "926", "types": [ "Ice" @@ -20528,14 +21758,14 @@ "evolutions": [ { "evolution": "Froslass", - "evolution_id": "478", + "evolution_id": 478, "candy_cost": 100, "evolution_item": "Gen4 Evolution Stone", "gender_requirement": "female" }, { "evolution": "Glalie", - "evolution_id": "362", + "evolution_id": 362, "candy_cost": 100 } ], @@ -20549,22 +21779,25 @@ "default_form": "Normal" }, "362": { + "name": "Glalie", + "pokedex_id": 362, "forms": { "929": { "form": "Normal", + "form_id": 929, "proto": "GLALIE_NORMAL" }, "930": { "form": "Shadow", + "form_id": 930, "proto": "GLALIE_SHADOW" }, "931": { "form": "Purified", + "form_id": 931, "proto": "GLALIE_PURIFIED" } }, - "pokedex_id": 362, - "name": "Glalie", "default_form_id": "929", "types": [ "Ice" @@ -20598,22 +21831,25 @@ "default_form": "Normal" }, "363": { + "name": "Spheal", + "pokedex_id": 363, "forms": { "1598": { "form": "Normal", + "form_id": 1598, "proto": "SPHEAL_NORMAL" }, "1599": { "form": "Shadow", + "form_id": 1599, "proto": "SPHEAL_SHADOW" }, "1600": { "form": "Purified", + "form_id": 1600, "proto": "SPHEAL_PURIFIED" } }, - "pokedex_id": 363, - "name": "Spheal", "default_form_id": "1598", "types": [ "Ice", @@ -20640,7 +21876,7 @@ "evolutions": [ { "evolution": "Sealeo", - "evolution_id": "364", + "evolution_id": 364, "candy_cost": 25 } ], @@ -20654,22 +21890,25 @@ "default_form": "Normal" }, "364": { + "name": "Sealeo", + "pokedex_id": 364, "forms": { "1601": { "form": "Normal", + "form_id": 1601, "proto": "SEALEO_NORMAL" }, "1602": { "form": "Shadow", + "form_id": 1602, "proto": "SEALEO_SHADOW" }, "1603": { "form": "Purified", + "form_id": 1603, "proto": "SEALEO_PURIFIED" } }, - "pokedex_id": 364, - "name": "Sealeo", "default_form_id": "1601", "types": [ "Ice", @@ -20696,7 +21935,7 @@ "evolutions": [ { "evolution": "Walrein", - "evolution_id": "365", + "evolution_id": 365, "candy_cost": 100 } ], @@ -20710,22 +21949,25 @@ "default_form": "Normal" }, "365": { + "name": "Walrein", + "pokedex_id": 365, "forms": { "1604": { "form": "Normal", + "form_id": 1604, "proto": "WALREIN_NORMAL" }, "1605": { "form": "Shadow", + "form_id": 1605, "proto": "WALREIN_SHADOW" }, "1606": { "form": "Purified", + "form_id": 1606, "proto": "WALREIN_PURIFIED" } }, - "pokedex_id": 365, - "name": "Walrein", "default_form_id": "1604", "types": [ "Ice", @@ -20760,22 +22002,25 @@ "default_form": "Normal" }, "366": { + "name": "Clamperl", + "pokedex_id": 366, "forms": { "1607": { "form": "Normal", + "form_id": 1607, "proto": "CLAMPERL_NORMAL" }, "1608": { "form": "Shadow", + "form_id": 1608, "proto": "CLAMPERL_SHADOW" }, "1609": { "form": "Purified", + "form_id": 1609, "proto": "CLAMPERL_PURIFIED" } }, - "pokedex_id": 366, - "name": "Clamperl", "default_form_id": "1607", "types": [ "Water" @@ -20800,12 +22045,12 @@ "evolutions": [ { "evolution": "Huntail", - "evolution_id": "367", + "evolution_id": 367, "candy_cost": 50 }, { "evolution": "Gorebyss", - "evolution_id": "368", + "evolution_id": 368, "candy_cost": 50 } ], @@ -20819,22 +22064,25 @@ "default_form": "Normal" }, "367": { + "name": "Huntail", + "pokedex_id": 367, "forms": { "1610": { "form": "Normal", + "form_id": 1610, "proto": "HUNTAIL_NORMAL" }, "1611": { "form": "Shadow", + "form_id": 1611, "proto": "HUNTAIL_SHADOW" }, "1612": { "form": "Purified", + "form_id": 1612, "proto": "HUNTAIL_PURIFIED" } }, - "pokedex_id": 367, - "name": "Huntail", "default_form_id": "1610", "types": [ "Water" @@ -20868,22 +22116,25 @@ "default_form": "Normal" }, "368": { + "name": "Gorebyss", + "pokedex_id": 368, "forms": { "1613": { "form": "Normal", + "form_id": 1613, "proto": "GOREBYSS_NORMAL" }, "1614": { "form": "Shadow", + "form_id": 1614, "proto": "GOREBYSS_SHADOW" }, "1615": { "form": "Purified", + "form_id": 1615, "proto": "GOREBYSS_PURIFIED" } }, - "pokedex_id": 368, - "name": "Gorebyss", "default_form_id": "1613", "types": [ "Water" @@ -20917,22 +22168,25 @@ "default_form": "Normal" }, "369": { + "name": "Relicanth", + "pokedex_id": 369, "forms": { "1616": { "form": "Normal", + "form_id": 1616, "proto": "RELICANTH_NORMAL" }, "1617": { "form": "Shadow", + "form_id": 1617, "proto": "RELICANTH_SHADOW" }, "1618": { "form": "Purified", + "form_id": 1618, "proto": "RELICANTH_PURIFIED" } }, - "pokedex_id": 369, - "name": "Relicanth", "default_form_id": "1616", "types": [ "Water", @@ -20967,22 +22221,25 @@ "default_form": "Normal" }, "370": { + "name": "Luvdisc", + "pokedex_id": 370, "forms": { "1619": { "form": "Normal", + "form_id": 1619, "proto": "LUVDISC_NORMAL" }, "1620": { "form": "Shadow", + "form_id": 1620, "proto": "LUVDISC_SHADOW" }, "1621": { "form": "Purified", + "form_id": 1621, "proto": "LUVDISC_PURIFIED" } }, - "pokedex_id": 370, - "name": "Luvdisc", "default_form_id": "1619", "types": [ "Water" @@ -21016,22 +22273,25 @@ "default_form": "Normal" }, "371": { + "name": "Bagon", + "pokedex_id": 371, "forms": { "755": { "form": "Normal", + "form_id": 755, "proto": "BAGON_NORMAL" }, "756": { "form": "Shadow", + "form_id": 756, "proto": "BAGON_SHADOW" }, "757": { "form": "Purified", + "form_id": 757, "proto": "BAGON_PURIFIED" } }, - "pokedex_id": 371, - "name": "Bagon", "default_form_id": "755", "types": [ "Dragon" @@ -21057,7 +22317,7 @@ "evolutions": [ { "evolution": "Shelgon", - "evolution_id": "372", + "evolution_id": 372, "candy_cost": 25 } ], @@ -21071,22 +22331,25 @@ "default_form": "Normal" }, "372": { + "name": "Shelgon", + "pokedex_id": 372, "forms": { "758": { "form": "Normal", + "form_id": 758, "proto": "SHELGON_NORMAL" }, "759": { "form": "Shadow", + "form_id": 759, "proto": "SHELGON_SHADOW" }, "760": { "form": "Purified", + "form_id": 760, "proto": "SHELGON_PURIFIED" } }, - "pokedex_id": 372, - "name": "Shelgon", "default_form_id": "758", "types": [ "Dragon" @@ -21112,7 +22375,7 @@ "evolutions": [ { "evolution": "Salamence", - "evolution_id": "373", + "evolution_id": 373, "candy_cost": 100 } ], @@ -21126,22 +22389,25 @@ "default_form": "Normal" }, "373": { + "name": "Salamence", + "pokedex_id": 373, "forms": { "761": { "form": "Normal", + "form_id": 761, "proto": "SALAMENCE_NORMAL" }, "762": { "form": "Shadow", + "form_id": 762, "proto": "SALAMENCE_SHADOW" }, "763": { "form": "Purified", + "form_id": 763, "proto": "SALAMENCE_PURIFIED" } }, - "pokedex_id": 373, - "name": "Salamence", "default_form_id": "761", "types": [ "Dragon", @@ -21177,22 +22443,25 @@ "default_form": "Normal" }, "374": { + "name": "Beldum", + "pokedex_id": 374, "forms": { "764": { "form": "Normal", + "form_id": 764, "proto": "BELDUM_NORMAL" }, "765": { "form": "Shadow", + "form_id": 765, "proto": "BELDUM_SHADOW" }, "766": { "form": "Purified", + "form_id": 766, "proto": "BELDUM_PURIFIED" } }, - "pokedex_id": 374, - "name": "Beldum", "default_form_id": "764", "types": [ "Steel", @@ -21216,7 +22485,7 @@ "evolutions": [ { "evolution": "Metang", - "evolution_id": "375", + "evolution_id": 375, "candy_cost": 25 } ], @@ -21230,22 +22499,25 @@ "default_form": "Normal" }, "375": { + "name": "Metang", + "pokedex_id": 375, "forms": { "767": { "form": "Normal", + "form_id": 767, "proto": "METANG_NORMAL" }, "768": { "form": "Shadow", + "form_id": 768, "proto": "METANG_SHADOW" }, "769": { "form": "Purified", + "form_id": 769, "proto": "METANG_PURIFIED" } }, - "pokedex_id": 375, - "name": "Metang", "default_form_id": "767", "types": [ "Steel", @@ -21272,7 +22544,7 @@ "evolutions": [ { "evolution": "Metagross", - "evolution_id": "376", + "evolution_id": 376, "candy_cost": 100 } ], @@ -21286,22 +22558,25 @@ "default_form": "Normal" }, "376": { + "name": "Metagross", + "pokedex_id": 376, "forms": { "770": { "form": "Normal", + "form_id": 770, "proto": "METAGROSS_NORMAL" }, "771": { "form": "Shadow", + "form_id": 771, "proto": "METAGROSS_SHADOW" }, "772": { "form": "Purified", + "form_id": 772, "proto": "METAGROSS_PURIFIED" } }, - "pokedex_id": 376, - "name": "Metagross", "default_form_id": "770", "types": [ "Steel", @@ -21336,22 +22611,25 @@ "default_form": "Normal" }, "377": { + "name": "Regirock", + "pokedex_id": 377, "forms": { "1622": { "form": "Normal", + "form_id": 1622, "proto": "REGIROCK_NORMAL" }, "1623": { "form": "Shadow", + "form_id": 1623, "proto": "REGIROCK_SHADOW" }, "1624": { "form": "Purified", + "form_id": 1624, "proto": "REGIROCK_PURIFIED" } }, - "pokedex_id": 377, - "name": "Regirock", "default_form_id": "1622", "types": [ "Rock" @@ -21385,22 +22663,25 @@ "default_form": "Normal" }, "378": { + "name": "Regice", + "pokedex_id": 378, "forms": { "1625": { "form": "Normal", + "form_id": 1625, "proto": "REGICE_NORMAL" }, "1626": { "form": "Shadow", + "form_id": 1626, "proto": "REGICE_SHADOW" }, "1627": { "form": "Purified", + "form_id": 1627, "proto": "REGICE_PURIFIED" } }, - "pokedex_id": 378, - "name": "Regice", "default_form_id": "1625", "types": [ "Ice" @@ -21434,22 +22715,25 @@ "default_form": "Normal" }, "379": { + "name": "Registeel", + "pokedex_id": 379, "forms": { "1628": { "form": "Normal", + "form_id": 1628, "proto": "REGISTEEL_NORMAL" }, "1629": { "form": "Shadow", + "form_id": 1629, "proto": "REGISTEEL_SHADOW" }, "1630": { "form": "Purified", + "form_id": 1630, "proto": "REGISTEEL_PURIFIED" } }, - "pokedex_id": 379, - "name": "Registeel", "default_form_id": "1628", "types": [ "Steel" @@ -21483,22 +22767,25 @@ "default_form": "Normal" }, "380": { + "name": "Latias", + "pokedex_id": 380, "forms": { "1631": { "form": "Normal", + "form_id": 1631, "proto": "LATIAS_NORMAL" }, "1632": { "form": "Shadow", + "form_id": 1632, "proto": "LATIAS_SHADOW" }, "1633": { "form": "Purified", + "form_id": 1633, "proto": "LATIAS_PURIFIED" } }, - "pokedex_id": 380, - "name": "Latias", "default_form_id": "1631", "types": [ "Dragon", @@ -21533,22 +22820,25 @@ "default_form": "Normal" }, "381": { + "name": "Latios", + "pokedex_id": 381, "forms": { "1634": { "form": "Normal", + "form_id": 1634, "proto": "LATIOS_NORMAL" }, "1635": { "form": "Shadow", + "form_id": 1635, "proto": "LATIOS_SHADOW" }, "1636": { "form": "Purified", + "form_id": 1636, "proto": "LATIOS_PURIFIED" } }, - "pokedex_id": 381, - "name": "Latios", "default_form_id": "1634", "types": [ "Dragon", @@ -21582,22 +22872,25 @@ "default_form": "Normal" }, "382": { + "name": "Kyogre", + "pokedex_id": 382, "forms": { "1637": { "form": "Normal", + "form_id": 1637, "proto": "KYOGRE_NORMAL" }, "1638": { "form": "Shadow", + "form_id": 1638, "proto": "KYOGRE_SHADOW" }, "1639": { "form": "Purified", + "form_id": 1639, "proto": "KYOGRE_PURIFIED" } }, - "pokedex_id": 382, - "name": "Kyogre", "default_form_id": "1637", "types": [ "Water" @@ -21630,22 +22923,25 @@ "default_form": "Normal" }, "383": { + "name": "Groudon", + "pokedex_id": 383, "forms": { "1640": { "form": "Normal", + "form_id": 1640, "proto": "GROUDON_NORMAL" }, "1641": { "form": "Shadow", + "form_id": 1641, "proto": "GROUDON_SHADOW" }, "1642": { "form": "Purified", + "form_id": 1642, "proto": "GROUDON_PURIFIED" } }, - "pokedex_id": 383, - "name": "Groudon", "default_form_id": "1640", "types": [ "Ground" @@ -21678,22 +22974,25 @@ "default_form": "Normal" }, "384": { + "name": "Rayquaza", + "pokedex_id": 384, "forms": { "1643": { "form": "Normal", + "form_id": 1643, "proto": "RAYQUAZA_NORMAL" }, "1644": { "form": "Shadow", + "form_id": 1644, "proto": "RAYQUAZA_SHADOW" }, "1645": { "form": "Purified", + "form_id": 1645, "proto": "RAYQUAZA_PURIFIED" } }, - "pokedex_id": 384, - "name": "Rayquaza", "default_form_id": "1643", "types": [ "Dragon", @@ -21727,22 +23026,25 @@ "default_form": "Normal" }, "385": { + "name": "Jirachi", + "pokedex_id": 385, "forms": { "1646": { "form": "Normal", + "form_id": 1646, "proto": "JIRACHI_NORMAL" }, "1647": { "form": "Shadow", + "form_id": 1647, "proto": "JIRACHI_SHADOW" }, "1648": { "form": "Purified", + "form_id": 1648, "proto": "JIRACHI_PURIFIED" } }, - "pokedex_id": 385, - "name": "Jirachi", "default_form_id": "1646", "types": [ "Steel", @@ -21775,9 +23077,12 @@ "default_form": "Normal" }, "386": { + "name": "Deoxys", + "pokedex_id": 386, "forms": { "33": { "form": "Normal", + "form_id": 33, "proto": "DEOXYS_NORMAL", "charged_moves": [ "Psycho Boost", @@ -21787,6 +23092,7 @@ }, "34": { "form": "Attack", + "form_id": 34, "proto": "DEOXYS_ATTACK", "attack": 414, "defense": 46, @@ -21803,6 +23109,7 @@ }, "35": { "form": "Defense", + "form_id": 35, "proto": "DEOXYS_DEFENSE", "attack": 144, "defense": 330, @@ -21819,6 +23126,7 @@ }, "36": { "form": "Speed", + "form_id": 36, "proto": "DEOXYS_SPEED", "attack": 230, "defense": 218, @@ -21830,8 +23138,6 @@ ] } }, - "pokedex_id": 386, - "name": "Deoxys", "default_form_id": "33", "types": [ "Psychic" @@ -21864,22 +23170,25 @@ "default_form": "Normal" }, "387": { + "name": "Turtwig", + "pokedex_id": 387, "forms": { "688": { "form": "Normal", + "form_id": 688, "proto": "TURTWIG_NORMAL" }, "689": { "form": "Shadow", + "form_id": 689, "proto": "TURTWIG_SHADOW" }, "690": { "form": "Purified", + "form_id": 690, "proto": "TURTWIG_PURIFIED" } }, - "pokedex_id": 387, - "name": "Turtwig", "default_form_id": "688", "types": [ "Grass" @@ -21905,7 +23214,7 @@ "evolutions": [ { "evolution": "Grotle", - "evolution_id": "388", + "evolution_id": 388, "candy_cost": 25 } ], @@ -21920,22 +23229,25 @@ "default_form": "Normal" }, "388": { + "name": "Grotle", + "pokedex_id": 388, "forms": { "691": { "form": "Normal", + "form_id": 691, "proto": "GROTLE_NORMAL" }, "692": { "form": "Shadow", + "form_id": 692, "proto": "GROTLE_SHADOW" }, "693": { "form": "Purified", + "form_id": 693, "proto": "GROTLE_PURIFIED" } }, - "pokedex_id": 388, - "name": "Grotle", "default_form_id": "691", "types": [ "Grass" @@ -21961,7 +23273,7 @@ "evolutions": [ { "evolution": "Torterra", - "evolution_id": "389", + "evolution_id": 389, "candy_cost": 100 } ], @@ -21976,22 +23288,25 @@ "default_form": "Normal" }, "389": { + "name": "Torterra", + "pokedex_id": 389, "forms": { "694": { "form": "Normal", + "form_id": 694, "proto": "TORTERRA_NORMAL" }, "695": { "form": "Shadow", + "form_id": 695, "proto": "TORTERRA_SHADOW" }, "696": { "form": "Purified", + "form_id": 696, "proto": "TORTERRA_PURIFIED" } }, - "pokedex_id": 389, - "name": "Torterra", "default_form_id": "694", "types": [ "Grass", @@ -22028,22 +23343,25 @@ "default_form": "Normal" }, "390": { + "name": "Chimchar", + "pokedex_id": 390, "forms": { "818": { "form": "Normal", + "form_id": 818, "proto": "CHIMCHAR_NORMAL" }, "819": { "form": "Shadow", + "form_id": 819, "proto": "CHIMCHAR_SHADOW" }, "820": { "form": "Purified", + "form_id": 820, "proto": "CHIMCHAR_PURIFIED" } }, - "pokedex_id": 390, - "name": "Chimchar", "default_form_id": "818", "types": [ "Fire" @@ -22069,7 +23387,7 @@ "evolutions": [ { "evolution": "Monferno", - "evolution_id": "391", + "evolution_id": 391, "candy_cost": 25 } ], @@ -22084,22 +23402,25 @@ "default_form": "Normal" }, "391": { + "name": "Monferno", + "pokedex_id": 391, "forms": { "821": { "form": "Normal", + "form_id": 821, "proto": "MONFERNO_NORMAL" }, "822": { "form": "Shadow", + "form_id": 822, "proto": "MONFERNO_SHADOW" }, "823": { "form": "Purified", + "form_id": 823, "proto": "MONFERNO_PURIFIED" } }, - "pokedex_id": 391, - "name": "Monferno", "default_form_id": "821", "types": [ "Fire", @@ -22126,7 +23447,7 @@ "evolutions": [ { "evolution": "Infernape", - "evolution_id": "392", + "evolution_id": 392, "candy_cost": 100 } ], @@ -22141,22 +23462,25 @@ "default_form": "Normal" }, "392": { + "name": "Infernape", + "pokedex_id": 392, "forms": { "824": { "form": "Normal", + "form_id": 824, "proto": "INFERNAPE_NORMAL" }, "825": { "form": "Shadow", + "form_id": 825, "proto": "INFERNAPE_SHADOW" }, "826": { "form": "Purified", + "form_id": 826, "proto": "INFERNAPE_PURIFIED" } }, - "pokedex_id": 392, - "name": "Infernape", "default_form_id": "824", "types": [ "Fire", @@ -22192,22 +23516,25 @@ "default_form": "Normal" }, "393": { + "name": "Piplup", + "pokedex_id": 393, "forms": { "1649": { "form": "Normal", + "form_id": 1649, "proto": "PIPLUP_NORMAL" }, "1650": { "form": "Shadow", + "form_id": 1650, "proto": "PIPLUP_SHADOW" }, "1651": { "form": "Purified", + "form_id": 1651, "proto": "PIPLUP_PURIFIED" } }, - "pokedex_id": 393, - "name": "Piplup", "default_form_id": "1649", "types": [ "Water" @@ -22233,7 +23560,7 @@ "evolutions": [ { "evolution": "Prinplup", - "evolution_id": "394", + "evolution_id": 394, "candy_cost": 25 } ], @@ -22248,22 +23575,25 @@ "default_form": "Normal" }, "394": { + "name": "Prinplup", + "pokedex_id": 394, "forms": { "1652": { "form": "Normal", + "form_id": 1652, "proto": "PRINPLUP_NORMAL" }, "1653": { "form": "Shadow", + "form_id": 1653, "proto": "PRINPLUP_SHADOW" }, "1654": { "form": "Purified", + "form_id": 1654, "proto": "PRINPLUP_PURIFIED" } }, - "pokedex_id": 394, - "name": "Prinplup", "default_form_id": "1652", "types": [ "Water" @@ -22289,7 +23619,7 @@ "evolutions": [ { "evolution": "Empoleon", - "evolution_id": "395", + "evolution_id": 395, "candy_cost": 100 } ], @@ -22304,22 +23634,25 @@ "default_form": "Normal" }, "395": { + "name": "Empoleon", + "pokedex_id": 395, "forms": { "1655": { "form": "Normal", + "form_id": 1655, "proto": "EMPOLEON_NORMAL" }, "1656": { "form": "Shadow", + "form_id": 1656, "proto": "EMPOLEON_SHADOW" }, "1657": { "form": "Purified", + "form_id": 1657, "proto": "EMPOLEON_PURIFIED" } }, - "pokedex_id": 395, - "name": "Empoleon", "default_form_id": "1655", "types": [ "Water", @@ -22355,22 +23688,25 @@ "default_form": "Normal" }, "396": { + "name": "Starly", + "pokedex_id": 396, "forms": { "1658": { "form": "Normal", + "form_id": 1658, "proto": "STARLY_NORMAL" }, "1659": { "form": "Shadow", + "form_id": 1659, "proto": "STARLY_SHADOW" }, "1660": { "form": "Purified", + "form_id": 1660, "proto": "STARLY_PURIFIED" } }, - "pokedex_id": 396, - "name": "Starly", "default_form_id": "1658", "types": [ "Normal", @@ -22396,7 +23732,7 @@ "evolutions": [ { "evolution": "Staravia", - "evolution_id": "397", + "evolution_id": 397, "candy_cost": 25 } ], @@ -22411,22 +23747,25 @@ "default_form": "Normal" }, "397": { + "name": "Staravia", + "pokedex_id": 397, "forms": { "1661": { "form": "Normal", + "form_id": 1661, "proto": "STARAVIA_NORMAL" }, "1662": { "form": "Shadow", + "form_id": 1662, "proto": "STARAVIA_SHADOW" }, "1663": { "form": "Purified", + "form_id": 1663, "proto": "STARAVIA_PURIFIED" } }, - "pokedex_id": 397, - "name": "Staravia", "default_form_id": "1661", "types": [ "Normal", @@ -22453,7 +23792,7 @@ "evolutions": [ { "evolution": "Staraptor", - "evolution_id": "398", + "evolution_id": 398, "candy_cost": 100 } ], @@ -22468,22 +23807,25 @@ "default_form": "Normal" }, "398": { + "name": "Staraptor", + "pokedex_id": 398, "forms": { "1664": { "form": "Normal", + "form_id": 1664, "proto": "STARAPTOR_NORMAL" }, "1665": { "form": "Shadow", + "form_id": 1665, "proto": "STARAPTOR_SHADOW" }, "1666": { "form": "Purified", + "form_id": 1666, "proto": "STARAPTOR_PURIFIED" } }, - "pokedex_id": 398, - "name": "Staraptor", "default_form_id": "1664", "types": [ "Normal", @@ -22519,22 +23861,25 @@ "default_form": "Normal" }, "399": { + "name": "Bidoof", + "pokedex_id": 399, "forms": { "1667": { "form": "Normal", + "form_id": 1667, "proto": "BIDOOF_NORMAL" }, "1668": { "form": "Shadow", + "form_id": 1668, "proto": "BIDOOF_SHADOW" }, "1669": { "form": "Purified", + "form_id": 1669, "proto": "BIDOOF_PURIFIED" } }, - "pokedex_id": 399, - "name": "Bidoof", "default_form_id": "1667", "types": [ "Normal" @@ -22560,7 +23905,7 @@ "evolutions": [ { "evolution": "Bibarel", - "evolution_id": "400", + "evolution_id": 400, "candy_cost": 50 } ], @@ -22575,22 +23920,25 @@ "default_form": "Normal" }, "400": { + "name": "Bibarel", + "pokedex_id": 400, "forms": { "1670": { "form": "Normal", + "form_id": 1670, "proto": "BIBAREL_NORMAL" }, "1671": { "form": "Shadow", + "form_id": 1671, "proto": "BIBAREL_SHADOW" }, "1672": { "form": "Purified", + "form_id": 1672, "proto": "BIBAREL_PURIFIED" } }, - "pokedex_id": 400, - "name": "Bibarel", "default_form_id": "1670", "types": [ "Normal", @@ -22626,22 +23974,25 @@ "default_form": "Normal" }, "401": { + "name": "Kricketot", + "pokedex_id": 401, "forms": { "1673": { "form": "Normal", + "form_id": 1673, "proto": "KRICKETOT_NORMAL" }, "1674": { "form": "Shadow", + "form_id": 1674, "proto": "KRICKETOT_SHADOW" }, "1675": { "form": "Purified", + "form_id": 1675, "proto": "KRICKETOT_PURIFIED" } }, - "pokedex_id": 401, - "name": "Kricketot", "default_form_id": "1673", "types": [ "Bug" @@ -22665,7 +24016,7 @@ "evolutions": [ { "evolution": "Kricketune", - "evolution_id": "402", + "evolution_id": 402, "candy_cost": 50 } ], @@ -22680,22 +24031,25 @@ "default_form": "Normal" }, "402": { + "name": "Kricketune", + "pokedex_id": 402, "forms": { "1676": { "form": "Normal", + "form_id": 1676, "proto": "KRICKETUNE_NORMAL" }, "1677": { "form": "Shadow", + "form_id": 1677, "proto": "KRICKETUNE_SHADOW" }, "1678": { "form": "Purified", + "form_id": 1678, "proto": "KRICKETUNE_PURIFIED" } }, - "pokedex_id": 402, - "name": "Kricketune", "default_form_id": "1676", "types": [ "Bug" @@ -22730,22 +24084,25 @@ "default_form": "Normal" }, "403": { + "name": "Shinx", + "pokedex_id": 403, "forms": { "1679": { "form": "Normal", + "form_id": 1679, "proto": "SHINX_NORMAL" }, "1680": { "form": "Shadow", + "form_id": 1680, "proto": "SHINX_SHADOW" }, "1681": { "form": "Purified", + "form_id": 1681, "proto": "SHINX_PURIFIED" } }, - "pokedex_id": 403, - "name": "Shinx", "default_form_id": "1679", "types": [ "Electric" @@ -22771,7 +24128,7 @@ "evolutions": [ { "evolution": "Luxio", - "evolution_id": "404", + "evolution_id": 404, "candy_cost": 25 } ], @@ -22786,22 +24143,25 @@ "default_form": "Normal" }, "404": { + "name": "Luxio", + "pokedex_id": 404, "forms": { "1682": { "form": "Normal", + "form_id": 1682, "proto": "LUXIO_NORMAL" }, "1683": { "form": "Shadow", + "form_id": 1683, "proto": "LUXIO_SHADOW" }, "1684": { "form": "Purified", + "form_id": 1684, "proto": "LUXIO_PURIFIED" } }, - "pokedex_id": 404, - "name": "Luxio", "default_form_id": "1682", "types": [ "Electric" @@ -22827,7 +24187,7 @@ "evolutions": [ { "evolution": "Luxray", - "evolution_id": "405", + "evolution_id": 405, "candy_cost": 100 } ], @@ -22842,22 +24202,25 @@ "default_form": "Normal" }, "405": { + "name": "Luxray", + "pokedex_id": 405, "forms": { "1685": { "form": "Normal", + "form_id": 1685, "proto": "LUXRAY_NORMAL" }, "1686": { "form": "Shadow", + "form_id": 1686, "proto": "LUXRAY_SHADOW" }, "1687": { "form": "Purified", + "form_id": 1687, "proto": "LUXRAY_PURIFIED" } }, - "pokedex_id": 405, - "name": "Luxray", "default_form_id": "1685", "types": [ "Electric" @@ -22893,22 +24256,25 @@ "default_form": "Normal" }, "406": { + "name": "Budew", + "pokedex_id": 406, "forms": { "1688": { "form": "Normal", + "form_id": 1688, "proto": "BUDEW_NORMAL" }, "1689": { "form": "Shadow", + "form_id": 1689, "proto": "BUDEW_SHADOW" }, "1690": { "form": "Purified", + "form_id": 1690, "proto": "BUDEW_PURIFIED" } }, - "pokedex_id": 406, - "name": "Budew", "default_form_id": "1688", "types": [ "Grass", @@ -22934,7 +24300,7 @@ "evolutions": [ { "evolution": "Roselia", - "evolution_id": "315", + "evolution_id": 315, "candy_cost": 25 } ], @@ -22949,22 +24315,25 @@ "default_form": "Normal" }, "407": { + "name": "Roserade", + "pokedex_id": 407, "forms": { "1691": { "form": "Normal", + "form_id": 1691, "proto": "ROSERADE_NORMAL" }, "1692": { "form": "Shadow", + "form_id": 1692, "proto": "ROSERADE_SHADOW" }, "1693": { "form": "Purified", + "form_id": 1693, "proto": "ROSERADE_PURIFIED" } }, - "pokedex_id": 407, - "name": "Roserade", "default_form_id": "1691", "types": [ "Grass", @@ -23001,22 +24370,25 @@ "default_form": "Normal" }, "408": { + "name": "Cranidos", + "pokedex_id": 408, "forms": { "1694": { "form": "Normal", + "form_id": 1694, "proto": "CRANIDOS_NORMAL" }, "1695": { "form": "Shadow", + "form_id": 1695, "proto": "CRANIDOS_SHADOW" }, "1696": { "form": "Purified", + "form_id": 1696, "proto": "CRANIDOS_PURIFIED" } }, - "pokedex_id": 408, - "name": "Cranidos", "default_form_id": "1694", "types": [ "Rock" @@ -23042,7 +24414,7 @@ "evolutions": [ { "evolution": "Rampardos", - "evolution_id": "409", + "evolution_id": 409, "candy_cost": 50 } ], @@ -23057,22 +24429,25 @@ "default_form": "Normal" }, "409": { + "name": "Rampardos", + "pokedex_id": 409, "forms": { "1697": { "form": "Normal", + "form_id": 1697, "proto": "RAMPARDOS_NORMAL" }, "1698": { "form": "Shadow", + "form_id": 1698, "proto": "RAMPARDOS_SHADOW" }, "1699": { "form": "Purified", + "form_id": 1699, "proto": "RAMPARDOS_PURIFIED" } }, - "pokedex_id": 409, - "name": "Rampardos", "default_form_id": "1697", "types": [ "Rock" @@ -23107,22 +24482,25 @@ "default_form": "Normal" }, "410": { + "name": "Shieldon", + "pokedex_id": 410, "forms": { "1700": { "form": "Normal", + "form_id": 1700, "proto": "SHIELDON_NORMAL" }, "1701": { "form": "Shadow", + "form_id": 1701, "proto": "SHIELDON_SHADOW" }, "1702": { "form": "Purified", + "form_id": 1702, "proto": "SHIELDON_PURIFIED" } }, - "pokedex_id": 410, - "name": "Shieldon", "default_form_id": "1700", "types": [ "Rock", @@ -23149,7 +24527,7 @@ "evolutions": [ { "evolution": "Bastiodon", - "evolution_id": "411", + "evolution_id": 411, "candy_cost": 50 } ], @@ -23164,22 +24542,25 @@ "default_form": "Normal" }, "411": { + "name": "Bastiodon", + "pokedex_id": 411, "forms": { "1703": { "form": "Normal", + "form_id": 1703, "proto": "BASTIODON_NORMAL" }, "1704": { "form": "Shadow", + "form_id": 1704, "proto": "BASTIODON_SHADOW" }, "1705": { "form": "Purified", + "form_id": 1705, "proto": "BASTIODON_PURIFIED" } }, - "pokedex_id": 411, - "name": "Bastiodon", "default_form_id": "1703", "types": [ "Rock", @@ -23215,34 +24596,40 @@ "default_form": "Normal" }, "412": { + "name": "Burmy", + "pokedex_id": 412, "forms": { "118": { "form": "Plant", + "form_id": 118, "proto": "BURMY_PLANT" }, "119": { "form": "Sandy", + "form_id": 119, "proto": "BURMY_SANDY" }, "120": { "form": "Trash", + "form_id": 120, "proto": "BURMY_TRASH" }, "1706": { "form": "Normal", + "form_id": 1706, "proto": "BURMY_NORMAL" }, "1707": { "form": "Shadow", + "form_id": 1707, "proto": "BURMY_SHADOW" }, "1708": { "form": "Purified", + "form_id": 1708, "proto": "BURMY_PURIFIED" } }, - "pokedex_id": 412, - "name": "Burmy", "default_form_id": "118", "types": [ "Bug" @@ -23266,13 +24653,13 @@ "evolutions": [ { "evolution": "Wormadam", - "evolution_id": "413", + "evolution_id": 413, "candy_cost": 50, "gender_requirement": "female" }, { "evolution": "Mothim", - "evolution_id": "414", + "evolution_id": 414, "candy_cost": 50, "gender_requirement": "male" } @@ -23288,9 +24675,12 @@ "default_form": "Plant" }, "413": { + "name": "Wormadam", + "pokedex_id": 413, "forms": { "87": { "form": "Plant", + "form_id": 87, "proto": "WORMADAM_PLANT", "quick_moves": [ "Confusion", @@ -23304,6 +24694,7 @@ }, "88": { "form": "Sandy", + "form_id": 88, "proto": "WORMADAM_SANDY", "quick_moves": [ "Confusion", @@ -23321,6 +24712,7 @@ }, "89": { "form": "Trash", + "form_id": 89, "proto": "WORMADAM_TRASH", "attack": 127, "defense": 175, @@ -23341,19 +24733,20 @@ }, "1709": { "form": "Normal", + "form_id": 1709, "proto": "WORMADAM_NORMAL" }, "1710": { "form": "Shadow", + "form_id": 1710, "proto": "WORMADAM_SHADOW" }, "1711": { "form": "Purified", + "form_id": 1711, "proto": "WORMADAM_PURIFIED" } }, - "pokedex_id": 413, - "name": "Wormadam", "default_form_id": "87", "types": [ "Bug", @@ -23387,22 +24780,25 @@ "default_form": "Plant" }, "414": { + "name": "Mothim", + "pokedex_id": 414, "forms": { "1712": { "form": "Normal", + "form_id": 1712, "proto": "MOTHIM_NORMAL" }, "1713": { "form": "Shadow", + "form_id": 1713, "proto": "MOTHIM_SHADOW" }, "1714": { "form": "Purified", + "form_id": 1714, "proto": "MOTHIM_PURIFIED" } }, - "pokedex_id": 414, - "name": "Mothim", "default_form_id": "1712", "types": [ "Bug", @@ -23438,22 +24834,25 @@ "default_form": "Normal" }, "415": { + "name": "Combee", + "pokedex_id": 415, "forms": { "1715": { "form": "Normal", + "form_id": 1715, "proto": "COMBEE_NORMAL" }, "1716": { "form": "Shadow", + "form_id": 1716, "proto": "COMBEE_SHADOW" }, "1717": { "form": "Purified", + "form_id": 1717, "proto": "COMBEE_PURIFIED" } }, - "pokedex_id": 415, - "name": "Combee", "default_form_id": "1715", "types": [ "Bug", @@ -23477,7 +24876,7 @@ "evolutions": [ { "evolution": "Vespiquen", - "evolution_id": "416", + "evolution_id": 416, "candy_cost": 50, "gender_requirement": "female" } @@ -23493,22 +24892,25 @@ "default_form": "Normal" }, "416": { + "name": "Vespiquen", + "pokedex_id": 416, "forms": { "1718": { "form": "Normal", + "form_id": 1718, "proto": "VESPIQUEN_NORMAL" }, "1719": { "form": "Shadow", + "form_id": 1719, "proto": "VESPIQUEN_SHADOW" }, "1720": { "form": "Purified", + "form_id": 1720, "proto": "VESPIQUEN_PURIFIED" } }, - "pokedex_id": 416, - "name": "Vespiquen", "default_form_id": "1718", "types": [ "Bug", @@ -23547,22 +24949,25 @@ "default_form": "Normal" }, "417": { + "name": "Pachirisu", + "pokedex_id": 417, "forms": { "1721": { "form": "Normal", + "form_id": 1721, "proto": "PACHIRISU_NORMAL" }, "1722": { "form": "Shadow", + "form_id": 1722, "proto": "PACHIRISU_SHADOW" }, "1723": { "form": "Purified", + "form_id": 1723, "proto": "PACHIRISU_PURIFIED" } }, - "pokedex_id": 417, - "name": "Pachirisu", "default_form_id": "1721", "types": [ "Electric" @@ -23597,22 +25002,25 @@ "default_form": "Normal" }, "418": { + "name": "Buizel", + "pokedex_id": 418, "forms": { "1724": { "form": "Normal", + "form_id": 1724, "proto": "BUIZEL_NORMAL" }, "1725": { "form": "Shadow", + "form_id": 1725, "proto": "BUIZEL_SHADOW" }, "1726": { "form": "Purified", + "form_id": 1726, "proto": "BUIZEL_PURIFIED" } }, - "pokedex_id": 418, - "name": "Buizel", "default_form_id": "1724", "types": [ "Water" @@ -23638,7 +25046,7 @@ "evolutions": [ { "evolution": "Floatzel", - "evolution_id": "419", + "evolution_id": 419, "candy_cost": 50 } ], @@ -23653,22 +25061,25 @@ "default_form": "Normal" }, "419": { + "name": "Floatzel", + "pokedex_id": 419, "forms": { "1727": { "form": "Normal", + "form_id": 1727, "proto": "FLOATZEL_NORMAL" }, "1728": { "form": "Shadow", + "form_id": 1728, "proto": "FLOATZEL_SHADOW" }, "1729": { "form": "Purified", + "form_id": 1729, "proto": "FLOATZEL_PURIFIED" } }, - "pokedex_id": 419, - "name": "Floatzel", "default_form_id": "1727", "types": [ "Water" @@ -23703,22 +25114,25 @@ "default_form": "Normal" }, "420": { + "name": "Cherubi", + "pokedex_id": 420, "forms": { "1730": { "form": "Normal", + "form_id": 1730, "proto": "CHERUBI_NORMAL" }, "1731": { "form": "Shadow", + "form_id": 1731, "proto": "CHERUBI_SHADOW" }, "1732": { "form": "Purified", + "form_id": 1732, "proto": "CHERUBI_PURIFIED" } }, - "pokedex_id": 420, - "name": "Cherubi", "default_form_id": "1730", "types": [ "Grass" @@ -23744,12 +25158,12 @@ "evolutions": [ { "evolution": "Cherrim", - "evolution_id": "421", + "evolution_id": 421, "candy_cost": 50 }, { "evolution": "Cherrim", - "evolution_id": "421", + "evolution_id": 421, "candy_cost": 50 } ], @@ -23764,13 +25178,17 @@ "default_form": "Normal" }, "421": { + "name": "Cherrim", + "pokedex_id": 421, "forms": { "94": { "form": "Overcast", + "form_id": 94, "proto": "CHERRIM_OVERCAST" }, "95": { "form": "Sunny", + "form_id": 95, "proto": "CHERRIM_SUNNY", "charged_moves": [ "Dazzling Gleam", @@ -23781,19 +25199,20 @@ }, "1733": { "form": "Normal", + "form_id": 1733, "proto": "CHERRIM_NORMAL" }, "1734": { "form": "Shadow", + "form_id": 1734, "proto": "CHERRIM_SHADOW" }, "1735": { "form": "Purified", + "form_id": 1735, "proto": "CHERRIM_PURIFIED" } }, - "pokedex_id": 421, - "name": "Cherrim", "default_form_id": "94", "types": [ "Grass" @@ -23828,30 +25247,35 @@ "default_form": "Overcast" }, "422": { + "name": "Shellos", + "pokedex_id": 422, "forms": { "96": { "form": "West Sea", + "form_id": 96, "proto": "SHELLOS_WEST_SEA" }, "97": { "form": "East Sea", + "form_id": 97, "proto": "SHELLOS_EAST_SEA" }, "1736": { "form": "Normal", + "form_id": 1736, "proto": "SHELLOS_NORMAL" }, "1737": { "form": "Shadow", + "form_id": 1737, "proto": "SHELLOS_SHADOW" }, "1738": { "form": "Purified", + "form_id": 1738, "proto": "SHELLOS_PURIFIED" } }, - "pokedex_id": 422, - "name": "Shellos", "default_form_id": "96", "types": [ "Water" @@ -23877,7 +25301,7 @@ "evolutions": [ { "evolution": "Gastrodon", - "evolution_id": "423", + "evolution_id": 423, "candy_cost": 50 } ], @@ -23892,30 +25316,35 @@ "default_form": "West Sea" }, "423": { + "name": "Gastrodon", + "pokedex_id": 423, "forms": { "98": { "form": "West Sea", + "form_id": 98, "proto": "GASTRODON_WEST_SEA" }, "99": { "form": "East Sea", + "form_id": 99, "proto": "GASTRODON_EAST_SEA" }, "1739": { "form": "Normal", + "form_id": 1739, "proto": "GASTRODON_NORMAL" }, "1740": { "form": "Shadow", + "form_id": 1740, "proto": "GASTRODON_SHADOW" }, "1741": { "form": "Purified", + "form_id": 1741, "proto": "GASTRODON_PURIFIED" } }, - "pokedex_id": 423, - "name": "Gastrodon", "default_form_id": "98", "types": [ "Water", @@ -23951,22 +25380,25 @@ "default_form": "West Sea" }, "424": { + "name": "Ambipom", + "pokedex_id": 424, "forms": { "1742": { "form": "Normal", + "form_id": 1742, "proto": "AMBIPOM_NORMAL" }, "1743": { "form": "Shadow", + "form_id": 1743, "proto": "AMBIPOM_SHADOW" }, "1744": { "form": "Purified", + "form_id": 1744, "proto": "AMBIPOM_PURIFIED" } }, - "pokedex_id": 424, - "name": "Ambipom", "default_form_id": "1742", "types": [ "Normal" @@ -24001,22 +25433,25 @@ "default_form": "Normal" }, "425": { + "name": "Drifloon", + "pokedex_id": 425, "forms": { "1745": { "form": "Normal", + "form_id": 1745, "proto": "DRIFLOON_NORMAL" }, "1746": { "form": "Shadow", + "form_id": 1746, "proto": "DRIFLOON_SHADOW" }, "1747": { "form": "Purified", + "form_id": 1747, "proto": "DRIFLOON_PURIFIED" } }, - "pokedex_id": 425, - "name": "Drifloon", "default_form_id": "1745", "types": [ "Ghost", @@ -24043,7 +25478,7 @@ "evolutions": [ { "evolution": "Drifblim", - "evolution_id": "426", + "evolution_id": 426, "candy_cost": 50 } ], @@ -24058,22 +25493,25 @@ "default_form": "Normal" }, "426": { + "name": "Drifblim", + "pokedex_id": 426, "forms": { "1748": { "form": "Normal", + "form_id": 1748, "proto": "DRIFBLIM_NORMAL" }, "1749": { "form": "Shadow", + "form_id": 1749, "proto": "DRIFBLIM_SHADOW" }, "1750": { "form": "Purified", + "form_id": 1750, "proto": "DRIFBLIM_PURIFIED" } }, - "pokedex_id": 426, - "name": "Drifblim", "default_form_id": "1748", "types": [ "Ghost", @@ -24109,22 +25547,25 @@ "default_form": "Normal" }, "427": { + "name": "Buneary", + "pokedex_id": 427, "forms": { "1751": { "form": "Normal", + "form_id": 1751, "proto": "BUNEARY_NORMAL" }, "1752": { "form": "Shadow", + "form_id": 1752, "proto": "BUNEARY_SHADOW" }, "1753": { "form": "Purified", + "form_id": 1753, "proto": "BUNEARY_PURIFIED" } }, - "pokedex_id": 427, - "name": "Buneary", "default_form_id": "1751", "types": [ "Normal" @@ -24149,7 +25590,7 @@ "evolutions": [ { "evolution": "Lopunny", - "evolution_id": "428", + "evolution_id": 428, "candy_cost": 50 } ], @@ -24164,22 +25605,25 @@ "default_form": "Normal" }, "428": { + "name": "Lopunny", + "pokedex_id": 428, "forms": { "1754": { "form": "Normal", + "form_id": 1754, "proto": "LOPUNNY_NORMAL" }, "1755": { "form": "Shadow", + "form_id": 1755, "proto": "LOPUNNY_SHADOW" }, "1756": { "form": "Purified", + "form_id": 1756, "proto": "LOPUNNY_PURIFIED" } }, - "pokedex_id": 428, - "name": "Lopunny", "default_form_id": "1754", "types": [ "Normal" @@ -24214,22 +25658,25 @@ "default_form": "Normal" }, "429": { + "name": "Mismagius", + "pokedex_id": 429, "forms": { "722": { "form": "Normal", + "form_id": 722, "proto": "MISMAGIUS_NORMAL" }, "723": { "form": "Shadow", + "form_id": 723, "proto": "MISMAGIUS_SHADOW" }, "724": { "form": "Purified", + "form_id": 724, "proto": "MISMAGIUS_PURIFIED" } }, - "pokedex_id": 429, - "name": "Mismagius", "default_form_id": "722", "types": [ "Ghost" @@ -24264,22 +25711,25 @@ "default_form": "Normal" }, "430": { + "name": "Honchkrow", + "pokedex_id": 430, "forms": { "858": { "form": "Normal", + "form_id": 858, "proto": "HONCHKROW_NORMAL" }, "859": { "form": "Shadow", + "form_id": 859, "proto": "HONCHKROW_SHADOW" }, "860": { "form": "Purified", + "form_id": 860, "proto": "HONCHKROW_PURIFIED" } }, - "pokedex_id": 430, - "name": "Honchkrow", "default_form_id": "858", "types": [ "Dark", @@ -24316,22 +25766,25 @@ "default_form": "Normal" }, "431": { + "name": "Glameow", + "pokedex_id": 431, "forms": { "1757": { "form": "Normal", + "form_id": 1757, "proto": "GLAMEOW_NORMAL" }, "1758": { "form": "Shadow", + "form_id": 1758, "proto": "GLAMEOW_SHADOW" }, "1759": { "form": "Purified", + "form_id": 1759, "proto": "GLAMEOW_PURIFIED" } }, - "pokedex_id": 431, - "name": "Glameow", "default_form_id": "1757", "types": [ "Normal" @@ -24357,7 +25810,7 @@ "evolutions": [ { "evolution": "Purugly", - "evolution_id": "432", + "evolution_id": 432, "candy_cost": 50 } ], @@ -24372,22 +25825,25 @@ "default_form": "Normal" }, "432": { + "name": "Purugly", + "pokedex_id": 432, "forms": { "1760": { "form": "Normal", + "form_id": 1760, "proto": "PURUGLY_NORMAL" }, "1761": { "form": "Shadow", + "form_id": 1761, "proto": "PURUGLY_SHADOW" }, "1762": { "form": "Purified", + "form_id": 1762, "proto": "PURUGLY_PURIFIED" } }, - "pokedex_id": 432, - "name": "Purugly", "default_form_id": "1760", "types": [ "Normal" @@ -24422,22 +25878,25 @@ "default_form": "Normal" }, "433": { + "name": "Chingling", + "pokedex_id": 433, "forms": { "1763": { "form": "Normal", + "form_id": 1763, "proto": "CHINGLING_NORMAL" }, "1764": { "form": "Shadow", + "form_id": 1764, "proto": "CHINGLING_SHADOW" }, "1765": { "form": "Purified", + "form_id": 1765, "proto": "CHINGLING_PURIFIED" } }, - "pokedex_id": 433, - "name": "Chingling", "default_form_id": "1763", "types": [ "Psychic" @@ -24463,7 +25922,7 @@ "evolutions": [ { "evolution": "Chimecho", - "evolution_id": "358", + "evolution_id": 358, "candy_cost": 50 } ], @@ -24478,22 +25937,25 @@ "default_form": "Normal" }, "434": { + "name": "Stunky", + "pokedex_id": 434, "forms": { "791": { "form": "Normal", + "form_id": 791, "proto": "STUNKY_NORMAL" }, "792": { "form": "Shadow", + "form_id": 792, "proto": "STUNKY_SHADOW" }, "793": { "form": "Purified", + "form_id": 793, "proto": "STUNKY_PURIFIED" } }, - "pokedex_id": 434, - "name": "Stunky", "default_form_id": "791", "types": [ "Poison", @@ -24520,7 +25982,7 @@ "evolutions": [ { "evolution": "Skuntank", - "evolution_id": "435", + "evolution_id": 435, "candy_cost": 50 } ], @@ -24535,22 +25997,25 @@ "default_form": "Normal" }, "435": { + "name": "Skuntank", + "pokedex_id": 435, "forms": { "794": { "form": "Normal", + "form_id": 794, "proto": "SKUNTANK_NORMAL" }, "795": { "form": "Shadow", + "form_id": 795, "proto": "SKUNTANK_SHADOW" }, "796": { "form": "Purified", + "form_id": 796, "proto": "SKUNTANK_PURIFIED" } }, - "pokedex_id": 435, - "name": "Skuntank", "default_form_id": "794", "types": [ "Poison", @@ -24586,22 +26051,25 @@ "default_form": "Normal" }, "436": { + "name": "Bronzor", + "pokedex_id": 436, "forms": { "1766": { "form": "Normal", + "form_id": 1766, "proto": "BRONZOR_NORMAL" }, "1767": { "form": "Shadow", + "form_id": 1767, "proto": "BRONZOR_SHADOW" }, "1768": { "form": "Purified", + "form_id": 1768, "proto": "BRONZOR_PURIFIED" } }, - "pokedex_id": 436, - "name": "Bronzor", "default_form_id": "1766", "types": [ "Steel", @@ -24628,7 +26096,7 @@ "evolutions": [ { "evolution": "Bronzong", - "evolution_id": "437", + "evolution_id": 437, "candy_cost": 50 } ], @@ -24643,22 +26111,25 @@ "default_form": "Normal" }, "437": { + "name": "Bronzong", + "pokedex_id": 437, "forms": { "1769": { "form": "Normal", + "form_id": 1769, "proto": "BRONZONG_NORMAL" }, "1770": { "form": "Shadow", + "form_id": 1770, "proto": "BRONZONG_SHADOW" }, "1771": { "form": "Purified", + "form_id": 1771, "proto": "BRONZONG_PURIFIED" } }, - "pokedex_id": 437, - "name": "Bronzong", "default_form_id": "1769", "types": [ "Steel", @@ -24696,22 +26167,25 @@ "default_form": "Normal" }, "438": { + "name": "Bonsly", + "pokedex_id": 438, "forms": { "1772": { "form": "Normal", + "form_id": 1772, "proto": "BONSLY_NORMAL" }, "1773": { "form": "Shadow", + "form_id": 1773, "proto": "BONSLY_SHADOW" }, "1774": { "form": "Purified", + "form_id": 1774, "proto": "BONSLY_PURIFIED" } }, - "pokedex_id": 438, - "name": "Bonsly", "default_form_id": "1772", "types": [ "Rock" @@ -24737,7 +26211,7 @@ "evolutions": [ { "evolution": "Sudowoodo", - "evolution_id": "185", + "evolution_id": 185, "candy_cost": 50 } ], @@ -24752,23 +26226,9 @@ "default_form": "Normal" }, "439": { - "forms": { - "1775": { - "form": "Normal", - "proto": "MIME_JR_NORMAL" - }, - "1776": { - "form": "Shadow", - "proto": "MIME_JR_SHADOW" - }, - "1777": { - "form": "Purified", - "proto": "MIME_JR_PURIFIED" - } - }, - "pokedex_id": 439, "name": "Mime Jr", - "default_form_id": "1775", + "pokedex_id": 439, + "forms": {}, "types": [ "Psychic", "Fairy" @@ -24794,7 +26254,7 @@ "evolutions": [ { "evolution": "Mr Mime", - "evolution_id": "122", + "evolution_id": 122, "candy_cost": 50 } ], @@ -24805,26 +26265,28 @@ "buddy_distance": 5, "third_move_stardust": 10000, "third_move_candy": 25, - "gym_defender_eligible": true, - "default_form": "Normal" + "gym_defender_eligible": true }, "440": { + "name": "Happiny", + "pokedex_id": 440, "forms": { "1778": { "form": "Normal", + "form_id": 1778, "proto": "HAPPINY_NORMAL" }, "1779": { "form": "Shadow", + "form_id": 1779, "proto": "HAPPINY_SHADOW" }, "1780": { "form": "Purified", + "form_id": 1780, "proto": "HAPPINY_PURIFIED" } }, - "pokedex_id": 440, - "name": "Happiny", "default_form_id": "1778", "types": [ "Normal" @@ -24848,7 +26310,7 @@ "evolutions": [ { "evolution": "Chansey", - "evolution_id": "113", + "evolution_id": 113, "candy_cost": 25 } ], @@ -24863,22 +26325,25 @@ "default_form": "Normal" }, "441": { + "name": "Chatot", + "pokedex_id": 441, "forms": { "1781": { "form": "Normal", + "form_id": 1781, "proto": "CHATOT_NORMAL" }, "1782": { "form": "Shadow", + "form_id": 1782, "proto": "CHATOT_SHADOW" }, "1783": { "form": "Purified", + "form_id": 1783, "proto": "CHATOT_PURIFIED" } }, - "pokedex_id": 441, - "name": "Chatot", "default_form_id": "1781", "types": [ "Normal", @@ -24914,22 +26379,25 @@ "default_form": "Normal" }, "442": { + "name": "Spiritomb", + "pokedex_id": 442, "forms": { "1784": { "form": "Normal", + "form_id": 1784, "proto": "SPIRITOMB_NORMAL" }, "1785": { "form": "Shadow", + "form_id": 1785, "proto": "SPIRITOMB_SHADOW" }, "1786": { "form": "Purified", + "form_id": 1786, "proto": "SPIRITOMB_PURIFIED" } }, - "pokedex_id": 442, - "name": "Spiritomb", "default_form_id": "1784", "types": [ "Ghost", @@ -24965,22 +26433,25 @@ "default_form": "Normal" }, "443": { + "name": "Gible", + "pokedex_id": 443, "forms": { "861": { "form": "Normal", + "form_id": 861, "proto": "GIBLE_NORMAL" }, "862": { "form": "Shadow", + "form_id": 862, "proto": "GIBLE_SHADOW" }, "863": { "form": "Purified", + "form_id": 863, "proto": "GIBLE_PURIFIED" } }, - "pokedex_id": 443, - "name": "Gible", "default_form_id": "861", "types": [ "Dragon", @@ -25007,7 +26478,7 @@ "evolutions": [ { "evolution": "Gabite", - "evolution_id": "444", + "evolution_id": 444, "candy_cost": 25 } ], @@ -25022,22 +26493,25 @@ "default_form": "Normal" }, "444": { + "name": "Gabite", + "pokedex_id": 444, "forms": { "864": { "form": "Normal", + "form_id": 864, "proto": "GABITE_NORMAL" }, "865": { "form": "Shadow", + "form_id": 865, "proto": "GABITE_SHADOW" }, "866": { "form": "Purified", + "form_id": 866, "proto": "GABITE_PURIFIED" } }, - "pokedex_id": 444, - "name": "Gabite", "default_form_id": "864", "types": [ "Dragon", @@ -25064,7 +26538,7 @@ "evolutions": [ { "evolution": "Garchomp", - "evolution_id": "445", + "evolution_id": 445, "candy_cost": 100 } ], @@ -25079,22 +26553,25 @@ "default_form": "Normal" }, "445": { + "name": "Garchomp", + "pokedex_id": 445, "forms": { "867": { "form": "Normal", + "form_id": 867, "proto": "GARCHOMP_NORMAL" }, "868": { "form": "Shadow", + "form_id": 868, "proto": "GARCHOMP_SHADOW" }, "869": { "form": "Purified", + "form_id": 869, "proto": "GARCHOMP_PURIFIED" } }, - "pokedex_id": 445, - "name": "Garchomp", "default_form_id": "867", "types": [ "Dragon", @@ -25131,22 +26608,25 @@ "default_form": "Normal" }, "446": { + "name": "Munchlax", + "pokedex_id": 446, "forms": { "1787": { "form": "Normal", + "form_id": 1787, "proto": "MUNCHLAX_NORMAL" }, "1788": { "form": "Shadow", + "form_id": 1788, "proto": "MUNCHLAX_SHADOW" }, "1789": { "form": "Purified", + "form_id": 1789, "proto": "MUNCHLAX_PURIFIED" } }, - "pokedex_id": 446, - "name": "Munchlax", "default_form_id": "1787", "types": [ "Normal" @@ -25172,7 +26652,7 @@ "evolutions": [ { "evolution": "Snorlax", - "evolution_id": "143", + "evolution_id": 143, "candy_cost": 50 } ], @@ -25187,22 +26667,25 @@ "default_form": "Normal" }, "447": { + "name": "Riolu", + "pokedex_id": 447, "forms": { "1790": { "form": "Normal", + "form_id": 1790, "proto": "RIOLU_NORMAL" }, "1791": { "form": "Shadow", + "form_id": 1791, "proto": "RIOLU_SHADOW" }, "1792": { "form": "Purified", + "form_id": 1792, "proto": "RIOLU_PURIFIED" } }, - "pokedex_id": 447, - "name": "Riolu", "default_form_id": "1790", "types": [ "Fighting" @@ -25227,7 +26710,7 @@ "evolutions": [ { "evolution": "Lucario", - "evolution_id": "448", + "evolution_id": 448, "candy_cost": 50 } ], @@ -25242,22 +26725,25 @@ "default_form": "Normal" }, "448": { + "name": "Lucario", + "pokedex_id": 448, "forms": { "1793": { "form": "Normal", + "form_id": 1793, "proto": "LUCARIO_NORMAL" }, "1794": { "form": "Shadow", + "form_id": 1794, "proto": "LUCARIO_SHADOW" }, "1795": { "form": "Purified", + "form_id": 1795, "proto": "LUCARIO_PURIFIED" } }, - "pokedex_id": 448, - "name": "Lucario", "default_form_id": "1793", "types": [ "Fighting", @@ -25295,22 +26781,25 @@ "default_form": "Normal" }, "449": { + "name": "Hippopotas", + "pokedex_id": 449, "forms": { "888": { "form": "Normal", + "form_id": 888, "proto": "HIPPOPOTAS_NORMAL" }, "889": { "form": "Shadow", + "form_id": 889, "proto": "HIPPOPOTAS_SHADOW" }, "890": { "form": "Purified", + "form_id": 890, "proto": "HIPPOPOTAS_PURIFIED" } }, - "pokedex_id": 449, - "name": "Hippopotas", "default_form_id": "888", "types": [ "Ground" @@ -25336,7 +26825,7 @@ "evolutions": [ { "evolution": "Hippowdon", - "evolution_id": "450", + "evolution_id": 450, "candy_cost": 50 } ], @@ -25351,22 +26840,25 @@ "default_form": "Normal" }, "450": { + "name": "Hippowdon", + "pokedex_id": 450, "forms": { "891": { "form": "Normal", + "form_id": 891, "proto": "HIPPOWDON_NORMAL" }, "892": { "form": "Shadow", + "form_id": 892, "proto": "HIPPOWDON_SHADOW" }, "893": { "form": "Purified", + "form_id": 893, "proto": "HIPPOWDON_PURIFIED" } }, - "pokedex_id": 450, - "name": "Hippowdon", "default_form_id": "891", "types": [ "Ground" @@ -25404,22 +26896,25 @@ "default_form": "Normal" }, "451": { + "name": "Skorupi", + "pokedex_id": 451, "forms": { "1796": { "form": "Normal", + "form_id": 1796, "proto": "SKORUPI_NORMAL" }, "1797": { "form": "Shadow", + "form_id": 1797, "proto": "SKORUPI_SHADOW" }, "1798": { "form": "Purified", + "form_id": 1798, "proto": "SKORUPI_PURIFIED" } }, - "pokedex_id": 451, - "name": "Skorupi", "default_form_id": "1796", "types": [ "Poison", @@ -25446,7 +26941,7 @@ "evolutions": [ { "evolution": "Drapion", - "evolution_id": "452", + "evolution_id": 452, "candy_cost": 50 } ], @@ -25461,22 +26956,25 @@ "default_form": "Normal" }, "452": { + "name": "Drapion", + "pokedex_id": 452, "forms": { "1799": { "form": "Normal", + "form_id": 1799, "proto": "DRAPION_NORMAL" }, "1800": { "form": "Shadow", + "form_id": 1800, "proto": "DRAPION_SHADOW" }, "1801": { "form": "Purified", + "form_id": 1801, "proto": "DRAPION_PURIFIED" } }, - "pokedex_id": 452, - "name": "Drapion", "default_form_id": "1799", "types": [ "Poison", @@ -25515,22 +27013,25 @@ "default_form": "Normal" }, "453": { + "name": "Croagunk", + "pokedex_id": 453, "forms": { "1802": { "form": "Normal", + "form_id": 1802, "proto": "CROAGUNK_NORMAL" }, "1803": { "form": "Shadow", + "form_id": 1803, "proto": "CROAGUNK_SHADOW" }, "1804": { "form": "Purified", + "form_id": 1804, "proto": "CROAGUNK_PURIFIED" } }, - "pokedex_id": 453, - "name": "Croagunk", "default_form_id": "1802", "types": [ "Poison", @@ -25557,7 +27058,7 @@ "evolutions": [ { "evolution": "Toxicroak", - "evolution_id": "454", + "evolution_id": 454, "candy_cost": 50 } ], @@ -25572,22 +27073,25 @@ "default_form": "Normal" }, "454": { + "name": "Toxicroak", + "pokedex_id": 454, "forms": { "1805": { "form": "Normal", + "form_id": 1805, "proto": "TOXICROAK_NORMAL" }, "1806": { "form": "Shadow", + "form_id": 1806, "proto": "TOXICROAK_SHADOW" }, "1807": { "form": "Purified", + "form_id": 1807, "proto": "TOXICROAK_PURIFIED" } }, - "pokedex_id": 454, - "name": "Toxicroak", "default_form_id": "1805", "types": [ "Poison", @@ -25623,22 +27127,25 @@ "default_form": "Normal" }, "455": { + "name": "Carnivine", + "pokedex_id": 455, "forms": { "1808": { "form": "Normal", + "form_id": 1808, "proto": "CARNIVINE_NORMAL" }, "1809": { "form": "Shadow", + "form_id": 1809, "proto": "CARNIVINE_SHADOW" }, "1810": { "form": "Purified", + "form_id": 1810, "proto": "CARNIVINE_PURIFIED" } }, - "pokedex_id": 455, - "name": "Carnivine", "default_form_id": "1808", "types": [ "Grass" @@ -25673,22 +27180,25 @@ "default_form": "Normal" }, "456": { + "name": "Finneon", + "pokedex_id": 456, "forms": { "1811": { "form": "Normal", + "form_id": 1811, "proto": "FINNEON_NORMAL" }, "1812": { "form": "Shadow", + "form_id": 1812, "proto": "FINNEON_SHADOW" }, "1813": { "form": "Purified", + "form_id": 1813, "proto": "FINNEON_PURIFIED" } }, - "pokedex_id": 456, - "name": "Finneon", "default_form_id": "1811", "types": [ "Water" @@ -25714,7 +27224,7 @@ "evolutions": [ { "evolution": "Lumineon", - "evolution_id": "457", + "evolution_id": 457, "candy_cost": 50 } ], @@ -25729,22 +27239,25 @@ "default_form": "Normal" }, "457": { + "name": "Lumineon", + "pokedex_id": 457, "forms": { "1814": { "form": "Normal", + "form_id": 1814, "proto": "LUMINEON_NORMAL" }, "1815": { "form": "Shadow", + "form_id": 1815, "proto": "LUMINEON_SHADOW" }, "1816": { "form": "Purified", + "form_id": 1816, "proto": "LUMINEON_PURIFIED" } }, - "pokedex_id": 457, - "name": "Lumineon", "default_form_id": "1814", "types": [ "Water" @@ -25779,22 +27292,25 @@ "default_form": "Normal" }, "458": { + "name": "Mantyke", + "pokedex_id": 458, "forms": { "1817": { "form": "Normal", + "form_id": 1817, "proto": "MANTYKE_NORMAL" }, "1818": { "form": "Shadow", + "form_id": 1818, "proto": "MANTYKE_SHADOW" }, "1819": { "form": "Purified", + "form_id": 1819, "proto": "MANTYKE_PURIFIED" } }, - "pokedex_id": 458, - "name": "Mantyke", "default_form_id": "1817", "types": [ "Water", @@ -25821,7 +27337,7 @@ "evolutions": [ { "evolution": "Mantine", - "evolution_id": "226", + "evolution_id": 226, "candy_cost": 50 } ], @@ -25836,22 +27352,25 @@ "default_form": "Normal" }, "459": { + "name": "Snover", + "pokedex_id": 459, "forms": { "932": { "form": "Normal", + "form_id": 932, "proto": "SNOVER_NORMAL" }, "933": { "form": "Shadow", + "form_id": 933, "proto": "SNOVER_SHADOW" }, "934": { "form": "Purified", + "form_id": 934, "proto": "SNOVER_PURIFIED" } }, - "pokedex_id": 459, - "name": "Snover", "default_form_id": "932", "types": [ "Grass", @@ -25878,7 +27397,7 @@ "evolutions": [ { "evolution": "Abomasnow", - "evolution_id": "460", + "evolution_id": 460, "candy_cost": 50 } ], @@ -25893,22 +27412,25 @@ "default_form": "Normal" }, "460": { + "name": "Abomasnow", + "pokedex_id": 460, "forms": { "935": { "form": "Normal", + "form_id": 935, "proto": "ABOMASNOW_NORMAL" }, "936": { "form": "Shadow", + "form_id": 936, "proto": "ABOMASNOW_SHADOW" }, "937": { "form": "Purified", + "form_id": 937, "proto": "ABOMASNOW_PURIFIED" } }, - "pokedex_id": 460, - "name": "Abomasnow", "default_form_id": "935", "types": [ "Grass", @@ -25944,22 +27466,25 @@ "default_form": "Normal" }, "461": { + "name": "Weavile", + "pokedex_id": 461, "forms": { "800": { "form": "Normal", + "form_id": 800, "proto": "WEAVILE_NORMAL" }, "801": { "form": "Shadow", + "form_id": 801, "proto": "WEAVILE_SHADOW" }, "802": { "form": "Purified", + "form_id": 802, "proto": "WEAVILE_PURIFIED" } }, - "pokedex_id": 461, - "name": "Weavile", "default_form_id": "800", "types": [ "Dark", @@ -25996,22 +27521,25 @@ "default_form": "Normal" }, "462": { + "name": "Magnezone", + "pokedex_id": 462, "forms": { "661": { "form": "Normal", + "form_id": 661, "proto": "MAGNEZONE_NORMAL" }, "662": { "form": "Shadow", + "form_id": 662, "proto": "MAGNEZONE_SHADOW" }, "663": { "form": "Purified", + "form_id": 663, "proto": "MAGNEZONE_PURIFIED" } }, - "pokedex_id": 462, - "name": "Magnezone", "default_form_id": "661", "types": [ "Electric", @@ -26048,22 +27576,25 @@ "default_form": "Normal" }, "463": { + "name": "Lickilicky", + "pokedex_id": 463, "forms": { "1820": { "form": "Normal", + "form_id": 1820, "proto": "LICKILICKY_NORMAL" }, "1821": { "form": "Shadow", + "form_id": 1821, "proto": "LICKILICKY_SHADOW" }, "1822": { "form": "Purified", + "form_id": 1822, "proto": "LICKILICKY_PURIFIED" } }, - "pokedex_id": 463, - "name": "Lickilicky", "default_form_id": "1820", "types": [ "Normal" @@ -26099,22 +27630,25 @@ "default_form": "Normal" }, "464": { + "name": "Rhyperior", + "pokedex_id": 464, "forms": { "852": { "form": "Normal", + "form_id": 852, "proto": "RHYPERIOR_NORMAL" }, "853": { "form": "Shadow", + "form_id": 853, "proto": "RHYPERIOR_SHADOW" }, "854": { "form": "Purified", + "form_id": 854, "proto": "RHYPERIOR_PURIFIED" } }, - "pokedex_id": 464, - "name": "Rhyperior", "default_form_id": "852", "types": [ "Ground", @@ -26152,22 +27686,25 @@ "default_form": "Normal" }, "465": { + "name": "Tangrowth", + "pokedex_id": 465, "forms": { "1823": { "form": "Normal", + "form_id": 1823, "proto": "TANGROWTH_NORMAL" }, "1824": { "form": "Shadow", + "form_id": 1824, "proto": "TANGROWTH_SHADOW" }, "1825": { "form": "Purified", + "form_id": 1825, "proto": "TANGROWTH_PURIFIED" } }, - "pokedex_id": 465, - "name": "Tangrowth", "default_form_id": "1823", "types": [ "Grass" @@ -26204,22 +27741,25 @@ "default_form": "Normal" }, "466": { + "name": "Electivire", + "pokedex_id": 466, "forms": { "643": { "form": "Normal", + "form_id": 643, "proto": "ELECTIVIRE_NORMAL" }, "644": { "form": "Shadow", + "form_id": 644, "proto": "ELECTIVIRE_SHADOW" }, "645": { "form": "Purified", + "form_id": 645, "proto": "ELECTIVIRE_PURIFIED" } }, - "pokedex_id": 466, - "name": "Electivire", "default_form_id": "643", "types": [ "Electric" @@ -26255,22 +27795,25 @@ "default_form": "Normal" }, "467": { + "name": "Magmortar", + "pokedex_id": 467, "forms": { "637": { "form": "Normal", + "form_id": 637, "proto": "MAGMORTAR_NORMAL" }, "638": { "form": "Shadow", + "form_id": 638, "proto": "MAGMORTAR_SHADOW" }, "639": { "form": "Purified", + "form_id": 639, "proto": "MAGMORTAR_PURIFIED" } }, - "pokedex_id": 467, - "name": "Magmortar", "default_form_id": "637", "types": [ "Fire" @@ -26306,22 +27849,25 @@ "default_form": "Normal" }, "468": { + "name": "Togekiss", + "pokedex_id": 468, "forms": { "1826": { "form": "Normal", + "form_id": 1826, "proto": "TOGEKISS_NORMAL" }, "1827": { "form": "Shadow", + "form_id": 1827, "proto": "TOGEKISS_SHADOW" }, "1828": { "form": "Purified", + "form_id": 1828, "proto": "TOGEKISS_PURIFIED" } }, - "pokedex_id": 468, - "name": "Togekiss", "default_form_id": "1826", "types": [ "Fairy", @@ -26359,22 +27905,25 @@ "default_form": "Normal" }, "469": { + "name": "Yanmega", + "pokedex_id": 469, "forms": { "1829": { "form": "Normal", + "form_id": 1829, "proto": "YANMEGA_NORMAL" }, "1830": { "form": "Shadow", + "form_id": 1830, "proto": "YANMEGA_SHADOW" }, "1831": { "form": "Purified", + "form_id": 1831, "proto": "YANMEGA_PURIFIED" } }, - "pokedex_id": 469, - "name": "Yanmega", "default_form_id": "1829", "types": [ "Bug", @@ -26410,22 +27959,25 @@ "default_form": "Normal" }, "470": { + "name": "Leafeon", + "pokedex_id": 470, "forms": { "1832": { "form": "Normal", + "form_id": 1832, "proto": "LEAFEON_NORMAL" }, "1833": { "form": "Shadow", + "form_id": 1833, "proto": "LEAFEON_SHADOW" }, "1834": { "form": "Purified", + "form_id": 1834, "proto": "LEAFEON_PURIFIED" } }, - "pokedex_id": 470, - "name": "Leafeon", "default_form_id": "1832", "types": [ "Grass" @@ -26460,22 +28012,25 @@ "default_form": "Normal" }, "471": { + "name": "Glaceon", + "pokedex_id": 471, "forms": { "1835": { "form": "Normal", + "form_id": 1835, "proto": "GLACEON_NORMAL" }, "1836": { "form": "Shadow", + "form_id": 1836, "proto": "GLACEON_SHADOW" }, "1837": { "form": "Purified", + "form_id": 1837, "proto": "GLACEON_PURIFIED" } }, - "pokedex_id": 471, - "name": "Glaceon", "default_form_id": "1835", "types": [ "Ice" @@ -26510,22 +28065,25 @@ "default_form": "Normal" }, "472": { + "name": "Gliscor", + "pokedex_id": 472, "forms": { "806": { "form": "Normal", + "form_id": 806, "proto": "GLISCOR_NORMAL" }, "807": { "form": "Shadow", + "form_id": 807, "proto": "GLISCOR_SHADOW" }, "808": { "form": "Purified", + "form_id": 808, "proto": "GLISCOR_PURIFIED" } }, - "pokedex_id": 472, - "name": "Gliscor", "default_form_id": "806", "types": [ "Ground", @@ -26562,22 +28120,25 @@ "default_form": "Normal" }, "473": { + "name": "Mamoswine", + "pokedex_id": 473, "forms": { "1838": { "form": "Normal", + "form_id": 1838, "proto": "MAMOSWINE_NORMAL" }, "1839": { "form": "Shadow", + "form_id": 1839, "proto": "MAMOSWINE_SHADOW" }, "1840": { "form": "Purified", + "form_id": 1840, "proto": "MAMOSWINE_PURIFIED" } }, - "pokedex_id": 473, - "name": "Mamoswine", "default_form_id": "1838", "types": [ "Ice", @@ -26613,23 +28174,9 @@ "default_form": "Normal" }, "474": { - "forms": { - "683": { - "form": "Normal", - "proto": "PORYGON_Z_NORMAL" - }, - "684": { - "form": "Shadow", - "proto": "PORYGON_Z_SHADOW" - }, - "685": { - "form": "Purified", - "proto": "PORYGON_Z_PURIFIED" - } - }, - "pokedex_id": 474, "name": "Porygon Z", - "default_form_id": "683", + "pokedex_id": 474, + "forms": {}, "types": [ "Normal" ], @@ -26661,26 +28208,28 @@ "buddy_distance": 3, "third_move_stardust": 50000, "third_move_candy": 50, - "gym_defender_eligible": true, - "default_form": "Normal" + "gym_defender_eligible": true }, "475": { + "name": "Gallade", + "pokedex_id": 475, "forms": { "301": { "form": "Normal", + "form_id": 301, "proto": "GALLADE_NORMAL" }, "302": { "form": "Shadow", + "form_id": 302, "proto": "GALLADE_SHADOW" }, "303": { "form": "Purified", + "form_id": 303, "proto": "GALLADE_PURIFIED" } }, - "pokedex_id": 475, - "name": "Gallade", "default_form_id": "301", "types": [ "Psychic", @@ -26717,22 +28266,25 @@ "default_form": "Normal" }, "476": { + "name": "Probopass", + "pokedex_id": 476, "forms": { "1841": { "form": "Normal", + "form_id": 1841, "proto": "PROBOPASS_NORMAL" }, "1842": { "form": "Shadow", + "form_id": 1842, "proto": "PROBOPASS_SHADOW" }, "1843": { "form": "Purified", + "form_id": 1843, "proto": "PROBOPASS_PURIFIED" } }, - "pokedex_id": 476, - "name": "Probopass", "default_form_id": "1841", "types": [ "Rock", @@ -26768,22 +28320,25 @@ "default_form": "Normal" }, "477": { + "name": "Dusknoir", + "pokedex_id": 477, "forms": { "920": { "form": "Normal", + "form_id": 920, "proto": "DUSKNOIR_NORMAL" }, "921": { "form": "Shadow", + "form_id": 921, "proto": "DUSKNOIR_SHADOW" }, "922": { "form": "Purified", + "form_id": 922, "proto": "DUSKNOIR_PURIFIED" } }, - "pokedex_id": 477, - "name": "Dusknoir", "default_form_id": "920", "types": [ "Ghost" @@ -26818,22 +28373,25 @@ "default_form": "Normal" }, "478": { + "name": "Froslass", + "pokedex_id": 478, "forms": { "1844": { "form": "Normal", + "form_id": 1844, "proto": "FROSLASS_NORMAL" }, "1845": { "form": "Shadow", + "form_id": 1845, "proto": "FROSLASS_SHADOW" }, "1846": { "form": "Purified", + "form_id": 1846, "proto": "FROSLASS_PURIFIED" } }, - "pokedex_id": 478, - "name": "Froslass", "default_form_id": "1844", "types": [ "Ice", @@ -26869,13 +28427,17 @@ "default_form": "Normal" }, "479": { + "name": "Rotom", + "pokedex_id": 479, "forms": { "81": { "form": "Normal", + "form_id": 81, "proto": "ROTOM_NORMAL" }, "82": { "form": "Frost", + "form_id": 82, "proto": "ROTOM_FROST", "attack": 204, "defense": 219, @@ -26892,6 +28454,7 @@ }, "83": { "form": "Fan", + "form_id": 83, "proto": "ROTOM_FAN", "attack": 204, "defense": 219, @@ -26907,6 +28470,7 @@ }, "84": { "form": "Mow", + "form_id": 84, "proto": "ROTOM_MOW", "attack": 204, "defense": 219, @@ -26918,6 +28482,7 @@ }, "85": { "form": "Wash", + "form_id": 85, "proto": "ROTOM_WASH", "attack": 204, "defense": 219, @@ -26934,6 +28499,7 @@ }, "86": { "form": "Heat", + "form_id": 86, "proto": "ROTOM_HEAT", "attack": 204, "defense": 219, @@ -26949,8 +28515,6 @@ ] } }, - "pokedex_id": 479, - "name": "Rotom", "default_form_id": "81", "types": [ "Electric", @@ -26986,22 +28550,25 @@ "default_form": "Normal" }, "480": { + "name": "Uxie", + "pokedex_id": 480, "forms": { "1847": { "form": "Normal", + "form_id": 1847, "proto": "UXIE_NORMAL" }, "1848": { "form": "Shadow", + "form_id": 1848, "proto": "UXIE_SHADOW" }, "1849": { "form": "Purified", + "form_id": 1849, "proto": "UXIE_PURIFIED" } }, - "pokedex_id": 480, - "name": "Uxie", "default_form_id": "1847", "types": [ "Psychic" @@ -27034,22 +28601,25 @@ "default_form": "Normal" }, "481": { + "name": "Mesprit", + "pokedex_id": 481, "forms": { "1850": { "form": "Normal", + "form_id": 1850, "proto": "MESPRIT_NORMAL" }, "1851": { "form": "Shadow", + "form_id": 1851, "proto": "MESPRIT_SHADOW" }, "1852": { "form": "Purified", + "form_id": 1852, "proto": "MESPRIT_PURIFIED" } }, - "pokedex_id": 481, - "name": "Mesprit", "default_form_id": "1850", "types": [ "Psychic" @@ -27082,22 +28652,25 @@ "default_form": "Normal" }, "482": { + "name": "Azelf", + "pokedex_id": 482, "forms": { "1853": { "form": "Normal", + "form_id": 1853, "proto": "AZELF_NORMAL" }, "1854": { "form": "Shadow", + "form_id": 1854, "proto": "AZELF_SHADOW" }, "1855": { "form": "Purified", + "form_id": 1855, "proto": "AZELF_PURIFIED" } }, - "pokedex_id": 482, - "name": "Azelf", "default_form_id": "1853", "types": [ "Psychic" @@ -27130,22 +28703,25 @@ "default_form": "Normal" }, "483": { + "name": "Dialga", + "pokedex_id": 483, "forms": { "1856": { "form": "Normal", + "form_id": 1856, "proto": "DIALGA_NORMAL" }, "1857": { "form": "Shadow", + "form_id": 1857, "proto": "DIALGA_SHADOW" }, "1858": { "form": "Purified", + "form_id": 1858, "proto": "DIALGA_PURIFIED" } }, - "pokedex_id": 483, - "name": "Dialga", "default_form_id": "1856", "types": [ "Steel", @@ -27180,22 +28756,25 @@ "default_form": "Normal" }, "484": { + "name": "Palkia", + "pokedex_id": 484, "forms": { "1859": { "form": "Normal", + "form_id": 1859, "proto": "PALKIA_NORMAL" }, "1860": { "form": "Shadow", + "form_id": 1860, "proto": "PALKIA_SHADOW" }, "1861": { "form": "Purified", + "form_id": 1861, "proto": "PALKIA_PURIFIED" } }, - "pokedex_id": 484, - "name": "Palkia", "default_form_id": "1859", "types": [ "Water", @@ -27231,22 +28810,25 @@ "default_form": "Normal" }, "485": { + "name": "Heatran", + "pokedex_id": 485, "forms": { "1862": { "form": "Normal", + "form_id": 1862, "proto": "HEATRAN_NORMAL" }, "1863": { "form": "Shadow", + "form_id": 1863, "proto": "HEATRAN_SHADOW" }, "1864": { "form": "Purified", + "form_id": 1864, "proto": "HEATRAN_PURIFIED" } }, - "pokedex_id": 485, - "name": "Heatran", "default_form_id": "1862", "types": [ "Fire", @@ -27282,22 +28864,25 @@ "default_form": "Normal" }, "486": { + "name": "Regigigas", + "pokedex_id": 486, "forms": { "1865": { "form": "Normal", + "form_id": 1865, "proto": "REGIGIGAS_NORMAL" }, "1866": { "form": "Shadow", + "form_id": 1866, "proto": "REGIGIGAS_SHADOW" }, "1867": { "form": "Purified", + "form_id": 1867, "proto": "REGIGIGAS_PURIFIED" } }, - "pokedex_id": 486, - "name": "Regigigas", "default_form_id": "1865", "types": [ "Normal" @@ -27331,13 +28916,17 @@ "default_form": "Normal" }, "487": { + "name": "Giratina", + "pokedex_id": 487, "forms": { "90": { "form": "Altered", + "form_id": 90, "proto": "GIRATINA_ALTERED" }, "91": { "form": "Origin", + "form_id": 91, "proto": "GIRATINA_ORIGIN", "attack": 225, "defense": 187, @@ -27356,19 +28945,20 @@ }, "1868": { "form": "Normal", + "form_id": 1868, "proto": "GIRATINA_NORMAL" }, "1869": { "form": "Shadow", + "form_id": 1869, "proto": "GIRATINA_SHADOW" }, "1870": { "form": "Purified", + "form_id": 1870, "proto": "GIRATINA_PURIFIED" } }, - "pokedex_id": 487, - "name": "Giratina", "default_form_id": "90", "types": [ "Ghost", @@ -27403,22 +28993,25 @@ "default_form": "Altered" }, "488": { + "name": "Cresselia", + "pokedex_id": 488, "forms": { "1871": { "form": "Normal", + "form_id": 1871, "proto": "CRESSELIA_NORMAL" }, "1872": { "form": "Shadow", + "form_id": 1872, "proto": "CRESSELIA_SHADOW" }, "1873": { "form": "Purified", + "form_id": 1873, "proto": "CRESSELIA_PURIFIED" } }, - "pokedex_id": 488, - "name": "Cresselia", "default_form_id": "1871", "types": [ "Psychic" @@ -27452,22 +29045,25 @@ "default_form": "Normal" }, "489": { + "name": "Phione", + "pokedex_id": 489, "forms": { "1874": { "form": "Normal", + "form_id": 1874, "proto": "PHIONE_NORMAL" }, "1875": { "form": "Shadow", + "form_id": 1875, "proto": "PHIONE_SHADOW" }, "1876": { "form": "Purified", + "form_id": 1876, "proto": "PHIONE_PURIFIED" } }, - "pokedex_id": 489, - "name": "Phione", "default_form_id": "1874", "types": [ "Water" @@ -27500,22 +29096,25 @@ "default_form": "Normal" }, "490": { + "name": "Manaphy", + "pokedex_id": 490, "forms": { "1877": { "form": "Normal", + "form_id": 1877, "proto": "MANAPHY_NORMAL" }, "1878": { "form": "Shadow", + "form_id": 1878, "proto": "MANAPHY_SHADOW" }, "1879": { "form": "Purified", + "form_id": 1879, "proto": "MANAPHY_PURIFIED" } }, - "pokedex_id": 490, - "name": "Manaphy", "default_form_id": "1877", "types": [ "Water" @@ -27548,22 +29147,25 @@ "default_form": "Normal" }, "491": { + "name": "Darkrai", + "pokedex_id": 491, "forms": { "1880": { "form": "Normal", + "form_id": 1880, "proto": "DARKRAI_NORMAL" }, "1881": { "form": "Shadow", + "form_id": 1881, "proto": "DARKRAI_SHADOW" }, "1882": { "form": "Purified", + "form_id": 1882, "proto": "DARKRAI_PURIFIED" } }, - "pokedex_id": 491, - "name": "Darkrai", "default_form_id": "1880", "types": [ "Dark" @@ -27596,9 +29198,12 @@ "default_form": "Normal" }, "492": { + "name": "Shaymin", + "pokedex_id": 492, "forms": { "92": { "form": "Sky", + "form_id": 92, "proto": "SHAYMIN_SKY", "attack": 261, "defense": 166, @@ -27612,23 +29217,25 @@ }, "93": { "form": "Land", + "form_id": 93, "proto": "SHAYMIN_LAND" }, "1883": { "form": "Normal", + "form_id": 1883, "proto": "SHAYMIN_NORMAL" }, "1884": { "form": "Shadow", + "form_id": 1884, "proto": "SHAYMIN_SHADOW" }, "1885": { "form": "Purified", + "form_id": 1885, "proto": "SHAYMIN_PURIFIED" } }, - "pokedex_id": 492, - "name": "Shaymin", "default_form_id": "92", "types": [ "Grass" @@ -27661,13 +29268,17 @@ "default_form": "Sky" }, "493": { + "name": "Arceus", + "pokedex_id": 493, "forms": { "100": { "form": "Normal", + "form_id": 100, "proto": "ARCEUS_NORMAL" }, "101": { "form": "Fighting", + "form_id": 101, "proto": "ARCEUS_FIGHTING", "types": [ "Fighting" @@ -27675,6 +29286,7 @@ }, "102": { "form": "Flying", + "form_id": 102, "proto": "ARCEUS_FLYING", "types": [ "Flying" @@ -27682,6 +29294,7 @@ }, "103": { "form": "Poison", + "form_id": 103, "proto": "ARCEUS_POISON", "types": [ "Poison" @@ -27689,6 +29302,7 @@ }, "104": { "form": "Ground", + "form_id": 104, "proto": "ARCEUS_GROUND", "types": [ "Ground" @@ -27696,6 +29310,7 @@ }, "105": { "form": "Rock", + "form_id": 105, "proto": "ARCEUS_ROCK", "types": [ "Rock" @@ -27703,6 +29318,7 @@ }, "106": { "form": "Bug", + "form_id": 106, "proto": "ARCEUS_BUG", "types": [ "Bug" @@ -27710,6 +29326,7 @@ }, "107": { "form": "Ghost", + "form_id": 107, "proto": "ARCEUS_GHOST", "types": [ "Ghost" @@ -27717,6 +29334,7 @@ }, "108": { "form": "Steel", + "form_id": 108, "proto": "ARCEUS_STEEL", "types": [ "Steel" @@ -27724,6 +29342,7 @@ }, "109": { "form": "Fire", + "form_id": 109, "proto": "ARCEUS_FIRE", "types": [ "Fire" @@ -27731,6 +29350,7 @@ }, "110": { "form": "Water", + "form_id": 110, "proto": "ARCEUS_WATER", "types": [ "Water" @@ -27738,6 +29358,7 @@ }, "111": { "form": "Grass", + "form_id": 111, "proto": "ARCEUS_GRASS", "types": [ "Grass" @@ -27745,6 +29366,7 @@ }, "112": { "form": "Electric", + "form_id": 112, "proto": "ARCEUS_ELECTRIC", "types": [ "Electric" @@ -27752,6 +29374,7 @@ }, "113": { "form": "Psychic", + "form_id": 113, "proto": "ARCEUS_PSYCHIC", "types": [ "Psychic" @@ -27759,6 +29382,7 @@ }, "114": { "form": "Ice", + "form_id": 114, "proto": "ARCEUS_ICE", "types": [ "Ice" @@ -27766,6 +29390,7 @@ }, "115": { "form": "Dragon", + "form_id": 115, "proto": "ARCEUS_DRAGON", "types": [ "Dragon" @@ -27773,6 +29398,7 @@ }, "116": { "form": "Dark", + "form_id": 116, "proto": "ARCEUS_DARK", "types": [ "Dark" @@ -27780,14 +29406,13 @@ }, "117": { "form": "Fairy", + "form_id": 117, "proto": "ARCEUS_FAIRY", "types": [ "Fairy" ] } }, - "pokedex_id": 493, - "name": "Arceus", "default_form_id": "100", "types": [ "Normal" @@ -27820,22 +29445,25 @@ "default_form": "Normal" }, "494": { + "name": "Victini", + "pokedex_id": 494, "forms": { "1886": { "form": "Normal", + "form_id": 1886, "proto": "VICTINI_NORMAL" }, "1887": { "form": "Shadow", + "form_id": 1887, "proto": "VICTINI_SHADOW" }, "1888": { "form": "Purified", + "form_id": 1888, "proto": "VICTINI_PURIFIED" } }, - "pokedex_id": 494, - "name": "Victini", "default_form_id": "1886", "types": [ "Psychic", @@ -27870,22 +29498,25 @@ "default_form": "Normal" }, "495": { + "name": "Snivy", + "pokedex_id": 495, "forms": { "1889": { "form": "Normal", + "form_id": 1889, "proto": "SNIVY_NORMAL" }, "1890": { "form": "Shadow", + "form_id": 1890, "proto": "SNIVY_SHADOW" }, "1891": { "form": "Purified", + "form_id": 1891, "proto": "SNIVY_PURIFIED" } }, - "pokedex_id": 495, - "name": "Snivy", "default_form_id": "1889", "types": [ "Grass" @@ -27911,7 +29542,7 @@ "evolutions": [ { "evolution": "Servine", - "evolution_id": "496", + "evolution_id": 496, "candy_cost": 25 } ], @@ -27926,22 +29557,25 @@ "default_form": "Normal" }, "496": { + "name": "Servine", + "pokedex_id": 496, "forms": { "1892": { "form": "Normal", + "form_id": 1892, "proto": "SERVINE_NORMAL" }, "1893": { "form": "Shadow", + "form_id": 1893, "proto": "SERVINE_SHADOW" }, "1894": { "form": "Purified", + "form_id": 1894, "proto": "SERVINE_PURIFIED" } }, - "pokedex_id": 496, - "name": "Servine", "default_form_id": "1892", "types": [ "Grass" @@ -27967,7 +29601,7 @@ "evolutions": [ { "evolution": "Serperior", - "evolution_id": "497", + "evolution_id": 497, "candy_cost": 100 } ], @@ -27982,22 +29616,25 @@ "default_form": "Normal" }, "497": { + "name": "Serperior", + "pokedex_id": 497, "forms": { "1895": { "form": "Normal", + "form_id": 1895, "proto": "SERPERIOR_NORMAL" }, "1896": { "form": "Shadow", + "form_id": 1896, "proto": "SERPERIOR_SHADOW" }, "1897": { "form": "Purified", + "form_id": 1897, "proto": "SERPERIOR_PURIFIED" } }, - "pokedex_id": 497, - "name": "Serperior", "default_form_id": "1895", "types": [ "Grass" @@ -28032,22 +29669,25 @@ "default_form": "Normal" }, "498": { + "name": "Tepig", + "pokedex_id": 498, "forms": { "1898": { "form": "Normal", + "form_id": 1898, "proto": "TEPIG_NORMAL" }, "1899": { "form": "Shadow", + "form_id": 1899, "proto": "TEPIG_SHADOW" }, "1900": { "form": "Purified", + "form_id": 1900, "proto": "TEPIG_PURIFIED" } }, - "pokedex_id": 498, - "name": "Tepig", "default_form_id": "1898", "types": [ "Fire" @@ -28073,7 +29713,7 @@ "evolutions": [ { "evolution": "Pignite", - "evolution_id": "499", + "evolution_id": 499, "candy_cost": 25 } ], @@ -28088,22 +29728,25 @@ "default_form": "Normal" }, "499": { + "name": "Pignite", + "pokedex_id": 499, "forms": { "1901": { "form": "Normal", + "form_id": 1901, "proto": "PIGNITE_NORMAL" }, "1902": { "form": "Shadow", + "form_id": 1902, "proto": "PIGNITE_SHADOW" }, "1903": { "form": "Purified", + "form_id": 1903, "proto": "PIGNITE_PURIFIED" } }, - "pokedex_id": 499, - "name": "Pignite", "default_form_id": "1901", "types": [ "Fire", @@ -28130,7 +29773,7 @@ "evolutions": [ { "evolution": "Emboar", - "evolution_id": "500", + "evolution_id": 500, "candy_cost": 100 } ], @@ -28145,22 +29788,25 @@ "default_form": "Normal" }, "500": { + "name": "Emboar", + "pokedex_id": 500, "forms": { "1904": { "form": "Normal", + "form_id": 1904, "proto": "EMBOAR_NORMAL" }, "1905": { "form": "Shadow", + "form_id": 1905, "proto": "EMBOAR_SHADOW" }, "1906": { "form": "Purified", + "form_id": 1906, "proto": "EMBOAR_PURIFIED" } }, - "pokedex_id": 500, - "name": "Emboar", "default_form_id": "1904", "types": [ "Fire", @@ -28196,22 +29842,25 @@ "default_form": "Normal" }, "501": { + "name": "Oshawott", + "pokedex_id": 501, "forms": { "1907": { "form": "Normal", + "form_id": 1907, "proto": "OSHAWOTT_NORMAL" }, "1908": { "form": "Shadow", + "form_id": 1908, "proto": "OSHAWOTT_SHADOW" }, "1909": { "form": "Purified", + "form_id": 1909, "proto": "OSHAWOTT_PURIFIED" } }, - "pokedex_id": 501, - "name": "Oshawott", "default_form_id": "1907", "types": [ "Water" @@ -28237,7 +29886,7 @@ "evolutions": [ { "evolution": "Dewott", - "evolution_id": "502", + "evolution_id": 502, "candy_cost": 25 } ], @@ -28252,22 +29901,25 @@ "default_form": "Normal" }, "502": { + "name": "Dewott", + "pokedex_id": 502, "forms": { "1910": { "form": "Normal", + "form_id": 1910, "proto": "DEWOTT_NORMAL" }, "1911": { "form": "Shadow", + "form_id": 1911, "proto": "DEWOTT_SHADOW" }, "1912": { "form": "Purified", + "form_id": 1912, "proto": "DEWOTT_PURIFIED" } }, - "pokedex_id": 502, - "name": "Dewott", "default_form_id": "1910", "types": [ "Water" @@ -28293,7 +29945,7 @@ "evolutions": [ { "evolution": "Samurott", - "evolution_id": "503", + "evolution_id": 503, "candy_cost": 100 } ], @@ -28308,22 +29960,25 @@ "default_form": "Normal" }, "503": { + "name": "Samurott", + "pokedex_id": 503, "forms": { "1913": { "form": "Normal", + "form_id": 1913, "proto": "SAMUROTT_NORMAL" }, "1914": { "form": "Shadow", + "form_id": 1914, "proto": "SAMUROTT_SHADOW" }, "1915": { "form": "Purified", + "form_id": 1915, "proto": "SAMUROTT_PURIFIED" } }, - "pokedex_id": 503, - "name": "Samurott", "default_form_id": "1913", "types": [ "Water" @@ -28358,22 +30013,25 @@ "default_form": "Normal" }, "504": { + "name": "Patrat", + "pokedex_id": 504, "forms": { "1916": { "form": "Normal", + "form_id": 1916, "proto": "PATRAT_NORMAL" }, "1917": { "form": "Shadow", + "form_id": 1917, "proto": "PATRAT_SHADOW" }, "1918": { "form": "Purified", + "form_id": 1918, "proto": "PATRAT_PURIFIED" } }, - "pokedex_id": 504, - "name": "Patrat", "default_form_id": "1916", "types": [ "Normal" @@ -28399,7 +30057,7 @@ "evolutions": [ { "evolution": "Watchog", - "evolution_id": "505", + "evolution_id": 505, "candy_cost": 50 } ], @@ -28414,22 +30072,25 @@ "default_form": "Normal" }, "505": { + "name": "Watchog", + "pokedex_id": 505, "forms": { "1919": { "form": "Normal", + "form_id": 1919, "proto": "WATCHOG_NORMAL" }, "1920": { "form": "Shadow", + "form_id": 1920, "proto": "WATCHOG_SHADOW" }, "1921": { "form": "Purified", + "form_id": 1921, "proto": "WATCHOG_PURIFIED" } }, - "pokedex_id": 505, - "name": "Watchog", "default_form_id": "1919", "types": [ "Normal" @@ -28464,22 +30125,25 @@ "default_form": "Normal" }, "506": { + "name": "Lillipup", + "pokedex_id": 506, "forms": { "1922": { "form": "Normal", + "form_id": 1922, "proto": "LILLIPUP_NORMAL" }, "1923": { "form": "Shadow", + "form_id": 1923, "proto": "LILLIPUP_SHADOW" }, "1924": { "form": "Purified", + "form_id": 1924, "proto": "LILLIPUP_PURIFIED" } }, - "pokedex_id": 506, - "name": "Lillipup", "default_form_id": "1922", "types": [ "Normal" @@ -28505,7 +30169,7 @@ "evolutions": [ { "evolution": "Herdier", - "evolution_id": "507", + "evolution_id": 507, "candy_cost": 25 } ], @@ -28520,22 +30184,25 @@ "default_form": "Normal" }, "507": { + "name": "Herdier", + "pokedex_id": 507, "forms": { "1925": { "form": "Normal", + "form_id": 1925, "proto": "HERDIER_NORMAL" }, "1926": { "form": "Shadow", + "form_id": 1926, "proto": "HERDIER_SHADOW" }, "1927": { "form": "Purified", + "form_id": 1927, "proto": "HERDIER_PURIFIED" } }, - "pokedex_id": 507, - "name": "Herdier", "default_form_id": "1925", "types": [ "Normal" @@ -28561,7 +30228,7 @@ "evolutions": [ { "evolution": "Stoutland", - "evolution_id": "508", + "evolution_id": 508, "candy_cost": 100 } ], @@ -28576,22 +30243,25 @@ "default_form": "Normal" }, "508": { + "name": "Stoutland", + "pokedex_id": 508, "forms": { "1928": { "form": "Normal", + "form_id": 1928, "proto": "STOUTLAND_NORMAL" }, "1929": { "form": "Shadow", + "form_id": 1929, "proto": "STOUTLAND_SHADOW" }, "1930": { "form": "Purified", + "form_id": 1930, "proto": "STOUTLAND_PURIFIED" } }, - "pokedex_id": 508, - "name": "Stoutland", "default_form_id": "1928", "types": [ "Normal" @@ -28627,22 +30297,25 @@ "default_form": "Normal" }, "509": { + "name": "Purrloin", + "pokedex_id": 509, "forms": { "1931": { "form": "Normal", + "form_id": 1931, "proto": "PURRLOIN_NORMAL" }, "1932": { "form": "Shadow", + "form_id": 1932, "proto": "PURRLOIN_SHADOW" }, "1933": { "form": "Purified", + "form_id": 1933, "proto": "PURRLOIN_PURIFIED" } }, - "pokedex_id": 509, - "name": "Purrloin", "default_form_id": "1931", "types": [ "Dark" @@ -28668,7 +30341,7 @@ "evolutions": [ { "evolution": "Liepard", - "evolution_id": "510", + "evolution_id": 510, "candy_cost": 50 } ], @@ -28683,22 +30356,25 @@ "default_form": "Normal" }, "510": { + "name": "Liepard", + "pokedex_id": 510, "forms": { "1934": { "form": "Normal", + "form_id": 1934, "proto": "LIEPARD_NORMAL" }, "1935": { "form": "Shadow", + "form_id": 1935, "proto": "LIEPARD_SHADOW" }, "1936": { "form": "Purified", + "form_id": 1936, "proto": "LIEPARD_PURIFIED" } }, - "pokedex_id": 510, - "name": "Liepard", "default_form_id": "1934", "types": [ "Dark" @@ -28733,22 +30409,25 @@ "default_form": "Normal" }, "511": { + "name": "Pansage", + "pokedex_id": 511, "forms": { "1937": { "form": "Normal", + "form_id": 1937, "proto": "PANSAGE_NORMAL" }, "1938": { "form": "Shadow", + "form_id": 1938, "proto": "PANSAGE_SHADOW" }, "1939": { "form": "Purified", + "form_id": 1939, "proto": "PANSAGE_PURIFIED" } }, - "pokedex_id": 511, - "name": "Pansage", "default_form_id": "1937", "types": [ "Grass" @@ -28774,7 +30453,7 @@ "evolutions": [ { "evolution": "Simisage", - "evolution_id": "512", + "evolution_id": 512, "candy_cost": 50, "evolution_item": "Gen5 Evolution Stone" } @@ -28790,22 +30469,25 @@ "default_form": "Normal" }, "512": { + "name": "Simisage", + "pokedex_id": 512, "forms": { "1940": { "form": "Normal", + "form_id": 1940, "proto": "SIMISAGE_NORMAL" }, "1941": { "form": "Shadow", + "form_id": 1941, "proto": "SIMISAGE_SHADOW" }, "1942": { "form": "Purified", + "form_id": 1942, "proto": "SIMISAGE_PURIFIED" } }, - "pokedex_id": 512, - "name": "Simisage", "default_form_id": "1940", "types": [ "Grass" @@ -28840,22 +30522,25 @@ "default_form": "Normal" }, "513": { + "name": "Pansear", + "pokedex_id": 513, "forms": { "1943": { "form": "Normal", + "form_id": 1943, "proto": "PANSEAR_NORMAL" }, "1944": { "form": "Shadow", + "form_id": 1944, "proto": "PANSEAR_SHADOW" }, "1945": { "form": "Purified", + "form_id": 1945, "proto": "PANSEAR_PURIFIED" } }, - "pokedex_id": 513, - "name": "Pansear", "default_form_id": "1943", "types": [ "Fire" @@ -28881,7 +30566,7 @@ "evolutions": [ { "evolution": "Simisear", - "evolution_id": "514", + "evolution_id": 514, "candy_cost": 50, "evolution_item": "Gen5 Evolution Stone" } @@ -28897,22 +30582,25 @@ "default_form": "Normal" }, "514": { + "name": "Simisear", + "pokedex_id": 514, "forms": { "1946": { "form": "Normal", + "form_id": 1946, "proto": "SIMISEAR_NORMAL" }, "1947": { "form": "Shadow", + "form_id": 1947, "proto": "SIMISEAR_SHADOW" }, "1948": { "form": "Purified", + "form_id": 1948, "proto": "SIMISEAR_PURIFIED" } }, - "pokedex_id": 514, - "name": "Simisear", "default_form_id": "1946", "types": [ "Fire" @@ -28947,22 +30635,25 @@ "default_form": "Normal" }, "515": { + "name": "Panpour", + "pokedex_id": 515, "forms": { "1949": { "form": "Normal", + "form_id": 1949, "proto": "PANPOUR_NORMAL" }, "1950": { "form": "Shadow", + "form_id": 1950, "proto": "PANPOUR_SHADOW" }, "1951": { "form": "Purified", + "form_id": 1951, "proto": "PANPOUR_PURIFIED" } }, - "pokedex_id": 515, - "name": "Panpour", "default_form_id": "1949", "types": [ "Water" @@ -28988,7 +30679,7 @@ "evolutions": [ { "evolution": "Simipour", - "evolution_id": "516", + "evolution_id": 516, "candy_cost": 50, "evolution_item": "Gen5 Evolution Stone" } @@ -29004,22 +30695,25 @@ "default_form": "Normal" }, "516": { + "name": "Simipour", + "pokedex_id": 516, "forms": { "1952": { "form": "Normal", + "form_id": 1952, "proto": "SIMIPOUR_NORMAL" }, "1953": { "form": "Shadow", + "form_id": 1953, "proto": "SIMIPOUR_SHADOW" }, "1954": { "form": "Purified", + "form_id": 1954, "proto": "SIMIPOUR_PURIFIED" } }, - "pokedex_id": 516, - "name": "Simipour", "default_form_id": "1952", "types": [ "Water" @@ -29054,22 +30748,25 @@ "default_form": "Normal" }, "517": { + "name": "Munna", + "pokedex_id": 517, "forms": { "1955": { "form": "Normal", + "form_id": 1955, "proto": "MUNNA_NORMAL" }, "1956": { "form": "Shadow", + "form_id": 1956, "proto": "MUNNA_SHADOW" }, "1957": { "form": "Purified", + "form_id": 1957, "proto": "MUNNA_PURIFIED" } }, - "pokedex_id": 517, - "name": "Munna", "default_form_id": "1955", "types": [ "Psychic" @@ -29095,7 +30792,7 @@ "evolutions": [ { "evolution": "Musharna", - "evolution_id": "518", + "evolution_id": 518, "candy_cost": 50, "evolution_item": "Gen5 Evolution Stone" } @@ -29111,22 +30808,25 @@ "default_form": "Normal" }, "518": { + "name": "Musharna", + "pokedex_id": 518, "forms": { "1958": { "form": "Normal", + "form_id": 1958, "proto": "MUSHARNA_NORMAL" }, "1959": { "form": "Shadow", + "form_id": 1959, "proto": "MUSHARNA_SHADOW" }, "1960": { "form": "Purified", + "form_id": 1960, "proto": "MUSHARNA_PURIFIED" } }, - "pokedex_id": 518, - "name": "Musharna", "default_form_id": "1958", "types": [ "Psychic" @@ -29161,22 +30861,25 @@ "default_form": "Normal" }, "519": { + "name": "Pidove", + "pokedex_id": 519, "forms": { "1961": { "form": "Normal", + "form_id": 1961, "proto": "PIDOVE_NORMAL" }, "1962": { "form": "Shadow", + "form_id": 1962, "proto": "PIDOVE_SHADOW" }, "1963": { "form": "Purified", + "form_id": 1963, "proto": "PIDOVE_PURIFIED" } }, - "pokedex_id": 519, - "name": "Pidove", "default_form_id": "1961", "types": [ "Normal", @@ -29203,7 +30906,7 @@ "evolutions": [ { "evolution": "Tranquill", - "evolution_id": "520", + "evolution_id": 520, "candy_cost": 12 } ], @@ -29218,22 +30921,25 @@ "default_form": "Normal" }, "520": { + "name": "Tranquill", + "pokedex_id": 520, "forms": { "1964": { "form": "Normal", + "form_id": 1964, "proto": "TRANQUILL_NORMAL" }, "1965": { "form": "Shadow", + "form_id": 1965, "proto": "TRANQUILL_SHADOW" }, "1966": { "form": "Purified", + "form_id": 1966, "proto": "TRANQUILL_PURIFIED" } }, - "pokedex_id": 520, - "name": "Tranquill", "default_form_id": "1964", "types": [ "Normal", @@ -29260,7 +30966,7 @@ "evolutions": [ { "evolution": "Unfezant", - "evolution_id": "521", + "evolution_id": 521, "candy_cost": 50 } ], @@ -29275,22 +30981,25 @@ "default_form": "Normal" }, "521": { + "name": "Unfezant", + "pokedex_id": 521, "forms": { "1967": { "form": "Normal", + "form_id": 1967, "proto": "UNFEZANT_NORMAL" }, "1968": { "form": "Shadow", + "form_id": 1968, "proto": "UNFEZANT_SHADOW" }, "1969": { "form": "Purified", + "form_id": 1969, "proto": "UNFEZANT_PURIFIED" } }, - "pokedex_id": 521, - "name": "Unfezant", "default_form_id": "1967", "types": [ "Normal", @@ -29326,22 +31035,25 @@ "default_form": "Normal" }, "522": { + "name": "Blitzle", + "pokedex_id": 522, "forms": { "1970": { "form": "Normal", + "form_id": 1970, "proto": "BLITZLE_NORMAL" }, "1971": { "form": "Shadow", + "form_id": 1971, "proto": "BLITZLE_SHADOW" }, "1972": { "form": "Purified", + "form_id": 1972, "proto": "BLITZLE_PURIFIED" } }, - "pokedex_id": 522, - "name": "Blitzle", "default_form_id": "1970", "types": [ "Electric" @@ -29367,7 +31079,7 @@ "evolutions": [ { "evolution": "Zebstrika", - "evolution_id": "523", + "evolution_id": 523, "candy_cost": 50 } ], @@ -29382,22 +31094,25 @@ "default_form": "Normal" }, "523": { + "name": "Zebstrika", + "pokedex_id": 523, "forms": { "1973": { "form": "Normal", + "form_id": 1973, "proto": "ZEBSTRIKA_NORMAL" }, "1974": { "form": "Shadow", + "form_id": 1974, "proto": "ZEBSTRIKA_SHADOW" }, "1975": { "form": "Purified", + "form_id": 1975, "proto": "ZEBSTRIKA_PURIFIED" } }, - "pokedex_id": 523, - "name": "Zebstrika", "default_form_id": "1973", "types": [ "Electric" @@ -29432,22 +31147,25 @@ "default_form": "Normal" }, "524": { + "name": "Roggenrola", + "pokedex_id": 524, "forms": { "1976": { "form": "Normal", + "form_id": 1976, "proto": "ROGGENROLA_NORMAL" }, "1977": { "form": "Shadow", + "form_id": 1977, "proto": "ROGGENROLA_SHADOW" }, "1978": { "form": "Purified", + "form_id": 1978, "proto": "ROGGENROLA_PURIFIED" } }, - "pokedex_id": 524, - "name": "Roggenrola", "default_form_id": "1976", "types": [ "Rock" @@ -29473,7 +31191,7 @@ "evolutions": [ { "evolution": "Boldore", - "evolution_id": "525", + "evolution_id": 525, "candy_cost": 50 } ], @@ -29488,22 +31206,25 @@ "default_form": "Normal" }, "525": { + "name": "Boldore", + "pokedex_id": 525, "forms": { "1979": { "form": "Normal", + "form_id": 1979, "proto": "BOLDORE_NORMAL" }, "1980": { "form": "Shadow", + "form_id": 1980, "proto": "BOLDORE_SHADOW" }, "1981": { "form": "Purified", + "form_id": 1981, "proto": "BOLDORE_PURIFIED" } }, - "pokedex_id": 525, - "name": "Boldore", "default_form_id": "1979", "types": [ "Rock" @@ -29529,7 +31250,7 @@ "evolutions": [ { "evolution": "Gigalith", - "evolution_id": "526", + "evolution_id": 526, "candy_cost": 200 } ], @@ -29544,22 +31265,25 @@ "default_form": "Normal" }, "526": { + "name": "Gigalith", + "pokedex_id": 526, "forms": { "1982": { "form": "Normal", + "form_id": 1982, "proto": "GIGALITH_NORMAL" }, "1983": { "form": "Shadow", + "form_id": 1983, "proto": "GIGALITH_SHADOW" }, "1984": { "form": "Purified", + "form_id": 1984, "proto": "GIGALITH_PURIFIED" } }, - "pokedex_id": 526, - "name": "Gigalith", "default_form_id": "1982", "types": [ "Rock" @@ -29595,22 +31319,25 @@ "default_form": "Normal" }, "527": { + "name": "Woobat", + "pokedex_id": 527, "forms": { "1985": { "form": "Normal", + "form_id": 1985, "proto": "WOOBAT_NORMAL" }, "1986": { "form": "Shadow", + "form_id": 1986, "proto": "WOOBAT_SHADOW" }, "1987": { "form": "Purified", + "form_id": 1987, "proto": "WOOBAT_PURIFIED" } }, - "pokedex_id": 527, - "name": "Woobat", "default_form_id": "1985", "types": [ "Psychic", @@ -29637,7 +31364,7 @@ "evolutions": [ { "evolution": "Swoobat", - "evolution_id": "528", + "evolution_id": 528, "candy_cost": 50 } ], @@ -29652,22 +31379,25 @@ "default_form": "Normal" }, "528": { + "name": "Swoobat", + "pokedex_id": 528, "forms": { "1988": { "form": "Normal", + "form_id": 1988, "proto": "SWOOBAT_NORMAL" }, "1989": { "form": "Shadow", + "form_id": 1989, "proto": "SWOOBAT_SHADOW" }, "1990": { "form": "Purified", + "form_id": 1990, "proto": "SWOOBAT_PURIFIED" } }, - "pokedex_id": 528, - "name": "Swoobat", "default_form_id": "1988", "types": [ "Psychic", @@ -29703,22 +31433,25 @@ "default_form": "Normal" }, "529": { + "name": "Drilbur", + "pokedex_id": 529, "forms": { "1991": { "form": "Normal", + "form_id": 1991, "proto": "DRILBUR_NORMAL" }, "1992": { "form": "Shadow", + "form_id": 1992, "proto": "DRILBUR_SHADOW" }, "1993": { "form": "Purified", + "form_id": 1993, "proto": "DRILBUR_PURIFIED" } }, - "pokedex_id": 529, - "name": "Drilbur", "default_form_id": "1991", "types": [ "Ground" @@ -29744,7 +31477,7 @@ "evolutions": [ { "evolution": "Excadrill", - "evolution_id": "530", + "evolution_id": 530, "candy_cost": 50 } ], @@ -29759,22 +31492,25 @@ "default_form": "Normal" }, "530": { + "name": "Excadrill", + "pokedex_id": 530, "forms": { "1994": { "form": "Normal", + "form_id": 1994, "proto": "EXCADRILL_NORMAL" }, "1995": { "form": "Shadow", + "form_id": 1995, "proto": "EXCADRILL_SHADOW" }, "1996": { "form": "Purified", + "form_id": 1996, "proto": "EXCADRILL_PURIFIED" } }, - "pokedex_id": 530, - "name": "Excadrill", "default_form_id": "1994", "types": [ "Ground", @@ -29811,22 +31547,25 @@ "default_form": "Normal" }, "531": { + "name": "Audino", + "pokedex_id": 531, "forms": { "1997": { "form": "Normal", + "form_id": 1997, "proto": "AUDINO_NORMAL" }, "1998": { "form": "Shadow", + "form_id": 1998, "proto": "AUDINO_SHADOW" }, "1999": { "form": "Purified", + "form_id": 1999, "proto": "AUDINO_PURIFIED" } }, - "pokedex_id": 531, - "name": "Audino", "default_form_id": "1997", "types": [ "Normal" @@ -29861,22 +31600,25 @@ "default_form": "Normal" }, "532": { + "name": "Timburr", + "pokedex_id": 532, "forms": { "2000": { "form": "Normal", + "form_id": 2000, "proto": "TIMBURR_NORMAL" }, "2001": { "form": "Shadow", + "form_id": 2001, "proto": "TIMBURR_SHADOW" }, "2002": { "form": "Purified", + "form_id": 2002, "proto": "TIMBURR_PURIFIED" } }, - "pokedex_id": 532, - "name": "Timburr", "default_form_id": "2000", "types": [ "Fighting" @@ -29902,7 +31644,7 @@ "evolutions": [ { "evolution": "Gurdurr", - "evolution_id": "533", + "evolution_id": 533, "candy_cost": 50 } ], @@ -29917,22 +31659,25 @@ "default_form": "Normal" }, "533": { + "name": "Gurdurr", + "pokedex_id": 533, "forms": { "2003": { "form": "Normal", + "form_id": 2003, "proto": "GURDURR_NORMAL" }, "2004": { "form": "Shadow", + "form_id": 2004, "proto": "GURDURR_SHADOW" }, "2005": { "form": "Purified", + "form_id": 2005, "proto": "GURDURR_PURIFIED" } }, - "pokedex_id": 533, - "name": "Gurdurr", "default_form_id": "2003", "types": [ "Fighting" @@ -29958,7 +31703,7 @@ "evolutions": [ { "evolution": "Conkeldurr", - "evolution_id": "534", + "evolution_id": 534, "candy_cost": 200 } ], @@ -29973,22 +31718,25 @@ "default_form": "Normal" }, "534": { + "name": "Conkeldurr", + "pokedex_id": 534, "forms": { "2006": { "form": "Normal", + "form_id": 2006, "proto": "CONKELDURR_NORMAL" }, "2007": { "form": "Shadow", + "form_id": 2007, "proto": "CONKELDURR_SHADOW" }, "2008": { "form": "Purified", + "form_id": 2008, "proto": "CONKELDURR_PURIFIED" } }, - "pokedex_id": 534, - "name": "Conkeldurr", "default_form_id": "2006", "types": [ "Fighting" @@ -30023,22 +31771,25 @@ "default_form": "Normal" }, "535": { + "name": "Tympole", + "pokedex_id": 535, "forms": { "2009": { "form": "Normal", + "form_id": 2009, "proto": "TYMPOLE_NORMAL" }, "2010": { "form": "Shadow", + "form_id": 2010, "proto": "TYMPOLE_SHADOW" }, "2011": { "form": "Purified", + "form_id": 2011, "proto": "TYMPOLE_PURIFIED" } }, - "pokedex_id": 535, - "name": "Tympole", "default_form_id": "2009", "types": [ "Water" @@ -30064,7 +31815,7 @@ "evolutions": [ { "evolution": "Palpitoad", - "evolution_id": "536", + "evolution_id": 536, "candy_cost": 25 } ], @@ -30079,22 +31830,25 @@ "default_form": "Normal" }, "536": { + "name": "Palpitoad", + "pokedex_id": 536, "forms": { "2012": { "form": "Normal", + "form_id": 2012, "proto": "PALPITOAD_NORMAL" }, "2013": { "form": "Shadow", + "form_id": 2013, "proto": "PALPITOAD_SHADOW" }, "2014": { "form": "Purified", + "form_id": 2014, "proto": "PALPITOAD_PURIFIED" } }, - "pokedex_id": 536, - "name": "Palpitoad", "default_form_id": "2012", "types": [ "Water", @@ -30121,7 +31875,7 @@ "evolutions": [ { "evolution": "Seismitoad", - "evolution_id": "537", + "evolution_id": 537, "candy_cost": 100 } ], @@ -30136,22 +31890,25 @@ "default_form": "Normal" }, "537": { + "name": "Seismitoad", + "pokedex_id": 537, "forms": { "2015": { "form": "Normal", + "form_id": 2015, "proto": "SEISMITOAD_NORMAL" }, "2016": { "form": "Shadow", + "form_id": 2016, "proto": "SEISMITOAD_SHADOW" }, "2017": { "form": "Purified", + "form_id": 2017, "proto": "SEISMITOAD_PURIFIED" } }, - "pokedex_id": 537, - "name": "Seismitoad", "default_form_id": "2015", "types": [ "Water", @@ -30187,22 +31944,25 @@ "default_form": "Normal" }, "538": { + "name": "Throh", + "pokedex_id": 538, "forms": { "2018": { "form": "Normal", + "form_id": 2018, "proto": "THROH_NORMAL" }, "2019": { "form": "Shadow", + "form_id": 2019, "proto": "THROH_SHADOW" }, "2020": { "form": "Purified", + "form_id": 2020, "proto": "THROH_PURIFIED" } }, - "pokedex_id": 538, - "name": "Throh", "default_form_id": "2018", "types": [ "Fighting" @@ -30237,22 +31997,25 @@ "default_form": "Normal" }, "539": { + "name": "Sawk", + "pokedex_id": 539, "forms": { "2021": { "form": "Normal", + "form_id": 2021, "proto": "SAWK_NORMAL" }, "2022": { "form": "Shadow", + "form_id": 2022, "proto": "SAWK_SHADOW" }, "2023": { "form": "Purified", + "form_id": 2023, "proto": "SAWK_PURIFIED" } }, - "pokedex_id": 539, - "name": "Sawk", "default_form_id": "2021", "types": [ "Fighting" @@ -30287,22 +32050,25 @@ "default_form": "Normal" }, "540": { + "name": "Sewaddle", + "pokedex_id": 540, "forms": { "2024": { "form": "Normal", + "form_id": 2024, "proto": "SEWADDLE_NORMAL" }, "2025": { "form": "Shadow", + "form_id": 2025, "proto": "SEWADDLE_SHADOW" }, "2026": { "form": "Purified", + "form_id": 2026, "proto": "SEWADDLE_PURIFIED" } }, - "pokedex_id": 540, - "name": "Sewaddle", "default_form_id": "2024", "types": [ "Bug", @@ -30329,7 +32095,7 @@ "evolutions": [ { "evolution": "Swadloon", - "evolution_id": "541", + "evolution_id": 541, "candy_cost": 25 } ], @@ -30344,22 +32110,25 @@ "default_form": "Normal" }, "541": { + "name": "Swadloon", + "pokedex_id": 541, "forms": { "2027": { "form": "Normal", + "form_id": 2027, "proto": "SWADLOON_NORMAL" }, "2028": { "form": "Shadow", + "form_id": 2028, "proto": "SWADLOON_SHADOW" }, "2029": { "form": "Purified", + "form_id": 2029, "proto": "SWADLOON_PURIFIED" } }, - "pokedex_id": 541, - "name": "Swadloon", "default_form_id": "2027", "types": [ "Bug", @@ -30386,7 +32155,7 @@ "evolutions": [ { "evolution": "Leavanny", - "evolution_id": "542", + "evolution_id": 542, "candy_cost": 100 } ], @@ -30401,22 +32170,25 @@ "default_form": "Normal" }, "542": { + "name": "Leavanny", + "pokedex_id": 542, "forms": { "2030": { "form": "Normal", + "form_id": 2030, "proto": "LEAVANNY_NORMAL" }, "2031": { "form": "Shadow", + "form_id": 2031, "proto": "LEAVANNY_SHADOW" }, "2032": { "form": "Purified", + "form_id": 2032, "proto": "LEAVANNY_PURIFIED" } }, - "pokedex_id": 542, - "name": "Leavanny", "default_form_id": "2030", "types": [ "Bug", @@ -30452,22 +32224,25 @@ "default_form": "Normal" }, "543": { + "name": "Venipede", + "pokedex_id": 543, "forms": { "2033": { "form": "Normal", + "form_id": 2033, "proto": "VENIPEDE_NORMAL" }, "2034": { "form": "Shadow", + "form_id": 2034, "proto": "VENIPEDE_SHADOW" }, "2035": { "form": "Purified", + "form_id": 2035, "proto": "VENIPEDE_PURIFIED" } }, - "pokedex_id": 543, - "name": "Venipede", "default_form_id": "2033", "types": [ "Bug", @@ -30494,7 +32269,7 @@ "evolutions": [ { "evolution": "Whirlipede", - "evolution_id": "544", + "evolution_id": 544, "candy_cost": 25 } ], @@ -30509,22 +32284,25 @@ "default_form": "Normal" }, "544": { + "name": "Whirlipede", + "pokedex_id": 544, "forms": { "2036": { "form": "Normal", + "form_id": 2036, "proto": "WHIRLIPEDE_NORMAL" }, "2037": { "form": "Shadow", + "form_id": 2037, "proto": "WHIRLIPEDE_SHADOW" }, "2038": { "form": "Purified", + "form_id": 2038, "proto": "WHIRLIPEDE_PURIFIED" } }, - "pokedex_id": 544, - "name": "Whirlipede", "default_form_id": "2036", "types": [ "Bug", @@ -30551,7 +32329,7 @@ "evolutions": [ { "evolution": "Scolipede", - "evolution_id": "545", + "evolution_id": 545, "candy_cost": 100 } ], @@ -30566,22 +32344,25 @@ "default_form": "Normal" }, "545": { + "name": "Scolipede", + "pokedex_id": 545, "forms": { "2039": { "form": "Normal", + "form_id": 2039, "proto": "SCOLIPEDE_NORMAL" }, "2040": { "form": "Shadow", + "form_id": 2040, "proto": "SCOLIPEDE_SHADOW" }, "2041": { "form": "Purified", + "form_id": 2041, "proto": "SCOLIPEDE_PURIFIED" } }, - "pokedex_id": 545, - "name": "Scolipede", "default_form_id": "2039", "types": [ "Bug", @@ -30618,22 +32399,25 @@ "default_form": "Normal" }, "546": { + "name": "Cottonee", + "pokedex_id": 546, "forms": { "2042": { "form": "Normal", + "form_id": 2042, "proto": "COTTONEE_NORMAL" }, "2043": { "form": "Shadow", + "form_id": 2043, "proto": "COTTONEE_SHADOW" }, "2044": { "form": "Purified", + "form_id": 2044, "proto": "COTTONEE_PURIFIED" } }, - "pokedex_id": 546, - "name": "Cottonee", "default_form_id": "2042", "types": [ "Grass", @@ -30660,7 +32444,7 @@ "evolutions": [ { "evolution": "Whimsicott", - "evolution_id": "547", + "evolution_id": 547, "candy_cost": 50, "evolution_item": "Sun Stone" } @@ -30676,22 +32460,25 @@ "default_form": "Normal" }, "547": { + "name": "Whimsicott", + "pokedex_id": 547, "forms": { "2045": { "form": "Normal", + "form_id": 2045, "proto": "WHIMSICOTT_NORMAL" }, "2046": { "form": "Shadow", + "form_id": 2046, "proto": "WHIMSICOTT_SHADOW" }, "2047": { "form": "Purified", + "form_id": 2047, "proto": "WHIMSICOTT_PURIFIED" } }, - "pokedex_id": 547, - "name": "Whimsicott", "default_form_id": "2045", "types": [ "Grass", @@ -30727,22 +32514,25 @@ "default_form": "Normal" }, "548": { + "name": "Petilil", + "pokedex_id": 548, "forms": { "2048": { "form": "Normal", + "form_id": 2048, "proto": "PETILIL_NORMAL" }, "2049": { "form": "Shadow", + "form_id": 2049, "proto": "PETILIL_SHADOW" }, "2050": { "form": "Purified", + "form_id": 2050, "proto": "PETILIL_PURIFIED" } }, - "pokedex_id": 548, - "name": "Petilil", "default_form_id": "2048", "types": [ "Grass" @@ -30767,7 +32557,7 @@ "evolutions": [ { "evolution": "Lilligant", - "evolution_id": "549", + "evolution_id": 549, "candy_cost": 50, "evolution_item": "Sun Stone" } @@ -30783,22 +32573,25 @@ "default_form": "Normal" }, "549": { + "name": "Lilligant", + "pokedex_id": 549, "forms": { "2051": { "form": "Normal", + "form_id": 2051, "proto": "LILLIGANT_NORMAL" }, "2052": { "form": "Shadow", + "form_id": 2052, "proto": "LILLIGANT_SHADOW" }, "2053": { "form": "Purified", + "form_id": 2053, "proto": "LILLIGANT_PURIFIED" } }, - "pokedex_id": 549, - "name": "Lilligant", "default_form_id": "2051", "types": [ "Grass" @@ -30833,18 +32626,20 @@ "default_form": "Normal" }, "550": { + "name": "Basculin", + "pokedex_id": 550, "forms": { "136": { "form": "Red Striped", + "form_id": 136, "proto": "BASCULIN_RED_STRIPED" }, "137": { "form": "Blue Striped", + "form_id": 137, "proto": "BASCULIN_BLUE_STRIPED" } }, - "pokedex_id": 550, - "name": "Basculin", "default_form_id": "136", "types": [ "Water" @@ -30879,22 +32674,25 @@ "default_form": "Red Striped" }, "551": { + "name": "Sandile", + "pokedex_id": 551, "forms": { "2054": { "form": "Normal", + "form_id": 2054, "proto": "SANDILE_NORMAL" }, "2055": { "form": "Shadow", + "form_id": 2055, "proto": "SANDILE_SHADOW" }, "2056": { "form": "Purified", + "form_id": 2056, "proto": "SANDILE_PURIFIED" } }, - "pokedex_id": 551, - "name": "Sandile", "default_form_id": "2054", "types": [ "Ground", @@ -30921,7 +32719,7 @@ "evolutions": [ { "evolution": "Krokorok", - "evolution_id": "552", + "evolution_id": 552, "candy_cost": 25 } ], @@ -30936,22 +32734,25 @@ "default_form": "Normal" }, "552": { + "name": "Krokorok", + "pokedex_id": 552, "forms": { "2057": { "form": "Normal", + "form_id": 2057, "proto": "KROKOROK_NORMAL" }, "2058": { "form": "Shadow", + "form_id": 2058, "proto": "KROKOROK_SHADOW" }, "2059": { "form": "Purified", + "form_id": 2059, "proto": "KROKOROK_PURIFIED" } }, - "pokedex_id": 552, - "name": "Krokorok", "default_form_id": "2057", "types": [ "Ground", @@ -30978,7 +32779,7 @@ "evolutions": [ { "evolution": "Krookodile", - "evolution_id": "553", + "evolution_id": 553, "candy_cost": 50 } ], @@ -30993,22 +32794,25 @@ "default_form": "Normal" }, "553": { + "name": "Krookodile", + "pokedex_id": 553, "forms": { "2060": { "form": "Normal", + "form_id": 2060, "proto": "KROOKODILE_NORMAL" }, "2061": { "form": "Shadow", + "form_id": 2061, "proto": "KROOKODILE_SHADOW" }, "2062": { "form": "Purified", + "form_id": 2062, "proto": "KROOKODILE_PURIFIED" } }, - "pokedex_id": 553, - "name": "Krookodile", "default_form_id": "2060", "types": [ "Ground", @@ -31044,21 +32848,27 @@ "default_form": "Normal" }, "554": { + "name": "Darumaka", + "pokedex_id": 554, "forms": { "2063": { "form": "Normal", + "form_id": 2063, "proto": "DARUMAKA_NORMAL" }, "2064": { "form": "Shadow", + "form_id": 2064, "proto": "DARUMAKA_SHADOW" }, "2065": { "form": "Purified", + "form_id": 2065, "proto": "DARUMAKA_PURIFIED" }, "2341": { "form": "Galarian", + "form_id": 2341, "proto": "DARUMAKA_GALARIAN", "height": 0.7, "weight": 40, @@ -31075,8 +32885,6 @@ ] } }, - "pokedex_id": 554, - "name": "Darumaka", "default_form_id": "2063", "types": [ "Fire" @@ -31101,7 +32909,7 @@ "evolutions": [ { "evolution": "Darmanitan", - "evolution_id": "555", + "evolution_id": 555, "candy_cost": 50 } ], @@ -31116,13 +32924,17 @@ "default_form": "Normal" }, "555": { + "name": "Darmanitan", + "pokedex_id": 555, "forms": { "138": { "form": "Standard", + "form_id": 138, "proto": "DARMANITAN_STANDARD" }, "139": { "form": "Zen", + "form_id": 139, "proto": "DARMANITAN_ZEN", "attack": 243, "defense": 202, @@ -31134,15 +32946,15 @@ }, "2342": { "form": "Galarian Standard", + "form_id": 2342, "proto": "DARMANITAN_GALARIAN_STANDARD" }, "2343": { "form": "Galarian Zen", + "form_id": 2343, "proto": "DARMANITAN_GALARIAN_ZEN" } }, - "pokedex_id": 555, - "name": "Darmanitan", "default_form_id": "138", "types": [ "Fire" @@ -31178,22 +32990,25 @@ "default_form": "Standard" }, "556": { + "name": "Maractus", + "pokedex_id": 556, "forms": { "2066": { "form": "Normal", + "form_id": 2066, "proto": "MARACTUS_NORMAL" }, "2067": { "form": "Shadow", + "form_id": 2067, "proto": "MARACTUS_SHADOW" }, "2068": { "form": "Purified", + "form_id": 2068, "proto": "MARACTUS_PURIFIED" } }, - "pokedex_id": 556, - "name": "Maractus", "default_form_id": "2066", "types": [ "Grass" @@ -31228,22 +33043,25 @@ "default_form": "Normal" }, "557": { + "name": "Dwebble", + "pokedex_id": 557, "forms": { "2069": { "form": "Normal", + "form_id": 2069, "proto": "DWEBBLE_NORMAL" }, "2070": { "form": "Shadow", + "form_id": 2070, "proto": "DWEBBLE_SHADOW" }, "2071": { "form": "Purified", + "form_id": 2071, "proto": "DWEBBLE_PURIFIED" } }, - "pokedex_id": 557, - "name": "Dwebble", "default_form_id": "2069", "types": [ "Bug", @@ -31270,7 +33088,7 @@ "evolutions": [ { "evolution": "Crustle", - "evolution_id": "558", + "evolution_id": 558, "candy_cost": 50 } ], @@ -31285,22 +33103,25 @@ "default_form": "Normal" }, "558": { + "name": "Crustle", + "pokedex_id": 558, "forms": { "2072": { "form": "Normal", + "form_id": 2072, "proto": "CRUSTLE_NORMAL" }, "2073": { "form": "Shadow", + "form_id": 2073, "proto": "CRUSTLE_SHADOW" }, "2074": { "form": "Purified", + "form_id": 2074, "proto": "CRUSTLE_PURIFIED" } }, - "pokedex_id": 558, - "name": "Crustle", "default_form_id": "2072", "types": [ "Bug", @@ -31336,22 +33157,25 @@ "default_form": "Normal" }, "559": { + "name": "Scraggy", + "pokedex_id": 559, "forms": { "2075": { "form": "Normal", + "form_id": 2075, "proto": "SCRAGGY_NORMAL" }, "2076": { "form": "Shadow", + "form_id": 2076, "proto": "SCRAGGY_SHADOW" }, "2077": { "form": "Purified", + "form_id": 2077, "proto": "SCRAGGY_PURIFIED" } }, - "pokedex_id": 559, - "name": "Scraggy", "default_form_id": "2075", "types": [ "Dark", @@ -31378,7 +33202,7 @@ "evolutions": [ { "evolution": "Scrafty", - "evolution_id": "560", + "evolution_id": 560, "candy_cost": 50 } ], @@ -31393,22 +33217,25 @@ "default_form": "Normal" }, "560": { + "name": "Scrafty", + "pokedex_id": 560, "forms": { "2078": { "form": "Normal", + "form_id": 2078, "proto": "SCRAFTY_NORMAL" }, "2079": { "form": "Shadow", + "form_id": 2079, "proto": "SCRAFTY_SHADOW" }, "2080": { "form": "Purified", + "form_id": 2080, "proto": "SCRAFTY_PURIFIED" } }, - "pokedex_id": 560, - "name": "Scrafty", "default_form_id": "2078", "types": [ "Dark", @@ -31444,22 +33271,25 @@ "default_form": "Normal" }, "561": { + "name": "Sigilyph", + "pokedex_id": 561, "forms": { "2081": { "form": "Normal", + "form_id": 2081, "proto": "SIGILYPH_NORMAL" }, "2082": { "form": "Shadow", + "form_id": 2082, "proto": "SIGILYPH_SHADOW" }, "2083": { "form": "Purified", + "form_id": 2083, "proto": "SIGILYPH_PURIFIED" } }, - "pokedex_id": 561, - "name": "Sigilyph", "default_form_id": "2081", "types": [ "Psychic", @@ -31496,22 +33326,30 @@ "default_form": "Normal" }, "562": { + "name": "Yamask", + "pokedex_id": 562, "forms": { "2084": { "form": "Normal", + "form_id": 2084, "proto": "YAMASK_NORMAL" }, "2085": { "form": "Shadow", + "form_id": 2085, "proto": "YAMASK_SHADOW" }, "2086": { "form": "Purified", + "form_id": 2086, "proto": "YAMASK_PURIFIED" + }, + "2344": { + "form": "Galarian", + "form_id": 2344, + "proto": "YAMASK_GALARIAN" } }, - "pokedex_id": 562, - "name": "Yamask", "default_form_id": "2084", "types": [ "Ghost" @@ -31537,7 +33375,7 @@ "evolutions": [ { "evolution": "Cofagrigus", - "evolution_id": "563", + "evolution_id": 563, "candy_cost": 50 } ], @@ -31552,22 +33390,25 @@ "default_form": "Normal" }, "563": { + "name": "Cofagrigus", + "pokedex_id": 563, "forms": { "2087": { "form": "Normal", + "form_id": 2087, "proto": "COFAGRIGUS_NORMAL" }, "2088": { "form": "Shadow", + "form_id": 2088, "proto": "COFAGRIGUS_SHADOW" }, "2089": { "form": "Purified", + "form_id": 2089, "proto": "COFAGRIGUS_PURIFIED" } }, - "pokedex_id": 563, - "name": "Cofagrigus", "default_form_id": "2087", "types": [ "Ghost" @@ -31602,22 +33443,25 @@ "default_form": "Normal" }, "564": { + "name": "Tirtouga", + "pokedex_id": 564, "forms": { "2090": { "form": "Normal", + "form_id": 2090, "proto": "TIRTOUGA_NORMAL" }, "2091": { "form": "Shadow", + "form_id": 2091, "proto": "TIRTOUGA_SHADOW" }, "2092": { "form": "Purified", + "form_id": 2092, "proto": "TIRTOUGA_PURIFIED" } }, - "pokedex_id": 564, - "name": "Tirtouga", "default_form_id": "2090", "types": [ "Water", @@ -31644,7 +33488,7 @@ "evolutions": [ { "evolution": "Carracosta", - "evolution_id": "565", + "evolution_id": 565, "candy_cost": 50 } ], @@ -31659,22 +33503,25 @@ "default_form": "Normal" }, "565": { + "name": "Carracosta", + "pokedex_id": 565, "forms": { "2093": { "form": "Normal", + "form_id": 2093, "proto": "CARRACOSTA_NORMAL" }, "2094": { "form": "Shadow", + "form_id": 2094, "proto": "CARRACOSTA_SHADOW" }, "2095": { "form": "Purified", + "form_id": 2095, "proto": "CARRACOSTA_PURIFIED" } }, - "pokedex_id": 565, - "name": "Carracosta", "default_form_id": "2093", "types": [ "Water", @@ -31710,22 +33557,25 @@ "default_form": "Normal" }, "566": { + "name": "Archen", + "pokedex_id": 566, "forms": { "2096": { "form": "Normal", + "form_id": 2096, "proto": "ARCHEN_NORMAL" }, "2097": { "form": "Shadow", + "form_id": 2097, "proto": "ARCHEN_SHADOW" }, "2098": { "form": "Purified", + "form_id": 2098, "proto": "ARCHEN_PURIFIED" } }, - "pokedex_id": 566, - "name": "Archen", "default_form_id": "2096", "types": [ "Rock", @@ -31752,7 +33602,7 @@ "evolutions": [ { "evolution": "Archeops", - "evolution_id": "567", + "evolution_id": 567, "candy_cost": 50 } ], @@ -31767,22 +33617,25 @@ "default_form": "Normal" }, "567": { + "name": "Archeops", + "pokedex_id": 567, "forms": { "2099": { "form": "Normal", + "form_id": 2099, "proto": "ARCHEOPS_NORMAL" }, "2100": { "form": "Shadow", + "form_id": 2100, "proto": "ARCHEOPS_SHADOW" }, "2101": { "form": "Purified", + "form_id": 2101, "proto": "ARCHEOPS_PURIFIED" } }, - "pokedex_id": 567, - "name": "Archeops", "default_form_id": "2099", "types": [ "Rock", @@ -31818,22 +33671,25 @@ "default_form": "Normal" }, "568": { + "name": "Trubbish", + "pokedex_id": 568, "forms": { "2102": { "form": "Normal", + "form_id": 2102, "proto": "TRUBBISH_NORMAL" }, "2103": { "form": "Shadow", + "form_id": 2103, "proto": "TRUBBISH_SHADOW" }, "2104": { "form": "Purified", + "form_id": 2104, "proto": "TRUBBISH_PURIFIED" } }, - "pokedex_id": 568, - "name": "Trubbish", "default_form_id": "2102", "types": [ "Poison" @@ -31859,7 +33715,7 @@ "evolutions": [ { "evolution": "Garbodor", - "evolution_id": "569", + "evolution_id": 569, "candy_cost": 50 } ], @@ -31874,22 +33730,25 @@ "default_form": "Normal" }, "569": { + "name": "Garbodor", + "pokedex_id": 569, "forms": { "2105": { "form": "Normal", + "form_id": 2105, "proto": "GARBODOR_NORMAL" }, "2106": { "form": "Shadow", + "form_id": 2106, "proto": "GARBODOR_SHADOW" }, "2107": { "form": "Purified", + "form_id": 2107, "proto": "GARBODOR_PURIFIED" } }, - "pokedex_id": 569, - "name": "Garbodor", "default_form_id": "2105", "types": [ "Poison" @@ -31925,22 +33784,25 @@ "default_form": "Normal" }, "570": { + "name": "Zorua", + "pokedex_id": 570, "forms": { "2108": { "form": "Normal", + "form_id": 2108, "proto": "ZORUA_NORMAL" }, "2109": { "form": "Shadow", + "form_id": 2109, "proto": "ZORUA_SHADOW" }, "2110": { "form": "Purified", + "form_id": 2110, "proto": "ZORUA_PURIFIED" } }, - "pokedex_id": 570, - "name": "Zorua", "default_form_id": "2108", "types": [ "Dark" @@ -31966,7 +33828,7 @@ "evolutions": [ { "evolution": "Zoroark", - "evolution_id": "571", + "evolution_id": 571, "candy_cost": 50 } ], @@ -31981,22 +33843,25 @@ "default_form": "Normal" }, "571": { + "name": "Zoroark", + "pokedex_id": 571, "forms": { "2111": { "form": "Normal", + "form_id": 2111, "proto": "ZOROARK_NORMAL" }, "2112": { "form": "Shadow", + "form_id": 2112, "proto": "ZOROARK_SHADOW" }, "2113": { "form": "Purified", + "form_id": 2113, "proto": "ZOROARK_PURIFIED" } }, - "pokedex_id": 571, - "name": "Zoroark", "default_form_id": "2111", "types": [ "Dark" @@ -32031,22 +33896,25 @@ "default_form": "Normal" }, "572": { + "name": "Minccino", + "pokedex_id": 572, "forms": { "2114": { "form": "Normal", + "form_id": 2114, "proto": "MINCCINO_NORMAL" }, "2115": { "form": "Shadow", + "form_id": 2115, "proto": "MINCCINO_SHADOW" }, "2116": { "form": "Purified", + "form_id": 2116, "proto": "MINCCINO_PURIFIED" } }, - "pokedex_id": 572, - "name": "Minccino", "default_form_id": "2114", "types": [ "Normal" @@ -32072,7 +33940,7 @@ "evolutions": [ { "evolution": "Cinccino", - "evolution_id": "573", + "evolution_id": 573, "candy_cost": 50, "evolution_item": "Gen5 Evolution Stone" } @@ -32088,22 +33956,25 @@ "default_form": "Normal" }, "573": { + "name": "Cinccino", + "pokedex_id": 573, "forms": { "2117": { "form": "Normal", + "form_id": 2117, "proto": "CINCCINO_NORMAL" }, "2118": { "form": "Shadow", + "form_id": 2118, "proto": "CINCCINO_SHADOW" }, "2119": { "form": "Purified", + "form_id": 2119, "proto": "CINCCINO_PURIFIED" } }, - "pokedex_id": 573, - "name": "Cinccino", "default_form_id": "2117", "types": [ "Normal" @@ -32138,22 +34009,25 @@ "default_form": "Normal" }, "574": { + "name": "Gothita", + "pokedex_id": 574, "forms": { "2120": { "form": "Normal", + "form_id": 2120, "proto": "GOTHITA_NORMAL" }, "2121": { "form": "Shadow", + "form_id": 2121, "proto": "GOTHITA_SHADOW" }, "2122": { "form": "Purified", + "form_id": 2122, "proto": "GOTHITA_PURIFIED" } }, - "pokedex_id": 574, - "name": "Gothita", "default_form_id": "2120", "types": [ "Psychic" @@ -32179,7 +34053,7 @@ "evolutions": [ { "evolution": "Gothorita", - "evolution_id": "575", + "evolution_id": 575, "candy_cost": 25 } ], @@ -32194,22 +34068,25 @@ "default_form": "Normal" }, "575": { + "name": "Gothorita", + "pokedex_id": 575, "forms": { "2123": { "form": "Normal", + "form_id": 2123, "proto": "GOTHORITA_NORMAL" }, "2124": { "form": "Shadow", + "form_id": 2124, "proto": "GOTHORITA_SHADOW" }, "2125": { "form": "Purified", + "form_id": 2125, "proto": "GOTHORITA_PURIFIED" } }, - "pokedex_id": 575, - "name": "Gothorita", "default_form_id": "2123", "types": [ "Psychic" @@ -32235,7 +34112,7 @@ "evolutions": [ { "evolution": "Gothitelle", - "evolution_id": "576", + "evolution_id": 576, "candy_cost": 100 } ], @@ -32250,22 +34127,25 @@ "default_form": "Normal" }, "576": { + "name": "Gothitelle", + "pokedex_id": 576, "forms": { "2126": { "form": "Normal", + "form_id": 2126, "proto": "GOTHITELLE_NORMAL" }, "2127": { "form": "Shadow", + "form_id": 2127, "proto": "GOTHITELLE_SHADOW" }, "2128": { "form": "Purified", + "form_id": 2128, "proto": "GOTHITELLE_PURIFIED" } }, - "pokedex_id": 576, - "name": "Gothitelle", "default_form_id": "2126", "types": [ "Psychic" @@ -32300,22 +34180,25 @@ "default_form": "Normal" }, "577": { + "name": "Solosis", + "pokedex_id": 577, "forms": { "2129": { "form": "Normal", + "form_id": 2129, "proto": "SOLOSIS_NORMAL" }, "2130": { "form": "Shadow", + "form_id": 2130, "proto": "SOLOSIS_SHADOW" }, "2131": { "form": "Purified", + "form_id": 2131, "proto": "SOLOSIS_PURIFIED" } }, - "pokedex_id": 577, - "name": "Solosis", "default_form_id": "2129", "types": [ "Psychic" @@ -32341,7 +34224,7 @@ "evolutions": [ { "evolution": "Duosion", - "evolution_id": "578", + "evolution_id": 578, "candy_cost": 25 } ], @@ -32356,22 +34239,25 @@ "default_form": "Normal" }, "578": { + "name": "Duosion", + "pokedex_id": 578, "forms": { "2132": { "form": "Normal", + "form_id": 2132, "proto": "DUOSION_NORMAL" }, "2133": { "form": "Shadow", + "form_id": 2133, "proto": "DUOSION_SHADOW" }, "2134": { "form": "Purified", + "form_id": 2134, "proto": "DUOSION_PURIFIED" } }, - "pokedex_id": 578, - "name": "Duosion", "default_form_id": "2132", "types": [ "Psychic" @@ -32397,7 +34283,7 @@ "evolutions": [ { "evolution": "Reuniclus", - "evolution_id": "579", + "evolution_id": 579, "candy_cost": 100 } ], @@ -32412,22 +34298,25 @@ "default_form": "Normal" }, "579": { + "name": "Reuniclus", + "pokedex_id": 579, "forms": { "2135": { "form": "Normal", + "form_id": 2135, "proto": "REUNICLUS_NORMAL" }, "2136": { "form": "Shadow", + "form_id": 2136, "proto": "REUNICLUS_SHADOW" }, "2137": { "form": "Purified", + "form_id": 2137, "proto": "REUNICLUS_PURIFIED" } }, - "pokedex_id": 579, - "name": "Reuniclus", "default_form_id": "2135", "types": [ "Psychic" @@ -32462,22 +34351,25 @@ "default_form": "Normal" }, "580": { + "name": "Ducklett", + "pokedex_id": 580, "forms": { "2138": { "form": "Normal", + "form_id": 2138, "proto": "DUCKLETT_NORMAL" }, "2139": { "form": "Shadow", + "form_id": 2139, "proto": "DUCKLETT_SHADOW" }, "2140": { "form": "Purified", + "form_id": 2140, "proto": "DUCKLETT_PURIFIED" } }, - "pokedex_id": 580, - "name": "Ducklett", "default_form_id": "2138", "types": [ "Water", @@ -32504,7 +34396,7 @@ "evolutions": [ { "evolution": "Swanna", - "evolution_id": "581", + "evolution_id": 581, "candy_cost": 50 } ], @@ -32519,22 +34411,25 @@ "default_form": "Normal" }, "581": { + "name": "Swanna", + "pokedex_id": 581, "forms": { "2141": { "form": "Normal", + "form_id": 2141, "proto": "SWANNA_NORMAL" }, "2142": { "form": "Shadow", + "form_id": 2142, "proto": "SWANNA_SHADOW" }, "2143": { "form": "Purified", + "form_id": 2143, "proto": "SWANNA_PURIFIED" } }, - "pokedex_id": 581, - "name": "Swanna", "default_form_id": "2141", "types": [ "Water", @@ -32570,22 +34465,25 @@ "default_form": "Normal" }, "582": { + "name": "Vanillite", + "pokedex_id": 582, "forms": { "2144": { "form": "Normal", + "form_id": 2144, "proto": "VANILLITE_NORMAL" }, "2145": { "form": "Shadow", + "form_id": 2145, "proto": "VANILLITE_SHADOW" }, "2146": { "form": "Purified", + "form_id": 2146, "proto": "VANILLITE_PURIFIED" } }, - "pokedex_id": 582, - "name": "Vanillite", "default_form_id": "2144", "types": [ "Ice" @@ -32611,7 +34509,7 @@ "evolutions": [ { "evolution": "Vanillish", - "evolution_id": "583", + "evolution_id": 583, "candy_cost": 25 } ], @@ -32626,22 +34524,25 @@ "default_form": "Normal" }, "583": { + "name": "Vanillish", + "pokedex_id": 583, "forms": { "2147": { "form": "Normal", + "form_id": 2147, "proto": "VANILLISH_NORMAL" }, "2148": { "form": "Shadow", + "form_id": 2148, "proto": "VANILLISH_SHADOW" }, "2149": { "form": "Purified", + "form_id": 2149, "proto": "VANILLISH_PURIFIED" } }, - "pokedex_id": 583, - "name": "Vanillish", "default_form_id": "2147", "types": [ "Ice" @@ -32667,7 +34568,7 @@ "evolutions": [ { "evolution": "Vanilluxe", - "evolution_id": "584", + "evolution_id": 584, "candy_cost": 100 } ], @@ -32682,22 +34583,25 @@ "default_form": "Normal" }, "584": { + "name": "Vanilluxe", + "pokedex_id": 584, "forms": { "2150": { "form": "Normal", + "form_id": 2150, "proto": "VANILLUXE_NORMAL" }, "2151": { "form": "Shadow", + "form_id": 2151, "proto": "VANILLUXE_SHADOW" }, "2152": { "form": "Purified", + "form_id": 2152, "proto": "VANILLUXE_PURIFIED" } }, - "pokedex_id": 584, - "name": "Vanilluxe", "default_form_id": "2150", "types": [ "Ice" @@ -32732,26 +34636,30 @@ "default_form": "Normal" }, "585": { + "name": "Deerling", + "pokedex_id": 585, "forms": { "585": { "form": "Spring", + "form_id": 585, "proto": "DEERLING_SPRING" }, "586": { "form": "Summer", + "form_id": 586, "proto": "DEERLING_SUMMER" }, "587": { "form": "Autumn", + "form_id": 587, "proto": "DEERLING_AUTUMN" }, "588": { "form": "Winter", + "form_id": 588, "proto": "DEERLING_WINTER" } }, - "pokedex_id": 585, - "name": "Deerling", "default_form_id": "585", "types": [ "Normal", @@ -32787,26 +34695,30 @@ "default_form": "Spring" }, "586": { + "name": "Sawsbuck", + "pokedex_id": 586, "forms": { "589": { "form": "Spring", + "form_id": 589, "proto": "SAWSBUCK_SPRING" }, "590": { "form": "Summer", + "form_id": 590, "proto": "SAWSBUCK_SUMMER" }, "591": { "form": "Autumn", + "form_id": 591, "proto": "SAWSBUCK_AUTUMN" }, "592": { "form": "Winter", + "form_id": 592, "proto": "SAWSBUCK_WINTER" } }, - "pokedex_id": 586, - "name": "Sawsbuck", "default_form_id": "589", "types": [ "Normal", @@ -32843,22 +34755,25 @@ "default_form": "Spring" }, "587": { + "name": "Emolga", + "pokedex_id": 587, "forms": { "2153": { "form": "Normal", + "form_id": 2153, "proto": "EMOLGA_NORMAL" }, "2154": { "form": "Shadow", + "form_id": 2154, "proto": "EMOLGA_SHADOW" }, "2155": { "form": "Purified", + "form_id": 2155, "proto": "EMOLGA_PURIFIED" } }, - "pokedex_id": 587, - "name": "Emolga", "default_form_id": "2153", "types": [ "Electric", @@ -32894,22 +34809,25 @@ "default_form": "Normal" }, "588": { + "name": "Karrablast", + "pokedex_id": 588, "forms": { "2156": { "form": "Normal", + "form_id": 2156, "proto": "KARRABLAST_NORMAL" }, "2157": { "form": "Shadow", + "form_id": 2157, "proto": "KARRABLAST_SHADOW" }, "2158": { "form": "Purified", + "form_id": 2158, "proto": "KARRABLAST_PURIFIED" } }, - "pokedex_id": 588, - "name": "Karrablast", "default_form_id": "2156", "types": [ "Bug" @@ -32936,7 +34854,7 @@ "evolutions": [ { "evolution": "Escavalier", - "evolution_id": "589", + "evolution_id": 589, "candy_cost": 200 } ], @@ -32951,22 +34869,25 @@ "default_form": "Normal" }, "589": { + "name": "Escavalier", + "pokedex_id": 589, "forms": { "2159": { "form": "Normal", + "form_id": 2159, "proto": "ESCAVALIER_NORMAL" }, "2160": { "form": "Shadow", + "form_id": 2160, "proto": "ESCAVALIER_SHADOW" }, "2161": { "form": "Purified", + "form_id": 2161, "proto": "ESCAVALIER_PURIFIED" } }, - "pokedex_id": 589, - "name": "Escavalier", "default_form_id": "2159", "types": [ "Bug", @@ -33003,22 +34924,25 @@ "default_form": "Normal" }, "590": { + "name": "Foongus", + "pokedex_id": 590, "forms": { "2162": { "form": "Normal", + "form_id": 2162, "proto": "FOONGUS_NORMAL" }, "2163": { "form": "Shadow", + "form_id": 2163, "proto": "FOONGUS_SHADOW" }, "2164": { "form": "Purified", + "form_id": 2164, "proto": "FOONGUS_PURIFIED" } }, - "pokedex_id": 590, - "name": "Foongus", "default_form_id": "2162", "types": [ "Grass", @@ -33045,7 +34969,7 @@ "evolutions": [ { "evolution": "Amoonguss", - "evolution_id": "591", + "evolution_id": 591, "candy_cost": 50 } ], @@ -33060,22 +34984,25 @@ "default_form": "Normal" }, "591": { + "name": "Amoonguss", + "pokedex_id": 591, "forms": { "2165": { "form": "Normal", + "form_id": 2165, "proto": "AMOONGUSS_NORMAL" }, "2166": { "form": "Shadow", + "form_id": 2166, "proto": "AMOONGUSS_SHADOW" }, "2167": { "form": "Purified", + "form_id": 2167, "proto": "AMOONGUSS_PURIFIED" } }, - "pokedex_id": 591, - "name": "Amoonguss", "default_form_id": "2165", "types": [ "Grass", @@ -33111,26 +35038,30 @@ "default_form": "Normal" }, "592": { + "name": "Frillish", + "pokedex_id": 592, "forms": { "2168": { "form": "Normal", + "form_id": 2168, "proto": "FRILLISH_NORMAL" }, "2169": { "form": "Shadow", + "form_id": 2169, "proto": "FRILLISH_SHADOW" }, "2170": { "form": "Purified", + "form_id": 2170, "proto": "FRILLISH_PURIFIED" }, "2330": { "form": "Female", + "form_id": 2330, "proto": "FRILLISH_FEMALE" } }, - "pokedex_id": 592, - "name": "Frillish", "default_form_id": "2168", "types": [ "Water", @@ -33157,7 +35088,7 @@ "evolutions": [ { "evolution": "Jellicent", - "evolution_id": "593", + "evolution_id": 593, "candy_cost": 50 } ], @@ -33172,26 +35103,30 @@ "default_form": "Normal" }, "593": { + "name": "Jellicent", + "pokedex_id": 593, "forms": { "2171": { "form": "Normal", + "form_id": 2171, "proto": "JELLICENT_NORMAL" }, "2172": { "form": "Shadow", + "form_id": 2172, "proto": "JELLICENT_SHADOW" }, "2173": { "form": "Purified", + "form_id": 2173, "proto": "JELLICENT_PURIFIED" }, "2331": { "form": "Female", + "form_id": 2331, "proto": "JELLICENT_FEMALE" } }, - "pokedex_id": 593, - "name": "Jellicent", "default_form_id": "2171", "types": [ "Water", @@ -33227,22 +35162,25 @@ "default_form": "Normal" }, "594": { + "name": "Alomomola", + "pokedex_id": 594, "forms": { "2174": { "form": "Normal", + "form_id": 2174, "proto": "ALOMOMOLA_NORMAL" }, "2175": { "form": "Shadow", + "form_id": 2175, "proto": "ALOMOMOLA_SHADOW" }, "2176": { "form": "Purified", + "form_id": 2176, "proto": "ALOMOMOLA_PURIFIED" } }, - "pokedex_id": 594, - "name": "Alomomola", "default_form_id": "2174", "types": [ "Water" @@ -33277,22 +35215,25 @@ "default_form": "Normal" }, "595": { + "name": "Joltik", + "pokedex_id": 595, "forms": { "2177": { "form": "Normal", + "form_id": 2177, "proto": "JOLTIK_NORMAL" }, "2178": { "form": "Shadow", + "form_id": 2178, "proto": "JOLTIK_SHADOW" }, "2179": { "form": "Purified", + "form_id": 2179, "proto": "JOLTIK_PURIFIED" } }, - "pokedex_id": 595, - "name": "Joltik", "default_form_id": "2177", "types": [ "Bug", @@ -33319,7 +35260,7 @@ "evolutions": [ { "evolution": "Galvantula", - "evolution_id": "596", + "evolution_id": 596, "candy_cost": 50 } ], @@ -33334,22 +35275,25 @@ "default_form": "Normal" }, "596": { + "name": "Galvantula", + "pokedex_id": 596, "forms": { "2180": { "form": "Normal", + "form_id": 2180, "proto": "GALVANTULA_NORMAL" }, "2181": { "form": "Shadow", + "form_id": 2181, "proto": "GALVANTULA_SHADOW" }, "2182": { "form": "Purified", + "form_id": 2182, "proto": "GALVANTULA_PURIFIED" } }, - "pokedex_id": 596, - "name": "Galvantula", "default_form_id": "2180", "types": [ "Bug", @@ -33386,22 +35330,25 @@ "default_form": "Normal" }, "597": { + "name": "Ferroseed", + "pokedex_id": 597, "forms": { "2183": { "form": "Normal", + "form_id": 2183, "proto": "FERROSEED_NORMAL" }, "2184": { "form": "Shadow", + "form_id": 2184, "proto": "FERROSEED_SHADOW" }, "2185": { "form": "Purified", + "form_id": 2185, "proto": "FERROSEED_PURIFIED" } }, - "pokedex_id": 597, - "name": "Ferroseed", "default_form_id": "2183", "types": [ "Grass", @@ -33428,7 +35375,7 @@ "evolutions": [ { "evolution": "Ferrothorn", - "evolution_id": "598", + "evolution_id": 598, "candy_cost": 50 } ], @@ -33443,22 +35390,25 @@ "default_form": "Normal" }, "598": { + "name": "Ferrothorn", + "pokedex_id": 598, "forms": { "2186": { "form": "Normal", + "form_id": 2186, "proto": "FERROTHORN_NORMAL" }, "2187": { "form": "Shadow", + "form_id": 2187, "proto": "FERROTHORN_SHADOW" }, "2188": { "form": "Purified", + "form_id": 2188, "proto": "FERROTHORN_PURIFIED" } }, - "pokedex_id": 598, - "name": "Ferrothorn", "default_form_id": "2186", "types": [ "Grass", @@ -33496,22 +35446,25 @@ "default_form": "Normal" }, "599": { + "name": "Klink", + "pokedex_id": 599, "forms": { "2189": { "form": "Normal", + "form_id": 2189, "proto": "KLINK_NORMAL" }, "2190": { "form": "Shadow", + "form_id": 2190, "proto": "KLINK_SHADOW" }, "2191": { "form": "Purified", + "form_id": 2191, "proto": "KLINK_PURIFIED" } }, - "pokedex_id": 599, - "name": "Klink", "default_form_id": "2189", "types": [ "Steel" @@ -33537,7 +35490,7 @@ "evolutions": [ { "evolution": "Klang", - "evolution_id": "600", + "evolution_id": 600, "candy_cost": 25 } ], @@ -33552,22 +35505,25 @@ "default_form": "Normal" }, "600": { + "name": "Klang", + "pokedex_id": 600, "forms": { "2192": { "form": "Normal", + "form_id": 2192, "proto": "KLANG_NORMAL" }, "2193": { "form": "Shadow", + "form_id": 2193, "proto": "KLANG_SHADOW" }, "2194": { "form": "Purified", + "form_id": 2194, "proto": "KLANG_PURIFIED" } }, - "pokedex_id": 600, - "name": "Klang", "default_form_id": "2192", "types": [ "Steel" @@ -33593,7 +35549,7 @@ "evolutions": [ { "evolution": "Klinklang", - "evolution_id": "601", + "evolution_id": 601, "candy_cost": 100 } ], @@ -33608,22 +35564,25 @@ "default_form": "Normal" }, "601": { + "name": "Klinklang", + "pokedex_id": 601, "forms": { "2195": { "form": "Normal", + "form_id": 2195, "proto": "KLINKLANG_NORMAL" }, "2196": { "form": "Shadow", + "form_id": 2196, "proto": "KLINKLANG_SHADOW" }, "2197": { "form": "Purified", + "form_id": 2197, "proto": "KLINKLANG_PURIFIED" } }, - "pokedex_id": 601, - "name": "Klinklang", "default_form_id": "2195", "types": [ "Steel" @@ -33659,22 +35618,25 @@ "default_form": "Normal" }, "602": { + "name": "Tynamo", + "pokedex_id": 602, "forms": { "2198": { "form": "Normal", + "form_id": 2198, "proto": "TYNAMO_NORMAL" }, "2199": { "form": "Shadow", + "form_id": 2199, "proto": "TYNAMO_SHADOW" }, "2200": { "form": "Purified", + "form_id": 2200, "proto": "TYNAMO_PURIFIED" } }, - "pokedex_id": 602, - "name": "Tynamo", "default_form_id": "2198", "types": [ "Electric" @@ -33698,7 +35660,7 @@ "evolutions": [ { "evolution": "Eelektrik", - "evolution_id": "603", + "evolution_id": 603, "candy_cost": 25 } ], @@ -33713,22 +35675,25 @@ "default_form": "Normal" }, "603": { + "name": "Eelektrik", + "pokedex_id": 603, "forms": { "2201": { "form": "Normal", + "form_id": 2201, "proto": "EELEKTRIK_NORMAL" }, "2202": { "form": "Shadow", + "form_id": 2202, "proto": "EELEKTRIK_SHADOW" }, "2203": { "form": "Purified", + "form_id": 2203, "proto": "EELEKTRIK_PURIFIED" } }, - "pokedex_id": 603, - "name": "Eelektrik", "default_form_id": "2201", "types": [ "Electric" @@ -33754,7 +35719,7 @@ "evolutions": [ { "evolution": "Eelektross", - "evolution_id": "604", + "evolution_id": 604, "candy_cost": 100, "evolution_item": "Gen5 Evolution Stone" } @@ -33770,22 +35735,25 @@ "default_form": "Normal" }, "604": { + "name": "Eelektross", + "pokedex_id": 604, "forms": { "2204": { "form": "Normal", + "form_id": 2204, "proto": "EELEKTROSS_NORMAL" }, "2205": { "form": "Shadow", + "form_id": 2205, "proto": "EELEKTROSS_SHADOW" }, "2206": { "form": "Purified", + "form_id": 2206, "proto": "EELEKTROSS_PURIFIED" } }, - "pokedex_id": 604, - "name": "Eelektross", "default_form_id": "2204", "types": [ "Electric" @@ -33821,22 +35789,25 @@ "default_form": "Normal" }, "605": { + "name": "Elgyem", + "pokedex_id": 605, "forms": { "2207": { "form": "Normal", + "form_id": 2207, "proto": "ELGYEM_NORMAL" }, "2208": { "form": "Shadow", + "form_id": 2208, "proto": "ELGYEM_SHADOW" }, "2209": { "form": "Purified", + "form_id": 2209, "proto": "ELGYEM_PURIFIED" } }, - "pokedex_id": 605, - "name": "Elgyem", "default_form_id": "2207", "types": [ "Psychic" @@ -33862,7 +35833,7 @@ "evolutions": [ { "evolution": "Beheeyem", - "evolution_id": "606", + "evolution_id": 606, "candy_cost": 50 } ], @@ -33877,22 +35848,25 @@ "default_form": "Normal" }, "606": { + "name": "Beheeyem", + "pokedex_id": 606, "forms": { "2210": { "form": "Normal", + "form_id": 2210, "proto": "BEHEEYEM_NORMAL" }, "2211": { "form": "Shadow", + "form_id": 2211, "proto": "BEHEEYEM_SHADOW" }, "2212": { "form": "Purified", + "form_id": 2212, "proto": "BEHEEYEM_PURIFIED" } }, - "pokedex_id": 606, - "name": "Beheeyem", "default_form_id": "2210", "types": [ "Psychic" @@ -33927,22 +35901,25 @@ "default_form": "Normal" }, "607": { + "name": "Litwick", + "pokedex_id": 607, "forms": { "2213": { "form": "Normal", + "form_id": 2213, "proto": "LITWICK_NORMAL" }, "2214": { "form": "Shadow", + "form_id": 2214, "proto": "LITWICK_SHADOW" }, "2215": { "form": "Purified", + "form_id": 2215, "proto": "LITWICK_PURIFIED" } }, - "pokedex_id": 607, - "name": "Litwick", "default_form_id": "2213", "types": [ "Ghost", @@ -33969,7 +35946,7 @@ "evolutions": [ { "evolution": "Lampent", - "evolution_id": "608", + "evolution_id": 608, "candy_cost": 25 } ], @@ -33984,22 +35961,25 @@ "default_form": "Normal" }, "608": { + "name": "Lampent", + "pokedex_id": 608, "forms": { "2216": { "form": "Normal", + "form_id": 2216, "proto": "LAMPENT_NORMAL" }, "2217": { "form": "Shadow", + "form_id": 2217, "proto": "LAMPENT_SHADOW" }, "2218": { "form": "Purified", + "form_id": 2218, "proto": "LAMPENT_PURIFIED" } }, - "pokedex_id": 608, - "name": "Lampent", "default_form_id": "2216", "types": [ "Ghost", @@ -34026,7 +36006,7 @@ "evolutions": [ { "evolution": "Chandelure", - "evolution_id": "609", + "evolution_id": 609, "candy_cost": 100, "evolution_item": "Gen5 Evolution Stone" } @@ -34042,22 +36022,25 @@ "default_form": "Normal" }, "609": { + "name": "Chandelure", + "pokedex_id": 609, "forms": { "2219": { "form": "Normal", + "form_id": 2219, "proto": "CHANDELURE_NORMAL" }, "2220": { "form": "Shadow", + "form_id": 2220, "proto": "CHANDELURE_SHADOW" }, "2221": { "form": "Purified", + "form_id": 2221, "proto": "CHANDELURE_PURIFIED" } }, - "pokedex_id": 609, - "name": "Chandelure", "default_form_id": "2219", "types": [ "Ghost", @@ -34093,22 +36076,25 @@ "default_form": "Normal" }, "610": { + "name": "Axew", + "pokedex_id": 610, "forms": { "2222": { "form": "Normal", + "form_id": 2222, "proto": "AXEW_NORMAL" }, "2223": { "form": "Shadow", + "form_id": 2223, "proto": "AXEW_SHADOW" }, "2224": { "form": "Purified", + "form_id": 2224, "proto": "AXEW_PURIFIED" } }, - "pokedex_id": 610, - "name": "Axew", "default_form_id": "2222", "types": [ "Dragon" @@ -34134,7 +36120,7 @@ "evolutions": [ { "evolution": "Fraxure", - "evolution_id": "611", + "evolution_id": 611, "candy_cost": 25 } ], @@ -34149,22 +36135,25 @@ "default_form": "Normal" }, "611": { + "name": "Fraxure", + "pokedex_id": 611, "forms": { "2225": { "form": "Normal", + "form_id": 2225, "proto": "FRAXURE_NORMAL" }, "2226": { "form": "Shadow", + "form_id": 2226, "proto": "FRAXURE_SHADOW" }, "2227": { "form": "Purified", + "form_id": 2227, "proto": "FRAXURE_PURIFIED" } }, - "pokedex_id": 611, - "name": "Fraxure", "default_form_id": "2225", "types": [ "Dragon" @@ -34190,7 +36179,7 @@ "evolutions": [ { "evolution": "Haxorus", - "evolution_id": "612", + "evolution_id": 612, "candy_cost": 100 } ], @@ -34205,22 +36194,25 @@ "default_form": "Normal" }, "612": { + "name": "Haxorus", + "pokedex_id": 612, "forms": { "2228": { "form": "Normal", + "form_id": 2228, "proto": "HAXORUS_NORMAL" }, "2229": { "form": "Shadow", + "form_id": 2229, "proto": "HAXORUS_SHADOW" }, "2230": { "form": "Purified", + "form_id": 2230, "proto": "HAXORUS_PURIFIED" } }, - "pokedex_id": 612, - "name": "Haxorus", "default_form_id": "2228", "types": [ "Dragon" @@ -34256,22 +36248,25 @@ "default_form": "Normal" }, "613": { + "name": "Cubchoo", + "pokedex_id": 613, "forms": { "2231": { "form": "Normal", + "form_id": 2231, "proto": "CUBCHOO_NORMAL" }, "2232": { "form": "Shadow", + "form_id": 2232, "proto": "CUBCHOO_SHADOW" }, "2233": { "form": "Purified", + "form_id": 2233, "proto": "CUBCHOO_PURIFIED" } }, - "pokedex_id": 613, - "name": "Cubchoo", "default_form_id": "2231", "types": [ "Ice" @@ -34297,7 +36292,7 @@ "evolutions": [ { "evolution": "Beartic", - "evolution_id": "614", + "evolution_id": 614, "candy_cost": 50 } ], @@ -34312,22 +36307,25 @@ "default_form": "Normal" }, "614": { + "name": "Beartic", + "pokedex_id": 614, "forms": { "2234": { "form": "Normal", + "form_id": 2234, "proto": "BEARTIC_NORMAL" }, "2235": { "form": "Shadow", + "form_id": 2235, "proto": "BEARTIC_SHADOW" }, "2236": { "form": "Purified", + "form_id": 2236, "proto": "BEARTIC_PURIFIED" } }, - "pokedex_id": 614, - "name": "Beartic", "default_form_id": "2234", "types": [ "Ice" @@ -34362,22 +36360,25 @@ "default_form": "Normal" }, "615": { + "name": "Cryogonal", + "pokedex_id": 615, "forms": { "2237": { "form": "Normal", + "form_id": 2237, "proto": "CRYOGONAL_NORMAL" }, "2238": { "form": "Shadow", + "form_id": 2238, "proto": "CRYOGONAL_SHADOW" }, "2239": { "form": "Purified", + "form_id": 2239, "proto": "CRYOGONAL_PURIFIED" } }, - "pokedex_id": 615, - "name": "Cryogonal", "default_form_id": "2237", "types": [ "Ice" @@ -34413,22 +36414,25 @@ "default_form": "Normal" }, "616": { + "name": "Shelmet", + "pokedex_id": 616, "forms": { "2240": { "form": "Normal", + "form_id": 2240, "proto": "SHELMET_NORMAL" }, "2241": { "form": "Shadow", + "form_id": 2241, "proto": "SHELMET_SHADOW" }, "2242": { "form": "Purified", + "form_id": 2242, "proto": "SHELMET_PURIFIED" } }, - "pokedex_id": 616, - "name": "Shelmet", "default_form_id": "2240", "types": [ "Bug" @@ -34454,7 +36458,7 @@ "evolutions": [ { "evolution": "Accelgor", - "evolution_id": "617", + "evolution_id": 617, "candy_cost": 200 } ], @@ -34469,22 +36473,25 @@ "default_form": "Normal" }, "617": { + "name": "Accelgor", + "pokedex_id": 617, "forms": { "2243": { "form": "Normal", + "form_id": 2243, "proto": "ACCELGOR_NORMAL" }, "2244": { "form": "Shadow", + "form_id": 2244, "proto": "ACCELGOR_SHADOW" }, "2245": { "form": "Purified", + "form_id": 2245, "proto": "ACCELGOR_PURIFIED" } }, - "pokedex_id": 617, - "name": "Accelgor", "default_form_id": "2243", "types": [ "Bug" @@ -34520,21 +36527,27 @@ "default_form": "Normal" }, "618": { + "name": "Stunfisk", + "pokedex_id": 618, "forms": { "2246": { "form": "Normal", + "form_id": 2246, "proto": "STUNFISK_NORMAL" }, "2247": { "form": "Shadow", + "form_id": 2247, "proto": "STUNFISK_SHADOW" }, "2248": { "form": "Purified", + "form_id": 2248, "proto": "STUNFISK_PURIFIED" }, "2345": { "form": "Galarian", + "form_id": 2345, "proto": "STUNFISK_GALARIAN", "height": 0.7, "weight": 20.5, @@ -34554,8 +36567,6 @@ ] } }, - "pokedex_id": 618, - "name": "Stunfisk", "default_form_id": "2246", "types": [ "Ground", @@ -34591,22 +36602,25 @@ "default_form": "Normal" }, "619": { + "name": "Mienfoo", + "pokedex_id": 619, "forms": { "2249": { "form": "Normal", + "form_id": 2249, "proto": "MIENFOO_NORMAL" }, "2250": { "form": "Shadow", + "form_id": 2250, "proto": "MIENFOO_SHADOW" }, "2251": { "form": "Purified", + "form_id": 2251, "proto": "MIENFOO_PURIFIED" } }, - "pokedex_id": 619, - "name": "Mienfoo", "default_form_id": "2249", "types": [ "Fighting" @@ -34632,7 +36646,7 @@ "evolutions": [ { "evolution": "Mienshao", - "evolution_id": "620", + "evolution_id": 620, "candy_cost": 50 } ], @@ -34647,22 +36661,25 @@ "default_form": "Normal" }, "620": { + "name": "Mienshao", + "pokedex_id": 620, "forms": { "2252": { "form": "Normal", + "form_id": 2252, "proto": "MIENSHAO_NORMAL" }, "2253": { "form": "Shadow", + "form_id": 2253, "proto": "MIENSHAO_SHADOW" }, "2254": { "form": "Purified", + "form_id": 2254, "proto": "MIENSHAO_PURIFIED" } }, - "pokedex_id": 620, - "name": "Mienshao", "default_form_id": "2252", "types": [ "Fighting" @@ -34697,22 +36714,25 @@ "default_form": "Normal" }, "621": { + "name": "Druddigon", + "pokedex_id": 621, "forms": { "2255": { "form": "Normal", + "form_id": 2255, "proto": "DRUDDIGON_NORMAL" }, "2256": { "form": "Shadow", + "form_id": 2256, "proto": "DRUDDIGON_SHADOW" }, "2257": { "form": "Purified", + "form_id": 2257, "proto": "DRUDDIGON_PURIFIED" } }, - "pokedex_id": 621, - "name": "Druddigon", "default_form_id": "2255", "types": [ "Dragon" @@ -34747,22 +36767,25 @@ "default_form": "Normal" }, "622": { + "name": "Golett", + "pokedex_id": 622, "forms": { "2258": { "form": "Normal", + "form_id": 2258, "proto": "GOLETT_NORMAL" }, "2259": { "form": "Shadow", + "form_id": 2259, "proto": "GOLETT_SHADOW" }, "2260": { "form": "Purified", + "form_id": 2260, "proto": "GOLETT_PURIFIED" } }, - "pokedex_id": 622, - "name": "Golett", "default_form_id": "2258", "types": [ "Ground", @@ -34789,7 +36812,7 @@ "evolutions": [ { "evolution": "Golurk", - "evolution_id": "623", + "evolution_id": 623, "candy_cost": 50 } ], @@ -34804,22 +36827,25 @@ "default_form": "Normal" }, "623": { + "name": "Golurk", + "pokedex_id": 623, "forms": { "2261": { "form": "Normal", + "form_id": 2261, "proto": "GOLURK_NORMAL" }, "2262": { "form": "Shadow", + "form_id": 2262, "proto": "GOLURK_SHADOW" }, "2263": { "form": "Purified", + "form_id": 2263, "proto": "GOLURK_PURIFIED" } }, - "pokedex_id": 623, - "name": "Golurk", "default_form_id": "2261", "types": [ "Ground", @@ -34855,22 +36881,25 @@ "default_form": "Normal" }, "624": { + "name": "Pawniard", + "pokedex_id": 624, "forms": { "2264": { "form": "Normal", + "form_id": 2264, "proto": "PAWNIARD_NORMAL" }, "2265": { "form": "Shadow", + "form_id": 2265, "proto": "PAWNIARD_SHADOW" }, "2266": { "form": "Purified", + "form_id": 2266, "proto": "PAWNIARD_PURIFIED" } }, - "pokedex_id": 624, - "name": "Pawniard", "default_form_id": "2264", "types": [ "Dark", @@ -34897,7 +36926,7 @@ "evolutions": [ { "evolution": "Bisharp", - "evolution_id": "625", + "evolution_id": 625, "candy_cost": 50 } ], @@ -34912,22 +36941,25 @@ "default_form": "Normal" }, "625": { + "name": "Bisharp", + "pokedex_id": 625, "forms": { "2267": { "form": "Normal", + "form_id": 2267, "proto": "BISHARP_NORMAL" }, "2268": { "form": "Shadow", + "form_id": 2268, "proto": "BISHARP_SHADOW" }, "2269": { "form": "Purified", + "form_id": 2269, "proto": "BISHARP_PURIFIED" } }, - "pokedex_id": 625, - "name": "Bisharp", "default_form_id": "2267", "types": [ "Dark", @@ -34964,22 +36996,25 @@ "default_form": "Normal" }, "626": { + "name": "Bouffalant", + "pokedex_id": 626, "forms": { "2270": { "form": "Normal", + "form_id": 2270, "proto": "BOUFFALANT_NORMAL" }, "2271": { "form": "Shadow", + "form_id": 2271, "proto": "BOUFFALANT_SHADOW" }, "2272": { "form": "Purified", + "form_id": 2272, "proto": "BOUFFALANT_PURIFIED" } }, - "pokedex_id": 626, - "name": "Bouffalant", "default_form_id": "2270", "types": [ "Normal" @@ -35015,22 +37050,25 @@ "default_form": "Normal" }, "627": { + "name": "Rufflet", + "pokedex_id": 627, "forms": { "2273": { "form": "Normal", + "form_id": 2273, "proto": "RUFFLET_NORMAL" }, "2274": { "form": "Shadow", + "form_id": 2274, "proto": "RUFFLET_SHADOW" }, "2275": { "form": "Purified", + "form_id": 2275, "proto": "RUFFLET_PURIFIED" } }, - "pokedex_id": 627, - "name": "Rufflet", "default_form_id": "2273", "types": [ "Normal", @@ -35057,7 +37095,7 @@ "evolutions": [ { "evolution": "Braviary", - "evolution_id": "628", + "evolution_id": 628, "candy_cost": 50 } ], @@ -35072,22 +37110,25 @@ "default_form": "Normal" }, "628": { + "name": "Braviary", + "pokedex_id": 628, "forms": { "2276": { "form": "Normal", + "form_id": 2276, "proto": "BRAVIARY_NORMAL" }, "2277": { "form": "Shadow", + "form_id": 2277, "proto": "BRAVIARY_SHADOW" }, "2278": { "form": "Purified", + "form_id": 2278, "proto": "BRAVIARY_PURIFIED" } }, - "pokedex_id": 628, - "name": "Braviary", "default_form_id": "2276", "types": [ "Normal", @@ -35123,22 +37164,25 @@ "default_form": "Normal" }, "629": { + "name": "Vullaby", + "pokedex_id": 629, "forms": { "2279": { "form": "Normal", + "form_id": 2279, "proto": "VULLABY_NORMAL" }, "2280": { "form": "Shadow", + "form_id": 2280, "proto": "VULLABY_SHADOW" }, "2281": { "form": "Purified", + "form_id": 2281, "proto": "VULLABY_PURIFIED" } }, - "pokedex_id": 629, - "name": "Vullaby", "default_form_id": "2279", "types": [ "Dark", @@ -35165,7 +37209,7 @@ "evolutions": [ { "evolution": "Mandibuzz", - "evolution_id": "630", + "evolution_id": 630, "candy_cost": 50 } ], @@ -35180,22 +37224,25 @@ "default_form": "Normal" }, "630": { + "name": "Mandibuzz", + "pokedex_id": 630, "forms": { "2282": { "form": "Normal", + "form_id": 2282, "proto": "MANDIBUZZ_NORMAL" }, "2283": { "form": "Shadow", + "form_id": 2283, "proto": "MANDIBUZZ_SHADOW" }, "2284": { "form": "Purified", + "form_id": 2284, "proto": "MANDIBUZZ_PURIFIED" } }, - "pokedex_id": 630, - "name": "Mandibuzz", "default_form_id": "2282", "types": [ "Dark", @@ -35232,22 +37279,25 @@ "default_form": "Normal" }, "631": { + "name": "Heatmor", + "pokedex_id": 631, "forms": { "2285": { "form": "Normal", + "form_id": 2285, "proto": "HEATMOR_NORMAL" }, "2286": { "form": "Shadow", + "form_id": 2286, "proto": "HEATMOR_SHADOW" }, "2287": { "form": "Purified", + "form_id": 2287, "proto": "HEATMOR_PURIFIED" } }, - "pokedex_id": 631, - "name": "Heatmor", "default_form_id": "2285", "types": [ "Fire" @@ -35282,22 +37332,25 @@ "default_form": "Normal" }, "632": { + "name": "Durant", + "pokedex_id": 632, "forms": { "2288": { "form": "Normal", + "form_id": 2288, "proto": "DURANT_NORMAL" }, "2289": { "form": "Shadow", + "form_id": 2289, "proto": "DURANT_SHADOW" }, "2290": { "form": "Purified", + "form_id": 2290, "proto": "DURANT_PURIFIED" } }, - "pokedex_id": 632, - "name": "Durant", "default_form_id": "2288", "types": [ "Bug", @@ -35333,22 +37386,25 @@ "default_form": "Normal" }, "633": { + "name": "Deino", + "pokedex_id": 633, "forms": { "2291": { "form": "Normal", + "form_id": 2291, "proto": "DEINO_NORMAL" }, "2292": { "form": "Shadow", + "form_id": 2292, "proto": "DEINO_SHADOW" }, "2293": { "form": "Purified", + "form_id": 2293, "proto": "DEINO_PURIFIED" } }, - "pokedex_id": 633, - "name": "Deino", "default_form_id": "2291", "types": [ "Dark", @@ -35375,7 +37431,7 @@ "evolutions": [ { "evolution": "Zweilous", - "evolution_id": "634", + "evolution_id": 634, "candy_cost": 25 } ], @@ -35390,22 +37446,25 @@ "default_form": "Normal" }, "634": { + "name": "Zweilous", + "pokedex_id": 634, "forms": { "2294": { "form": "Normal", + "form_id": 2294, "proto": "ZWEILOUS_NORMAL" }, "2295": { "form": "Shadow", + "form_id": 2295, "proto": "ZWEILOUS_SHADOW" }, "2296": { "form": "Purified", + "form_id": 2296, "proto": "ZWEILOUS_PURIFIED" } }, - "pokedex_id": 634, - "name": "Zweilous", "default_form_id": "2294", "types": [ "Dark", @@ -35432,7 +37491,7 @@ "evolutions": [ { "evolution": "Hydreigon", - "evolution_id": "635", + "evolution_id": 635, "candy_cost": 100 } ], @@ -35447,22 +37506,25 @@ "default_form": "Normal" }, "635": { + "name": "Hydreigon", + "pokedex_id": 635, "forms": { "2297": { "form": "Normal", + "form_id": 2297, "proto": "HYDREIGON_NORMAL" }, "2298": { "form": "Shadow", + "form_id": 2298, "proto": "HYDREIGON_SHADOW" }, "2299": { "form": "Purified", + "form_id": 2299, "proto": "HYDREIGON_PURIFIED" } }, - "pokedex_id": 635, - "name": "Hydreigon", "default_form_id": "2297", "types": [ "Dark", @@ -35498,22 +37560,25 @@ "default_form": "Normal" }, "636": { + "name": "Larvesta", + "pokedex_id": 636, "forms": { "2300": { "form": "Normal", + "form_id": 2300, "proto": "LARVESTA_NORMAL" }, "2301": { "form": "Shadow", + "form_id": 2301, "proto": "LARVESTA_SHADOW" }, "2302": { "form": "Purified", + "form_id": 2302, "proto": "LARVESTA_PURIFIED" } }, - "pokedex_id": 636, - "name": "Larvesta", "default_form_id": "2300", "types": [ "Bug", @@ -35540,7 +37605,7 @@ "evolutions": [ { "evolution": "Volcarona", - "evolution_id": "637", + "evolution_id": 637, "candy_cost": 400 } ], @@ -35555,22 +37620,25 @@ "default_form": "Normal" }, "637": { + "name": "Volcarona", + "pokedex_id": 637, "forms": { "2303": { "form": "Normal", + "form_id": 2303, "proto": "VOLCARONA_NORMAL" }, "2304": { "form": "Shadow", + "form_id": 2304, "proto": "VOLCARONA_SHADOW" }, "2305": { "form": "Purified", + "form_id": 2305, "proto": "VOLCARONA_PURIFIED" } }, - "pokedex_id": 637, - "name": "Volcarona", "default_form_id": "2303", "types": [ "Bug", @@ -35607,22 +37675,25 @@ "default_form": "Normal" }, "638": { + "name": "Cobalion", + "pokedex_id": 638, "forms": { "2306": { "form": "Normal", + "form_id": 2306, "proto": "COBALION_NORMAL" }, "2307": { "form": "Shadow", + "form_id": 2307, "proto": "COBALION_SHADOW" }, "2308": { "form": "Purified", + "form_id": 2308, "proto": "COBALION_PURIFIED" } }, - "pokedex_id": 638, - "name": "Cobalion", "default_form_id": "2306", "types": [ "Steel", @@ -35657,22 +37728,25 @@ "default_form": "Normal" }, "639": { + "name": "Terrakion", + "pokedex_id": 639, "forms": { "2309": { "form": "Normal", + "form_id": 2309, "proto": "TERRAKION_NORMAL" }, "2310": { "form": "Shadow", + "form_id": 2310, "proto": "TERRAKION_SHADOW" }, "2311": { "form": "Purified", + "form_id": 2311, "proto": "TERRAKION_PURIFIED" } }, - "pokedex_id": 639, - "name": "Terrakion", "default_form_id": "2309", "types": [ "Rock", @@ -35707,22 +37781,25 @@ "default_form": "Normal" }, "640": { + "name": "Virizion", + "pokedex_id": 640, "forms": { "2312": { "form": "Normal", + "form_id": 2312, "proto": "VIRIZION_NORMAL" }, "2313": { "form": "Shadow", + "form_id": 2313, "proto": "VIRIZION_SHADOW" }, "2314": { "form": "Purified", + "form_id": 2314, "proto": "VIRIZION_PURIFIED" } }, - "pokedex_id": 640, - "name": "Virizion", "default_form_id": "2312", "types": [ "Grass", @@ -35757,21 +37834,23 @@ "default_form": "Normal" }, "641": { + "name": "Tornadus", + "pokedex_id": 641, "forms": { "140": { "form": "Incarnate", + "form_id": 140, "proto": "TORNADUS_INCARNATE" }, "141": { "form": "Therian", + "form_id": 141, "proto": "TORNADUS_THERIAN", "attack": 238, "defense": 189, "stamina": 188 } }, - "pokedex_id": 641, - "name": "Tornadus", "default_form_id": "140", "types": [ "Flying" @@ -35806,21 +37885,23 @@ "default_form": "Incarnate" }, "642": { + "name": "Thundurus", + "pokedex_id": 642, "forms": { "142": { "form": "Incarnate", + "form_id": 142, "proto": "THUNDURUS_INCARNATE" }, "143": { "form": "Therian", + "form_id": 143, "proto": "THUNDURUS_THERIAN", "attack": 295, "defense": 161, "stamina": 188 } }, - "pokedex_id": 642, - "name": "Thundurus", "default_form_id": "142", "types": [ "Electric", @@ -35856,22 +37937,25 @@ "default_form": "Incarnate" }, "643": { + "name": "Reshiram", + "pokedex_id": 643, "forms": { "2315": { "form": "Normal", + "form_id": 2315, "proto": "RESHIRAM_NORMAL" }, "2316": { "form": "Shadow", + "form_id": 2316, "proto": "RESHIRAM_SHADOW" }, "2317": { "form": "Purified", + "form_id": 2317, "proto": "RESHIRAM_PURIFIED" } }, - "pokedex_id": 643, - "name": "Reshiram", "default_form_id": "2315", "types": [ "Dragon", @@ -35907,22 +37991,25 @@ "default_form": "Normal" }, "644": { + "name": "Zekrom", + "pokedex_id": 644, "forms": { "2318": { "form": "Normal", + "form_id": 2318, "proto": "ZEKROM_NORMAL" }, "2319": { "form": "Shadow", + "form_id": 2319, "proto": "ZEKROM_SHADOW" }, "2320": { "form": "Purified", + "form_id": 2320, "proto": "ZEKROM_PURIFIED" } }, - "pokedex_id": 644, - "name": "Zekrom", "default_form_id": "2318", "types": [ "Dragon", @@ -35958,21 +38045,23 @@ "default_form": "Normal" }, "645": { + "name": "Landorus", + "pokedex_id": 645, "forms": { "144": { "form": "Incarnate", + "form_id": 144, "proto": "LANDORUS_INCARNATE" }, "145": { "form": "Therian", + "form_id": 145, "proto": "LANDORUS_THERIAN", "attack": 289, "defense": 179, "stamina": 205 } }, - "pokedex_id": 645, - "name": "Landorus", "default_form_id": "144", "types": [ "Ground", @@ -36008,13 +38097,17 @@ "default_form": "Incarnate" }, "646": { + "name": "Kyurem", + "pokedex_id": 646, "forms": { "146": { "form": "Normal", + "form_id": 146, "proto": "KYUREM_NORMAL" }, "147": { "form": "Black", + "form_id": 147, "proto": "KYUREM_BLACK", "attack": 310, "defense": 183, @@ -36032,6 +38125,7 @@ }, "148": { "form": "White", + "form_id": 148, "proto": "KYUREM_WHITE", "attack": 310, "defense": 183, @@ -36044,8 +38138,6 @@ ] } }, - "pokedex_id": 646, - "name": "Kyurem", "default_form_id": "146", "types": [ "Dragon", @@ -36080,18 +38172,20 @@ "default_form": "Normal" }, "647": { + "name": "Keldeo", + "pokedex_id": 647, "forms": { "149": { "form": "Ordinary", + "form_id": 149, "proto": "KELDEO_ORDINARY" }, "150": { "form": "Resolute", + "form_id": 150, "proto": "KELDEO_RESOLUTE" } }, - "pokedex_id": 647, - "name": "Keldeo", "default_form_id": "149", "types": [ "Water", @@ -36127,9 +38221,12 @@ "default_form": "Ordinary" }, "648": { + "name": "Meloetta", + "pokedex_id": 648, "forms": { "151": { "form": "Aria", + "form_id": 151, "proto": "MELOETTA_ARIA", "quick_moves": [ "Quick Attack", @@ -36144,6 +38241,7 @@ }, "152": { "form": "Pirouette", + "form_id": 152, "proto": "MELOETTA_PIROUETTE", "attack": 269, "defense": 188, @@ -36154,8 +38252,6 @@ ] } }, - "pokedex_id": 648, - "name": "Meloetta", "default_form_id": "151", "types": [ "Normal", @@ -36191,13 +38287,17 @@ "default_form": "Aria" }, "649": { + "name": "Genesect", + "pokedex_id": 649, "forms": { "593": { "form": "Normal", + "form_id": 593, "proto": "GENESECT_NORMAL" }, "594": { "form": "Shock", + "form_id": 594, "proto": "GENESECT_SHOCK", "charged_moves": [ "X Scissor", @@ -36207,6 +38307,7 @@ }, "595": { "form": "Burn", + "form_id": 595, "proto": "GENESECT_BURN", "charged_moves": [ "X Scissor", @@ -36216,6 +38317,7 @@ }, "596": { "form": "Chill", + "form_id": 596, "proto": "GENESECT_CHILL", "charged_moves": [ "X Scissor", @@ -36225,6 +38327,7 @@ }, "597": { "form": "Douse", + "form_id": 597, "proto": "GENESECT_DOUSE", "charged_moves": [ "X Scissor", @@ -36233,8 +38336,6 @@ ] } }, - "pokedex_id": 649, - "name": "Genesect", "default_form_id": "593", "types": [ "Bug", @@ -36269,22 +38370,25 @@ "default_form": "Normal" }, "808": { + "name": "Meltan", + "pokedex_id": 808, "forms": { "2321": { "form": "Normal", + "form_id": 2321, "proto": "MELTAN_NORMAL" }, "2322": { "form": "Shadow", + "form_id": 2322, "proto": "MELTAN_SHADOW" }, "2323": { "form": "Purified", + "form_id": 2323, "proto": "MELTAN_PURIFIED" } }, - "pokedex_id": 808, - "name": "Meltan", "default_form_id": "2321", "types": [ "Steel" @@ -36307,7 +38411,7 @@ "evolutions": [ { "evolution": "Melmetal", - "evolution_id": "809", + "evolution_id": 809, "candy_cost": 400 } ], @@ -36322,22 +38426,25 @@ "default_form": "Normal" }, "809": { + "name": "Melmetal", + "pokedex_id": 809, "forms": { "2324": { "form": "Normal", + "form_id": 2324, "proto": "MELMETAL_NORMAL" }, "2325": { "form": "Shadow", + "form_id": 2325, "proto": "MELMETAL_SHADOW" }, "2326": { "form": "Purified", + "form_id": 2326, "proto": "MELMETAL_PURIFIED" } }, - "pokedex_id": 809, - "name": "Melmetal", "default_form_id": "2324", "types": [ "Steel" @@ -36372,22 +38479,25 @@ "default_form": "Normal" }, "862": { + "name": "Obstagoon", + "pokedex_id": 862, "forms": { "2501": { "form": "Normal", + "form_id": 2501, "proto": "OBSTAGOON_NORMAL" }, "2502": { "form": "Shadow", + "form_id": 2502, "proto": "OBSTAGOON_SHADOW" }, "2503": { "form": "Purified", + "form_id": 2503, "proto": "OBSTAGOON_PURIFIED" } }, - "pokedex_id": 862, - "name": "Obstagoon", "default_form_id": "2501", "types": [ "Dark", @@ -36423,22 +38533,25 @@ "default_form": "Normal" }, "863": { + "name": "Perrserker", + "pokedex_id": 863, "forms": { "2504": { "form": "Normal", + "form_id": 2504, "proto": "PERRSERKER_NORMAL" }, "2505": { "form": "Shadow", + "form_id": 2505, "proto": "PERRSERKER_SHADOW" }, "2506": { "form": "Purified", + "form_id": 2506, "proto": "PERRSERKER_PURIFIED" } }, - "pokedex_id": 863, - "name": "Perrserker", "default_form_id": "2504", "types": [ "Steel" @@ -36473,22 +38586,25 @@ "default_form": "Normal" }, "865": { + "name": "Sirfetchd", + "pokedex_id": 865, "forms": { "2510": { "form": "Normal", + "form_id": 2510, "proto": "SIRFETCHD_NORMAL" }, "2511": { "form": "Shadow", + "form_id": 2511, "proto": "SIRFETCHD_SHADOW" }, "2512": { "form": "Purified", + "form_id": 2512, "proto": "SIRFETCHD_PURIFIED" } }, - "pokedex_id": 865, - "name": "Sirfetchd", "default_form_id": "2510", "types": [ "Fighting" @@ -36523,416 +38639,10 @@ "default_form": "Normal" } }, - "Genders": [ - "all", - "male", - "female" - ], - "Pokemon_Types": [ - "Normal", - "Fighting", - "Flying", - "Poison", - "Ground", - "Rock", - "Bug", - "Ghost", - "Steel", - "Fire", - "Water", - "Grass", - "Electric", - "Psychic", - "Ice", - "Dragon", - "Dark", - "Fairy" - ], - "Type_Effectiveness": { - "Types": [ - "Normal", - "Fighting", - "Flying", - "Poison", - "Ground", - "Rock", - "Bug", - "Ghost", - "Steel", - "Fire", - "Water", - "Grass", - "Electric", - "Psychic", - "Ice", - "Dragon", - "Dark", - "Fairy" - ], - "Normal": [ - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ], - "Fighting": [ - 1, - 1, - 2, - 1, - 1, - 0.5, - 0.5, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0.5, - 2 - ], - "Flying": [ - 1, - 0.5, - 1, - 1, - 0, - 2, - 0.5, - 1, - 1, - 1, - 1, - 0.5, - 2, - 1, - 2, - 1, - 1, - 1 - ], - "Poison": [ - 1, - 0.5, - 1, - 0.5, - 2, - 1, - 0.5, - 1, - 1, - 1, - 1, - 0.5, - 1, - 2, - 1, - 1, - 1, - 0.5 - ], - "Ground": [ - 1, - 1, - 1, - 0.5, - 1, - 0.5, - 1, - 1, - 1, - 1, - 2, - 2, - 0, - 1, - 2, - 1, - 1, - 1 - ], - "Rock": [ - 0.5, - 2, - 0.5, - 0.5, - 2, - 1, - 1, - 1, - 2, - 0.5, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1 - ], - "Bug": [ - 1, - 0.5, - 2, - 1, - 0.5, - 2, - 1, - 1, - 1, - 2, - 1, - 0.5, - 1, - 1, - 1, - 1, - 1, - 1 - ], - "Ghost": [ - 1, - 0.5, - 2, - 1, - 0.5, - 2, - 1, - 1, - 1, - 2, - 1, - 0.5, - 1, - 1, - 1, - 1, - 1, - 1 - ], - "Steel": [ - 0.5, - 2, - 0.5, - 0, - 2, - 0.5, - 0.5, - 1, - 0.5, - 2, - 1, - 0.5, - 1, - 0.5, - 0.5, - 0.5, - 1, - 0.5 - ], - "Fire": [ - 1, - 1, - 1, - 1, - 2, - 2, - 0.5, - 1, - 0.5, - 0.5, - 2, - 0.5, - 1, - 1, - 0.5, - 1, - 1, - 0.5 - ], - "Water": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0.5, - 0.5, - 0.5, - 2, - 2, - 1, - 0.5, - 1, - 1, - 1 - ], - "Grass": [ - 1, - 1, - 2, - 2, - 0.5, - 1, - 2, - 1, - 1, - 2, - 0.5, - 0.5, - 0.5, - 1, - 2, - 1, - 1, - 1 - ], - "Electric": [ - 1, - 1, - 0.5, - 1, - 2, - 1, - 1, - 1, - 0.5, - 1, - 1, - 1, - 0.5, - 1, - 1, - 1, - 1, - 1 - ], - "Psychic": [ - 1, - 0.5, - 1, - 1, - 1, - 1, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 0.5, - 1, - 1, - 2, - 1 - ], - "Ice": [ - 1, - 2, - 1, - 1, - 1, - 2, - 1, - 1, - 2, - 2, - 1, - 1, - 1, - 1, - 0.5, - 1, - 1, - 1 - ], - "Dragon": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0.5, - 0.5, - 0.5, - 0.5, - 1, - 2, - 2, - 1, - 2 - ], - "Dark": [ - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 0.5, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 0.5, - 2 - ], - "Fairy": [ - 1, - 0.5, - 1, - 2, - 1, - 1, - 0.5, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0.5, - 1 - ] - }, + "Forms": {}, "Moves": { "0": { - "name": "Move Unset" + "name": "" }, "1": { "name": "Thunder Shock" @@ -37631,269 +39341,269 @@ "power": 25 }, "200": { - "name": "Fury Cutter", + "name": "Fury Cutter Fast", "proto": "COMBAT_V0200_MOVE_FURY_CUTTER_FAST", "type": "Bug", "power": 2 }, "201": { - "name": "Bug Bite", + "name": "Bug Bite Fast", "proto": "COMBAT_V0201_MOVE_BUG_BITE_FAST", "type": "Bug", "power": 3 }, "202": { - "name": "Bite", + "name": "Bite Fast", "proto": "COMBAT_V0202_MOVE_BITE_FAST", "type": "Dark", "power": 4 }, "203": { - "name": "Sucker Punch", + "name": "Sucker Punch Fast", "proto": "COMBAT_V0203_MOVE_SUCKER_PUNCH_FAST", "type": "Dark", "power": 5 }, "204": { - "name": "Dragon Breath", + "name": "Dragon Breath Fast", "proto": "COMBAT_V0204_MOVE_DRAGON_BREATH_FAST", "type": "Dragon", "power": 4 }, "205": { - "name": "Thunder Shock", + "name": "Thunder Shock Fast", "proto": "COMBAT_V0205_MOVE_THUNDER_SHOCK_FAST", "type": "Electric", "power": 3 }, "206": { - "name": "Spark", + "name": "Spark Fast", "proto": "COMBAT_V0206_MOVE_SPARK_FAST", "type": "Electric", "power": 4 }, "207": { - "name": "Low Kick", + "name": "Low Kick Fast", "proto": "COMBAT_V0207_MOVE_LOW_KICK_FAST", "type": "Fighting", "power": 4 }, "208": { - "name": "Karate Chop", + "name": "Karate Chop Fast", "proto": "COMBAT_V0208_MOVE_KARATE_CHOP_FAST", "type": "Fighting", "power": 5 }, "209": { - "name": "Ember", + "name": "Ember Fast", "proto": "COMBAT_V0209_MOVE_EMBER_FAST", "type": "Fire", "power": 6 }, "210": { - "name": "Wing Attack", + "name": "Wing Attack Fast", "proto": "COMBAT_V0210_MOVE_WING_ATTACK_FAST", "type": "Flying", "power": 5 }, "211": { - "name": "Peck", + "name": "Peck Fast", "proto": "COMBAT_V0211_MOVE_PECK_FAST", "type": "Flying", "power": 6 }, "212": { - "name": "Lick", + "name": "Lick Fast", "proto": "COMBAT_V0212_MOVE_LICK_FAST", "type": "Ghost", "power": 3 }, "213": { - "name": "Shadow Claw", + "name": "Shadow Claw Fast", "proto": "COMBAT_V0213_MOVE_SHADOW_CLAW_FAST", "type": "Ghost", "power": 6 }, "214": { - "name": "Vine Whip", + "name": "Vine Whip Fast", "proto": "COMBAT_V0214_MOVE_VINE_WHIP_FAST", "type": "Grass", "power": 5 }, "215": { - "name": "Razor Leaf", + "name": "Razor Leaf Fast", "proto": "COMBAT_V0215_MOVE_RAZOR_LEAF_FAST", "type": "Grass", "power": 11 }, "216": { - "name": "Mud Shot", + "name": "Mud Shot Fast", "proto": "COMBAT_V0216_MOVE_MUD_SHOT_FAST", "type": "Ground", "power": 3 }, "217": { - "name": "Ice Shard", + "name": "Ice Shard Fast", "proto": "COMBAT_V0217_MOVE_ICE_SHARD_FAST", "type": "Ice", "power": 9 }, "218": { - "name": "Frost Breath", + "name": "Frost Breath Fast", "proto": "COMBAT_V0218_MOVE_FROST_BREATH_FAST", "type": "Ice", "power": 7 }, "219": { - "name": "Quick Attack", + "name": "Quick Attack Fast", "proto": "COMBAT_V0219_MOVE_QUICK_ATTACK_FAST", "type": "Normal", "power": 5 }, "220": { - "name": "Scratch", + "name": "Scratch Fast", "proto": "COMBAT_V0220_MOVE_SCRATCH_FAST", "type": "Normal", "power": 4 }, "221": { - "name": "Tackle", + "name": "Tackle Fast", "proto": "COMBAT_V0221_MOVE_TACKLE_FAST", "type": "Normal", "power": 3 }, "222": { - "name": "Pound", + "name": "Pound Fast", "proto": "COMBAT_V0222_MOVE_POUND_FAST", "type": "Normal", "power": 5 }, "223": { - "name": "Cut", + "name": "Cut Fast", "proto": "COMBAT_V0223_MOVE_CUT_FAST", "type": "Normal", "power": 3 }, "224": { - "name": "Poison Jab", + "name": "Poison Jab Fast", "proto": "COMBAT_V0224_MOVE_POISON_JAB_FAST", "type": "Poison", "power": 6 }, "225": { - "name": "Acid", + "name": "Acid Fast", "proto": "COMBAT_V0225_MOVE_ACID_FAST", "type": "Poison", "power": 6 }, "226": { - "name": "Psycho Cut", + "name": "Psycho Cut Fast", "proto": "COMBAT_V0226_MOVE_PSYCHO_CUT_FAST", "type": "Psychic", "power": 3 }, "227": { - "name": "Rock Throw", + "name": "Rock Throw Fast", "proto": "COMBAT_V0227_MOVE_ROCK_THROW_FAST", "type": "Rock", "power": 8 }, "228": { - "name": "Metal Claw", + "name": "Metal Claw Fast", "proto": "COMBAT_V0228_MOVE_METAL_CLAW_FAST", "type": "Steel", "power": 5 }, "229": { - "name": "Bullet Punch", + "name": "Bullet Punch Fast", "proto": "COMBAT_V0229_MOVE_BULLET_PUNCH_FAST", "type": "Steel", "power": 6 }, "230": { - "name": "Water Gun", + "name": "Water Gun Fast", "proto": "COMBAT_V0230_MOVE_WATER_GUN_FAST", "type": "Water", "power": 3 }, "231": { - "name": "Splash", + "name": "Splash Fast", "proto": "COMBAT_V0231_MOVE_SPLASH_FAST", "type": "Water" }, "232": { - "name": "Water Gun Blastoise", + "name": "Water Gun Fast Blastoise", "proto": "COMBAT_V0232_MOVE_WATER_GUN_FAST_BLASTOISE", "type": "Water", "power": 6 }, "233": { - "name": "Mud Slap", + "name": "Mud Slap Fast", "proto": "COMBAT_V0233_MOVE_MUD_SLAP_FAST", "type": "Ground", "power": 11 }, "234": { - "name": "Zen Headbutt", + "name": "Zen Headbutt Fast", "proto": "COMBAT_V0234_MOVE_ZEN_HEADBUTT_FAST", "type": "Psychic", "power": 8 }, "235": { - "name": "Confusion", + "name": "Confusion Fast", "proto": "COMBAT_V0235_MOVE_CONFUSION_FAST", "type": "Psychic", "power": 16 }, "236": { - "name": "Poison Sting", + "name": "Poison Sting Fast", "proto": "COMBAT_V0236_MOVE_POISON_STING_FAST", "type": "Poison", "power": 3 }, "237": { - "name": "Bubble", + "name": "Bubble Fast", "proto": "COMBAT_V0237_MOVE_BUBBLE_FAST", "type": "Water", "power": 8 }, "238": { - "name": "Feint Attack", + "name": "Feint Attack Fast", "proto": "COMBAT_V0238_MOVE_FEINT_ATTACK_FAST", "type": "Dark", "power": 6 }, "239": { - "name": "Steel Wing", + "name": "Steel Wing Fast", "proto": "COMBAT_V0239_MOVE_STEEL_WING_FAST", "type": "Steel", "power": 7 }, "240": { - "name": "Fire Fang", + "name": "Fire Fang Fast", "proto": "COMBAT_V0240_MOVE_FIRE_FANG_FAST", "type": "Fire", "power": 8 }, "241": { - "name": "Rock Smash", + "name": "Rock Smash Fast", "proto": "COMBAT_V0241_MOVE_ROCK_SMASH_FAST", "type": "Fighting", "power": 9 }, "242": { - "name": "Transform", + "name": "Transform Fast", "proto": "COMBAT_V0242_MOVE_TRANSFORM_FAST", "type": "Normal" }, "243": { - "name": "Counter", + "name": "Counter Fast", "proto": "COMBAT_V0243_MOVE_COUNTER_FAST", "type": "Fighting", "power": 8 }, "244": { - "name": "Powder Snow", + "name": "Powder Snow Fast", "proto": "COMBAT_V0244_MOVE_POWDER_SNOW_FAST", "type": "Ice", "power": 4 @@ -37923,13 +39633,13 @@ "power": 80 }, "249": { - "name": "Charge Beam", + "name": "Charge Beam Fast", "proto": "COMBAT_V0249_MOVE_CHARGE_BEAM_FAST", "type": "Electric", "power": 5 }, "250": { - "name": "Volt Switch", + "name": "Volt Switch Fast", "proto": "COMBAT_V0250_MOVE_VOLT_SWITCH_FAST", "type": "Electric", "power": 12 @@ -37947,7 +39657,7 @@ "power": 150 }, "253": { - "name": "Dragon Tail", + "name": "Dragon Tail Fast", "proto": "COMBAT_V0253_MOVE_DRAGON_TAIL_FAST", "type": "Dragon", "power": 9 @@ -37959,7 +39669,7 @@ "power": 90 }, "255": { - "name": "Air Slash", + "name": "Air Slash Fast", "proto": "COMBAT_V0255_MOVE_AIR_SLASH_FAST", "type": "Flying", "power": 9 @@ -37989,13 +39699,13 @@ "power": 50 }, "260": { - "name": "Infestation", + "name": "Infestation Fast", "proto": "COMBAT_V0260_MOVE_INFESTATION_FAST", "type": "Bug", "power": 6 }, "261": { - "name": "Struggle Bug", + "name": "Struggle Bug Fast", "proto": "COMBAT_V0261_MOVE_STRUGGLE_BUG_FAST", "type": "Bug", "power": 9 @@ -38007,13 +39717,13 @@ "power": 45 }, "263": { - "name": "Astonish", + "name": "Astonish Fast", "proto": "COMBAT_V0263_MOVE_ASTONISH_FAST", "type": "Ghost", "power": 5 }, "264": { - "name": "Hex", + "name": "Hex Fast", "proto": "COMBAT_V0264_MOVE_HEX_FAST", "type": "Ghost", "power": 6 @@ -38025,7 +39735,7 @@ "power": 60 }, "266": { - "name": "Iron Tail", + "name": "Iron Tail Fast", "proto": "COMBAT_V0266_MOVE_IRON_TAIL_FAST", "type": "Steel", "power": 9 @@ -38043,7 +39753,7 @@ "power": 70 }, "269": { - "name": "Fire Spin", + "name": "Fire Spin Fast", "proto": "COMBAT_V0269_MOVE_FIRE_SPIN_FAST", "type": "Fire", "power": 9 @@ -38055,7 +39765,7 @@ "power": 130 }, "271": { - "name": "Bullet Seed", + "name": "Bullet Seed Fast", "proto": "COMBAT_V0271_MOVE_BULLET_SEED_FAST", "type": "Grass", "power": 5 @@ -38073,7 +39783,7 @@ "power": 90 }, "274": { - "name": "Extrasensory", + "name": "Extrasensory Fast", "proto": "COMBAT_V0274_MOVE_EXTRASENSORY_FAST", "type": "Psychic", "power": 8 @@ -38097,7 +39807,7 @@ "power": 110 }, "278": { - "name": "Snarl", + "name": "Snarl Fast", "proto": "COMBAT_V0278_MOVE_SNARL_FAST", "type": "Dark", "power": 5 @@ -38115,19 +39825,19 @@ "power": 70 }, "281": { - "name": "Hidden Power", + "name": "Hidden Power Fast", "proto": "COMBAT_V0281_MOVE_HIDDEN_POWER_FAST", "type": "Normal", "power": 9 }, "282": { - "name": "Take Down", + "name": "Take Down Fast", "proto": "COMBAT_V0282_MOVE_TAKE_DOWN_FAST", "type": "Normal", "power": 5 }, "283": { - "name": "Waterfall", + "name": "Waterfall Fast", "proto": "COMBAT_V0283_MOVE_WATERFALL_FAST", "type": "Water", "power": 12 @@ -38151,7 +39861,7 @@ "power": 75 }, "287": { - "name": "Yawn", + "name": "Yawn Fast", "proto": "COMBAT_V0287_MOVE_YAWN_FAST", "type": "Normal" }, @@ -38174,7 +39884,7 @@ "power": 130 }, "291": { - "name": "Present", + "name": "Present Fast", "proto": "COMBAT_V0291_MOVE_PRESENT_FAST", "type": "Normal", "power": 3 @@ -38210,7 +39920,7 @@ "power": 100 }, "297": { - "name": "Smack Down", + "name": "Smack Down Fast", "proto": "COMBAT_V0297_MOVE_SMACK_DOWN_FAST", "type": "Rock", "power": 12 @@ -38330,7 +40040,7 @@ "power": 20 }, "320": { - "name": "Charm", + "name": "Charm Fast", "proto": "COMBAT_V0320_MOVE_CHARM_FAST", "type": "Fairy", "power": 16 @@ -38360,19 +40070,19 @@ "power": 80 }, "325": { - "name": "Lock On", + "name": "Lock On Fast", "proto": "COMBAT_V0325_MOVE_LOCK_ON_FAST", "type": "Normal", "power": 1 }, "326": { - "name": "Thunder Fang", + "name": "Thunder Fang Fast", "proto": "COMBAT_V0326_MOVE_THUNDER_FANG_FAST", "type": "Electric", "power": 8 }, "327": { - "name": "Ice Fang", + "name": "Ice Fang Fast", "proto": "COMBAT_V0327_MOVE_ICE_FANG_FAST", "type": "Ice", "power": 8 @@ -38433,328 +40143,342 @@ "proto": "COMBAT_V0341_MOVE_FLY", "type": "Flying", "power": 80 + }, + "342": { + "name": "V Create" } }, - "Throw_Types": { - "10": "Nice", - "11": "Great", - "12": "Excellent" - }, "Quest_Types": { "0": { - "prototext": "QUEST_UNKNOWN_TYPE", - "text": "Unknown quest type" + "proto": "QUEST_UNSET", + "text": "" }, "1": { - "prototext": "QUEST_FIRST_CATCH_OF_THE_DAY", + "proto": "QUEST_FIRST_CATCH_OF_THE_DAY", "text": "First catch of the day" }, "2": { - "prototext": "QUEST_FIRST_POKESTOP_OF_THE_DAY", + "proto": "QUEST_FIRST_POKESTOP_OF_THE_DAY", "text": "First pokéstop of the day" }, "3": { - "prototext": "QUEST_MULTI_PART", - "text": "Multi part" + "proto": "QUEST_MULTI_PART", + "text": "" }, "4": { - "prototext": "QUEST_CATCH_POKEMON", + "proto": "QUEST_CATCH_POKEMON", "text": "Catch {0} pokémon" }, "5": { - "prototext": "QUEST_SPIN_POKESTOP", - "text": "Spin {0} pokéstop(s)" + "proto": "QUEST_SPIN_POKESTOP", + "text": "Spin {0} pokestop(s)" }, "6": { - "prototext": "QUEST_HATCH_EGG", + "proto": "QUEST_HATCH_EGG", "text": "Hatch {0} egg(s)" }, "7": { - "prototext": "QUEST_COMPLETE_GYM_BATTLE", + "proto": "QUEST_COMPLETE_GYM_BATTLE", "text": "Complete {0} gym battle(s)" }, "8": { - "prototext": "QUEST_COMPLETE_RAID_BATTLE", + "proto": "QUEST_COMPLETE_RAID_BATTLE", "text": "Complete {0} raid battle(s)" }, "9": { - "prototext": "QUEST_COMPLETE_QUEST", + "proto": "QUEST_COMPLETE_QUEST", "text": "Complete {0} quest(s)" }, "10": { - "prototext": "QUEST_TRANSFER_POKEMON", + "proto": "QUEST_TRANSFER_POKEMON", "text": "Transfer {0} pokémon" }, "11": { - "prototext": "QUEST_FAVORITE_POKEMON", + "proto": "QUEST_FAVORITE_POKEMON", "text": "Favorite {0} pokémon" }, "12": { - "prototext": "QUEST_AUTOCOMPLETE", - "text": "Autocomplete" + "proto": "QUEST_AUTOCOMPLETE", + "text": "" }, "13": { - "prototext": "QUEST_USE_BERRY_IN_ENCOUNTER", + "proto": "QUEST_USE_BERRY_IN_ENCOUNTER", "text": "Catch {0} pokémon with berrie(s)" }, "14": { - "prototext": "QUEST_UPGRADE_POKEMON", + "proto": "QUEST_UPGRADE_POKEMON", "text": "Power up a pokémon {0} times" }, "15": { - "prototext": "QUEST_EVOLVE_POKEMON", + "proto": "QUEST_EVOLVE_POKEMON", "text": "Evolve {0} pokémon" }, "16": { - "prototext": "QUEST_LAND_TROW", + "proto": "QUEST_LAND_THROW", "text": "Land {0} throw(s)" }, "17": { - "prototext": "QUEST_GET_BUDDY_CANDY", + "proto": "QUEST_GET_BUDDY_CANDY", "text": "Walk your buddy to earn {0} candy" }, "18": { - "prototext": "QUEST_BADGE_RANK", + "proto": "QUEST_BADGE_RANK", "text": "Collect {0} badge(s)" }, "19": { - "prototext": "QUEST_PLAYER_LEVEL", + "proto": "QUEST_PLAYER_LEVEL", "text": "Become level {0}" }, "20": { - "prototext": "QUEST_JOIN_RAID", + "proto": "QUEST_JOIN_RAID", "text": "Join {0} raid(s)" }, "21": { - "prototext": "QUEST_COMPLETE_BATTLE", - "text": "Complete {0} raid battle(s)" + "proto": "QUEST_COMPLETE_BATTLE", + "text": "Complete {0} battle(s)" }, "22": { - "prototext": "QUEST_ADD_FRIEND", - "text": "Make {0} new friends" + "proto": "QUEST_ADD_FRIEND", + "text": "" }, "23": { - "prototext": "QUEST_TRADE_POKEMON", + "proto": "QUEST_TRADE_POKEMON", "text": "Trade {0} pokémon" }, "24": { - "prototext": "QUEST_SEND_GIFT", + "proto": "QUEST_SEND_GIFT", "text": "Send {0} gift(s)" }, "25": { - "prototext": "QUEST_EVOLVE_INTO_POKEMON", + "proto": "QUEST_EVOLVE_INTO_POKEMON", "text": "Evolve {0} pokémon into" }, "27": { - "prototext": "QUEST_COMPLETE_COMBAT", - "text": "Win {0} pvp battle(s)" + "proto": "QUEST_COMPLETE_COMBAT", + "text": "Complete {0} pvp battle(s)" }, "28": { - "prototext": "QUEST_TAKE_SNAPSHOT", - "text": "Take {0} Snapshot(s)" + "proto": "QUEST_TAKE_SNAPSHOT", + "text": "Take {0} snapshot(s)" }, "29": { - "prototext": "QUEST_BATTLE_TEAM_ROCKET", + "proto": "QUEST_BATTLE_TEAM_ROCKET", "text": "Battle against {0} Team GO Rocket Grunt(s)" }, "30": { - "prototext": "QUEST_PURIFY_POKEMON", + "proto": "QUEST_PURIFY_POKEMON", "text": "Purify {0} pokémon" }, "31": { - "prototext": "QUEST_FIND_TEAM_ROCKET", + "proto": "QUEST_FIND_TEAM_ROCKET", "text": "Find Team Rocket {0} times" }, "32": { - "prototext": "QUEST_FIRST_GRUNT_OF_THE_DAY", + "proto": "QUEST_FIRST_GRUNT_OF_THE_DAY", "text": "First Grunt of the day" }, "33": { - "prototext": "QUEST_BUDDY_FEED", - "text": "Give your buddy {0} treat(s)" + "proto": "QUEST_BUDDY_FEED", + "text": "" }, "34": { - "prototext": "QUEST_BUDDY_EARN_AFFECTION_POINTS", + "proto": "QUEST_BUDDY_EARN_AFFECTION_POINTS", "text": "Earn {0} Heart(s) with your Buddy" }, "35": { - "prototext": "QUEST_BUDDY_PET", + "proto": "QUEST_BUDDY_PET", "text": "Play with your Buddy {0} times" }, "36": { - "prototext": "QUEST_BUDDY_LEVEL", + "proto": "QUEST_BUDDY_LEVEL", "text": "" }, "37": { - "prototext": "QUEST_BUDDY_WALK", + "proto": "QUEST_BUDDY_WALK", "text": "" }, "38": { - "prototext": "QUEST_BUDDY_YATTA", + "proto": "QUEST_BUDDY_YATTA", + "text": "" + }, + "39": { + "proto": "QUEST_USE_INCENSE", "text": "" } }, "Quest_Conditions": { "0": { - "prototext": "WITH_UNSET", - "text": "Unset" + "proto": "UNSET", + "text": "" }, "1": { - "prototext": "WITH_POKEMON_TYPE", - "text": "Pokémon Type" + "proto": "WITH_POKEMON_TYPE", + "text": "Pokemon type" }, "2": { - "prototext": "WITH_POKEMON_CATEGORY", - "text": "Pokémon" + "proto": "WITH_POKEMON_CATEGORY", + "text": "Pokemon category" }, "3": { - "prototext": "WITH_WEATHER_BOOST", - "text": "Weatherboosted" + "proto": "WITH_WEATHER_BOOST", + "text": "Weather boost" }, "4": { - "prototext": "WITH_DAILY_CAPTURE_BONUS", + "proto": "WITH_DAILY_CAPTURE_BONUS", "text": "Daily capture bonus" }, "5": { - "prototext": "WITH_DAILY_SPIN_BONUS", + "proto": "WITH_DAILY_SPIN_BONUS", "text": "Daily spin bonus" }, "6": { - "prototext": "WITH_WIN_RAID_STATUS", - "text": "Win raid" + "proto": "WITH_WIN_RAID_STATUS", + "text": "Win raid status" }, "7": { - "prototext": "WITH_RAID_LEVEL", + "proto": "WITH_RAID_LEVEL", "text": "With raid level" }, "8": { - "prototext": "WITH_TROW_TYPE", + "proto": "WITH_THROW_TYPE", "text": "Throw type" }, "9": { - "prototext": "WITH_WIN_GYM_BATTLE_STATUS", + "proto": "WITH_WIN_GYM_BATTLE_STATUS", "text": "Win gym battle(s)" }, "10": { - "prototext": "WITH_SUPER_EFFECTIVE_CHARGE", + "proto": "WITH_SUPER_EFFECTIVE_CHARGE", "text": "Super effective charge move" }, "11": { - "prototext": "WITH_ITEM", + "proto": "WITH_ITEM", "text": "Item" }, "12": { - "prototext": "WITH_UNIQUE_POKESTOP", + "proto": "WITH_UNIQUE_POKESTOP", "text": "Unique pokéstop(s)" }, "13": { - "prototext": "WITH_QUEST_CONTEXT", + "proto": "WITH_QUEST_CONTEXT", "text": "Quest context" }, "14": { - "prototext": "WITH_THROW_TYPE_IN_A_ROW", + "proto": "WITH_THROW_TYPE_IN_A_ROW", "text": "Throw type(s) in a row" }, "15": { - "prototext": "WITH_CURVE_BALL", + "proto": "WITH_CURVE_BALL", "text": "Curve ball" }, "16": { - "prototext": "WITH_BADGE_TYPE", + "proto": "WITH_BADGE_TYPE", "text": "Badge type" }, "17": { - "prototext": "WITH_PLAYER_LEVEL", + "proto": "WITH_PLAYER_LEVEL", "text": "Player level" }, "18": { - "prototext": "WITH_WIN_BATTLE_STATUS", + "proto": "WITH_WIN_BATTLE_STATUS", "text": "Win battle status" }, "19": { - "prototext": "WITH_NEW_FRIEND", + "proto": "WITH_NEW_FRIEND", "text": "New friend" }, "20": { - "prototext": "WITH_DAYS_IN_A_ROW", + "proto": "WITH_DAYS_IN_A_ROW", "text": "Days in a row" }, "21": { - "prototext": "WITH_UNIQUE_POKEMON", - "text": "" + "proto": "WITH_UNIQUE_POKEMON", + "text": "Unique pokemon" }, "22": { - "prototext": "WITH_NPC_COMBAT", - "text": "" + "proto": "WITH_NPC_COMBAT", + "text": "Npc combat" }, "23": { - "prototext": "WITH_PVP_COMBAT", - "text": "" + "proto": "WITH_PVP_COMBAT", + "text": "Pvp combat" }, "24": { - "prototext": "WITH_LOCATION", - "text": "" + "proto": "WITH_LOCATION", + "text": "Location" }, "25": { - "prototext": "WITH_DISTANCE", - "text": "" + "proto": "WITH_DISTANCE", + "text": "Distance" }, "26": { - "prototext": "WITH_POKEMON_ALIGNMENT", - "text": "" + "proto": "WITH_POKEMON_ALIGNMENT", + "text": "Pokemon alignment" }, "27": { - "prototext": "WITH_INVASION_CHARACTER", - "text": "" + "proto": "WITH_INVASION_CHARACTER", + "text": "Invasion character" }, "28": { - "prototext": "WITH_BUDDY", - "text": "" + "proto": "WITH_BUDDY", + "text": "Buddy" }, "29": { - "prototext": "WITH_BUDDY_INTERESTING_POI", - "text": "" + "proto": "WITH_BUDDY_INTERESTING_POI", + "text": "Buddy interesting poi" }, "30": { - "prototext": "WITH_DAILY_BUDDY_EFFECTION", - "text": "" + "proto": "WITH_DAILY_BUDDY_AFFECTION", + "text": "Daily buddy affection" } }, "Quest_Reward_Types": { "0": { - "prototext": "UNSET", + "proto": "UNSET", "text": "Unset" }, "1": { - "prototext": "EXPERIENCE", - "text": "Experience points" + "proto": "EXPERIENCE", + "text": "Experience" }, "2": { - "prototext": "ITEM", - "text": "Items" + "proto": "ITEM", + "text": "Item" }, "3": { - "prototext": "STARDUST", + "proto": "STARDUST", "text": "Stardust" }, "4": { - "prototext": "CANDY", + "proto": "CANDY", "text": "Candy" }, "5": { - "prototext": "AVATAR_CLOTHING", - "text": "Avatar clothing" + "proto": "AVATAR_CLOTHING", + "text": "Avatar Clothing" }, "6": { - "prototext": "QUEST", + "proto": "QUEST", "text": "Quest" }, "7": { - "prototext": "POKEMON_ENCOUNTER", - "text": "Pokémon encounter" + "proto": "POKEMON_ENCOUNTER", + "text": "Pokemon Encounter" + }, + "8": { + "proto": "POKECOIN", + "text": "Pokecoin" + }, + "11": { + "proto": "STICKER", + "text": "Sticker" } }, "Grunt_Types": { + "0": { + "type": "Unset", + "grunt": "" + }, "1": { "type": "Blanche", "grunt": "" @@ -38773,23 +40497,7 @@ }, "5": { "type": "", - "grunt": "Female", - "second_reward": "false", - "encounters": { - "first": [ - "131_00" - ], - "second": [ - "062_00", - "143_00", - "282_00" - ], - "third": [ - "130_00", - "143_00", - "149_00" - ] - } + "grunt": "Female" }, "6": { "type": "Bug", @@ -38797,48 +40505,15 @@ }, "7": { "type": "Bug", - "grunt": "Male", - "second_reward": "false", - "encounters": { - "first": [ - "013_00", - "048_00" - ], - "second": [ - "014_00", - "049_00", - "212_00" - ], - "third": [ - "015_00", - "123_00", - "212_00" - ] - } + "grunt": "Male" }, "8": { - "type": "Ghost", + "type": "Darkness", "grunt": "Female" }, "9": { - "type": "Ghost", - "grunt": "Male", - "second_reward": "false", - "encounters": { - "first": [ - "200_00" - ], - "second": [ - "302_00", - "354_00", - "356_00" - ], - "third": [ - "302_00", - "354_00", - "477_00" - ] - } + "type": "Darkness", + "grunt": "Male" }, "10": { "type": "Dark", @@ -38866,20 +40541,7 @@ }, "16": { "type": "Fighting", - "grunt": "Female", - "second_reward": "false", - "encounters": { - "first": [ - "106_00", - "107_00" - ], - "second": [ - "107_00" - ], - "third": [ - "107_00" - ] - } + "grunt": "Female" }, "17": { "type": "Fighting", @@ -38887,25 +40549,7 @@ }, "18": { "type": "Fire", - "grunt": "Female", - "second_reward": "true", - "encounters": { - "first": [ - "037_00", - "058_00", - "228_00" - ], - "second": [ - "005_00", - "038_00", - "229_00" - ], - "third": [ - "005_00", - "059_00", - "229_00" - ] - } + "grunt": "Female" }, "19": { "type": "Fire", @@ -38913,24 +40557,7 @@ }, "20": { "type": "Flying", - "grunt": "Female", - "second_reward": "false", - "encounters": { - "first": [ - "041_00", - "042_00" - ], - "second": [ - "042_00", - "123_00", - "169_00" - ], - "third": [ - "130_00", - "149_00", - "169_00" - ] - } + "grunt": "Female" }, "21": { "type": "Flying", @@ -38942,23 +40569,7 @@ }, "23": { "type": "Grass", - "grunt": "Male", - "second_reward": "true", - "encounters": { - "first": [ - "102_00" - ], - "second": [ - "002_00", - "044_00", - "070_00" - ], - "third": [ - "045_00", - "071_00", - "275_00" - ] - } + "grunt": "Male" }, "24": { "type": "Ground", @@ -38966,24 +40577,7 @@ }, "25": { "type": "Ground", - "grunt": "Male", - "second_reward": "false", - "encounters": { - "first": [ - "027_00", - "246_00", - "328_00" - ], - "second": [ - "105_00", - "247_00", - "329_00" - ], - "third": [ - "105_00", - "330_00" - ] - } + "grunt": "Male" }, "26": { "type": "Ice", @@ -39007,20 +40601,7 @@ }, "31": { "type": "Normal", - "grunt": "Male", - "second_reward": "false", - "encounters": { - "first": [ - "137_00" - ], - "second": [ - "233_00" - ], - "third": [ - "143_00", - "474_00" - ] - } + "grunt": "Male" }, "32": { "type": "Poison", @@ -39036,25 +40617,7 @@ }, "35": { "type": "Psychic", - "grunt": "Male", - "second_reward": "true", - "encounters": { - "first": [ - "063_00", - "202_00", - "280_00" - ], - "second": [ - "096_00", - "097_00", - "280_00" - ], - "third": [ - "064_00", - "097_00", - "281_00" - ] - } + "grunt": "Male" }, "36": { "type": "Rock", @@ -39062,119 +40625,35 @@ }, "37": { "type": "Rock", - "grunt": "Male", - "second_reward": "false", - "encounters": { - "first": [ - "138_00", - "246_00" - ], - "second": [ - "246_00", - "247_00" - ], - "third": [ - "247_00", - "248_00" - ] - } + "grunt": "Male" }, "38": { "type": "Water", - "grunt": "Female", - "second_reward": "false", - "encounters": { - "first": [ - "258_00", - "318_00" - ], - "second": [ - "055_00", - "061_00" - ], - "third": [ - "062_00", - "186_00" - ] - } + "grunt": "Female" }, "39": { "type": "Water", "grunt": "Male" }, "40": { - "type": "Player Team Leader", + "type": "Player", "grunt": "" }, "41": { "type": "Executive Cliff", - "grunt": "", - "second_reward": "false", - "encounters": { - "first": [ - "127_00" - ], - "second": [ - "105_00", - "138_00", - "466_00" - ], - "third": [ - "248_00", - "260_00", - "389_00" - ] - } + "grunt": "" }, "42": { "type": "Executive Arlo", - "grunt": "", - "second_reward": "false", - "encounters": { - "first": [ - "303_00" - ], - "second": [ - "006_00", - "009_00", - "208_00" - ], - "third": [ - "149_00", - "212_00", - "373_00" - ] - } + "grunt": "" }, "43": { "type": "Executive Sierra", - "grunt": "", - "second_reward": "false", - "encounters": { - "first": [ - "374_00" - ], - "second": [ - "103_00", - "131_00", - "319_00" - ], - "third": [ - "065_00", - "228_00", - "275_00" - ] - } + "grunt": "" }, "44": { - "type": "Giovanni or Decoy", - "grunt": "", - "second_reward": "false", - "encounters": { - "first": [ - "244_00" - ] - } + "type": "Giovanni", + "grunt": "" }, "45": { "type": "Decoy", @@ -39190,51 +40669,38 @@ }, "48": { "type": "Ghost", - "grunt": "Male", - "second_reward": "false", - "encounters": { - "first": [ - "200_00" - ], - "second": [ - "302_00", - "354_00", - "356_00" - ], - "third": [ - "302_00", - "354_00", - "477_00" - ] - } + "grunt": "Male" }, "49": { "type": "Electric", - "grunt": "Female", - "second_reward": "false", - "encounters": { - "first": [ - "081_00", - "125_00", - "179_00" - ], - "second": [ - "082_00", - "125_00", - "180_00" - ], - "third": [ - "125_00", - "181_00" - ] - } + "grunt": "Female" }, "50": { "type": "Electric", "grunt": "Male" + }, + "51": { + "type": "Balloon", + "grunt": "Female" + }, + "52": { + "type": "Balloon", + "grunt": "Male" + }, + "53": { + "type": "", + "grunt": "Female" + }, + "54": { + "type": "", + "grunt": "Male" } }, "Items": { + "0": { + "name": "Unknown", + "proto": "ITEM_UNKNOWN" + }, "1": { "name": "Poke Ball", "proto": "ITEM_POKE_BALL", @@ -39264,6 +40730,7 @@ }, "5": { "name": "Premier Ball", + "proto": "ITEM_PREMIER_BALL", "type": "Pokeball", "category": "Pokeball" }, @@ -39323,6 +40790,18 @@ "category": "Incense", "min_trainer_level": 1 }, + "402": { + "name": "Incense Spicy", + "proto": "ITEM_INCENSE_SPICY" + }, + "403": { + "name": "Incense Cool", + "proto": "ITEM_INCENSE_COOL" + }, + "404": { + "name": "Incense Floral", + "proto": "ITEM_INCENSE_FLORAL" + }, "405": { "name": "Incense Beluga Box", "proto": "ITEM_INCENSE_BELUGA_BOX", @@ -39416,6 +40895,10 @@ "category": "Food", "min_trainer_level": 10 }, + "707": { + "name": "Golden Nanab Berry", + "proto": "ITEM_GOLDEN_NANAB_BERRY" + }, "708": { "name": "Golden Pinap Berry", "proto": "ITEM_GOLDEN_PINAP_BERRY", @@ -39518,12 +41001,14 @@ }, "1201": { "name": "Move Reroll Fast Attack", + "proto": "ITEM_MOVE_REROLL_FAST_ATTACK", "type": "Move Reroll", "category": "Move Reroll", "min_trainer_level": 15 }, "1202": { "name": "Move Reroll Special Attack", + "proto": "ITEM_MOVE_REROLL_SPECIAL_ATTACK", "type": "Move Reroll", "category": "Move Reroll", "min_trainer_level": 25 @@ -39544,12 +41029,14 @@ }, "1301": { "name": "Rare Candy", + "proto": "ITEM_RARE_CANDY", "type": "Candy", "category": "Candy", "min_trainer_level": 5 }, "1401": { "name": "Free Raid Ticket", + "proto": "ITEM_FREE_RAID_TICKET", "type": "Raid Ticket", "category": "Raid Ticket" }, @@ -39562,6 +41049,7 @@ }, "1403": { "name": "Legendary Raid Ticket", + "proto": "ITEM_LEGENDARY_RAID_TICKET", "type": "Raid Ticket", "category": "Raid Ticket" }, @@ -39574,6 +41062,7 @@ }, "1405": { "name": "Friend Gift Box", + "proto": "ITEM_FRIEND_GIFT_BOX", "type": "Friend Gift Box", "category": "Friend Gift Box" }, @@ -39616,6 +41105,423 @@ "proto": "ITEM_GLOBAL_EVENT_TICKET", "type": "Global Event Ticket", "category": "Global Event Ticket" + }, + "1601": { + "name": "Event Ticket Pink", + "proto": "ITEM_EVENT_TICKET_PINK" } + }, + "Pokemon_Types": [ + "Normal", + "Fighting", + "Flying", + "Poison", + "Ground", + "Rock", + "Bug", + "Ghost", + "Steel", + "Fire", + "Water", + "Grass", + "Electric", + "Psychic", + "Ice", + "Dragon", + "Dark", + "Fairy" + ], + "Genders": { + "0": "all", + "1": "male", + "2": "female", + "3": "genderless" + }, + "Type_Effectiveness": { + "Types": [ + "Normal", + "Fighting", + "Flying", + "Poison", + "Ground", + "Rock", + "Bug", + "Ghost", + "Steel", + "Fire", + "Water", + "Grass", + "Electric", + "Psychic", + "Ice", + "Dragon", + "Dark", + "Fairy" + ], + "Normal": [ + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "Fighting": [ + 1, + 1, + 2, + 1, + 1, + 0.5, + 0.5, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0.5, + 2 + ], + "Flying": [ + 1, + 0.5, + 1, + 1, + 0, + 2, + 0.5, + 1, + 1, + 1, + 1, + 0.5, + 2, + 1, + 2, + 1, + 1, + 1 + ], + "Poison": [ + 1, + 0.5, + 1, + 0.5, + 2, + 1, + 0.5, + 1, + 1, + 1, + 1, + 0.5, + 1, + 2, + 1, + 1, + 1, + 0.5 + ], + "Ground": [ + 1, + 1, + 1, + 0.5, + 1, + 0.5, + 1, + 1, + 1, + 1, + 2, + 2, + 0, + 1, + 2, + 1, + 1, + 1 + ], + "Rock": [ + 0.5, + 2, + 0.5, + 0.5, + 2, + 1, + 1, + 1, + 2, + 0.5, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "Bug": [ + 1, + 0.5, + 2, + 1, + 0.5, + 2, + 1, + 1, + 1, + 2, + 1, + 0.5, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "Ghost": [ + 1, + 0.5, + 2, + 1, + 0.5, + 2, + 1, + 1, + 1, + 2, + 1, + 0.5, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "Steel": [ + 0.5, + 2, + 0.5, + 0, + 2, + 0.5, + 0.5, + 1, + 0.5, + 2, + 1, + 0.5, + 1, + 0.5, + 0.5, + 0.5, + 1, + 0.5 + ], + "Fire": [ + 1, + 1, + 1, + 1, + 2, + 2, + 0.5, + 1, + 0.5, + 0.5, + 2, + 0.5, + 1, + 1, + 0.5, + 1, + 1, + 0.5 + ], + "Water": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0.5, + 0.5, + 0.5, + 2, + 2, + 1, + 0.5, + 1, + 1, + 1 + ], + "Grass": [ + 1, + 1, + 2, + 2, + 0.5, + 1, + 2, + 1, + 1, + 2, + 0.5, + 0.5, + 0.5, + 1, + 2, + 1, + 1, + 1 + ], + "Electric": [ + 1, + 1, + 0.5, + 1, + 2, + 1, + 1, + 1, + 0.5, + 1, + 1, + 1, + 0.5, + 1, + 1, + 1, + 1, + 1 + ], + "Psychic": [ + 1, + 0.5, + 1, + 1, + 1, + 1, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 0.5, + 1, + 1, + 2, + 1 + ], + "Ice": [ + 1, + 2, + 1, + 1, + 1, + 2, + 1, + 1, + 2, + 2, + 1, + 1, + 1, + 1, + 0.5, + 1, + 1, + 1 + ], + "Dragon": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0.5, + 0.5, + 0.5, + 0.5, + 1, + 2, + 2, + 1, + 2 + ], + "Dark": [ + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 0.5, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0.5, + 2 + ], + "Fairy": [ + 1, + 0.5, + 1, + 2, + 1, + 1, + 0.5, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0.5, + 1 + ] + }, + "Throw_Types": { + "10": "Nice", + "11": "Great", + "12": "Excellent" } } diff --git a/src/static/rawprotos.proto b/src/static/rawprotos.proto index 0202734..5eacac4 100644 --- a/src/static/rawprotos.proto +++ b/src/static/rawprotos.proto @@ -1,3 +1,19 @@ +/* +* Copyright 2016-2020 --=FurtiF=-- Co., Ltd. +* +* Licensed under the +* Educational Community License, Version 2.0 (the "License"); you may +* not use this file except in compliance with the License. You may +* obtain a copy of the License at +* +* http://www.osedu.org/licenses/ECL-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an "AS IS" +* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +* or implied. See the License for the specific language governing +* permissions and limitations under the License. +*/ syntax = "proto3"; package POGOProtos.Rpc; @@ -29,9 +45,12 @@ message JournalAddEntryProto { } message JournalEntryProto { - JournalAddEntryProto add_entry = 1; - JournalReadEntryProto read_entry = 2; - JournalRemoveEntryProto remove_entry = 3; + oneof Subentry { + JournalAddEntryProto add_entry = 1; + JournalReadEntryProto read_entry = 2; + JournalRemoveEntryProto remove_entry = 3; + } + } message JournalReadEntryProto { @@ -130,6 +149,9 @@ enum ClientInboxServiceNotificationCategory { CLIENT_INBOX_SERVICE_NOTIFICATION_CATEGORY_BUDDY_REMOTE_GIFT = 47; CLIENT_INBOX_SERVICE_NOTIFICATION_CATEGORY_BGMODE_BUDDY_REMOTE_GIFT = 48; CLIENT_INBOX_SERVICE_NOTIFICATION_CATEGORY_REMOTE_RAID_INVITATION = 49; + CLIENT_INBOX_SERVICE_NOTIFICATION_CATEGORY_ITEM_REWARDS = 50; + CLIENT_INBOX_SERVICE_NOTIFICATION_CATEGORY_TIMED_GROUP_CHALLENGE_STARTED = 51; + CLIENT_INBOX_SERVICE_NOTIFICATION_CATEGORY_TIMED_GROUP_CHALLENGE_GOAL_MET = 52; } message PlatformDeveloperToken { @@ -139,7 +161,7 @@ message PlatformDeveloperToken { message PlatformClientGameMasterTemplateProto { string template_id = 1; - bytes data = 2; + GameMasterClientTemplateProto data = 2; } message PlatformDownloadGmTemplatesRequestProto { @@ -161,11 +183,12 @@ message PlatformDownloadGmTemplatesResponseProto { WRONG_EXPERIMENTS = 5; } - repeated PlatformClientGameMasterTemplateProto template = 1; - repeated string deleted_template = 2; - uint64 batch_id = 3; - int32 page_offset = 4; - repeated int32 experiment_id = 5; + Result result = 1; + repeated PlatformClientGameMasterTemplateProto template = 2; + repeated string deleted_template = 3; + uint64 batch_id = 4; + int32 page_offset = 5; + repeated int32 experiment_id = 6; } enum BattleResultsExit { @@ -272,9 +295,12 @@ message PlatformInventoryDeltaProto { } message PlatformInventoryItemProto { + oneof InventoryItem { + bytes deleted_item_key = 2; + bytes item = 3; + } + int64 modified_timestamp = 1; - bytes deleted_item_key = 2; - bytes item = 3; } enum IncubationResult { @@ -410,8 +436,11 @@ message FitnessMetricsProto { } message FitnessReportProto { - int32 day_offset_from_now = 1; - int32 week_offset_from_now = 2; + oneof Window { + int32 day_offset_from_now = 1; + int32 week_offset_from_now = 2; + } + FitnessMetricsProto metrics = 3; bytes game_data = 4; } @@ -951,9 +980,12 @@ message TitanSubmitSponsorPoiReportProto { } message TitanTitanGameClientTelemetryOmniProto { - TitanPoiSubmissionTelemetry poi_submission_telemetry = 1; - TitanPoiSubmissionPhotoUploadErrorTelemetry poi_submission_photo_upload_error_telemetry = 2; - TitanPoiPlayerMetadataTelemetry player_metadata_telemetry = 3; + oneof TelemetryData { + TitanPoiSubmissionTelemetry poi_submission_telemetry = 1; + TitanPoiSubmissionPhotoUploadErrorTelemetry poi_submission_photo_upload_error_telemetry = 2; + TitanPoiPlayerMetadataTelemetry player_metadata_telemetry = 3; + } + PlatformPlatformServerData server_data = 1001; } @@ -1095,7 +1127,7 @@ message PlatformDownloadSettingsActionProto { message PlatformDownloadSettingsResponseProto { string error = 1; string sha1 = 2; - bytes values = 3; + GlobalSettingsProto values = 3; } message PlatformFriendDetailsProto { @@ -1285,7 +1317,7 @@ message PlatformGetFriendsListOutProto { message FriendProto { enum OnlineStatus { - ONLINE_STATUS_UNSET = 0; + UNSET = 0; STATUS_UNKNOWN = 1; STATUS_ONLINE = 2; STATUS_OFFLINE = 3; @@ -2298,6 +2330,8 @@ enum HoloBadgeType { HOLO_BADGE_TYPE_BADGE_SAFARIZONE_2020_PHILADELPHIA_DAY_02_EARLYACCESS = 5068; HOLO_BADGE_TYPE_BADGE_SAFARIZONE_2020_PHILADELPHIA_DAY_03_GENERAL = 5069; HOLO_BADGE_TYPE_BADGE_SAFARIZONE_2020_PHILADELPHIA_DAY_03_EARLYACCESS = 5070; + HOLO_BADGE_TYPE_BADGE_GOFEST_2020_TEST = 5071; + HOLO_BADGE_TYPE_BADGE_GOFEST_2020_GLOBAL = 5072; HOLO_BADGE_TYPE_BADGE_GLOBAL_TICKETED_EVENT = 5100; HOLO_BADGE_TYPE_BADGE_EVENT_0001 = 5201; HOLO_BADGE_TYPE_BADGE_EVENT_0002 = 5202; @@ -2360,6 +2394,7 @@ enum HoloholoClientTelemetryIds { HOLOHOLO_CLIENT_TELEMETRY_IDS_COMBAT_HUB_ENTRANCE_TELEMETRY = 45; HOLOHOLO_CLIENT_TELEMETRY_IDS_DEVICE_SPECIFICATIONS_TELEMETRY = 46; HOLOHOLO_CLIENT_TELEMETRY_IDS_SCREEN_RESOLUTION_TELEMETRY = 47; + HOLOHOLO_CLIENT_TELEMETRY_IDS_DEVICE_OS_TELEMETRY = 48; } enum HoloIapItemCategory { @@ -3736,6 +3771,7 @@ enum HoloPokemonMove { HOLO_POKEMON_MOVE_V0339_MOVE_TECHNO_BLAST_WATER = 339; HOLO_POKEMON_MOVE_V0340_MOVE_TECHNO_BLAST_SHOCK = 340; HOLO_POKEMON_MOVE_V0341_MOVE_FLY = 341; + HOLO_POKEMON_MOVE_V0342_MOVE_V_CREATE = 342; } enum HoloPokemonMovementType { @@ -4118,6 +4154,7 @@ enum Method { METHOD_OPEN_SPONSORED_GIFT = 1650; METHOD_SPONSORED_GIFT_REPORT_INTERACTION = 1651; METHOD_SAVE_PLAYER_PREFERENCES = 1652; + METHOD_GET_TIMED_GROUP_CHALLENGE = 1700; } enum NewsPageTelemetryIds { @@ -4176,6 +4213,9 @@ enum NotificationCategory { NOTIFICATION_CATEGORY_BUDDY_REMOTE_GIFT = 47; NOTIFICATION_CATEGORY_BGMODE_BUDDY_REMOTE_GIFT = 48; NOTIFICATION_CATEGORY_REMOTE_RAID_INVITATION = 49; + NOTIFICATION_CATEGORY_ITEM_REWARDS = 50; + NOTIFICATION_CATEGORY_TIMED_GROUP_CHALLENGE_STARTED = 51; + NOTIFICATION_CATEGORY_TIMED_GROUP_CHALLENGE_GOAL_MET = 52; } enum OnboardingArStatus { @@ -4486,6 +4526,8 @@ enum SouvenirTypeId { SOUVENIR_TYPE_ID_SOUVENIR_MARBLE = 13; SOUVENIR_TYPE_ID_SOUVENIR_TORN_TICKET = 14; SOUVENIR_TYPE_ID_SOUVENIR_PRETTY_LEAF = 15; + SOUVENIR_TYPE_ID_SOUVENIR_CONFETTI = 16; + SOUVENIR_TYPE_ID_SOUVENIR_PIKACHU_VISOR = 17; } enum Store { @@ -4601,6 +4643,8 @@ enum VariableName { VARIABLE_NAME_POI_PASSCODE_REDEMPTION_RESPONSE = 1039; VARIABLE_NAME_GIFTBOX_COUNT = 1040; VARIABLE_NAME_RAID_INVITATION_DETAILS = 1041; + VARIABLE_NAME_LOOT_ITEMS = 1042; + VARIABLE_NAME_EVENT_ICON_URL = 1043; } enum VsSeekerRewardTrack { @@ -4653,29 +4697,33 @@ message AcknowledgePunishmentProto { } message ActionLogEntry { + oneof Action { + CatchPokemonLogEntry catch_pokemon = 3; + FortSearchLogEntry fort_search = 4; + BuddyPokemonLogEntry buddy_pokemon = 5; + RaidRewardsLogEntry raid_rewards = 6; + PasscodeRewardsLogEntry passcode_rewards = 7; + CompleteQuestLogEntry complete_quest = 8; + CompleteQuestStampCardLogEntry complete_quest_stamp_card = 9; + CompleteQuestPokemonEncounterLogEntry complete_quest_pokemon_encounter = 10; + BelugaDailyTransferLogEntry beluga_transfer = 11; + OpenGiftLogEntry open_gift = 12; + SendGiftLogEntry send_gift = 13; + TradingLogEntry trading = 14; + ShareExRaidPassLogEntry share_ex_raid_pass = 15; + DeclineExRaidPassLogEntry decline_ex_raid_pass = 16; + FitnessRewardsLogEntry fitness_rewards = 17; + CombatLogEntry combat = 18; + PurifyPokemonLogEntry purify_pokemon = 19; + InvasionVictoryLogEntry invasion_victory = 20; + VsSeekerSetLogEntry vs_seeker_set = 21; + VsSeekerCompleteSeasonLogEntry vs_seeker_complete_season = 22; + VsSeekerWinRewardsLogEntry vs_seeker_win_rewards = 23; + BuddyConsumablesLogEntry buddy_consumables = 24; + } + int64 timestamp_ms = 1; bool sfida = 2; - CatchPokemonLogEntry catch_pokemon = 3; - FortSearchLogEntry fort_search = 4; - BuddyPokemonLogEntry buddy_pokemon = 5; - RaidRewardsLogEntry raid_rewards = 6; - PasscodeRewardsLogEntry passcode_rewards = 7; - CompleteQuestLogEntry complete_quest = 8; - CompleteQuestStampCardLogEntry complete_quest_stamp_card = 9; - CompleteQuestPokemonEncounterLogEntry complete_quest_pokemon_encounter = 10; - BelugaDailyTransferLogEntry beluga_transfer = 11; - OpenGiftLogEntry open_gift = 12; - SendGiftLogEntry send_gift = 13; - TradingLogEntry trading = 14; - ShareExRaidPassLogEntry share_ex_raid_pass = 15; - DeclineExRaidPassLogEntry decline_ex_raid_pass = 16; - FitnessRewardsLogEntry fitness_rewards = 17; - CombatLogEntry combat = 18; - PurifyPokemonLogEntry purify_pokemon = 19; - InvasionVictoryLogEntry invasion_victory = 20; - VsSeekerSetLogEntry vs_seeker_set = 21; - VsSeekerCompleteSeasonLogEntry vs_seeker_complete_season = 22; - VsSeekerWinRewardsLogEntry vs_seeker_win_rewards = 23; } message ActivateVsSeekerOutProto { @@ -4875,6 +4923,14 @@ message ArPhotoSessionProto { CLASSIC = 2; } + enum BatteryStatus { + UNDETERMINED = 0; + CHARGING = 1; + DISCHARGING = 2; + NOT_CHARGING = 3; + FULL = 4; + } + enum Step { UNKNOWN = 0; CAMERA_PERMISSION_GRANTED = 1; @@ -4884,6 +4940,29 @@ message ArPhotoSessionProto { PHOTO_SHARED = 5; } + message ArConditions { + int64 timestamp = 1; + bool occlusions_enabled = 2; + Step current_ar_step = 3; + } + + message BatterySample { + ArConditions conditions = 1; + float battery_level = 2; + BatteryStatus status = 3; + } + + message FramerateSample { + ArConditions conditions = 1; + int32 framerate = 2; + } + + message ProcessorSample { + ArConditions conditions = 1; + float cpu_usage = 2; + float gpu_usage = 3; + } + ArType ar_type = 1; Step furthest_step_completed = 2; int32 num_photos_taken = 3; @@ -4896,6 +4975,16 @@ message ArPhotoSessionProto { int64 session_length_occlusions = 10; int32 num_photos_shared_occlusions = 11; string model_url = 12; + string ardk_version = 13; + int32 average_framerate = 14; + float average_battery_per_min = 15; + float average_cpu_usage = 16; + float average_gpu_usage = 17; + repeated FramerateSample framerate_samples = 18; + repeated BatterySample battery_samples = 19; + repeated ProcessorSample processor_samples = 20; + int32 session_start_to_plane_detection_ms = 21; + int32 plane_detection_to_user_interaction_ms = 22; } message ARPlusEncounterValuesProto { @@ -4904,6 +4993,15 @@ message ARPlusEncounterValuesProto { bool pokemon_frightened = 3; } +message ArTelemetrySettingsProto { + bool measure_battery = 1; + int32 battery_sampling_interval_ms = 2; + bool measure_processor = 3; + int32 processor_sampling_interval_ms = 4; + bool measure_framerate = 5; + int32 framerate_sampling_interval_ms = 6; +} + message AssetBundleDownloadTelemetry { AssetTelemetryIds asset_event_id = 1; string bundle_name = 2; @@ -5544,6 +5642,10 @@ message BuddyActivitySettings { int64 emotion_cooldown_duration_ms = 6; } +message BuddyConsumablesLogEntry { + LootProto rewards = 1; +} + message BuddyDataProto { message BuddyStoredStats { int64 window = 1; @@ -6180,9 +6282,12 @@ message ClientIncidentProto { } message ClientIncidentStepProto { - ClientInvasionBattleStepProto invasion_battle = 1; - ClientInvasionEncounterStepProto invasion_encounter = 2; - ClientPokestopNpcDialogueStepProto pokestop_dialogue = 3; + oneof ClientIncidentStep { + ClientInvasionBattleStepProto invasion_battle = 1; + ClientInvasionEncounterStepProto invasion_encounter = 2; + ClientPokestopNpcDialogueStepProto pokestop_dialogue = 3; + } + } message ClientInvasionBattleStepProto { @@ -6438,6 +6543,8 @@ message CombatHubEntranceTelemetry { } message CombatLeagueProto { + + enum ConditionType { UNSET = 0; WITH_POKEMON_CP_LIMIT = 1; @@ -6467,13 +6574,16 @@ message CombatLeagueProto { } message PokemonConditionProto { + oneof Condition { + WithPokemonCpLimitProto with_pokemon_cp_limit = 2; + WithPokemonTypeProto with_pokemon_type = 3; + WithPokemonCategoryProto with_pokemon_category = 4; + PokemonWhitelist pokemon_whitelist = 5; + PokemonBanlist pokemon_banlist = 6; + PokemonCaughtTimestamp pokemon_caught_timestamp = 7; + } + ConditionType type = 1; - WithPokemonCpLimitProto with_pokemon_cp_limit = 2; - WithPokemonTypeProto with_pokemon_type = 3; - WithPokemonCategoryProto with_pokemon_category = 4; - PokemonWhitelist pokemon_whitelist = 5; - PokemonBanlist pokemon_banlist = 6; - PokemonCaughtTimestamp pokemon_caught_timestamp = 7; } message PokemonWhitelist { @@ -6487,15 +6597,18 @@ message CombatLeagueProto { } message UnlockConditionProto { + oneof Condition { + WithPlayerLevelProto with_player_level = 3; + WithPokemonCpLimitProto with_pokemon_cp_limit = 4; + WithPokemonTypeProto with_pokemon_type = 5; + WithPokemonCategoryProto with_pokemon_category = 6; + PokemonWhitelist pokemon_whitelist = 7; + PokemonBanlist pokemon_banlist = 8; + PokemonCaughtTimestamp pokemon_caught_timestamp = 9; + } + ConditionType type = 1; int32 min_pokemon_count = 2; - WithPlayerLevelProto with_player_level = 3; - WithPokemonCpLimitProto with_pokemon_cp_limit = 4; - WithPokemonTypeProto with_pokemon_type = 5; - WithPokemonCategoryProto with_pokemon_category = 6; - PokemonWhitelist pokemon_whitelist = 7; - PokemonBanlist pokemon_banlist = 8; - PokemonCaughtTimestamp pokemon_caught_timestamp = 9; } string title = 1; @@ -7183,6 +7296,16 @@ message DeployPokemonTelemetry { int32 defender_count = 5; } +message DeviceOSTelemetry { + enum OSArchitecture { + UNSET = 0; + arch32_bit = 1; + arch64_bit = 2; + } + + OSArchitecture architecture = 1; +} + message DeviceServiceToggleTelemetry { DeviceServiceTelemetryIds device_service_telemetry_id = 1; bool was_enabled = 2; @@ -7226,7 +7349,14 @@ message DiskEncounterProto { } message Distribution { + message BucketOptions { + oneof BucketType { + LinearBuckets linear_buckets = 1; + ExponentialBuckets exponential_buckets = 2; + ExplicitBuckets explicit_buckets = 3; + } + message ExplicitBuckets { repeated int64 bounds = 1; } @@ -7243,9 +7373,6 @@ message Distribution { int64 offset = 3; } - LinearBuckets linear_buckets = 1; - ExponentialBuckets exponential_buckets = 2; - ExplicitBuckets explicit_buckets = 3; } message ExplicitBuckets { @@ -7558,6 +7685,17 @@ message EventBadgeSettingsProto { repeated HoloBadgeType mutually_exclusive_badges = 3; } +message EventBannerSectionProto { + string event_icon = 1; + string title_text = 2; + string body_text = 3; + string image_url = 4; + string header_image_url = 5; + string image_overlay_text = 6; + string link_from_image = 7; + string image_sub_text = 8; +} + message EventInfoProto { string image_url = 1; string icon_url = 2; @@ -7658,6 +7796,7 @@ message EvolutionBranchProto { bool only_nighttime = 11; int32 priority = 12; bool no_candy_cost_via_trade = 13; + repeated string quest_requirement_template_id = 17; } message EvolutionV2SettingsProto { @@ -7924,6 +8063,7 @@ message FortSearchLogEntry { repeated ItemProto bonus_items = 8; repeated ItemProto team_bonus_items = 9; repeated GiftBoxProto gift_boxes = 10; + repeated LootItemProto stickers = 11; } message FortSearchOutProto { @@ -8138,6 +8278,8 @@ message GameMasterClientTemplateProto { SponsoredGeofenceGiftSettingsProto sponsored_geofence_gift_settings = 84; StickerMetadataProto sticker_metadata = 85; CrossGameSocialSettingsProto cross_game_social_settings = 86; + MapDisplaySettingsProto map_display_settings = 87; + ArTelemetrySettingsProto ar_telemetry_settings = 90; } message GenerateCombatChallengeIdOutProto { @@ -8728,6 +8870,27 @@ message GetServerTimeOutProto { message GetServerTimeProto { } +message GetTimedGroupChallengeOutProto { + enum Status { + UNSET = 0; + SUCCESS = 1; + ERROR_UNKNOWN = 2; + ERROR_CHALLENGE_NOT_FOUND = 3; + } + + Status status = 1; + TimedGroupChallengeDefinitionProto challenge_definition = 2; + int32 current_score = 3; + int32 player_score = 4; + string active_city_hash = 5; + repeated string active_city_localization_key_changes = 6; +} + +message GetTimedGroupChallengeProto { + string challenge_id = 1; + string active_city_hash = 2; +} + message GetTodayViewOutProto { enum Status { UNSET = 0; @@ -8907,6 +9070,7 @@ message GlobalSettingsProto { DailyEncounterGlobalSettingsProto daily_encounter_settings = 54; RaidTicketSettingsProto raid_ticket_settings = 55; RocketBalloonGlobalSettingsProto rocket_balloon_settings = 56; + TimedGroupChallengeSettingsProto timed_group_challenge_settings = 57; LobbyClientSettingsProto lobby_client_settings = 59; } @@ -8926,6 +9090,16 @@ message GpsSettingsProto { int32 idle_speed_sample_count = 8; } +message GroupChallengeCriteriaProto { + QuestType challenge_type = 1; + QuestGoalProto challenge_goal = 2; +} + +message GroupChallengeDisplayProto { + string title = 1; + repeated EventSectionProto.BonusBoxProto boost_rewards = 2; +} + message GymBadgeGmtSettingsProto { repeated int32 target = 1; float battle_winning_score_per_defender_cp = 2; @@ -9221,114 +9395,124 @@ message HoloFitnessReportProto { } message HoloholoClientTelemetryOmniProto { - BootTime boot_time = 1; - FrameRate frame_rate = 2; - GenericClickTelemetry generic_click_telemetry = 3; - MapEventsTelemetry map_events_telemetry = 4; - SpinPokestopTelemetry spin_pokestop_telemetry = 5; - ProfilePageTelemetry profile_page_telemetry = 6; - ShoppingPageTelemetry shopping_page_telemetry = 7; - EncounterPokemonTelemetry encounter_pokemon_telemetry = 8; - CatchPokemonTelemetry catch_pokemon_telemetry = 9; - DeployPokemonTelemetry deploy_pokemon_telemetry = 10; - FeedPokemonTelemetry feed_pokemon_telemetry = 11; - EvolvePokemonTelemetry evolve_pokemon_telemetry = 12; - ReleasePokemonTelemetry release_pokemon_telemetry = 13; - NicknamePokemonTelemetry nickname_pokemon_telemetry = 14; - NewsPageTelemetry news_page_telemetry = 15; - ItemTelemetry item_telemetry = 16; - BattlePartyTelemetry battle_party_telemetry = 17; - PasscodeRedeemTelemetry passcode_redeem_telemetry = 18; - LinkLoginTelemetry link_login_telemetry = 19; - RaidTelemetry raid_telemetry = 20; - PushNotificationTelemetry push_notification_telemetry = 21; - AvatarCustomizationTelemetry avatar_customization_telemetry = 22; - ReadPointOfInterestDescriptionTelemetry read_point_of_interest_description_telemetry = 23; - WebTelemetry web_telemetry = 24; - ChangeArTelemetry change_ar_telemetry = 25; - WeatherDetailClickTelemetry weather_detail_click_telemetry = 26; - UserIssueWeatherReport user_issue_weather_report = 27; - PokemonInventoryTelemetry pokemon_inventory_telemetry = 28; - SocialTelemetry social_telemetry = 29; - CheckEncounterTrayInfoTelemetry check_encounter_info_telemetry = 30; - PokemonGoPlusTelemetry pokemon_go_plus_telemetry = 31; - RpcResponseTelemetry rpc_timing_telemetry = 32; - SocialGiftCountTelemetry social_gift_count_telemetry = 33; - AssetBundleDownloadTelemetry asset_bundle_telemetry = 34; - AssetPoiDownloadTelemetry asset_poi_download_telemetry = 35; - AssetStreamDownloadTelemetry asset_stream_download_telemetry = 36; - AssetStreamCacheCulledTelemetry asset_stream_cache_culled_telemetry = 37; - RpcSocketResponseTelemetry rpc_socket_timing_telemetry = 38; - PermissionsFlowTelemetry permissions_flow = 39; - DeviceServiceToggleTelemetry device_service_toggle = 40; - BootTelemetry boot_telemetry = 41; - UserAttributesProto user_attributes = 42; - OnboardingTelemetry onboarding_telemetry = 43; - LoginActionTelemetry login_action_telemetry = 44; - ArPhotoSessionProto ar_photo_session_telemetry = 45; - InvasionTelemetry invasion_telemetry = 46; - CombatMinigameTelemetry combat_minigame_telemetry = 47; - LeavePointOfInterestTelemetry leave_point_of_interest_telemetry = 48; - ViewPointOfInterestImageTelemetry view_point_of_interest_image_telemetry = 49; - CombatHubEntranceTelemetry combat_hub_entrance_telemetry = 50; - LeaveInteractionRangeTelemetry leave_interaction_range_telemetry = 51; - ShoppingPageClickTelemetry shopping_page_click_telemetry = 52; - ShoppingPageScrollTelemetry shopping_page_scroll_telemetry = 53; - DeviceSpecificationsTelemetry device_specifications_telemetry = 54; - ScreenResolutionTelemetry screen_resolution_telemetry = 55; - ARBuddyMultiplayerSessionTelemetry ar_buddy_multiplayer_session_telemetry = 56; - BuddyMultiplayerConnectionFailedProto buddy_multiplayer_connection_failed_telemetry = 57; - BuddyMultiplayerConnectionSucceededProto buddy_multiplayer_connection_succeeded_telemetry = 58; - BuddyMultiplayerTimeToGetSessionProto buddy_multiplayer_time_to_get_session_telemetry = 59; - PlayerHudNotificationClickTelemetry player_hud_notification_click_telemetry = 60; - MonodepthDownloadTelemetry monodepth_download_telemetry = 61; - ArMappingTelemetryProto ar_mapping_telemetry = 62; - RemoteRaidTelemetry remote_raid_telemetry = 63; + oneof TelemetryData { + BootTime boot_time = 1; + FrameRate frame_rate = 2; + GenericClickTelemetry generic_click_telemetry = 3; + MapEventsTelemetry map_events_telemetry = 4; + SpinPokestopTelemetry spin_pokestop_telemetry = 5; + ProfilePageTelemetry profile_page_telemetry = 6; + ShoppingPageTelemetry shopping_page_telemetry = 7; + EncounterPokemonTelemetry encounter_pokemon_telemetry = 8; + CatchPokemonTelemetry catch_pokemon_telemetry = 9; + DeployPokemonTelemetry deploy_pokemon_telemetry = 10; + FeedPokemonTelemetry feed_pokemon_telemetry = 11; + EvolvePokemonTelemetry evolve_pokemon_telemetry = 12; + ReleasePokemonTelemetry release_pokemon_telemetry = 13; + NicknamePokemonTelemetry nickname_pokemon_telemetry = 14; + NewsPageTelemetry news_page_telemetry = 15; + ItemTelemetry item_telemetry = 16; + BattlePartyTelemetry battle_party_telemetry = 17; + PasscodeRedeemTelemetry passcode_redeem_telemetry = 18; + LinkLoginTelemetry link_login_telemetry = 19; + RaidTelemetry raid_telemetry = 20; + PushNotificationTelemetry push_notification_telemetry = 21; + AvatarCustomizationTelemetry avatar_customization_telemetry = 22; + ReadPointOfInterestDescriptionTelemetry read_point_of_interest_description_telemetry = 23; + WebTelemetry web_telemetry = 24; + ChangeArTelemetry change_ar_telemetry = 25; + WeatherDetailClickTelemetry weather_detail_click_telemetry = 26; + UserIssueWeatherReport user_issue_weather_report = 27; + PokemonInventoryTelemetry pokemon_inventory_telemetry = 28; + SocialTelemetry social_telemetry = 29; + CheckEncounterTrayInfoTelemetry check_encounter_info_telemetry = 30; + PokemonGoPlusTelemetry pokemon_go_plus_telemetry = 31; + RpcResponseTelemetry rpc_timing_telemetry = 32; + SocialGiftCountTelemetry social_gift_count_telemetry = 33; + AssetBundleDownloadTelemetry asset_bundle_telemetry = 34; + AssetPoiDownloadTelemetry asset_poi_download_telemetry = 35; + AssetStreamDownloadTelemetry asset_stream_download_telemetry = 36; + AssetStreamCacheCulledTelemetry asset_stream_cache_culled_telemetry = 37; + RpcSocketResponseTelemetry rpc_socket_timing_telemetry = 38; + PermissionsFlowTelemetry permissions_flow = 39; + DeviceServiceToggleTelemetry device_service_toggle = 40; + BootTelemetry boot_telemetry = 41; + UserAttributesProto user_attributes = 42; + OnboardingTelemetry onboarding_telemetry = 43; + LoginActionTelemetry login_action_telemetry = 44; + ArPhotoSessionProto ar_photo_session_telemetry = 45; + InvasionTelemetry invasion_telemetry = 46; + CombatMinigameTelemetry combat_minigame_telemetry = 47; + LeavePointOfInterestTelemetry leave_point_of_interest_telemetry = 48; + ViewPointOfInterestImageTelemetry view_point_of_interest_image_telemetry = 49; + CombatHubEntranceTelemetry combat_hub_entrance_telemetry = 50; + LeaveInteractionRangeTelemetry leave_interaction_range_telemetry = 51; + ShoppingPageClickTelemetry shopping_page_click_telemetry = 52; + ShoppingPageScrollTelemetry shopping_page_scroll_telemetry = 53; + DeviceSpecificationsTelemetry device_specifications_telemetry = 54; + ScreenResolutionTelemetry screen_resolution_telemetry = 55; + ARBuddyMultiplayerSessionTelemetry ar_buddy_multiplayer_session_telemetry = 56; + BuddyMultiplayerConnectionFailedProto buddy_multiplayer_connection_failed_telemetry = 57; + BuddyMultiplayerConnectionSucceededProto buddy_multiplayer_connection_succeeded_telemetry = 58; + BuddyMultiplayerTimeToGetSessionProto buddy_multiplayer_time_to_get_session_telemetry = 59; + PlayerHudNotificationClickTelemetry player_hud_notification_click_telemetry = 60; + MonodepthDownloadTelemetry monodepth_download_telemetry = 61; + ArMappingTelemetryProto ar_mapping_telemetry = 62; + RemoteRaidTelemetry remote_raid_telemetry = 63; + DeviceOSTelemetry device_os_telemetry = 64; + } + PlatformPlatformServerData server_data = 1001; PlatformPlatformCommonFilterProto common_filters = 1002; } message HoloInventoryItemProto { - PokemonProto pokemon = 1; - ItemProto item = 2; - PokedexEntryProto pokedex_entry = 3; - PlayerStatsProto player_stats = 4; - PlayerCurrencyProto player_currency = 5; - PlayerCameraProto player_camera = 6; - InventoryUpgradesProto inventory_upgrades = 7; - AppliedItemsProto applied_items = 8; - EggIncubatorsProto egg_incubators = 9; - PokemonFamilyProto pokemon_family = 10; - QuestProto quest = 11; - AvatarItemProto avatar_item = 12; - RaidTicketsProto raid_tickets = 13; - QuestsProto quests = 14; - GiftBoxesProto gift_boxes = 15; - BelugaIncenseBoxProto beluga_incense = 16; - LimitedPurchaseSkuRecordProto limited_purchase_sku_record = 19; - StickerProto sticker = 22; + oneof Type { + PokemonProto pokemon = 1; + ItemProto item = 2; + PokedexEntryProto pokedex_entry = 3; + PlayerStatsProto player_stats = 4; + PlayerCurrencyProto player_currency = 5; + PlayerCameraProto player_camera = 6; + InventoryUpgradesProto inventory_upgrades = 7; + AppliedItemsProto applied_items = 8; + EggIncubatorsProto egg_incubators = 9; + PokemonFamilyProto pokemon_family = 10; + QuestProto quest = 11; + AvatarItemProto avatar_item = 12; + RaidTicketsProto raid_tickets = 13; + QuestsProto quests = 14; + GiftBoxesProto gift_boxes = 15; + BelugaIncenseBoxProto beluga_incense = 16; + LimitedPurchaseSkuRecordProto limited_purchase_sku_record = 19; + StickerProto sticker = 22; + } + } message HoloInventoryKeyProto { - fixed64 pokemon_id = 1; - Item item = 2; - int32 pokedex_entry_id = 3; - bool player_stats = 4; - bool player_currency = 5; - bool player_camera = 6; - bool inventory_upgrades = 7; - bool applied_items = 8; - bool egg_incubators = 9; - int32 pokemon_family_id = 10; - QuestType quest_type = 11; - string avatar_template_id = 12; - bool raid_tickets = 13; - bool quests = 14; - bool gift_boxes = 15; - bool beluga_incense_box = 16; - bool vs_seeker_upgrades = 17; - bool limited_purchase_sku_record = 19; - string sticker_id = 22; + oneof Type { + fixed64 pokemon_id = 1; + Item item = 2; + int32 pokedex_entry_id = 3; + bool player_stats = 4; + bool player_currency = 5; + bool player_camera = 6; + bool inventory_upgrades = 7; + bool applied_items = 8; + bool egg_incubators = 9; + int32 pokemon_family_id = 10; + QuestType quest_type = 11; + string avatar_template_id = 12; + bool raid_tickets = 13; + bool quests = 14; + bool gift_boxes = 15; + bool beluga_incense_box = 16; + bool vs_seeker_upgrades = 17; + bool limited_purchase_sku_record = 19; + string sticker_id = 22; + } + } message IapItemCategoryDisplayProto { @@ -9746,10 +9930,13 @@ message LevelUpRewardsProto { } message LimitedEditionPokemonEncounterRewardProto { + oneof Limit { + int32 lifetime_max_count = 3; + int32 per_competitive_combat_season_max_count = 4; + } + PokemonEncounterRewardProto pokemon = 1; string identifier = 2; - int32 lifetime_max_count = 3; - int32 per_competitive_combat_season_max_count = 4; } message LimitedPurchaseSkuRecordProto { @@ -9889,15 +10076,18 @@ message LoginSettingsProto { } message LootItemProto { - Item item = 1; - bool stardust = 2; - bool pokecoin = 3; - HoloPokemonId pokemon_candy = 4; + oneof Type { + Item item = 1; + bool stardust = 2; + bool pokecoin = 3; + HoloPokemonId pokemon_candy = 4; + bool experience = 6; + PokemonProto pokemon_egg = 7; + string avatar_template_id = 8; + string sticker_id = 9; + } + int32 count = 5; - bool experience = 6; - PokemonProto pokemon_egg = 7; - string avatar_template_id = 8; - string sticker_id = 9; } message LootProto { @@ -9922,6 +10112,23 @@ message MapBuddySettingsProto { float glide_max_speed = 11; } +message MapDisplaySettingsProto { + enum MapEffect { + EFFECT_NONE = 0; + EFFECT_CONFETTI_BASIC = 1; + EFFECT_CONFETTI_FIRE = 2; + EFFECT_CONFETTI_WATER = 3; + EFFECT_CONFETTI_GRASS = 4; + EFFECT_CONFETTI_RAID_BATTLE = 5; + EFFECT_CONFETTI_FRIENDSHIP = 6; + EFFECT_CONFETTI_ROCKET = 7; + EFFECT_FIREWORKS_PLAIN = 8; + } + + MapEffect map_effect = 1; + string research_icon_url = 2; +} + message MapEventsTelemetry { MapEventsTelemetryIds map_event_click_id = 1; string fort_id = 2; @@ -10369,6 +10576,13 @@ message PlannedDowntimeSettingsProto { } message PlatformMetricData { + oneof DatapointValue { + int64 long_value = 2; + double double_value = 3; + bool boolean_value = 4; + Distribution distribution = 5; + } + enum Kind { UNSPECIFIED = 0; GAUGE = 1; @@ -10377,10 +10591,6 @@ message PlatformMetricData { } TelemetryCommon common_telemetry = 1; - int64 long_value = 2; - double double_value = 3; - bool boolean_value = 4; - Distribution distribution = 5; Kind metric_kind = 6; } @@ -10512,6 +10722,7 @@ message PlayerPublicProfileProto { bool has_shared_ex_pass = 11; int32 combat_rank = 12; float combat_rating = 13; + TimedGroupChallengePlayerStatsProto timed_group_challenge_stats = 14; } message PlayerRaidInfoProto { @@ -10620,6 +10831,7 @@ message PokedexEntryProto { bool encountered_shiny = 13; int32 times_lucky_received = 14; int32 times_purified = 15; + repeated PokemonDisplayProto.Form captured_shiny_forms = 17; } message PokemonBulkUpgradeSettingsProto { @@ -10678,6 +10890,7 @@ message PokemonDisplayProto { JOHTO_2020_NOEVOLVE = 23; HOENN_2020_NOEVOLVE = 24; SINNOH_2020_NOEVOLVE = 25; + HALLOWEEN_2020 = 26; } enum Form { @@ -12747,10 +12960,15 @@ message PokemonDisplayProto { DRAGONITE_COSTUME_2020 = 2333; ONIX_COSTUME_2020 = 2334; MEOWTH_GALARIAN = 2335; + PONYTA_GALARIAN = 2336; + RAPIDASH_GALARIAN = 2337; FARFETCHD_GALARIAN = 2338; + MR_MIME_GALARIAN = 2339; + CORSOLA_GALARIAN = 2340; DARUMAKA_GALARIAN = 2341; DARMANITAN_GALARIAN_STANDARD = 2342; DARMANITAN_GALARIAN_ZEN = 2343; + YAMASK_GALARIAN = 2344; STUNFISK_GALARIAN = 2345; OBSTAGOON_NORMAL = 2501; OBSTAGOON_SHADOW = 2502; @@ -12761,6 +12979,10 @@ message PokemonDisplayProto { SIRFETCHD_NORMAL = 2510; SIRFETCHD_SHADOW = 2511; SIRFETCHD_PURIFIED = 2512; + SLOWPOKE_GALARIAN = 2582; + SLOWBRO_GALARIAN = 2583; + LAPRAS_COSTUME_2020 = 2585; + GENGAR_COSTUME_2020 = 2586; } enum Gender { @@ -12801,8 +13023,11 @@ message PokemonEncounterAttributesProto { } message PokemonEncounterRewardProto { - HoloPokemonId pokemon_id = 1; - bool use_quest_pokemon_encounter_distribuition = 2; + oneof Type { + HoloPokemonId pokemon_id = 1; + bool use_quest_pokemon_encounter_distribuition = 2; + } + PokemonDisplayProto pokemon_display = 3; bool is_hidden_ditto = 4; PokemonDisplayProto ditto_display = 5; @@ -12926,6 +13151,7 @@ message PokemonProto { double deployed_gym_lat_degree = 55; double deployed_gym_lng_degree = 56; HoloPokemonEggType egg_type = 58; + repeated ClientQuestProto quest_buddy_evolution_requirement = 62; } message PokemonScaleSettingProto { @@ -13049,6 +13275,11 @@ message PokemonUpgradeSettingsProto { } message PokestopIncidentDisplayProto { + oneof MapDisplay { + CharacterDisplayProto character_display = 10; + InvasionFinishedDisplayProto invasion_finished = 11; + } + string incident_id = 1; int64 incident_start_ms = 2; int64 incident_expiration_ms = 3; @@ -13057,8 +13288,6 @@ message PokestopIncidentDisplayProto { IncidentDisplayType incident_display_type = 6; int32 incident_display_order_priority = 7; bool continue_displaying_incident = 8; - CharacterDisplayProto character_display = 10; - InvasionFinishedDisplayProto invasion_finished = 11; } message PokestopReward { @@ -13125,6 +13354,34 @@ message PushNotificationTelemetry { } message QuestConditionProto { + oneof Condition { + WithPokemonTypeProto with_pokemon_type = 2; + WithPokemonCategoryProto with_pokemon_category = 3; + WithWeatherBoostProto with_weather_boost = 4; + WithDailyCaptureBonusProto with_daily_capture_bonus = 5; + WithDailySpinBonusProto with_daily_spin_bonus = 6; + WithWinRaidStatusProto with_win_raid_status = 7; + WithRaidLevelProto with_raid_level = 8; + WithThrowTypeProto with_throw_type = 9; + WithWinGymBattleStatusProto with_win_gym_battle_status = 10; + WithSuperEffectiveChargeMoveProto with_super_effective_charge_move = 11; + WithItemProto with_item = 12; + WithUniquePokestopProto with_unique_pokestop = 13; + WithQuestContextProto with_quest_context = 14; + WithBadgeTypeProto with_badge_type = 15; + WithPlayerLevelProto with_player_level = 16; + WithWinBattleStatusProto with_win_battle_status = 17; + WithUniquePokemonProto with_unique_pokemon = 18; + WithNpcCombatProto with_npc_combat = 19; + WithPvpCombatProto with_pvp_combat = 20; + WithLocationProto with_location = 21; + WithDistanceProto with_distance = 22; + WithInvasionCharacterProto with_invasion_character = 23; + WithPokemonAlignmentProto with_pokemon_alignment = 24; + WithBuddyProto with_buddy = 25; + WithDailyBuddyAffectionProto with_daily_buddy_affection = 26; + } + enum ConditionType { UNSET = 0; WITH_POKEMON_TYPE = 1; @@ -13160,31 +13417,6 @@ message QuestConditionProto { } ConditionType type = 1; - WithPokemonTypeProto with_pokemon_type = 2; - WithPokemonCategoryProto with_pokemon_category = 3; - WithWeatherBoostProto with_weather_boost = 4; - WithDailyCaptureBonusProto with_daily_capture_bonus = 5; - WithDailySpinBonusProto with_daily_spin_bonus = 6; - WithWinRaidStatusProto with_win_raid_status = 7; - WithRaidLevelProto with_raid_level = 8; - WithThrowTypeProto with_throw_type = 9; - WithWinGymBattleStatusProto with_win_gym_battle_status = 10; - WithSuperEffectiveChargeMoveProto with_super_effective_charge_move = 11; - WithItemProto with_item = 12; - WithUniquePokestopProto with_unique_pokestop = 13; - WithQuestContextProto with_quest_context = 14; - WithBadgeTypeProto with_badge_type = 15; - WithPlayerLevelProto with_player_level = 16; - WithWinBattleStatusProto with_win_battle_status = 17; - WithUniquePokemonProto with_unique_pokemon = 18; - WithNpcCombatProto with_npc_combat = 19; - WithPvpCombatProto with_pvp_combat = 20; - WithLocationProto with_location = 21; - WithDistanceProto with_distance = 22; - WithInvasionCharacterProto with_invasion_character = 23; - WithPokemonAlignmentProto with_pokemon_alignment = 24; - WithBuddyProto with_buddy = 25; - WithDailyBuddyAffectionProto with_daily_buddy_affection = 26; } message QuestDialogProto { @@ -13264,6 +13496,15 @@ message QuestPokemonEncounterProto { } message QuestPreconditionProto { + oneof Condition { + string quest_template_id = 2; + Level level = 3; + Medal medal = 4; + Quests quests = 5; + MonthYearBucket month_year_bucket = 6; + Group group = 7; + } + enum Name { UNSET_NAME = 0; GIOVANNI = 1; @@ -13319,12 +13560,6 @@ message QuestPreconditionProto { } QuestPreconditionType type = 1; - string quest_template_id = 2; - Level level = 3; - Medal medal = 4; - Quests quests = 5; - MonthYearBucket month_year_bucket = 6; - Group group = 7; } message QuestProto { @@ -13334,6 +13569,18 @@ message QuestProto { CHALLENGE_QUEST = 2; DAILY_COIN_QUEST = 3; TIMED_STORY_QUEST = 4; + TGC_TRACKING_QUEST = 7; + } + + oneof Quest { + DailyQuestProto daily_quest = 2; + MultiPartQuestProto multi_part = 3; + CatchPokemonQuestProto catch_pokemon = 4; + AddFriendQuestProto add_friend = 5; + TradePokemonQuestProto trade_pokemon = 6; + DailyBuddyAffectionQuestProto daily_buddy_affection = 7; + QuestWalkProto quest_walk = 8; + EvolveIntoPokemonQuestProto evolve_into_pokemon = 9; } enum Status { @@ -13343,14 +13590,6 @@ message QuestProto { } QuestType quest_type = 1; - DailyQuestProto daily_quest = 2; - MultiPartQuestProto multi_part = 3; - CatchPokemonQuestProto catch_pokemon = 4; - AddFriendQuestProto add_friend = 5; - TradePokemonQuestProto trade_pokemon = 6; - DailyBuddyAffectionQuestProto daily_buddy_affection = 7; - QuestWalkProto quest_walk = 8; - EvolveIntoPokemonQuestProto evolve_into_pokemon = 9; DaysWithARowQuestProto days_in_arow = 99; string quest_id = 100; int64 quest_seed = 101; @@ -13375,6 +13614,18 @@ message QuestProto { } message QuestRewardProto { + oneof Reward { + int32 exp = 2; + ItemRewardProto item = 3; + int32 stardust = 4; + PokemonCandyRewardProto candy = 5; + string avatar_template_id = 6; + string quest_template_id = 7; + PokemonEncounterRewardProto pokemon_encounter = 8; + int32 pokecoin = 9; + StickerRewardProto sticker = 12; + } + enum Type { UNSET = 0; EXPERIENCE = 1; @@ -13389,15 +13640,6 @@ message QuestRewardProto { } Type type = 1; - int32 exp = 2; - ItemRewardProto item = 3; - int32 stardust = 4; - PokemonCandyRewardProto candy = 5; - string avatar_template_id = 6; - string quest_template_id = 7; - PokemonEncounterRewardProto pokemon_encounter = 8; - int32 pokecoin = 9; - StickerRewardProto sticker = 12; } message QuestSettingsProto { @@ -13460,6 +13702,7 @@ message RaidClientSettingsProto { int64 invite_cooldown_duration_millis = 11; int32 max_num_friend_invites_per_action = 12; repeated RaidLevel unsupported_raid_levels_for_friend_invites = 13; + repeated RaidLevel unsupported_remote_raid_levels = 14; } message RaidEncounterProto { @@ -13536,6 +13779,7 @@ message RaidRewardsLogEntry { repeated ItemProto items = 3; repeated ItemProto default_rewards = 4; int32 stardust = 5; + repeated LootItemProto stickers = 6; } message RaidTelemetry { @@ -13926,6 +14170,7 @@ message SetAvatarOutProto { SLOT_NOT_ALLOWED = 4; ITEM_NOT_OWNED = 5; INVALID_AVATAR_TYPE = 6; + AVATAR_RESET = 7; } Status status = 1; @@ -14106,6 +14351,7 @@ message ShoppingPageClickTelemetry { ShoppingPageTelemetrySource shopping_page_click_source = 2; string item_sku = 3; bool has_item = 4; + string ml_bundle_tracking_id = 5; } message ShoppingPageScrollTelemetry { @@ -14388,6 +14634,34 @@ message ThirdMoveGlobalSettingsProto { bool unlock_enabled = 1; } +message TimedGroupChallengeDefinitionProto { + string challenge_id = 1; + GroupChallengeDisplayProto display = 2; + int64 start_time_ms_inclusive = 3; + int64 end_time_ms_exclusive = 4; + GroupChallengeCriteriaProto challenge_criteria = 5; +} + +message TimedGroupChallengePlayerStatsProto { + message IndividualChallengeStats { + string challenge_id = 1; + int32 player_score = 2; + } + + repeated IndividualChallengeStats challenges = 1; +} + +message TimedGroupChallengeSectionProto { + string challenge_id = 1; + string header_image_url = 2; +} + +message TimedGroupChallengeSettingsProto { + int32 widget_auto_update_period_ms = 1; + int64 friend_leaderboard_background_update_period_ms = 2; + int32 friend_leaderboard_friends_per_rpc = 3; +} + message TimedQuestSectionProto { string quest_id = 1; } @@ -14397,12 +14671,17 @@ message TodayViewProto { } message TodayViewSectionProto { - PokecoinSectionProto pokecoin = 1; - GymPokemonSectionProto gym_pokemon = 2; - DailyStreaksProto streaks = 3; - EventSectionProto event = 4; - UpNextSectionProto up_next = 5; - TimedQuestSectionProto timed_quest = 6; + oneof Section { + PokecoinSectionProto pokecoin = 1; + GymPokemonSectionProto gym_pokemon = 2; + DailyStreaksProto streaks = 3; + EventSectionProto event = 4; + UpNextSectionProto up_next = 5; + TimedQuestSectionProto timed_quest = 6; + EventBannerSectionProto event_banner = 7; + TimedGroupChallengeSectionProto timed_group_challenge = 8; + } + } message TradePokemonQuestProto { @@ -15041,12 +15320,16 @@ message VsSeekerCompleteSeasonLogEntry { } message VsSeekerLootProto { + message RewardProto { - LootItemProto item = 1; - bool pokemon_reward = 2; - bool item_loot_table = 3; - int32 item_loot_table_count = 4; - int32 item_ranking_loot_table_count = 5; + oneof RewardType { + LootItemProto item = 1; + bool pokemon_reward = 2; + bool item_loot_table = 3; + int32 item_loot_table_count = 4; + int32 item_ranking_loot_table_count = 5; + } + } int32 rank_level = 1; @@ -15055,15 +15338,23 @@ message VsSeekerLootProto { } message VsSeekerPokemonRewardsProto { + + message OverrideIvRangeProto { - RangeProto range = 1; - bool zero = 2; + oneof OverrideType { + RangeProto range = 1; + bool zero = 2; + } + } message PokemonUnlockProto { - PokemonEncounterRewardProto pokemon = 1; - LimitedEditionPokemonEncounterRewardProto limited_pokemon_reward = 2; - LimitedEditionPokemonEncounterRewardProto guaranteed_limited_pokemon_reward = 3; + oneof RewardType { + PokemonEncounterRewardProto pokemon = 1; + LimitedEditionPokemonEncounterRewardProto limited_pokemon_reward = 2; + LimitedEditionPokemonEncounterRewardProto guaranteed_limited_pokemon_reward = 3; + } + int32 unlocked_at_rank = 4; float weight = 5; OverrideIvRangeProto attack_iv_override = 6; @@ -15282,8 +15573,11 @@ message WithSuperEffectiveChargeMoveProto { } message WithThrowTypeProto { - HoloActivityType throw_type = 1; - bool hit = 2; + oneof Throw { + HoloActivityType throw_type = 1; + bool hit = 2; + } + } message WithUniquePokemonProto { @@ -15423,6 +15717,7 @@ enum PresentationType { PRESENTATION_TYPE_CATEGORY = 1; PRESENTATION_TYPE_SORT = 2; PRESENTATION_TYPE_SALE = 3; + PRESENTATION_TYPE_ML_BUNDLE_TRACKING_ID = 4; } enum PoiImageType { @@ -15432,12 +15727,15 @@ enum PoiImageType { } message PlatformApprovedCommonTelemetryProto { - PlatformCommonTelemetryBootTime boot_time = 1; - PlatformCommonTelemetryShopClick shop_click = 2; - PlatformCommonTelemetryShopView shop_view = 3; - PlatformPoiSubmissionTelemetry poi_submission_telemetry = 4; - PlatformPoiSubmissionPhotoUploadErrorTelemetry poi_submission_photo_upload_error_telemetry = 5; - PlatformCommonTelemetryLogIn log_in = 6; + oneof TelemetryData { + PlatformCommonTelemetryBootTime boot_time = 1; + PlatformCommonTelemetryShopClick shop_click = 2; + PlatformCommonTelemetryShopView shop_view = 3; + PlatformPoiSubmissionTelemetry poi_submission_telemetry = 4; + PlatformPoiSubmissionPhotoUploadErrorTelemetry poi_submission_photo_upload_error_telemetry = 5; + PlatformCommonTelemetryLogIn log_in = 6; + } + PlatformServerRecordMetadata server_data = 7; PlatformClientTelemetryCommonFilterProto common_filters = 8; } @@ -15670,6 +15968,13 @@ message ImageTextCreativeProto { } message ReportAdInteractionProto { + oneof InteractionType { + ViewImpressionInteraction view_impression = 5; + ViewFullscreenInteraction view_fullscreen = 6; + FullScreenInteraction fullscreen_interaction = 7; + CTAClickInteraction cta_clicked = 8; + } + message CTAClickInteraction { string cta_url = 6; } @@ -15694,10 +15999,6 @@ message ReportAdInteractionProto { string user_id = 2; string guid = 3; bytes encrypted_ad_token = 4; - ViewImpressionInteraction view_impression = 5; - ViewFullscreenInteraction view_fullscreen = 6; - FullScreenInteraction fullscreen_interaction = 7; - CTAClickInteraction cta_clicked = 8; } message ReportAdInteractionResponse { diff --git a/src/static/version.json b/src/static/version.json deleted file mode 100644 index eb976bf..0000000 --- a/src/static/version.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "v": "2.0 Beta" -} diff --git a/src/subscriptions/invasion.js b/src/subscriptions/invasion.js index 87a743c..df884f4 100644 --- a/src/subscriptions/invasion.js +++ b/src/subscriptions/invasion.js @@ -29,14 +29,14 @@ module.exports = async (WDR, invasion, area, server, timezone) => { // // // CHECK FOR GRUNT TYPE // if(!WDR.Master.grunt_types[invasion.grunt_type]){ - // return //console.error("[subs/invasion.js] ["+WDR.Time(null,'stamp')+"] No Grunt found for "+invasion.grunt_type+" in Grunts.json."); + // return //WDR.Console.error(WDR, "[subs/invasion.js] ["+WDR.Time(null,'stamp')+"] No Grunt found for "+invasion.grunt_type+" in Grunts.json."); // } // // // CONVERT INVASION LIST TO AN ARRAY // let invasion_subs = JSON.parse(user.invasion); // let type = WDR.Master.grunt_types[invasion.grunt_type].type; // if(!type){ - // return //console.error("[subs/invasion.js] ["+WDR.Time(null,'stamp')+"] No Grunt found for "+invasion.grunt_type+" in Grunts.json."); + // return //WDR.Console.error(WDR, "[subs/invasion.js] ["+WDR.Time(null,'stamp')+"] No Grunt found for "+invasion.grunt_type+" in Grunts.json."); // } // let gender = WDR.Master.grunt_types[invasion.grunt_type].gender; // diff --git a/src/subscriptions/pokemon.js b/src/subscriptions/pokemon.js index 9a0e28a..16d5df1 100644 --- a/src/subscriptions/pokemon.js +++ b/src/subscriptions/pokemon.js @@ -1,114 +1,157 @@ module.exports = async (WDR, Sighting) => { - let S = Sighting; - let Create_Sub_Embed = require(__dirname + "/../embeds/pokemon.js"); + Sighting.form_id = Sighting.form_id ? Sighting.form_id : 0; - S.form_id = S.form_id ? S.form_id : 0; - - let size = S.size == 0 ? S.size : S.size.toLowerCase(); + let size = Sighting.size == 0 ? Sighting.size : Sighting.size.toLowerCase(); switch (true) { - case (S.Area.Default != undefined): - case (S.Area.Main != undefined): - case (S.Area.Sub != undefined): - - let query = `SELECT - * - FROM - wdr_subscriptions - WHERE - status = 1 - AND (pokemon_id = ${S.pokemon_id} OR pokemon_id = 0) - AND (geofence LIKE '%${S.Area.Default}%' OR geofence LIKE '%${S.Area.Main}%' OR geofence LIKE '%${S.Area.Sub}%') - AND (form = ${S.form_id} OR form = 0) - AND min_iv <= ${S.internal_value} - AND max_iv >= ${S.internal_value} - AND min_lvl <= ${S.pokemon_level} - AND max_lvl >= ${S.pokemon_level} - AND (size = '${size}' OR size = 0) - AND (gender = ${S.gender_id} OR gender = 0) - AND (generation = ${S.gen} OR generation = 0);`; + case (Sighting.area.default != undefined): + case (Sighting.area.main != undefined): + case (Sighting.area.sub != undefined): - WDR.wdrDB.query( - `SELECT + let query = ` + SELECT * - FROM + FROM wdr_subscriptions - WHERE + WHERE status = 1 - AND (pokemon_id = ${S.pokemon_id} OR pokemon_id = 0) - AND (geofence LIKE '%${S.Area.Default}%' OR geofence LIKE '%${S.Area.Main}%' OR geofence LIKE '%${S.Area.Sub}%') - AND (form = ${S.form_id} OR form = 0) - AND min_iv <= ${S.internal_value} - AND max_iv >= ${S.internal_value} - AND min_lvl <= ${S.pokemon_level} - AND max_lvl >= ${S.pokemon_level} + AND sub_type = 'pokemon' + AND (pokemon_id = ${Sighting.pokemon_id} OR pokemon_id = 0) + AND (form = ${Sighting.form_id} OR form = 0) + AND min_iv <= ${Sighting.internal_value} + AND max_iv >= ${Sighting.internal_value} + AND min_lvl <= ${Sighting.pokemon_level} + AND max_lvl >= ${Sighting.pokemon_level} AND (size = '${size}' OR size = 0) - AND (gender = ${S.gender_id} OR gender = 0) - AND (generation = ${S.gen} OR generation = 0);`, - function(error, matching, fields) { + AND (gender = ${Sighting.gender_id} OR gender = 0) + AND (generation = ${Sighting.gen} OR generation = 0); + `; + + WDR.wdrDB.query( + query, + async function(error, matching, fields) { if (error) { - console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Querying Subscriptions.\n").bold.brightRed); - console.error(query); - return console.error(error); + WDR.Console.error("[commands/pokemon.js] Error Querying Subscriptions.", [query, error]); } else if (matching && matching[0]) { + for (let m = 0, mlen = matching.length; m < mlen; m++) { - S.Embed = matching[0].embed ? matching[0].embed : "pokemon_iv.js"; let User = matching[m]; - Create_Sub_Embed(WDR, User, null, S); + + let defGeo = (User.geofence.indexOf(Sighting.area.default) >= 0); + let mainGeo = (User.geofence.indexOf(Sighting.area.main) >= 0); + let subGeo = (User.geofence.indexOf(Sighting.area.sub) >= 0); + + // CHECK FILTER GEOFENCES + if (defGeo || mainGeo || subGeo) { + Send_Subscription(WDR, Sighting, User); + } else { + let values = User.geofence.split(";"); + if (values.length == 3) { + let coords = { + lat1: Sighting.latitude, + lon1: Sighting.longitude, + lat2: values[0], + lon2: values[1] + }; + let distance = await WDR.Get_Distance(WDR, coords); + if (distance <= values[2]) { + Send_Subscription(WDR, Sighting, User); + } + } + } } } } ); } - // WDR.wdrDB.query( - // `SELECT - // * - // FROM - // wdr_subscriptions - // WHERE - // status = 1 - // AND (pokemon_id = ${S.pokemon_id} OR pokemon_id = 0), - // AND (form = ${S.form} OR form = 0), - // AND min_iv <= ${S.internal_value}, - // AND max_iv >= ${S.internal_value}, - // AND min_lvl <= ${S.pokemon_level}, - // AND max_lvl >= ${S.pokemon_level}, - // AND (size = '${S.size.toLowerCase()}' OR size = 0), - // AND (gender = '${S.gender_id}' OR gender = 0), - // AND (generation = ${S.gen} OR generation = 0);`, - // async function(error, matching, fields) { - // if (matching && matching[0]) { - // for (let m = 0, mlen = matching.length; m < mlen; m++) { - // let Sub = matching[m]; - // if (sub.distance > 0 && Sub.coords) { - // let distance = await get_distance(WDR, Sighting, Sub); - // if (distance < Sub.distance) { - // Create_Sub_Embed(WDR, Sub, Sighting); - // } - // } - // } - // } - // } - // ); - // END return; } -function get_distance(WDR, Sighting, User) { - return new Promise(async resolve => { - let coords = User.coords.split(",")[0] - let spawn_loc = { - lat: S.lat, - lon: S.lon - }; - let user_loc = { - lat: coords[0], - lon: coords[1] - } - let spawn_distance = WDR.Distance.between(spawn_loc, user_loc); - return resolve(spawn_distance); +async function Send_Subscription(WDR, Sighting, User) { + + let match = {}; + + match.embed = "pokemon_iv.js"; + + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + match.embed); + + match.typing = await WDR.Get_Typing(WDR, { + pokemon_id: Sighting.pokemon_id, + form: Sighting.form + }); + + match.sprite = WDR.Get_Sprite(WDR, { + pokemon_id: Sighting.pokemon_id, + form: Sighting.form_id }); + + match.type = match.typing.type; + match.type_noemoji = match.typing.type_noemoji; + + match.color = match.typing.color; + + match.name = Sighting.pokemon_name; + match.id = Sighting.pokemon_id; + match.form = Sighting.form_name ? Sighting.form_name : ""; + match.form = Sighting.form_name == "[Normal]" ? "" : Sighting.form_name; + + match.iv = Sighting.internal_value; + match.cp = Sighting.cp; + + match.lat = Sighting.latitude; + match.lon = Sighting.longitude; + + match.weather_boost = Sighting.weather_boost; + + match.area = Sighting.area.embed; + + match.map_url = WDR.Config.FRONTEND_URL; + + match.atk = Sighting.individual_attack; + match.def = Sighting.individual_defense; + match.sta = Sighting.individual_stamina; + + match.lvl = Sighting.pokemon_level; + match.gen = Sighting.gen; + + match.move_1_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_1].type.toLowerCase()]; + match.move_2_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_2].type.toLowerCase()]; + match.move_1_name = Sighting.move_1_name; + match.move_2_name = Sighting.move_2_name; + + match.height = Math.floor(Sighting.height * 100) / 100; + match.weight = Math.floor(Sighting.weight * 100) / 100; + match.size = await WDR.Capitalize(Sighting.size); + + match.google = "[Google Maps](https://www.google.com/maps?q=" + Sighting.latitude + "," + Sighting.longitude + ")"; + match.apple = "[Apple Maps](http://maps.apple.com/maps?daddr=" + Sighting.latitude + "," + Sighting.longitude + "&z=10&t=s&dirflg=d)"; + match.waze = "[Waze](https://www.waze.com/ul?ll=" + Sighting.latitude + "," + Sighting.longitude + "&navigate=yes)"; + match.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + Sighting.latitude + "&lon=" + Sighting.longitude + "&zoom=15)"; + match.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + Sighting.latitude + "/" + Sighting.longitude + "/15)"; + + match.verified = Sighting.disappear_time_verified ? WDR.Emotes.checkYes : WDR.Emotes.yellowQuestion; + match.time = WDR.Time(Sighting.disappear_time, "1", Sighting.Timezone); + match.mins = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) / 60); + match.secs = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) - (match.mins * 60)); + + if (match.mins >= 5) { + + match.body = await WDR.Generate_Tile(WDR, "pokemon", match.lat, match.lon, match.sprite); + match.static_map = WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + match.body; + + if (WDR.Debug.Processing_Speed == "ENABLED") { + let difference = Math.round((new Date().getTime() - Sighting.WDR_Received) / 10) / 100; + match.footer = "Latency: " + difference + "s"; + } + + match.embed = Embed_Config(WDR, match); + + WDR.Send_DM(WDR, User.guild_id, User.user_id, match.embed, User.bot); + + } + + } \ No newline at end of file diff --git a/src/subscriptions/pvp.js b/src/subscriptions/pvp.js index 2c46ea8..e6bc7ce 100644 --- a/src/subscriptions/pvp.js +++ b/src/subscriptions/pvp.js @@ -1,228 +1,217 @@ +var Leagues = ["great", "ultra"]; +var CPs = [1000, 2000]; + module.exports = async (WDR, Sighting) => { - // let Create_Sub_Embed = require(__dirname + "/../embeds/pokemon.js"); - // - // Sighting.form_id = Sighting.form_id ? Sighting.form_id : 0; - // - // let size = Sighting.size == 0 ? Sighting.size : Sighting.size.toLowerCase(); - // - // let leagues = ["ultra", "great"]; - // let cps = [1000, 2000]; - // - // leagues.forEach((league, index) => { - // - // let pvp = {}; - // - // pvp.possible_cps = []; - // - // pvp.league = league; - // - // // CHECK FILTER GEOFENCES - // if (Sighting.Area.Default || Sighting.Area.Main || Sighting.Area.Sub) { - // - // Sighting[pvp.league + "_league"].forEach(potential => { - // let rankMatch = potential.rank <= 10; - // let cpMatch = potential.cp >= cps[index]; - // if (rankMatch && cpMatch) { - // let match = {}; - // match.pokemon_id = potential.pokemon_id; - // match.rank = potential.rank; - // match.percent = potential.percent; - // match.level = potential.level; - // match.cp = potential.cp; - // match.value = potential.pvp_value; - // match.form_id = potential.form_id; - // pvp.possible_cps.push(match); - // } - // }); - // - // if (pvp.possible_cps.length > 0) { - // - // pvp.possible_cps.forEach(ppvp => { - // - // let query = ` - // SELECT - // * - // FROM - // wdr_subscriptions - // WHERE - // status = 1 - // sub_type = 'pvp' - // AND (pokemon_id = ${Sighting.pokemon_id} OR pokemon_id = 0) - // AND (form = ${Sighting.form_id} OR form = 0) - // AND (league = ${league} OR league = 0) - // AND min_rank <= ${ppvp.rank} - // AND min_lvl <= ${Sighting.pokemon_level} - // AND min_cp <= ${Sighting.cp} - // AND (generation = ${Sighting.gen} OR generation = 0);`; - // - // WDR.wdrDB.query( - // `SELECT - // * - // FROM - // wdr_subscriptions - // WHERE - // status = 1 - // sub_type = 'pvp' - // AND (pokemon_id = ${Sighting.pokemon_id} OR pokemon_id = 0) - // AND (form = ${Sighting.form_id} OR form = 0) - // AND (league = ${league} OR league = 0) - // AND min_rank <= ${Sighting.internal_value} - // AND min_lvl <= ${Sighting.pokemon_level} - // AND (generation = ${Sighting.gen} OR generation = 0);`, - // async function(error, matching, fields) { - // if (error) { - // console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [commands/pokemon.js] Error Querying Subscriptions.\n").bold.brightRed); - // console.error(query); - // return console.error(error); - // } else if (matching && matching[0]) { - // - // let m_len = matching.length; - // for (let m = 0; m < mlen; m++) { - // - // let User = matching[m]; - // - // let defGeo = (User.geofence.indexOf(Sighting.Area.Default) >= 0); - // let mainGeo = (User.geofence.indexOf(Sighting.Area.Default) >= 0); - // let subGeo = (User.geofence.indexOf(Sighting.Area.Sub) >= 0); - // - // // CHECK FILTER GEOFENCES - // if (defGeo || mainGeo || subGeo) { - // Sighting.Embed = matching[0].embed ? matching[0].embed : "pokemon_iv.js"; - // Send_Subscription(WDR, Sighting, User); - // } else { - // let values = User.geofence.split(";"); - // if (values.length == 3) { - // let distance = await WDR.Get_Distance(WDR, { - // lat1: Sighting.latitude, - // lon1: Sighting.longitude, - // lat2: values[0], - // lon2: values[1] - // }); - // if (distance <= values[2]) { - // Send_Subscription(WDR, Sighting, User); - // } - // } - // } - // } - // } - // } - // ); - // }); - // } - // } - // }); + Sighting.form_id = Sighting.form_id ? Sighting.form_id : 0; + + let size = Sighting.size == 0 ? Sighting.size : Sighting.size.toLowerCase(); + + Leagues.forEach(async (league, index) => { + + let match = { + possible_cps: [], + league: league + "_league" + }; + + for (let l = 0, llen = Sighting[match.league].length; l < llen; l++) { + let potential = Sighting[match.league][l]; + let rankMatch = potential.rank <= 20; + let cpMatch = potential.cp >= CPs[index]; + if (rankMatch && cpMatch) { + potential.gen = await WDR.Get_Gen(potential.pokemon_id); + potential.typing = await WDR.Get_Typing(WDR, { + pokemon_id: potential.pokemon_id, + form: potential.form, + type: "pvp_filter" + }); + match.possible_cps.push(potential); + } + } + + if (match.possible_cps > 0) { + + let query = ` + SELECT + * + FROM + wdr_subscriptions + WHERE + status = 1 + AND + sub_type = 'pvp' + AND + ( + pokemon_id = ${Sighting.pokemon_id} + OR pokemon_id = ${potential.pokemon_id} + OR pokemon_id = 0 + ) + AND + ( + form = ${Sighting.form_id} + OR form = ${potential.form_id} + OR form = 0 + ) + AND + ( + league = '${league}' + OR league = 0 + ) + AND + min_rank >= ${potential.rank} + AND + min_lvl <= ${Sighting.pokemon_level} + AND + ( + generation = ${Sighting.gen} + OR generation = ${potential.gen} + OR generation = 0 + );`; + + WDR.wdrDB.query( + query, + async function(error, matching, fields) { + if (error) { + WDR.Console.error(WDR, "[commands/pokemon.js] Error Querying Subscriptions.", [query, error]); + } else if (matching && matching[0]) { + + for (let m = 0, mlen = matching.length; m < mlen; m++) { + + let User = matching[m]; + + let defGeo = (User.geofence.indexOf(Sighting.area.default) >= 0); + let mainGeo = (User.geofence.indexOf(Sighting.area.main) >= 0); + let subGeo = (User.geofence.indexOf(Sighting.area.sub) >= 0); + + if (defGeo || mainGeo || subGeo) { + + match.embed = matching[0].embed ? matching[0].embed : "pvp.js"; + + Send_Subscription(WDR, match, Sighting, User); + + } else { + + let values = User.geofence.split(";"); + + if (values.length == 3) { + + let distance = await WDR.Get_Distance(WDR, { + lat1: Sighting.latitude, + lon1: Sighting.longitude, + lat2: values[0], + lon2: values[1] + }); + + if (distance <= values[2]) { + Send_Subscription(WDR, match, Sighting, User); + } + } + } + } + } + } + ); + } + }); // END return; } -async function Send_Subscription(WDR, Sighting, User) { - let Embed_Config = require(WDR.dir + "/configs/embeds/pvp_sub.js"); +async function Send_Subscription(WDR, match, Sighting, User, ) { - pvp.typing = await WDR.Get_Typing(WDR, { + let Embed_Config = require(WDR.Dir + "/configs/embeds/" + match.embed); + + match.typing = await WDR.Get_Typing(WDR, { pokemon_id: Sighting.pokemon_id, form: Sighting.form }); - pvp.sprite = WDR.Get_Sprite(WDR, { - pokemon_id: pvp.possible_cps[0].pokemon_id, - form: pvp.possible_cps[0].form_id + match.sprite = WDR.Get_Sprite(WDR, { + pokemon_id: match.possible_cps[0].pokemon_id, + form: match.possible_cps[0].form_id }); - pvp.tile_sprite = WDR.Get_Sprite(WDR, { + match.tile_sprite = WDR.Get_Sprite(WDR, { pokemon_id: Sighting.pokemon_id, form: Sighting.form_id }); - pvp.type_wemoji = pvp.typing.type; - pvp.type_noemoji = pvp.typing.type_noemoji; + match.type_wemoji = match.typing.type; + match.type_noemoji = match.typing.type_noemoji; - pvp.color = pvp.typing.color; + match.color = match.typing.color; - pvp.gender_wemoji = Sighting.gender_wemoji; - pvp.gender_noemoji = Sighting.gender_noemoji; + match.gender_wemoji = Sighting.gender_wemoji + match.gender_noemoji = Sighting.gender_noemoji - pvp.name = Sighting.pokemon_name; - pvp.form = Sighting.form_name ? Sighting.form_name : ""; - pvp.form = Sighting.form_name == "[Normal]" ? "" : Sighting.form_name; + match.name = Sighting.pokemon_name; + match.id = Sighting.pokemon_id; + match.form = Sighting.form_name ? Sighting.form_name : ""; + match.form = Sighting.form_name == "[Normal]" ? "" : Sighting.form_name; - pvp.id = Sighting.pokemon_id; - pvp.iv = Sighting.internal_value; - pvp.cp = Sighting.cp; + match.iv = Sighting.internal_value; + match.cp = Sighting.cp; - pvp.lat = Sighting.latitude; - pvp.lon = Sighting.longitude; + match.lat = Sighting.latitude; + match.lon = Sighting.longitude; - pvp.weather_boost = Sighting.weather_boost; + match.weather_boost = Sighting.weather_boost; - pvp.area = Sighting.Area.Embed; + match.area = Sighting.area.embed; - pvp.map_url = WDR.Config.FRONTEND_URL; + match.map_url = WDR.Config.FRONTEND_URL; - pvp.height = Math.floor(Sighting.height * 100) / 100; - pvp.weight = Math.floor(Sighting.weight * 100) / 100; - pvp.size = await WDR.Capitalize(Sighting.size); + match.atk = Sighting.individual_attack; + match.def = Sighting.individual_defense; + match.sta = Sighting.individual_stamina; - pvp.atk = Sighting.individual_attack; - pvp.def = Sighting.individual_defense; - pvp.sta = Sighting.individual_stamina; - pvp.lvl = Sighting.pokemon_level; + match.lvl = Sighting.pokemon_level; + match.gen = Sighting.gen; - pvp.gen = Sighting.gen + match.move_1_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_1].type.toLowerCase()]; + match.move_2_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_2].type.toLowerCase()]; + match.move_1_name = Sighting.move_1_name; + match.move_2_name = Sighting.move_2_name; - pvp.move_1_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_1].type.toLowerCase()]; - pvp.move_2_type = WDR.Emotes[WDR.Master.Moves[Sighting.move_2].type.toLowerCase()]; + match.height = Math.floor(Sighting.height * 100) / 100; + match.weight = Math.floor(Sighting.weight * 100) / 100; + match.size = await WDR.Capitalize(Sighting.size); - pvp.move_1_name = Sighting.move_1_name; - pvp.move_2_name = Sighting.move_2_name; + match.google = "[Google Maps](https://www.google.com/maps?q=" + match.lat + "," + match.lon + ")"; + match.apple = "[Apple Maps](http://maps.apple.com/maps?daddr=" + match.lat + "," + match.lon + "&z=10&t=s&dirflg=d)"; + match.waze = "[Waze](https://www.waze.com/ul?ll=" + match.lat + "," + match.lon + "&navigate=yes)"; + match.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + match.lat + "&lon=" + match.lon + "&zoom=15)"; + match.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + match.lat + "/" + match.lon + "/15)"; - pvp.height = Math.floor(Sighting.height * 100) / 100; - pvp.weight = Math.floor(Sighting.weight * 100) / 100; + match.verified = Sighting.disappear_time_verified ? WDR.Emotes.checkYes : WDR.Emotes.yellowQuestion; + match.time = WDR.Time(Sighting.disappear_time, "1", Sighting.Timezone); + match.mins = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) / 60); + match.secs = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) - (match.mins * 60)); - pvp.google = "[Google Maps](https://www.google.com/maps?q=" + pvp.lat + "," + pvp.lon + ")"; - pvp.apple = "[Apple Maps](http://maps.apple.com/maps?daddr=" + pvp.lat + "," + pvp.lon + "&z=10&t=s&dirflg=d)"; - pvp.waze = "[Waze](https://www.waze.com/ul?ll=" + pvp.lat + "," + pvp.lon + "&navigate=yes)"; - pvp.pmsf = "[Scan Map](" + WDR.Config.FRONTEND_URL + "?lat=" + pvp.lat + "&lon=" + pvp.lon + "&zoom=15)"; - pvp.rdm = "[Scan Map](" + WDR.Config.FRONTEND_URL + "@/" + pvp.lat + "/" + pvp.lon + "/15)"; + if (match.mins >= 5) { - pvp.verified = Sighting.disappear_time_verified ? WDR.Emotes.checkYes : WDR.Emotes.yellowQuestion; - pvp.time = WDR.Time(Sighting.disappear_time, "1", Sighting.Timezone); - pvp.mins = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) / 60); - pvp.secs = Math.floor((Sighting.disappear_time - (Sighting.Time_Now / 1000)) - (pvp.mins * 60)); + match.pvp_data = ""; - pvp.pvp_data = ""; - pvp.possible_cps.forEach(pcp => { - let pipe = " | "; // SPACING - let Name = WDR.Master.Pokemon[pcp.pokemon_id].name; - let Level = "Lvl " + pcp.level; - let Cp = "CP " + pcp.cp; - let Rank = "**Rank " + pcp.rank + "**"; - let Percent = pcp.percent + "%"; - let string = Rank + " " + Name + " (" + Percent + ")\n" + Level + pipe + Cp + pipe + pvp.atk + "/" + pvp.def + "/" + pvp.sta; - pvp.pvp_data += string + "\n"; - }); + match.ranks = ""; + match.possible_cps.forEach(rank_cp => { + match.ranks += "Rank " + rank_cp.rank + " (" + WDR.Master.Pokemon[rank_cp.pokemon_id].name + ")\n"; + }); - pvp.ranks = ""; - pvp.possible_cps.forEach(rank_cp => { - pvp.ranks += "Rank " + rank_cp.rank + " (" + WDR.Master.Pokemon[rank_cp.pokemon_id].name + ")\n"; - }); + match.body = await WDR.Generate_Tile(WDR, "pokemon", match.lat, match.lon, match.tile_sprite); + match.static_map = WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + match.body; - pvp.pvp_data = ""; + if (WDR.Debug.Processing_Speed == "ENABLED") { + let difference = Math.round((new Date().getTime() - Sighting.WDR_Received) / 10) / 100; + match.footer = "Latency: " + difference + "s"; + } - if (WDR.Debug.Processing_Speed == "ENABLED") { - let difference = Math.round((new Date().getTime() - Sighting.WDR_Received) / 10) / 100; - pvp.footer = "Latency: " + difference + "s"; - } + match.embed = Embed_Config(WDR, match); - pvp.embed = Embed_Config(WDR, pvp); + WDR.Send_DM(WDR, User.guild_id, User.user_id, match.embed, User.bot); - if (!pvp.embed.image) { - pvp.body = await WDR.Generate_Tile(WDR, "pokemon", pvp.lat, pvp.lon, pvp.tile_sprite); - pvp.embed.image = { - url: WDR.Config.STATIC_MAP_URL + 'staticmap/pregenerated/' + pvp.body - }; } - WDR.Send_Embed(WDR, pvp.embed, channel.id); + // END + return; } \ No newline at end of file diff --git a/wdr.js b/wdr.js index 906a6bc..11092be 100644 --- a/wdr.js +++ b/wdr.js @@ -1,55 +1,22 @@ var WDR = { - dir: __dirname, + Dir: __dirname, Presets: {}, + MaxLevel: 35 }; // PACKAGE REQUIREMENTS WDR.Ini = require("ini"); -WDR.Express = require("express"); WDR.MySQL = require("mysql2"); WDR.GeoTz = require("geo-tz"); WDR.Fs = require("fs-extra"); WDR.Ontime = require("ontime"); WDR.Moment = require("moment-timezone"); -WDR.InsideGeojson = require('point-in-geopolygon'); +WDR.PointInGeoJSON = require('point-in-geopolygon'); WDR.Colors = require('colors'); WDR.cliProgress = require('cli-progress'); WDR.Distance = require('geo-distance'); WDR.Axios = require("axios"); -// CONFIG -WDR.Config = WDR.Ini.parse(WDR.Fs.readFileSync(WDR.dir + "/configs/config.ini", "utf-8")); -WDR.Version = require(WDR.dir + "/src/static/version.json").v; -WDR.Debug = WDR.Config.DEBUG; -WDR.db = require(WDR.dir + "/src/static/updates.json"); - -// LOAD DISCORD.JS -WDR.DiscordJS = require("discord.js"); - -// LOAD PVP FILE -WDR.PvP = require(WDR.dir + "/src/pvp.js"); - -// GENERATE MASTER FILE -delete require.cache[require.resolve(WDR.dir + "/src/static/generateMaster.js")]; -WDR.Generate_Master = require(WDR.dir + "/src/static/generateMaster.js"); -WDR.Generate_Master(WDR); - -// LOAD PVP TABLE GENERATOR -delete require.cache[require.resolve(WDR.dir + "/src/static/PvP_Ranks.js")]; -WDR.PvP_Table_Generator = require(WDR.dir + "/src/static/PvP_Ranks.js"); - -// LOAD COMMAND HANDLER -delete require.cache[require.resolve(WDR.dir + "/src/handlers/commands.js")]; -WDR.Command_Handler = require(WDR.dir + "/src/handlers/commands.js"); - -// LOAD PAYLOAD HANDLER -delete require.cache[require.resolve(WDR.dir + "/src/handlers/webhooks.js")]; -WDR.Webhook_Handler = require(WDR.dir + "/src/handlers/webhooks.js"); - -// LOAD SOME SNARK -delete require.cache[require.resolve(WDR.dir + "/src/static/files/snark.json")]; -WDR.Snarkiness = require(WDR.dir + "/src/static/files/snark.json"); - // TIME FUNCTION WDR.Time = (time, type, timezone) => { switch (type) { @@ -70,10 +37,40 @@ WDR.Time = (time, type, timezone) => { } } +// LOAD SOME SNARK +delete require.cache[require.resolve(WDR.Dir + "/src/static/files/snark.json")]; +WDR.Snarkiness = require(WDR.Dir + "/src/static/files/snark.json"); + +// CONFIG +var randomNumber = Math.floor(Math.random() * Math.floor(WDR.Snarkiness.startup.length)); +WDR.Config = WDR.Ini.parse(WDR.Fs.readFileSync(WDR.Dir + "/configs/config.ini", "utf-8")); +WDR.Version = require(WDR.Dir + "/package.json").version; +WDR.Debug = WDR.Config.DEBUG; +WDR.db = require(WDR.Dir + "/src/static/updates.json"); + + +// LOAD DISCORD.JS +WDR.DiscordJS = require("discord.js"); + +// LOAD PVP FILE +WDR.PvP = require(WDR.Dir + "/src/pvp.js"); + +// LOAD PVP TABLE GENERATOR +delete require.cache[require.resolve(WDR.Dir + "/src/static/PvP_Ranks.js")]; +WDR.PvP_Table_Generator = require(WDR.Dir + "/src/static/PvP_Ranks.js"); + +// LOAD COMMAND HANDLER +delete require.cache[require.resolve(WDR.Dir + "/src/handlers/commands.js")]; +WDR.Command_Handler = require(WDR.Dir + "/src/handlers/commands.js"); + +// LOAD PAYLOAD HANDLER +delete require.cache[require.resolve(WDR.Dir + "/src/handlers/webhooks.js")]; +WDR.Webhook_Handler = require(WDR.Dir + "/src/handlers/webhooks.js"); + // LOAD ALL DISCORDS function load(location, type) { return new Promise(async resolve => { - let Loader = require(WDR.dir + location); + let Loader = require(WDR.Dir + location); let Loaded = await Loader.Load(WDR, type); return resolve(Loaded); }); @@ -82,7 +79,7 @@ function load(location, type) { // LOAD MODULES function load_modules() { return new Promise(async resolve => { - let Loader = require(WDR.dir + "/src/startup/load_modules.js"); + let Loader = require(WDR.Dir + "/src/startup/load_modules.js"); let Loaded = await Loader.Load(WDR); WDR.Feeds = Loaded.Feeds; WDR.Subscriptions = Loaded.Subscriptions; @@ -92,7 +89,7 @@ function load_modules() { function load_presets(type) { return new Promise(async resolve => { - let Presets = require(WDR.dir + "/src/startup/load_presets.js"); + let Presets = require(WDR.Dir + "/src/startup/load_presets.js"); let Loaded = await Presets.Load(WDR, type); return resolve(Loaded); }); @@ -101,7 +98,7 @@ function load_presets(type) { // MYSQL CONNECTIONS function mysql_connect(db) { return new Promise(async resolve => { - let Database = require(WDR.dir + "/src/database.js"); + let Database = require(WDR.Dir + "/src/database.js"); WDR.DB_Interval = Database.Interval; WDR = await Database.Load(WDR, db); return resolve(); @@ -113,24 +110,24 @@ function load_commands() { return new Promise(async resolve => { WDR.Commands = {}; WDR.Commands.Subscription = new WDR.DiscordJS.Collection(); - await WDR.Fs.readdir(WDR.dir + "/src/commands/subscription", (err, files) => { + await WDR.Fs.readdir(WDR.Dir + "/src/commands/subscription", (err, files) => { let command_files = files.filter(f => f.split(".").pop() === "js"), command_count = 0; command_files.forEach((f, i) => { - delete require.cache[require.resolve(WDR.dir + "/src/commands/subscription/" + f)]; + delete require.cache[require.resolve(WDR.Dir + "/src/commands/subscription/" + f)]; command_count++; - let command = require(WDR.dir + "/src/commands/subscription/" + f); + let command = require(WDR.Dir + "/src/commands/subscription/" + f); WDR.Commands.Subscription.set(f.slice(0, -3), command); }); }); WDR.Commands.Admin = new WDR.DiscordJS.Collection(); - await WDR.Fs.readdir(WDR.dir + "/src/commands/admin", (err, files) => { + await WDR.Fs.readdir(WDR.Dir + "/src/commands/admin", (err, files) => { let command_files = files.filter(f => f.split(".").pop() === "js"), command_count = 0; command_files.forEach((f, i) => { - delete require.cache[require.resolve(WDR.dir + "/src/commands/admin/" + f)]; + delete require.cache[require.resolve(WDR.Dir + "/src/commands/admin/" + f)]; command_count++; - let command = require(WDR.dir + "/src/commands/admin/" + f); + let command = require(WDR.Dir + "/src/commands/admin/" + f); WDR.Commands.Admin.set(f.slice(0, -3), command); }); }); @@ -143,12 +140,12 @@ function load_embeds() { return new Promise(async resolve => { WDR.Create_Embed = {}; WDR.Commands.Subscription = new WDR.DiscordJS.Collection(); - await WDR.Fs.readdir(WDR.dir + "/src/embeds", (err, files) => { + await WDR.Fs.readdir(WDR.Dir + "/src/embeds", (err, files) => { let embed_files = files.filter(f => f.split(".").pop() === "js"); embed_files.forEach(async (f, i) => { let type = await WDR.Capitalize(f); - delete require.cache[require.resolve(WDR.dir + "/src/embeds" + f)]; - WDR.Create_Embed[type] = require(WDR.dir + "/src/embeds/" + f); + delete require.cache[require.resolve(WDR.Dir + "/src/embeds" + f)]; + WDR.Create_Embed[type] = require(WDR.Dir + "/src/embeds/" + f); }); }); return resolve(); @@ -157,14 +154,16 @@ function load_embeds() { // WDR INITIALIZATION async function wdr_intialization() { + console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] " + WDR.Snarkiness.startup[randomNumber]).bold.brightGreen); WDR = await load("/src/startup/load_functions.js"); + await WDR.Generate_Master(WDR); WDR = await load("/src/startup/load_data.js"); await mysql_connect("wdrDB"); await mysql_connect("pmsfDB"); await mysql_connect("scannerDB"); WDR.Discords = await load("/src/startup/load_discords.js"); await load_modules(); - await load_commands(); + await load_commands()\; WDR.Filters = await load("/src/startup/load_filters.js"); WDR.Geofences = await load("/src/startup/load_geofences.js"); WDR = await load("/src/startup/load_ontime.js"); @@ -184,40 +183,47 @@ async function wdr_intialization() { WDR.Bot.on("message", message => { WDR.Command_Handler(WDR, message); }); - console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [wdr.js] Loaded Discord Listeners.").bold.brightGreen); // EVENT WHEN BOT IS READY WDR.Bot.on("ready", () => { // LOAD EMOJIES - let Emojis = require(WDR.dir + "/src/emojis.js"); + let Emojis = require(WDR.Dir + "/src/emojis.js"); WDR.Emotes = new Emojis.DiscordEmojis(); WDR.Emotes.Load(WDR.Bot, WDR.Config.EMOJI_SERVERS.split(",")); - // LOG READY STATE - let logText = WDR.Snarkiness.startup[Math.floor(Math.random() * Math.floor(WDR.Snarkiness.startup.length))]; - console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [wdr.js] " + logText).bold.brightGreen); - // return console.log("[WDR "+WDR.Version+"] [wdr.js] ["+WDR.Time(null,"log")+"] 👍 Fully Initialized. 👍"); - - // DEFINE THE EXPRESS SERVER - const Server = WDR.Express().use(WDR.Express.json({ - limit: "10MB" - })); - - // CATCH REQUESTS AND SEND FOR PARSING - Server.post("/", async (webhook, res) => { - WDR.Webhook_Handler(WDR, webhook.body); - res.sendStatus(200); - }); // LISTEN TO THE SPECIFIED PORT FOR TRAFFIC Server.listen(WDR.Config.LISTENING_PORT); - console.log(("[WDR " + WDR.Version + "] [" + WDR.Time(null, "log") + "] [wdr.js] WebServer now Listening on Port " + WDR.Config.LISTENING_PORT + ".").bold.brightGreen); + WDR.Console.info(WDR, "[wdr.js] WebServer now Listening on Port " + WDR.Config.LISTENING_PORT + "."); + + // LOG READY STATE + let logText = WDR.Snarkiness.initialized[randomNumber]; + WDR.Console.log(WDR, "[wdr.js] " + logText); }); start_intervals(); } +// WEB SERVER +const Express = require("express"); +const BodyParser = require("body-parser"); +const Server = Express(); +Server.use(BodyParser.json({ + limit: "10MB" +})); +Server.post("/", async (req, res) => { + res.sendStatus(200); + WDR.Webhook_Handler(WDR, req.body); +}); +Server.use((err, req, res, next) => { + // console.log('err.status: ' + err.status) + // console.log('err.expected: ' + err.expected) + // console.log('err.received: ' + err.received) + // console.log('err.stack: ' + err.stack) + req.destroy(); +}); + function start_intervals() { setInterval(function() { WDR.DB_Interval(WDR);