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

This impl provides general metadata about monster species in the game.

source

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.

source

pub const fn id(&self) -> u32

Returns the ID of this monster.

source

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.

source

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.

source

pub fn gender(&self) -> MonsterGender

Returns the gender field of the monster.

source

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.

source

pub fn sprite_file_size(&self) -> u8

Returns the sprite file size of the monster.

source

pub fn pre_evolution(&self) -> Self

Returns the pre-evolution id of a monster given its ID.

source

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.
source

pub fn is_unown(&self) -> bool

Checks if this is an Unown.

source

pub fn is_shaymin(&self) -> bool

Checks if this is a Shaymin.

source

pub fn is_castform(&self) -> bool

Checks if this is a Castform.

source

pub fn is_cherrim(&self) -> bool

Checks if this is a Cherrim.

source

pub fn is_deoxys(&self) -> bool

Checks if this is a Deoxys.

source

pub fn get_can_move_flag(&self) -> bool

Returns the flag that determines if a monster can move in dungeons.

source

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.

source

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.

source

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.

source

pub fn get_low_kick_multiplier(&self) -> I24F8

Gets the Low Kick (and Grass Knot) damage multiplier for the given species.

Trait Implementations§

source§

impl DungeonMonsterSpeciesIdExt for MonsterSpeciesId

source§

fn is_satisfying_scenario_condition_to_spawn( &self, _ov29: &OverlayLoadLease<29> ) -> bool

Note: unverified, ported from Irdkwia’s notes
source§

fn is_in_spawn_list( &self, spawn_list: &mut undefined, _ov29: &OverlayLoadLease<29> ) -> bool

Note: unverified, ported from Irdkwia’s notes Read more
source§

impl Copy for MonsterSpeciesId