mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
tursus npc - add 2 abilities
This commit is contained in:
parent
680d987e11
commit
ef5fe63bc2
@ -301,9 +301,11 @@
|
||||
abilities: [],
|
||||
),
|
||||
Custom("Tursus Claws"): (
|
||||
primary: Simple(None, "common.abilities.custom.tursus_claws.basic"),
|
||||
secondary: Simple(None, "common.abilities.custom.tursus_claws.basic"),
|
||||
abilities: [],
|
||||
primary: Simple(None, "common.abilities.custom.tursus.tursus_claws"),
|
||||
secondary: Simple(None, "common.abilities.custom.tursus.tusk_bash_leap"),
|
||||
abilities: [
|
||||
Simple(None, "common.abilities.custom.tursus.tusk_stab"),
|
||||
],
|
||||
),
|
||||
Custom("Wendigo Magic"): (
|
||||
primary: Simple(None, "common.abilities.custom.wendigomagic.frostbomb"),
|
||||
|
20
assets/common/abilities/custom/tursus/tusk_bash_leap.ron
Normal file
20
assets/common/abilities/custom/tursus/tusk_bash_leap.ron
Normal file
@ -0,0 +1,20 @@
|
||||
LeapMelee(
|
||||
energy_cost: 35.0,
|
||||
buildup_duration: 1.5,
|
||||
movement_duration: 0.6,
|
||||
swing_duration: 0.15,
|
||||
recover_duration: 0.2,
|
||||
melee_constructor: (
|
||||
kind: Bash(
|
||||
damage: 25.0,
|
||||
poise: 40.0,
|
||||
knockback: 25.0,
|
||||
energy_regen: 0.0,
|
||||
),
|
||||
range: 4.5,
|
||||
angle: 360.0,
|
||||
multi_target: Some(Normal),
|
||||
),
|
||||
forward_leap_strength: 20.0,
|
||||
vertical_leap_strength: 8.0,
|
||||
)
|
24
assets/common/abilities/custom/tursus/tusk_stab.ron
Normal file
24
assets/common/abilities/custom/tursus/tusk_stab.ron
Normal file
@ -0,0 +1,24 @@
|
||||
ChargedMelee(
|
||||
energy_cost: 0,
|
||||
energy_drain: 0,
|
||||
melee_constructor: (
|
||||
kind: Stab(
|
||||
damage: 10.0,
|
||||
poise: 50.0,
|
||||
knockback: 0.0,
|
||||
energy_regen: 0.0,
|
||||
),
|
||||
scaled: Some(Stab(
|
||||
damage: 90.0,
|
||||
poise: 150.0,
|
||||
knockback: 0.0,
|
||||
energy_regen: 0.0,
|
||||
)),
|
||||
range: 3.5,
|
||||
angle: 45.0,
|
||||
),
|
||||
charge_duration: 3.0,
|
||||
swing_duration: 0.1,
|
||||
hit_timing: 0.8,
|
||||
recover_duration: 1.0,
|
||||
)
|
@ -515,7 +515,7 @@ impl Animation for AlphaAnimation {
|
||||
* Quaternion::rotation_y(move1 * -0.8 + move2 * 0.6);
|
||||
}
|
||||
},
|
||||
Some("common.abilities.custom.tursus_claws.basic") => {
|
||||
Some("common.abilities.custom.tursus.tursus_claws") => {
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_r.position =
|
||||
|
@ -199,6 +199,65 @@ impl Animation for ChargeMeleeAnimation {
|
||||
next.main.orientation = Quaternion::rotation_y(move1 * 0.4 + move2 * -0.6)
|
||||
* Quaternion::rotation_x(move2 * -0.4);
|
||||
},
|
||||
Some("common.abilities.custom.tursus.tusk_stab") => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
next.head.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.head.0 + move1 * 15.0,
|
||||
s_a.head.1 + move1 * 6.0 + move2 * -4.0,
|
||||
);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 1.3 + move2 * -0.7);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position =
|
||||
Vec3::new(-16.0 + (move1 * 10.0).min(6.0), -1.0, -15.0);
|
||||
next.weapon_r.position =
|
||||
Vec3::new(16.0 + (move1 * -10.0).max(-6.0), -1.0, -15.0);
|
||||
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1 * -0.8);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1 * 0.8);
|
||||
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * -0.4 + move2 * 0.4);
|
||||
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * -0.4 + move2 * 0.4);
|
||||
|
||||
next.control.orientation = Quaternion::rotation_x(move1 * -0.7 + move2 * 0.7);
|
||||
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.6 + move2 * -1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.2 + move2 * 0.6);
|
||||
|
||||
if speed < 0.1 {
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + move1 * -7.0 + move2 * 7.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_z(move1 * 0.3 + move2 * -0.3);
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + move1 * 5.0 + move2 * -5.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_y(move1 * -0.3 + move2 * 0.3)
|
||||
* Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4);
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
|
@ -14,6 +14,7 @@ impl Animation for LeapAnimation {
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<&'a str>,
|
||||
);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
@ -23,7 +24,7 @@ impl Animation for LeapAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_leapmelee")]
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time, stage_section): Self::Dependency<'_>,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time, stage_section, ability_id): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -39,49 +40,103 @@ impl Animation for LeapAnimation {
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
if let Some(ToolKind::Hammer) = active_tool_kind {
|
||||
next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3);
|
||||
next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(s_a.hhr.3);
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0);
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Hammer) => {
|
||||
next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3);
|
||||
next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(s_a.hhr.3);
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0);
|
||||
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
|
||||
next.control.position = Vec3::new(
|
||||
s_a.hc.0 + movement2 * -10.0 + movement3 * 6.0,
|
||||
s_a.hc.1 + movement2 * 5.0 + movement3 * 7.0,
|
||||
s_a.hc.2 + movement2 * 5.0 + movement3 * -10.0,
|
||||
);
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(s_a.hc.3 + movement2 * PI / 2.0 + movement3 * -2.3)
|
||||
* Quaternion::rotation_y(s_a.hc.4 + movement2 * 1.3)
|
||||
* Quaternion::rotation_z(s_a.hc.5 + movement2 * -1.0 + movement3 * 0.5);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(
|
||||
next.control.position = Vec3::new(
|
||||
s_a.hc.0 + movement2 * -10.0 + movement3 * 6.0,
|
||||
s_a.hc.1 + movement2 * 5.0 + movement3 * 7.0,
|
||||
s_a.hc.2 + movement2 * 5.0 + movement3 * -10.0,
|
||||
);
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(s_a.hc.3 + movement2 * PI / 2.0 + movement3 * -2.3)
|
||||
* Quaternion::rotation_y(s_a.hc.4 + movement2 * 1.3)
|
||||
* Quaternion::rotation_z(s_a.hc.5 + movement2 * -1.0 + movement3 * 0.5);
|
||||
next.upper_torso.orientation = Quaternion::rotation_x(
|
||||
movement1 * 0.3 + movement2 * 0.3 + movement3 * -0.9 + movement4 * 0.3,
|
||||
) * Quaternion::rotation_z(movement1 * 0.5 + movement2 * 0.2 + movement3 * -0.7);
|
||||
) * Quaternion::rotation_z(
|
||||
movement1 * 0.5 + movement2 * 0.2 + movement3 * -0.7,
|
||||
);
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(movement3 * 0.2)
|
||||
* Quaternion::rotation_y(0.0 + movement2 * -0.1)
|
||||
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * -0.2 + movement3 * 0.6);
|
||||
next.head.orientation = Quaternion::rotation_x(movement3 * 0.2)
|
||||
* Quaternion::rotation_y(0.0 + movement2 * -0.1)
|
||||
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * -0.2 + movement3 * 0.6);
|
||||
|
||||
//next.hand_l.position = Vec3::new(-12.0 + movement3 * 10.0, 0.0, 0.0);
|
||||
//next.hand_l.position = Vec3::new(-12.0 + movement3 * 10.0, 0.0, 0.0);
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + movement3 * 13.0,
|
||||
s_a.foot.2 + movement3 * -2.0,
|
||||
);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.8 + movement3 * 1.7);
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + movement3 * 13.0,
|
||||
s_a.foot.2 + movement3 * -2.0,
|
||||
);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.8 + movement3 * 1.7);
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + 8.0 + movement3 * -13.0,
|
||||
s_a.foot.2 + 5.0 + movement3 * -5.0,
|
||||
);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.9 + movement3 * -1.7);
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + 8.0 + movement3 * -13.0,
|
||||
s_a.foot.2 + 5.0 + movement3 * -5.0,
|
||||
);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.9 + movement3 * -1.7);
|
||||
},
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.tursus.tusk_bash_leap") => {
|
||||
next.head.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.head.0 + movement3 * 12.0,
|
||||
s_a.head.1 + movement3 * 8.0,
|
||||
);
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1 + movement1 * -4.0);
|
||||
next.upper_torso.orientation = Quaternion::rotation_x(
|
||||
movement1 * -0.3 + movement2 * -0.3 + movement3 * 0.2,
|
||||
) * Quaternion::rotation_z(
|
||||
movement1 * 0.1 + movement2 * 0.2 + movement3 * -0.3,
|
||||
);
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(
|
||||
movement1 * -0.1 + movement2 * -0.1 + movement3 * 1.4,
|
||||
);
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + movement3 * 1.0,
|
||||
s_a.foot.2 + movement1 * -0.3 + movement3 * -2.0,
|
||||
);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(
|
||||
movement1 * -0.1 + movement2 * -0.2 + movement3 * 0.7,
|
||||
);
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + 1.0 + movement3 * -1.0,
|
||||
s_a.foot.2 - 1.0 + movement1 * -0.3 + movement3 * -2.0,
|
||||
);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(
|
||||
movement1 * -0.1 + movement2 * -0.2 + movement3 * -0.7,
|
||||
);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(
|
||||
movement1 * 0.5 + movement2 * 0.1 + movement3 * -1.5,
|
||||
);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(
|
||||
movement1 * 0.9 + movement2 * 0.1 + movement3 * -1.5,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(
|
||||
movement1 * 0.5 + movement2 * 0.1 + movement3 * -1.5,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(
|
||||
movement1 * 0.9 + movement2 * 0.1 + movement3 * -1.5,
|
||||
);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
||||
next
|
||||
|
@ -5586,6 +5586,7 @@ impl FigureMgr {
|
||||
rel_vel,
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
|
Loading…
Reference in New Issue
Block a user