Merge branch 'pacmanmati/veloren-pacmanmati/1224-consolidate-redundant-stage-sections' into 'master'

Consolidate redundant stage sections

See merge request veloren/veloren!2748
This commit is contained in:
Samuel Keiffer 2021-08-10 01:23:26 +00:00
commit d5feca45c5
77 changed files with 171 additions and 176 deletions

View File

@ -242,31 +242,31 @@
], ],
threshold: 0.5, threshold: 0.5,
), ),
Attack(ComboMelee(Swing, 1), Sword): ( Attack(ComboMelee(Action, 1), Sword): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing_sword", "voxygen.audio.sfx.abilities.swing_sword",
], ],
threshold: 0.7, threshold: 0.7,
), ),
Attack(ComboMelee(Swing, 2), Sword): ( Attack(ComboMelee(Action, 2), Sword): (
files: [ files: [
"voxygen.audio.sfx.abilities.separated_second_swing", "voxygen.audio.sfx.abilities.separated_second_swing",
], ],
threshold: 0.7, threshold: 0.7,
), ),
Attack(ComboMelee(Swing, 3), Sword): ( Attack(ComboMelee(Action, 3), Sword): (
files: [ files: [
"voxygen.audio.sfx.abilities.separated_third_swing", "voxygen.audio.sfx.abilities.separated_third_swing",
], ],
threshold: 0.7, threshold: 0.7,
), ),
Attack(DashMelee(Swing), Sword): ( Attack(DashMelee(Action), Sword): (
files: [ files: [
"voxygen.audio.sfx.abilities.sword_dash", "voxygen.audio.sfx.abilities.sword_dash",
], ],
threshold: 0.8, threshold: 0.8,
), ),
Attack(SpinMelee(Swing), Sword): ( Attack(SpinMelee(Action), Sword): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing_sword", "voxygen.audio.sfx.abilities.swing_sword",
], ],
@ -294,19 +294,19 @@
], ],
threshold: 0.5, threshold: 0.5,
), ),
Attack(ComboMelee(Swing, 1), Hammer): ( Attack(ComboMelee(Action, 1), Hammer): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",
], ],
threshold: 0.7, threshold: 0.7,
), ),
Attack(ChargedMelee(Swing), Hammer): ( Attack(ChargedMelee(Action), Hammer): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",
], ],
threshold: 0.7, threshold: 0.7,
), ),
Attack(LeapMelee(Swing), Hammer): ( Attack(LeapMelee(Action), Hammer): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",
], ],
@ -334,25 +334,25 @@
], ],
threshold: 0.5, threshold: 0.5,
), ),
Attack(ComboMelee(Swing, 1), Axe): ( Attack(ComboMelee(Action, 1), Axe): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",
], ],
threshold: 0.7, threshold: 0.7,
), ),
Attack(ComboMelee(Swing, 2), Axe): ( Attack(ComboMelee(Action, 2), Axe): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",
], ],
threshold: 0.7, threshold: 0.7,
), ),
Attack(SpinMelee(Swing), Axe): ( Attack(SpinMelee(Action), Axe): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",
], ],
threshold: 0.8, threshold: 0.8,
), ),
Attack(LeapMelee(Swing), Axe): ( Attack(LeapMelee(Action), Axe): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",
], ],
@ -470,7 +470,7 @@
], ],
threshold: 0.8, threshold: 0.8,
), ),
Attack(DashMelee(Swing), Dagger): ( Attack(DashMelee(Action), Dagger): (
files: [ files: [
"voxygen.audio.sfx.abilities.sword_dash", "voxygen.audio.sfx.abilities.sword_dash",
], ],

View File

@ -209,10 +209,10 @@ impl CharacterState {
pub fn is_forced_movement(&self) -> bool { pub fn is_forced_movement(&self) -> bool {
matches!(self, matches!(self,
CharacterState::ComboMelee(s) if s.stage_section == StageSection::Swing) CharacterState::ComboMelee(s) if s.stage_section == StageSection::Action)
|| matches!(self, CharacterState::DashMelee(s) if s.stage_section == StageSection::Charge) || matches!(self, CharacterState::DashMelee(s) if s.stage_section == StageSection::Charge)
|| matches!(self, CharacterState::LeapMelee(s) if s.stage_section == StageSection::Movement) || matches!(self, CharacterState::LeapMelee(s) if s.stage_section == StageSection::Movement)
|| matches!(self, CharacterState::SpinMelee(s) if s.stage_section == StageSection::Swing) || matches!(self, CharacterState::SpinMelee(s) if s.stage_section == StageSection::Action)
|| matches!(self, CharacterState::Roll(s) if s.stage_section == StageSection::Movement) || matches!(self, CharacterState::Roll(s) if s.stage_section == StageSection::Movement)
} }

View File

@ -101,12 +101,12 @@ impl CharacterBehavior for Data {
// Build up // Build up
update.character = CharacterState::BasicAura(Data { update.character = CharacterState::BasicAura(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Cast, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Cast => { StageSection::Action => {
if self.timer < self.static_data.cast_duration { if self.timer < self.static_data.cast_duration {
// Cast // Cast
update.character = CharacterState::BasicAura(Data { update.character = CharacterState::BasicAura(Data {

View File

@ -89,12 +89,12 @@ impl CharacterBehavior for Data {
// Build up // Build up
update.character = CharacterState::BasicBeam(Data { update.character = CharacterState::BasicBeam(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Cast, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Cast => { StageSection::Action => {
if input_is_pressed(data, self.static_data.ability_info.input) if input_is_pressed(data, self.static_data.ability_info.input)
&& (self.static_data.energy_drain <= f32::EPSILON && (self.static_data.energy_drain <= f32::EPSILON
|| update.energy.current() > 0) || update.energy.current() > 0)

View File

@ -51,12 +51,12 @@ impl CharacterBehavior for Data {
// Transitions to swing section of stage // Transitions to swing section of stage
update.character = CharacterState::BasicBlock(Data { update.character = CharacterState::BasicBlock(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Swing, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Swing => { StageSection::Action => {
if input_is_pressed(data, InputKind::Block) { if input_is_pressed(data, InputKind::Block) {
// Block // Block
update.character = CharacterState::BasicBlock(Data { update.character = CharacterState::BasicBlock(Data {

View File

@ -73,12 +73,12 @@ impl CharacterBehavior for Data {
// Transitions to swing section of stage // Transitions to swing section of stage
update.character = CharacterState::BasicMelee(Data { update.character = CharacterState::BasicMelee(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Swing, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Swing => { StageSection::Action => {
if !self.exhausted { if !self.exhausted {
update.character = CharacterState::BasicMelee(Data { update.character = CharacterState::BasicMelee(Data {
timer: Duration::default(), timer: Duration::default(),

View File

@ -69,12 +69,12 @@ impl CharacterBehavior for Data {
// Transitions to recover section of stage // Transitions to recover section of stage
update.character = CharacterState::BasicSummon(Data { update.character = CharacterState::BasicSummon(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Cast, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Cast => { StageSection::Action => {
if self.timer < self.static_data.cast_duration if self.timer < self.static_data.cast_duration
|| self.summon_count < self.static_data.summon_amount || self.summon_count < self.static_data.summon_amount
{ {

View File

@ -115,13 +115,13 @@ impl CharacterBehavior for Data {
} else { } else {
// Transitions to swing // Transitions to swing
update.character = CharacterState::ChargedMelee(Data { update.character = CharacterState::ChargedMelee(Data {
stage_section: StageSection::Swing, stage_section: StageSection::Action,
timer: Duration::default(), timer: Duration::default(),
..*self ..*self
}); });
} }
}, },
StageSection::Swing => { StageSection::Action => {
if self.timer.as_millis() as f32 if self.timer.as_millis() as f32
> self.static_data.hit_timing > self.static_data.hit_timing
* self.static_data.swing_duration.as_millis() as f32 * self.static_data.swing_duration.as_millis() as f32

View File

@ -188,12 +188,12 @@ impl CharacterBehavior for Data {
update.character = CharacterState::ComboMelee(Data { update.character = CharacterState::ComboMelee(Data {
static_data: self.static_data.clone(), static_data: self.static_data.clone(),
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Swing, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Swing => { StageSection::Action => {
if self.timer.as_secs_f32() if self.timer.as_secs_f32()
> self.static_data.stage_data[stage_index].hit_timing > self.static_data.stage_data[stage_index].hit_timing
* self.static_data.stage_data[stage_index] * self.static_data.stage_data[stage_index]

View File

@ -215,7 +215,7 @@ impl CharacterBehavior for Data {
// Stop charging now and go to swing stage section // Stop charging now and go to swing stage section
update.character = CharacterState::DashMelee(Data { update.character = CharacterState::DashMelee(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Swing, stage_section: StageSection::Action,
exhausted: false, exhausted: false,
..*self ..*self
}); });
@ -238,13 +238,13 @@ impl CharacterBehavior for Data {
// Transitions to swing section of stage // Transitions to swing section of stage
update.character = CharacterState::DashMelee(Data { update.character = CharacterState::DashMelee(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Swing, stage_section: StageSection::Action,
exhausted: false, exhausted: false,
..*self ..*self
}); });
} }
}, },
StageSection::Swing => { StageSection::Action => {
if self.static_data.charge_through && !self.exhausted { if self.static_data.charge_through && !self.exhausted {
// If can charge through and not exhausted, do one more melee attack // If can charge through and not exhausted, do one more melee attack

View File

@ -107,12 +107,12 @@ impl CharacterBehavior for Data {
// Transitions to swing portion of state upon hitting ground // Transitions to swing portion of state upon hitting ground
update.character = CharacterState::LeapMelee(Data { update.character = CharacterState::LeapMelee(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Swing, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Swing => { StageSection::Action => {
if self.timer < self.static_data.swing_duration { if self.timer < self.static_data.swing_duration {
// Swings weapons // Swings weapons
update.character = CharacterState::LeapMelee(Data { update.character = CharacterState::LeapMelee(Data {

View File

@ -69,12 +69,12 @@ impl CharacterBehavior for Data {
// Transition to shoot // Transition to shoot
update.character = CharacterState::RepeaterRanged(Data { update.character = CharacterState::RepeaterRanged(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Shoot, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Shoot => { StageSection::Action => {
if self.timer < self.static_data.shoot_duration { if self.timer < self.static_data.shoot_duration {
// Draw projectile // Draw projectile
update.character = CharacterState::RepeaterRanged(Data { update.character = CharacterState::RepeaterRanged(Data {

View File

@ -75,12 +75,12 @@ impl CharacterBehavior for Data {
// Build up // Build up
update.character = CharacterState::SelfBuff(Data { update.character = CharacterState::SelfBuff(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Cast, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Cast => { StageSection::Action => {
if self.timer < self.static_data.cast_duration { if self.timer < self.static_data.cast_duration {
// Cast // Cast
update.character = CharacterState::SelfBuff(Data { update.character = CharacterState::SelfBuff(Data {

View File

@ -126,12 +126,12 @@ impl CharacterBehavior for Data {
// Transitions to swing // Transitions to swing
update.character = CharacterState::Shockwave(Data { update.character = CharacterState::Shockwave(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Swing, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Swing => { StageSection::Action => {
if self.timer < self.static_data.swing_duration { if self.timer < self.static_data.swing_duration {
// Swings // Swings
update.character = CharacterState::Shockwave(Data { update.character = CharacterState::Shockwave(Data {

View File

@ -97,12 +97,12 @@ impl CharacterBehavior for Data {
// Transitions to swing section of stage // Transitions to swing section of stage
update.character = CharacterState::SpinMelee(Data { update.character = CharacterState::SpinMelee(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Swing, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Swing => { StageSection::Action => {
if !self.exhausted { if !self.exhausted {
update.character = CharacterState::SpinMelee(Data { update.character = CharacterState::SpinMelee(Data {
timer: Duration::default(), timer: Duration::default(),

View File

@ -62,12 +62,12 @@ impl CharacterBehavior for Data {
// Transitions to recover section of stage // Transitions to recover section of stage
update.character = CharacterState::SpriteSummon(Data { update.character = CharacterState::SpriteSummon(Data {
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Cast, stage_section: StageSection::Action,
..*self ..*self
}); });
} }
}, },
StageSection::Cast => { StageSection::Action => {
if self.timer < self.static_data.cast_duration { if self.timer < self.static_data.cast_duration {
let timer_frac = let timer_frac =
self.timer.as_secs_f32() / self.static_data.cast_duration.as_secs_f32(); self.timer.as_secs_f32() / self.static_data.cast_duration.as_secs_f32();

View File

@ -82,7 +82,7 @@ impl CharacterBehavior for Data {
update.character = CharacterState::UseItem(Data { update.character = CharacterState::UseItem(Data {
static_data: self.static_data.clone(), static_data: self.static_data.clone(),
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Use, stage_section: StageSection::Action,
}); });
if let UsePoint::BuildupUse = use_point { if let UsePoint::BuildupUse = use_point {
// Create inventory manipulation event // Create inventory manipulation event
@ -90,7 +90,7 @@ impl CharacterBehavior for Data {
} }
} }
}, },
StageSection::Use => { StageSection::Action => {
if self.timer < self.static_data.use_duration { if self.timer < self.static_data.use_duration {
// Item use // Item use
update.character = CharacterState::UseItem(Data { update.character = CharacterState::UseItem(Data {

View File

@ -920,12 +920,7 @@ pub enum StageSection {
Recover, Recover,
Charge, Charge,
Movement, Movement,
// TODO: Consolidate these to `Action` Action,
// Code reviewers: comment here to remind me to open beginner issue
Swing,
Shoot,
Cast,
Use,
} }
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]

View File

@ -57,7 +57,7 @@ impl Animation for AlphaAnimation {
* ((acc_vel * lab + PI * 0.4).sin()); * ((acc_vel * lab + PI * 0.4).sin());
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -75,7 +75,7 @@ impl Animation for BeamAnimation {
next.hand_r.orientation = Quaternion::rotation_x(0.0); next.hand_r.orientation = Quaternion::rotation_x(0.0);
let (move1base, move2shake, move2base, move3) = match stage_section { let (move1base, move2shake, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time.powf(0.25)).min(1.0), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => ((anim_time.powf(0.25)).min(1.0), 0.0, 0.0, 0.0),
Some(StageSection::Cast) => ( Some(StageSection::Action) => (
1.0, 1.0,
(anim_time * 15.0 + PI).sin(), (anim_time * 15.0 + PI).sin(),
(anim_time.powf(0.1)).min(1.0), (anim_time.powf(0.1)).min(1.0),

View File

@ -55,7 +55,7 @@ impl Animation for BetaAnimation {
* ((acc_vel * lab + PI * 0.4).sin()); * ((acc_vel * lab + PI * 0.4).sin());
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(6)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(6)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -60,7 +60,7 @@ impl Animation for ChargeMeleeAnimation {
0.0, 0.0,
(anim_time * 100.0).sin(), (anim_time * 100.0).sin(),
), ),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 0.0),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -73,7 +73,7 @@ impl Animation for DashAnimation {
0.0, 0.0,
0.0, 0.0,
), ),
Some(StageSection::Swing) => (1.0, 1.0, 1.0, anim_time.powf(4.0), 0.0), Some(StageSection::Action) => (1.0, 1.0, 1.0, anim_time.powf(4.0), 0.0),
Some(StageSection::Recover) => (1.1, 1.0, 1.0, 1.0, anim_time.powf(4.0)), Some(StageSection::Recover) => (1.1, 1.0, 1.0, 1.0, anim_time.powf(4.0)),
_ => (0.0, 0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -34,7 +34,7 @@ impl Animation for LeapAnimation {
let (movement1, movement2, movement3, movement4) = match stage_section { let (movement1, movement2, movement3, movement4) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0, 0.0),
Some(StageSection::Movement) => (1.0, anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Movement) => (1.0, anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -60,7 +60,7 @@ impl Animation for SelfBuffAnimation {
(anim_time * 10.0).sin(), (anim_time * 10.0).sin(),
0.0, 0.0,
), ),
Some(StageSection::Cast) => { Some(StageSection::Action) => {
(1.0, 0.0, (anim_time * 30.0).sin(), (anim_time * 12.0).sin()) (1.0, 0.0, (anim_time * 30.0).sin(), (anim_time * 12.0).sin())
}, },
Some(StageSection::Recover) => (1.0, anim_time.powi(4), 1.0, 1.0), Some(StageSection::Recover) => (1.0, anim_time.powi(4), 1.0, 1.0),

View File

@ -44,7 +44,7 @@ impl Animation for ShockwaveAnimation {
let (move1, move1pow, move2, move3) = match stage_section { let (move1, move1pow, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, anim_time.powf(0.25) as f32, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, anim_time.powf(0.25) as f32, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -94,7 +94,7 @@ impl Animation for ShootAnimation {
Some(StageSection::Buildup) => { Some(StageSection::Buildup) => {
(anim_time, (anim_time * 10.0 + PI).sin(), 0.0, 0.0) (anim_time, (anim_time * 10.0 + PI).sin(), 0.0, 0.0)
}, },
Some(StageSection::Swing) => (1.0, 1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };
@ -143,7 +143,7 @@ impl Animation for ShootAnimation {
Some(ToolKind::Bow) => { Some(ToolKind::Bow) => {
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -193,7 +193,7 @@ impl Animation for ShootAnimation {
"Wendigo Magic" => { "Wendigo Magic" => {
let (move1base, _move2base, move3) = match stage_section { let (move1base, _move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -223,7 +223,7 @@ impl Animation for ShootAnimation {
"Yeti" => { "Yeti" => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -266,7 +266,7 @@ impl Animation for ShootAnimation {
"Harvester" => { "Harvester" => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -34,7 +34,7 @@ impl Animation for SpinAnimation {
let (movement1, movement2, movement3) = match stage_section { let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powf(1.8), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(1.8), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -46,7 +46,7 @@ impl Animation for SpinMeleeAnimation {
let (move1base, move2, move3) = match stage_section { let (move1base, move2, move3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time.powf(0.25)), 0.0, 0.0), Some(StageSection::Buildup) => ((anim_time.powf(0.25)), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, (anim_time * 0.05).sin() - 0.05, 0.0), Some(StageSection::Action) => (1.0, (anim_time * 0.05).sin() - 0.05, 0.0),
Some(StageSection::Recover) => (1.0, 0.0, anim_time), Some(StageSection::Recover) => (1.0, 0.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -60,7 +60,7 @@ impl Animation for SpriteSummonAnimation {
Some(StageSection::Buildup) => { Some(StageSection::Buildup) => {
(anim_time, anim_time.powf(0.1), 0.0, 0.0) (anim_time, anim_time.powf(0.1), 0.0, 0.0)
}, },
Some(StageSection::Cast) => { Some(StageSection::Action) => {
(1.0, 1.0, (anim_time.powf(4.0) * 80.0).min(1.0), 0.0) (1.0, 1.0, (anim_time.powf(4.0) * 80.0).min(1.0), 0.0)
}, },
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),

View File

@ -57,7 +57,7 @@ impl Animation for SummonAnimation {
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time.powf(0.5)), 0.0, 0.0), Some(StageSection::Buildup) => ((anim_time.powf(0.5)), 0.0, 0.0),
Some(StageSection::Cast) => (1.0, (anim_time.powi(2)), 0.0), Some(StageSection::Action) => (1.0, (anim_time.powi(2)), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -126,7 +126,7 @@ impl Animation for SummonAnimation {
"Tidal Warrior" => { "Tidal Warrior" => {
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time.powi(2)), 0.0, 0.0), Some(StageSection::Buildup) => ((anim_time.powi(2)), 0.0, 0.0),
Some(StageSection::Cast) => (1.0, (anim_time * 30.0).sin(), 0.0), Some(StageSection::Action) => (1.0, (anim_time * 30.0).sin(), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -56,7 +56,7 @@ impl Animation for AlphaAnimation {
let anim_time = anim_time.min(1.0); let anim_time = anim_time.min(1.0);
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powi(4), 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -55,7 +55,7 @@ impl Animation for DashAnimation {
let (move1base, move2base, move3, move4) = match stage_section { let (move1base, move2base, move3, move4) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0),
Some(StageSection::Charge) => (1.0, anim_time.powi(4), 0.0, 0.0), Some(StageSection::Charge) => (1.0, anim_time.powi(4), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time.powi(4), 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -82,7 +82,7 @@ impl Animation for ShootAnimation {
Some(ToolKind::Bow) => { Some(ToolKind::Bow) => {
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -113,7 +113,7 @@ impl Animation for ShootAnimation {
Some(ToolKind::Staff) => { Some(ToolKind::Staff) => {
let (move1base, _move2base, move3) = match stage_section { let (move1base, _move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -25,7 +25,7 @@ impl Animation for AlphaAnimation {
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -35,7 +35,7 @@ impl Animation for BreatheAnimation {
let (movement1base, movement2base, movement3, twitch) = match stage_section { let (movement1base, movement2base, movement3, twitch) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Cast) => (1.0, anim_time.min(1.0).powf(0.1), 0.0, anim_time), Some(StageSection::Action) => (1.0, anim_time.min(1.0).powf(0.1), 0.0, anim_time),
Some(StageSection::Recover) => (1.0, 1.0, anim_time, 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time, 1.0),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -39,7 +39,7 @@ impl Animation for DashAnimation {
match stage_section { match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0, anim_time), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0, anim_time),
Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0, 0.0), Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 0.0, anim_time.powi(4), 0.0, 1.0), Some(StageSection::Action) => (1.0, 0.0, anim_time.powi(4), 0.0, 1.0),
Some(StageSection::Recover) => (1.0, 0.0, 1.0, anim_time, 1.0), Some(StageSection::Recover) => (1.0, 0.0, 1.0, anim_time, 1.0),
_ => (0.0, 0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -26,7 +26,7 @@ impl Animation for ShockwaveAnimation {
let (movement1base, movement2base, movement3, _twitch) = match stage_section { let (movement1base, movement2base, movement3, _twitch) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.5), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.5), 0.0, 0.0, 0.0),
Some(StageSection::Cast) => (1.0, anim_time.min(1.0).powf(0.1), 0.0, anim_time), Some(StageSection::Action) => (1.0, anim_time.min(1.0).powf(0.1), 0.0, anim_time),
Some(StageSection::Recover) => (1.0, 1.0, anim_time, 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time, 1.0),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -27,7 +27,7 @@ impl Animation for ShootAnimation {
let (movement1base, movement2base, movement3, twitch) = match stage_section { let (movement1base, movement2base, movement3, twitch) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Cast) => (1.0, anim_time.min(1.0).powf(0.1), 0.0, anim_time), Some(StageSection::Action) => (1.0, anim_time.min(1.0).powf(0.1), 0.0, anim_time),
Some(StageSection::Recover) => (1.0, 1.0, anim_time, 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time, 1.0),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -28,7 +28,7 @@ impl Animation for SummonAnimation {
let (movement1base, movement2base, movement3, twitch) = match stage_section { let (movement1base, movement2base, movement3, twitch) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Cast) => (1.0, anim_time.min(1.0).powf(0.1), 0.0, anim_time), Some(StageSection::Action) => (1.0, anim_time.min(1.0).powf(0.1), 0.0, anim_time),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.min(1.0).powi(2), 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.min(1.0).powi(2), 1.0),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -35,7 +35,7 @@ impl Animation for AlphaAnimation {
let (move1, move2, move3, move2h) = match stage_section { let (move1, move2, move3, move2h) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powi(2), 0.0, anim_time.powf(0.25)), Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0, anim_time.powf(0.25)),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };
@ -63,7 +63,7 @@ impl Animation for AlphaAnimation {
Some(ToolKind::Axe) => { Some(ToolKind::Axe) => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -79,7 +79,7 @@ impl Animation for AlphaAnimation {
Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { Some(ToolKind::Hammer) | Some(ToolKind::Pick) => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -135,7 +135,7 @@ impl Animation for AlphaAnimation {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -156,7 +156,7 @@ impl Animation for AlphaAnimation {
Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { Some(ToolKind::Hammer) | Some(ToolKind::Pick) => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -38,7 +38,7 @@ impl Animation for BeamAnimation {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Cast) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -37,7 +37,7 @@ impl Animation for BetaAnimation {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -45,7 +45,7 @@ impl Animation for BlockAnimation {
let (movement1base, move2, movement3) = match stage_section { let (movement1base, move2, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, (anim_time * 10.0).sin(), 0.0), Some(StageSection::Action) => (1.0, (anim_time * 10.0).sin(), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),

View File

@ -50,7 +50,7 @@ impl Animation for ChargeswingAnimation {
(anim_time * 18.0 * lab).sin(), (anim_time * 18.0 * lab).sin(),
0.0, 0.0,
), ),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0, 0.0, anim_time.powi(4)), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0, 0.0, anim_time.powi(4)),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 0.0, 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 0.0, 1.0),
_ => (0.0, 0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -30,7 +30,7 @@ impl Animation for ConsumeAnimation {
Some(ItemUseKind::Consumable(ConsumableKind::Drink)) => { Some(ItemUseKind::Consumable(ConsumableKind::Drink)) => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Use) => (1.0, (anim_time * 8.0).sin(), 0.0), Some(StageSection::Action) => (1.0, (anim_time * 8.0).sin(), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(0.25)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(0.25)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -59,7 +59,7 @@ impl Animation for ConsumeAnimation {
Some(ItemUseKind::Consumable(ConsumableKind::Food | ConsumableKind::ComplexFood)) => { Some(ItemUseKind::Consumable(ConsumableKind::Food | ConsumableKind::ComplexFood)) => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Use) => (1.0, (anim_time * 12.0).sin(), 0.0), Some(StageSection::Action) => (1.0, (anim_time * 12.0).sin(), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(0.25)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(0.25)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -38,7 +38,7 @@ impl Animation for DashAnimation {
let (movement1, movement2, movement3, move4) = match stage_section { let (movement1, movement2, movement3, move4) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Charge) => (1.0, anim_time, 0.0, 0.0), Some(StageSection::Charge) => (1.0, anim_time, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time.powf(0.01), 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time.powf(0.01), 0.0),
Some(StageSection::Recover) => (1.1, 1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.1, 1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -38,7 +38,7 @@ impl Animation for LeapAnimation {
let (movement1, movement2, movement3, move4) = match stage_section { let (movement1, movement2, movement3, move4) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0, 0.0),
Some(StageSection::Movement) => (1.0, anim_time.powi(2), 0.0, 0.0), Some(StageSection::Movement) => (1.0, anim_time.powi(2), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time.powf(0.75), 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time.powf(0.75), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time.powf(0.75)), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time.powf(0.75)),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -39,7 +39,7 @@ impl Animation for RepeaterAnimation {
let (move1base, move2base, move3base, move4) = match stage_section { let (move1base, move2base, move3base, move4) = match stage_section {
Some(StageSection::Movement) => (anim_time, 0.0, 0.0, 0.0), Some(StageSection::Movement) => (anim_time, 0.0, 0.0, 0.0),
Some(StageSection::Buildup) => (1.0, anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (1.0, anim_time, 0.0, 0.0),
Some(StageSection::Shoot) => (1.0, 1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.1, 1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.1, 1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -40,7 +40,7 @@ impl Animation for ShockwaveAnimation {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Swing) | Some(StageSection::Cast) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -69,7 +69,7 @@ impl Animation for ShootAnimation {
Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Shoot) => (1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -123,7 +123,7 @@ impl Animation for ShootAnimation {
Some(ToolKind::Bow) => { Some(ToolKind::Bow) => {
let (_move1, move2, _move3) = match stage_section { let (_move1, move2, _move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Shoot) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -37,7 +37,7 @@ impl Animation for SpinAnimation {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -75,7 +75,7 @@ impl Animation for SpinAnimation {
Some(ToolKind::Axe) => { Some(ToolKind::Axe) => {
let (movement1, movement2, movement3) = match stage_section { let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
@ -156,7 +156,7 @@ impl Animation for SpinAnimation {
Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5); Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5);
let (move1, move2, _move3) = match stage_section { let (move1, move2, _move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -35,7 +35,7 @@ impl Animation for SpinMeleeAnimation {
*rate = 1.0; *rate = 1.0;
let (movement1, movement2, movement3) = match stage_section { let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(2.0)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(2.0)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -26,7 +26,7 @@ impl Animation for AlphaAnimation {
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -25,7 +25,7 @@ impl Animation for BeamAnimation {
let (move1base, move1iso, move2base, move3) = match stage_section { let (move1base, move1iso, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Cast) => (1.0, 0.0, 1.0, 0.0), Some(StageSection::Action) => (1.0, 0.0, 1.0, 0.0),
Some(StageSection::Recover) => (1.0, 0.0, 1.0, anim_time.powf(4.0)), Some(StageSection::Recover) => (1.0, 0.0, 1.0, anim_time.powf(4.0)),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -27,7 +27,7 @@ impl Animation for ShockwaveAnimation {
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(2.0)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(2.0)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -27,7 +27,7 @@ impl Animation for ShootAnimation {
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.4), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.4), 0.0, 0.0),
Some(StageSection::Shoot) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -26,7 +26,7 @@ impl Animation for SpinMeleeAnimation {
let (movement1, movement2, movement3) = match stage_section { let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(4.0)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -35,7 +35,7 @@ impl Animation for ShootAnimation {
let (movement1, movement2, movement3) = match stage_section { let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -26,7 +26,7 @@ impl Animation for AlphaAnimation {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powi(4), 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -26,7 +26,7 @@ impl Animation for BetaAnimation {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powi(4), 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -28,7 +28,7 @@ impl Animation for BreatheAnimation {
let (movement1base, _movement2base, movement3, twitch) = match stage_section { let (movement1base, _movement2base, movement3, twitch) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0),
Some(StageSection::Cast) => (1.0, anim_time.min(1.0), 0.0, anim_time), Some(StageSection::Action) => (1.0, anim_time.min(1.0), 0.0, anim_time),
Some(StageSection::Recover) => (1.0, 1.0, anim_time, 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time, 1.0),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -28,7 +28,7 @@ impl Animation for DashAnimation {
let (movement1base, chargemovementbase, movement2base, movement3) = match stage_section { let (movement1base, chargemovementbase, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0),
Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0), Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time.powi(4), 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -25,7 +25,7 @@ impl Animation for ShootAnimation {
let (movement1, movement2, movement3) = match stage_section { let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -27,7 +27,7 @@ impl Animation for TailwhipAnimation {
Some(StageSection::Charge) => { Some(StageSection::Charge) => {
(anim_time.min(1.2), 0.0, 0.0, (anim_time * 15.0).sin(), 0.0) (anim_time.min(1.2), 0.0, 0.0, (anim_time * 15.0).sin(), 0.0)
}, },
Some(StageSection::Swing) => (1.0, anim_time.powi(4), 0.0, 1.0, 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0, 1.0, 0.0),
Some(StageSection::Recover) => { Some(StageSection::Recover) => {
(1.0, 1.0, anim_time.powi(6), 1.0, (anim_time * 7.0).sin()) (1.0, 1.0, anim_time.powi(6), 1.0, (anim_time * 7.0).sin())
}, },

View File

@ -26,7 +26,7 @@ impl Animation for AlphaAnimation {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -26,7 +26,7 @@ impl Animation for BetaAnimation {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.sqrt(), 0.0), Some(StageSection::Action) => (1.0, anim_time.sqrt(), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -29,7 +29,7 @@ impl Animation for DashAnimation {
match stage_section { match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0, anim_time), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0, anim_time),
Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0, 0.0), Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time.powi(4), 0.0, 1.0), Some(StageSection::Action) => (1.0, 1.0, anim_time.powi(4), 0.0, 1.0),
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time, 1.0), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time, 1.0),
_ => (0.0, 0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -27,7 +27,7 @@ impl Animation for HoofAnimation {
let (movement1base, movement2base, movement3, twitch) = match stage_section { let (movement1base, movement2base, movement3, twitch) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0, anim_time), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0, anim_time),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -27,7 +27,7 @@ impl Animation for LeapMeleeAnimation {
let (movement1base, movement2base, movement3base, movement4) = match stage_section { let (movement1base, movement2base, movement3base, movement4) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Movement) => (1.0, anim_time, 0.0, 0.0), Some(StageSection::Movement) => (1.0, anim_time, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, 1.0, anim_time, 0.0),
Some(StageSection::Recover) => (0.0, 1.0, 1.0, anim_time.powi(4)), Some(StageSection::Recover) => (0.0, 1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -26,7 +26,7 @@ impl Animation for AlphaAnimation {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powi(4), 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -25,7 +25,7 @@ impl Animation for AlphaAnimation {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powi(2), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powi(2), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powi(4), 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -26,7 +26,7 @@ impl Animation for BetaAnimation {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powi(2), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powi(2), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time.powi(4), 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };

View File

@ -27,7 +27,7 @@ impl Animation for DashAnimation {
match stage_section { match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0, anim_time), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0, anim_time),
Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0, 0.0), Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time.powi(4), 0.0, 1.0), Some(StageSection::Action) => (1.0, 1.0, anim_time.powi(4), 0.0, 1.0),
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time, 1.0), Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time, 1.0),
_ => (0.0, 0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0, 0.0, 0.0),
}; };

View File

@ -147,7 +147,7 @@ fn matches_ability_stage() {
exhausted: false, exhausted: false,
stage: 1, stage: 1,
timer: Duration::default(), timer: Duration::default(),
stage_section: states::utils::StageSection::Swing, stage_section: states::utils::StageSection::Action,
}), }),
&PreviousEntityState { &PreviousEntityState {
event: SfxEvent::Idle, event: SfxEvent::Idle,
@ -160,7 +160,7 @@ fn matches_ability_stage() {
assert_eq!( assert_eq!(
result, result,
SfxEvent::Attack( SfxEvent::Attack(
CharacterAbilityType::ComboMelee(states::utils::StageSection::Swing, 1), CharacterAbilityType::ComboMelee(states::utils::StageSection::Action, 1),
ToolKind::Sword ToolKind::Sword
) )
); );
@ -209,7 +209,7 @@ fn ignores_different_ability_stage() {
exhausted: false, exhausted: false,
stage: 1, stage: 1,
timer: Duration::default(), timer: Duration::default(),
stage_section: states::utils::StageSection::Swing, stage_section: states::utils::StageSection::Action,
}), }),
&PreviousEntityState { &PreviousEntityState {
event: SfxEvent::Idle, event: SfxEvent::Idle,
@ -222,7 +222,7 @@ fn ignores_different_ability_stage() {
assert_ne!( assert_ne!(
result, result,
SfxEvent::Attack( SfxEvent::Attack(
CharacterAbilityType::ComboMelee(states::utils::StageSection::Swing, 2), CharacterAbilityType::ComboMelee(states::utils::StageSection::Action, 2),
ToolKind::Sword ToolKind::Sword
) )
); );

View File

@ -973,7 +973,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1064,7 +1064,7 @@ impl FigureMgr {
StageSection::Charge => { StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32() stage_time / s.static_data.charge_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1094,7 +1094,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Shoot => { StageSection::Action => {
stage_time / s.static_data.shoot_duration.as_secs_f32() stage_time / s.static_data.shoot_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1151,7 +1151,7 @@ impl FigureMgr {
StageSection::Charge => { StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32() stage_time / s.static_data.charge_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1178,7 +1178,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1206,7 +1206,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => { StageSection::Action => {
stage_time / s.static_data.cast_duration.as_secs_f32() stage_time / s.static_data.cast_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1237,7 +1237,7 @@ impl FigureMgr {
StageSection::Movement => { StageSection::Movement => {
stage_time / s.static_data.movement_duration.as_secs_f32() stage_time / s.static_data.movement_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1266,7 +1266,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1348,7 +1348,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => s.timer.as_secs_f32(), StageSection::Action => s.timer.as_secs_f32(),
StageSection::Recover => { StageSection::Recover => {
stage_time / s.static_data.recover_duration.as_secs_f32() stage_time / s.static_data.recover_duration.as_secs_f32()
}, },
@ -1377,7 +1377,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1434,7 +1434,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => stage_time, StageSection::Action => stage_time,
StageSection::Recover => { StageSection::Recover => {
stage_time / s.static_data.recover_duration.as_secs_f32() stage_time / s.static_data.recover_duration.as_secs_f32()
}, },
@ -1462,7 +1462,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Use => stage_time, StageSection::Action => stage_time,
StageSection::Recover => { StageSection::Recover => {
stage_time / s.static_data.recover_duration.as_secs_f32() stage_time / s.static_data.recover_duration.as_secs_f32()
}, },
@ -1711,7 +1711,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1900,7 +1900,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1929,7 +1929,7 @@ impl FigureMgr {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Charge => stage_time, StageSection::Charge => stage_time,
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1959,7 +1959,7 @@ impl FigureMgr {
StageSection::Movement => { StageSection::Movement => {
stage_time / s.static_data.movement_duration.as_secs_f32() stage_time / s.static_data.movement_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -1989,7 +1989,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -2231,7 +2231,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -2261,7 +2261,7 @@ impl FigureMgr {
StageSection::Charge => { StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32() stage_time / s.static_data.charge_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -2336,7 +2336,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -2392,7 +2392,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => s.timer.as_secs_f32(), StageSection::Action => s.timer.as_secs_f32(),
StageSection::Recover => { StageSection::Recover => {
stage_time / s.static_data.recover_duration.as_secs_f32() stage_time / s.static_data.recover_duration.as_secs_f32()
}, },
@ -2418,7 +2418,7 @@ impl FigureMgr {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Charge => stage_time, StageSection::Charge => stage_time,
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -2772,7 +2772,7 @@ impl FigureMgr {
StageSection::Charge => { StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32() stage_time / s.static_data.charge_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -2907,7 +2907,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3147,7 +3147,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3194,7 +3194,7 @@ impl FigureMgr {
StageSection::Charge => { StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32() stage_time / s.static_data.charge_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3331,7 +3331,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => s.timer.as_secs_f32(), StageSection::Action => s.timer.as_secs_f32(),
StageSection::Recover => { StageSection::Recover => {
stage_time / s.static_data.recover_duration.as_secs_f32() stage_time / s.static_data.recover_duration.as_secs_f32()
}, },
@ -3362,7 +3362,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3420,7 +3420,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3443,7 +3443,7 @@ impl FigureMgr {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => { StageSection::Action => {
stage_time / s.static_data.cast_duration.as_secs_f32() stage_time / s.static_data.cast_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3475,7 +3475,7 @@ impl FigureMgr {
StageSection::Charge => { StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32() stage_time / s.static_data.charge_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3729,7 +3729,7 @@ impl FigureMgr {
StageSection::Charge => { StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32() stage_time / s.static_data.charge_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3760,7 +3760,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => { StageSection::Action => {
stage_time / s.static_data.cast_duration.as_secs_f32() stage_time / s.static_data.cast_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3791,7 +3791,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3951,7 +3951,7 @@ impl FigureMgr {
StageSection::Charge => { StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32() stage_time / s.static_data.charge_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -3983,7 +3983,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4047,7 +4047,7 @@ impl FigureMgr {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4078,7 +4078,7 @@ impl FigureMgr {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => { StageSection::Action => {
stage_time / s.static_data.cast_duration.as_secs_f32() stage_time / s.static_data.cast_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4115,7 +4115,7 @@ impl FigureMgr {
stage_time stage_time
/ s.static_data.movement_duration.as_secs_f32() / s.static_data.movement_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4148,7 +4148,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4176,7 +4176,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => s.timer.as_secs_f32(), StageSection::Action => s.timer.as_secs_f32(),
StageSection::Recover => { StageSection::Recover => {
stage_time / s.static_data.recover_duration.as_secs_f32() stage_time / s.static_data.recover_duration.as_secs_f32()
}, },
@ -4204,7 +4204,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => { StageSection::Action => {
stage_time / s.static_data.cast_duration.as_secs_f32() stage_time / s.static_data.cast_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4329,7 +4329,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32() stage_time / stage.base_buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32() stage_time / stage.base_swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4378,7 +4378,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => s.timer.as_secs_f32(), StageSection::Action => s.timer.as_secs_f32(),
StageSection::Recover => { StageSection::Recover => {
stage_time / s.static_data.recover_duration.as_secs_f32() stage_time / s.static_data.recover_duration.as_secs_f32()
}, },
@ -4400,7 +4400,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4423,7 +4423,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4446,7 +4446,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Swing => { StageSection::Action => {
stage_time / s.static_data.swing_duration.as_secs_f32() stage_time / s.static_data.swing_duration.as_secs_f32()
}, },
StageSection::Recover => { StageSection::Recover => {
@ -4563,7 +4563,7 @@ impl FigureMgr {
StageSection::Buildup => { StageSection::Buildup => {
stage_time / s.static_data.buildup_duration.as_secs_f32() stage_time / s.static_data.buildup_duration.as_secs_f32()
}, },
StageSection::Cast => s.timer.as_secs_f32(), StageSection::Action => s.timer.as_secs_f32(),
StageSection::Recover => { StageSection::Recover => {
stage_time / s.static_data.recover_duration.as_secs_f32() stage_time / s.static_data.recover_duration.as_secs_f32()
}, },

View File

@ -602,7 +602,7 @@ impl ParticleMgr {
if let Some(specifier) = spin.static_data.specifier { if let Some(specifier) = spin.static_data.specifier {
match specifier { match specifier {
states::spin_melee::FrontendSpecifier::CultistVortex => { states::spin_melee::FrontendSpecifier::CultistVortex => {
if matches!(spin.stage_section, StageSection::Swing) { if matches!(spin.stage_section, StageSection::Action) {
let range = spin.static_data.range; let range = spin.static_data.range;
// Particles for vortex // Particles for vortex
let heartbeats = let heartbeats =
@ -711,7 +711,7 @@ impl ParticleMgr {
CharacterState::SelfBuff(c) => { CharacterState::SelfBuff(c) => {
use buff::BuffKind; use buff::BuffKind;
if let BuffKind::Frenzied = c.static_data.buff_kind { if let BuffKind::Frenzied = c.static_data.buff_kind {
if matches!(c.stage_section, StageSection::Cast) { if matches!(c.stage_section, StageSection::Action) {
self.particles.resize_with( self.particles.resize_with(
self.particles.len() self.particles.len()
+ usize::from( + usize::from(