pub struct EigenstateBossState {
pub forms: Vec<QuantumForm>,
pub collapsed_form: Option<QuantumForm>,
pub observed: bool,
pub entangled: bool,
pub entangled_hp: f32,
pub turns_unobserved: u32,
pub rng_state: u64,
}Expand description
State for the Eigenstate Boss. Exists in superposition. Observing (targeting) collapses to one form. Phase 2: 3 forms. Phase 3: entangled with a copy.
Fields§
§forms: Vec<QuantumForm>Available forms in the superposition.
collapsed_form: Option<QuantumForm>Currently collapsed form (None = still in superposition).
observed: boolWhether the boss is being observed/targeted.
entangled: boolWhether an entangled copy exists (phase 3).
entangled_hp: f32HP of the entangled copy.
turns_unobserved: u32Turns since last observation.
rng_state: u64RNG for collapse.
Implementations§
Source§impl EigenstateBossState
impl EigenstateBossState
pub fn new() -> Self
Sourcepub fn observe(&mut self) -> QuantumForm
pub fn observe(&mut self) -> QuantumForm
Observe the boss, collapsing it to a random form.
Sourcepub fn add_evasion_form(&mut self)
pub fn add_evasion_form(&mut self)
Add evasion form (phase 2).
Sourcepub fn entangle(&mut self, boss_hp: f32) -> f32
pub fn entangle(&mut self, boss_hp: f32) -> f32
Create entangled copy (phase 3). Returns initial copy HP.
Sourcepub fn mirror_damage(&mut self, amount: f32) -> f32
pub fn mirror_damage(&mut self, amount: f32) -> f32
When entangled, damage to one is mirrored to the other.
Sourcepub fn in_superposition(&self) -> bool
pub fn in_superposition(&self) -> bool
Is the boss in superposition (not collapsed)?
Sourcepub fn damage_mult(&self) -> f32
pub fn damage_mult(&self) -> f32
Get damage multiplier based on current form.
Sourcepub fn defense_mult(&self) -> f32
pub fn defense_mult(&self) -> f32
Get defense multiplier based on current form.
Trait Implementations§
Source§impl Clone for EigenstateBossState
impl Clone for EigenstateBossState
Source§fn clone(&self) -> EigenstateBossState
fn clone(&self) -> EigenstateBossState
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 EigenstateBossState
impl Debug for EigenstateBossState
Auto Trait Implementations§
impl Freeze for EigenstateBossState
impl RefUnwindSafe for EigenstateBossState
impl Send for EigenstateBossState
impl Sync for EigenstateBossState
impl Unpin for EigenstateBossState
impl UnsafeUnpin for EigenstateBossState
impl UnwindSafe for EigenstateBossState
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.