Offensive advance animation

This commit is contained in:
Sam 2022-08-09 20:17:02 -04:00
parent 1e959706a5
commit 894710d8c6
4 changed files with 55 additions and 4 deletions

View File

@ -16,8 +16,8 @@ ComboMelee2(
hit_timing: 0.6,
recover_duration: 0.4,
movement: (
buildup: Some(Forward(2.5)),
swing: Some(Forward(1.0)),
buildup: Some(Forward(1.0)),
swing: Some(Forward(3.0)),
recover: None,
),
ori_modifier: 0.6,

View File

@ -49,6 +49,11 @@ ComboMelee2(
swing_duration: 0.3,
hit_timing: 0.5,
recover_duration: 0.1,
movement: (
buildup: None,
swing: Some(Forward(0.5)),
recover: None,
),
ori_modifier: 0.6,
),
],

View File

@ -1,5 +1,5 @@
FinisherMelee(
energy_cost: 40,
energy_cost: /*40*/0,
buildup_duration: 0.4,
swing_duration: 0.1,
recover_duration: 0.4,
@ -23,7 +23,7 @@ FinisherMelee(
target: Attack,
kind: Linear,
)),
minimum_combo: 10,
minimum_combo: /*10*/0,
meta: (
kind: Some(Sword(Offensive)),
),

View File

@ -205,6 +205,52 @@ impl Animation for ComboAnimation {
_ => {},
}
},
Some("common.abilities.sword.offensive_advance") => {
let (move1, move2, move3, move2alt) = if strike == current_strike {
match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
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),
_ => (0.0, 0.0, 0.0, 0.0),
}
} else {
(1.0, 1.0, 0.0, 1.0)
};
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
next.hand_l.orientation =
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
next.hand_r.position =
Vec3::new(-s_a.sc.0 + 6.0 + move1 * -12.0, -4.0 + move1 * 3.0, -2.0);
next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1 * 0.5);
next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control.orientation = Quaternion::rotation_x(s_a.sc.3)
* Quaternion::rotation_z(move2.signum() * -PI / 2.0);
next.control.orientation.rotate_x(move1 * 1.6 + move2 * 0.5);
next.chest.orientation = Quaternion::rotation_z(move1 * 1.0);
next.head.orientation = Quaternion::rotation_z(move1 * -0.7);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.2);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.5);
next.control.position += Vec3::new(0.0, 0.0, move1 * 5.0);
next.chest.orientation.rotate_z(move2 * -1.9);
next.head.orientation.rotate_z(move2 * 1.4);
next.belt.orientation.rotate_z(move2 * 0.6);
next.shorts.orientation.rotate_z(move2 * 1.2);
next.control.orientation.rotate_z(move2 * -3.5);
next.control.position += Vec3::new(move2 * 9.0, move2 * 4.0, 0.0);
next.chest.orientation.rotate_z(move3 * 0.7);
next.head.orientation.rotate_z(move3 * -0.4);
next.belt.orientation.rotate_z(move3 * -0.2);
next.shorts.orientation.rotate_z(move3 * -0.5);
next.control.orientation.rotate_z(move3 * 0.4);
next.control.orientation.rotate_x(move3 * 1.4);
next.control.position += Vec3::new(move3 * -9.0, 0.0, 0.0);
},
_ => {},
}
}