From af755197bbc9fad9135ed109ae90b27cc2e77a3e Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 29 Jan 2024 18:46:44 -0500 Subject: [PATCH] Wide wallop --- .../common/abilities/ability_set_manifest.ron | 3 +-- .../common/abilities/hammer/wide_wallop.ron | 25 +++++++++++++++++++ .../element/skills/hammer/wide_wallop.png | 3 +++ assets/voxygen/i18n/en/hud/ability.ftl | 3 +++ voxygen/anim/src/character/chargeswing.rs | 23 ++++++++++++++++- voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 1 + 7 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 assets/common/abilities/hammer/wide_wallop.ron create mode 100644 assets/voxygen/element/skills/hammer/wide_wallop.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 33a6e5f997..772b9826be 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -194,8 +194,7 @@ Tool(Hammer): ( guard: Some(Simple(None, "common.abilities.hammer.basic_guard")), primary: Simple(None, "common.abilities.hammer.solid_smash"), - secondary: Simple(None, "common.abilities.hammer.basic_guard"), - // secondary: Simple(None, "common.abilities.hammer.wide_wallop"), + secondary: Simple(None, "common.abilities.hammer.wide_wallop"), abilities: [ // Simple(Hammer(ScornfulSwipe), "common.abilities.hammer.scornful_swipe"), // Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), diff --git a/assets/common/abilities/hammer/wide_wallop.ron b/assets/common/abilities/hammer/wide_wallop.ron new file mode 100644 index 0000000000..74917486c6 --- /dev/null +++ b/assets/common/abilities/hammer/wide_wallop.ron @@ -0,0 +1,25 @@ +ChargedMelee( + energy_cost: 0, + energy_drain: 0, + melee_constructor: ( + kind: Bash( + damage: 0, + poise: 0, + knockback: 0, + energy_regen: 0, + ), + scaled: Some(( + kind: Bash( + damage: 20, + poise: 30, + knockback: 20, + energy_regen: 30, + ))), + range: 4.5, + angle: 15.0, + ), + charge_duration: 0.6, + swing_duration: 0.2, + hit_timing: 0.5, + recover_duration: 0.5, +) diff --git a/assets/voxygen/element/skills/hammer/wide_wallop.png b/assets/voxygen/element/skills/hammer/wide_wallop.png new file mode 100644 index 0000000000..d28435adba --- /dev/null +++ b/assets/voxygen/element/skills/hammer/wide_wallop.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:155b65dc04dd9c0803b9e3a5512cadde3cd94ed2355cf78839b82de723b823cd +size 576 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index b4e3142078..d2733c60f6 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -380,3 +380,6 @@ common-abilities-axe-capsize = Capsize common-abilities-hammer-solid_smash = Solid Smash .desc = A solid smash, that'll hurt +common-abilities-hammer-wide_wallop = Wide Wallop + .desc = + Pull back and send them flying diff --git a/voxygen/anim/src/character/chargeswing.rs b/voxygen/anim/src/character/chargeswing.rs index 9b034b9307..b31937587c 100644 --- a/voxygen/anim/src/character/chargeswing.rs +++ b/voxygen/anim/src/character/chargeswing.rs @@ -1,6 +1,6 @@ use super::{ super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, + hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; use common::states::utils::StageSection; use core::f32::consts::{PI, TAU}; @@ -262,6 +262,27 @@ impl Animation for ChargeswingAnimation { next.control.orientation.rotate_x(move2 * -3.0); next.control.position += Vec3::new(0.0, move2 * 8.0, move2 * -30.0); }, + Some("common.abilities.hammer.wide_wallop") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3, tension) = match stage_section { + StageSection::Charge => (anim_time.min(1.0), 0.0, 0.0, (anim_time * 7.0).sin()), + StageSection::Action => (1.0, anim_time, 0.0, 0.0), + StageSection::Recover => (1.0, 1.0, anim_time, 0.0), + _ => (0.0, 0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + + next.control.orientation.rotate_x(move1 * 1.1 + move2 * 0.6); + twist_back(&mut next, move1 + tension / 25.0, 1.7, 0.7, 0.3, 1.1); + next.control.orientation.rotate_y(move1 * -0.8); + next.control.position += Vec3::new(0.0, 0.0, 6.0) * move1; + + twist_forward(&mut next, move2, 4.8, 1.7, 0.7, 3.2); + next.control.orientation.rotate_y(move2 * 2.0); + next.control.orientation.rotate_z(move2 * -1.8); + }, _ => {}, } diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 1792969265..ef2ed4ac51 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -316,6 +316,7 @@ image_ids! { axe_capsize: "voxygen.element.skills.axe.capsize", // Hammer hammer_solid_smash: "voxygen.element.skills.hammer.solid_smash", + hammer_wide_wallop: "voxygen.element.skills.hammer.wide_wallop", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 08cb947bcb..322ba4b253 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -620,6 +620,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.axe.capsize" => imgs.axe_capsize, // Hammer "common.abilities.hammer.solid_smash" => imgs.hammer_solid_smash, + "common.abilities.hammer.wide_wallop" => imgs.hammer_wide_wallop, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2,