Added dual wielding sword contextual abilities.

This commit is contained in:
Sam 2023-04-23 21:31:29 -04:00
parent 0ecf4fbe87
commit a38f336c9e
28 changed files with 469 additions and 25 deletions

View File

@ -18,9 +18,11 @@
pseudo_id: "veloren.core.pseudo_abilities.sword.secondary_ability",
abilities: [
([Stance(Sword(Heavy))], (None, "common.abilities.sword.heavy_slam")),
([Stance(Sword(Agile)), DualWieldingSameKind], (None, "common.abilities.sword.agile_dual_perforate")),
([Stance(Sword(Agile))], (None, "common.abilities.sword.agile_perforate")),
([Stance(Sword(Defensive))], (None, "common.abilities.sword.defensive_vital_jab")),
([Stance(Sword(Crippling))], (None, "common.abilities.sword.crippling_deep_rend")),
([Stance(Sword(Cleaving)), DualWieldingSameKind], (None, "common.abilities.sword.cleaving_dual_spiral_slash")),
([Stance(Sword(Cleaving))], (None, "common.abilities.sword.cleaving_spiral_slash")),
([], (None, "common.abilities.sword.basic_thrust")),
],
@ -73,6 +75,12 @@
Contextualized(
pseudo_id: "veloren.core.pseudo_abilities.sword.cross_cut",
abilities: [
([Stance(Sword(Heavy)), DualWieldingSameKind], (Sword(CrossCut), "common.abilities.sword.heavy_dual_cross_cut")),
([Stance(Sword(Agile)), DualWieldingSameKind], (Sword(CrossCut), "common.abilities.sword.agile_dual_cross_cut")),
([Stance(Sword(Defensive)), DualWieldingSameKind], (Sword(CrossCut), "common.abilities.sword.defensive_dual_cross_cut")),
([Stance(Sword(Crippling)), DualWieldingSameKind], (Sword(CrossCut), "common.abilities.sword.crippling_dual_cross_cut")),
([Stance(Sword(Cleaving)), DualWieldingSameKind], (Sword(CrossCut), "common.abilities.sword.cleaving_dual_cross_cut")),
([DualWieldingSameKind], (Sword(CrossCut), "common.abilities.sword.basic_dual_cross_cut")),
([Stance(Sword(Heavy))], (Sword(CrossCut), "common.abilities.sword.heavy_cross_cut")),
([Stance(Sword(Agile))], (Sword(CrossCut), "common.abilities.sword.agile_cross_cut")),
([Stance(Sword(Defensive))], (Sword(CrossCut), "common.abilities.sword.defensive_cross_cut")),
@ -88,6 +96,7 @@
([Stance(Sword(Agile))], (Sword(Finisher), "common.abilities.sword.agile_hundred_cuts")),
([Stance(Sword(Defensive))], (Sword(Finisher), "common.abilities.sword.defensive_counter")),
([Stance(Sword(Crippling))], (Sword(Finisher), "common.abilities.sword.crippling_mutilate")),
([Stance(Sword(Cleaving)), DualWieldingSameKind], (Sword(Finisher), "common.abilities.sword.cleaving_dual_bladestorm")),
([Stance(Sword(Cleaving))], (Sword(Finisher), "common.abilities.sword.cleaving_bladestorm")),
([], (Sword(Finisher), "common.abilities.sword.basic_mighty_strike")),
],
@ -100,12 +109,24 @@
Simple(Sword(DefensiveDisengage), "common.abilities.sword.defensive_disengage"),
Simple(Sword(CripplingGouge), "common.abilities.sword.crippling_gouge"),
Simple(Sword(CripplingHamstring), "common.abilities.sword.crippling_hamstring"),
Simple(Sword(CleavingWhirlwindSlice), "common.abilities.sword.cleaving_whirlwind_slice"),
Contextualized(
pseudo_id: "common.abilities.sword.cleaving_whirlwind_slice",
abilities: [
([DualWieldingSameKind], (Sword(CleavingWhirlwindSlice), "common.abilities.sword.cleaving_dual_whirlwind_slice")),
([], (Sword(CleavingWhirlwindSlice), "common.abilities.sword.cleaving_whirlwind_slice")),
],
),
Simple(Sword(CleavingEarthSplitter), "common.abilities.sword.cleaving_earth_splitter"),
Simple(Sword(HeavyFortitude), "common.abilities.sword.heavy_fortitude"),
Simple(Sword(HeavyPillarThrust), "common.abilities.sword.heavy_pillar_thrust"),
Simple(Sword(AgileDancingEdge), "common.abilities.sword.agile_dancing_edge"),
Simple(Sword(AgileFlurry), "common.abilities.sword.agile_flurry"),
Contextualized(
pseudo_id: "common.abilities.sword.agile_flurry",
abilities: [
([Stance(Sword(Agile)), DualWieldingSameKind], (Sword(AgileFlurry), "common.abilities.sword.agile_dual_flurry")),
([Stance(Sword(Agile))], (Sword(AgileFlurry), "common.abilities.sword.agile_flurry")),
],
),
Simple(Sword(DefensiveStalwartSword), "common.abilities.sword.defensive_stalwart_sword"),
Simple(Sword(DefensiveDeflect), "common.abilities.sword.defensive_deflect"),
Simple(Sword(CripplingEviscerate), "common.abilities.sword.crippling_eviscerate"),

View File

@ -0,0 +1,23 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 5,
knockback: 0,
energy_regen: 0,
),
range: 3.5,
angle: 90.0,
simultaneous_hits: 2,
),
buildup_duration: 0.1,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 5,
)

View File

@ -0,0 +1,22 @@
RapidMelee(
buildup_duration: 0.1,
swing_duration: 0.07,
recover_duration: 0.1,
melee_constructor: (
kind: Slash(
damage: 10,
poise: 3,
knockback: 0,
energy_regen: 0,
),
range: 6.0,
angle: 10.0,
),
energy_cost: 2.5,
max_strikes: Some(6),
move_modifier: 0.35,
ori_modifier: 0.25,
meta: (
requirements: (stance: Some(Sword(Agile))),
),
)

View File

@ -0,0 +1,19 @@
RapidMelee(
buildup_duration: 0.2,
swing_duration: 0.14,
recover_duration: 0.3,
melee_constructor: (
kind: Slash(
damage: 2,
poise: 1,
knockback: 0,
energy_regen: 2,
),
range: 4.0,
angle: 5.0,
),
energy_cost: 0,
max_strikes: None,
move_modifier: 0.3,
ori_modifier: 0.2,
)

View File

@ -0,0 +1,23 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 5,
knockback: 0,
energy_regen: 0,
),
range: 3.5,
angle: 90.0,
simultaneous_hits: 2,
),
buildup_duration: 0.15,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 5,
)

View File

@ -0,0 +1,22 @@
RapidMelee(
buildup_duration: 0.3,
swing_duration: 0.15,
recover_duration: 0.3,
melee_constructor: (
kind: Slash(
damage: 6,
poise: 10,
knockback: 0,
energy_regen: 0,
),
range: 4.0,
angle: 360.0,
multi_target: Some(Normal),
simultaneous_hits: 2,
),
energy_cost: 3.33,
max_strikes: Some(6),
move_modifier: 0.8,
ori_modifier: 1.0,
minimum_combo: 10,
)

View File

@ -0,0 +1,24 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 5,
knockback: 0,
energy_regen: 0,
),
range: 3.5,
angle: 90.0,
multi_target: Some(Normal),
simultaneous_hits: 2,
),
buildup_duration: 0.2,
swing_duration: 0.15,
hit_timing: 0.5,
recover_duration: 0.25,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 5,
)

View File

@ -0,0 +1,26 @@
ChargedMelee(
energy_cost: 0,
energy_drain: 0,
melee_constructor: (
kind: Slash(
damage: 0,
poise: 0,
knockback: 0,
energy_regen: 0,
),
scaled: Some(Slash(
damage: 7,
poise: 10,
knockback: 0,
energy_regen: 10,
)),
range: 3.0,
angle: 360.0,
multi_target: Some(Normal),
simultaneous_hits: 2,
),
charge_duration: 0.5,
swing_duration: 0.2,
hit_timing: 0.2,
recover_duration: 0.3,
)

View File

@ -0,0 +1,24 @@
RapidMelee(
buildup_duration: 0.2,
swing_duration: 0.2,
recover_duration: 0.4,
melee_constructor: (
kind: Slash(
damage: 10,
poise: 5,
knockback: 0,
energy_regen: 0,
),
range: 4.0,
angle: 360.0,
multi_target: Some(Normal),
simultaneous_hits: 2,
),
energy_cost: 5,
max_strikes: Some(2),
ori_modifier: 1.0,
move_modifier: 1.0,
meta: (
init_event: Some(EnterStance(Sword(Cleaving))),
),
)

View File

@ -0,0 +1,29 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 7,
poise: 5,
knockback: 0,
energy_regen: 0,
),
range: 3.5,
angle: 90.0,
damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 8.0,
strength: DamageFraction(0.25),
chance: 1.0,
))),
simultaneous_hits: 2,
),
buildup_duration: 0.15,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 5,
)

View File

@ -0,0 +1,30 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 6,
poise: 5,
knockback: 0,
energy_regen: 0,
),
range: 3.5,
angle: 90.0,
damage_effect: Some(BuffsVulnerable(0.5, Parried)),
simultaneous_hits: 2,
),
buildup_duration: 0.15,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 5,
meta: (
capabilities: (
// The ability will parry melee attacks in the buildup portion
bits: 0b00100000,
),
),
)

View File

@ -0,0 +1,24 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 12,
poise: 5,
knockback: 0,
energy_regen: 0,
),
range: 3.5,
angle: 90.0,
damage_effect: Some(StunnedVulnerable(0.5)),
simultaneous_hits: 2,
),
buildup_duration: 0.2,
swing_duration: 0.15,
hit_timing: 0.5,
recover_duration: 0.25,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 5,
)

View File

@ -44,12 +44,16 @@ common-abilities-sword-heavy_slam = Heavy Slam
.desc = A strong overhead slash that can be charged to be more staggering
common-abilities-sword-agile_perforate = Perforate
.desc = A rapid flurry of light attacks
common-abilities-sword-agile_dual_perforate = Perforate
.desc = A rapid flurry of light attacks with both swords
common-abilities-sword-defensive_vital_jab = Defensive Vital Jab
.desc = A quickly charged jab that does more damage against parried foes
common-abilities-sword-crippling_deep_rend = Deep Rend
.desc = A strike aimed at an already open wound, deals more damage to bleeding enemies
common-abilities-sword-cleaving_spiral_slash = Spiral Slash
.desc = Sweep your blade fully around you to hit anyone nearby
common-abilities-sword-cleaving_dual_spiral_slash = Spiral Slash
.desc = Sweep both of your blades fully around you to hit anyone nearby
veloren-core-pseudo_abilities-sword-crescent_slash = Crescent Slash
.desc =
An upwards diagonal slash
@ -130,6 +134,18 @@ common-abilities-sword-crippling_cross_cut = Crippling Cross Cut
.desc = A right and left slash that can bleed
common-abilities-sword-cleaving_cross_cut = Cleaving Cross Cut
.desc = A right and left slash which cleave through enemies
common-abilities-sword-basic_dual_cross_cut = Basic Cross Cut
.desc = A simultaneous basic right and left slash
common-abilities-sword-heavy_dual_cross_cut = Heavy Cross Cut
.desc = A simultaneous right and left slash that can each stagger
common-abilities-sword-agile_dual_cross_cut = Agile Cross Cut
.desc = A simultaneous quick right and left slash
common-abilities-sword-defensive_dual_cross_cut = Defensive Cross Cut
.desc = A simultaneous parrying right and left slash
common-abilities-sword-crippling_dual_cross_cut = Crippling Cross Cut
.desc = A simultaneous right and left slash that can bleed
common-abilities-sword-cleaving_dual_cross_cut = Cleaving Cross Cut
.desc = A simultaneous right and left slash which cleave through enemies
veloren-core-pseudo_abilities-sword-finisher = Finisher
.desc =
An ability that consumes combo and is meant to end a fight
@ -158,6 +174,10 @@ common-abilities-sword-cleaving_bladestorm = Bladestorm
.desc =
Decimate your enemies with multiple cyclic swings of your sword
Requires a moderate amount of combo to use
common-abilities-sword-cleaving_dual_bladestorm = Bladestorm
.desc =
Decimate your enemies with multiple cyclic swings of both of your swords
Requires a moderate amount of combo to use
common-abilities-sword-heavy_sweep = Heavy Sweep
.desc =
A heavy, wide, sweeping strike that deals more damage to a staggered enemy
@ -194,6 +214,10 @@ common-abilities-sword-cleaving_whirlwind_slice = Whirlwind Slice
.desc =
Strike all surrounding enemies with circular attacks
Enters cleaving stance
common-abilities-sword-cleaving_dual_whirlwind_slice = Whirlwind Slice
.desc =
Strike all surrounding enemies with circular attacks using both of your swords
Enters cleaving stance
common-abilities-sword-cleaving_earth_splitter = Earth Splitter
.desc =
Split the earth, if used while falling will have a much stronger impact
@ -214,6 +238,10 @@ common-abilities-sword-agile_flurry = Flurry
.desc =
Multiple rapid stabs
Requires agile stance
common-abilities-sword-agile_dual_flurry = Flurry
.desc =
Multiple rapid stabs with both swords
Requires agile stance
common-abilities-sword-defensive_stalwart_sword = Stalwart Sword
.desc =
Shrug off the brunt of attacks, incoming damage is reduced

View File

@ -188,7 +188,7 @@ impl Attack {
pub fn apply_attack(
&self,
attacker: Option<AttackerInfo>,
target: TargetInfo,
target: &TargetInfo,
dir: Dir,
options: AttackOptions,
// Currently strength_modifier just modifies damage,
@ -241,7 +241,7 @@ impl Attack {
is_applied = true;
let damage_reduction = Attack::compute_damage_reduction(
attacker.as_ref(),
&target,
target,
attack_source,
dir,
damage.damage,

View File

@ -834,6 +834,7 @@ impl Default for CharacterAbility {
angle: 15.0,
multi_target: None,
damage_effect: None,
simultaneous_hits: 1,
},
ori_modifier: 1.0,
meta: Default::default(),

View File

@ -334,7 +334,7 @@ impl<T> AbilityKind<T> {
} => AbilityKind::<U>::Contextualized {
pseudo_id: pseudo_id.clone(),
abilities: abilities
.into_iter()
.iter()
.map(|(c, (s, x))| (c.clone(), (*s, f(x))))
.collect(),
},

View File

@ -22,6 +22,7 @@ pub struct Melee {
pub hit_count: u32,
pub multi_target: Option<MultiTarget>,
pub break_block: Option<(Vec3<i32>, Option<ToolKind>)>,
pub simultaneous_hits: u32,
}
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
@ -49,6 +50,8 @@ impl Component for Melee {
type Storage = VecStorage<Self>;
}
fn default_simultaneous_hits() -> u32 { 1 }
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct MeleeConstructor {
@ -61,6 +64,8 @@ pub struct MeleeConstructor {
pub angle: f32,
pub multi_target: Option<MultiTarget>,
pub damage_effect: Option<CombatEffect>,
#[serde(default = "default_simultaneous_hits")]
pub simultaneous_hits: u32,
}
impl MeleeConstructor {
@ -306,6 +311,7 @@ impl MeleeConstructor {
hit_count: 0,
multi_target: self.multi_target,
break_block: None,
simultaneous_hits: self.simultaneous_hits,
}
}

View File

@ -272,6 +272,7 @@ impl CharacterBehavior for Data {
// TODO: Evaluate if we want to leave this true. State will be removed at
// some point anyways and this does preserve behavior
multi_target: Some(MultiTarget::Normal),
simultaneous_hits: 1,
break_block: data
.inputs
.break_block_pos

View File

@ -276,6 +276,7 @@ fn create_test_melee(static_data: StaticData) -> Melee {
angle: static_data.melee_constructor.angle,
multi_target: None,
damage_effect: None,
simultaneous_hits: 1,
};
melee.create_melee((0.0, 0.0), tool::Stats::one())
}

View File

@ -255,7 +255,7 @@ impl<'a> System<'a> for Sys {
beam_segment.properties.attack.apply_attack(
attacker_info,
target_info,
&target_info,
ori.look_dir(),
attack_options,
1.0,

View File

@ -231,21 +231,24 @@ impl<'a> System<'a> for Sys {
1.0
};
let is_applied = melee_attack.attack.apply_attack(
attacker_info,
target_info,
dir,
attack_options,
strength,
AttackSource::Melee,
*read_data.time,
|e| server_emitter.emit(e),
|o| outcomes_emitter.emit(o),
&mut rng,
);
let mut is_applied = false;
for _ in 0..melee_attack.simultaneous_hits {
is_applied = melee_attack.attack.apply_attack(
attacker_info,
&target_info,
dir,
attack_options,
strength,
AttackSource::Melee,
*read_data.time,
|e| server_emitter.emit(e),
|o| outcomes_emitter.emit(o),
&mut rng,
) || is_applied;
}
if is_applied {
melee_attack.hit_count += 1;
melee_attack.hit_count += melee_attack.simultaneous_hits;
}
}
}

View File

@ -352,7 +352,7 @@ fn dispatch_hit(
attack.apply_attack(
attacker_info,
target_info,
&target_info,
projectile_dir,
attack_options,
1.0,

View File

@ -241,7 +241,7 @@ impl<'a> System<'a> for Sys {
shockwave.properties.attack.apply_attack(
attacker_info,
target_info,
&target_info,
dir,
attack_options,
1.0,

View File

@ -1008,7 +1008,7 @@ pub fn handle_explosion(server: &Server, pos: Vec3<f32>, explosion: Explosion, o
let time = server.state.ecs().read_resource::<Time>();
attack.apply_attack(
attacker_info,
target_info,
&target_info,
dir,
attack_options,
strength,

View File

@ -181,7 +181,10 @@ impl Animation for ChargeswingAnimation {
.rotate_y(move2 * -0.3 - tension / 100.0);
next.foot_r.orientation.rotate_z(move3 * -1.5);
},
Some("common.abilities.sword.cleaving_spiral_slash") => {
Some(
"common.abilities.sword.cleaving_spiral_slash"
| "common.abilities.sword.cleaving_dual_spiral_slash",
) => {
let (move1, tension, move2, move3) = match stage_section {
Some(StageSection::Charge) => (
anim_time.powf(0.25).min(1.0),

View File

@ -714,6 +714,55 @@ impl Animation for ComboAnimation {
_ => {},
}
},
Some(
"common.abilities.sword.basic_dual_cross_cut"
| "common.abilities.sword.heavy_dual_cross_cut"
| "common.abilities.sword.agile_dual_cross_cut"
| "common.abilities.sword.defensive_dual_cross_cut"
| "common.abilities.sword.crippling_dual_cross_cut"
| "common.abilities.sword.cleaving_dual_cross_cut",
) => {
let (move1, move2) = if strike == current_strike {
match stage_section {
Some(StageSection::Buildup) => {
(((anim_time.max(0.4) - 0.4) * 1.5).powf(0.5), 0.0)
},
Some(StageSection::Action) => (1.0, (anim_time.min(0.4) * 2.5).powi(2)),
Some(StageSection::Recover) => (1.0, 1.0),
_ => (0.0, 0.0),
}
} else {
(1.0, 1.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.shl.0, s_a.shl.1, s_a.shl.2);
next.hand_r.orientation = Quaternion::rotation_x(s_a.shl.3);
next.control_l.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control_l.orientation = Quaternion::rotation_x(s_a.sc.3);
next.control_r.position = Vec3::new(-s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control_r.orientation = Quaternion::rotation_x(-s_a.sc.3);
next.control_l.position += Vec3::new(move1 * 3.0, move1 * 4.0, move1 * 8.0);
next.control_l.orientation.rotate_x(move1 * 1.0);
next.control_l.orientation.rotate_z(move1 * -0.5);
next.control_l.orientation.rotate_y(move1 * -0.3);
next.control_r.position += Vec3::new(move1 * -3.0, move1 * 4.0, move1 * 8.0);
next.control_r.orientation.rotate_x(move1 * -1.0);
next.control_r.orientation.rotate_z(move1 * 0.5);
next.control_r.orientation.rotate_y(move1 * 0.3);
next.control_l.orientation.rotate_x(move2 * -1.9);
next.control_l.orientation.rotate_z(move2 * -0.4);
next.control_l.position += Vec3::new(move2 * 8.0, move2 * 2.0, move2 * -9.0);
next.control_r.orientation.rotate_x(move2 * -1.5);
next.control_r.orientation.rotate_z(move2 * 0.4);
next.control_r.position += Vec3::new(move2 * -8.0, move2 * 2.0, move2 * -9.0);
},
Some("common.abilities.sword.crippling_bloody_gash") => {
let (move1, move2) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),

View File

@ -42,7 +42,9 @@ impl Animation for RapidMeleeAnimation {
match ability_id {
Some(
"common.abilities.sword.cleaving_whirlwind_slice"
| "common.abilities.sword.cleaving_bladestorm",
| "common.abilities.sword.cleaving_bladestorm"
| "common.abilities.sword.cleaving_dual_whirlwind_slice"
| "common.abilities.sword.cleaving_dual_bladestorm",
) => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
@ -134,6 +136,57 @@ impl Animation for RapidMeleeAnimation {
next.control.orientation.rotate_z(move2 * 1.2);
next.control.position += Vec3::new(0.0, move2 * 12.0, 0.0);
},
Some(
"common.abilities.sword.agile_dual_perforate"
| "common.abilities.sword.agile_dual_flurry",
) => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (
1.0,
anim_time.min(0.5).mul(2.0).powi(2) - anim_time.max(0.5).sub(0.5).mul(2.0),
0.0,
),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - move3;
let move1 = move1 * pullback;
let move2 = move2 * pullback;
let dir = if current_strike % 2 == 1 { 1.0 } else { -1.0 };
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.shl.0, s_a.shl.1, s_a.shl.2);
next.hand_r.orientation = Quaternion::rotation_x(s_a.shl.3);
next.control_l.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control_l.orientation = Quaternion::rotation_x(s_a.sc.3);
next.control_r.position = Vec3::new(-s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control_r.orientation = Quaternion::rotation_x(s_a.sc.3);
next.control_l.orientation.rotate_x(move1 * -1.1);
next.control_l.orientation.rotate_z(move1 * 0.7);
next.control_l.position += Vec3::new(move1 * 1.0, move1 * -1.0, move1 * 4.0);
next.control_r.orientation.rotate_x(move1 * -1.1);
next.control_r.orientation.rotate_z(move1 * -0.7);
next.control_r.position += Vec3::new(move1 * -1.0, move1 * -1.0, move1 * 4.0);
next.chest.orientation.rotate_z(move2 * -1.2 * dir);
next.head.orientation.rotate_z(move2 * 0.6 * dir);
next.belt.orientation.rotate_z(move2 * 0.3 * dir);
next.shorts.orientation.rotate_z(move2 * 0.7 * dir);
next.control_l
.orientation
.rotate_z(move2 * 1.2 * dir.max(0.0));
next.control_l.position += Vec3::new(0.0, move2 * 18.0 * dir.max(0.0), 0.0);
next.control_r
.orientation
.rotate_z(move2 * 1.2 * dir.min(0.0));
next.control_r.position += Vec3::new(0.0, move2 * 18.0 * -(dir.min(0.0)), 0.0);
next.control_l.orientation.rotate_z(move1 * -0.7);
next.control_r.orientation.rotate_z(move1 * 0.7);
},
Some("common.abilities.sword.agile_hundred_cuts") => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),

View File

@ -386,10 +386,11 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id {
"veloren.core.pseudo_abilities.sword.secondary_ability" => imgs.sword_secondary_ability,
"common.abilities.sword.basic_thrust" => imgs.sword_basic_thrust,
"common.abilities.sword.heavy_slam" => imgs.sword_heavy_slam,
"common.abilities.sword.agile_perforate" => imgs.sword_agile_perforate,
"common.abilities.sword.agile_dual_perforate" => imgs.sword_agile_perforate,
"common.abilities.sword.defensive_vital_jab" => imgs.sword_defensive_vital_jab,
"common.abilities.sword.crippling_deep_rend" => imgs.sword_crippling_deep_rend,
"common.abilities.sword.cleaving_spiral_slash" => imgs.sword_cleaving_spiral_slash,
"common.abilities.sword.cleaving_dual_spiral_slash" => imgs.sword_cleaving_spiral_slash,
"veloren.core.pseudo_abilities.sword.crescent_slash" => imgs.sword_crescent_slash,
"common.abilities.sword.basic_crescent_slash" => imgs.sword_basic_crescent_slash,
"common.abilities.sword.heavy_crescent_slash" => imgs.sword_heavy_crescent_slash,
@ -425,6 +426,12 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id {
"common.abilities.sword.defensive_cross_cut" => imgs.sword_defensive_cross_cut,
"common.abilities.sword.crippling_cross_cut" => imgs.sword_crippling_cross_cut,
"common.abilities.sword.cleaving_cross_cut" => imgs.sword_cleaving_cross_cut,
"common.abilities.sword.basic_dual_cross_cut" => imgs.sword_basic_cross_cut,
"common.abilities.sword.heavy_dual_cross_cut" => imgs.sword_heavy_cross_cut,
"common.abilities.sword.agile_dual_cross_cut" => imgs.sword_agile_cross_cut,
"common.abilities.sword.defensive_dual_cross_cut" => imgs.sword_defensive_cross_cut,
"common.abilities.sword.crippling_dual_cross_cut" => imgs.sword_crippling_cross_cut,
"common.abilities.sword.cleaving_dual_cross_cut" => imgs.sword_cleaving_cross_cut,
"veloren.core.pseudo_abilities.sword.finisher" => imgs.sword_finisher,
"common.abilities.sword.basic_mighty_strike" => imgs.sword_basic_mighty_strike,
"common.abilities.sword.heavy_guillotine" => imgs.sword_heavy_guillotine,
@ -432,6 +439,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id {
"common.abilities.sword.defensive_counter" => imgs.sword_defensive_counter,
"common.abilities.sword.crippling_mutilate" => imgs.sword_crippling_mutilate,
"common.abilities.sword.cleaving_bladestorm" => imgs.sword_cleaving_bladestorm,
"common.abilities.sword.cleaving_dual_bladestorm" => imgs.sword_cleaving_bladestorm,
"common.abilities.sword.heavy_sweep" => imgs.sword_heavy_sweep,
"common.abilities.sword.heavy_pommel_strike" => imgs.sword_heavy_pommel_strike,
"common.abilities.sword.agile_quick_draw" => imgs.sword_agile_quick_draw,
@ -441,11 +449,15 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id {
"common.abilities.sword.crippling_gouge" => imgs.sword_crippling_gouge,
"common.abilities.sword.crippling_hamstring" => imgs.sword_crippling_hamstring,
"common.abilities.sword.cleaving_whirlwind_slice" => imgs.sword_cleaving_whirlwind_slice,
"common.abilities.sword.cleaving_dual_whirlwind_slice" => {
imgs.sword_cleaving_whirlwind_slice
},
"common.abilities.sword.cleaving_earth_splitter" => imgs.sword_cleaving_earth_splitter,
"common.abilities.sword.heavy_fortitude" => imgs.sword_heavy_fortitude,
"common.abilities.sword.heavy_pillar_thrust" => imgs.sword_heavy_pillar_thrust,
"common.abilities.sword.agile_dancing_edge" => imgs.sword_agile_dancing_edge,
"common.abilities.sword.agile_flurry" => imgs.sword_agile_flurry,
"common.abilities.sword.agile_dual_flurry" => imgs.sword_agile_flurry,
"common.abilities.sword.defensive_stalwart_sword" => imgs.sword_defensive_stalwart_sword,
"common.abilities.sword.defensive_deflect" => imgs.sword_defensive_deflect,
"common.abilities.sword.crippling_eviscerate" => imgs.sword_crippling_eviscerate,