pub struct VoidSerpentState {Show 13 fields
pub arena_width: u32,
pub arena_height: u32,
pub original_width: u32,
pub original_height: u32,
pub consumed_north: u32,
pub consumed_south: u32,
pub consumed_east: u32,
pub consumed_west: u32,
pub void_projectiles: bool,
pub projectiles_per_turn: u32,
pub serpent_emerged: bool,
pub serpent_attack_damage: f32,
pub turn_count: u32,
}Expand description
State for the Void Serpent Boss. Consumes the arena: each turn, edge tiles become void (instant death). Phase 2: void tiles spit projectiles. Phase 3: serpent emerges for direct attacks.
Fields§
§arena_width: u32Current arena width (shrinks over time).
arena_height: u32Current arena height.
original_width: u32Original arena width.
original_height: u32Original arena height.
consumed_north: u32Which edges have been consumed (layers consumed from each side).
consumed_south: u32§consumed_east: u32§consumed_west: u32§void_projectiles: boolWhether void tiles spit projectiles (phase 2).
projectiles_per_turn: u32Number of projectiles per turn.
serpent_emerged: boolWhether the serpent has emerged (phase 3).
serpent_attack_damage: f32Serpent direct attack damage.
turn_count: u32Turn counter.
Implementations§
Source§impl VoidSerpentState
impl VoidSerpentState
pub fn new(arena_w: u32, arena_h: u32) -> Self
Sourcepub fn consume_edge(&mut self) -> Option<&'static str>
pub fn consume_edge(&mut self) -> Option<&'static str>
Consume one edge row/column. Returns which direction was consumed.
Sourcepub fn arena_fraction(&self) -> f32
pub fn arena_fraction(&self) -> f32
Fraction of arena remaining.
Sourcepub fn enable_projectiles(&mut self)
pub fn enable_projectiles(&mut self)
Enable void projectiles (phase 2).
Sourcepub fn emerge_serpent(&mut self, damage: f32)
pub fn emerge_serpent(&mut self, damage: f32)
Serpent emerges (phase 3).
Trait Implementations§
Source§impl Clone for VoidSerpentState
impl Clone for VoidSerpentState
Source§impl Debug for VoidSerpentState
impl Debug for VoidSerpentState
Auto Trait Implementations§
impl Freeze for VoidSerpentState
impl RefUnwindSafe for VoidSerpentState
impl Send for VoidSerpentState
impl Sync for VoidSerpentState
impl Unpin for VoidSerpentState
impl UnsafeUnpin for VoidSerpentState
impl UnwindSafe for VoidSerpentState
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.