Type Definition eos_rs::api::monsters::MonsterSpeciesId
source · pub type MonsterSpeciesId = monster_id;
Expand description
A monster species ID with associated methods to get metadata.
Use the associated constants or the Self::new
method to get instances of this.
Implementations§
source§impl MonsterSpeciesId
impl MonsterSpeciesId
This impl provides general metadata about monster species in the game.
sourcepub const unsafe fn new(id: u32) -> Self
pub const unsafe fn new(id: u32) -> Self
Returns the ID struct for the monster species with the given ID.
Safety
The caller must make sure the ID is valid (refers to an existing monster species), otherwise this is UB.
sourcepub fn base_form(&self) -> MonsterSpeciesId
pub fn base_form(&self) -> MonsterSpeciesId
Checks if the specified monster ID corresponds to any of the pokémon that have multiple forms and returns the ID of the base form if so. If it doesn’t, the same ID is returned.
Some of the monsters included in the check are Unown, Cherrim and Deoxys.
sourcepub fn base_gender_form(&self) -> MonsterSpeciesId
pub fn base_gender_form(&self) -> MonsterSpeciesId
Returns the ID of the first form of the specified monster if the specified ID corresponds to a secondary form with female gender and the first form has male gender.
If those conditions don’t meet, returns the same ID unchanged.
sourcepub fn gender(&self) -> MonsterGender
pub fn gender(&self) -> MonsterGender
Returns the gender field of the monster.
sourcepub fn sprite_size(&self) -> u8
pub fn sprite_size(&self) -> u8
Returns the sprite size of the monster. If the size is between 1 and 6, 6 will be returned.
sourcepub fn sprite_file_size(&self) -> u8
pub fn sprite_file_size(&self) -> u8
Returns the sprite file size of the monster.
sourcepub fn pre_evolution(&self) -> Self
pub fn pre_evolution(&self) -> Self
Returns the pre-evolution id of a monster given its ID.
sourcepub fn evolutions(
&self,
ignore_sprite_size: bool,
include_shedinja: bool
) -> Vec<Self>
pub fn evolutions( &self, ignore_sprite_size: bool, include_shedinja: bool ) -> Vec<Self>
Returns a list of all the possible evolutions.
This will panic if the monster has more than 32 evolutions.
Arguments
ignore_sprite_size
- True to skip the check that prevents returning monsters with a different sprite size than the current one.include_shedinja
- True to skip the check that prevents Shedinja from being counted as a potential evolution.
sourcepub fn is_shaymin(&self) -> bool
pub fn is_shaymin(&self) -> bool
Checks if this is a Shaymin.
sourcepub fn is_castform(&self) -> bool
pub fn is_castform(&self) -> bool
Checks if this is a Castform.
sourcepub fn is_cherrim(&self) -> bool
pub fn is_cherrim(&self) -> bool
Checks if this is a Cherrim.
sourcepub fn get_can_move_flag(&self) -> bool
pub fn get_can_move_flag(&self) -> bool
Returns the flag that determines if a monster can move in dungeons.
sourcepub fn is_mission_allowed(&self) -> bool
pub fn is_mission_allowed(&self) -> bool
Checks if this monster is contained in the ffi::MISSION_BANNED_MONSTERS
array.
The function converts the ID by calling Self::base_form
and
Self::base_gender_form
first.
sourcepub fn is_mission_allowed_story(&self) -> bool
pub fn is_mission_allowed_story(&self) -> bool
Checks if the specified monster should be allowed to be part of a mission (probably as the client or the target), accounting for the progress on the story.
If PERFORMANCE_PROGRESS_FLAG[9]
is true, the function returns true.
If it isn’t, the function checks if the specified monster is contained in the
ffi::MISSION_BANNED_STORY_MONSTERS
array, or if it corresponds to the ID of the player
or the partner.
The function converts the ID by calling Self::base_form
and Self::base_gender_form
first.
sourcepub fn can_be_used_for_mission(
&self,
exclude_monsters_in_mission_banned_monsters: bool
) -> bool
pub fn can_be_used_for_mission( &self, exclude_monsters_in_mission_banned_monsters: bool ) -> bool
Returns whether this monster can be used (probably as the client or as the target) when generating a mission.
Excluded monsters include those that haven’t been fought in dungeons yet, the second form
of certain monsters and, if PERFORMANCE_PROGRESS_FLAG[9]
is 0, monsters in
[ffi::MISSION_BANNED_MONSTERS
, the species of the player and the species of the partner.
sourcepub fn get_low_kick_multiplier(&self) -> I24F8
pub fn get_low_kick_multiplier(&self) -> I24F8
Gets the Low Kick (and Grass Knot) damage multiplier for the given species.