pub struct NullBossState {
pub erased_ui: Vec<EraseTarget>,
pub locked_abilities: Vec<u32>,
pub max_locked: usize,
pub buffs_erased: u32,
pub rng_state: u64,
}Expand description
State for the Null Boss. Phase 1: erases player buffs. Phase 2: erases UI elements (HP bar, map). Phase 3: erases player abilities (random lock each turn). Death: everything restores.
Fields§
§erased_ui: Vec<EraseTarget>Which UI elements have been erased.
locked_abilities: Vec<u32>Which ability slots are currently locked.
max_locked: usizeMaximum abilities that can be locked simultaneously.
buffs_erased: u32How many buffs have been erased total.
rng_state: u64Pseudo-random state for selecting targets.
Implementations§
Source§impl NullBossState
impl NullBossState
pub fn new() -> Self
Sourcepub fn erase_ui_element(&mut self) -> EraseTarget
pub fn erase_ui_element(&mut self) -> EraseTarget
Erase a random UI element (phase 2).
Sourcepub fn lock_random_ability(&mut self, max_slots: u32) -> Option<u32>
pub fn lock_random_ability(&mut self, max_slots: u32) -> Option<u32>
Lock a random ability slot (phase 3).
Sourcepub fn erase_buffs(&mut self, active_buff_count: u32) -> u32
pub fn erase_buffs(&mut self, active_buff_count: u32) -> u32
Erase player buffs (phase 1). Returns number erased.
Sourcepub fn restore_all(&mut self) -> Vec<EraseTarget>
pub fn restore_all(&mut self) -> Vec<EraseTarget>
On death: restore everything.
Trait Implementations§
Source§impl Clone for NullBossState
impl Clone for NullBossState
Source§fn clone(&self) -> NullBossState
fn clone(&self) -> NullBossState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NullBossState
impl Debug for NullBossState
Auto Trait Implementations§
impl Freeze for NullBossState
impl RefUnwindSafe for NullBossState
impl Send for NullBossState
impl Sync for NullBossState
impl Unpin for NullBossState
impl UnsafeUnpin for NullBossState
impl UnwindSafe for NullBossState
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
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.