pub enum Fight<'a> {
Wave(&'a Wave),
Actor(&'a Actor),
}Expand description
One fight the campaign declares: a wave or an actor. The one type every rule
over “a fight” reads — the health_bar (spec-0073) and the on_kill
(spec-0074) alike.
Variants§
Wave(&'a Wave)
A waves[] entry — its bodies wear dw_wave_<id>.
Actor(&'a Actor)
An actors[] entry — its body wears dw_actor_<id>.
Implementations§
Source§impl<'a> Fight<'a>
impl<'a> Fight<'a>
Sourcepub fn tier(&self) -> Option<EncounterTier>
pub fn tier(&self) -> Option<EncounterTier>
The billing the fight declares.
Sourcepub fn health_bar(&self) -> Option<&'a HealthBar>
pub fn health_bar(&self) -> Option<&'a HealthBar>
The fight’s health_bar, if it declares one (spec-0073).
Sourcepub fn own_name(&self) -> Option<&'a str>
pub fn own_name(&self) -> Option<&'a str>
The name the fight carries of its own: an actor’s name, or the name
of a wave’s one mob entry. None for a wave of two entries or more, and
for a body with no name.
Sourcepub fn vulnerable(&self) -> bool
pub fn vulnerable(&self) -> bool
Whether the fight’s standing body can be hurt before any unleash: an
actor’s vulnerable; always for a wave, whose bodies are never
invulnerable.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Fight<'a>
impl<'a> RefUnwindSafe for Fight<'a>
impl<'a> Send for Fight<'a>
impl<'a> Sync for Fight<'a>
impl<'a> Unpin for Fight<'a>
impl<'a> UnsafeUnpin for Fight<'a>
impl<'a> UnwindSafe for Fight<'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