Struct eos_rs::api::dungeon_mode::DungeonEffectsInternals
source · pub struct DungeonEffectsInternals<'a>(_);
Expand description
Internal functions for battle effect calculations.
Implementations§
source§impl<'a> DungeonEffectsInternals<'a>
impl<'a> DungeonEffectsInternals<'a>
sourcepub unsafe fn apply_damage(
&mut self,
attacker: &mut DungeonEntity,
defender: &mut DungeonEntity,
damage_data: &mut damage_data,
param_4: undefined4,
param_5: *mut undefined4,
faint_reason: faint_reason
) -> bool
pub unsafe fn apply_damage( &mut self, attacker: &mut DungeonEntity, defender: &mut DungeonEntity, damage_data: &mut damage_data, param_4: undefined4, param_5: *mut undefined4, faint_reason: faint_reason ) -> bool
Applies damage to a monster. Displays the damage animation, lowers its health and handles reviving if applicable.
The EU version has some additional checks related to printing fainting messages under specific circumstances.
Returns true if the target fainted (reviving does not count as fainting).
Arguments
attacker
- The monster that is trying to inflict this status.defender
- The monster that is being inflicted with this status.damage_data
- Mutable reference to the damage_data struct that contains info about theparam_4
- ?param_5
- ?param_6
- ?
Safety
The caller must make sure the undefined params are valid for this function.
sourcepub fn try_spawn_enemy_item_drop(
&mut self,
attacker: &mut DungeonEntity,
defender: &mut DungeonEntity
)
pub fn try_spawn_enemy_item_drop( &mut self, attacker: &mut DungeonEntity, defender: &mut DungeonEntity )
Determine what item a defeated enemy should drop, if any, then (probably?) spawn that item underneath them.
This function is called at the time when an enemy is defeated from Self::apply_damage
.
sourcepub fn move_hit_check(
&mut self,
attacker: &mut DungeonEntity,
defender: &mut DungeonEntity,
the_move: &Move,
use_second_accuracy: bool
) -> bool
pub fn move_hit_check( &mut self, attacker: &mut DungeonEntity, defender: &mut DungeonEntity, the_move: &Move, use_second_accuracy: bool ) -> bool
Determines if a move used hits or misses the target.
Arguments
attacker
- The monster that is trying to inflict this status.defender
- The monster that is being inflicted with this status.the_move
- Reference to move datause_second_accuracy
- True if the move’s first accuracy (accuracy1) should be used, false
sourcepub unsafe fn execute_move_effect(
&mut self,
param_1: *mut undefined4,
attacker: &mut DungeonEntity,
the_move: &Move,
param_4: undefined4,
param_5: undefined4
)
pub unsafe fn execute_move_effect( &mut self, param_1: *mut undefined4, attacker: &mut DungeonEntity, the_move: &Move, param_4: undefined4, param_5: undefined4 )
Handles the effects that happen after a move is used. Includes a loop that is run for each target, multiple ability checks and the giant switch statement that executes the effect of the move used given its ID.
Arguments
param_1
- pointer to some structattacker
- attacker pointerthe_move
- pointer to move dataparam_4
- ?param_5
- ?
Safety
The caller must make sure the undefined params are valid for this function.