From 65f9d18fb74a436b16dfd1e2a263a65d425e20a8 Mon Sep 17 00:00:00 2001 From: ubruntu Date: Tue, 28 Dec 2021 22:09:34 +0000 Subject: [PATCH] Dagger UX --- .../common/items/weapons/dagger/basic_0.ron | 2 +- .../common/items/weapons/dagger/cultist_0.ron | 2 +- .../items/weapons/dagger/starter_dagger.ron | 2 +- assets/voxygen/i18n/en/common.ron | 1 + .../voxel/weapon/dagger/dagger_basic-0.vox | 4 ++-- .../voxel/weapon/dagger/dagger_cult-0.vox | 4 ++-- .../voxel/weapon/dagger/dagger_rusty.vox | 4 ++-- voxygen/anim/src/character/alpha.rs | 6 +++--- voxygen/anim/src/character/idle.rs | 10 +++++++++ voxygen/anim/src/character/jump.rs | 8 +++---- voxygen/anim/src/character/run.rs | 8 +++---- voxygen/anim/src/character/sneakwield.rs | 6 ++++-- voxygen/anim/src/character/stand.rs | 21 ++++++++++++++++++- voxygen/anim/src/character/swim.rs | 8 +++---- voxygen/anim/src/character/wield.rs | 6 ++++-- 15 files changed, 63 insertions(+), 29 deletions(-) diff --git a/assets/common/items/weapons/dagger/basic_0.ron b/assets/common/items/weapons/dagger/basic_0.ron index dbd6ff0fd4..5621131b1f 100644 --- a/assets/common/items/weapons/dagger/basic_0.ron +++ b/assets/common/items/weapons/dagger/basic_0.ron @@ -5,7 +5,7 @@ ItemDef( kind: Dagger, hands: One, stats: Direct(( - equip_time_secs: 0.0, + equip_time_secs: 0.2, power: 1.8, effect_power: 2.0, speed: 1.0, diff --git a/assets/common/items/weapons/dagger/cultist_0.ron b/assets/common/items/weapons/dagger/cultist_0.ron index 600202f889..a886bfdbab 100644 --- a/assets/common/items/weapons/dagger/cultist_0.ron +++ b/assets/common/items/weapons/dagger/cultist_0.ron @@ -5,7 +5,7 @@ ItemDef( kind: Dagger, hands: One, stats: Direct(( - equip_time_secs: 0.0, + equip_time_secs: 0.2, power: 2.0, effect_power: 1.0, speed: 1.0, diff --git a/assets/common/items/weapons/dagger/starter_dagger.ron b/assets/common/items/weapons/dagger/starter_dagger.ron index c0aed604c2..92c3315141 100644 --- a/assets/common/items/weapons/dagger/starter_dagger.ron +++ b/assets/common/items/weapons/dagger/starter_dagger.ron @@ -5,7 +5,7 @@ ItemDef( kind: Dagger, hands: One, stats: Direct(( - equip_time_secs: 0.3, + equip_time_secs: 0.2, power: 1.0, effect_power: 0.5, speed: 1.0, diff --git a/assets/voxygen/i18n/en/common.ron b/assets/voxygen/i18n/en/common.ron index 2875bdc89a..32dcf7b2d2 100644 --- a/assets/voxygen/i18n/en/common.ron +++ b/assets/voxygen/i18n/en/common.ron @@ -62,6 +62,7 @@ Is the client up to date?"#, "common.species.danari": "Danari", "common.weapons.axe": "Axe", + "common.weapons.dagger": "Dagger", "common.weapons.greatsword": "Greatsword", "common.weapons.shortswords": "Shortswords", "common.weapons.sword": "Sword", diff --git a/assets/voxygen/voxel/weapon/dagger/dagger_basic-0.vox b/assets/voxygen/voxel/weapon/dagger/dagger_basic-0.vox index 149f476bd4..9fe77228cb 100644 --- a/assets/voxygen/voxel/weapon/dagger/dagger_basic-0.vox +++ b/assets/voxygen/voxel/weapon/dagger/dagger_basic-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b817fd13f04f25800279e3887e0e67ad8562614e403700e08cb601059a4e3dbf -size 1272 +oid sha256:dd3c8e1d6f969b71608246c6fd1070a164b3eaf88f35c9ff81798aa5d351b444 +size 22746 diff --git a/assets/voxygen/voxel/weapon/dagger/dagger_cult-0.vox b/assets/voxygen/voxel/weapon/dagger/dagger_cult-0.vox index 715230f41d..b722083da3 100644 --- a/assets/voxygen/voxel/weapon/dagger/dagger_cult-0.vox +++ b/assets/voxygen/voxel/weapon/dagger/dagger_cult-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a87412125ec7786ac10898352065c6fcaf502e5d726120f0509ad1f6d9d827f4 -size 1332 +oid sha256:5ad0e421ad5a904dd19b4fd9e895c49d24c7f98d27653c1215a2f0b50ae8adc9 +size 22818 diff --git a/assets/voxygen/voxel/weapon/dagger/dagger_rusty.vox b/assets/voxygen/voxel/weapon/dagger/dagger_rusty.vox index 698321d936..f187b742fb 100644 --- a/assets/voxygen/voxel/weapon/dagger/dagger_rusty.vox +++ b/assets/voxygen/voxel/weapon/dagger/dagger_rusty.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8cc83f7dba5aab82666fb5db4ada59eb111fb6a3d39c399c0002572b8683e8b3 -size 1276 +oid sha256:c66586d437aa8017eb02202b8522735b8937243e54e99d2fcd2d6dc74abbb785 +size 22763 diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index b9c351f1c7..12bd669cfb 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -48,7 +48,7 @@ impl Animation for AlphaAnimation { next.torso.orientation = Quaternion::rotation_z(0.0); match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) => { + Some(ToolKind::Sword | ToolKind::Dagger) => { next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); @@ -192,7 +192,7 @@ impl Animation for AlphaAnimation { match hands { (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) => { + Some(ToolKind::Sword | ToolKind::Dagger) => { next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) * Quaternion::rotation_y(move1 * -1.2 + move2 * -1.5) @@ -233,7 +233,7 @@ impl Animation for AlphaAnimation { match hands { (None | Some(Hands::One), Some(Hands::One)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) => { + Some(ToolKind::Sword | ToolKind::Dagger) => { next.control_r.position = Vec3::new(7.0 + move2 * 8.0, 8.0, 2.0); next.control_r.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) * Quaternion::rotation_y(move1 * -1.8 + move2 * -1.5) diff --git a/voxygen/anim/src/character/idle.rs b/voxygen/anim/src/character/idle.rs index 81c3145038..8d3c7728ea 100644 --- a/voxygen/anim/src/character/idle.rs +++ b/voxygen/anim/src/character/idle.rs @@ -110,6 +110,11 @@ impl Animation for IdleAnimation { match hands { (Some(Hands::One), _) => match active_tool_kind { + Some(ToolKind::Dagger) => { + next.main.position = Vec3::new(5.0, 1.0, 2.0); + next.main.orientation = + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI); + }, Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => { next.main.position = Vec3::new(-4.0, -5.0, 10.0); next.main.orientation = @@ -122,6 +127,11 @@ impl Animation for IdleAnimation { }; match hands { (None | Some(Hands::One), Some(Hands::One)) => match second_tool_kind { + Some(ToolKind::Dagger) => { + next.second.position = Vec3::new(-5.0, 1.0, 2.0); + next.second.orientation = + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI); + }, Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => { next.second.position = Vec3::new(4.0, -6.0, 10.0); next.second.orientation = diff --git a/voxygen/anim/src/character/jump.rs b/voxygen/anim/src/character/jump.rs index 73d6e7e685..a4ffb7397e 100644 --- a/voxygen/anim/src/character/jump.rs +++ b/voxygen/anim/src/character/jump.rs @@ -144,9 +144,9 @@ impl Animation for JumpAnimation { match main_tool { Some(ToolKind::Dagger) => { - next.main.position = Vec3::new(-4.0, -5.0, 7.0); + next.main.position = Vec3::new(5.0, 1.0, 2.0); next.main.orientation = - Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(1.5 * PI); + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI); }, Some(ToolKind::Shield) => { next.main.position = Vec3::new(-0.0, -5.0, 3.0); @@ -172,9 +172,9 @@ impl Animation for JumpAnimation { match second_tool_kind { Some(ToolKind::Dagger) => { - next.second.position = Vec3::new(4.0, -6.0, 7.0); + next.second.position = Vec3::new(-5.0, 1.0, 2.0); next.second.orientation = - Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(-1.5 * PI); + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI); }, Some(ToolKind::Shield) => { next.second.position = Vec3::new(0.0, -4.0, 3.0); diff --git a/voxygen/anim/src/character/run.rs b/voxygen/anim/src/character/run.rs index 9e1dbc966c..c30ad08a72 100644 --- a/voxygen/anim/src/character/run.rs +++ b/voxygen/anim/src/character/run.rs @@ -208,9 +208,9 @@ impl Animation for RunAnimation { match main_tool { Some(ToolKind::Dagger) => { - next.main.position = Vec3::new(-4.0, -5.0, 7.0); + next.main.position = Vec3::new(5.0, 1.0, 2.0); next.main.orientation = - Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(1.5 * PI); + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI); }, Some(ToolKind::Shield) => { next.main.position = Vec3::new(-0.0, -5.0, 3.0); @@ -236,9 +236,9 @@ impl Animation for RunAnimation { match second_tool_kind { Some(ToolKind::Dagger) => { - next.second.position = Vec3::new(4.0, -6.0, 7.0); + next.second.position = Vec3::new(-5.0, 1.0, 2.0); next.second.orientation = - Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(-1.5 * PI); + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI); }, Some(ToolKind::Shield) => { next.second.position = Vec3::new(0.0, -4.0, 3.0); diff --git a/voxygen/anim/src/character/sneakwield.rs b/voxygen/anim/src/character/sneakwield.rs index b20f743752..a5435e4711 100644 --- a/voxygen/anim/src/character/sneakwield.rs +++ b/voxygen/anim/src/character/sneakwield.rs @@ -314,7 +314,8 @@ impl Animation for SneakWieldAnimation { match hands { (Some(Hands::One), _) => { next.control_l.position = Vec3::new(-7.0, 6.0, 5.0); - next.control_l.orientation = Quaternion::rotation_x(-0.3); + next.control_l.orientation = + Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(0.2); next.hand_l.position = Vec3::new(-1.0, -0.5, 0.0); next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) }, @@ -323,7 +324,8 @@ impl Animation for SneakWieldAnimation { match hands { (None | Some(Hands::One), Some(Hands::One)) => { next.control_r.position = Vec3::new(7.0, 6.0, 5.0); - next.control_r.orientation = Quaternion::rotation_x(-0.3); + next.control_r.orientation = + Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-0.2); next.hand_r.position = Vec3::new(1.0, -0.5, 0.0); next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) }, diff --git a/voxygen/anim/src/character/stand.rs b/voxygen/anim/src/character/stand.rs index 8301ca655e..7f7665c94c 100644 --- a/voxygen/anim/src/character/stand.rs +++ b/voxygen/anim/src/character/stand.rs @@ -132,23 +132,42 @@ impl Animation for StandAnimation { match hands { (Some(Hands::One), _) => match active_tool_kind { + Some(ToolKind::Dagger) => { + next.main.position = Vec3::new(5.0, 1.0, 2.0); + next.main.orientation = + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI); + }, Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => { next.main.position = Vec3::new(-4.0, -5.0, 10.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(PI / 2.0); }, - + Some(ToolKind::Shield) => { + next.main.position = Vec3::new(-0.0, -4.0, 3.0); + next.main.orientation = + Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(-1.5 * PI); + }, _ => {}, }, (_, _) => {}, }; match hands { (None | Some(Hands::One), Some(Hands::One)) => match second_tool_kind { + Some(ToolKind::Dagger) => { + next.second.position = Vec3::new(-5.0, 1.0, 2.0); + next.second.orientation = + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI); + }, Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => { next.second.position = Vec3::new(4.0, -6.0, 10.0); next.second.orientation = Quaternion::rotation_y(-2.5) * Quaternion::rotation_z(-PI / 2.0); }, + Some(ToolKind::Shield) => { + next.second.position = Vec3::new(0.0, -4.0, 3.0); + next.second.orientation = + Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(1.5 * PI); + }, _ => {}, }, (_, _) => {}, diff --git a/voxygen/anim/src/character/swim.rs b/voxygen/anim/src/character/swim.rs index 4bb79c4795..e57f4dab9f 100644 --- a/voxygen/anim/src/character/swim.rs +++ b/voxygen/anim/src/character/swim.rs @@ -179,9 +179,9 @@ impl Animation for SwimAnimation { match main_tool { Some(ToolKind::Dagger) => { - next.main.position = Vec3::new(-4.0, -5.0, 7.0); + next.main.position = Vec3::new(5.0, 1.0, 2.0); next.main.orientation = - Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(1.5 * PI); + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI); }, Some(ToolKind::Shield) => { next.main.position = Vec3::new(-0.0, -5.0, 3.0); @@ -207,9 +207,9 @@ impl Animation for SwimAnimation { match second_tool_kind { Some(ToolKind::Dagger) => { - next.second.position = Vec3::new(4.0, -6.0, 7.0); + next.second.position = Vec3::new(-5.0, 1.0, 2.0); next.second.orientation = - Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(-1.5 * PI); + Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI); }, Some(ToolKind::Shield) => { next.second.position = Vec3::new(0.0, -4.0, 3.0); diff --git a/voxygen/anim/src/character/wield.rs b/voxygen/anim/src/character/wield.rs index 29b98f16c0..728bd73146 100644 --- a/voxygen/anim/src/character/wield.rs +++ b/voxygen/anim/src/character/wield.rs @@ -291,7 +291,8 @@ impl Animation for WieldAnimation { match hands { (Some(Hands::One), _) => { next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); - next.control_l.orientation = Quaternion::rotation_x(-0.3); + next.control_l.orientation = + Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(0.2); next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) }, @@ -300,7 +301,8 @@ impl Animation for WieldAnimation { match hands { (None | Some(Hands::One), Some(Hands::One)) => { next.control_r.position = Vec3::new(7.0, 8.0, 2.0); - next.control_r.orientation = Quaternion::rotation_x(-0.3); + next.control_r.orientation = + Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-0.2); next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) },