pub struct DamageResult {
pub damage: u16,
pub effectiveness: f32,
pub is_miss: bool,
}Expand description
Result of a damage calculation.
Fields§
§damage: u16Final damage after all modifiers.
effectiveness: f32Type effectiveness multiplier (1.0 = neutral, 2.0 = super effective).
is_miss: boolWhether the move missed (effectiveness = 0 or accuracy failed).
Trait Implementations§
Source§impl Clone for DamageResult
impl Clone for DamageResult
Source§fn clone(&self) -> DamageResult
fn clone(&self) -> DamageResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DamageResult
Source§impl Debug for DamageResult
impl Debug for DamageResult
Source§impl PartialEq for DamageResult
impl PartialEq for DamageResult
impl StructuralPartialEq for DamageResult
Auto Trait Implementations§
impl Freeze for DamageResult
impl RefUnwindSafe for DamageResult
impl Send for DamageResult
impl Sync for DamageResult
impl Unpin for DamageResult
impl UnsafeUnpin for DamageResult
impl UnwindSafe for DamageResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more