pub struct FightSim { /* private fields */ }Expand description
A self-contained fight in progress. The scheduled work lives in the
engine handler’s FightClock; the sim carries the simulated state and
logical time.
Implementations§
Source§impl FightSim
impl FightSim
pub fn state(&self) -> &OverlordState
pub fn tick(&self) -> u64
Sourcepub fn state_mut(&mut self) -> &mut OverlordState
pub fn state_mut(&mut self) -> &mut OverlordState
Mutable access to the simulated state, for installing a frozen
reference build between FightEngine::start and the first step.
The A2-BAL-001 calibration needs a player whose strength is the authored
S_ref for the chapter rather than whatever gear a run happened to roll
— otherwise D_old / D_new_unscaled measures the loot, not the change.
Mutating a fight that has already been stepped is not supported: the
engine’s determinism guarantee covers start → run, not arbitrary
edits in between.
Sourcepub fn metrics(&self) -> &FightMetrics
pub fn metrics(&self) -> &FightMetrics
The raw combat-feel metrics collected so far.
Sourcepub fn metrics_summary(&self) -> FightMetricsSummary
pub fn metrics_summary(&self) -> FightMetricsSummary
Structured, serde-serializable combat-feel summary (per-entity, per-team,
hero breakout, dispersion). The hero is the fight’s player_id.
Auto Trait Implementations§
impl Freeze for FightSim
impl RefUnwindSafe for FightSim
impl Send for FightSim
impl Sync for FightSim
impl Unpin for FightSim
impl UnwindSafe for FightSim
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
§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].