From 3e8b2b283a0c36bb0e112d62a393fbab4632f9aa Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 13 May 2023 11:30:59 -0400 Subject: [PATCH] Triple chop --- assets/common/abilities/axe/triple_chop.ron | 34 ++++++++ assets/voxygen/i18n/en/hud/ability.ftl | 2 +- common/src/comp/skillset/mod.rs | 2 +- voxygen/anim/src/character/combomelee.rs | 91 +++++++++++++++++++++ 4 files changed, 127 insertions(+), 2 deletions(-) diff --git a/assets/common/abilities/axe/triple_chop.ron b/assets/common/abilities/axe/triple_chop.ron index b4732b4a2f..df12779d61 100644 --- a/assets/common/abilities/axe/triple_chop.ron +++ b/assets/common/abilities/axe/triple_chop.ron @@ -17,6 +17,40 @@ ComboMelee2( recover_duration: 0.1, ori_modifier: 0.6, ), + ( + 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, + ), + ( + melee_constructor: ( + kind: Slash( + damage: 8, + poise: 5, + knockback: 0, + energy_regen: 5, + ), + range: 3.0, + angle: 45.0, + ), + buildup_duration: 0.2, + swing_duration: 0.05, + hit_timing: 0.5, + recover_duration: 0.15, + ori_modifier: 0.6, + ), ], energy_cost_per_strike: 0, ) \ No newline at end of file diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index c84987310d..40c8eaaf7c 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -1,5 +1,5 @@ common-abilities-debug-possess = Possessing Arrow - .desc = A jump with the slashing leap to position of cursor. + .desc = Shoots a poisonous arrow. Lets you control your target. common-abilities-hammer-leap = Smash of Doom .desc = An AOE attack with knockback. Leaps to position of cursor. common-abilities-bow-shotgun = Burst diff --git a/common/src/comp/skillset/mod.rs b/common/src/comp/skillset/mod.rs index 6b14321b5e..290de2a1e4 100644 --- a/common/src/comp/skillset/mod.rs +++ b/common/src/comp/skillset/mod.rs @@ -138,7 +138,7 @@ impl SkillGroupKind { pub fn skill_point_cost(self, level: u16) -> u32 { use std::f32::consts::E; match self { - Self::Weapon(ToolKind::Sword) => { + Self::Weapon(ToolKind::Sword | ToolKind::Axe) => { let level = level as f32; ((400.0 * (level / (level + 20.0)).powi(2) + 5.0 * E.powf(0.025 * level)) .min(u32::MAX as f32) as u32) diff --git a/voxygen/anim/src/character/combomelee.rs b/voxygen/anim/src/character/combomelee.rs index d591c4e86d..c00e03f9f7 100644 --- a/voxygen/anim/src/character/combomelee.rs +++ b/voxygen/anim/src/character/combomelee.rs @@ -879,6 +879,97 @@ impl Animation for ComboAnimation { next.control.orientation.rotate_x(move2 * 2.7); next.control.position += Vec3::new(0.0, move2 * -9.0, move2 * 17.0); }, + Some("common.abilities.axe.triple_chop") => { + let (move1, move2) = if strike == current_strike { + match stage_section { + Some(StageSection::Buildup) => { + next.main_weapon_trail = false; + next.off_weapon_trail = false; + (anim_time, 0.0) + }, + Some(StageSection::Action) => (1.0, anim_time), + Some(StageSection::Recover) => { + next.main_weapon_trail = false; + next.off_weapon_trail = false; + (1.0, 1.0) + }, + _ => (0.0, 0.0), + } + } else { + (1.0, 1.0) + }; + let move1 = move1 * multi_strike_pullback; + let move2 = move2 * multi_strike_pullback; + + match strike { + 0 => { + 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 + move1 * -1.0, + s_a.ac.1 + move1 * -4.0, + s_a.ac.2, + ); + next.control.orientation = + Quaternion::rotation_x(s_a.ac.3 + move1 * -1.5) + * Quaternion::rotation_y(s_a.ac.4) + * Quaternion::rotation_z(s_a.ac.5 + move1 * 0.4); + + next.chest.orientation.rotate_z(move1 * 0.4); + next.head.orientation.rotate_z(move1 * -0.2); + next.belt.orientation.rotate_z(move1 * -0.1); + next.shorts.orientation.rotate_z(move1 * -0.2); + + next.chest.orientation.rotate_z(move2 * -0.6); + next.head.orientation.rotate_z(move2 * 0.3); + next.belt.orientation.rotate_z(move2 * 0.1); + next.shorts.orientation.rotate_z(move2 * 0.2); + next.control.orientation = next.control.orientation + * Quaternion::rotation_z(move2 * -0.5) + * Quaternion::rotation_x(move2 * -2.0); + next.control.orientation.rotate_y(move2 * -0.7); + next.control.position += Vec3::new(move2 * 15.0, 0.0, move2 * -4.0); + }, + 1 => { + next.chest.orientation.rotate_z(move1 * -0.2); + next.head.orientation.rotate_z(move1 * 0.1); + next.shorts.orientation.rotate_z(move1 * 0.1); + next.control.orientation.rotate_y(move1 * 0.9); + next.control.orientation.rotate_x(move1 * 1.5); + next.control.orientation.rotate_z(move1 * -0.4); + next.control.position += Vec3::new(move1 * 4.0, 0.0, move1 * 4.0); + + next.chest.orientation.rotate_z(move2 * 0.6); + next.head.orientation.rotate_z(move2 * -0.3); + next.belt.orientation.rotate_z(move2 * -0.1); + next.shorts.orientation.rotate_z(move2 * -0.2); + next.control.orientation = next.control.orientation + * Quaternion::rotation_z(move2 * 0.5) + * Quaternion::rotation_x(move2 * -2.0); + next.control.orientation.rotate_y(move2 * 0.7); + next.control.position += Vec3::new(move2 * -15.0, 0.0, move2 * -4.0); + }, + 2 => { + next.control.orientation.rotate_z(move1 * -0.4); + next.control.orientation.rotate_x(move1 * 2.5); + next.control.orientation.rotate_z(move1 * -1.0); + next.control.position += Vec3::new(move1 * -3.0, 0.0, move1 * 4.0); + + next.chest.orientation.rotate_z(move2 * -0.3); + next.head.orientation.rotate_z(move2 * 0.1); + next.shorts.orientation.rotate_z(move2 * 0.1); + next.control.orientation.rotate_x(move2 * -2.5); + next.control.orientation.rotate_z(move2 * -0.8); + next.control.position += Vec3::new(move2 * 5.0, 0.0, move2 * -6.0); + }, + _ => {}, + } + }, _ => {}, } }