diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 93c63291a6..4a0942dab3 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -777,9 +777,11 @@ secondary: Simple(None, "common.abilities.adlet.tracker.trap"), abilities: [], ), - // Custom("Adlet Alpha"): ( - // primary: Simple(None, "common.abilities.adlet.alpha"), - // secondary: Simple(None, "common.abilities.adlet.alpha"), - // abilities: [], - // ), + Custom("Adlet Elder"): ( + primary: Simple(None, "common.abilities.adlet.elder.triplestrike"), + secondary: Simple(None, "common.abilities.adlet.elder.dash"), + abilities: [ + Simple(None, "common.abilities.adlet.elder.trap") + ], + ), }) diff --git a/assets/common/abilities/adlet/elder/dash.ron b/assets/common/abilities/adlet/elder/dash.ron new file mode 100644 index 0000000000..1134111589 --- /dev/null +++ b/assets/common/abilities/adlet/elder/dash.ron @@ -0,0 +1,27 @@ +DashMelee( + energy_cost: 10.0, + melee_constructor: ( + kind: Stab( + damage: 9.0, + poise: 40.0, + knockback: 8.0, + energy_regen: 0.0, + ), + scaled: Some(Stab( + damage: 16.0, + poise: 0.0, + knockback: 7.0, + energy_regen: 0.0, + )), + range: 5.0, + angle: 45.0, + ), + energy_drain: 0, + forward_speed: 4.0, + buildup_duration: 0.6, + charge_duration: 1.2, + swing_duration: 0.1, + recover_duration: 0.9, + ori_modifier: 0.3, + charge_through: false, +) diff --git a/assets/common/abilities/adlet/elder/trap.ron b/assets/common/abilities/adlet/elder/trap.ron new file mode 100644 index 0000000000..333c7c6aa5 --- /dev/null +++ b/assets/common/abilities/adlet/elder/trap.ron @@ -0,0 +1,16 @@ +BasicRanged( + energy_cost: 0, + buildup_duration: 0.75, + recover_duration: 0.75, + projectile: Trap( + damage: 25, + knockback: 4, + energy_regen: 0, + ), + projectile_body: Object(AdletTrap), + projectile_light: None, + projectile_speed: 20.0, + num_projectiles: 6, + projectile_spread: 0.3, + move_efficiency: 0.8, +) \ No newline at end of file diff --git a/assets/common/abilities/adlet/elder/triplestrike.ron b/assets/common/abilities/adlet/elder/triplestrike.ron new file mode 100644 index 0000000000..3874146167 --- /dev/null +++ b/assets/common/abilities/adlet/elder/triplestrike.ron @@ -0,0 +1,63 @@ +ComboMelee2( + strikes: [ + ( + melee_constructor: ( + kind: Bash( + damage: 10, + poise: 15, + knockback: 5.0, + energy_regen: 0, + ), + range: 2.5, + angle: 30.0, + ), + buildup_duration: 0.9, + swing_duration: 0.07, + hit_timing: 0.5, + recover_duration: 0.4, + movement: ( + swing: Some(Forward(1.0)), + ), + ori_modifier: 0.7, + ), + ( + melee_constructor: ( + kind: Slash( + damage: 10, + poise: 18, + knockback: 5, + energy_regen: 0, + ), + range: 2.5, + angle: 30.0, + ), + buildup_duration: 0.8, + swing_duration: 0.07, + hit_timing: 0.5, + recover_duration: 0.4, + ori_modifier: 0.7, + ), + ( + melee_constructor: ( + kind: Bash( + damage: 10, + poise: 20, + knockback: 5, + energy_regen: 0, + ), + range: 2.5, + angle: 30.0, + ), + buildup_duration: 0.8, + swing_duration: 0.07, + hit_timing: 0.5, + recover_duration: 0.4, + movement: ( + swing: Some(Forward(1.0)), + ), + ori_modifier: 0.7, + ), + ], + energy_cost_per_strike: 0, + auto_progress: true, +) \ No newline at end of file diff --git a/assets/common/entity/dungeon/adlet/elder.ron b/assets/common/entity/dungeon/adlet/elder.ron new file mode 100644 index 0000000000..17824fa31e --- /dev/null +++ b/assets/common/entity/dungeon/adlet/elder.ron @@ -0,0 +1,11 @@ +#![enable(implicit_some)] +( + name: Automatic, + body: RandomWith("adlet_elder"), + alignment: Alignment(Enemy), + loot: LootTable("common.loot_tables.creature.biped_large.default"), + inventory: ( + loadout: FromBody, + ), + meta: [], +) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/sword/adlet_elder_sword.ron b/assets/common/items/npc_weapons/sword/adlet_elder_sword.ron new file mode 100644 index 0000000000..5828d6e723 --- /dev/null +++ b/assets/common/items/npc_weapons/sword/adlet_elder_sword.ron @@ -0,0 +1,21 @@ +ItemDef( + name: "Adlet Elder Sword", + description: "Placeholder", + kind: Tool(( + kind: Sword, + hands: One, + stats: ( + equip_time_secs: 0.5, + power: 1.5, + effect_power: 1.0, + speed: 0.75, + crit_chance: 0.0625, + range: 1.0, + energy_efficiency: 1.0, + buff_strength: 1.0, + ), + )), + quality: Low, + tags: [], + ability_spec: Some(Custom("Adlet Elder")), +) \ No newline at end of file diff --git a/assets/common/npc_names.ron b/assets/common/npc_names.ron index 793c879fa7..8723d82d26 100644 --- a/assets/common/npc_names.ron +++ b/assets/common/npc_names.ron @@ -965,6 +965,10 @@ gigas_frost: ( keyword: "gigas_frost", generic: "Frost Gigas" + ), + adlet_elder: ( + keyword: "adlet_elder", + generic: "Adlet Elder" ) ) ), diff --git a/assets/voxygen/voxel/biped_large_central_manifest.ron b/assets/voxygen/voxel/biped_large_central_manifest.ron index a1a32c1529..90ba359938 100644 --- a/assets/voxygen/voxel/biped_large_central_manifest.ron +++ b/assets/voxygen/voxel/biped_large_central_manifest.ron @@ -1196,4 +1196,56 @@ central: ("armor.empty"), ) ), + (AdletElder, Male): ( + head: ( + offset: (-9.0, 0.0, -8.0), + central: ("npc.adlet.elder.male.head"), + ), + torso_upper: ( + offset: (-7.0, -7.0, -6.5), + central: ("npc.adlet.elder.male.torso_upper"), + ), + torso_lower: ( + offset: (-6.0, -6.0, -5.0), + central: ("npc.adlet.elder.male.torso_lower"), + ), + jaw: ( + offset: (-5.0, 0.0, -3.5), + central: ("npc.adlet.elder.male.jaw"), + ), + tail: ( + offset: (-2.0, -17.0, -1.0), + central: ("npc.adlet.elder.male.tail"), + ), + second: ( + offset: (0.0, 0.0, 0.0), + central: ("armor.empty"), + ) + ), + (AdletElder, Female): ( + head: ( + offset: (-9.0, 0.0, -8.0), + central: ("npc.adlet.elder.male.head"), + ), + torso_upper: ( + offset: (-7.0, -7.0, -6.5), + central: ("npc.adlet.elder.male.torso_upper"), + ), + torso_lower: ( + offset: (-6.0, -6.0, -5.0), + central: ("npc.adlet.elder.male.torso_lower"), + ), + jaw: ( + offset: (-5.0, 0.0, -3.5), + central: ("npc.adlet.elder.male.jaw"), + ), + tail: ( + offset: (-2.0, -17.0, -1.0), + central: ("npc.adlet.elder.male.tail"), + ), + second: ( + offset: (0.0, 0.0, 0.0), + central: ("armor.empty"), + ) + ), }) diff --git a/assets/voxygen/voxel/biped_large_lateral_manifest.ron b/assets/voxygen/voxel/biped_large_lateral_manifest.ron index 89239a3ce3..151932ef03 100644 --- a/assets/voxygen/voxel/biped_large_lateral_manifest.ron +++ b/assets/voxygen/voxel/biped_large_lateral_manifest.ron @@ -1563,4 +1563,72 @@ lateral: ("npc.gigas_frost.male.foot_r"), ) ), + (AdletElder, Male): ( + shoulder_l: ( + offset: (-3.5, -5.0, -6.0), + lateral: ("npc.adlet.elder.male.shoulder_l"), + ), + shoulder_r: ( + offset: (-3.5, -5.0, -6.0), + lateral: ("npc.adlet.elder.male.shoulder_r"), + ), + hand_l: ( + offset: (-2.5, -2.5, -12.0), + lateral: ("npc.adlet.elder.male.hand_l"), + ), + hand_r: ( + offset: (-2.5, -2.5, -12.0), + lateral: ("npc.adlet.elder.male.hand_r"), + ), + leg_l: ( + offset: (-2.0, -1.5, -6.5), + lateral: ("npc.adlet.elder.male.leg_l"), + ), + leg_r: ( + offset: (-2.0, -1.5, -6.5), + lateral: ("npc.adlet.elder.male.leg_r"), + ), + foot_l: ( + offset: (-2.0, -5.0, -5.0), + lateral: ("npc.adlet.elder.male.foot_l"), + ), + foot_r: ( + offset: (-2.0, -5.0, -5.0), + lateral: ("npc.adlet.elder.male.foot_r"), + ), + ), + (AdletElder, Female): ( + shoulder_l: ( + offset: (-3.5, -5.0, -6.0), + lateral: ("npc.adlet.elder.male.shoulder_l"), + ), + shoulder_r: ( + offset: (-3.5, -5.0, -6.0), + lateral: ("npc.adlet.elder.male.shoulder_r"), + ), + hand_l: ( + offset: (-2.5, -2.5, -12.0), + lateral: ("npc.adlet.elder.male.hand_l"), + ), + hand_r: ( + offset: (-2.5, -2.5, -12.0), + lateral: ("npc.adlet.elder.male.hand_r"), + ), + leg_l: ( + offset: (-2.0, -1.5, -6.5), + lateral: ("npc.adlet.elder.male.leg_l"), + ), + leg_r: ( + offset: (-2.0, -1.5, -6.5), + lateral: ("npc.adlet.elder.male.leg_r"), + ), + foot_l: ( + offset: (-2.0, -5.0, -5.0), + lateral: ("npc.adlet.elder.male.foot_l"), + ), + foot_r: ( + offset: (-2.0, -5.0, -5.0), + lateral: ("npc.adlet.elder.male.foot_r"), + ), + ), }) \ No newline at end of file diff --git a/assets/voxygen/voxel/biped_weapon_manifest.ron b/assets/voxygen/voxel/biped_weapon_manifest.ron index f0b62fd118..f041bb9cf3 100644 --- a/assets/voxygen/voxel/biped_weapon_manifest.ron +++ b/assets/voxygen/voxel/biped_weapon_manifest.ron @@ -1610,6 +1610,10 @@ vox_spec: ("weapon.sword.long_2h_saurok", (-2.5, -4.0, -5.0)), color: None ), + Tool("common.items.npc_weapons.sword.adlet_elder_sword"): ( + vox_spec: ("weapon.sword.adlet_elder_sword", (-2.5, -5.0, -5.0)), + color: None + ), Tool("common.items.npc_weapons.bow.saurok_bow"): ( vox_spec: ("weapon.bow.longbow_saurok", (-2.5, -4.0, -16.5)), color: None diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/foot_l.vox b/assets/voxygen/voxel/npc/adlet/elder/male/foot_l.vox new file mode 100644 index 0000000000..a071ebe8b6 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/foot_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aaf97980257a834b38860033c0fbcf169ec84ebdbfc70824813b8decc24f58ae +size 1436 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/foot_r.vox b/assets/voxygen/voxel/npc/adlet/elder/male/foot_r.vox new file mode 100644 index 0000000000..e7bae8b15e --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/foot_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78d76756a1ecd676a83c20d802f89515555c038d76feb10f6ccbb7e8c48ef8c9 +size 1436 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/hand_l.vox b/assets/voxygen/voxel/npc/adlet/elder/male/hand_l.vox new file mode 100644 index 0000000000..4f492aef7d --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/hand_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36bbea359131910bbe5acd34718480b5f2d2d25c08286ad4e7f638dba38d399f +size 1820 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/hand_r.vox b/assets/voxygen/voxel/npc/adlet/elder/male/hand_r.vox new file mode 100644 index 0000000000..b5597c8358 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/hand_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b021031c0b9a8a73ebce85c43088cc35f6d53f817d4607db33ba2632427eeb00 +size 1820 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/head.vox b/assets/voxygen/voxel/npc/adlet/elder/male/head.vox new file mode 100644 index 0000000000..0ee0ee186e --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:155f244174a7326a97738dd20b328636c00c8686d8c560c15a9f9b7e4a4caa30 +size 7296 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/jaw.vox b/assets/voxygen/voxel/npc/adlet/elder/male/jaw.vox new file mode 100644 index 0000000000..de8eb3b4a1 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/jaw.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:386dacc42d342c45a52aced485412ce83bc14606f95491358b381e148dba31e5 +size 1904 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/leg_l.vox b/assets/voxygen/voxel/npc/adlet/elder/male/leg_l.vox new file mode 100644 index 0000000000..b8f3967b5d --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/leg_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66ea51edca61208b3944534887db1eeb67cbb2f2baaa2b07ca4d328e17527e6e +size 1480 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/leg_r.vox b/assets/voxygen/voxel/npc/adlet/elder/male/leg_r.vox new file mode 100644 index 0000000000..af90299b14 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/leg_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:365f190ea3fc126edce7d39ee3fd04b129298335375dcfebed4b3e7c49289257 +size 1480 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/shoulder_l.vox b/assets/voxygen/voxel/npc/adlet/elder/male/shoulder_l.vox new file mode 100644 index 0000000000..c34ea3f4a3 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/shoulder_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:073189557c23a57868cc6976df51c9e13c079b22753150a9f82a398490ad548a +size 1776 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/shoulder_r.vox b/assets/voxygen/voxel/npc/adlet/elder/male/shoulder_r.vox new file mode 100644 index 0000000000..75c58ed43a --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/shoulder_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b48b64e4a71b5e8dca82a4db902d320bd6ac48b36c2e6eebd71910e1faebf80 +size 1776 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/tail.vox b/assets/voxygen/voxel/npc/adlet/elder/male/tail.vox new file mode 100644 index 0000000000..5d91cea921 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/tail.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6640c086d4203a9f5b0c6939a21f12f98c7f0b36f042504644cf6ae1196f481 +size 1856 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/torso_lower.vox b/assets/voxygen/voxel/npc/adlet/elder/male/torso_lower.vox new file mode 100644 index 0000000000..8df0d62fd1 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/torso_lower.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4f4b1ec191aedc21cb56e860c5c5f0a643d7c8dce7070b060822d957db49e9e +size 2112 diff --git a/assets/voxygen/voxel/npc/adlet/elder/male/torso_upper.vox b/assets/voxygen/voxel/npc/adlet/elder/male/torso_upper.vox new file mode 100644 index 0000000000..55a0a36a37 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/elder/male/torso_upper.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1ab6c529db0fa6d69480e902287285f27ffd2bd944ba09693895bda872f01e5 +size 5224 diff --git a/assets/voxygen/voxel/weapon/sword/adlet_elder_sword.vox b/assets/voxygen/voxel/weapon/sword/adlet_elder_sword.vox new file mode 100644 index 0000000000..35acfc1b6e --- /dev/null +++ b/assets/voxygen/voxel/weapon/sword/adlet_elder_sword.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcb0d9578ae636ae0cd9b839a992f7eee9913a1e7d7e712b7d2fbfd57b32ed37 +size 1356 diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index 03209dbaeb..94ed10bd46 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -289,6 +289,7 @@ impl Body { biped_large::Species::Mountaintroll => 600.0, biped_large::Species::Swamptroll => 600.0, biped_large::Species::Gigasfrost => 400.0, + biped_large::Species::AdletElder => 350.0, _ => 400.0, }, Body::BipedSmall(_) => 50.0, @@ -429,6 +430,7 @@ impl Body { biped_large::Species::Huskbrute => Vec3::new(4.6, 3.0, 5.0), biped_large::Species::Tursus => Vec3::new(4.0, 3.0, 4.0), biped_large::Species::Gigasfrost => Vec3::new(6.0, 3.0, 8.0), + biped_large::Species::AdletElder => Vec3::new(3.5, 3.0, 5.0), _ => Vec3::new(4.6, 3.0, 6.0), }, Body::BipedSmall(body) => match body.species { @@ -801,6 +803,7 @@ impl Body { biped_large::Species::Cultistwarlord => 250, biped_large::Species::Cultistwarlock => 250, biped_large::Species::Gigasfrost => 20000, + biped_large::Species::AdletElder => 1500, _ => 120, }, Body::BipedSmall(biped_small) => match biped_small.species { diff --git a/common/src/comp/body/biped_large.rs b/common/src/comp/body/biped_large.rs index 8179dc7c1a..0cadddd284 100644 --- a/common/src/comp/body/biped_large.rs +++ b/common/src/comp/body/biped_large.rs @@ -73,6 +73,7 @@ make_case_elim!( Huskbrute = 20, Tursus = 21, Gigasfrost = 22, + AdletElder = 23, } ); @@ -104,6 +105,7 @@ pub struct AllSpecies { pub husk_brute: SpeciesMeta, pub tursus: SpeciesMeta, pub gigas_frost: SpeciesMeta, + pub adlet_elder: SpeciesMeta, } impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies { @@ -135,11 +137,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies Species::Huskbrute => &self.husk_brute, Species::Tursus => &self.tursus, Species::Gigasfrost => &self.gigas_frost, + Species::AdletElder => &self.adlet_elder, } } } -pub const ALL_SPECIES: [Species; 23] = [ +pub const ALL_SPECIES: [Species; 24] = [ Species::Ogre, Species::Cyclops, Species::Wendigo, @@ -163,6 +166,7 @@ pub const ALL_SPECIES: [Species; 23] = [ Species::Huskbrute, Species::Tursus, Species::Gigasfrost, + Species::AdletElder, ]; impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies { diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index 8e93d1059a..cb1f24eba3 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -739,6 +739,9 @@ fn default_main_tool(body: &Body) -> Item { (biped_large::Species::Gigasfrost, _) => Some(Item::new_from_asset_expect( "common.items.npc_weapons.axe.gigas_frost_axe", )), + (biped_large::Species::AdletElder, _) => Some(Item::new_from_asset_expect( + "common.items.npc_weapons.sword.adlet_elder_sword", + )), }, Body::Object(body) => match body { object::Body::Crossbow => Some(Item::new_from_asset_expect( diff --git a/voxygen/anim/src/biped_large/combomelee.rs b/voxygen/anim/src/biped_large/combomelee.rs new file mode 100644 index 0000000000..fa2ccab577 --- /dev/null +++ b/voxygen/anim/src/biped_large/combomelee.rs @@ -0,0 +1,125 @@ +use super::{ + super::{vek::*, Animation}, + BipedLargeSkeleton, SkeletonAttr, +}; +use common::states::utils::{AbilityInfo, StageSection}; +use core::f32::consts::PI; + +pub struct ComboAnimation; +impl Animation for ComboAnimation { + type Dependency<'a> = ( + Option<&'a str>, + Option, + Option, + usize, + Vec2, + ); + type Skeleton = BipedLargeSkeleton; + + #[cfg(feature = "use-dyn-lib")] + const UPDATE_FN: &'static [u8] = b"biped_large_combo\0"; + + #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_combo")] + fn update_skeleton_inner( + skeleton: &Self::Skeleton, + (ability_id, stage_section, _ability_info, current_strike, _move_dir): Self::Dependency<'_>, + anim_time: f32, + rate: &mut f32, + _s_a: &SkeletonAttr, + ) -> Self::Skeleton { + *rate = 1.0; + let mut next = (*skeleton).clone(); + + 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); + let multi_strike_pullback = 1.0 + - if matches!(stage_section, Some(StageSection::Recover)) { + anim_time.powi(4) + } else { + 0.0 + }; + + for strike in 0..=current_strike { + match ability_id { + Some("common.abilities.adlet.elder.triplestrike") => { + let (move1, move2) = if strike == current_strike { + match stage_section { + Some(StageSection::Buildup) => { + (((anim_time.max(0.4) - 0.4) * 1.5).powf(0.5), 0.0) + }, + Some(StageSection::Action) => (1.0, (anim_time.min(0.4) * 2.5).powi(2)), + Some(StageSection::Recover) => (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; + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.second.scale = Vec3::one() * 1.0; + next.main.orientation = + Quaternion::rotation_x(PI / -3.0) * Quaternion::rotation_z(PI / -4.0); + next.second.orientation = + Quaternion::rotation_x(PI / -3.0) * Quaternion::rotation_z(PI / 4.0); + next.control_l.position = Vec3::new(7.5, -12.0, 5.0); + next.control_r.position = Vec3::new(-8.0, -12.0, 8.0); + next.control_l.orientation = Quaternion::rotation_x(PI / 4.0); + next.control_r.orientation = Quaternion::rotation_x(PI / 4.0); + next.head.orientation = Quaternion::rotation_x(move1 * -0.2 + move2 * 0.4); + match strike { + 0 => { + next.weapon_l.position = Vec3::new( + -10.0 + move1 * -12.0 + move2 * 14.0, + 15.0 + move1 * -6.0 + move2 * 6.0, + -9.0 + move1 * 4.0 + move2 * -2.0, + ); + next.weapon_r.position = Vec3::new( + 10.0 + move1 * 12.0 + move2 * -14.0, + 15.0 + move1 * -6.0 + move2 * 6.0, + -9.0 + move1 * 4.0 + move2 * -2.0, + ); + next.weapon_l.orientation = Quaternion::rotation_x(move2 * 0.5) + * Quaternion::rotation_z(move1 * 1.5 + move2 * -2.0); + next.weapon_r.orientation = Quaternion::rotation_x(move2 * 0.5) + * Quaternion::rotation_z(move1 * -1.5 + move2 * 2.0); + next.shoulder_l.orientation = Quaternion::rotation_x(0.8) + * Quaternion::rotation_y(move1 * 0.9 + move2 * -0.7); + next.shoulder_r.orientation = Quaternion::rotation_x(0.8) + * Quaternion::rotation_y(move1 * -0.9 + move2 * 0.7); + }, + 1 => { + next.weapon_r.position = Vec3::new( + 10.0 + move1 * 12.0 + move2 * -14.0, + 15.0 + move1 * -6.0 + move2 * 6.0, + -9.0 + move1 * 4.0 + move2 * -2.0, + ); + next.weapon_r.orientation = Quaternion::rotation_x(move2 * 0.5) + * Quaternion::rotation_z(move1 * -1.5 + move2 * 2.0); + next.shoulder_l.orientation = Quaternion::rotation_x(0.8); + next.shoulder_r.orientation = Quaternion::rotation_x(0.8) + * Quaternion::rotation_y(move1 * -0.9 + move2 * 0.7); + }, + 2 => { + next.weapon_l.position = Vec3::new( + -10.0 + move1 * -12.0 + move2 * 14.0, + 15.0 + move1 * -6.0 + move2 * 6.0, + -9.0 + move1 * 4.0 + move2 * -2.0, + ); + next.weapon_l.orientation = Quaternion::rotation_x(move2 * 0.5) + * Quaternion::rotation_z(move1 * 1.5 + move2 * -2.0); + next.shoulder_l.orientation = Quaternion::rotation_x(0.8) + * Quaternion::rotation_y(move1 * 0.9 + move2 * -0.7); + next.shoulder_r.orientation = Quaternion::rotation_x(0.8); + }, + _ => {}, + } + }, + _ => {}, + } + } + next + } +} diff --git a/voxygen/anim/src/biped_large/dash.rs b/voxygen/anim/src/biped_large/dash.rs index 167b0dcace..d441cd071a 100644 --- a/voxygen/anim/src/biped_large/dash.rs +++ b/voxygen/anim/src/biped_large/dash.rs @@ -99,32 +99,64 @@ impl Animation for DashAnimation { Quaternion::rotation_x(0.6 * speednorm + (footrotl * -0.2) * speednorm); next.torso.orientation = Quaternion::rotation_z(0.0); match active_tool_kind { - Some(ToolKind::Sword) => { - 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.0 / 1.2 + move1 * -4.0 + move2 * 2.0 + move3 * 8.0, - -4.0 + -s_a.grip.0 / 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); + Some(ToolKind::Sword) => match ability_id { + Some("common.abilities.adlet.elder.dash") => { + next.head.orientation = Quaternion::rotation_x(move1 * 0.2 + move3 * 0.1) + * Quaternion::rotation_z(move1 * -0.1 + move3 * -0.2); + next.upper_torso.orientation = + Quaternion::rotation_x(move1 * -0.2 + move3 * 0.3) + * Quaternion::rotation_z(move1 * 0.2 + move3 * -0.2); + next.control_l.position = Vec3::new(0.0, 2.0, -2.0); + next.control_r.position = Vec3::new(0.0, 2.0, -2.0); + next.weapon_l.position = + Vec3::new(-5.5 + move1 * -4.0 + move2 * 6.0, 5.0, -18.0); + next.weapon_r.position = + Vec3::new(6.5 + move1 * 4.0 + move2 * -6.0, 5.0, -18.0); + next.second.scale = Vec3::one() * 1.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.weapon_l.orientation = Quaternion::rotation_x(-1.67 + move1 * 0.4) + * Quaternion::rotation_z(move2 * -0.5); + next.weapon_r.orientation = Quaternion::rotation_x(-1.67 + move1 * 0.3) + * Quaternion::rotation_z(move2 * 0.5); + + next.control_l.orientation = Quaternion::rotation_x(PI / 2.0); + next.control_r.orientation = Quaternion::rotation_x(PI / 2.0); + + next.control.orientation = Quaternion::rotation_x(move1 * PI + move2 * -PI); + next.shoulder_l.orientation = Quaternion::rotation_x(move1 * PI + move2 * -PI); + next.shoulder_r.orientation = Quaternion::rotation_x(move1 * PI + move2 * -PI); + }, + _ => { + 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.0 / 1.2 + move1 * -4.0 + move2 * 2.0 + move3 * 8.0, + -4.0 + -s_a.grip.0 / 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::Axe) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move3 * 3.0); diff --git a/voxygen/anim/src/biped_large/mod.rs b/voxygen/anim/src/biped_large/mod.rs index 7be0e999b1..1fed6ca382 100644 --- a/voxygen/anim/src/biped_large/mod.rs +++ b/voxygen/anim/src/biped_large/mod.rs @@ -4,6 +4,7 @@ pub mod beta; pub mod blink; pub mod charge; pub mod chargemelee; +pub mod combomelee; pub mod dash; pub mod equip; pub mod idle; @@ -24,12 +25,12 @@ pub mod wield; // Reexports pub use self::{ alpha::AlphaAnimation, beam::BeamAnimation, beta::BetaAnimation, blink::BlinkAnimation, - charge::ChargeAnimation, chargemelee::ChargeMeleeAnimation, dash::DashAnimation, - equip::EquipAnimation, idle::IdleAnimation, jump::JumpAnimation, leapmelee::LeapAnimation, - leapshockwave::LeapShockAnimation, run::RunAnimation, selfbuff::SelfBuffAnimation, - shockwave::ShockwaveAnimation, shoot::ShootAnimation, spin::SpinAnimation, - spinmelee::SpinMeleeAnimation, spritesummon::SpriteSummonAnimation, stunned::StunnedAnimation, - summon::SummonAnimation, wield::WieldAnimation, + charge::ChargeAnimation, chargemelee::ChargeMeleeAnimation, combomelee::ComboAnimation, + dash::DashAnimation, equip::EquipAnimation, idle::IdleAnimation, jump::JumpAnimation, + leapmelee::LeapAnimation, leapshockwave::LeapShockAnimation, run::RunAnimation, + selfbuff::SelfBuffAnimation, shockwave::ShockwaveAnimation, shoot::ShootAnimation, + spin::SpinAnimation, spinmelee::SpinMeleeAnimation, spritesummon::SpriteSummonAnimation, + stunned::StunnedAnimation, summon::SummonAnimation, wield::WieldAnimation, }; use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton}; @@ -263,6 +264,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (8.5, 4.0), (Tursus, _) => (-4.5, -14.0), (Gigasfrost, _) => (-1.5, 5.0), + (AdletElder, _) => (-8.0, 10.0), }, jaw: match (body.species, body.body_type) { (Ogre, _) => (0.0, 0.0), @@ -288,6 +290,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (-5.0, -5.0), (Tursus, _) => (4.0, 10.5), (Gigasfrost, _) => (-1.0, 5.5), + (AdletElder, _) => (10.5, -7.0), }, upper_torso: match (body.species, body.body_type) { (Ogre, Male) => (0.0, 27.5), @@ -314,6 +317,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (-1.0, 23.5), (Tursus, _) => (3.0, 26.0), (Gigasfrost, _) => (-1.0, 30.0), + (AdletElder, _) => (3.0, 19.0), }, lower_torso: match (body.species, body.body_type) { (Ogre, Male) => (1.0, -7.0), @@ -340,6 +344,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (-0.5, -7.0), (Tursus, _) => (-5.0, -9.0), (Gigasfrost, _) => (0.0, -5.5), + (AdletElder, _) => (0.0, -4.0), }, tail: match (body.species, body.body_type) { (Werewolf, _) => (-5.5, -2.0), @@ -347,6 +352,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Mightysaurok, _) => (-4.5, -6.0), (Slysaurok, _) => (-4.5, -6.0), (Minotaur, _) => (-3.0, -6.0), + (AdletElder, _) => (-4.5, -6.0), _ => (0.0, 0.0), }, shoulder: match (body.species, body.body_type) { @@ -374,6 +380,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (10.5, 0.0, -1.5), (Tursus, _) => (12.5, -2.5, -2.0), (Gigasfrost, _) => (10.5, 0.5, 0.0), + (AdletElder, _) => (8.5, 1.0, 2.5), }, hand: match (body.species, body.body_type) { (Ogre, Male) => (14.5, 0.0, -4.0), @@ -400,6 +407,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (13.0, 0.5, -4.0), (Tursus, _) => (15.5, 0.0, -7.0), (Gigasfrost, _) => (17.0, 0.5, -6.0), + (AdletElder, _) => (8.0, 1.5, -2.5), }, leg: match (body.species, body.body_type) { (Ogre, Male) => (0.0, 0.0, -4.0), @@ -426,6 +434,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (4.0, 0.0, -7.5), (Tursus, _) => (4.5, 1.0, -9.0), (Gigasfrost, _) => (6.0, 0.0, -10.0), + (AdletElder, _) => (3.0, -1.5, -4.0), }, foot: match (body.species, body.body_type) { (Ogre, Male) => (4.0, 1.0, -12.0), @@ -452,6 +461,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (4.5, 0.5, -12.5), (Tursus, _) => (5.5, 3.0, -14.5), (Gigasfrost, _) => (6.5, 2.0, -19.5), + (AdletElder, _) => (4.0, 3.5, -10.0), }, scaler: match (body.species, body.body_type) { (Ogre, Male) => 1.12, @@ -478,6 +488,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => 1.2, (Tursus, _) => 1.0, (Gigasfrost, _) => 1.7, + (AdletElder, _) => 1.0, }, tempo: match (body.species, body.body_type) { (Ogre, Male) => 0.9, @@ -515,6 +526,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Huskbrute, _) => (12.5, 0.0), (Tursus, _) => (13.0, 0.0), (Gigasfrost, _) => (16.0, 0.0), + (AdletElder, _) => (10.0, 0.0), }, shl: match (body.species, body.body_type) { (Dullahan, _) => (-4.75, -11.0, 8.5, 1.47, -0.2, 0.0), diff --git a/voxygen/anim/src/biped_large/shoot.rs b/voxygen/anim/src/biped_large/shoot.rs index f78dc4ac9f..6c4d0ece38 100644 --- a/voxygen/anim/src/biped_large/shoot.rs +++ b/voxygen/anim/src/biped_large/shoot.rs @@ -162,6 +162,40 @@ impl Animation for ShootAnimation { next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.4) * Quaternion::rotation_y(move1 * -0.5); }, + Some("common.abilities.adlet.elder.trap") => { + let (move1base, move2base, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1abs = move1base * pullback; + let move2abs = move2base * pullback; + next.main.position = Vec3::new(-10.0, -8.0, 12.0); + next.main.orientation = + Quaternion::rotation_y(2.5) * Quaternion::rotation_z(PI / 2.0); + + next.hand_l.position = + Vec3::new(-s_a.hand.0, s_a.hand.1 + 1.0, s_a.hand.2 + 5.0); + next.hand_r.position = + Vec3::new(s_a.hand.0, s_a.hand.1 + 1.0, s_a.hand.2 + 5.0); + + next.hand_r.orientation = + Quaternion::rotation_x(move1abs * 4.0 + move2abs * -0.7) + * Quaternion::rotation_y(0.0 + move1abs * -0.7); + next.hand_l.orientation = + Quaternion::rotation_x(move1abs * 4.0 + move2abs * -0.7); + next.hand_r.orientation = + Quaternion::rotation_x(move1abs * 4.0 + move2abs * -0.7); + + next.shoulder_l.orientation = + Quaternion::rotation_x(move1abs * 4.0 + move2abs * -0.7); + next.shoulder_r.orientation = + Quaternion::rotation_x(move1abs * 4.0 + move2abs * -0.7); + next.head.orientation = + Quaternion::rotation_x(move1abs * 0.4 + move2abs * -0.2); + }, _ => {}, }, Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 725367e8ee..30e719a271 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -5326,6 +5326,37 @@ impl FigureMgr { skeleton_attr, ) }, + CharacterState::ComboMelee2(s) => { + let timer = s.timer.as_secs_f32(); + let current_strike = s.completed_strikes % s.static_data.strikes.len(); + let strike_data = s.static_data.strikes[current_strike]; + let progress = match s.stage_section { + StageSection::Buildup => { + timer / strike_data.buildup_duration.as_secs_f32() + }, + StageSection::Action => { + timer / strike_data.swing_duration.as_secs_f32() + }, + StageSection::Recover => { + timer / strike_data.recover_duration.as_secs_f32() + }, + _ => 0.0, + }; + + anim::biped_large::ComboAnimation::update_skeleton( + &target_base, + ( + ability_id, + Some(s.stage_section), + Some(s.static_data.ability_info), + current_strike, + move_dir, + ), + progress, + &mut state_animation_rate, + skeleton_attr, + ) + }, CharacterState::BasicRanged(s) => { let stage_time = s.timer.as_secs_f32(); diff --git a/world/src/site2/plot/adlet.rs b/world/src/site2/plot/adlet.rs index f1623abd37..fab2cf35fc 100644 --- a/world/src/site2/plot/adlet.rs +++ b/world/src/site2/plot/adlet.rs @@ -1759,6 +1759,8 @@ impl Structure for AdletStronghold { (2 + (4 * dir.x)) as u8, ); } + let boss_spawn = wpos.with_z(alt as i32); + painter.spawn(adlet_elder(boss_spawn.as_(), &mut rng)); }, } } @@ -1981,11 +1983,10 @@ fn random_adlet(pos: Vec3, rng: &mut R) -> EntityInfo { } } -// TODO: Whatever the adlet boss/chieftain thing is -// fn adlet_(pos: Vec3, rng: &mut R) -> EntityInfo { -// EntityInfo::at(pos.map(|x| x as f32)) -// .with_asset_expect("common.entity.dungeon.adlet.", rng) -// } +fn adlet_elder(pos: Vec3, rng: &mut R) -> EntityInfo { + EntityInfo::at(pos.map(|x| x as f32)) + .with_asset_expect("common.entity.dungeon.adlet.elder", rng) +} fn rat(pos: Vec3, rng: &mut R) -> EntityInfo { EntityInfo::at(pos.map(|x| x as f32)).with_asset_expect("common.entity.wild.peaceful.rat", rng)