mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Rising tide
This commit is contained in:
parent
af0a9ca3a4
commit
8c66bf8f70
@ -3,7 +3,7 @@ ComboMelee2(
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 4,
|
||||
damage: 16,
|
||||
poise: 5,
|
||||
knockback: 0,
|
||||
energy_regen: 5,
|
||||
@ -11,12 +11,13 @@ ComboMelee2(
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
),
|
||||
buildup_duration: 0.15,
|
||||
swing_duration: 0.05,
|
||||
buildup_duration: 0.25,
|
||||
swing_duration: 0.1,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.1,
|
||||
recover_duration: 0.3,
|
||||
ori_modifier: 0.6,
|
||||
additional_combo: 9,
|
||||
),
|
||||
],
|
||||
energy_cost_per_strike: 0,
|
||||
energy_cost_per_strike: 10,
|
||||
)
|
@ -30,6 +30,8 @@ pub struct Strike<T> {
|
||||
pub movement: StrikeMovement,
|
||||
/// Adjusts turning rate during the attack
|
||||
pub ori_modifier: f32,
|
||||
#[serde(default)]
|
||||
pub additional_combo: i32,
|
||||
}
|
||||
|
||||
impl Strike<f32> {
|
||||
@ -42,6 +44,7 @@ impl Strike<f32> {
|
||||
recover_duration: Duration::from_secs_f32(self.recover_duration),
|
||||
movement: self.movement,
|
||||
ori_modifier: self.ori_modifier,
|
||||
additional_combo: self.additional_combo,
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,6 +58,7 @@ impl Strike<f32> {
|
||||
recover_duration: self.recover_duration / stats.speed,
|
||||
movement: self.movement,
|
||||
ori_modifier: self.ori_modifier,
|
||||
additional_combo: self.additional_combo,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -160,6 +164,7 @@ impl CharacterBehavior for Data {
|
||||
data.entity,
|
||||
strike_data
|
||||
.melee_constructor
|
||||
.with_combo(1 + strike_data.additional_combo)
|
||||
.create_melee(crit_data, tool_stats),
|
||||
);
|
||||
} else if self.timer < strike_data.swing_duration {
|
||||
|
@ -1005,6 +1005,52 @@ impl Animation for ComboAnimation {
|
||||
next.control.position += Vec3::new(move2 * 12.0, move2 * 4.0, 0.0);
|
||||
next.torso.orientation.rotate_z(move2_raw * -TAU);
|
||||
},
|
||||
Some("common.abilities.axe.rising_tide") => {
|
||||
let (move1, move2_raw) = match stage_section {
|
||||
Some(StageSection::Buildup) => {
|
||||
next.main_weapon_trail = false;
|
||||
next.off_weapon_trail = false;
|
||||
(anim_time, 0.0)
|
||||
},
|
||||
Some(StageSection::Action) => (1.0, anim_time),
|
||||
Some(StageSection::Recover) => {
|
||||
next.main_weapon_trail = false;
|
||||
next.off_weapon_trail = false;
|
||||
(1.0, 1.0)
|
||||
},
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2_raw * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.ahl.0, s_a.ahl.1, s_a.ahl.2);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(s_a.ahl.3) * Quaternion::rotation_y(s_a.ahl.4);
|
||||
next.hand_r.position = Vec3::new(s_a.ahr.0, s_a.ahr.1, s_a.ahr.2);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5);
|
||||
|
||||
next.control.position =
|
||||
Vec3::new(s_a.ac.0 + move1 * -1.0, s_a.ac.1 + move1 * -4.0, s_a.ac.2);
|
||||
next.control.orientation = Quaternion::rotation_x(s_a.ac.3 + move1 * 0.6)
|
||||
* Quaternion::rotation_y(s_a.ac.4 + move1 * -0.5)
|
||||
* Quaternion::rotation_z(s_a.ac.5 + move1 * 3.0);
|
||||
|
||||
next.chest.orientation = Quaternion::rotation_z(move1 * 0.6);
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -0.2);
|
||||
next.belt.orientation = Quaternion::rotation_z(move1 * -0.3);
|
||||
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.1);
|
||||
|
||||
next.chest.orientation.rotate_z(move2 * -1.4);
|
||||
next.head.orientation.rotate_z(move2 * 0.5);
|
||||
next.belt.orientation.rotate_z(move2 * 0.7);
|
||||
next.shorts.orientation.rotate_z(move2 * 0.3);
|
||||
next.control.orientation.rotate_z(move2 * -2.0);
|
||||
next.control.position += Vec3::new(move2 * 17.0, 0.0, move2 * 13.0);
|
||||
next.control.orientation.rotate_x(move2 * 2.0);
|
||||
next.control.orientation.rotate_y(move2 * -0.8);
|
||||
next.control.orientation.rotate_z(move2 * -1.0);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user