From 0e771c90822ebf46ab7b39ecb01a76f301ee0623 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 16 May 2023 21:30:21 -0400 Subject: [PATCH] Execute --- assets/common/abilities/axe/execute.ron | 35 ++++++++----------- voxygen/anim/src/character/finishermelee.rs | 38 +++++++++++++++++++++ voxygen/anim/src/character/selfbuff.rs | 14 ++++---- 3 files changed, 60 insertions(+), 27 deletions(-) diff --git a/assets/common/abilities/axe/execute.ron b/assets/common/abilities/axe/execute.ron index b4732b4a2f..de19c7f486 100644 --- a/assets/common/abilities/axe/execute.ron +++ b/assets/common/abilities/axe/execute.ron @@ -1,22 +1,17 @@ -ComboMelee2( - strikes: [ - ( - melee_constructor: ( - kind: Slash( - damage: 4, - poise: 5, - knockback: 0, - energy_regen: 5, - ), - range: 3.0, - angle: 45.0, - ), - buildup_duration: 0.15, - swing_duration: 0.05, - hit_timing: 0.5, - recover_duration: 0.1, - ori_modifier: 0.6, +FinisherMelee( + energy_cost: 0, + buildup_duration: 0.6, + swing_duration: 0.2, + recover_duration: 0.4, + melee_constructor: ( + kind: Slash( + damage: 60, + poise: 100, + knockback: 0, + energy_regen: 0, ), - ], - energy_cost_per_strike: 0, + range: 3.0, + angle: 15.0, + ), + minimum_combo: 30, ) \ No newline at end of file diff --git a/voxygen/anim/src/character/finishermelee.rs b/voxygen/anim/src/character/finishermelee.rs index dae95d55f2..4b41b529e7 100644 --- a/voxygen/anim/src/character/finishermelee.rs +++ b/voxygen/anim/src/character/finishermelee.rs @@ -138,6 +138,44 @@ impl Animation for FinisherMeleeAnimation { next.control.orientation.rotate_x(move2 * 0.5); next.control.position += Vec3::new(move2 * 7.0, 0.0, move2 * 6.0); }, + Some("common.abilities.axe.execute") => { + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + + next.hand_l.position = Vec3::new(s_a.ahl.0, s_a.ahl.1, s_a.ahl.2); + next.hand_l.orientation = + Quaternion::rotation_x(s_a.ahl.3) * Quaternion::rotation_y(s_a.ahl.4); + next.hand_r.position = Vec3::new(s_a.ahr.0, s_a.ahr.1, s_a.ahr.2); + next.hand_r.orientation = + Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5); + + next.control.position = Vec3::new(s_a.ac.0, s_a.ac.1, s_a.ac.2); + next.control.orientation = Quaternion::rotation_x(s_a.ac.3) + * Quaternion::rotation_y(s_a.ac.4) + * Quaternion::rotation_z(s_a.ac.5); + + next.control.orientation.rotate_x(move1 * 0.9); + next.chest.orientation.rotate_z(move1 * 1.2); + next.head.orientation.rotate_z(move1 * -0.5); + next.belt.orientation.rotate_z(move1 * -0.3); + next.shorts.orientation.rotate_z(move1 * -0.7); + next.control.position += Vec3::new(move1 * 4.0, move1 * -12.0, move1 * 11.0); + + next.chest.orientation.rotate_z(move2 * -2.0); + next.head.orientation.rotate_z(move2 * 0.9); + next.belt.orientation.rotate_z(move2 * 0.4); + next.shorts.orientation.rotate_z(move2 * 1.1); + next.control.orientation.rotate_x(move2 * -5.0); + next.control.position += Vec3::new(move2 * -3.0, move2 * 12.0, move2 * -17.0); + next.control.orientation.rotate_z(move2 * 0.7); + }, _ => {}, } diff --git a/voxygen/anim/src/character/selfbuff.rs b/voxygen/anim/src/character/selfbuff.rs index 2a9500a9d3..03515cf0ba 100644 --- a/voxygen/anim/src/character/selfbuff.rs +++ b/voxygen/anim/src/character/selfbuff.rs @@ -31,7 +31,7 @@ impl Animation for SelfBuffAnimation { match ability_id { Some("common.abilities.sword.heavy_fortitude") => { let (move1, move2, move3) = match stage_section { - Some(StageSection::Movement) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), _ => (0.0, 0.0, 0.0), @@ -65,7 +65,7 @@ impl Animation for SelfBuffAnimation { }, Some("common.abilities.sword.defensive_stalwart_sword") => { let (move1, move2, move3) = match stage_section { - Some(StageSection::Movement) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), _ => (0.0, 0.0, 0.0), @@ -103,7 +103,7 @@ impl Animation for SelfBuffAnimation { }, Some("common.abilities.sword.agile_dancing_edge") => { let (move1, move2, move3) = match stage_section { - Some(StageSection::Movement) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), _ => (0.0, 0.0, 0.0), @@ -132,7 +132,7 @@ impl Animation for SelfBuffAnimation { }, Some("common.abilities.sword.cleaving_blade_fever") => { let (move1, move2, move3) = match stage_section { - Some(StageSection::Movement) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), _ => (0.0, 0.0, 0.0), @@ -166,7 +166,7 @@ impl Animation for SelfBuffAnimation { }, Some("common.abilities.axe.berserk") => { let (move1, move2, move3) = match stage_section { - Some(StageSection::Movement) => (anim_time, 0.0, 0.0), + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time), _ => (0.0, 0.0, 0.0), @@ -196,7 +196,7 @@ impl Animation for SelfBuffAnimation { }, Some("common.abilities.axe.savage_sense") => { let (move1, move2, move3) = match stage_section { - Some(StageSection::Movement) => (anim_time, 0.0, 0.0), + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time), _ => (0.0, 0.0, 0.0), @@ -229,7 +229,7 @@ impl Animation for SelfBuffAnimation { }, Some("common.abilities.axe.adrenaline_rush") => { let (move1, move2, move3) = match stage_section { - Some(StageSection::Movement) => (anim_time, 0.0, 0.0), + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time), _ => (0.0, 0.0, 0.0),