Tweaked poise effects and thresholds.

This commit is contained in:
Sam
2022-01-07 10:56:41 -05:00
parent f182eec611
commit 2e2e56661f

View File

@ -79,19 +79,19 @@ impl PoiseState {
let (charstate_parameters, impulse) = match self { let (charstate_parameters, impulse) = match self {
PoiseState::Normal => (None, None), PoiseState::Normal => (None, None),
PoiseState::Interrupted => ( PoiseState::Interrupted => (
Some((Duration::from_millis(125), Duration::from_millis(125), 0.80)), Some((Duration::from_millis(200), Duration::from_millis(200), 0.8)),
None, None,
), ),
PoiseState::Stunned => ( PoiseState::Stunned => (
Some((Duration::from_millis(300), Duration::from_millis(300), 0.65)), Some((Duration::from_millis(400), Duration::from_millis(400), 0.5)),
Some(5.0), None,
), ),
PoiseState::Dazed => ( PoiseState::Dazed => (
Some((Duration::from_millis(600), Duration::from_millis(250), 0.45)), Some((Duration::from_millis(750), Duration::from_millis(450), 0.2)),
Some(10.0), None,
), ),
PoiseState::KnockedDown => ( PoiseState::KnockedDown => (
Some((Duration::from_millis(750), Duration::from_millis(500), 0.4)), Some((Duration::from_millis(900), Duration::from_millis(700), 0.0)),
Some(10.0), Some(10.0),
), ),
}; };
@ -181,10 +181,10 @@ impl Poise {
/// Defines the poise states based on current poise value /// Defines the poise states based on current poise value
pub fn poise_state(&self) -> PoiseState { pub fn poise_state(&self) -> PoiseState {
match self.current() { match self.current() {
x if x > 70.0 => PoiseState::Normal, x if x > 50.0 => PoiseState::Normal,
x if x > 50.0 => PoiseState::Interrupted, x if x > 30.0 => PoiseState::Interrupted,
x if x > 40.0 => PoiseState::Stunned, x if x > 15.0 => PoiseState::Stunned,
x if x > 20.0 => PoiseState::Dazed, x if x > 5.0 => PoiseState::Dazed,
_ => PoiseState::KnockedDown, _ => PoiseState::KnockedDown,
} }
} }