Struct pokemon_go_data::species::PokeSpecies
[−]
[src]
pub struct PokeSpecies { /* fields omitted */ }
Information about a specific Pokemon species.
Methods
impl PokeSpecies
[src]
fn from_id(id: u16) -> Option<&'static PokeSpecies>
[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());
fn all_species() -> &'static [&'static PokeSpecies]
[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());
fn id(&self) -> u16
[src]
This species' id.
fn attack(&self) -> u16
[src]
This species' base attack value.
fn defense(&self) -> u16
[src]
This species's base defense value.
fn stamina(&self) -> u16
[src]
This species' base stamina value.
fn base_stats(&self) -> (u16, u16, u16)
[src]
This species' base stats, as an (attack, defense, stamina)
triple.
fn primary_type(&self) -> PokeType
[src]
This species' primary PokeType
.
fn secondary_type(&self) -> Option<PokeType>
[src]
If this species is dual-typed, returns the secondary PokeType
.
fn is_dual_type(&self) -> bool
[src]
Returns true
if this species has two PokeType
s.
fn perfect_stats(&self) -> (u16, u16, u16)
[src]
Returns the highest possible stats for this pokemon (i.e., perfect IVs).
fn max_cp_at_level(&self, level: Level) -> u16
[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));
fn max_cp(&self) -> u16
[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());
fn english_name(&self) -> &'static str
[src]
fn japanese_name(&self) -> &'static str
[src]
fn japanese_transliterated(&self) -> &'static str
[src]
fn korean_name(&self) -> &'static str
[src]
fn chinese_name(&self) -> &'static str
[src]
fn french_name(&self) -> &'static str
[src]
fn german_name(&self) -> &'static str
[src]
fn spanish_name(&self) -> &'static str
[src]
fn italian_name(&self) -> &'static str
[src]
Trait Implementations
impl Debug for PokeSpecies
[src]
impl Eq for PokeSpecies
[src]
impl PartialEq for PokeSpecies
[src]
fn eq(&self, __arg_0: &PokeSpecies) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PokeSpecies) -> bool
[src]
This method tests for !=
.