diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 0faae5a9c5..6a6db3c495 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -542,6 +542,14 @@ ], ), // TODO: Allow ability sets to expand other ability sets + Custom("Ice Drake"): ( + primary: Simple(None, "common.abilities.custom.icedrake.triplestrike"), + secondary: Simple(None, "common.abilities.custom.icedrake.singlestrike"), + abilities: [ + Simple(None, "common.abilities.custom.icedrake.icebombs"), + Simple(None, "common.abilities.custom.icedrake.icebreath"), + ], + ), Custom("Dagon"): ( primary: Simple(None, "common.abilities.custom.dagon.dagonbombs"), secondary: Simple(None, "common.abilities.custom.dagon.seaurchins"), diff --git a/assets/common/abilities/custom/icedrake/icebombs.ron b/assets/common/abilities/custom/icedrake/icebombs.ron new file mode 100644 index 0000000000..5c019051ce --- /dev/null +++ b/assets/common/abilities/custom/icedrake/icebombs.ron @@ -0,0 +1,16 @@ +BasicRanged( + energy_cost: 0, + buildup_duration: 0.5, + recover_duration: 0.9, + projectile: IceBomb( + damage: 30.0, + radius: 3.0, + knockback: 12.0, + min_falloff: 0.1, + ), + projectile_body: Object(IceBomb), + projectile_speed: 25.0, + num_projectiles: 5, + projectile_spread: 0.07, + move_efficiency: 0.3, +) diff --git a/assets/common/abilities/custom/icedrake/icebreath.ron b/assets/common/abilities/custom/icedrake/icebreath.ron new file mode 100644 index 0000000000..ac1310a1df --- /dev/null +++ b/assets/common/abilities/custom/icedrake/icebreath.ron @@ -0,0 +1,19 @@ +BasicBeam( + buildup_duration: 0.8, + recover_duration: 0.5, + beam_duration: 0.5, + damage: 10.0, + tick_rate: 3.0, + range: 15.0, + max_angle: 22.5, + damage_effect: Some(Buff(( + kind: Frozen, + dur_secs: 10.0, + strength: DamageFraction(0.5), + chance: 0.25, + ))), + energy_regen: 0, + energy_drain: 0, + ori_rate: 0.3, + specifier: Frost, +) diff --git a/assets/common/abilities/custom/icedrake/singlestrike.ron b/assets/common/abilities/custom/icedrake/singlestrike.ron new file mode 100644 index 0000000000..3938023f8a --- /dev/null +++ b/assets/common/abilities/custom/icedrake/singlestrike.ron @@ -0,0 +1,27 @@ +ComboMelee( + stage_data: [ + ( + stage: 1, + base_damage: 40.0, + damage_increase: 0, + base_poise_damage: 28, + poise_damage_increase: 0, + knockback: 3.0, + range: 2.0, + angle: 60.0, + base_buildup_duration: 1.2, + base_swing_duration: 0.07, + hit_timing: 0.5, + base_recover_duration: 0.8, + forward_movement: 3.0, + damage_kind: Crushing, + ), + ], + initial_energy_gain: 0, + max_energy_gain: 0, + energy_increase: 0, + speed_increase: 0.0, + max_speed_increase: 0.0, + scales_from_combo: 0, + ori_modifier: 0.6, +) diff --git a/assets/common/abilities/custom/icedrake/triplestrike.ron b/assets/common/abilities/custom/icedrake/triplestrike.ron new file mode 100644 index 0000000000..b90c3aca84 --- /dev/null +++ b/assets/common/abilities/custom/icedrake/triplestrike.ron @@ -0,0 +1,59 @@ +ComboMelee( + stage_data: [ + ( + stage: 1, + base_damage: 28.0, + damage_increase: 0, + base_poise_damage: 15, + poise_damage_increase: 0, + knockback: 3.0, + range: 2.2, + angle: 30.0, + base_buildup_duration: 1.3, + base_swing_duration: 0.07, + hit_timing: 0.5, + base_recover_duration: 0.6, + forward_movement: 2.0, + damage_kind: Crushing, + ), + ( + stage: 2, + base_damage: 28.0, + damage_increase: 0, + base_poise_damage: 18, + poise_damage_increase: 0, + knockback: 3.0, + range: 2.2, + angle: 30.0, + base_buildup_duration: 0.8, + base_swing_duration: 0.07, + hit_timing: 0.5, + base_recover_duration: 0.6, + forward_movement: 1.5, + damage_kind: Crushing, + ), + ( + stage: 3, + base_damage: 28.0, + damage_increase: 0, + base_poise_damage: 20, + poise_damage_increase: 0, + knockback: 3.0, + range: 2.2, + angle: 30.0, + base_buildup_duration: 0.8, + base_swing_duration: 0.07, + hit_timing: 0.5, + base_recover_duration: 0.6, + forward_movement: 1.5, + damage_kind: Crushing, + ), + ], + initial_energy_gain: 0, + max_energy_gain: 0, + energy_increase: 0, + speed_increase: 0.0, + max_speed_increase: 0.0, + scales_from_combo: 0, + ori_modifier: 0.65, +) diff --git a/assets/common/items/npc_weapons/unique/icedrake.ron b/assets/common/items/npc_weapons/unique/icedrake.ron new file mode 100644 index 0000000000..7073c5f42b --- /dev/null +++ b/assets/common/items/npc_weapons/unique/icedrake.ron @@ -0,0 +1,21 @@ +ItemDef( + name: "Ice Drake", + description: "testing123", + kind: Tool(( + kind: Natural, + hands: Two, + stats: ( + equip_time_secs: 0.01, + power: 1.0, + effect_power: 1.0, + speed: 1.0, + crit_chance: 0.0625, + range: 1.0, + energy_efficiency: 1.0, + buff_strength: 1.0, + ), + )), + quality: Low, + tags: [], + ability_spec: Some(Custom("Ice Drake")), +) \ No newline at end of file diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index 4c614bff07..bbd558a427 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -607,6 +607,9 @@ fn default_main_tool(body: &Body) -> Item { quadruped_low::Species::Basilisk => Some(Item::new_from_asset_expect( "common.items.npc_weapons.unique.basilisk", )), + quadruped_low::Species::Icedrake => Some(Item::new_from_asset_expect( + "common.items.npc_weapons.unique.icedrake", + )), _ => Some(Item::new_from_asset_expect( "common.items.npc_weapons.unique.quadlowbasic", )), diff --git a/voxygen/anim/src/biped_small/shoot.rs b/voxygen/anim/src/biped_small/shoot.rs index 1e7b86e54b..03526042d8 100644 --- a/voxygen/anim/src/biped_small/shoot.rs +++ b/voxygen/anim/src/biped_small/shoot.rs @@ -7,7 +7,7 @@ use std::f32::consts::PI; pub struct ShootAnimation; -type ShootAnimationDependency = ( +type ShootAnimationDependency<'a> = ( Option, Vec3, Vec3, @@ -17,10 +17,11 @@ type ShootAnimationDependency = ( f32, Option, f32, + Option<&'a str>, ); impl Animation for ShootAnimation { - type Dependency<'a> = ShootAnimationDependency; + type Dependency<'a> = ShootAnimationDependency<'a>; type Skeleton = BipedSmallSkeleton; #[cfg(feature = "use-dyn-lib")] @@ -40,6 +41,7 @@ impl Animation for ShootAnimation { _acc_vel, stage_section, _timer, + ability_id, ): Self::Dependency<'_>, anim_time: f32, _rate: &mut f32, @@ -69,46 +71,106 @@ impl Animation for ShootAnimation { next.tail.orientation = Quaternion::rotation_x(0.05 * fastalt * speednormcancel) * Quaternion::rotation_z(fast * 0.15 * speednormcancel); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_x(0.0); + match ability_id { + Some("common.abilities.adlet.hunter.throw") => { + next.main.position = Vec3::new(8.0, -7.0, 2.0); + next.main.orientation = Quaternion::rotation_x(PI / -2.0); - next.hand_l.position = Vec3::new(s_a.grip.0 * 4.0, 0.0, s_a.grip.2); - next.hand_r.position = Vec3::new(-s_a.grip.0 * 4.0, 0.0, s_a.grip.2); + next.hand_l.position = Vec3::new(s_a.grip.0 * 4.0, 0.0, s_a.grip.2); + next.hand_r.position = Vec3::new(5.0, -2.0, s_a.grip.2); - next.hand_l.orientation = Quaternion::rotation_x(0.0); - next.hand_r.orientation = Quaternion::rotation_x(0.0); + next.hand_l.orientation = Quaternion::rotation_x(0.0); + next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0); + }, + Some("common.abilities.adlet.tracker.trap") => { + next.main.position = Vec3::new(10.0, 0.0, 9.0); + + next.hand_l.position = Vec3::new(s_a.grip.0 * 4.0, 0.0, s_a.grip.2); + next.hand_r.position = Vec3::new(5.0, -2.0, s_a.grip.2); + + next.hand_l.orientation = Quaternion::rotation_x(0.0); + next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0); + }, + _ => { + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_x(0.0); + + next.hand_l.position = Vec3::new(s_a.grip.0 * 4.0, 0.0, s_a.grip.2); + next.hand_r.position = Vec3::new(-s_a.grip.0 * 4.0, 0.0, s_a.grip.2); + + next.hand_l.orientation = Quaternion::rotation_x(0.0); + next.hand_r.orientation = Quaternion::rotation_x(0.0); + }, + }; match active_tool_kind { - Some(ToolKind::Bow) => { - 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.control_l.position = Vec3::new( - 1.0 - s_a.grip.0 * 2.0 + move2abs * -4.0, - move2abs * -8.0, - 0.0, - ); - next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 6.0, -2.0); + Some(ToolKind::Bow) => match ability_id { + Some("common.abilities.adlet.tracker.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.control.position = Vec3::new( - -1.0, - 2.0 + move1abs * 3.0 + s_a.grip.2, - 3.0 + move1abs * 7.0 - s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0, - ); + next.control_l.position = Vec3::new( + 0.0, + 0.0 + move1abs * 4.0 + move2abs * -4.0, + -2.0 + move1abs * -8.0, + ); + next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 2.0, -2.0); - next.control_l.orientation = - Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.3); - next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + s_a.grip.0 * 0.2) - * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2); + next.control.position = Vec3::new( + -1.0, + 0.0 + move1abs * -8.0 + move2abs * 8.0 + s_a.grip.2, + 3.0 + move1abs * 7.0 - s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0, + ); - next.control.orientation = Quaternion::rotation_x(-0.3 + move1abs * 0.4) - * Quaternion::rotation_y(0.5 * speednorm); + next.control_l.orientation = + Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.3); + next.control_r.orientation = + Quaternion::rotation_x(PI / 2.0 + s_a.grip.0 * 0.2) + * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2); + + next.control.orientation = + Quaternion::rotation_x(-0.3 + move1abs * 0.5 + move2abs * -0.5) + * Quaternion::rotation_y(0.5 * speednorm); + }, + _ => { + 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.control_l.position = Vec3::new( + 1.0 - s_a.grip.0 * 2.0 + move2abs * -4.0, + move2abs * -8.0, + 0.0, + ); + next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 6.0, -2.0); + + next.control.position = Vec3::new( + -1.0, + 2.0 + move1abs * 3.0 + s_a.grip.2, + 3.0 + move1abs * 7.0 - s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0, + ); + + next.control_l.orientation = + Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.3); + next.control_r.orientation = + Quaternion::rotation_x(PI / 2.0 + s_a.grip.0 * 0.2) + * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2); + + next.control.orientation = Quaternion::rotation_x(-0.3 + move1abs * 0.4) + * Quaternion::rotation_y(0.5 * speednorm); + }, }, Some(ToolKind::Blowgun) => { let (move1base, move2base, move3) = match stage_section { @@ -175,6 +237,43 @@ impl Animation for ShootAnimation { * Quaternion::rotation_y(-0.2 * speednorm) * Quaternion::rotation_z(0.5 + move1abs * 0.6); }, + Some(ToolKind::Spear) => { + 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.control_l.position = Vec3::new( + 0.0, + 0.0 + move1abs * 4.0 + move2abs * -4.0, + -2.0 + move1abs * -8.0, + ); + next.control_r.position = Vec3::new( + -1.0 + s_a.grip.0 * 2.0, + 2.0 + move3 * -4.0, + -2.0 + move3 * -4.0, + ); + + next.control.position = Vec3::new( + -1.0, + 0.0 + move1abs * -8.0 + move2abs * 8.0 + s_a.grip.2, + 3.0 + move1abs * 7.0 - s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0, + ); + + next.control_l.orientation = + Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.3); + next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + s_a.grip.0 * 0.2) + * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2 + move3 * -1.5); + + next.control.orientation = + Quaternion::rotation_x(-0.3 + move1abs * 0.5 + move2abs * -0.5 + move3 * 0.5) + * Quaternion::rotation_y(0.5 * speednorm); + }, _ => {}, } diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index db672ea608..79fa9f07e8 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -3760,6 +3760,7 @@ impl FigureMgr { state.acc_vel, Some(s.stage_section), state.state_time, + ability_id, ), stage_progress, &mut state_animation_rate, @@ -3791,6 +3792,7 @@ impl FigureMgr { state.acc_vel, Some(s.stage_section), state.state_time, + ability_id, ), stage_progress, &mut state_animation_rate, @@ -3854,6 +3856,7 @@ impl FigureMgr { state.acc_vel, Some(s.stage_section), state.state_time, + ability_id, ), stage_progress, &mut state_animation_rate,