Type Definition eos_rs::api::moves::Move

source ·
pub type Move = move_;
Expand description

A monster move.

Implementations§

source§

impl Move

See MoveId for additional metadata methods.

source

pub unsafe fn init(move_pnt: *mut Self, move_id: MoveId)

Initializes a move info struct.

This sets f_exists and f_enabled_for_ai on the flags, the ID to the given ID, the PP to the max PP for the move ID, and the ginseng boost to 0.

Safety

The pointer must point to a valid Move or uninitialized Move.

source

pub fn id(&self) -> MoveId

Returns the move ID

source

pub fn get_target_and_range(&self, is_ai: bool) -> MoveTargetAndRange

Gets the move target-and-range field. See struct move_target_and_range in the C headers.

source

pub fn get_base_power(&self) -> i32

Gets the base power of the move.

source

pub fn get_max_pp(&self) -> i32

Gets the maximum PP for the move.

Returns max PP for the given move, capped at 99.

source

pub fn get_crit_chance(&self) -> i32

Gets the critical hit chance of the move.

source

pub fn is_move_range_string_19(&self) -> bool

Returns whether a move’s range string is 19 (“User”).

source

pub fn get_type(&self) -> MonsterTypeId

Gets the type of the move.

source

pub fn get_ai_weight(&self) -> u8

Gets the AI weight of a move.

source

pub fn get_accuracy1(&self) -> u8

Gets the accuracy1 value for the move.

source

pub fn get_accuracy2(&self) -> u8

Gets the accuracy2 value for the move.

source

pub fn get_ai_condition_random_chance(&self) -> u8

Gets the ai_condition_random_chance value for the move.

source

pub fn should_play_alternative_animation(&self, user: &DungeonEntity) -> bool

Checks whether a moved used by a monster should play its alternative animation. Includes checks for Curse, Snore, Sleep Talk, Solar Beam and 2-turn moves.

source

pub fn get_animation_id( &self, apparent_weather: Weather, should_play_alternative_animation: bool ) -> u16

Returns the move animation ID that should be played for a move. It contains a check for weather ball. After that, if the parameter should_play_alternative_animation is false, the move ID is returned.

should_play_alternative_animation can be retrieved with Self::should_play_alternative_animation.

If it’s true, there’s a bunch of manual ID checks that result on a certain hardcoded return value.

Trait Implementations§

source§

impl DungeonMoveExt for Move

source§

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

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

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

Checks if a move is a Hyper Beam variant that requires a a turn to recharge. Read more