From e24ebc381b0871eb2e6801091a909eaf7ba52c3c Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 21 Feb 2024 20:16:04 -0500 Subject: [PATCH] Heavy whorl --- .../common/abilities/ability_set_manifest.ron | 14 +++--- .../abilities/hammer/dual_heavy_whorl.ron | 19 ++++++++ .../common/abilities/hammer/heavy_whorl.ron | 18 ++++++++ .../abilities/hammer/scornful_swipe.ron | 2 +- .../common/abilities/hammer/vigorous_bash.ron | 2 +- .../element/skills/hammer/heavy_whorl.png | 3 ++ assets/voxygen/i18n/en/hud/ability.ftl | 6 +++ voxygen/anim/src/character/alpha.rs | 46 ++++++++++++++++++- voxygen/anim/src/character/mod.rs | 27 +++++++++++ voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 2 + 11 files changed, 130 insertions(+), 10 deletions(-) create mode 100644 assets/common/abilities/hammer/dual_heavy_whorl.ron create mode 100644 assets/common/abilities/hammer/heavy_whorl.ron create mode 100644 assets/voxygen/element/skills/hammer/heavy_whorl.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index dd05bd8ac4..9b807f8777 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -218,13 +218,13 @@ // ), // Simple(Hammer(Thunderclap), "common.abilities.hammer.thunderclap"), // Simple(Hammer(SeismicShock), "common.abilities.hammer.seismic_shock"), - // Contextualized( - // pseudo_id: "common.abilities.hammer.heavy_whorl", - // abilities: [ - // ((dual_wielding_same_kind: true), (Hammer(HeavyWhorl), "common.abilities.hammer.dual_heavy_whorl")), - // ((), (Hammer(HeavyWhorl), "common.abilities.hammer.heavy_whorl")), - // ], - // ), + Contextualized( + pseudo_id: "common.abilities.hammer.heavy_whorl", + abilities: [ + ((dual_wielding_same_kind: true), (Hammer(HeavyWhorl), "common.abilities.hammer.dual_heavy_whorl")), + ((), (Hammer(HeavyWhorl), "common.abilities.hammer.heavy_whorl")), + ], + ), // Contextualized( // pseudo_id: "common.abilities.hammer.intercept", // abilities: [ diff --git a/assets/common/abilities/hammer/dual_heavy_whorl.ron b/assets/common/abilities/hammer/dual_heavy_whorl.ron new file mode 100644 index 0000000000..67aae07670 --- /dev/null +++ b/assets/common/abilities/hammer/dual_heavy_whorl.ron @@ -0,0 +1,19 @@ +BasicMelee( + energy_cost: 15, + buildup_duration: 0.2, + swing_duration: 0.4, + hit_timing: 0.5, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 15, + poise: 15, + knockback: 10, + energy_regen: 0, + ), + range: 3, + angle: 360, + simultaneous_hits: 2, + ), + ori_modifier: 0.2, +) diff --git a/assets/common/abilities/hammer/heavy_whorl.ron b/assets/common/abilities/hammer/heavy_whorl.ron new file mode 100644 index 0000000000..cba4f07302 --- /dev/null +++ b/assets/common/abilities/hammer/heavy_whorl.ron @@ -0,0 +1,18 @@ +BasicMelee( + energy_cost: 10, + buildup_duration: 0.2, + swing_duration: 0.4, + hit_timing: 0.5, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 20, + poise: 20, + knockback: 10, + energy_regen: 0, + ), + range: 3, + angle: 360, + ), + ori_modifier: 0.2, +) diff --git a/assets/common/abilities/hammer/scornful_swipe.ron b/assets/common/abilities/hammer/scornful_swipe.ron index 4a2cdbf19f..13c4a441e1 100644 --- a/assets/common/abilities/hammer/scornful_swipe.ron +++ b/assets/common/abilities/hammer/scornful_swipe.ron @@ -1,5 +1,5 @@ BasicMelee( - energy_cost: 0, + energy_cost: 10, buildup_duration: 0.7, swing_duration: 0.1, hit_timing: 0.5, diff --git a/assets/common/abilities/hammer/vigorous_bash.ron b/assets/common/abilities/hammer/vigorous_bash.ron index ad37c11adc..ff2de47a0d 100644 --- a/assets/common/abilities/hammer/vigorous_bash.ron +++ b/assets/common/abilities/hammer/vigorous_bash.ron @@ -23,5 +23,5 @@ ComboMelee2( custom_combo: Some((additional: 9, requirement: Some(TargetPoised))), ), ], - energy_cost_per_strike: 0, + energy_cost_per_strike: 10, ) diff --git a/assets/voxygen/element/skills/hammer/heavy_whorl.png b/assets/voxygen/element/skills/hammer/heavy_whorl.png new file mode 100644 index 0000000000..604a438c45 --- /dev/null +++ b/assets/voxygen/element/skills/hammer/heavy_whorl.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70029c8ac08cc45765f421b74f7177fb4c9d6c85d9d7c212165d7d724b73149f +size 1059 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index 5a751087c5..7030f56557 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -392,3 +392,9 @@ common-abilities-hammer-tremor = Tremor common-abilities-hammer-vigorous_bash = Vigorous Bash .desc = Use the head of your hammer to quickly strike your foes. +common-abilities-hammer-heavy_whorl = Heavy Whorl + .desc = + You strike all foes surrounding you with your hammer. +common-abilities-hammer-dual_heavy_whorl = Heavy Whorl + .desc = + You strike all foes surrounding you with your hammers. diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index ddc50830c5..21b5e9cf91 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -1,6 +1,6 @@ use super::{ super::{vek::*, Animation}, - hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, + dual_wield_start, hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; use common::{ comp::item::{Hands, ToolKind}, @@ -89,6 +89,50 @@ impl Animation for AlphaAnimation { next.control.orientation.rotate_y(move2 * -1.7); next.control.orientation.rotate_z(move2 * -2.7); }, + Some("common.abilities.hammer.heavy_whorl") => { + hammer_start(&mut next, s_a); + 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 move2base = move2; + let move2 = move2 * pullback; + + twist_back(&mut next, move1, 2.0, 0.8, 0.4, 1.4); + next.control.orientation.rotate_x(move1 * 0.6); + + next.torso.orientation.rotate_z(move2base * -2.0 * PI); + twist_forward(&mut next, move2, 3.4, 1.2, 0.8, 1.8); + next.control.orientation.rotate_z(move2 * -2.3); + next.control.position += Vec3::new(6.0, 0.0, 6.0) * move2; + }, + Some("common.abilities.hammer.dual_heavy_whorl") => { + dual_wield_start(&mut next); + 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 move2base = move2; + let move2 = move2 * pullback; + + twist_back(&mut next, move1, 2.0, 0.8, 0.4, 1.4); + next.control_l.orientation.rotate_y(move1 * -PI / 2.0); + next.control_r.orientation.rotate_y(move1 * -PI / 2.0); + next.control.position += Vec3::new(0.0, 0.0, 4.0) * move1; + + next.torso.orientation.rotate_z(move2base * -2.0 * PI); + twist_forward(&mut next, move2, 3.4, 1.2, 0.8, 1.8); + next.control_l.orientation.rotate_z(move2 * -2.3); + next.control_r.orientation.rotate_z(move2 * -2.3); + }, _ => { let (move1, move2, _move3, move2h) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), diff --git a/voxygen/anim/src/character/mod.rs b/voxygen/anim/src/character/mod.rs index c3a6349d31..6748dfbd42 100644 --- a/voxygen/anim/src/character/mod.rs +++ b/voxygen/anim/src/character/mod.rs @@ -499,3 +499,30 @@ pub fn twist_forward(next: &mut CharacterSkeleton, move2: f32, c: f32, h: f32, b next.belt.orientation.rotate_z(move2 * b); next.shorts.orientation.rotate_z(move2 * s); } + +pub fn dual_wield_start(next: &mut CharacterSkeleton) { + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_z(0.0); + next.second.position = Vec3::new(0.0, 0.0, 0.0); + next.second.orientation = Quaternion::rotation_z(0.0); + + next.control_l.position = + next.hand_l.position * Vec3::new(0.5, 0.5, 0.3) + Vec3::new(-4.0, 0.0, 0.0); + next.control_l.orientation = Quaternion::lerp( + next.hand_l.orientation, + Quaternion::rotation_x(PI * -0.5), + 0.65, + ); + next.hand_l.position = Vec3::new(0.0, -2.0, 0.0); + next.hand_l.orientation = Quaternion::rotation_x(PI * 0.5); + + next.control_r.position = + next.hand_r.position * Vec3::new(0.5, 0.5, 0.3) + Vec3::new(4.0, 0.0, 0.0); + next.control_r.orientation = Quaternion::lerp( + next.hand_r.orientation, + Quaternion::rotation_x(PI * -0.5), + 0.65, + ); + next.hand_r.position = Vec3::new(0.0, -2.0, 0.0); + next.hand_r.orientation = Quaternion::rotation_x(PI * 0.5); +} diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 2e7f034c2c..91ae4e95b5 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -320,6 +320,7 @@ image_ids! { hammer_scornful_swipe: "voxygen.element.skills.hammer.scornful_swipe", hammer_tremor: "voxygen.element.skills.hammer.tremor", hammer_vigorous_bash: "voxygen.element.skills.hammer.vigorous_bash", + hammer_heavy_whorl: "voxygen.element.skills.hammer.heavy_whorl", // 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 1c43c48fc0..3a00cfd80a 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -627,6 +627,8 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.scornful_swipe" => imgs.hammer_scornful_swipe, "common.abilities.hammer.tremor" => imgs.hammer_tremor, "common.abilities.hammer.vigorous_bash" => imgs.hammer_vigorous_bash, + "common.abilities.hammer.heavy_whorl" => imgs.hammer_heavy_whorl, + "common.abilities.hammer.dual_heavy_whorl" => imgs.hammer_heavy_whorl, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2,