pub struct CombatView<'a> {
pub(crate) program: &'a CombatProgram,
pub(crate) instance: &'a CombatInstance,
}Expand description
Read-only combat state and dense-buffer projection.
Fields§
§program: &'a CombatProgram§instance: &'a CombatInstanceImplementations§
Source§impl<'a> CombatView<'a>
impl<'a> CombatView<'a>
pub fn new(program: &'a CombatProgram, instance: &'a CombatInstance) -> Self
pub const fn for_actor(&self, actor: ActorId) -> ActorView<'a>
pub const fn for_hook( &self, now: SimTime, target: Option<EnemyIdx>, ) -> HookView<'a>
Sourcepub fn primary_resource_fraction(&self) -> f64
pub fn primary_resource_fraction(&self) -> f64
Current primary-resource fraction, or 1.0 when the spec has no bounded pool.
Sourcepub fn player_aura_remaining_ms_at(
&self,
local: LocalAuraIdx,
now: SimTime,
) -> Option<u32>
pub fn player_aura_remaining_ms_at( &self, local: LocalAuraIdx, now: SimTime, ) -> Option<u32>
Remaining duration of one player aura at an explicit combat time.
Sourcepub fn is_player_aura_active_on_target(
&self,
local: LocalAuraIdx,
target: EnemyIdx,
) -> bool
pub fn is_player_aura_active_on_target( &self, local: LocalAuraIdx, target: EnemyIdx, ) -> bool
Whether the player currently owns this aura on a hostile target.
pub(crate) fn buff_totals(&self) -> BuffTotals
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CombatView<'a>
impl<'a> !RefUnwindSafe for CombatView<'a>
impl<'a> !Send for CombatView<'a>
impl<'a> !Sync for CombatView<'a>
impl<'a> Unpin for CombatView<'a>
impl<'a> UnsafeUnpin for CombatView<'a>
impl<'a> !UnwindSafe for CombatView<'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