pub struct OverkillAbsorbScriptContext<'a> {
state: &'a mut CombatState,
event: OverkillAbsorbEvent,
}Expand description
Stateful runtime context exposed to an authored aura-316 script.
Fields§
§state: &'a mut CombatState§event: OverkillAbsorbEventImplementations§
Source§impl<'a> OverkillAbsorbScriptContext<'a>
impl<'a> OverkillAbsorbScriptContext<'a>
pub(crate) fn new( state: &'a mut CombatState, event: OverkillAbsorbEvent, ) -> Self
Sourcepub const fn event(&self) -> OverkillAbsorbEvent
pub const fn event(&self) -> OverkillAbsorbEvent
Immutable per-hit inputs, including the active aura identity.
Sourcepub fn cooldown_ready(&self) -> bool
pub fn cooldown_ready(&self) -> bool
Whether this aura application’s script cooldown is ready for the current hit.
Sourcepub fn start_cooldown(&mut self, duration: SimTime) -> SimTime
pub fn start_cooldown(&mut self, duration: SimTime) -> SimTime
Starts this aura application’s script cooldown from the current hit time.
Sourcepub fn friendly_actor_health(&self, actor: ActorId) -> Option<f64>
pub fn friendly_actor_health(&self, actor: ActorId) -> Option<f64>
Reads the current absolute health of a friendly combat actor.
Sourcepub fn spec_runtime<T>(&self) -> Option<&T>where
T: SpecRuntime,
pub fn spec_runtime<T>(&self) -> Option<&T>where
T: SpecRuntime,
Downcasts the resettable per-spec runtime state.
Sourcepub fn spec_runtime_mut<T>(&mut self) -> Option<&mut T>where
T: SpecRuntime,
pub fn spec_runtime_mut<T>(&mut self) -> Option<&mut T>where
T: SpecRuntime,
Mutably downcasts the resettable per-spec runtime state.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for OverkillAbsorbScriptContext<'a>
impl<'a> !RefUnwindSafe for OverkillAbsorbScriptContext<'a>
impl<'a> Send for OverkillAbsorbScriptContext<'a>
impl<'a> !Sync for OverkillAbsorbScriptContext<'a>
impl<'a> Unpin for OverkillAbsorbScriptContext<'a>
impl<'a> UnsafeUnpin for OverkillAbsorbScriptContext<'a>
impl<'a> !UnwindSafe for OverkillAbsorbScriptContext<'a>
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
§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