From 42e804578ea10fe2358030703763be3efc5b9196 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 20 May 2023 15:30:47 -0400 Subject: [PATCH] Riptide --- .../common/abilities/ability_set_manifest.ron | 8 +++- assets/common/abilities/axe/lacerate.ron | 2 +- assets/common/abilities/axe/riptide.ron | 42 ++++++++++--------- voxygen/anim/src/character/finishermelee.rs | 40 +++++++++++++++++- 4 files changed, 69 insertions(+), 23 deletions(-) diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 557f573f81..5f0d20d463 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -170,7 +170,13 @@ ), Simple(Axe(Furor), "common.abilities.axe.furor"), Simple(Axe(Fracture), "common.abilities.axe.fracture"), - Simple(Axe(Lacerate), "common.abilities.axe.lacerate"), + Contextualized( + pseudo_id: "common.abilities.axe.lacerate", + abilities: [ + ([Combo(50)], (Axe(Riptide), "common.abilities.axe.riptide")), + ([], (Axe(Lacerate), "common.abilities.axe.lacerate")), + ], + ), Simple(Axe(SkullBash), "common.abilities.axe.skull_bash"), Simple(Axe(Sunder), "common.abilities.axe.sunder"), Simple(Axe(Plunder), "common.abilities.axe.plunder"), diff --git a/assets/common/abilities/axe/lacerate.ron b/assets/common/abilities/axe/lacerate.ron index 47b603ec00..ed2d265c23 100644 --- a/assets/common/abilities/axe/lacerate.ron +++ b/assets/common/abilities/axe/lacerate.ron @@ -6,7 +6,7 @@ FinisherMelee( melee_constructor: ( kind: Slash( damage: 50, - poise: 20, + poise: 5, knockback: 0, energy_regen: 0, ), diff --git a/assets/common/abilities/axe/riptide.ron b/assets/common/abilities/axe/riptide.ron index b4732b4a2f..b7bb09f991 100644 --- a/assets/common/abilities/axe/riptide.ron +++ b/assets/common/abilities/axe/riptide.ron @@ -1,22 +1,24 @@ -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.2, + swing_duration: 0.4, + recover_duration: 0.5, + melee_constructor: ( + kind: Slash( + damage: 60, + poise: 5, + knockback: 0, + energy_regen: 0, ), - ], - energy_cost_per_strike: 0, + range: 3.0, + angle: 360.0, + multi_target: Some(Normal), + damage_effect: Some(Buff(( + kind: Bleeding, + dur_secs: 15.0, + strength: DamageFraction(0.2), + chance: 1.0, + ))), + ), + minimum_combo: 50, ) \ No newline at end of file diff --git a/voxygen/anim/src/character/finishermelee.rs b/voxygen/anim/src/character/finishermelee.rs index 30d4642ee2..55223f9fc7 100644 --- a/voxygen/anim/src/character/finishermelee.rs +++ b/voxygen/anim/src/character/finishermelee.rs @@ -3,7 +3,7 @@ use super::{ CharacterSkeleton, SkeletonAttr, }; use common::states::utils::{AbilityInfo, StageSection}; -use core::f32::consts::PI; +use core::f32::consts::{PI, TAU}; pub struct FinisherMeleeAnimation; impl Animation for FinisherMeleeAnimation { @@ -255,6 +255,44 @@ impl Animation for FinisherMeleeAnimation { next.control.orientation.rotate_z(move2 * -5.0); next.control.position += Vec3::new(move2 * 17.0, move2 * 3.0, 0.0); }, + Some("common.abilities.axe.riptide") => { + let (move1, move2_raw, 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_reset = ((move2_raw - 0.5).abs() - 0.5).abs() * 2.0; + let move2 = move2_raw * 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 - move1 * PI * 0.75); + + next.chest.orientation.rotate_z(move1 * 1.2); + next.head.orientation.rotate_z(move1 * -0.7); + next.shorts.orientation.rotate_z(move1 * -0.9); + next.belt.orientation.rotate_z(move1 * -0.3); + + next.chest.orientation.rotate_z(move2 * -2.9); + next.head.orientation.rotate_z(move2 * 1.2); + next.shorts.orientation.rotate_z(move2 * 2.0); + next.belt.orientation.rotate_z(move2 * 0.7); + next.control.orientation.rotate_x(move2_reset * -1.0); + next.control.orientation.rotate_z(move2 * -5.0); + next.control.position += Vec3::new(move2 * 17.0, move2 * 3.0, 0.0); + next.torso.orientation.rotate_z(move2_raw * -TAU) + }, _ => {}, }