pub struct FightClock { /* private fields */ }Implementations§
Source§impl FightClock
impl FightClock
Sourcepub fn set_now(&mut self, tick: u64)
pub fn set_now(&mut self, tick: u64)
Stamp the current tick. Called by the event handler before dispatch so
schedule resolves relative delays against the right base.
Sourcepub fn now(&self) -> u64
pub fn now(&self) -> u64
The tick the dispatch in progress is running at. OverlordLogic::pre_event
stamps it in every dispatch path, so a hook that needs the current tick
but does not take it as an argument (the stone triggers’ per-slot
cooldown) reads it from here rather than growing a parameter through
apply_success_hooks.
Sourcepub fn set_dispatch_origin(&mut self, origin: CombatEventOrigin)
pub fn set_dispatch_origin(&mut self, origin: CombatEventOrigin)
Arm the provenance every subsequent schedule inherits. Called by
OverlordLogic::pre_event with the dispatching event’s provenance and
reset to Core when the dispatch ends.
Sourcepub fn schedule(&mut self, event: OverlordEvent, delay_ticks: u64)
pub fn schedule(&mut self, event: OverlordEvent, delay_ticks: u64)
Schedule event to fire delay_ticks after the current tick.
Inside a non-Core dispatch the event is stamped with that provenance — the delayed half of the inheritance rule. Stamping only ever upgrades (Core is the ambient default), so an event that was already marked by its emitter, or by the result-level restamp, is never downgraded here.
Sourcepub fn set_heartbeat(&mut self, event: OverlordEvent, rate_ticks: u64)
pub fn set_heartbeat(&mut self, event: OverlordEvent, rate_ticks: u64)
Install (or replace) the recurring combat heartbeat. Fires immediately
on the next collection, then every rate_ticks.
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Drop all pending events and the heartbeat. Called when a new fight is prepared so nothing from the previous fight leaks into it.
Sourcepub fn collect_due(&mut self, tick: u64) -> Vec<OverlordEvent>
pub fn collect_due(&mut self, tick: u64) -> Vec<OverlordEvent>
Drain everything due at tick: pending events in (due_tick, seq)
order, then the heartbeat if its interval elapsed.
Trait Implementations§
Source§impl Clone for FightClock
impl Clone for FightClock
Source§fn clone(&self) -> FightClock
fn clone(&self) -> FightClock
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FightClock
impl Debug for FightClock
Auto Trait Implementations§
impl Freeze for FightClock
impl RefUnwindSafe for FightClock
impl Send for FightClock
impl Sync for FightClock
impl Unpin for FightClock
impl UnwindSafe for FightClock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].