pub struct ChaosWeaverState {
pub weakness_overrides: HashMap<Element, Element>,
pub slot_swaps: HashMap<u32, u32>,
pub randomize_damage_display: bool,
pub randomize_tiles: bool,
pub chaos_count: u32,
pub rng_state: u64,
}Expand description
State for the Chaos Weaver Boss. Manipulates game rules: element weakness chart, ability slots, damage display. Phase 2: randomizes tile effects.
Fields§
§weakness_overrides: HashMap<Element, Element>Scrambled element weakness overrides. Key: element, Value: new weakness.
slot_swaps: HashMap<u32, u32>Mapping of swapped ability slots (original -> new position).
randomize_damage_display: boolWhether damage numbers are visually randomized.
randomize_tiles: boolWhether tile effects are randomized (phase 2).
chaos_count: u32How many rule changes have occurred.
rng_state: u64RNG state.
Implementations§
Source§impl ChaosWeaverState
impl ChaosWeaverState
pub fn new() -> Self
Sourcepub fn scramble_weaknesses(&mut self)
pub fn scramble_weaknesses(&mut self)
Scramble the element weakness chart.
Sourcepub fn swap_ability_slots(&mut self, max_slots: u32) -> (u32, u32)
pub fn swap_ability_slots(&mut self, max_slots: u32) -> (u32, u32)
Swap two ability slots.
Sourcepub fn fake_damage_number(&mut self, _actual: f32) -> f32
pub fn fake_damage_number(&mut self, _actual: f32) -> f32
Get a fake damage number for display (actual damage is correct).
Sourcepub fn enable_damage_randomization(&mut self)
pub fn enable_damage_randomization(&mut self)
Enable damage display randomization.
Sourcepub fn enable_tile_randomization(&mut self)
pub fn enable_tile_randomization(&mut self)
Enable tile randomization (phase 2).
Sourcepub fn effective_weakness(&self, element: Element) -> Element
pub fn effective_weakness(&self, element: Element) -> Element
Lookup what element a given element is now weak to (after scramble).
Trait Implementations§
Source§impl Clone for ChaosWeaverState
impl Clone for ChaosWeaverState
Source§impl Debug for ChaosWeaverState
impl Debug for ChaosWeaverState
Auto Trait Implementations§
impl Freeze for ChaosWeaverState
impl RefUnwindSafe for ChaosWeaverState
impl Send for ChaosWeaverState
impl Sync for ChaosWeaverState
impl Unpin for ChaosWeaverState
impl UnsafeUnpin for ChaosWeaverState
impl UnwindSafe for ChaosWeaverState
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.