pub(crate) struct EncounterRuntime {Show 13 fields
active_pull: PullId,
pull_epoch: u32,
lifecycle_epoch: u64,
pull_started_at: SimTime,
waves_active: Vec<bool>,
groups_complete: Vec<bool>,
groups_queued: Vec<bool>,
pulls_complete: Vec<bool>,
pull_completion_queued: bool,
enemy_completion: Vec<EnemyCompletion>,
terminated_at: Option<SimTime>,
started: bool,
pending_target_precombat: Option<PullLifecycleGeneration>,
}Fields§
§active_pull: PullId§pull_epoch: u32§lifecycle_epoch: u64§pull_started_at: SimTime§waves_active: Vec<bool>§groups_complete: Vec<bool>§groups_queued: Vec<bool>§pulls_complete: Vec<bool>§pull_completion_queued: bool§enemy_completion: Vec<EnemyCompletion>§terminated_at: Option<SimTime>§started: bool§pending_target_precombat: Option<PullLifecycleGeneration>Implementations§
Source§impl EncounterRuntime
impl EncounterRuntime
pub(crate) fn new(definition: &EncounterDefinition) -> Self
pub(crate) fn reset(&mut self, definition: &EncounterDefinition)
pub(crate) const fn active_pull(&self) -> PullId
pub(crate) const fn pull_epoch(&self) -> u32
pub(crate) const fn generation(&self) -> PullLifecycleGeneration
pub(crate) const fn pull_started_at(&self) -> SimTime
pub(crate) fn is_current(&self, pull: PullId, epoch: u32) -> bool
pub(crate) fn is_current_generation( &self, generation: PullLifecycleGeneration, ) -> bool
pub(crate) fn start_once(&mut self) -> bool
pub(crate) fn wave_is_active(&self, wave: WaveId) -> bool
pub(crate) fn activate_wave(&mut self, wave: WaveId) -> bool
pub(crate) fn group_is_complete(&self, group: GroupId) -> bool
pub(crate) fn queue_group_completion(&mut self, group: GroupId) -> bool
pub(crate) fn complete_group(&mut self, group: GroupId) -> bool
pub(crate) fn queue_pull_completion(&mut self) -> bool
pub(crate) fn complete_pull(&mut self, pull: PullId) -> bool
pub(crate) fn begin_next_pull(&mut self, pull: PullId, at: SimTime)
pub(crate) fn queue_target_precombat(&mut self)
pub(crate) fn take_current_target_precombat(&mut self) -> bool
pub(crate) fn record_enemy_completion( &mut self, enemy: EnemyIdx, completion: EnemyCompletion, ) -> bool
pub(crate) fn enemy_completion( &self, enemy: EnemyIdx, ) -> Option<EnemyCompletion>
pub(crate) fn terminate(&mut self, at: SimTime)
pub(crate) const fn terminated_at(&self) -> Option<SimTime>
fn mark_initial_waves(&mut self, definition: &EncounterDefinition)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EncounterRuntime
impl RefUnwindSafe for EncounterRuntime
impl Send for EncounterRuntime
impl Sync for EncounterRuntime
impl Unpin for EncounterRuntime
impl UnsafeUnpin for EncounterRuntime
impl UnwindSafe for EncounterRuntime
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