Skip to content

Alex13832/pokemon

Repository files navigation

POKéMON

Gotta plot em all

The python code is easy to use and can easyly be extended. For easy creation of Pokémons a sqlite3 database is created with various stats. Many objects are based on enum usage, which avoids usage of strings.

It is very easy to create a Pokémon object.

pokemon = Pokemon(PokemonType.Pidgey, state = State.asleep)
# or
pokemon = Pokemon(PokemonType.Pidgey) # for normal state 

BTW, this project is not finished yet, so bugs may appear.

Example of usage

Simulation of catch rate generation I

Use any Pokémon to simulate the catch rate of generation I Pokémon.

Screenshot

Simulation of catch rate generation II

Use any Pokémon and Pokémon ball to simulate catch rate of Pokémon generation II.

Screenshot

Plot stats of a Pokémon

Plot the stats of any Pokémon in a spider net plot.

The following code snippet will also plot the Pokémon-figure to the right of the plot.

import pokemon_plot # other imports are omitted here, see pokemon_tests.py for imports

pokemon = Pokemon(PokemonType.Electabuzz, State.normal)
pokemon_plot.plotPokemon(pokemon)

Screenshot

For only plotting the stats:

import pokemon_plot

pokemon = Pokemon(PokemonType.Electabuzz)
pokemon_plot.plotPokemons([pokemon])

Screenshot

Compare Pokémons

Compare Pokémons in a spider net plot.

The code needed for generating the plot below is simple:

import pokemon_plot 

pokemon1 = Pokemon(PokemonType.Bulbasaur)
pokemon2 = Pokemon(PokemonType.Squirtle)
pokemon3 = Pokemon(PokemonType.Charmander)

pokemonList = [pokemon1, pokemon2, pokemon3]
pokemon_plot.plotPokemons(pokemonList)

Screenshot

Compare Pokémon classes

Compare different Pokémon classes in a spider net plot. Just get the Pokémon class/type and compare them with:

import pokemon_plot 

pokemon_plot.compare_classes([PokemonClass.Grass, PokemonClass.Electric])

Screenshot

Easy database lookup

Retrieve pokemons by some attribute and logic operator.

Example 1:
# Get all pokemons with attack larger than 140
pokemons = pokemon.find_pokemons_by(PokeAttribute.attack, PokeLogic.largerThan, 140)

for p in pokemons:
    print p.name

Output:

Deoxys_A
Deoxys_N
Groudon
Haxorus
Rampardos
Rayquaza
Regigigas
Slaking
Zekrom
Example 2:
# Get all pokemons with mass less than 0.4
pokemons = pokemon.find_pokemons_by(PokeAttribute.mass_kilo, PokeLogic.lessThan, 0.4)

for p in pokemons:
    print p.name

Output:

Azelf
Gastly
Haunter
Mesprit
Rotom
Rotom_Cut
Rotom_Frost
Rotom_Heat
Rotom_Spin
Rotom_Wash
Tynamo
Uxie

About

Plot various stats of Pokémon. Written in python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages