pub struct ImpactProc {
pub driver: ProcDriver,
pub actor_filter: ImpactActorFilter,
pub chance: f64,
pub fire: ImpactProcFn,
pub spell_filter: Option<fn(u32) -> bool>,
pub periodic_only: bool,
pub skip_periodic: bool,
pub crit_only: bool,
}Expand description
A registered per-damage-impact proc.
Fields§
§driver: ProcDriver§actor_filter: ImpactActorFilter§chance: f64§fire: ImpactProcFn§spell_filter: Option<fn(u32) -> bool>§periodic_only: bool§skip_periodic: bool§crit_only: boolImplementations§
Source§impl ImpactProc
impl ImpactProc
Sourcepub fn new(fire: ImpactProcFn) -> Self
pub fn new(fire: ImpactProcFn) -> Self
Creates a player-driven impact proc with unit chance and no eligibility restrictions.
pub fn with_driver(self, driver: ProcDriver) -> Self
pub fn with_actor_filter(self, actor_filter: ImpactActorFilter) -> Self
pub fn with_chance(self, chance: f64) -> Self
pub fn with_spell_filter(self, spell_filter: fn(u32) -> bool) -> Self
pub fn periodic_only(self) -> Self
pub fn skip_periodic(self) -> Self
pub fn crit_only(self) -> Self
Trait Implementations§
Source§impl Clone for ImpactProc
impl Clone for ImpactProc
Source§fn clone(&self) -> ImpactProc
fn clone(&self) -> ImpactProc
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 ImpactProc
impl Debug for ImpactProc
impl Copy for ImpactProc
Auto Trait Implementations§
impl Freeze for ImpactProc
impl RefUnwindSafe for ImpactProc
impl Send for ImpactProc
impl Sync for ImpactProc
impl Unpin for ImpactProc
impl UnsafeUnpin for ImpactProc
impl UnwindSafe for ImpactProc
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more