Type Definition eos_rs::api::moves::MoveId

source ·
pub type MoveId = move_id;
Expand description

A move ID with associated methods to get metadata.

Use the associated constants or the Self::new method to get instances of this.

Implementations§

source§

impl MoveId

This impl provides general metadata about moves in the game.

See Move for additional metadata methods.

source

pub const unsafe fn new(id: u32) -> Self

Returns the ID struct for the move with the given ID.

Safety

The caller must make sure the ID is valid (refers to an existing move), otherwise this is UB.

source

pub const fn id(&self) -> u32

Returns the ID of this move.

source

pub fn is_recoil_move(&self) -> bool

Checks if the move is a recoil move (affected by Reckless).

source

pub fn is_punch_move(&self) -> bool

Checks if the move is a punch move (affected by Iron Fist).

source

pub fn get_category(&self) -> Option<MoveCategory>

Gets a move’s category (physical, special, status). Returns None if the category is invalid.

source

pub fn get_faint_reason(&self, item_id: ItemId) -> faint_reason

Gets the faint reason code (see HandleFaint) for a given move-item combination.

If there’s no item, the reason code is the move ID. If the item is an orb, return FAINT_REASON_ORB_ITEM. Otherwise, return FAINT_REASON_NON_ORB_ITEM.

Trait Implementations§

source§

impl DungeonMoveIdExt for MoveId

source§

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

Checks if the move isn’t a physical move.
source§

impl Copy for MoveId