mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Crescent slash
This commit is contained in:
parent
fce9211d49
commit
e0a7449a99
@ -3,37 +3,20 @@ ComboMelee2(
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 5,
|
||||
poise: 0,
|
||||
damage: 12,
|
||||
poise: 5,
|
||||
knockback: 0,
|
||||
energy_regen: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
angle: 60.0,
|
||||
),
|
||||
buildup_duration: 0.15,
|
||||
swing_duration: 0.05,
|
||||
buildup_duration: 0.05,
|
||||
swing_duration: 0.1,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.1,
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 10,
|
||||
poise: 0,
|
||||
knockback: 0,
|
||||
energy_regen: 7.5,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
),
|
||||
buildup_duration: 0.1,
|
||||
swing_duration: 0.1,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.2,
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
],
|
||||
energy_cost_per_strike: 0,
|
||||
energy_cost_per_strike: 10,
|
||||
)
|
@ -3,30 +3,13 @@ ComboMelee2(
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 5,
|
||||
poise: 0,
|
||||
damage: 18,
|
||||
poise: 5,
|
||||
knockback: 0,
|
||||
energy_regen: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
),
|
||||
buildup_duration: 0.15,
|
||||
swing_duration: 0.05,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.1,
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 10,
|
||||
poise: 0,
|
||||
knockback: 0,
|
||||
energy_regen: 7.5,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
angle: 60.0,
|
||||
),
|
||||
buildup_duration: 0.1,
|
||||
swing_duration: 0.1,
|
||||
@ -35,5 +18,5 @@ ComboMelee2(
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
],
|
||||
energy_cost_per_strike: 0,
|
||||
energy_cost_per_strike: 10,
|
||||
)
|
@ -3,30 +3,14 @@ ComboMelee2(
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 5,
|
||||
poise: 0,
|
||||
damage: 15,
|
||||
poise: 5,
|
||||
knockback: 0,
|
||||
energy_regen: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
),
|
||||
buildup_duration: 0.15,
|
||||
swing_duration: 0.05,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.1,
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 10,
|
||||
poise: 0,
|
||||
knockback: 0,
|
||||
energy_regen: 7.5,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
angle: 75.0,
|
||||
multi_target: Some(Normal),
|
||||
),
|
||||
buildup_duration: 0.1,
|
||||
swing_duration: 0.1,
|
||||
@ -35,5 +19,5 @@ ComboMelee2(
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
],
|
||||
energy_cost_per_strike: 0,
|
||||
energy_cost_per_strike: 10,
|
||||
)
|
@ -3,30 +3,19 @@ ComboMelee2(
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 5,
|
||||
poise: 0,
|
||||
damage: 14,
|
||||
poise: 5,
|
||||
knockback: 0,
|
||||
energy_regen: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
),
|
||||
buildup_duration: 0.15,
|
||||
swing_duration: 0.05,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.1,
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 10,
|
||||
poise: 0,
|
||||
knockback: 0,
|
||||
energy_regen: 7.5,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
angle: 60.0,
|
||||
damage_effect: Some(Buff((
|
||||
kind: Bleeding,
|
||||
dur_secs: 8.0,
|
||||
strength: DamageFraction(0.25),
|
||||
chance: 0.25,
|
||||
))),
|
||||
),
|
||||
buildup_duration: 0.1,
|
||||
swing_duration: 0.1,
|
||||
@ -35,5 +24,5 @@ ComboMelee2(
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
],
|
||||
energy_cost_per_strike: 0,
|
||||
energy_cost_per_strike: 10,
|
||||
)
|
@ -3,30 +3,13 @@ ComboMelee2(
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 5,
|
||||
poise: 0,
|
||||
damage: 15,
|
||||
poise: 5,
|
||||
knockback: 0,
|
||||
energy_regen: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
),
|
||||
buildup_duration: 0.15,
|
||||
swing_duration: 0.05,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.1,
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 10,
|
||||
poise: 0,
|
||||
knockback: 0,
|
||||
energy_regen: 7.5,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
angle: 60.0,
|
||||
),
|
||||
buildup_duration: 0.1,
|
||||
swing_duration: 0.1,
|
||||
@ -35,5 +18,11 @@ ComboMelee2(
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
],
|
||||
energy_cost_per_strike: 0,
|
||||
energy_cost_per_strike: 10,
|
||||
meta: (
|
||||
capabilities: (
|
||||
// When in buildup, attack can get cancelled into parry
|
||||
bits: 0b00100000,
|
||||
),
|
||||
),
|
||||
)
|
@ -38,7 +38,7 @@ ComboMelee2(
|
||||
energy_cost_per_strike: 0,
|
||||
meta: (
|
||||
capabilities: (
|
||||
// Buildup blocks melee attacks at 50% strength
|
||||
// Blocks melee attacks at 50% strength
|
||||
bits: 0b00000100,
|
||||
),
|
||||
),
|
||||
|
@ -3,37 +3,20 @@ ComboMelee2(
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 5,
|
||||
poise: 0,
|
||||
damage: 25,
|
||||
poise: 15,
|
||||
knockback: 0,
|
||||
energy_regen: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
angle: 60.0,
|
||||
),
|
||||
buildup_duration: 0.15,
|
||||
swing_duration: 0.05,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.1,
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 10,
|
||||
poise: 0,
|
||||
knockback: 0,
|
||||
energy_regen: 7.5,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
),
|
||||
buildup_duration: 0.1,
|
||||
buildup_duration: 0.3,
|
||||
swing_duration: 0.1,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.2,
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
],
|
||||
energy_cost_per_strike: 0,
|
||||
energy_cost_per_strike: 10,
|
||||
)
|
@ -2848,6 +2848,8 @@ bitflags::bitflags! {
|
||||
const POISE_RESISTANT = 0b00001000;
|
||||
// WHen in the ability, an entity only receives half as much knockback
|
||||
const KNOCKBACK_RESISTANT = 0b00010000;
|
||||
// The ability will interrupt itself into a parry if hit with melee
|
||||
const BUILDUP_PARRIES = 0b00100000;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,11 +303,19 @@ impl CharacterState {
|
||||
}
|
||||
|
||||
pub fn is_parry(&self) -> bool {
|
||||
match self {
|
||||
let from_capability = self
|
||||
.ability_info()
|
||||
.map(|a| a.ability_meta.capabilities)
|
||||
.map_or(false, |c| {
|
||||
c.contains(Capability::BUILDUP_PARRIES)
|
||||
&& matches!(self.stage_section(), Some(StageSection::Buildup))
|
||||
});
|
||||
let from_state = match self {
|
||||
CharacterState::BasicBlock(c) => c.is_parry(),
|
||||
CharacterState::RiposteMelee(c) => matches!(c.stage_section, StageSection::Buildup),
|
||||
_ => false,
|
||||
}
|
||||
};
|
||||
from_capability || from_state
|
||||
}
|
||||
|
||||
/// In radians
|
||||
|
@ -1272,7 +1272,11 @@ pub fn handle_parry_hook(server: &Server, defender: EcsEntity, attacker: Option<
|
||||
});
|
||||
true
|
||||
},
|
||||
_ => false,
|
||||
char_state => char_state.ability_info().map_or(false, |info| {
|
||||
info.ability_meta
|
||||
.capabilities
|
||||
.contains(comp::ability::Capability::BUILDUP_PARRIES)
|
||||
}),
|
||||
};
|
||||
if return_to_wield {
|
||||
*char_state =
|
||||
|
@ -493,6 +493,52 @@ impl Animation for ComboAnimation {
|
||||
_ => {},
|
||||
}
|
||||
},
|
||||
Some(
|
||||
"common.abilities.sword.basic_crescent_slash"
|
||||
| "common.abilities.sword.heavy_crescent_slash"
|
||||
| "common.abilities.sword.agile_crescent_slash"
|
||||
| "common.abilities.sword.defensive_crescent_slash"
|
||||
| "common.abilities.sword.crippling_crescent_slash"
|
||||
| "common.abilities.sword.cleaving_crescent_slash",
|
||||
) => {
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-s_a.sc.0 + 6.0 + move1 * -12.0,
|
||||
-4.0 + move1 * 3.0,
|
||||
-2.0 + move1.min(0.5) * 2.0 * 10.0 + (move1.max(0.5) - 0.5) * 2.0 * -10.0,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1 * 0.5);
|
||||
next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
|
||||
next.control.orientation = Quaternion::rotation_x(s_a.sc.3);
|
||||
|
||||
next.chest.orientation = Quaternion::rotation_z(move1 * 1.2);
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -0.7);
|
||||
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.6);
|
||||
next.belt.orientation = Quaternion::rotation_z(move1 * -0.2);
|
||||
next.control
|
||||
.orientation
|
||||
.rotate_y(move1 * -1.5 + move2 * -0.7);
|
||||
|
||||
next.chest.orientation.rotate_z(move2 * -1.4);
|
||||
next.head.orientation.rotate_z(move2 * 0.9);
|
||||
next.shorts.orientation.rotate_z(move2 * 0.8);
|
||||
next.belt.orientation.rotate_z(move2 * 0.3);
|
||||
next.control.orientation.rotate_x(move2 * 0.6);
|
||||
next.control.orientation.rotate_z(move2 * -1.7);
|
||||
next.control.position += Vec3::new(move2 * 12.0, move2 * 4.0, move2 * 7.0);
|
||||
next.control.orientation.rotate_x(move2 * 0.7);
|
||||
},
|
||||
Some("common.abilities.sword.cleaving_combo") => {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
|
Loading…
Reference in New Issue
Block a user