Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pykemon import get
- f = file("pokemon.txt", 'w')
- for n in range(1, 152):
- pokemon = get(pokemon=n)
- pokemonD = ("'{0}':{{'name':'{0}', 'health':{1}, 'attack':{2}, 'defense':{3}, "
- "'spAttack':{4}, 'spDefense':{5}, 'speed':{6}, 'total':{7}, 'catchRate':{8}, "
- "'abilities':{9}, 'eggGroups':{10}, 'evolutions':{11}, 'types':{12}, 'moves':{13}, "
- "'eggCycles':{14}, 'evYield':{15}, 'exp':{16}, 'growthRate':{17}, 'height':{18}, "
- "'weight':{19}, 'happiness':{20}, 'maleFemaleRatio':{21}, 'num':{22}}}\n").format(pokemon.name, pokemon.hp, pokemon.attack, pokemon.defense, pokemon.sp_atk, pokemon.sp_def, pokemon.speed, pokemon.total, pokemon.catch_rate, str(pokemon.abilities.keys()), str(pokemon.egg_groups.keys()), str(pokemon.evolutions.keys()), str(pokemon.types.keys()), str(pokemon.moves.keys()), pokemon.egg_cycles, pokemon.ev_yield, pokemon.exp, str(pokemon.growth_rate), pokemon.height, pokemon.weight, pokemon.happiness, str(pokemon.male_female_ratio), pokemon.id)
- pokemonD = map(str(), pokemonD)
- f.write(str(pokemonD).encode('ascii', 'ignore'))
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment