pub type Move = move_;
Expand description
A monster move.
Implementations§
source§impl Move
impl Move
See MoveId
for additional metadata methods.
sourcepub unsafe fn init(move_pnt: *mut Self, move_id: MoveId)
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.
sourcepub fn get_target_and_range(&self, is_ai: bool) -> MoveTargetAndRange
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.
sourcepub fn get_base_power(&self) -> i32
pub fn get_base_power(&self) -> i32
Gets the base power of the move.
sourcepub fn get_max_pp(&self) -> i32
pub fn get_max_pp(&self) -> i32
Gets the maximum PP for the move.
Returns max PP for the given move, capped at 99.
sourcepub fn get_crit_chance(&self) -> i32
pub fn get_crit_chance(&self) -> i32
Gets the critical hit chance of the move.
sourcepub fn is_move_range_string_19(&self) -> bool
pub fn is_move_range_string_19(&self) -> bool
Returns whether a move’s range string is 19 (“User”).
sourcepub fn get_type(&self) -> MonsterTypeId
pub fn get_type(&self) -> MonsterTypeId
Gets the type of the move.
sourcepub fn get_ai_weight(&self) -> u8
pub fn get_ai_weight(&self) -> u8
Gets the AI weight of a move.
sourcepub fn get_accuracy1(&self) -> u8
pub fn get_accuracy1(&self) -> u8
Gets the accuracy1 value for the move.
sourcepub fn get_accuracy2(&self) -> u8
pub fn get_accuracy2(&self) -> u8
Gets the accuracy2 value for the move.
sourcepub fn get_ai_condition_random_chance(&self) -> u8
pub fn get_ai_condition_random_chance(&self) -> u8
Gets the ai_condition_random_chance
value for the move.
sourcepub fn should_play_alternative_animation(&self, user: &DungeonEntity) -> bool
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.
sourcepub fn get_animation_id(
&self,
apparent_weather: Weather,
should_play_alternative_animation: bool
) -> u16
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.