Struct DamageValues
#[non_exhaustive]pub struct DamageValues {
pub original: f32,
pub new_damage: f32,
pub blocked: f32,
pub shield_damage: f32,
pub post_attack_invulnerability_ticks: i32,
pub should_cause_side_effects: bool,
pub reduction_modifiers: Vec<(Reduction, ReductionChange)>,
pub entered_pre: f32,
pub inflicted: f32,
pub health_damage: f32,
/* private fields */
}Expand description
A hit’s damage sequence as plain values, field for field: the form it crosses into a wasm mod as. Reduction storage is crate-visible only for the generated wasm codec; mods use the reduction accessors so future reduction kinds do not expose a fixed array layout.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.original: f32The damage sequence’s original value.
new_damage: f32The damage sequence’s new_damage value.
blocked: f32The damage sequence’s blocked value.
shield_damage: f32The damage sequence’s shield_damage value.
post_attack_invulnerability_ticks: i32The damage sequence’s post_attack_invulnerability_ticks value.
should_cause_side_effects: boolThe damage sequence’s should_cause_side_effects value.
reduction_modifiers: Vec<(Reduction, ReductionChange)>Ordered reduction adjustments for this hit.
entered_pre: f32The damage sequence’s entered_pre value.
inflicted: f32The damage sequence’s inflicted value.
health_damage: f32The damage sequence’s health_damage value.
Implementations§
§impl DamageValues
impl DamageValues
Trait Implementations§
§impl Clone for DamageValues
impl Clone for DamageValues
§fn clone(&self) -> DamageValues
fn clone(&self) -> DamageValues
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 more§impl Debug for DamageValues
impl Debug for DamageValues
§impl From<&DamageContainer> for DamageValues
impl From<&DamageContainer> for DamageValues
§fn from(value: &DamageContainer) -> DamageValues
fn from(value: &DamageContainer) -> DamageValues
Converts to this type from the input type.
§impl From<DamageValues> for DamageContainer
impl From<DamageValues> for DamageContainer
§fn from(values: DamageValues) -> DamageContainer
fn from(values: DamageValues) -> DamageContainer
Converts to this type from the input type.
§impl PartialEq for DamageValues
impl PartialEq for DamageValues
impl StructuralPartialEq for DamageValues
Auto Trait Implementations§
impl Freeze for DamageValues
impl RefUnwindSafe for DamageValues
impl Send for DamageValues
impl Sync for DamageValues
impl Unpin for DamageValues
impl UnsafeUnpin for DamageValues
impl UnwindSafe for DamageValues
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