From 16a44cd532492366a345420a8f10c9dbafece82e Mon Sep 17 00:00:00 2001 From: jshipsey Date: Mon, 22 Feb 2021 01:04:45 -0500 Subject: [PATCH] minotaur moves, added claygolem --- assets/common/abilities/axesimple/dash.ron | 19 ++ .../abilities/axesimple/doublestrike.ron | 39 +++++ assets/common/abilities/spear/dash.ron | 2 +- .../abilities/staffsimple/flamethrower.ron | 4 +- .../abilities/weapon_ability_manifest.ron | 6 +- .../items/npc_weapons/axe/minotaur_axe.ron | 18 ++ .../npc_weapons/staff/mindflayer_staff.ron | 2 +- assets/common/npc_names.ron | 4 + .../voxygen/voxel/biped_weapon_manifest.ron | 4 + .../voxygen/voxel/golem_central_manifest.ron | 36 ++++ .../voxygen/voxel/golem_lateral_manifest.ron | 68 ++++++++ .../voxel/npc/claygolem/male/chest_lower.vox | 3 + .../voxel/npc/claygolem/male/chest_upper.vox | 3 + .../voxel/npc/claygolem/male/foot_l.vox | 3 + .../voxel/npc/claygolem/male/foot_r.vox | 3 + .../voxel/npc/claygolem/male/hand_l.vox | 3 + .../voxel/npc/claygolem/male/hand_r.vox | 3 + .../voxygen/voxel/npc/claygolem/male/head.vox | 3 + .../voxel/npc/claygolem/male/leg_l.vox | 3 + .../voxel/npc/claygolem/male/leg_r.vox | 3 + .../voxel/npc/claygolem/male/shoulder_l.vox | 3 + .../voxel/npc/claygolem/male/shoulder_r.vox | 3 + .../voxygen/voxel/npc/minotaur/male/axe.vox | 3 - .../voxygen/voxel/weapon/axe/minotaur_axe.vox | 3 + common/src/comp/body.rs | 6 + common/src/comp/body/golem.rs | 5 +- common/src/comp/inventory/item/tool.rs | 1 + common/src/comp/inventory/loadout_builder.rs | 7 +- common/src/states/utils.rs | 2 +- server/src/persistence/json_models.rs | 2 + server/src/sys/agent.rs | 1 + voxygen/anim/src/biped_large/alpha.rs | 25 +++ voxygen/anim/src/biped_large/beam.rs | 163 +++++++++--------- voxygen/anim/src/biped_large/beta.rs | 27 ++- voxygen/anim/src/biped_large/dash.rs | 82 ++++++--- voxygen/anim/src/biped_large/idle.rs | 2 +- voxygen/anim/src/biped_large/jump.rs | 2 +- voxygen/anim/src/biped_large/mod.rs | 2 +- voxygen/anim/src/biped_large/run.rs | 6 +- voxygen/anim/src/biped_large/shoot.rs | 21 ++- voxygen/anim/src/biped_large/wield.rs | 2 +- voxygen/anim/src/character/alpha.rs | 4 +- voxygen/anim/src/character/wield.rs | 2 +- voxygen/anim/src/golem/mod.rs | 10 ++ voxygen/src/hud/util.rs | 1 + voxygen/src/scene/figure/mod.rs | 3 +- world/src/site/dungeon/mod.rs | 4 +- 47 files changed, 477 insertions(+), 144 deletions(-) create mode 100644 assets/common/abilities/axesimple/dash.ron create mode 100644 assets/common/abilities/axesimple/doublestrike.ron create mode 100644 assets/common/items/npc_weapons/axe/minotaur_axe.ron create mode 100644 assets/voxygen/voxel/npc/claygolem/male/chest_lower.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/chest_upper.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/foot_l.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/foot_r.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/hand_l.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/hand_r.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/head.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/leg_l.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/leg_r.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/shoulder_l.vox create mode 100644 assets/voxygen/voxel/npc/claygolem/male/shoulder_r.vox delete mode 100644 assets/voxygen/voxel/npc/minotaur/male/axe.vox create mode 100644 assets/voxygen/voxel/weapon/axe/minotaur_axe.vox diff --git a/assets/common/abilities/axesimple/dash.ron b/assets/common/abilities/axesimple/dash.ron new file mode 100644 index 0000000000..b034b17b0c --- /dev/null +++ b/assets/common/abilities/axesimple/dash.ron @@ -0,0 +1,19 @@ +DashMelee( + energy_cost: 0, + base_damage: 80, + scaled_damage: 160, + base_poise_damage: 0, + scaled_poise_damage: 0, + base_knockback: 8.0, + scaled_knockback: 7.0, + range: 3.0, + angle: 15.0, + energy_drain: 0, + forward_speed: 3.0, + buildup_duration: 0.5, + charge_duration: 3.0, + swing_duration: 0.35, + recover_duration: 1.2, + infinite_charge: true, + is_interruptible: true, +) diff --git a/assets/common/abilities/axesimple/doublestrike.ron b/assets/common/abilities/axesimple/doublestrike.ron new file mode 100644 index 0000000000..a48212625a --- /dev/null +++ b/assets/common/abilities/axesimple/doublestrike.ron @@ -0,0 +1,39 @@ +ComboMelee( + stage_data: [ + ( + stage: 1, + base_damage: 90, + damage_increase: 10, + base_poise_damage: 0, + poise_damage_increase: 0, + knockback: 4.0, + range: 3.5, + angle: 50.0, + base_buildup_duration: 0.6, + base_swing_duration: 0.12, + base_recover_duration: 0.6, + forward_movement: 3.5, + ), + ( + stage: 2, + base_damage: 130, + damage_increase: 15, + base_poise_damage: 0, + poise_damage_increase: 0, + knockback: 16.0, + range: 5.5, + angle: 15.0, + base_buildup_duration: 0.5, + base_swing_duration: 0.15, + base_recover_duration: 1.2, + forward_movement: 4.5, + ), + ], + initial_energy_gain: 0, + max_energy_gain: 0, + energy_increase: 0, + speed_increase: 0.0, + max_speed_increase: 0.0, + scales_from_combo: 0, + is_interruptible: false, +) \ No newline at end of file diff --git a/assets/common/abilities/spear/dash.ron b/assets/common/abilities/spear/dash.ron index b967a3d96d..39999a70b1 100644 --- a/assets/common/abilities/spear/dash.ron +++ b/assets/common/abilities/spear/dash.ron @@ -11,7 +11,7 @@ DashMelee( energy_drain: 0, forward_speed: 2.0, buildup_duration: 0.5, - charge_duration: 0.6, + charge_duration: 1.0, swing_duration: 0.1, recover_duration: 0.5, infinite_charge: true, diff --git a/assets/common/abilities/staffsimple/flamethrower.ron b/assets/common/abilities/staffsimple/flamethrower.ron index 99ac486041..6145e64192 100644 --- a/assets/common/abilities/staffsimple/flamethrower.ron +++ b/assets/common/abilities/staffsimple/flamethrower.ron @@ -1,6 +1,6 @@ BasicBeam( - buildup_duration: 0.25, - recover_duration: 0.25, + buildup_duration: 0.5, + recover_duration: 0.5, beam_duration: 1.0, base_hps: 0, base_dps: 150, diff --git a/assets/common/abilities/weapon_ability_manifest.ron b/assets/common/abilities/weapon_ability_manifest.ron index db9f089447..7d13b63a8f 100644 --- a/assets/common/abilities/weapon_ability_manifest.ron +++ b/assets/common/abilities/weapon_ability_manifest.ron @@ -39,7 +39,11 @@ primary: "common.abilities.hammersimple.doublestrike", secondary: "common.abilities.hammersimple.doublestrike", abilities: [], - + ), + AxeSimple: ( + primary: "common.abilities.axesimple.doublestrike", + secondary: "common.abilities.axesimple.dash", + abilities: [], ), SwordSimple: ( primary: "common.abilities.swordsimple.doublestrike", diff --git a/assets/common/items/npc_weapons/axe/minotaur_axe.ron b/assets/common/items/npc_weapons/axe/minotaur_axe.ron new file mode 100644 index 0000000000..2be8c68b62 --- /dev/null +++ b/assets/common/items/npc_weapons/axe/minotaur_axe.ron @@ -0,0 +1,18 @@ +ItemDef( + name: "Minotaur Axe", + description: "Placeholder", + kind: Tool( + ( + kind: AxeSimple, + hands: Two, + stats: ( + equip_time_millis: 500, + power: 1.8, + poise_strength: 1.00, + speed: 1.0 + ), + ) + ), + quality: Low, + tags: [], +) diff --git a/assets/common/items/npc_weapons/staff/mindflayer_staff.ron b/assets/common/items/npc_weapons/staff/mindflayer_staff.ron index 257e19af95..d371f99043 100644 --- a/assets/common/items/npc_weapons/staff/mindflayer_staff.ron +++ b/assets/common/items/npc_weapons/staff/mindflayer_staff.ron @@ -6,7 +6,7 @@ ItemDef( kind: StaffSimple, hands: Two, stats: Direct(( - equip_time_millis: 300, + equip_time_millis: 1, power: 3.0, poise_strength: 1.00, speed: 1.5, diff --git a/assets/common/npc_names.ron b/assets/common/npc_names.ron index 7ef846bdcf..d39ab78c06 100644 --- a/assets/common/npc_names.ron +++ b/assets/common/npc_names.ron @@ -871,6 +871,10 @@ treant: ( keyword: "treant", generic: "Treant" + ), + claygolem: ( + keyword: "claygolem", + generic: "ClayGolem" ) ) ), diff --git a/assets/voxygen/voxel/biped_weapon_manifest.ron b/assets/voxygen/voxel/biped_weapon_manifest.ron index 37213ae4a9..abdf5c61b2 100644 --- a/assets/voxygen/voxel/biped_weapon_manifest.ron +++ b/assets/voxygen/voxel/biped_weapon_manifest.ron @@ -754,6 +754,10 @@ vox_spec: ("armor.empty", (0.0, 0.0, 0.0)), color: None ), + "common.items.npc_weapons.axe.minotaur_axe": ( + vox_spec: ("weapon.axe.minotaur_axe", (-2.5, -9.0, -6.0)), + color: None + ), //BIPEDSMALL "common.items.npc_weapons.biped_small.gnarling.wooden_spear": ( vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)), diff --git a/assets/voxygen/voxel/golem_central_manifest.ron b/assets/voxygen/voxel/golem_central_manifest.ron index 593ef28bab..10ab717d32 100644 --- a/assets/voxygen/voxel/golem_central_manifest.ron +++ b/assets/voxygen/voxel/golem_central_manifest.ron @@ -71,4 +71,40 @@ central: ("npc.treant.male.chest_lower"), ), ), + (ClayGolem, Male): ( + head: ( + offset: (-10.5, -6.0, -5.0), + central: ("npc.claygolem.male.head"), + ), + jaw: ( + offset: (-9.5, 0.0, -3.0), + central: ("armor.empty"), + ), + torso_upper: ( + offset: (-9.5, -7.0, -6.5), + central: ("npc.claygolem.male.chest_upper"), + ), + torso_lower: ( + offset: (-9.5, -7.0, -8.0), + central: ("npc.claygolem.male.chest_lower"), + ), + ), + (ClayGolem, Female): ( + head: ( + offset: (-10.5, -6.0, -5.0), + central: ("npc.claygolem.male.head"), + ), + jaw: ( + offset: (-9.5, 0.0, -3.0), + central: ("armor.empty"), + ), + torso_upper: ( + offset: (-9.5, -7.0, -6.5), + central: ("npc.claygolem.male.chest_upper"), + ), + torso_lower: ( + offset: (-9.5, -7.0, -8.0), + central: ("npc.claygolem.male.chest_lower"), + ), + ), }) diff --git a/assets/voxygen/voxel/golem_lateral_manifest.ron b/assets/voxygen/voxel/golem_lateral_manifest.ron index 07de63f088..72f3858875 100644 --- a/assets/voxygen/voxel/golem_lateral_manifest.ron +++ b/assets/voxygen/voxel/golem_lateral_manifest.ron @@ -135,4 +135,72 @@ lateral: ("npc.treant.male.foot_r"), ) ), + (ClayGolem, Male): ( + shoulder_l: ( + offset: (-13.0, -3.5, -6.5), + lateral: ("npc.claygolem.male.shoulder_l"), + ), + shoulder_r: ( + offset: (0.0, -3.5, -6.5), + lateral: ("npc.claygolem.male.shoulder_r"), + ), + hand_l: ( + offset: (-7.5, -6.5, -17.0), + lateral: ("npc.claygolem.male.hand_l"), + ), + hand_r: ( + offset: (-7.5, -6.5, -17.0), + lateral: ("npc.claygolem.male.hand_r"), + ), + leg_l: ( + offset: (-8.0, -4.0, -10.0), + lateral: ("npc.claygolem.male.leg_l"), + ), + leg_r: ( + offset: (0.0, -4.0, -10.0), + lateral: ("npc.claygolem.male.leg_r"), + ), + foot_l: ( + offset: (-2.5, -3.0, -7.0), + lateral: ("npc.claygolem.male.foot_l"), + ), + foot_r: ( + offset: (-2.5, -3.0, -7.0), + lateral: ("npc.claygolem.male.foot_r"), + ) + ), + (ClayGolem, Female): ( + shoulder_l: ( + offset: (-13.0, -3.5, -6.5), + lateral: ("npc.claygolem.male.shoulder_l"), + ), + shoulder_r: ( + offset: (0.0, -3.5, -6.5), + lateral: ("npc.claygolem.male.shoulder_r"), + ), + hand_l: ( + offset: (-7.5, -6.5, -17.0), + lateral: ("npc.claygolem.male.hand_l"), + ), + hand_r: ( + offset: (-7.5, -6.5, -17.0), + lateral: ("npc.claygolem.male.hand_r"), + ), + leg_l: ( + offset: (-8.0, -4.0, -10.0), + lateral: ("npc.claygolem.male.leg_l"), + ), + leg_r: ( + offset: (0.0, -4.0, -10.0), + lateral: ("npc.claygolem.male.leg_r"), + ), + foot_l: ( + offset: (-2.5, -3.0, -7.0), + lateral: ("npc.claygolem.male.foot_l"), + ), + foot_r: ( + offset: (-2.5, -3.0, -7.0), + lateral: ("npc.claygolem.male.foot_r"), + ) + ), }) diff --git a/assets/voxygen/voxel/npc/claygolem/male/chest_lower.vox b/assets/voxygen/voxel/npc/claygolem/male/chest_lower.vox new file mode 100644 index 0000000000..f824ccaf3c --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/chest_lower.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dca6b3f3e6332c8ccc8f74ada817f49455f22cc1d7fc3b9160724c640683e30 +size 4296 diff --git a/assets/voxygen/voxel/npc/claygolem/male/chest_upper.vox b/assets/voxygen/voxel/npc/claygolem/male/chest_upper.vox new file mode 100644 index 0000000000..cda6204277 --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/chest_upper.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acde4ee60302a74e7eadc83f175e5cd9b031ff02156f1b77c3fe3ed6eb6e50af +size 8580 diff --git a/assets/voxygen/voxel/npc/claygolem/male/foot_l.vox b/assets/voxygen/voxel/npc/claygolem/male/foot_l.vox new file mode 100644 index 0000000000..72be607431 --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/foot_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fc0a37df9773373e4205368c52a930a814a074d4e6ca40962667ff8bc1dbd9a +size 1496 diff --git a/assets/voxygen/voxel/npc/claygolem/male/foot_r.vox b/assets/voxygen/voxel/npc/claygolem/male/foot_r.vox new file mode 100644 index 0000000000..2dd4ef60ba --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/foot_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:086485f9857e6849bc0d975643939cdbed604599bb250609440d726538f2a46b +size 1496 diff --git a/assets/voxygen/voxel/npc/claygolem/male/hand_l.vox b/assets/voxygen/voxel/npc/claygolem/male/hand_l.vox new file mode 100644 index 0000000000..73a978f3e4 --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/hand_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00587c52fe927a8da630605b86bad70a7fa868c0bc22201fcf7df045b12ddc82 +size 4984 diff --git a/assets/voxygen/voxel/npc/claygolem/male/hand_r.vox b/assets/voxygen/voxel/npc/claygolem/male/hand_r.vox new file mode 100644 index 0000000000..15f30f4ccc --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/hand_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4cdae61f46ecb3db585aec3eb0244583e3f98906cad76f83c88dd266fe06feb +size 4984 diff --git a/assets/voxygen/voxel/npc/claygolem/male/head.vox b/assets/voxygen/voxel/npc/claygolem/male/head.vox new file mode 100644 index 0000000000..4448e17a4b --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0496ea5c90559b681246f5c641d2a2dfadaf7705eb79b7f2c9a38c3060c866c1 +size 6656 diff --git a/assets/voxygen/voxel/npc/claygolem/male/leg_l.vox b/assets/voxygen/voxel/npc/claygolem/male/leg_l.vox new file mode 100644 index 0000000000..a4291fa96e --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/leg_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5f9f90f81f28ebe40b8facb53f0dbef286c007a8899c252106ccb2f4e6db1f0 +size 2480 diff --git a/assets/voxygen/voxel/npc/claygolem/male/leg_r.vox b/assets/voxygen/voxel/npc/claygolem/male/leg_r.vox new file mode 100644 index 0000000000..3474bd445d --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/leg_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f94e1f7e77e7c5ce5db144d61ee683c2dea3606c53b0a2e2e539cd863d105118 +size 2480 diff --git a/assets/voxygen/voxel/npc/claygolem/male/shoulder_l.vox b/assets/voxygen/voxel/npc/claygolem/male/shoulder_l.vox new file mode 100644 index 0000000000..76d045a4c4 --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/shoulder_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ddb180e26cf2b52023c492e9306e6f1669fa8bbbc0fc14a9423d4cf49e8c4f6 +size 2764 diff --git a/assets/voxygen/voxel/npc/claygolem/male/shoulder_r.vox b/assets/voxygen/voxel/npc/claygolem/male/shoulder_r.vox new file mode 100644 index 0000000000..474d6cc5aa --- /dev/null +++ b/assets/voxygen/voxel/npc/claygolem/male/shoulder_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c5d744e727212f236c063999029e7c3fc8db57944f9ce781f5b5fa540d8afd5 +size 2764 diff --git a/assets/voxygen/voxel/npc/minotaur/male/axe.vox b/assets/voxygen/voxel/npc/minotaur/male/axe.vox deleted file mode 100644 index ba51b0efc3..0000000000 --- a/assets/voxygen/voxel/npc/minotaur/male/axe.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:81c825d278f673f3b214dd9772faf5d3fab9f69a4dba2ec320a23369140dcd23 -size 3460 diff --git a/assets/voxygen/voxel/weapon/axe/minotaur_axe.vox b/assets/voxygen/voxel/weapon/axe/minotaur_axe.vox new file mode 100644 index 0000000000..f8c4cd5649 --- /dev/null +++ b/assets/voxygen/voxel/weapon/axe/minotaur_axe.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e9b3f271457750c4e6d86fd23554322c15439b9583e23322b6143ef1cee86cf +size 3652 diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index 84351dc58d..9028eb536e 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -368,6 +368,7 @@ impl Body { biped_large::Species::Mindflayer => 8000, biped_large::Species::Tidalwarrior => 2500, biped_large::Species::Yeti => 2000, + biped_large::Species::Minotaur => 5000, _ => 1000, }, Body::BipedSmall(biped_small) => match biped_small.species { @@ -383,7 +384,12 @@ impl Body { object::Body::Crossbow => 800, _ => 10000, }, +<<<<<<< HEAD Body::Golem(_) => 2740, +======= + Body::Object(_) => 10000, + Body::Golem(_) => 3000, +>>>>>>> minotaur moves, added claygolem Body::Theropod(theropod) => match theropod.species { theropod::Species::Archaeos => 3000, theropod::Species::Odonto => 2700, diff --git a/common/src/comp/body/golem.rs b/common/src/comp/body/golem.rs index 2c01ed3914..a0549a5595 100644 --- a/common/src/comp/body/golem.rs +++ b/common/src/comp/body/golem.rs @@ -36,6 +36,7 @@ make_case_elim!( pub enum Species { StoneGolem = 0, Treant = 1, + ClayGolem = 2, } ); @@ -46,6 +47,7 @@ make_case_elim!( pub struct AllSpecies { pub stonegolem: SpeciesMeta, pub treant: SpeciesMeta, + pub claygolem: SpeciesMeta, } impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies { @@ -56,11 +58,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies match index { Species::StoneGolem => &self.stonegolem, Species::Treant => &self.treant, + Species::ClayGolem => &self.claygolem, } } } -pub const ALL_SPECIES: [Species; 2] = [Species::StoneGolem, Species::Treant]; +pub const ALL_SPECIES: [Species; 3] = [Species::StoneGolem, Species::Treant, Species::ClayGolem]; impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies { type IntoIter = std::iter::Copied>; diff --git a/common/src/comp/inventory/item/tool.rs b/common/src/comp/inventory/item/tool.rs index 91c7ce97da..4be2ed070a 100644 --- a/common/src/comp/inventory/item/tool.rs +++ b/common/src/comp/inventory/item/tool.rs @@ -22,6 +22,7 @@ pub enum ToolKind { SwordSimple, StaffSimple, BowSimple, + AxeSimple, Bow, Dagger, Staff, diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index 3293da63fa..18e3d1b250 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -88,6 +88,11 @@ impl LoadoutBuilder { "common.items.npc_weapons.unique.stone_golems_fist", )); }, + golem::Species::ClayGolem => { + main_tool = Some(Item::new_from_asset_expect( + "common.items.npc_weapons.unique.stone_golems_fist", + )); + }, _ => {}, }, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species { @@ -243,7 +248,7 @@ impl LoadoutBuilder { }, (biped_large::Species::Minotaur, _) => { main_tool = Some(Item::new_from_asset_expect( - "common.items.npc_weapons.hammer.cyclops_hammer", + "common.items.npc_weapons.axe.minotaur_axe", )); }, (biped_large::Species::Tidalwarrior, _) => { diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index 046a54042b..532668e59b 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -136,7 +136,7 @@ impl Body { Body::Dragon(_) => 5.0, Body::BirdSmall(_) => 35.0, Body::FishSmall(_) => 10.0, - Body::BipedLarge(_) => 12.0, + Body::BipedLarge(_) => 8.0, Body::BipedSmall(_) => 12.0, Body::Object(_) => 10.0, Body::Golem(_) => 8.0, diff --git a/server/src/persistence/json_models.rs b/server/src/persistence/json_models.rs index 5088bf79db..0ddfa0269c 100644 --- a/server/src/persistence/json_models.rs +++ b/server/src/persistence/json_models.rs @@ -145,6 +145,7 @@ pub fn skill_to_db_string(skill: comp::skills::Skill) -> String { | UnlockGroup(SkillGroupKind::Weapon(ToolKind::HammerSimple)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::StaffSimple)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::BowSimple)) + | UnlockGroup(SkillGroupKind::Weapon(ToolKind::AxeSimple)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::SwordSimple)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Debug)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Farming)) @@ -285,6 +286,7 @@ pub fn skill_group_to_db_string(skill_group: comp::skills::SkillGroupKind) -> St | Weapon(ToolKind::HammerSimple) | Weapon(ToolKind::StaffSimple) | Weapon(ToolKind::BowSimple) + | Weapon(ToolKind::AxeSimple) | Weapon(ToolKind::SwordSimple) | Weapon(ToolKind::Debug) | Weapon(ToolKind::Farming) diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index f9e6d3e433..7866861455 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -502,6 +502,7 @@ impl<'a> System<'a> for Sys { Some(ToolKind::Sword) => Tactic::Sword, Some(ToolKind::Spear) => Tactic::Sword, Some(ToolKind::SwordSimple) => Tactic::Sword, + Some(ToolKind::AxeSimple) => Tactic::Sword, Some(ToolKind::Axe) => Tactic::Axe, Some(ToolKind::Unique(UniqueKind::StoneGolemFist)) => { Tactic::StoneGolemBoss diff --git a/voxygen/anim/src/biped_large/alpha.rs b/voxygen/anim/src/biped_large/alpha.rs index 9a9a368fc6..3ccdc2c8ec 100644 --- a/voxygen/anim/src/biped_large/alpha.rs +++ b/voxygen/anim/src/biped_large/alpha.rs @@ -134,6 +134,31 @@ impl Animation for AlphaAnimation { * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0) * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8); }, + Some(ToolKind::AxeSimple) => { + next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); + next.control_r.position = Vec3::new(1.0, 2.0, -2.0); + + next.control.position = Vec3::new( + 4.0 + move1 * -12.0 + move2 * 28.0, + (s_a.grip / 1.0) + move1 * -3.0 + move2 * -5.0, + (-s_a.grip / 0.8) + move1 * 2.0 + move2 * 8.0, + ); + next.head.orientation = Quaternion::rotation_x(move1 * -0.25) + * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6); + next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9); + next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9); + + next.control_l.orientation = + Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0); + next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + + next.control.orientation = + Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3) + * Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5) + * Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5); + }, Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => { next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); diff --git a/voxygen/anim/src/biped_large/beam.rs b/voxygen/anim/src/biped_large/beam.rs index 0fa4a173f3..0c0d034666 100644 --- a/voxygen/anim/src/biped_large/beam.rs +++ b/voxygen/anim/src/biped_large/beam.rs @@ -12,8 +12,9 @@ impl Animation for BeamAnimation { Option, Option, f64, - f32, + Vec3, Option, + f32, ); type Skeleton = BipedLargeSkeleton; @@ -24,7 +25,7 @@ impl Animation for BeamAnimation { #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update_skeleton_inner( skeleton: &Self::Skeleton, - (active_tool_kind, _second_tool_kind, _global_time, velocity, stage_section): Self::Dependency, + (active_tool_kind, _second_tool_kind, _global_time, velocity, stage_section, acc_vel): Self::Dependency, anim_time: f64, rate: &mut f32, s_a: &SkeletonAttr, @@ -32,95 +33,89 @@ impl Animation for BeamAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); - let (movement1, movement2, movement3) = match stage_section { - Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0), - Some(StageSection::Cast) => (1.0, anim_time as f32, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32), - _ => (0.0, 0.0, 0.0), - }; + let speed = Vec2::::from(velocity).magnitude(); + + let lab = 0.65 * s_a.tempo; + let speednorm = (speed / 12.0).powf(0.4); + let foothoril = (acc_vel * lab as f32 + PI * 1.45).sin() * speednorm; + let foothorir = (acc_vel * lab as f32 + PI * (0.45)).sin() * speednorm; + let footrotl = + (((1.0) / (0.5 + (0.5) * ((acc_vel * lab as f32 + PI * 1.4).sin()).powi(2))).sqrt()) + * ((acc_vel * lab as f32 + PI * 1.4).sin()) + * speednorm; + + let footrotr = + (((1.0) / (0.5 + (0.5) * ((acc_vel * lab as f32 + PI * 0.4).sin()).powi(2))).sqrt()) + * ((acc_vel * lab as f32 + PI * 0.4).sin()) + * speednorm; + + next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1); + next.jaw.orientation = Quaternion::rotation_x(0.0); - next.hand_l.position = Vec3::new(s_a.sthl.0, s_a.sthl.1, s_a.sthl.2); - next.hand_l.orientation = - Quaternion::rotation_x(s_a.sthl.3) * Quaternion::rotation_y(s_a.sthl.4); - next.hand_r.position = Vec3::new(s_a.sthr.0, s_a.sthr.1, s_a.sthl.2); - next.hand_r.orientation = - Quaternion::rotation_x(s_a.sthr.3) * Quaternion::rotation_y(s_a.sthr.4); next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); - next.control.position = Vec3::new(-4.0, 7.0, 4.0); - next.control.orientation = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.15) - * Quaternion::rotation_z(0.0); + next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip); + next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip); + next.hand_l.orientation = Quaternion::rotation_x(0.0); + next.hand_r.orientation = Quaternion::rotation_x(0.0); match active_tool_kind { - Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { - next.control.position = Vec3::new( - s_a.stc.0 + (movement1 * 26.0) * (1.0 - movement3), - s_a.stc.1 + (movement1 + (movement2 * 8.0).sin() * 2.0) * (1.0 - movement3), - s_a.stc.2 + (movement1 * 16.0) * (1.0 - movement3), - ); - next.control.orientation = - Quaternion::rotation_x(s_a.stc.3 + (movement1 * -0.8) * (1.0 - movement3)) - * Quaternion::rotation_y( - s_a.stc.4 - + (movement1 * -1.4 + (movement2 * 16.0).sin() * 0.07) - * (1.0 - movement3), - ) - * Quaternion::rotation_z( - (movement1 * -1.7 + (movement2 * 8.0 + PI / 4.0).sin() * 0.3) - * (1.0 - movement3), - ); - next.head.orientation = Quaternion::rotation_x(0.0); - - next.hand_l.position = Vec3::new( - 0.0 + (movement1 * -1.0 + (movement2 * 8.0).sin() * 3.5) * (1.0 - movement3), - 0.0 + (movement1 * -8.0 - + (movement2 * 8.0).sin() * -2.0 - + (movement2 * 16.0).sin() * -1.5) - * (1.0 - movement3), - 0.0 + (movement1 * 19.0 + (movement2 * 8.0 + PI / 2.0).sin() * 3.5) - * (1.0 - movement3), - ); - next.hand_l.orientation = - Quaternion::rotation_x(s_a.sthr.3 + (movement1 * -0.3) * (1.0 - movement3)) - * Quaternion::rotation_y( - (movement1 * -1.1 + (movement2 * 8.0 + PI / 2.0).sin() * -0.3) - * (1.0 - movement3), - ) - * Quaternion::rotation_z((movement1 * -2.8) * (1.0 - movement3)); - - next.shoulder_l.orientation = Quaternion::rotation_z(0.2) - * Quaternion::rotation_x( - (movement1 * 0.6 + (movement2 * 8.0 + PI / 2.0).sin() * -0.1) - * (1.0 - movement3), - ); - - next.shoulder_r.orientation = Quaternion::rotation_z(-0.2) - * Quaternion::rotation_x( - (movement1 * 1.1 + (movement2 * 8.0 + PI / 2.0).sin() * -0.1) - * (1.0 - movement3), - ); - - if velocity < 0.5 { - next.head.orientation = - Quaternion::rotation_z(movement1 * -0.5 + (movement2 * 16.0).sin() * 0.05); - - next.foot_l.position = - Vec3::new(-s_a.foot.0, s_a.foot.1 + movement1 * -3.0, s_a.foot.2); - next.foot_l.orientation = Quaternion::rotation_x(movement1 * -0.5) - * Quaternion::rotation_z(movement1 * 0.5); - - next.foot_r.position = - Vec3::new(s_a.foot.0, s_a.foot.1 + movement1 * 4.0, s_a.foot.2); - next.foot_r.orientation = Quaternion::rotation_z(movement1 * 0.5); - next.upper_torso.orientation = - Quaternion::rotation_x(movement1 * -0.2 + (movement2 * 8.0).sin() * 0.01) - * Quaternion::rotation_z(movement1 * 0.1); - next.lower_torso.orientation = Quaternion::rotation_x(movement1 * 0.05) - * Quaternion::rotation_z(movement1 * -0.2); - } else { + Some(ToolKind::StaffSimple) | Some(ToolKind::Sceptre) => { + let (move1base, move2shake, _move2base, move3) = match stage_section { + Some(StageSection::Buildup) => ( + ((anim_time as f32).powf(0.25)).min(1.0), + (anim_time as f32 * 10.0 + PI).sin(), + (anim_time as f32 * 10.0 + PI).sin(), + 0.0, + ), + Some(StageSection::Cast) => ( + 1.0, + (anim_time as f32 * 10.0 + PI).sin(), + (anim_time as f32).powf(0.25), + 0.0, + ), + Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time as f32), + _ => (0.0, 0.0, 0.0, 0.0), }; + let pullback = 1.0 - move3; + let move1 = move1base * pullback; + next.control_l.position = Vec3::new(-1.0, 3.0, 12.0); + next.control_r.position = + Vec3::new(1.0 + move1 * 5.0, 2.0 + move1 * 1.0, 2.0 + move1 * 8.0); + + next.control.position = Vec3::new( + -3.0 + move1 * 5.0, + 3.0 + s_a.grip / 1.2 + move1 * 5.0 + move2shake * 1.0, + -11.0 + -s_a.grip / 2.0 + move1 * -4.0, + ); + next.head.orientation = Quaternion::rotation_x(move1 * -0.2); + next.jaw.orientation = Quaternion::rotation_x(0.0); + + next.control_l.orientation = + Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.5); + next.control_r.orientation = Quaternion::rotation_x(PI / 2.5 + move1 * 0.4) + * Quaternion::rotation_y(0.5) + * Quaternion::rotation_z(move1 * 1.2 + move2shake * 0.5); + + next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * -0.2) + * Quaternion::rotation_y(-0.1 + move1 * -0.4); + next.shoulder_l.position = Vec3::new( + -s_a.shoulder.0, + s_a.shoulder.1, + s_a.shoulder.2 - foothorir * 1.0, + ); + next.shoulder_l.orientation = + Quaternion::rotation_x(move1 * 0.2 + 0.3 + 0.8 * speednorm + (footrotr * -0.2)); + next.shoulder_r.position = Vec3::new( + s_a.shoulder.0, + s_a.shoulder.1, + s_a.shoulder.2 - foothoril * 1.0, + ); + next.shoulder_r.orientation = + Quaternion::rotation_x(move1 * 0.2 + 0.3 + 0.6 * speednorm + (footrotl * -0.2)); + next.torso.orientation = Quaternion::rotation_x(move1 * -0.1); + next.torso.position = Vec3::new(0.0, 0.0, move1 * 1.0); }, _ => {}, } diff --git a/voxygen/anim/src/biped_large/beta.rs b/voxygen/anim/src/biped_large/beta.rs index aa5664d150..a517b7559b 100644 --- a/voxygen/anim/src/biped_large/beta.rs +++ b/voxygen/anim/src/biped_large/beta.rs @@ -50,7 +50,7 @@ impl Animation for BetaAnimation { let (move1base, move2base, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)), + Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(6)), _ => (0.0, 0.0, 0.0), }; let pullback = 1.0 - move3; @@ -135,6 +135,31 @@ impl Animation for BetaAnimation { * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0) * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8); }, + Some(ToolKind::AxeSimple) => { + next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); + next.control_r.position = Vec3::new(1.0, 2.0, -2.0); + + next.control.position = Vec3::new( + 4.0 + move1 * -18.0 + move2 * 20.0, + (s_a.grip / 1.0) + move1 * -3.0 + move2 * 12.0, + (-s_a.grip / 0.8) + move1 * -2.0 + move2 * 4.0, + ); + next.head.orientation = Quaternion::rotation_x(move1 * -0.25) + * Quaternion::rotation_z(move1 * -0.9 + move2 * 0.6); + next.upper_torso.orientation = Quaternion::rotation_z(move1 * 1.2 + move2 * -1.0); + next.lower_torso.orientation = Quaternion::rotation_z(move1 * -1.2 + move2 * 1.0); + + next.control_l.orientation = + Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0); + next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + + next.control.orientation = + Quaternion::rotation_x(-1.0 + move1 * 0.0 + move2 * -0.8) + * Quaternion::rotation_y(-1.8 + move1 * 3.0 + move2 * -0.9) + * Quaternion::rotation_z(move1 * -0.2 + move2 * -1.5); + }, Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => { next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); diff --git a/voxygen/anim/src/biped_large/dash.rs b/voxygen/anim/src/biped_large/dash.rs index 99e609ccfe..7c7ba9b28c 100644 --- a/voxygen/anim/src/biped_large/dash.rs +++ b/voxygen/anim/src/biped_large/dash.rs @@ -25,7 +25,7 @@ impl Animation for DashAnimation { #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update_skeleton_inner( skeleton: &Self::Skeleton, - (_active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency, + (active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency, anim_time: f64, rate: &mut f32, s_a: &SkeletonAttr, @@ -57,7 +57,7 @@ impl Animation for DashAnimation { let (move1base, move2base, move3base, move4) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0, 0.0), Some(StageSection::Charge) => (1.0, ((anim_time as f32).powf(4.0)).min(1.0), 0.0, 0.0), - Some(StageSection::Swing) => (1.0, 1.0, anim_time as f32, 0.0), + Some(StageSection::Swing) => (1.0, 1.0, (anim_time as f32).powf(4.0), 0.0), Some(StageSection::Recover) => (1.1, 1.0, 1.0, (anim_time as f32).powf(4.0)), _ => (0.0, 0.0, 0.0, 0.0), }; @@ -82,30 +82,64 @@ impl Animation for DashAnimation { next.shoulder_r.orientation = Quaternion::rotation_x(0.6 * speednorm + (footrotl * -0.2) * speednorm); next.torso.orientation = Quaternion::rotation_z(0.0); + match active_tool_kind { + Some(ToolKind::SwordSimple) => { + next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); + next.control_r.position = Vec3::new(0.0, 2.0, -3.0); + next.head.orientation = Quaternion::rotation_x(move1 * -0.25) + * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6); + next.control.position = Vec3::new( + -3.0 + move1 * -2.0 + move2 * 2.0, + 5.0 + s_a.grip / 1.2 + move1 * -4.0 + move2 * 2.0 + move3 * 8.0, + -4.0 + -s_a.grip / 2.0 + move2 * -5.0 + move3 * 5.0, + ); + next.upper_torso.orientation = Quaternion::rotation_x(move2 * -0.2 + move3 * 0.2) + * Quaternion::rotation_z(move1 * 0.8 + move3 * -0.7); + next.lower_torso.orientation = Quaternion::rotation_x(move2 * 0.2 + move3 * -0.2) + * Quaternion::rotation_z(move1 * -0.8 + move3 * 0.7); + next.control_l.orientation = + Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5) + * Quaternion::rotation_y(-0.2); + next.control_r.orientation = + Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5) + * Quaternion::rotation_y(0.2) + * Quaternion::rotation_z(0.0); - next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); - next.control_r.position = Vec3::new(0.0, 2.0, -3.0); - next.head.orientation = Quaternion::rotation_x(move1 * -0.25) - * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6); - next.control.position = Vec3::new( - -3.0 + move1 * -2.0 + move2 * 2.0, - 5.0 + s_a.grip / 1.2 + move1 * -4.0 + move2 * 2.0 + move3 * 8.0, - -4.0 + -s_a.grip / 2.0 + move2 * -5.0 + move3 * 5.0, - ); - next.upper_torso.orientation = Quaternion::rotation_x(move2 * -0.2 + move3 * 0.2) - * Quaternion::rotation_z(move1 * 0.8 + move3 * -0.7); - next.lower_torso.orientation = Quaternion::rotation_x(move2 * 0.2 + move3 * -0.2) - * Quaternion::rotation_z(move1 * -0.8 + move3 * 0.7); - next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5) - * Quaternion::rotation_y(-0.2); - next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5) - * Quaternion::rotation_y(0.2) - * Quaternion::rotation_z(0.0); + next.control.orientation = + Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5 + move3 * -0.2) + * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.5 + move3 * -1.0) + * Quaternion::rotation_z(-move3 * -1.5); + }, + Some(ToolKind::AxeSimple) => { + next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move3 * -10.0); + next.control_r.position = Vec3::new(1.0, 2.0, -2.0); - next.control.orientation = - Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5 + move3 * -0.2) - * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.5 + move3 * -1.0) - * Quaternion::rotation_z(-move3 * -1.5); + next.control.position = Vec3::new( + 4.0 + move1 * -3.0 + move3 * -8.0, + (s_a.grip / 1.0) + move1 * -1.0 + move3 * 12.0, + (-s_a.grip / 0.8) + move1 * 2.0 + move3 * -6.0, + ); + next.head.orientation = Quaternion::rotation_x(move1 * -0.5 + move3 * 0.5) + * Quaternion::rotation_z(move1 * 0.3 + move3 * 0.3); + next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.4 + move3 * 0.9) + * Quaternion::rotation_z(move1 * 0.6 + move3 * -1.5); + next.lower_torso.orientation = Quaternion::rotation_y(move1 * -0.2 + move3 * -0.1) + * Quaternion::rotation_x(move1 * 0.4 + move3 * -0.7) + * Quaternion::rotation_z(move1 * -0.6 + move3 * 1.6); + + next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move3 * 0.8) + * Quaternion::rotation_y(move1 * 0.7); + next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move3 * 0.8) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + + next.control.orientation = + Quaternion::rotation_x(-1.0 + move1 * -0.2 + move3 * -1.1) + * Quaternion::rotation_y(-1.8 + move1 * -0.2 + move3 * 1.5) + * Quaternion::rotation_z(move1 * -0.8 + move3 * -1.5); + }, + _ => {}, + } next } diff --git a/voxygen/anim/src/biped_large/idle.rs b/voxygen/anim/src/biped_large/idle.rs index 773e368dc1..ab32350116 100644 --- a/voxygen/anim/src/biped_large/idle.rs +++ b/voxygen/anim/src/biped_large/idle.rs @@ -103,7 +103,7 @@ impl Animation for IdleAnimation { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::HammerSimple) => { + Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, diff --git a/voxygen/anim/src/biped_large/jump.rs b/voxygen/anim/src/biped_large/jump.rs index 20021b1f3f..023db4fe62 100644 --- a/voxygen/anim/src/biped_large/jump.rs +++ b/voxygen/anim/src/biped_large/jump.rs @@ -72,7 +72,7 @@ impl Animation for JumpAnimation { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::HammerSimple) => { + Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, diff --git a/voxygen/anim/src/biped_large/mod.rs b/voxygen/anim/src/biped_large/mod.rs index dcb42983e7..250479dfcd 100644 --- a/voxygen/anim/src/biped_large/mod.rs +++ b/voxygen/anim/src/biped_large/mod.rs @@ -193,7 +193,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { use comp::biped_large::{BodyType::*, Species::*}; Self { head: match (body.species, body.body_type) { - (Ogre, Male) => (3.0, 9.0), + (Ogre, Male) => (5.0, 6.0), (Ogre, Female) => (1.0, 7.5), (Cyclops, _) => (4.5, 7.5), (Wendigo, _) => (3.0, 7.5), diff --git a/voxygen/anim/src/biped_large/run.rs b/voxygen/anim/src/biped_large/run.rs index 0938d31557..931258474c 100644 --- a/voxygen/anim/src/biped_large/run.rs +++ b/voxygen/anim/src/biped_large/run.rs @@ -309,7 +309,7 @@ impl Animation for RunAnimation { next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::HammerSimple) => { + Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); @@ -327,7 +327,7 @@ impl Animation for RunAnimation { s_a.shoulder.2 - foothorir * 1.5, ); next.shoulder_l.orientation = - Quaternion::rotation_x(0.6 * speednorm + (footrotr * -0.8) * speednorm) + Quaternion::rotation_x(0.6 * speednormlow + (footrotr * -0.8) * speednorm) * Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0); @@ -337,7 +337,7 @@ impl Animation for RunAnimation { s_a.shoulder.2 - foothoril * 1.5, ); next.shoulder_r.orientation = - Quaternion::rotation_x(0.6 * speednorm + (footrotl * -0.8) * speednorm) + Quaternion::rotation_x(0.6 * speednormlow + (footrotl * -0.8) * speednorm) * Quaternion::rotation_y(0.0); next.hand_l.position = Vec3::new( diff --git a/voxygen/anim/src/biped_large/shoot.rs b/voxygen/anim/src/biped_large/shoot.rs index 511dcadc2a..a4b5c94976 100644 --- a/voxygen/anim/src/biped_large/shoot.rs +++ b/voxygen/anim/src/biped_large/shoot.rs @@ -55,11 +55,13 @@ impl Animation for ShootAnimation { let foothorir = (acc_vel * lab as f32 + PI * (0.45)).sin() * speednorm; let footrotl = (((1.0) / (0.5 + (0.5) * ((acc_vel * lab as f32 + PI * 1.4).sin()).powi(2))).sqrt()) - * ((acc_vel * lab as f32 + PI * 1.4).sin()); + * ((acc_vel * lab as f32 + PI * 1.4).sin()) + * speednorm; let footrotr = (((1.0) / (0.5 + (0.5) * ((acc_vel * lab as f32 + PI * 0.4).sin()).powi(2))).sqrt()) - * ((acc_vel * lab as f32 + PI * 0.4).sin()); + * ((acc_vel * lab as f32 + PI * 0.4).sin()) + * speednorm; next.shoulder_l.position = Vec3::new( -s_a.shoulder.0, @@ -139,9 +141,8 @@ impl Animation for ShootAnimation { s_a.shoulder.1, s_a.shoulder.2 - foothoril * 1.0, ); - next.shoulder_r.orientation = Quaternion::rotation_x( - move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm, - ); + next.shoulder_r.orientation = + Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2)); }, Some(ToolKind::BowSimple) => { let (move1base, move2base, move3) = match stage_section { @@ -177,18 +178,16 @@ impl Animation for ShootAnimation { s_a.shoulder.1, s_a.shoulder.2 - foothorir * 1.0, ); - next.shoulder_l.orientation = Quaternion::rotation_x( - move1 * 0.8 + 1.2 * speednorm + (footrotr * -0.2) * speednorm, - ); + next.shoulder_l.orientation = + Quaternion::rotation_x(move1 * 0.8 + 1.2 * speednorm + (footrotr * -0.2)); next.shoulder_r.position = Vec3::new( s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2 - foothoril * 1.0, ); - next.shoulder_r.orientation = Quaternion::rotation_x( - move1 * 0.8 + 1.2 * speednorm + (footrotl * -0.2) * speednorm, - ); + next.shoulder_r.orientation = + Quaternion::rotation_x(move1 * 0.8 + 1.2 * speednorm + (footrotl * -0.2)); }, Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => { let (move1base, _move2base, move3) = match stage_section { diff --git a/voxygen/anim/src/biped_large/wield.rs b/voxygen/anim/src/biped_large/wield.rs index 8a4ddc0f3f..b7bf517c64 100644 --- a/voxygen/anim/src/biped_large/wield.rs +++ b/voxygen/anim/src/biped_large/wield.rs @@ -196,7 +196,7 @@ impl Animation for WieldAnimation { * Quaternion::rotation_y(1.0) * Quaternion::rotation_z(-0.3); }, - Some(ToolKind::HammerSimple) => { + Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index 3e7ab18a17..fe776d6c1d 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -42,7 +42,7 @@ impl Animation for AlphaAnimation { next.torso.position = Vec3::new(0.0, 0.0, 0.1) * s_a.scaler; next.torso.orientation = Quaternion::rotation_z(0.0); match active_tool_kind { - Some(ToolKind::Sword) => { + Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); @@ -116,7 +116,7 @@ impl Animation for AlphaAnimation { next.head.orientation = Quaternion::rotation_z(0.0 + move1 * -1.5 + move2 * 2.5 + move3 * -1.0); }, - Some(ToolKind::Hammer) => { + Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) => { let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), diff --git a/voxygen/anim/src/character/wield.rs b/voxygen/anim/src/character/wield.rs index 733ea18dd8..5082ab4866 100644 --- a/voxygen/anim/src/character/wield.rs +++ b/voxygen/anim/src/character/wield.rs @@ -143,7 +143,7 @@ impl Animation for WieldAnimation { next.shorts.position = Vec3::new(0.0, s_a.shorts.0, s_a.shorts.1); } match active_tool_kind { - Some(ToolKind::Sword) => { + Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); diff --git a/voxygen/anim/src/golem/mod.rs b/voxygen/anim/src/golem/mod.rs index 93703771ad..919cda89cf 100644 --- a/voxygen/anim/src/golem/mod.rs +++ b/voxygen/anim/src/golem/mod.rs @@ -120,42 +120,52 @@ impl<'a> From<&'a Body> for SkeletonAttr { head: match (body.species, body.body_type) { (StoneGolem, _) => (0.0, 2.0), (Treant, _) => (18.0, -8.0), + (ClayGolem, _) => (2.0, 9.0), }, jaw: match (body.species, body.body_type) { (StoneGolem, _) => (0.0, 0.0), (Treant, _) => (-6.5, -1.0), + (ClayGolem, _) => (0.0, 0.0), }, upper_torso: match (body.species, body.body_type) { (StoneGolem, _) => (0.0, 34.5), (Treant, _) => (0.0, 28.5), + (ClayGolem, _) => (0.0, 26.5), }, lower_torso: match (body.species, body.body_type) { (StoneGolem, _) => (0.0, -10.5), (Treant, _) => (0.0, -10.5), + (ClayGolem, _) => (0.0, -4.5), }, shoulder: match (body.species, body.body_type) { (StoneGolem, _) => (8.0, -1.5, 4.0), (Treant, _) => (8.0, 4.5, -3.0), + (ClayGolem, _) => (8.0, 4.5, 3.0), }, hand: match (body.species, body.body_type) { (StoneGolem, _) => (12.5, -1.0, -7.0), (Treant, _) => (8.5, -1.0, -7.0), + (ClayGolem, _) => (8.5, -1.0, -7.0), }, leg: match (body.species, body.body_type) { (StoneGolem, _) => (4.0, 0.0, -3.5), (Treant, _) => (2.0, 9.5, -1.0), + (ClayGolem, _) => (1.0, 0.5, -6.0), }, foot: match (body.species, body.body_type) { (StoneGolem, _) => (3.5, 0.5, -9.5), (Treant, _) => (3.5, -5.0, -8.5), + (ClayGolem, _) => (3.5, -1.0, -8.5), }, scaler: match (body.species, body.body_type) { (StoneGolem, _) => 1.8, (Treant, _) => 1.8, + (ClayGolem, _) => 1.8, }, tempo: match (body.species, body.body_type) { (StoneGolem, _) => 1.0, (Treant, _) => 1.0, + (ClayGolem, _) => 1.0, }, } } diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 8f3981e3a5..0056771305 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -157,6 +157,7 @@ fn tool_desc(tool: &Tool, components: &[Item], msm: &MaterialStatManifest, desc: ToolKind::HammerSimple => "HammerSimple", ToolKind::SwordSimple => "SwordSimple", ToolKind::StaffSimple => "StaffSimple", + ToolKind::AxeSimple => "AxeSimple", ToolKind::BowSimple => "BowSimple", ToolKind::Unique(_) => "Unique", ToolKind::Debug => "Debug", diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index fcdbd9fdb8..99304d69ad 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -3653,8 +3653,9 @@ impl FigureMgr { active_tool_kind, second_tool_kind, time, - vel.0.magnitude(), + vel.0, Some(s.stage_section), + state.acc_vel, ), stage_progress, &mut state_animation_rate, diff --git a/world/src/site/dungeon/mod.rs b/world/src/site/dungeon/mod.rs index bccec64ed9..cd9ef17fca 100644 --- a/world/src/site/dungeon/mod.rs +++ b/world/src/site/dungeon/mod.rs @@ -942,10 +942,10 @@ impl Floor { .with_body(comp::Body::Golem( comp::golem::Body::random_with( dynamic_rng, - &comp::golem::Species::StoneGolem, + &comp::golem::Species::ClayGolem, ), )) - .with_name("Stonework Defender".to_string()) + .with_name("Clay Golem".to_string()) .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), ], 4 => vec![