pub struct BossPhase {
pub phase_number: u32,
pub hp_threshold_pct: f32,
pub behavior_pattern: BehaviorPattern,
pub speed_mult: f32,
pub damage_mult: f32,
pub special_ability: SpecialAbility,
pub transition_animation: PhaseTransition,
pub dialogue_on_enter: String,
}Expand description
A single phase of a boss encounter.
Fields§
§phase_number: u32Phase index (1-based).
hp_threshold_pct: f32HP threshold (as percentage) at which this phase activates. e.g., 0.75 means phase activates when boss drops below 75% HP.
behavior_pattern: BehaviorPatternBehavior pattern during this phase.
speed_mult: f32Speed multiplier for this phase.
damage_mult: f32Damage multiplier for this phase.
special_ability: SpecialAbilitySpecial ability available during this phase.
transition_animation: PhaseTransitionHow the transition into this phase is animated.
dialogue_on_enter: StringDialogue spoken when entering this phase.
Implementations§
Source§impl BossPhase
impl BossPhase
pub fn new(phase_number: u32, hp_threshold_pct: f32) -> Self
pub fn with_behavior(self, pattern: BehaviorPattern) -> Self
pub fn with_speed(self, mult: f32) -> Self
pub fn with_damage(self, mult: f32) -> Self
pub fn with_ability(self, ability: SpecialAbility) -> Self
pub fn with_transition(self, anim: PhaseTransition) -> Self
pub fn with_dialogue(self, dialogue: impl Into<String>) -> Self
Trait Implementations§
impl StructuralPartialEq for BossPhase
Auto Trait Implementations§
impl Freeze for BossPhase
impl RefUnwindSafe for BossPhase
impl Send for BossPhase
impl Sync for BossPhase
impl Unpin for BossPhase
impl UnsafeUnpin for BossPhase
impl UnwindSafe for BossPhase
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.