- adlet melee tweaks

- fix adlet elder shoot combomelee
- adjust trap projectile mass
This commit is contained in:
flo666 2023-04-18 13:37:24 +02:00 committed by Sam
parent f13c3774c0
commit f66cc47554
6 changed files with 74 additions and 85 deletions

View File

@ -1,7 +1,7 @@
BasicMelee(
energy_cost: 0,
buildup_duration: 0.15,
swing_duration: 0.05,
swing_duration: 0.55,
recover_duration: 0.55,
melee_constructor: (
kind: Stab(
@ -10,7 +10,7 @@ BasicMelee(
knockback: 0,
energy_regen: 0,
),
range: 5,
range: 3,
angle: 5,
),
ori_modifier: 1.0,

View File

@ -1,7 +1,7 @@
BasicMelee(
energy_cost: 0,
buildup_duration: 0.4,
swing_duration: 0.1,
swing_duration: 0.2,
recover_duration: 0.45,
melee_constructor: (
kind: Stab(

View File

@ -436,7 +436,7 @@ impl Body {
Body::IceBomb => 12298.0, // 2.5 m diamter but ice
Body::LaserBeam => 80000.0,
Body::AdletSpear => 1.5,
Body::AdletTrap => 1.2,
Body::AdletTrap => 10.0,
};
Mass(m)

View File

@ -809,7 +809,7 @@ impl ProjectileConstructor {
Projectile {
hit_solid: vec![],
hit_entity: vec![Effect::Attack(attack), Effect::Vanish],
time_left: Duration::from_secs(300),
time_left: Duration::from_secs(10),
owner,
ignore_group: true,
is_sticky: true,

View File

@ -25,7 +25,7 @@ impl Animation for ComboAnimation {
(ability_id, stage_section, _ability_info, current_strike, _move_dir): Self::Dependency<'_>,
anim_time: f32,
rate: &mut f32,
_s_a: &SkeletonAttr,
s_a: &SkeletonAttr,
) -> Self::Skeleton {
*rate = 1.0;
let mut next = (*skeleton).clone();
@ -58,63 +58,52 @@ impl Animation for ComboAnimation {
};
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.position = Vec3::new(-s_a.grip.0 + 1.0, s_a.grip.0 * 2.0, 0.0);
next.second.position = Vec3::new(s_a.grip.0, s_a.grip.0 * 2.0, 0.0);
next.hand_l.position = Vec3::new(-s_a.grip.0, s_a.grip.0 + 1.0, 0.0);
next.hand_r.position = Vec3::new(s_a.grip.0, s_a.grip.0 + 1.0, 0.0);
next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0);
next.hand_r.orientation = Quaternion::rotation_x(PI / 2.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_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.position = Vec3::new(-10.0, 12.0, -7.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);
next.weapon_l.position = Vec3::new(0.0, -8.0, -5.0);
next.weapon_l.orientation =
Quaternion::rotation_x(move1 * 0.3 + move2 * -0.2);
next.weapon_r.orientation =
Quaternion::rotation_z(move1 * -1.0 + move2 * 1.9);
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
* Quaternion::rotation_y(move1 * -0.9 + move2 * 0.9);
},
1 => {
next.weapon_r.position = Vec3::new(10.0, 12.0, -7.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_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.weapon_r.position = Vec3::new(0.0, -8.0, -5.0);
next.weapon_r.orientation =
Quaternion::rotation_x(move1 * 0.3 + move2 * -0.2);
next.weapon_l.orientation =
Quaternion::rotation_z(move1 * 1.0 + move2 * -1.9);
next.shoulder_l.orientation =
Quaternion::rotation_x(move1 * 1.0 * move2 * 1.0)
* Quaternion::rotation_y(move1 * 0.9 + move2 * -0.9);
},
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_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);
next.weapon_l.orientation =
Quaternion::rotation_z(move1 * 1.0 + move2 * -1.2);
next.weapon_r.orientation =
Quaternion::rotation_z(move1 * -1.0 + move2 * 1.2);
next.shoulder_l.orientation =
Quaternion::rotation_x(move1 * 1.0 * move2 * 1.0)
* Quaternion::rotation_y(move1 * 0.9 + move2 * -0.7);
next.shoulder_r.orientation =
Quaternion::rotation_x(move1 * 1.0 * move2 * 1.0)
* Quaternion::rotation_y(move1 * -0.9 + move2 * 0.7);
},
_ => {},
}

View File

@ -118,6 +118,40 @@ impl Animation for ShootAnimation {
next.foot_l.orientation = Quaternion::rotation_y(move1 * 0.3 + move2 * -0.3);
next.foot_r.orientation = Quaternion::rotation_y(move1 * 0.3 + move2 * -0.3);
},
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::Hammer) => match ability_id {
@ -162,40 +196,6 @@ 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) => {