# -*- coding: utf-8 -*-
''' Pokemon data '''

LevelStats = [
    # Stats per half-level, from 1.0 to 40.5
    {"dust":200, "candy":1, "cpmulti":0.093999996781349},
    {"dust":200, "candy":1, "cpmulti":0.135137432089339},
    {"dust":200, "candy":1, "cpmulti":0.166397869586945},
    {"dust":200, "candy":1, "cpmulti":0.192650913155325},
    {"dust":400, "candy":1, "cpmulti":0.215732470154762},
    {"dust":400, "candy":1, "cpmulti":0.236572651424822},
    {"dust":400, "candy":1, "cpmulti":0.255720049142838},
    {"dust":400, "candy":1, "cpmulti":0.273530372106572},
    {"dust":600, "candy":1, "cpmulti":0.290249884128571},
    {"dust":600, "candy":1, "cpmulti":0.306057381389863},
    {"dust":600, "candy":1, "cpmulti":0.321087598800659},
    {"dust":600, "candy":1, "cpmulti":0.335445031996451},
    {"dust":800, "candy":1, "cpmulti":0.349212676286697},
    {"dust":800, "candy":1, "cpmulti":0.362457736609939},
    {"dust":800, "candy":1, "cpmulti":0.375235587358475},
    {"dust":800, "candy":1, "cpmulti":0.387592407713878},
    {"dust":1000, "candy":1, "cpmulti":0.399567276239395},
    {"dust":1000, "candy":1, "cpmulti":0.4111935532161},
    {"dust":1000, "candy":1, "cpmulti":0.422500014305115},
    {"dust":1000, "candy":1, "cpmulti":0.432926420512509},
    {"dust":1300, "candy":2, "cpmulti":0.443107545375824},
    {"dust":1300, "candy":2, "cpmulti":0.453059948165049},
    {"dust":1300, "candy":2, "cpmulti":0.46279838681221},
    {"dust":1300, "candy":2, "cpmulti":0.472336085311278},
    {"dust":1600, "candy":2, "cpmulti":0.481684952974319},
    {"dust":1600, "candy":2, "cpmulti":0.490855807179549},
    {"dust":1600, "candy":2, "cpmulti":0.499858438968658},
    {"dust":1600, "candy":2, "cpmulti":0.5087017489616},
    {"dust":1900, "candy":2, "cpmulti":0.517393946647644},
    {"dust":1900, "candy":2, "cpmulti":0.525942516110322},
    {"dust":1900, "candy":2, "cpmulti":0.534354329109192},
    {"dust":1900, "candy":2, "cpmulti":0.542635753803599},
    {"dust":2200, "candy":2, "cpmulti":0.550792694091797},
    {"dust":2200, "candy":2, "cpmulti":0.558830584490385},
    {"dust":2200, "candy":2, "cpmulti":0.566754519939423},
    {"dust":2200, "candy":2, "cpmulti":0.57456912814537},
    {"dust":2500, "candy":2, "cpmulti":0.582278907299042},
    {"dust":2500, "candy":2, "cpmulti":0.589887907888945},
    {"dust":2500, "candy":2, "cpmulti":0.597400009632111},
    {"dust":2500, "candy":2, "cpmulti":0.604823648665171},
    {"dust":3000, "candy":3, "cpmulti":0.61215728521347},
    {"dust":3000, "candy":3, "cpmulti":0.619404107958234},
    {"dust":3000, "candy":3, "cpmulti":0.626567125320435},
    {"dust":3000, "candy":3, "cpmulti":0.633649178748576},
    {"dust":3500, "candy":3, "cpmulti":0.6406529545784},
    {"dust":3500, "candy":3, "cpmulti":0.647580971386554},
    {"dust":3500, "candy":3, "cpmulti":0.654435634613037},
    {"dust":3500, "candy":3, "cpmulti":0.661219265805859},
    {"dust":4000, "candy":3, "cpmulti":0.667934000492095},
    {"dust":4000, "candy":3, "cpmulti":0.674581885647492},
    {"dust":4000, "candy":4, "cpmulti":0.681164920330048},
    {"dust":4000, "candy":4, "cpmulti":0.687684901255373},
    {"dust":4500, "candy":4, "cpmulti":0.694143652915955},
    {"dust":4500, "candy":4, "cpmulti":0.700542901033063},
    {"dust":4500, "candy":4, "cpmulti":0.706884205341339},
    {"dust":4500, "candy":4, "cpmulti":0.713169074873823},
    {"dust":5000, "candy":4, "cpmulti":0.719399094581604},
    {"dust":5000, "candy":4, "cpmulti":0.725575586915154},
    {"dust":5000, "candy":4, "cpmulti":0.731700003147125},
    {"dust":5000, "candy":4, "cpmulti":0.734741038550429},
    {"dust":6000, "candy":6, "cpmulti":0.737769484519958},
    {"dust":6000, "candy":6, "cpmulti":0.740785579737136},
    {"dust":6000, "candy":6, "cpmulti":0.743789434432983},
    {"dust":6000, "candy":6, "cpmulti":0.746781197247765},
    {"dust":7000, "candy":8, "cpmulti":0.749761044979095},
    {"dust":7000, "candy":8, "cpmulti":0.752729099732281},
    {"dust":7000, "candy":8, "cpmulti":0.75568550825119},
    {"dust":7000, "candy":8, "cpmulti":0.758630370209851},
    {"dust":8000, "candy":10, "cpmulti":0.761563837528229},
    {"dust":8000, "candy":10, "cpmulti":0.76448604959218},
    {"dust":8000, "candy":10, "cpmulti":0.767397165298462},
    {"dust":8000, "candy":10, "cpmulti":0.770297293677362},
    {"dust":9000, "candy":12, "cpmulti":0.773186504840851},
    {"dust":9000, "candy":12, "cpmulti":0.776064947064992},
    {"dust":9000, "candy":12, "cpmulti":0.778932750225067},
    {"dust":9000, "candy":12, "cpmulti":0.781790050767666},
    {"dust":10000, "candy":15, "cpmulti":0.784636974334717},
    {"dust":10000, "candy":15, "cpmulti":0.787473608513275},
    {"dust":10000, "candy":15, "cpmulti":0.790300011634827},
    {"dust":10000, "candy":15, "cpmulti":0.7931164},
]

Pokemon = [
    {"id":1, "name":u"Bulbasaur", "stamina":90, "attack":126, "defense":126},
    {"id":2, "name":u"Ivysaur", "stamina":120, "attack":156, "defense":158},
    {"id":3, "name":u"Venusaur", "stamina":160, "attack":198, "defense":200},
    {"id":4, "name":u"Charmander", "stamina":78, "attack":128, "defense":108},
    {"id":5, "name":u"Charmeleon", "stamina":116, "attack":160, "defense":140},
    {"id":6, "name":u"Charizard", "stamina":156, "attack":212, "defense":182},
    {"id":7, "name":u"Squirtle", "stamina":88, "attack":112, "defense":142},
    {"id":8, "name":u"Wartortle", "stamina":118, "attack":144, "defense":176},
    {"id":9, "name":u"Blastoise", "stamina":158, "attack":186, "defense":222},
    {"id":10, "name":u"Caterpie", "stamina":90, "attack":62, "defense":66},
    {"id":11, "name":u"Metapod", "stamina":100, "attack":56, "defense":86},
    {"id":12, "name":u"Butterfree", "stamina":120, "attack":144, "defense":144},
    {"id":13, "name":u"Weedle", "stamina":80, "attack":68, "defense":64},
    {"id":14, "name":u"Kakuna", "stamina":90, "attack":62, "defense":82},
    {"id":15, "name":u"Beedrill", "stamina":130, "attack":144, "defense":130},
    {"id":16, "name":u"Pidgey", "stamina":80, "attack":94, "defense":90},
    {"id":17, "name":u"Pidgeotto", "stamina":126, "attack":126, "defense":122},
    {"id":18, "name":u"Pidgeot", "stamina":166, "attack":170, "defense":166},
    {"id":19, "name":u"Rattata", "stamina":60, "attack":92, "defense":86},
    {"id":20, "name":u"Raticate", "stamina":110, "attack":146, "defense":150},
    {"id":21, "name":u"Spearow", "stamina":80, "attack":102, "defense":78},
    {"id":22, "name":u"Fearow", "stamina":130, "attack":168, "defense":146},
    {"id":23, "name":u"Ekans", "stamina":70, "attack":112, "defense":112},
    {"id":24, "name":u"Arbok", "stamina":120, "attack":166, "defense":166},
    {"id":25, "name":u"Pikachu", "stamina":70, "attack":124, "defense":108},
    {"id":26, "name":u"Raichu", "stamina":120, "attack":200, "defense":154},
    {"id":27, "name":u"Sandshrew", "stamina":100, "attack":90, "defense":114},
    {"id":28, "name":u"Sandslash", "stamina":150, "attack":150, "defense":172},
    {"id":29, "name":u"Nidoran♀", "stamina":110, "attack":100, "defense":104},
    {"id":30, "name":u"Nidorina", "stamina":140, "attack":132, "defense":136},
    {"id":31, "name":u"Nidoqueen", "stamina":180, "attack":184, "defense":190},
    {"id":32, "name":u"Nidoran♂", "stamina":92, "attack":110, "defense":94},
    {"id":33, "name":u"Nidorino", "stamina":122, "attack":142, "defense":128},
    {"id":34, "name":u"Nidoking", "stamina":162, "attack":204, "defense":170},
    {"id":35, "name":u"Clefairy", "stamina":140, "attack":116, "defense":124},
    {"id":36, "name":u"Clefable", "stamina":190, "attack":178, "defense":178},
    {"id":37, "name":u"Vulpix", "stamina":76, "attack":106, "defense":118},
    {"id":38, "name":u"Ninetales", "stamina":146, "attack":176, "defense":194},
    {"id":39, "name":u"Jigglypuff", "stamina":230, "attack":98, "defense":54},
    {"id":40, "name":u"Wigglytuff", "stamina":280, "attack":168, "defense":108},
    {"id":41, "name":u"Zubat", "stamina":80, "attack":88, "defense":90},
    {"id":42, "name":u"Golbat", "stamina":150, "attack":164, "defense":164},
    {"id":43, "name":u"Oddish", "stamina":90, "attack":134, "defense":130},
    {"id":44, "name":u"Gloom", "stamina":120, "attack":162, "defense":158},
    {"id":45, "name":u"Vileplume", "stamina":150, "attack":202, "defense":190},
    {"id":46, "name":u"Paras", "stamina":70, "attack":122, "defense":120},
    {"id":47, "name":u"Parasect", "stamina":120, "attack":162, "defense":170},
    {"id":48, "name":u"Venonat", "stamina":120, "attack":108, "defense":118},
    {"id":49, "name":u"Venomoth", "stamina":140, "attack":172, "defense":154},
    {"id":50, "name":u"Diglett", "stamina":20, "attack":108, "defense":86},
    {"id":51, "name":u"Dugtrio", "stamina":70, "attack":148, "defense":140},
    {"id":52, "name":u"Meowth", "stamina":80, "attack":104, "defense":94},
    {"id":53, "name":u"Persian", "stamina":130, "attack":156, "defense":146},
    {"id":54, "name":u"Psyduck", "stamina":100, "attack":132, "defense":112},
    {"id":55, "name":u"Golduck", "stamina":160, "attack":194, "defense":176},
    {"id":56, "name":u"Mankey", "stamina":80, "attack":122, "defense":96},
    {"id":57, "name":u"Primeape", "stamina":130, "attack":178, "defense":150},
    {"id":58, "name":u"Growlithe", "stamina":110, "attack":156, "defense":110},
    {"id":59, "name":u"Arcanine", "stamina":180, "attack":230, "defense":180},
    {"id":60, "name":u"Poliwag", "stamina":80, "attack":108, "defense":98},
    {"id":61, "name":u"Poliwhirl", "stamina":130, "attack":132, "defense":132},
    {"id":62, "name":u"Poliwrath", "stamina":180, "attack":180, "defense":202},
    {"id":63, "name":u"Abra", "stamina":50, "attack":110, "defense":76},
    {"id":64, "name":u"Kadabra", "stamina":80, "attack":150, "defense":112},
    {"id":65, "name":u"Alakazam", "stamina":110, "attack":186, "defense":152},
    {"id":66, "name":u"Machop", "stamina":140, "attack":118, "defense":96},
    {"id":67, "name":u"Machoke", "stamina":160, "attack":154, "defense":144},
    {"id":68, "name":u"Machamp", "stamina":180, "attack":198, "defense":180},
    {"id":69, "name":u"Bellsprout", "stamina":100, "attack":158, "defense":78},
    {"id":70, "name":u"Weepinbell", "stamina":130, "attack":190, "defense":110},
    {"id":71, "name":u"Victreebel", "stamina":160, "attack":222, "defense":152},
    {"id":72, "name":u"Tentacool", "stamina":80, "attack":106, "defense":136},
    {"id":73, "name":u"Tentacruel", "stamina":160, "attack":170, "defense":196},
    {"id":74, "name":u"Geodude", "stamina":80, "attack":106, "defense":118},
    {"id":75, "name":u"Graveler", "stamina":110, "attack":142, "defense":156},
    {"id":76, "name":u"Golem", "stamina":160, "attack":176, "defense":198},
    {"id":77, "name":u"Ponyta", "stamina":100, "attack":168, "defense":138},
    {"id":78, "name":u"Rapidash", "stamina":130, "attack":200, "defense":170},
    {"id":79, "name":u"Slowpoke", "stamina":180, "attack":110, "defense":110},
    {"id":80, "name":u"Slowbro", "stamina":190, "attack":184, "defense":198},
    {"id":81, "name":u"Magnemite", "stamina":50, "attack":128, "defense":138},
    {"id":82, "name":u"Magneton", "stamina":100, "attack":186, "defense":180},
    {"id":83, "name":u"Farfetch'd", "stamina":104, "attack":138, "defense":132},
    {"id":84, "name":u"Doduo", "stamina":70, "attack":126, "defense":96},
    {"id":85, "name":u"Dodrio", "stamina":120, "attack":182, "defense":150},
    {"id":86, "name":u"Seel", "stamina":130, "attack":104, "defense":138},
    {"id":87, "name":u"Dewgong", "stamina":180, "attack":156, "defense":192},
    {"id":88, "name":u"Grimer", "stamina":160, "attack":124, "defense":110},
    {"id":89, "name":u"Muk", "stamina":210, "attack":180, "defense":188},
    {"id":90, "name":u"Shellder", "stamina":60, "attack":120, "defense":112},
    {"id":91, "name":u"Cloyster", "stamina":100, "attack":196, "defense":196},
    {"id":92, "name":u"Gastly", "stamina":60, "attack":136, "defense":82},
    {"id":93, "name":u"Haunter", "stamina":90, "attack":172, "defense":118},
    {"id":94, "name":u"Gengar", "stamina":120, "attack":204, "defense":156},
    {"id":95, "name":u"Onix", "stamina":70, "attack":90, "defense":186},
    {"id":96, "name":u"Drowzee", "stamina":120, "attack":104, "defense":140},
    {"id":97, "name":u"Hypno", "stamina":170, "attack":162, "defense":196},
    {"id":98, "name":u"Krabby", "stamina":60, "attack":116, "defense":110},
    {"id":99, "name":u"Kingler", "stamina":110, "attack":178, "defense":168},
    {"id":100, "name":u"Voltorb", "stamina":80, "attack":102, "defense":124},
    {"id":101, "name":u"Electrode", "stamina":120, "attack":150, "defense":174},
    {"id":102, "name":u"Exeggcute", "stamina":120, "attack":110, "defense":132},
    {"id":103, "name":u"Exeggutor", "stamina":190, "attack":232, "defense":164},
    {"id":104, "name":u"Cubone", "stamina":100, "attack":102, "defense":150},
    {"id":105, "name":u"Marowak", "stamina":120, "attack":140, "defense":202},
    {"id":106, "name":u"Hitmonlee", "stamina":100, "attack":148, "defense":172},
    {"id":107, "name":u"Hitmonchan", "stamina":100, "attack":138, "defense":204},
    {"id":108, "name":u"Lickitung", "stamina":180, "attack":126, "defense":160},
    {"id":109, "name":u"Koffing", "stamina":80, "attack":136, "defense":142},
    {"id":110, "name":u"Weezing", "stamina":130, "attack":190, "defense":198},
    {"id":111, "name":u"Rhyhorn", "stamina":160, "attack":110, "defense":116},
    {"id":112, "name":u"Rhydon", "stamina":210, "attack":166, "defense":160},
    {"id":113, "name":u"Chansey", "stamina":500, "attack":40, "defense":60},
    {"id":114, "name":u"Tangela", "stamina":130, "attack":164, "defense":152},
    {"id":115, "name":u"Kangaskhan", "stamina":210, "attack":142, "defense":178},
    {"id":116, "name":u"Horsea", "stamina":60, "attack":122, "defense":100},
    {"id":117, "name":u"Seadra", "stamina":110, "attack":176, "defense":150},
    {"id":118, "name":u"Goldeen", "stamina":90, "attack":112, "defense":126},
    {"id":119, "name":u"Seaking", "stamina":160, "attack":172, "defense":160},
    {"id":120, "name":u"Staryu", "stamina":60, "attack":130, "defense":128},
    {"id":121, "name":u"Starmie", "stamina":120, "attack":194, "defense":192},
    {"id":122, "name":u"Mr. Mime", "stamina":80, "attack":154, "defense":196},
    {"id":123, "name":u"Scyther", "stamina":140, "attack":176, "defense":180},
    {"id":124, "name":u"Jynx", "stamina":130, "attack":172, "defense":134},
    {"id":125, "name":u"Electabuzz", "stamina":130, "attack":198, "defense":160},
    {"id":126, "name":u"Magmar", "stamina":130, "attack":214, "defense":158},
    {"id":127, "name":u"Pinsir", "stamina":130, "attack":184, "defense":186},
    {"id":128, "name":u"Tauros", "stamina":150, "attack":148, "defense":184},
    {"id":129, "name":u"Magikarp", "stamina":40, "attack":42, "defense":84},
    {"id":130, "name":u"Gyarados", "stamina":190, "attack":192, "defense":196},
    {"id":131, "name":u"Lapras", "stamina":260, "attack":186, "defense":190},
    {"id":132, "name":u"Ditto", "stamina":96, "attack":110, "defense":110},
    {"id":133, "name":u"Eevee", "stamina":110, "attack":114, "defense":128},
    {"id":134, "name":u"Vaporeon", "stamina":260, "attack":186, "defense":168},
    {"id":135, "name":u"Jolteon", "stamina":130, "attack":192, "defense":174},
    {"id":136, "name":u"Flareon", "stamina":130, "attack":238, "defense":178},
    {"id":137, "name":u"Porygon", "stamina":130, "attack":156, "defense":158},
    {"id":138, "name":u"Omanyte", "stamina":70, "attack":132, "defense":160},
    {"id":139, "name":u"Omastar", "stamina":140, "attack":180, "defense":202},
    {"id":140, "name":u"Kabuto", "stamina":60, "attack":148, "defense":142},
    {"id":141, "name":u"Kabutops", "stamina":120, "attack":190, "defense":190},
    {"id":142, "name":u"Aerodactyl", "stamina":160, "attack":182, "defense":162},
    {"id":143, "name":u"Snorlax", "stamina":320, "attack":180, "defense":180},
    {"id":144, "name":u"Articuno", "stamina":180, "attack":198, "defense":242},
    {"id":145, "name":u"Zapdos", "stamina":180, "attack":232, "defense":194},
    {"id":146, "name":u"Moltres", "stamina":180, "attack":242, "defense":194},
    {"id":147, "name":u"Dratini", "stamina":82, "attack":128, "defense":110},
    {"id":148, "name":u"Dragonair", "stamina":122, "attack":170, "defense":152},
    {"id":149, "name":u"Dragonite", "stamina":182, "attack":250, "defense":212},
    {"id":150, "name":u"Mewtwo", "stamina":212, "attack":284, "defense":202},
    {"id":151, "name":u"Mew", "stamina":200, "attack":220, "defense":220},
]

PokemonFamilies = {
    1: {100: 2, 25: 1, 0: 3},
    4: {100: 5, 25: 4, 0: 6},
    7: {100: 8, 25: 7, 0: 9},
    10: {50: 11, 12: 10, 0: 12},
    13: {50: 14, 12: 13, 0: 15},
    16: {50: 17, 12: 16, 0: 18},
    19: {25: 19, 0: 20},
    21: {50: 21, 0: 22},
    23: {50: 23, 0: 24},
    25: {50: 25, 0: 26},
    27: {50: 27, 0: 28},
    29: {100: 30, 25: 29, 0: 31},
    32: {100: 33, 25: 32, 0: 34},
    35: {50: 35, 0: 36},
    37: {50: 37, 0: 38},
    39: {50: 39, 0: 40},
    41: {50: 41, 0: 42},
    43: {100: 44, 25: 43, 0: 45},
    46: {50: 46, 0: 47},
    48: {50: 48, 0: 49},
    50: {50: 50, 0: 51},
    52: {50: 52, 0: 53},
    54: {50: 54, 0: 55},
    56: {50: 56, 0: 57},
    58: {50: 58, 0: 59},
    60: {100: 61, 25: 60, 0: 62},
    63: {100: 64, 25: 63, 0: 65},
    66: {100: 67, 25: 66, 0: 68},
    69: {100: 70, 25: 69, 0: 71},
    72: {50: 72, 0: 73},
    74: {100: 75, 25: 74, 0: 76},
    77: {50: 77, 0: 78},
    79: {50: 79, 0: 80},
    81: {50: 81, 0: 82},
    83: {0: 83},
    84: {50: 84, 0: 85},
    86: {50: 86, 0: 87},
    88: {50: 88, 0: 89},
    90: {50: 90, 0: 91},
    92: {100: 93, 25: 92, 0: 94},
    95: {0: 95},
    96: {50: 96, 0: 97},
    98: {50: 98, 0: 99},
    100: {50: 100, 0: 101},
    102: {50: 102, 0: 103},
    104: {50: 104, 0: 105},
    106: {0: 106},
    107: {0: 107},
    108: {0: 108},
    109: {50: 109, 0: 110},
    111: {50: 111, 0: 112},
    113: {0: 113},
    114: {0: 114},
    115: {0: 115},
    116: {50: 116, 0: 117},
    118: {50: 118, 0: 119},
    120: {50: 120, 0: 121},
    122: {0: 122},
    123: {0: 123},
    124: {0: 124},
    125: {0: 125},
    126: {0: 126},
    127: {0: 127},
    128: {0: 128},
    129: {400: 129, 0: 130},
    131: {0: 131},
    132: {0: 132},
    133: {25: 133, 0: 136},
    137: {0: 137},
    138: {50: 138, 0: 139},
    140: {50: 140, 0: 141},
    142: {0: 142},
    143: {0: 143},
    144: {0: 144},
    145: {0: 145},
    146: {0: 146},
    147: {100: 148, 25: 147, 0: 149},
    150: {0: 150},
    151: {0: 151},
}

PokemonByName = {v['name']: v for v in Pokemon}
PokemonById = {v['id']: v for v in Pokemon}
