pub struct DamageReduction {
pub horizontal_blocking_angle: f32,
pub damage_type: Option<IDSet>,
pub base: f32,
pub factor: f32,
}Expand description
Shield logic for reducing damage.
Fields§
§horizontal_blocking_angle: f32The angle (in degrees) in front of the player that is blocked.
damage_type: Option<IDSet>Specific damage types this reduction applies to. None = All.
base: f32Flat amount of damage removed.
factor: f32Percentage of remaining damage removed (0.0 to 1.0).
Trait Implementations§
Source§impl Clone for DamageReduction
impl Clone for DamageReduction
Source§fn clone(&self) -> DamageReduction
fn clone(&self) -> DamageReduction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DamageReduction
impl Debug for DamageReduction
Source§impl<'a> Decode<'a> for DamageReduction
impl<'a> Decode<'a> for DamageReduction
Source§impl Encode for DamageReduction
impl Encode for DamageReduction
Source§impl PartialEq for DamageReduction
impl PartialEq for DamageReduction
impl StructuralPartialEq for DamageReduction
Auto Trait Implementations§
impl Freeze for DamageReduction
impl RefUnwindSafe for DamageReduction
impl Send for DamageReduction
impl Sync for DamageReduction
impl Unpin for DamageReduction
impl UnwindSafe for DamageReduction
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