pub struct OuroborosBossState {
pub reversed: bool,
pub normal_turns_remaining: u32,
pub swap_interval: u32,
pub turns_since_swap: u32,
pub total_self_heal: f32,
pub total_player_heal: f32,
pub phase2_active: bool,
pub rng_state: u64,
}Expand description
State for the Ouroboros Boss. Heals by dealing damage to player. Player heals by dealing damage to boss. Bleed heals the bleeder. Healing damages the healer. Phase 2: rules randomly swap back to normal for 2 turns.
Fields§
§reversed: boolWhether damage/heal semantics are currently reversed.
normal_turns_remaining: u32Countdown for temporary normal-rules window.
swap_interval: u32How many turns between rule swaps (phase 2).
turns_since_swap: u32Turn counter since last swap.
total_self_heal: f32Total HP healed from dealing damage.
total_player_heal: f32Total HP player healed from dealing damage.
phase2_active: boolWhether phase 2 random swapping is active.
rng_state: u64RNG for swap timing.
Implementations§
Source§impl OuroborosBossState
impl OuroborosBossState
pub fn new() -> Self
Sourcepub fn process_damage(
&mut self,
raw_damage: f32,
is_boss_attacking: bool,
) -> (f32, f32)
pub fn process_damage( &mut self, raw_damage: f32, is_boss_attacking: bool, ) -> (f32, f32)
Process a damage event under Ouroboros rules. Returns (actual_damage_to_target, heal_to_source).
Sourcepub fn process_heal(&self, raw_heal: f32) -> f32
pub fn process_heal(&self, raw_heal: f32) -> f32
Process a heal event under Ouroboros rules. Returns actual healing (negative means damage).
Sourcepub fn advance_turn(&mut self) -> bool
pub fn advance_turn(&mut self) -> bool
Advance a turn. May trigger rule swap in phase 2.
Sourcepub fn enter_phase2(&mut self)
pub fn enter_phase2(&mut self)
Activate phase 2 swapping.
Trait Implementations§
Source§impl Clone for OuroborosBossState
impl Clone for OuroborosBossState
Source§impl Debug for OuroborosBossState
impl Debug for OuroborosBossState
Auto Trait Implementations§
impl Freeze for OuroborosBossState
impl RefUnwindSafe for OuroborosBossState
impl Send for OuroborosBossState
impl Sync for OuroborosBossState
impl Unpin for OuroborosBossState
impl UnsafeUnpin for OuroborosBossState
impl UnwindSafe for OuroborosBossState
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
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more