Struct pokemon_go_data::species::PokeSpecies [] [src]

pub struct PokeSpecies { /* fields omitted */ }

Information about a specific Pokemon species.

Methods

impl PokeSpecies
[src]

[src]

Given the id of a species, return its corresponding data. Returns None if no data is found for the given id.

Example:

use pokemon_go_data::species::PokeSpecies;

let dragonite = PokeSpecies::from_id(149).unwrap();
assert_eq!((263, 201, 182), dragonite.base_stats());

let no_such_pokemon = PokeSpecies::from_id(500);
assert!(no_such_pokemon.is_none());

[src]

Return a list of all PokeSpecies, sorted by id.

Example:

use pokemon_go_data::species::{NUM_SPECIES, PokeSpecies};

let all_species = PokeSpecies::all_species();

assert_eq!(NUM_SPECIES as usize, all_species.len());
assert_eq!(1, all_species[0].id());

[src]

This species' id.

[src]

This species' base attack value.

[src]

This species's base defense value.

[src]

This species' base stamina value.

[src]

This species' base stats, as an (attack, defense, stamina) triple.

[src]

This species' primary PokeType.

[src]

If this species is dual-typed, returns the secondary PokeType.

[src]

Returns true if this species has two PokeTypes.

[src]

Returns the highest possible stats for this pokemon (i.e., perfect IVs).

[src]

Returns the species' max combat power at the given Level, assuming perfect IVs.

Example:

use pokemon_go_data::{Level, species};

let level_30 = Level::new(30).unwrap();
assert_eq!(188, species::Magikarp.max_cp_at_level(level_30));

[src]

Returns this species' max Combat Power at level 39, assuming perfect IVs.

Example:

use pokemon_go_data::species;

assert_eq!(3_617, species::Tyranitar.max_cp());

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl Debug for PokeSpecies
[src]

[src]

Formats the value using the given formatter.

impl Eq for PokeSpecies
[src]

impl PartialEq for PokeSpecies
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Hash for PokeSpecies
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more