Deprecated combo melee character state

This commit is contained in:
Sam 2023-12-28 19:02:10 -05:00
parent afb1e04e5f
commit f65d449aa3
76 changed files with 2673 additions and 2865 deletions

View File

@ -1,55 +1,57 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 8.0, kind: Slash(
damage_increase: 1.0, damage: 8,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 8,
knockback: 8.0, energy_regen: 0,
range: 3.5, ),
angle: 50.0, range: 3.5,
base_buildup_duration: 0.4, angle: 50.0,
base_swing_duration: 0.08, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
buildup_duration: 0.4,
swing_duration: 0.08,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.5, recover_duration: 0.5,
forward_movement: 2.5, movement: (
damage_kind: Slashing, swing: Some(Forward(2.5)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.7,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
( (
stage: 2, melee_constructor: (
base_damage: 10.0, kind: Slash(
damage_increase: 1.5, damage: 10,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 12,
knockback: 12.0, energy_regen: 0,
range: 3.5, ),
angle: 30.0, range: 3.5,
base_buildup_duration: 0.7, angle: 30.0,
base_swing_duration: 0.1, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
buildup_duration: 0.7,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.7, recover_duration: 0.7,
forward_movement: 2.0, movement: (
damage_kind: Slashing, swing: Some(Forward(2.0)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.7,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,33 +1,31 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 74, kind: Bash(
damage_increase: 0, damage: 74,
base_poise_damage: 27.5, poise: 27.5,
poise_damage_increase: 0, knockback: 9,
knockback: 9.0, energy_regen: 0,
range: 3.0, ),
angle: 60.0, range: 3.0,
base_buildup_duration: 1.4, angle: 60.0,
base_swing_duration: 0.1, damage_effect: Some(Buff((
kind: Ensnared,
dur_secs: 6.0,
strength: Value(0.5),
chance: 0.6,
))),
),
buildup_duration: 1.4,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
damage_effect: Some(Buff(( ),
kind: Ensnared, ori_modifier: 0.8,
dur_secs: 6.0,
strength: DamageFraction(0.1),
chance: 0.6,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.8,
) )

View File

@ -1,33 +1,31 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 50, kind: Stab(
damage_increase: 0, damage: 50,
base_poise_damage: 16, poise: 16,
poise_damage_increase: 0, knockback: 2,
knockback: 2.0, energy_regen: 0,
range: 3.0, ),
angle: 60.0, range: 3.0,
base_buildup_duration: 0.8, angle: 60.0,
base_swing_duration: 0.1, damage_effect: Some(Buff((
kind: Poisoned,
dur_secs: 7.0,
strength: DamageFraction(0.6),
chance: 0.4,
))),
),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 1.0, movement: (
damage_kind: Piercing, swing: Some(Forward(1.0)),
damage_effect: Some(Buff(( ),
kind: Poisoned, ori_modifier: 0.8,
dur_secs: 7.0,
strength: DamageFraction(0.6),
chance: 0.4,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.8,
) )

View File

@ -1,27 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 54, kind: Bash(
damage_increase: 0, damage: 54,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 5,
knockback: 5.0, energy_regen: 0,
range: 3.0, ),
angle: 60.0, range: 3.0,
base_buildup_duration: 0.8, angle: 60.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.5,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.5,
) )

View File

@ -1,33 +1,31 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 60, kind: Stab(
damage_increase: 0, damage: 60,
base_poise_damage: 21, poise: 21,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 3.0, ),
angle: 60.0, range: 3.0,
base_buildup_duration: 0.8, angle: 60.0,
base_swing_duration: 0.1, damage_effect: Some(Buff((
kind: Poisoned,
dur_secs: 9.0,
strength: DamageFraction(0.7),
chance: 0.8,
))),
),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 1.0, movement: (
damage_kind: Piercing, swing: Some(Forward(1.0)),
damage_effect: Some(Buff(( ),
kind: Poisoned, ori_modifier: 0.8,
dur_secs: 9.0,
strength: DamageFraction(0.7),
chance: 0.8,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.8,
) )

View File

@ -1,27 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 44, kind: Bash(
damage_increase: 0, damage: 44,
base_poise_damage: 14, poise: 14,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 3.0, ),
angle: 60.0, range: 3.0,
base_buildup_duration: 0.8, angle: 60.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.6,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.6,
) )

View File

@ -1,27 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 28.0, kind: Bash(
damage_increase: 0, damage: 28,
base_poise_damage: 28, poise: 28,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 3.5, ),
angle: 60.0, range: 3.5,
base_buildup_duration: 1.2, angle: 60.0,
base_swing_duration: 0.1, ),
buildup_duration: 1.2,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 2.0, movement: (
damage_kind: Crushing, swing: Some(Forward(2.0)),
),
ori_modifier: 0.65,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.65,
) )

View File

@ -1,59 +1,65 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 36.0, kind: Bash(
damage_increase: 0, damage: 36,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.8, ),
angle: 30.0, range: 2.8,
base_buildup_duration: 1.4, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 1.4,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.3, recover_duration: 0.3,
forward_movement: 2.0, movement: (
damage_kind: Crushing, swing: Some(Forward(2.0)),
),
ori_modifier: 0.65,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 36.0, kind: Bash(
damage_increase: 0, damage: 36,
base_poise_damage: 18, poise: 18,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.8, ),
angle: 30.0, range: 2.8,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.8,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.3, recover_duration: 0.3,
forward_movement: 1.5, movement: (
damage_kind: Crushing, swing: Some(Forward(1.5)),
),
ori_modifier: 0.65,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 36.0, kind: Bash(
damage_increase: 0, damage: 36,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.8, ),
angle: 30.0, range: 2.8,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.8,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.3, recover_duration: 0.3,
forward_movement: 1.5, movement: (
damage_kind: Crushing, swing: Some(Forward(1.5)),
),
ori_modifier: 0.65,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.65,
) )

View File

@ -1,27 +1,18 @@
ComboMelee( BasicMelee(
stage_data: [ energy_cost: 0,
( buildup_duration: 0.1,
stage: 1, swing_duration: 0.07,
base_damage: 1.0, hit_timing: 0.5,
damage_increase: 0, recover_duration: 0.2,
base_poise_damage: 0, melee_constructor: (
poise_damage_increase: 0, kind: Stab(
knockback: 0.0, damage: 1,
range: 2.5, poise: 0,
angle: 150.0, knockback: 0,
base_buildup_duration: 0.1, energy_regen: 0,
base_swing_duration: 0.07,
hit_timing: 0.5,
base_recover_duration: 0.2,
forward_movement: 0.0,
damage_kind: Piercing,
), ),
], range: 2.5,
initial_energy_gain: 0, angle: 150.0,
max_energy_gain: 0, ),
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.6, ori_modifier: 0.6,
) )

View File

@ -1,31 +1,28 @@
ComboMelee( ComboMelee2(
stage_data: [( strikes: [
stage: 1, (
base_damage: 15.0, melee_constructor: (
damage_increase: 0.75, kind: Bash(
base_poise_damage: 0, damage: 15,
poise_damage_increase: 0, poise: 0,
knockback: 3.5, knockback: 3.5,
range: 4.5, energy_regen: 5,
angle: 50.0, ),
base_buildup_duration: 0.7, range: 4.5,
base_swing_duration: 0.1, angle: 50.0,
hit_timing: 0.5, damage_effect: Some(Buff((
base_recover_duration: 0.45, kind: Frozen,
forward_movement: 0.0, dur_secs: 2.0,
damage_kind: Crushing, strength: Value(0.3),
damage_effect: Some(Buff(( chance: 0.4,
kind: Frozen, ))),
dur_secs: 2.0, ),
strength: Value(0.3), buildup_duration: 0.7,
chance: 0.4, swing_duration: 0.1,
))), hit_timing: 0.5,
)], recover_duration: 0.45,
initial_energy_gain: 5.0, ori_modifier: 1.0,
max_energy_gain: 12.5, ),
energy_increase: 2.5, ],
speed_increase: 0.1, energy_cost_per_strike: 0,
max_speed_increase: 0.4,
scales_from_combo: 2,
ori_modifier: 1.0,
) )

View File

@ -1,49 +1,51 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 32.0, kind: Bash(
damage_increase: 0.0, damage: 32,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0.0, knockback: 5,
knockback: 5.0, energy_regen: 0,
range: 6, ),
angle: 90.0, range: 6.0,
base_buildup_duration: 0.5, angle: 90.0,
base_swing_duration: 0.4, ),
buildup_duration: 0.5,
swing_duration: 0.4,
hit_timing: 0.4, hit_timing: 0.4,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 0.3, movement: (
damage_kind: Crushing, swing: Some(Forward(0.3)),
),
ori_modifier: 0.65,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 36.0, kind: Bash(
damage_increase: 0.0, damage: 36,
base_poise_damage: 40.0, poise: 40,
poise_damage_increase: 0.0, knockback: 10,
knockback: 10.0, energy_regen: 0,
range: 8, ),
angle: 45.0, range: 8.0,
base_buildup_duration: 0.6, angle: 45.0,
base_swing_duration: 0.6, damage_effect: Some(Buff((
kind: Crippled,
dur_secs: 3.0,
strength: DamageFraction(0.1),
chance: 1.0,
))),
),
buildup_duration: 0.6,
swing_duration: 0.6,
hit_timing: 0.3, hit_timing: 0.3,
base_recover_duration: 1.2, recover_duration: 1.2,
forward_movement: 0.2, movement: (
damage_kind: Crushing, swing: Some(Forward(0.2)),
damage_effect: Some(Buff(( ),
kind: Crippled, ori_modifier: 0.65,
dur_secs: 3.0,
strength: DamageFraction(0.1),
chance: 1.0,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.65,
) )

View File

@ -1,55 +1,57 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 35.5, kind: Slash(
damage_increase: 0.0, damage: 35,
base_poise_damage: 15.0, poise: 15,
poise_damage_increase: 0.0, knockback: 2,
knockback: 2.0, energy_regen: 0,
range: 6.0, ),
angle: 60.0, range: 6.0,
base_buildup_duration: 0.8, angle: 60.0,
base_swing_duration: 0.1, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 3.0,
strength: DamageFraction(0.05),
chance: 0.3,
))),
),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.4, hit_timing: 0.4,
base_recover_duration: 0.3, recover_duration: 0.3,
forward_movement: 0.8, movement: (
damage_kind: Slashing, swing: Some(Forward(0.8)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.6,
dur_secs: 3.0,
strength: DamageFraction(0.05),
chance: 0.3,
))),
), ),
( (
stage: 2, melee_constructor: (
base_damage: 38.5, kind: Slash(
damage_increase: 0.0, damage: 38.5,
base_poise_damage: 20.0, poise: 20,
poise_damage_increase: 0.0, knockback: 8,
knockback: 8.0, energy_regen: 0,
range: 6.0, ),
angle: 60.0, range: 6.0,
base_buildup_duration: 0.7, angle: 60.0,
base_swing_duration: 0.1, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 3.0,
strength: DamageFraction(0.1),
chance: 0.15,
))),
),
buildup_duration: 0.7,
swing_duration: 0.1,
hit_timing: 0.4, hit_timing: 0.4,
base_recover_duration: 1.3, recover_duration: 1.3,
forward_movement: 0.2, movement: (
damage_kind: Slashing, swing: Some(Forward(0.2)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.6,
dur_secs: 3.0,
strength: DamageFraction(0.1),
chance: 0.15,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.6,
) )

View File

@ -1,27 +1,18 @@
ComboMelee( BasicMelee(
stage_data: [ energy_cost: 0,
( buildup_duration: 1.0,
stage: 1, swing_duration: 0.2,
base_damage: 40.0, hit_timing: 0.5,
damage_increase: 0, recover_duration: 1.0,
base_poise_damage: 12, melee_constructor: (
poise_damage_increase: 0, kind: Bash(
knockback: 5.0, damage: 40,
range: 3.5, poise: 12,
angle: 60.0, knockback: 5,
base_buildup_duration: 1.0, energy_regen: 0,
base_swing_duration: 0.2,
hit_timing: 0.5,
base_recover_duration: 1.0,
forward_movement: 0.5,
damage_kind: Crushing,
), ),
], range: 3.5,
initial_energy_gain: 0, angle: 60.0,
max_energy_gain: 0, ),
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.6, ori_modifier: 0.6,
) )

View File

@ -1,27 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 40.0, kind: Bash(
damage_increase: 0, damage: 40,
base_poise_damage: 28, poise: 28,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 3.5, ),
angle: 60.0, range: 3.5,
base_buildup_duration: 1.0, angle: 60.0,
base_swing_duration: 0.075, ),
buildup_duration: 1.0,
swing_duration: 0.075,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 2.0, movement: (
damage_kind: Crushing, swing: Some(Forward(2.0)),
),
ori_modifier: 0.65,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.65,
) )

View File

@ -1,55 +1,57 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 18.0, kind: Slash(
damage_increase: 1.0, damage: 18,
base_poise_damage: 0, poise: 0,
poise_damage_increase: 0, knockback: 4,
knockback: 4.0, energy_regen: 0,
range: 3.5, ),
angle: 50.0, range: 3.5,
base_buildup_duration: 1.2, angle: 50.0,
base_swing_duration: 0.12, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
buildup_duration: 1.2,
swing_duration: 0.12,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 1.2, recover_duration: 1.2,
forward_movement: 3.5, movement: (
damage_kind: Slashing, swing: Some(Forward(3.5)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.6,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
( (
stage: 2, melee_constructor: (
base_damage: 26.0, kind: Slash(
damage_increase: 1.5, damage: 26,
base_poise_damage: 0, poise: 0,
poise_damage_increase: 0, knockback: 16,
knockback: 16.0, energy_regen: 0,
range: 5.5, ),
angle: 15.0, range: 5.5,
base_buildup_duration: 1.0, angle: 15.0,
base_swing_duration: 0.15, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
buildup_duration: 1.0,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 2.4, recover_duration: 2.4,
forward_movement: 4.5, movement: (
damage_kind: Slashing, swing: Some(Forward(4.5)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.6,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.6,
) )

View File

@ -1,27 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 40.0, kind: Bash(
damage_increase: 0, damage: 40,
base_poise_damage: 28, poise: 28,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.0, ),
angle: 60.0, range: 2.0,
base_buildup_duration: 1.2, angle: 60.0,
base_swing_duration: 0.07, ),
buildup_duration: 1.2,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 3.0, movement: (
damage_kind: Crushing, swing: Some(Forward(3.0)),
),
ori_modifier: 0.6,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.6,
) )

View File

@ -1,59 +1,65 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 28.0, kind: Bash(
damage_increase: 0, damage: 28,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.2, ),
angle: 30.0, range: 2.2,
base_buildup_duration: 1.3, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 1.3,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 2.0, movement: (
damage_kind: Crushing, swing: Some(Forward(2.0)),
),
ori_modifier: 0.65,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 28.0, kind: Bash(
damage_increase: 0, damage: 28,
base_poise_damage: 18, poise: 18,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.2, ),
angle: 30.0, range: 2.2,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.8,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 1.5, movement: (
damage_kind: Crushing, swing: Some(Forward(1.5)),
),
ori_modifier: 0.65,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 28.0, kind: Bash(
damage_increase: 0, damage: 28,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.2, ),
angle: 30.0, range: 2.2,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.8,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 1.5, movement: (
damage_kind: Crushing, swing: Some(Forward(1.5)),
),
ori_modifier: 0.65,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.65,
) )

View File

@ -1,59 +1,65 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 44.0, kind: Bash(
damage_increase: 0, damage: 44,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 1.3, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 1.3,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 2.0, movement: (
damage_kind: Crushing, swing: Some(Forward(2.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 44.0, kind: Bash(
damage_increase: 0, damage: 44,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 1.5, movement: (
damage_kind: Crushing, swing: Some(Forward(1.5)),
),
ori_modifier: 0.7,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 44.0, kind: Bash(
damage_increase: 0, damage: 44,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 1.5, movement: (
damage_kind: Crushing, swing: Some(Forward(1.5)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,75 +1,85 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 12.0, kind: Bash(
damage_increase: 0, damage: 12,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 1,
knockback: 1.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 1.2, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 1.2,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.2, recover_duration: 0.2,
forward_movement: 1.5, movement: (
damage_kind: Crushing, swing: Some(Forward(1.5)),
),
ori_modifier: 0.8,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 12.0, kind: Bash(
damage_increase: 0, damage: 12,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 1,
knockback: 1.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.3, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.3,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.2, recover_duration: 0.2,
forward_movement: 0.8, movement: (
damage_kind: Crushing, swing: Some(Forward(0.8)),
),
ori_modifier: 0.8,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 12.0, kind: Bash(
damage_increase: 0, damage: 12,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 1,
knockback: 1.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.4, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.4,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.2, recover_duration: 0.2,
forward_movement: 0.8, movement: (
damage_kind: Crushing, swing: Some(Forward(0.8)),
),
ori_modifier: 0.8,
), ),
( (
stage: 4, melee_constructor: (
base_damage: 12.0, kind: Bash(
damage_increase: 0, damage: 12,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 8,
knockback: 8.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.4, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.4,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.2, recover_duration: 0.2,
forward_movement: 0.8, movement: (
damage_kind: Crushing, swing: Some(Forward(0.8)),
),
ori_modifier: 0.8,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.8,
) )

View File

@ -1,59 +1,65 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 16.0, kind: Bash(
damage_increase: 0, damage: 16,
base_poise_damage: 0, poise: 22,
poise_damage_increase: 22, knockback: 10,
knockback: 10.0, energy_regen: 0,
range: 2.2, ),
angle: 30.0, range: 2.2,
base_buildup_duration: 1.3, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 1.3,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 2.0, movement: (
damage_kind: Crushing, swing: Some(Forward(2.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 16.0, kind: Bash(
damage_increase: 0, damage: 16,
base_poise_damage: 22, poise: 22,
poise_damage_increase: 0, knockback: 10,
knockback: 10.0, energy_regen: 0,
range: 2.2, ),
angle: 30.0, range: 2.2,
base_buildup_duration: 0.4, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.4,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 16.0, kind: Bash(
damage_increase: 0, damage: 16,
base_poise_damage: 22, poise: 22,
poise_damage_increase: 0, knockback: 10,
knockback: 10.0, energy_regen: 0,
range: 2.2, ),
angle: 30.0, range: 2.2,
base_buildup_duration: 0.2, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.2,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,27 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 20.0, kind: Bash(
damage_increase: 0, damage: 20,
base_poise_damage: 28, poise: 28,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 2.7, ),
angle: 60.0, range: 2.7,
base_buildup_duration: 0.8, angle: 60.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,59 +1,62 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 10.0, kind: Bash(
damage_increase: 0, damage: 10,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 5,
knockback: 5.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.9, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.9,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 10.0, kind: Bash(
damage_increase: 0, damage: 10,
base_poise_damage: 18, poise: 18,
poise_damage_increase: 0, knockback: 5,
knockback: 5.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.8,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 0.0, ori_modifier: 0.7,
damage_kind: Crushing,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 10.0, kind: Bash(
damage_increase: 0, damage: 10,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 5,
knockback: 5.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.8,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,43 +1,45 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 50.0, kind: Bash(
damage_increase: 0, damage: 50,
base_poise_damage: 22, poise: 22,
poise_damage_increase: 0, knockback: 4,
knockback: 4.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 1.3, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 1.3,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 74.0, kind: Bash(
damage_increase: 0, damage: 74,
base_poise_damage: 0, poise: 22,
poise_damage_increase: 22, knockback: 4,
knockback: 4.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 0.5, movement: (
damage_kind: Crushing, swing: Some(Forward(0.5)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,43 +1,45 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 16.0, kind: Bash(
damage_increase: 0, damage: 16,
base_poise_damage: 30, poise: 30,
poise_damage_increase: 0, knockback: 4,
knockback: 4.0, energy_regen: 0,
range: 2.2, ),
angle: 30.0, range: 2.2,
base_buildup_duration: 1.3, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 1.3,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.8,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 16.0, kind: Bash(
damage_increase: 0, damage: 16,
base_poise_damage: 30, poise: 30,
poise_damage_increase: 0, knockback: 4,
knockback: 4.0, energy_regen: 0,
range: 2.2, ),
angle: 30.0, range: 2.2,
base_buildup_duration: 0.8, angle: 30.0,
base_swing_duration: 0.1, ),
buildup_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 1.5, movement: (
damage_kind: Crushing, swing: Some(Forward(1.5)),
),
ori_modifier: 0.8,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.8,
) )

View File

@ -1,59 +1,65 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 20.0, kind: Bash(
damage_increase: 0, damage: 20,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 5,
knockback: 5.0, energy_regen: 0,
range: 2.2, ),
angle: 40.0, range: 2.2,
base_buildup_duration: 1.2, angle: 40.0,
base_swing_duration: 0.15, ),
buildup_duration: 1.2,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 0.3, movement: (
damage_kind: Crushing, swing: Some(Forward(0.3)),
),
ori_modifier: 0.8,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 20.0, kind: Bash(
damage_increase: 0, damage: 20,
base_poise_damage: 17, poise: 17,
poise_damage_increase: 0, knockback: 5,
knockback: 5.0, energy_regen: 0,
range: 2.2, ),
angle: 40.0, range: 2.2,
base_buildup_duration: 0.8, angle: 40.0,
base_swing_duration: 0.15, ),
buildup_duration: 0.8,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 0.5, movement: (
damage_kind: Crushing, swing: Some(Forward(0.5)),
),
ori_modifier: 0.8,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 20.0, kind: Bash(
damage_increase: 0, damage: 20,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 5,
knockback: 5.0, energy_regen: 0,
range: 2.2, ),
angle: 40.0, range: 2.2,
base_buildup_duration: 0.8, angle: 40.0,
base_swing_duration: 0.15, ),
buildup_duration: 0.8,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 0.5, movement: (
damage_kind: Crushing, swing: Some(Forward(0.5)),
),
ori_modifier: 0.8,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.8,
) )

View File

@ -1,27 +1,18 @@
ComboMelee( BasicMelee(
stage_data: [ energy_cost: 0,
( buildup_duration: 0.6,
stage: 1, swing_duration: 0.15,
base_damage: 6.0, hit_timing: 0.5,
damage_increase: 0, recover_duration: 0.6,
base_poise_damage: 10, melee_constructor: (
poise_damage_increase: 0, kind: Bash(
knockback: 1.0, damage: 6,
range: 1.5, poise: 10,
angle: 50.0, knockback: 1,
base_buildup_duration: 0.6, energy_regen: 0,
base_swing_duration: 0.15,
hit_timing: 0.5,
base_recover_duration: 0.6,
forward_movement: 1.0,
damage_kind: Crushing,
), ),
], range: 1.5,
initial_energy_gain: 0, angle: 50.0,
max_energy_gain: 0, ),
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7, ori_modifier: 0.7,
) )

View File

@ -1,43 +1,45 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 28.0, kind: Stab(
damage_increase: 0, damage: 28,
base_poise_damage: 7.5, poise: 7.5,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 5,
range: 3, ),
angle: 75.0, range: 3.0,
base_buildup_duration: 1.2, angle: 75.0,
base_swing_duration: 0.07, ),
buildup_duration: 1.2,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.3, recover_duration: 0.3,
forward_movement: 0.25, movement: (
damage_kind: Piercing, swing: Some(Forward(0.25)),
),
ori_modifier: 0.5,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 28.0, kind: Stab(
damage_increase: 0, damage: 28,
base_poise_damage: 7.5, poise: 7.5,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 5,
range: 3, ),
angle: 75.0, range: 3.0,
base_buildup_duration: 0.2, angle: 75.0,
base_swing_duration: 0.07, ),
buildup_duration: 0.2,
swing_duration: 0.07,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 0.25, movement: (
damage_kind: Piercing, swing: Some(Forward(0.25)),
),
ori_modifier: 0.5,
), ),
], ],
initial_energy_gain: 5, energy_cost_per_strike: 0,
max_energy_gain: 5,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.65,
) )

View File

@ -1,27 +1,18 @@
ComboMelee( BasicMelee(
stage_data: [ energy_cost: 0,
( buildup_duration: 0.1,
stage: 1, swing_duration: 0.07,
base_damage: 1.0, hit_timing: 0.5,
damage_increase: 0, recover_duration: 0.2,
base_poise_damage: 0, melee_constructor: (
poise_damage_increase: 0, kind: Stab(
knockback: 0.0, damage: 1,
range: 2.5, poise: 0,
angle: 150.0, knockback: 0,
base_buildup_duration: 0.1, energy_regen: 0,
base_swing_duration: 0.07,
hit_timing: 0.5,
base_recover_duration: 0.2,
forward_movement: 0.0,
damage_kind: Piercing,
), ),
], range: 2.5,
initial_energy_gain: 0, angle: 150.0,
max_energy_gain: 0, ),
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.6, ori_modifier: 0.6,
) )

View File

@ -1,27 +1,18 @@
ComboMelee( BasicMelee(
stage_data: [ energy_cost: 0,
( buildup_duration: 1.8,
stage: 1, swing_duration: 0.1,
base_damage: 60.0, hit_timing: 0.5,
damage_increase: 0, recover_duration: 1.8,
base_poise_damage: 40, melee_constructor: (
poise_damage_increase: 0, kind: Bash(
knockback: 3.0, damage: 60,
range: 3.5, poise: 40,
angle: 60.0, knockback: 3,
base_buildup_duration: 1.8, energy_regen: 0,
base_swing_duration: 0.1,
hit_timing: 0.5,
base_recover_duration: 1.8,
forward_movement: 3.0,
damage_kind: Crushing,
), ),
], range: 3.5,
initial_energy_gain: 0, angle: 60.0,
max_energy_gain: 0, ),
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7, ori_modifier: 0.7,
) )

View File

@ -1,27 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 54.0, kind: Bash(
damage_increase: 0, damage: 54,
base_poise_damage: 40, poise: 40,
poise_damage_increase: 0, knockback: 4,
knockback: 4.0, energy_regen: 0,
range: 7.5, ),
angle: 60.0, range: 7.5,
base_buildup_duration: 0.8, angle: 60.0,
base_swing_duration: 0.15, ),
buildup_duration: 0.8,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 3.0, movement: (
damage_kind: Crushing, swing: Some(Forward(3.0)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,59 +1,65 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 40.0, kind: Bash(
damage_increase: 0, damage: 40,
base_poise_damage: 32.5, poise: 32.5,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 7.5, ),
angle: 30.0, range: 7.5,
base_buildup_duration: 1.3, angle: 30.0,
base_swing_duration: 0.15, ),
buildup_duration: 1.3,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.5, recover_duration: 0.5,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 50.0, kind: Bash(
damage_increase: 0, damage: 50,
base_poise_damage: 32.5, poise: 32.5,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 5.5, ),
angle: 30.0, range: 5.5,
base_buildup_duration: 0.2, angle: 30.0,
base_swing_duration: 0.15, ),
buildup_duration: 0.2,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.3, recover_duration: 0.3,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 60.0, kind: Bash(
damage_increase: 0, damage: 60,
base_poise_damage: 32.5, poise: 32.5,
poise_damage_increase: 0, knockback: 25,
knockback: 25.0, energy_regen: 0,
range: 5.5, ),
angle: 30.0, range: 5.5,
base_buildup_duration: 0.4, angle: 30.0,
base_swing_duration: 0.125, ),
buildup_duration: 0.4,
swing_duration: 0.125,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 1.6, recover_duration: 1.6,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,27 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 22.0, kind: Bash(
damage_increase: 0, damage: 22,
base_poise_damage: 28, poise: 28,
poise_damage_increase: 0, knockback: 2,
knockback: 2.0, energy_regen: 0,
range: 3.0, ),
angle: 15.0, range: 3.0,
base_buildup_duration: 0.8, angle: 15.0,
base_swing_duration: 0.15, ),
buildup_duration: 0.8,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.8, recover_duration: 0.8,
forward_movement: 3.0, movement: (
damage_kind: Crushing, swing: Some(Forward(3.0)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,59 +1,65 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 16.5, kind: Bash(
damage_increase: 0, damage: 16.5,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 3.0, ),
angle: 15.0, range: 3.0,
base_buildup_duration: 0.95, angle: 15.0,
base_swing_duration: 0.15, ),
buildup_duration: 0.95,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.50, recover_duration: 0.5,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.6,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 30.0, kind: Bash(
damage_increase: 0, damage: 30,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 3.0, ),
angle: 15.0, range: 3.0,
base_buildup_duration: 0.65, angle: 15.0,
base_swing_duration: 0.15, ),
buildup_duration: 0.65,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.50, recover_duration: 0.5,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.6,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 36.0, kind: Bash(
damage_increase: 0, damage: 36,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 3.0, ),
angle: 15.0, range: 3.0,
base_buildup_duration: 0.525, angle: 15.0,
base_swing_duration: 0.125, ),
buildup_duration: 0.525,
swing_duration: 0.125,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 1.25, recover_duration: 1.25,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.6,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.6,
) )

View File

@ -1,59 +1,65 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 30.0, kind: Bash(
damage_increase: 0, damage: 30,
base_poise_damage: 17.5, poise: 17.5,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 4.5, ),
angle: 30.0, range: 4.5,
base_buildup_duration: 1.3, angle: 30.0,
base_swing_duration: 0.15, ),
buildup_duration: 1.3,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.5, recover_duration: 0.5,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 30.0, kind: Bash(
damage_increase: 0, damage: 30,
base_poise_damage: 20.5, poise: 20.5,
poise_damage_increase: 0, knockback: 3,
knockback: 3.0, energy_regen: 0,
range: 4.5, ),
angle: 30.0, range: 4.5,
base_buildup_duration: 0.2, angle: 30.0,
base_swing_duration: 0.15, ),
buildup_duration: 0.2,
swing_duration: 0.15,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.3, recover_duration: 0.3,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
( (
stage: 3, melee_constructor: (
base_damage: 30.0, kind: Bash(
damage_increase: 0, damage: 30,
base_poise_damage: 22.5, poise: 22.5,
poise_damage_increase: 0, knockback: 25,
knockback: 25.0, energy_regen: 0,
range: 5.5, ),
angle: 30.0, range: 5.5,
base_buildup_duration: 0.4, angle: 30.0,
base_swing_duration: 0.125, ),
buildup_duration: 0.4,
swing_duration: 0.125,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 1.6, recover_duration: 1.6,
forward_movement: 1.0, movement: (
damage_kind: Crushing, swing: Some(Forward(1.0)),
),
ori_modifier: 0.7,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,27 +1,18 @@
ComboMelee( BasicMelee(
stage_data: [ energy_cost: 0,
( buildup_duration: 1.2,
stage: 1, swing_duration: 0.4,
base_damage: 36.0, hit_timing: 0.5,
damage_increase: 0, recover_duration: 0.8,
base_poise_damage: 40, melee_constructor: (
poise_damage_increase: 0, kind: Bash(
knockback: 3.0, damage: 36,
range: 2.5, poise: 40,
angle: 30.0, knockback: 3,
base_buildup_duration: 1.2, energy_regen: 0,
base_swing_duration: 0.4,
hit_timing: 0.5,
base_recover_duration: 0.8,
forward_movement: 5.0,
damage_kind: Crushing,
), ),
], range: 2.5,
initial_energy_gain: 0, angle: 30.0,
max_energy_gain: 0, ),
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7, ori_modifier: 0.7,
) )

View File

@ -1,33 +1,25 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 2.0, kind: Slash(
damage_increase: 1.0, damage: 2,
base_poise_damage: 8, poise: 8,
poise_damage_increase: 0, knockback: 8,
knockback: 8.0, energy_regen: 0,
range: 3.5, ),
angle: 50.0, range: 3.5,
base_buildup_duration: 0.1, angle: 50.0,
base_swing_duration: 0.05, ),
buildup_duration: 0.1,
swing_duration: 0.05,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.05, recover_duration: 0.05,
forward_movement: 1.0, movement: (
damage_kind: Slashing, swing: Some(Forward(1.0)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.7,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -1,4 +1,4 @@
ComboMelee( ComboMeleeDeprecated(
stage_data: [( stage_data: [(
stage: 1, stage: 1,
base_damage: 15.0, base_damage: 15.0,

View File

@ -1,43 +1,45 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 24.0, kind: Bash(
damage_increase: 1.0, damage: 24,
base_poise_damage: 40, poise: 40,
poise_damage_increase: 0, knockback: 4,
knockback: 4.0, energy_regen: 0,
range: 4.5, ),
angle: 50.0, range: 4.5,
base_buildup_duration: 0.6, angle: 50.0,
base_swing_duration: 0.08, ),
buildup_duration: 0.6,
swing_duration: 0.08,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.6, recover_duration: 0.6,
forward_movement: 3.5, movement: (
damage_kind: Crushing, swing: Some(Forward(3.5)),
),
ori_modifier: 0.65,
), ),
( (
stage: 2, melee_constructor: (
base_damage: 32.0, kind: Bash(
damage_increase: 1.5, damage: 32,
base_poise_damage: 40, poise: 40,
poise_damage_increase: 0, knockback: 16,
knockback: 16.0, energy_regen: 0,
range: 2.5, ),
angle: 30.0, range: 2.5,
base_buildup_duration: 0.6, angle: 30.0,
base_swing_duration: 0.25, ),
buildup_duration: 0.6,
swing_duration: 0.25,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 1.2, recover_duration: 1.2,
forward_movement: 2.0, movement: (
damage_kind: Crushing, swing: Some(Forward(2.0)),
),
ori_modifier: 0.65,
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.65,
) )

View File

@ -1,55 +1,57 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 6.5, kind: Stab(
damage_increase: 0, damage: 6.5,
base_poise_damage: 18, poise: 18,
poise_damage_increase: 0, knockback: 4,
knockback: 4.0, energy_regen: 0,
range: 2.5, ),
angle: 15.0, range: 2.5,
base_buildup_duration: 0.35, angle: 15.0,
base_swing_duration: 0.075, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
buildup_duration: 0.35,
swing_duration: 0.075,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.4, recover_duration: 0.4,
forward_movement: 0.7, movement: (
damage_kind: Piercing, swing: Some(Forward(0.7)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.75,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
( (
stage: 2, melee_constructor: (
base_damage: 8.0, kind: Stab(
damage_increase: 0, damage: 8,
base_poise_damage: 18, poise: 18,
poise_damage_increase: 0, knockback: 7,
knockback: 7.0, energy_regen: 0,
range: 2.5, ),
angle: 15.0, range: 2.5,
base_buildup_duration: 0.5, angle: 15.0,
base_swing_duration: 0.1, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
buildup_duration: 0.5,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.5, recover_duration: 0.5,
forward_movement: 0.7, movement: (
damage_kind: Piercing, swing: Some(Forward(0.7)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.75,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 3.0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 2,
ori_modifier: 0.75,
) )

View File

@ -1,55 +1,57 @@
ComboMelee( ComboMelee2(
stage_data: [ strikes: [
( (
stage: 1, melee_constructor: (
base_damage: 8.0, kind: Slash(
damage_increase: 1.0, damage: 8,
base_poise_damage: 15, poise: 15,
poise_damage_increase: 0, knockback: 8,
knockback: 8.0, energy_regen: 0,
range: 3.5, ),
angle: 50.0, range: 3.5,
base_buildup_duration: 0.4, angle: 50.0,
base_swing_duration: 0.08, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
buildup_duration: 0.4,
swing_duration: 0.08,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.5, recover_duration: 0.5,
forward_movement: 2.5, movement: (
damage_kind: Slashing, swing: Some(Forward(2.5)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.7,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
( (
stage: 2, melee_constructor: (
base_damage: 10.0, kind: Slash(
damage_increase: 1.5, damage: 10,
base_poise_damage: 20, poise: 20,
poise_damage_increase: 0, knockback: 12,
knockback: 12.0, energy_regen: 0,
range: 3.5, ),
angle: 30.0, range: 3.5,
base_buildup_duration: 0.7, angle: 30.0,
base_swing_duration: 0.1, damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
buildup_duration: 0.7,
swing_duration: 0.1,
hit_timing: 0.5, hit_timing: 0.5,
base_recover_duration: 0.7, recover_duration: 0.7,
forward_movement: 2.0, movement: (
damage_kind: Slashing, swing: Some(Forward(2.0)),
damage_effect: Some(Buff(( ),
kind: Bleeding, ori_modifier: 0.7,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
), ),
], ],
initial_energy_gain: 0, energy_cost_per_strike: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
ori_modifier: 0.7,
) )

View File

@ -397,27 +397,6 @@
threshold: 0.7, threshold: 0.7,
subtitle: "subtitle-hammer-attack", subtitle: "subtitle-hammer-attack",
), ),
Attack(ComboMelee(Action, 1), Sword): (
files: [
"voxygen.audio.sfx.abilities.swing_sword",
],
threshold: 0.7,
subtitle: "subtitle-sword_attack",
),
Attack(ComboMelee(Action, 2), Sword): (
files: [
"voxygen.audio.sfx.abilities.separated_second_swing",
],
threshold: 0.7,
subtitle: "subtitle-sword_attack",
),
Attack(ComboMelee(Action, 3), Sword): (
files: [
"voxygen.audio.sfx.abilities.separated_third_swing",
],
threshold: 0.7,
subtitle: "subtitle-sword_attack",
),
Inventory(CollectedTool(Sword)): ( Inventory(CollectedTool(Sword)): (
files: [ files: [
"voxygen.audio.sfx.inventory.pickup_sword", "voxygen.audio.sfx.inventory.pickup_sword",
@ -443,7 +422,7 @@
threshold: 0.5, threshold: 0.5,
subtitle: "subtitle-unwield_hammer", subtitle: "subtitle-unwield_hammer",
), ),
Attack(ComboMelee(Action, 1), Hammer): ( Attack(ComboMeleeDeprecated(Action, 1), Hammer): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",
], ],
@ -489,20 +468,6 @@
threshold: 0.5, threshold: 0.5,
subtitle: "subtitle-unwield_axe", subtitle: "subtitle-unwield_axe",
), ),
Attack(ComboMelee(Action, 1), Axe): (
files: [
"voxygen.audio.sfx.abilities.swing",
],
threshold: 0.7,
subtitle: "subtitle-axe_attack",
),
Attack(ComboMelee(Action, 2), Axe): (
files: [
"voxygen.audio.sfx.abilities.swing",
],
threshold: 0.7,
subtitle: "subtitle-axe_attack",
),
Attack(RapidMelee(Action), Axe): ( Attack(RapidMelee(Action), Axe): (
files: [ files: [
"voxygen.audio.sfx.abilities.swing", "voxygen.audio.sfx.abilities.swing",

View File

@ -615,7 +615,7 @@ pub enum CharacterAbilityType {
ChargedRanged, ChargedRanged,
DashMelee(StageSection), DashMelee(StageSection),
BasicBlock, BasicBlock,
ComboMelee(StageSection, u32), ComboMeleeDeprecated(StageSection, u32),
ComboMelee2(StageSection), ComboMelee2(StageSection),
FinisherMelee(StageSection), FinisherMelee(StageSection),
DiveMelee(StageSection), DiveMelee(StageSection),
@ -642,7 +642,9 @@ impl From<&CharacterState> for CharacterAbilityType {
CharacterState::BasicBlock(_) => Self::BasicBlock, CharacterState::BasicBlock(_) => Self::BasicBlock,
CharacterState::LeapMelee(data) => Self::LeapMelee(data.stage_section), CharacterState::LeapMelee(data) => Self::LeapMelee(data.stage_section),
CharacterState::LeapShockwave(data) => Self::LeapShockwave(data.stage_section), CharacterState::LeapShockwave(data) => Self::LeapShockwave(data.stage_section),
CharacterState::ComboMelee(data) => Self::ComboMelee(data.stage_section, data.stage), CharacterState::ComboMeleeDeprecated(data) => {
Self::ComboMeleeDeprecated(data.stage_section, data.stage)
},
CharacterState::ComboMelee2(data) => Self::ComboMelee2(data.stage_section), CharacterState::ComboMelee2(data) => Self::ComboMelee2(data.stage_section),
CharacterState::FinisherMelee(data) => Self::FinisherMelee(data.stage_section), CharacterState::FinisherMelee(data) => Self::FinisherMelee(data.stage_section),
CharacterState::DiveMelee(data) => Self::DiveMelee(data.stage_section), CharacterState::DiveMelee(data) => Self::DiveMelee(data.stage_section),
@ -771,7 +773,7 @@ pub enum CharacterAbility {
#[serde(default)] #[serde(default)]
meta: AbilityMeta, meta: AbilityMeta,
}, },
ComboMelee { ComboMeleeDeprecated {
stage_data: Vec<combo_melee::Stage<f32>>, stage_data: Vec<combo_melee::Stage<f32>>,
initial_energy_gain: f32, initial_energy_gain: f32,
max_energy_gain: f32, max_energy_gain: f32,
@ -1134,7 +1136,7 @@ impl CharacterAbility {
(data.physics.on_ground.is_none() || buildup_duration.is_some()) (data.physics.on_ground.is_none() || buildup_duration.is_some())
&& update.energy.try_change_by(-*energy_cost).is_ok() && update.energy.try_change_by(-*energy_cost).is_ok()
}, },
CharacterAbility::ComboMelee { .. } CharacterAbility::ComboMeleeDeprecated { .. }
| CharacterAbility::Boost { .. } | CharacterAbility::Boost { .. }
| CharacterAbility::BasicBeam { .. } | CharacterAbility::BasicBeam { .. }
| CharacterAbility::Blink { .. } | CharacterAbility::Blink { .. }
@ -1303,7 +1305,7 @@ impl CharacterAbility {
*recover_duration /= stats.speed; *recover_duration /= stats.speed;
*energy_cost /= stats.energy_efficiency; *energy_cost /= stats.energy_efficiency;
}, },
ComboMelee { ComboMeleeDeprecated {
ref mut stage_data, ref mut stage_data,
initial_energy_gain: _, initial_energy_gain: _,
max_energy_gain: _, max_energy_gain: _,
@ -1720,7 +1722,7 @@ impl CharacterAbility {
} }
}, },
Boost { .. } Boost { .. }
| ComboMelee { .. } | ComboMeleeDeprecated { .. }
| Blink { .. } | Blink { .. }
| Music { .. } | Music { .. }
| BasicSummon { .. } | BasicSummon { .. }
@ -1768,7 +1770,7 @@ impl CharacterAbility {
| RiposteMelee { .. } | RiposteMelee { .. }
| BasicBeam { .. } | BasicBeam { .. }
| Boost { .. } | Boost { .. }
| ComboMelee { .. } | ComboMeleeDeprecated { .. }
| Blink { .. } | Blink { .. }
| Music { .. } | Music { .. }
| BasicSummon { .. } | BasicSummon { .. }
@ -1795,7 +1797,7 @@ impl CharacterAbility {
| SelfBuff { meta, .. } | SelfBuff { meta, .. }
| BasicBeam { meta, .. } | BasicBeam { meta, .. }
| Boost { meta, .. } | Boost { meta, .. }
| ComboMelee { meta, .. } | ComboMeleeDeprecated { meta, .. }
| ComboMelee2 { meta, .. } | ComboMelee2 { meta, .. }
| Blink { meta, .. } | Blink { meta, .. }
| BasicSummon { meta, .. } | BasicSummon { meta, .. }
@ -1872,7 +1874,7 @@ impl CharacterAbility {
use skills::{HammerSkill::*, Skill::Hammer}; use skills::{HammerSkill::*, Skill::Hammer};
match self { match self {
CharacterAbility::ComboMelee { CharacterAbility::ComboMeleeDeprecated {
ref mut speed_increase, ref mut speed_increase,
ref mut max_speed_increase, ref mut max_speed_increase,
ref mut stage_data, ref mut stage_data,
@ -2385,9 +2387,8 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
was_wielded: false, // false by default. utils might set it to true was_wielded: false, // false by default. utils might set it to true
prev_aimed_dir: None, prev_aimed_dir: None,
is_sneaking: false, is_sneaking: false,
was_combo: None,
}), }),
CharacterAbility::ComboMelee { CharacterAbility::ComboMeleeDeprecated {
stage_data, stage_data,
initial_energy_gain, initial_energy_gain,
max_energy_gain, max_energy_gain,
@ -2397,7 +2398,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
scales_from_combo, scales_from_combo,
ori_modifier, ori_modifier,
meta: _, meta: _,
} => CharacterState::ComboMelee(combo_melee::Data { } => CharacterState::ComboMeleeDeprecated(combo_melee::Data {
static_data: combo_melee::StaticData { static_data: combo_melee::StaticData {
num_stages: stage_data.len() as u32, num_stages: stage_data.len() as u32,
stage_data: stage_data.iter().map(|stage| stage.to_duration()).collect(), stage_data: stage_data.iter().map(|stage| stage.to_duration()).collect(),

View File

@ -95,7 +95,7 @@ pub enum CharacterState {
DashMelee(dash_melee::Data), DashMelee(dash_melee::Data),
/// A three-stage attack where each attack pushes player forward /// A three-stage attack where each attack pushes player forward
/// and successive attacks increase in damage, while player holds button. /// and successive attacks increase in damage, while player holds button.
ComboMelee(combo_melee::Data), ComboMeleeDeprecated(combo_melee::Data),
/// A state where you progress through multiple melee attacks /// A state where you progress through multiple melee attacks
ComboMelee2(combo_melee2::Data), ComboMelee2(combo_melee2::Data),
/// A leap followed by a small aoe ground attack /// A leap followed by a small aoe ground attack
@ -154,7 +154,7 @@ impl CharacterState {
| CharacterState::BasicMelee(_) | CharacterState::BasicMelee(_)
| CharacterState::BasicRanged(_) | CharacterState::BasicRanged(_)
| CharacterState::DashMelee(_) | CharacterState::DashMelee(_)
| CharacterState::ComboMelee(_) | CharacterState::ComboMeleeDeprecated(_)
| CharacterState::ComboMelee2(_) | CharacterState::ComboMelee2(_)
| CharacterState::BasicBlock(_) | CharacterState::BasicBlock(_)
| CharacterState::LeapMelee(_) | CharacterState::LeapMelee(_)
@ -220,7 +220,7 @@ impl CharacterState {
CharacterState::BasicMelee(_) CharacterState::BasicMelee(_)
| CharacterState::BasicRanged(_) | CharacterState::BasicRanged(_)
| CharacterState::DashMelee(_) | CharacterState::DashMelee(_)
| CharacterState::ComboMelee(_) | CharacterState::ComboMeleeDeprecated(_)
| CharacterState::ComboMelee2(_) | CharacterState::ComboMelee2(_)
| CharacterState::LeapMelee(_) | CharacterState::LeapMelee(_)
| CharacterState::LeapShockwave(_) | CharacterState::LeapShockwave(_)
@ -247,7 +247,7 @@ impl CharacterState {
CharacterState::BasicMelee(_) CharacterState::BasicMelee(_)
| CharacterState::BasicRanged(_) | CharacterState::BasicRanged(_)
| CharacterState::DashMelee(_) | CharacterState::DashMelee(_)
| CharacterState::ComboMelee(_) | CharacterState::ComboMeleeDeprecated(_)
| CharacterState::ComboMelee2(_) | CharacterState::ComboMelee2(_)
| CharacterState::BasicBlock(_) | CharacterState::BasicBlock(_)
| CharacterState::LeapMelee(_) | CharacterState::LeapMelee(_)
@ -377,7 +377,7 @@ impl CharacterState {
pub fn is_forced_movement(&self) -> bool { pub fn is_forced_movement(&self) -> bool {
matches!(self, matches!(self,
CharacterState::ComboMelee(s) if s.stage_section == StageSection::Action) CharacterState::ComboMeleeDeprecated(s) if s.stage_section == StageSection::Action)
|| matches!(self, CharacterState::ComboMelee2(s) if s.stage_section == StageSection::Action) || matches!(self, CharacterState::ComboMelee2(s) if s.stage_section == StageSection::Action)
|| matches!(self, CharacterState::DashMelee(s) if s.stage_section == StageSection::Charge) || matches!(self, CharacterState::DashMelee(s) if s.stage_section == StageSection::Charge)
|| matches!(self, CharacterState::LeapMelee(s) if s.stage_section == StageSection::Movement) || matches!(self, CharacterState::LeapMelee(s) if s.stage_section == StageSection::Movement)
@ -403,7 +403,7 @@ impl CharacterState {
| CharacterState::Wielding(_) | CharacterState::Wielding(_)
| CharacterState::BasicMelee(_) | CharacterState::BasicMelee(_)
| CharacterState::BasicRanged(_) | CharacterState::BasicRanged(_)
| CharacterState::ComboMelee(_) | CharacterState::ComboMeleeDeprecated(_)
| CharacterState::ComboMelee2(_) | CharacterState::ComboMelee2(_)
| CharacterState::ChargedRanged(_) | CharacterState::ChargedRanged(_)
| CharacterState::RepeaterRanged(_) | CharacterState::RepeaterRanged(_)
@ -458,7 +458,7 @@ impl CharacterState {
CharacterState::Roll(data) => data.behavior(j, output_events), CharacterState::Roll(data) => data.behavior(j, output_events),
CharacterState::Wielding(data) => data.behavior(j, output_events), CharacterState::Wielding(data) => data.behavior(j, output_events),
CharacterState::Equipping(data) => data.behavior(j, output_events), CharacterState::Equipping(data) => data.behavior(j, output_events),
CharacterState::ComboMelee(data) => data.behavior(j, output_events), CharacterState::ComboMeleeDeprecated(data) => data.behavior(j, output_events),
CharacterState::ComboMelee2(data) => data.behavior(j, output_events), CharacterState::ComboMelee2(data) => data.behavior(j, output_events),
CharacterState::BasicMelee(data) => data.behavior(j, output_events), CharacterState::BasicMelee(data) => data.behavior(j, output_events),
CharacterState::BasicRanged(data) => data.behavior(j, output_events), CharacterState::BasicRanged(data) => data.behavior(j, output_events),
@ -511,7 +511,9 @@ impl CharacterState {
CharacterState::Roll(data) => data.handle_event(j, output_events, action), CharacterState::Roll(data) => data.handle_event(j, output_events, action),
CharacterState::Wielding(data) => data.handle_event(j, output_events, action), CharacterState::Wielding(data) => data.handle_event(j, output_events, action),
CharacterState::Equipping(data) => data.handle_event(j, output_events, action), CharacterState::Equipping(data) => data.handle_event(j, output_events, action),
CharacterState::ComboMelee(data) => data.handle_event(j, output_events, action), CharacterState::ComboMeleeDeprecated(data) => {
data.handle_event(j, output_events, action)
},
CharacterState::ComboMelee2(data) => data.handle_event(j, output_events, action), CharacterState::ComboMelee2(data) => data.handle_event(j, output_events, action),
CharacterState::BasicMelee(data) => data.handle_event(j, output_events, action), CharacterState::BasicMelee(data) => data.handle_event(j, output_events, action),
CharacterState::BasicRanged(data) => data.handle_event(j, output_events, action), CharacterState::BasicRanged(data) => data.handle_event(j, output_events, action),
@ -564,7 +566,7 @@ impl CharacterState {
CharacterState::Roll(data) => Some(data.static_data.ability_info), CharacterState::Roll(data) => Some(data.static_data.ability_info),
CharacterState::Wielding(_) => None, CharacterState::Wielding(_) => None,
CharacterState::Equipping(_) => None, CharacterState::Equipping(_) => None,
CharacterState::ComboMelee(data) => Some(data.static_data.ability_info), CharacterState::ComboMeleeDeprecated(data) => Some(data.static_data.ability_info),
CharacterState::ComboMelee2(data) => Some(data.static_data.ability_info), CharacterState::ComboMelee2(data) => Some(data.static_data.ability_info),
CharacterState::BasicMelee(data) => Some(data.static_data.ability_info), CharacterState::BasicMelee(data) => Some(data.static_data.ability_info),
CharacterState::BasicRanged(data) => Some(data.static_data.ability_info), CharacterState::BasicRanged(data) => Some(data.static_data.ability_info),
@ -608,7 +610,7 @@ impl CharacterState {
CharacterState::Roll(data) => Some(data.stage_section), CharacterState::Roll(data) => Some(data.stage_section),
CharacterState::Equipping(_) => Some(StageSection::Buildup), CharacterState::Equipping(_) => Some(StageSection::Buildup),
CharacterState::Wielding(_) => None, CharacterState::Wielding(_) => None,
CharacterState::ComboMelee(data) => Some(data.stage_section), CharacterState::ComboMeleeDeprecated(data) => Some(data.stage_section),
CharacterState::ComboMelee2(data) => Some(data.stage_section), CharacterState::ComboMelee2(data) => Some(data.stage_section),
CharacterState::BasicMelee(data) => Some(data.stage_section), CharacterState::BasicMelee(data) => Some(data.stage_section),
CharacterState::BasicRanged(data) => Some(data.stage_section), CharacterState::BasicRanged(data) => Some(data.stage_section),
@ -668,7 +670,7 @@ impl CharacterState {
buildup: Some(data.static_data.buildup_duration), buildup: Some(data.static_data.buildup_duration),
..Default::default() ..Default::default()
}), }),
CharacterState::ComboMelee(data) => { CharacterState::ComboMeleeDeprecated(data) => {
let stage_index = data.stage_index(); let stage_index = data.stage_index();
let stage = data.static_data.stage_data[stage_index]; let stage = data.static_data.stage_data[stage_index];
Some(DurationsInfo { Some(DurationsInfo {
@ -840,7 +842,7 @@ impl CharacterState {
CharacterState::Roll(data) => Some(data.timer), CharacterState::Roll(data) => Some(data.timer),
CharacterState::Wielding(_) => None, CharacterState::Wielding(_) => None,
CharacterState::Equipping(data) => Some(data.timer), CharacterState::Equipping(data) => Some(data.timer),
CharacterState::ComboMelee(data) => Some(data.timer), CharacterState::ComboMeleeDeprecated(data) => Some(data.timer),
CharacterState::ComboMelee2(data) => Some(data.timer), CharacterState::ComboMelee2(data) => Some(data.timer),
CharacterState::BasicMelee(data) => Some(data.timer), CharacterState::BasicMelee(data) => Some(data.timer),
CharacterState::BasicRanged(data) => Some(data.timer), CharacterState::BasicRanged(data) => Some(data.timer),
@ -884,7 +886,7 @@ impl CharacterState {
CharacterState::Roll(_) => None, CharacterState::Roll(_) => None,
CharacterState::Wielding(_) => None, CharacterState::Wielding(_) => None,
CharacterState::Equipping(_) => None, CharacterState::Equipping(_) => None,
CharacterState::ComboMelee(_) => Some(AttackSource::Melee), CharacterState::ComboMeleeDeprecated(_) => Some(AttackSource::Melee),
CharacterState::ComboMelee2(_) => Some(AttackSource::Melee), CharacterState::ComboMelee2(_) => Some(AttackSource::Melee),
CharacterState::BasicMelee(_) => Some(AttackSource::Melee), CharacterState::BasicMelee(_) => Some(AttackSource::Melee),
CharacterState::BasicRanged(data) => { CharacterState::BasicRanged(data) => {

View File

@ -705,7 +705,7 @@ fn default_main_tool(body: &Body) -> Item {
arthropod::Species::Dagonite => Some(Item::new_from_asset_expect( arthropod::Species::Dagonite => Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.arthropods.dagonite", "common.items.npc_weapons.unique.arthropods.dagonite",
)), )),
_ => Some(Item::new_from_asset_expect( arthropod::Species::Leafbeetle => Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.arthropods.leafbeetle", "common.items.npc_weapons.unique.arthropods.leafbeetle",
)), )),
}, },

View File

@ -170,14 +170,14 @@ impl CharacterBehavior for Data {
); );
// Build up // Build up
update.character = CharacterState::ComboMelee(Data { update.character = CharacterState::ComboMeleeDeprecated(Data {
static_data: self.static_data.clone(), static_data: self.static_data.clone(),
timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)),
..*self ..*self
}); });
} else { } else {
// Transitions to swing section of stage // Transitions to swing section of stage
update.character = CharacterState::ComboMelee(Data { update.character = CharacterState::ComboMeleeDeprecated(Data {
static_data: self.static_data.clone(), static_data: self.static_data.clone(),
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Action, stage_section: StageSection::Action,
@ -194,7 +194,7 @@ impl CharacterBehavior for Data {
&& !self.exhausted && !self.exhausted
{ {
// Swing // Swing
update.character = CharacterState::ComboMelee(Data { update.character = CharacterState::ComboMeleeDeprecated(Data {
static_data: self.static_data.clone(), static_data: self.static_data.clone(),
timer: tick_attack_or_default(data, self.timer, None), timer: tick_attack_or_default(data, self.timer, None),
exhausted: true, exhausted: true,
@ -304,14 +304,14 @@ impl CharacterBehavior for Data {
); );
// Swings // Swings
update.character = CharacterState::ComboMelee(Data { update.character = CharacterState::ComboMeleeDeprecated(Data {
static_data: self.static_data.clone(), static_data: self.static_data.clone(),
timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)),
..*self ..*self
}); });
} else { } else {
// Transitions to recover section of stage // Transitions to recover section of stage
update.character = CharacterState::ComboMelee(Data { update.character = CharacterState::ComboMeleeDeprecated(Data {
static_data: self.static_data.clone(), static_data: self.static_data.clone(),
timer: Duration::default(), timer: Duration::default(),
stage_section: StageSection::Recover, stage_section: StageSection::Recover,
@ -328,7 +328,7 @@ impl CharacterBehavior for Data {
None, None,
); );
// Recovers // Recovers
update.character = CharacterState::ComboMelee(Data { update.character = CharacterState::ComboMeleeDeprecated(Data {
static_data: self.static_data.clone(), static_data: self.static_data.clone(),
timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)),
..*self ..*self
@ -380,7 +380,7 @@ fn reset_state(
data.static_data.ability_info.input, data.static_data.ability_info.input,
); );
if let CharacterState::ComboMelee(c) = &mut update.character { if let CharacterState::ComboMeleeDeprecated(c) = &mut update.character {
c.stage = (data.stage % data.static_data.num_stages) + 1; c.stage = (data.stage % data.static_data.num_stages) + 1;
} }
} }

View File

@ -2,7 +2,7 @@ use crate::{
comp::{ comp::{
buff::{BuffChange, BuffKind}, buff::{BuffChange, BuffKind},
character_state::{AttackFilters, OutputEvents}, character_state::{AttackFilters, OutputEvents},
CharacterState, InputKind, StateUpdate, CharacterState, StateUpdate,
}, },
event::ServerEvent, event::ServerEvent,
states::{ states::{
@ -46,8 +46,6 @@ pub struct Data {
pub prev_aimed_dir: Option<Dir>, pub prev_aimed_dir: Option<Dir>,
/// Is sneaking, true if previous state was also considered sneaking /// Is sneaking, true if previous state was also considered sneaking
pub is_sneaking: bool, pub is_sneaking: bool,
/// Was in state with combo
pub was_combo: Option<(InputKind, u32)>,
} }
impl CharacterBehavior for Data { impl CharacterBehavior for Data {
@ -126,20 +124,7 @@ impl CharacterBehavior for Data {
}); });
} else { } else {
// Done // Done
if let Some((input, stage)) = self.was_combo { end_ability(data, &mut update);
if input_is_pressed(data, input) {
handle_input(data, output_events, &mut update, input);
// If other states are introduced that progress through stages, add them
// here
if let CharacterState::ComboMelee(c) = &mut update.character {
c.stage = stage;
}
} else {
end_ability(data, &mut update);
}
} else {
end_ability(data, &mut update);
}
} }
}, },
_ => { _ => {

View File

@ -1243,16 +1243,11 @@ fn handle_ability(
} }
} }
if let CharacterState::Roll(roll) = &mut update.character { if let CharacterState::Roll(roll) = &mut update.character {
if let CharacterState::ComboMelee(c) = data.character { if data.character.is_wield() || data.character.was_wielded() {
roll.was_combo = Some((c.static_data.ability_info.input, c.stage));
roll.was_wielded = true; roll.was_wielded = true;
} else { }
if data.character.is_wield() || data.character.was_wielded() { if data.character.is_stealthy() {
roll.was_wielded = true; roll.is_sneaking = true;
}
if data.character.is_stealthy() {
roll.is_sneaking = true;
}
} }
if data.character.is_aimed() { if data.character.is_aimed() {
roll.prev_aimed_dir = Some(data.controller.inputs.look_dir); roll.prev_aimed_dir = Some(data.controller.inputs.look_dir);

View File

@ -174,7 +174,7 @@ impl<'a> System<'a> for Sys {
| CharacterState::DashMelee(_) | CharacterState::DashMelee(_)
| CharacterState::LeapMelee(_) | CharacterState::LeapMelee(_)
| CharacterState::LeapShockwave(_) | CharacterState::LeapShockwave(_)
| CharacterState::ComboMelee(_) | CharacterState::ComboMeleeDeprecated(_)
| CharacterState::ComboMelee2(_) | CharacterState::ComboMelee2(_)
| CharacterState::BasicRanged(_) | CharacterState::BasicRanged(_)
| CharacterState::Music(_) | CharacterState::Music(_)

View File

@ -3410,7 +3410,7 @@ impl<'a> AgentData<'a> {
{ {
// If already in dash, keep dashing if not in recover // If already in dash, keep dashing if not in recover
controller.push_basic_input(InputKind::Ability(0)); controller.push_basic_input(InputKind::Ability(0));
} else if matches!(self.char_state, CharacterState::ComboMelee(c) if matches!(c.stage_section, StageSection::Recover)) } else if matches!(self.char_state, CharacterState::ComboMelee2(c) if matches!(c.stage_section, StageSection::Recover))
{ {
// If already in combo keep comboing if not in recover // If already in combo keep comboing if not in recover
controller.push_basic_input(InputKind::Primary); controller.push_basic_input(InputKind::Primary);

View File

@ -6,19 +6,19 @@ use super::{
}; };
use common::states::utils::StageSection; use common::states::utils::StageSection;
pub struct AlphaAnimation; pub struct ComboAnimation;
impl Animation for AlphaAnimation { impl Animation for ComboAnimation {
type Dependency<'a> = (f32, f32, Option<StageSection>, f32); type Dependency<'a> = (Option<&'a str>, StageSection, usize, f32, f32);
type Skeleton = ArthropodSkeleton; type Skeleton = ArthropodSkeleton;
#[cfg(feature = "use-dyn-lib")] #[cfg(feature = "use-dyn-lib")]
const UPDATE_FN: &'static [u8] = b"arthropod_alpha\0"; const UPDATE_FN: &'static [u8] = b"arthropod_combo\0";
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_alpha")] #[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_combo")]
fn update_skeleton_inner( fn update_skeleton_inner(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>, (_ability_id, stage_section, _current_strike, global_time, timer): Self::Dependency<'_>,
anim_time: f32, anim_time: f32,
_rate: &mut f32, _rate: &mut f32,
s_a: &SkeletonAttr, s_a: &SkeletonAttr,
@ -26,9 +26,9 @@ impl Animation for AlphaAnimation {
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let (movement1, movement2, movement3) = match stage_section { let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powi(2), 0.0, 0.0), StageSection::Buildup => (anim_time.powi(2), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0), StageSection::Action => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), StageSection::Recover => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
let pullback = 1.0 - movement3; let pullback = 1.0 - movement3;

View File

@ -1,4 +1,4 @@
pub mod alpha; pub mod combomelee;
pub mod dash; pub mod dash;
pub mod idle; pub mod idle;
pub mod jump; pub mod jump;
@ -11,7 +11,7 @@ pub mod summon;
// Reexports // Reexports
pub use self::{ pub use self::{
alpha::AlphaAnimation, dash::DashAnimation, idle::IdleAnimation, jump::JumpAnimation, combomelee::ComboAnimation, dash::DashAnimation, idle::IdleAnimation, jump::JumpAnimation,
leapmelee::LeapMeleeAnimation, leapshockwave::LeapShockAnimation, run::RunAnimation, leapmelee::LeapMeleeAnimation, leapshockwave::LeapShockAnimation, run::RunAnimation,
shoot::ShootAnimation, stunned::StunnedAnimation, summon::SummonAnimation, shoot::ShootAnimation, stunned::StunnedAnimation, summon::SummonAnimation,
}; };

View File

@ -1,6 +1,7 @@
use super::{ use super::{
super::{vek::*, Animation}, super::{vek::*, Animation},
BipedLargeSkeleton, SkeletonAttr, biped_large_alpha_axe, biped_large_alpha_hammer, biped_large_alpha_sword,
init_biped_large_alpha, BipedLargeSkeleton, SkeletonAttr,
}; };
use common::{ use common::{
comp::item::tool::{AbilitySpec, ToolKind}, comp::item::tool::{AbilitySpec, ToolKind},
@ -45,17 +46,7 @@ impl Animation for AlphaAnimation {
) -> Self::Skeleton { ) -> Self::Skeleton {
*rate = 1.0; *rate = 1.0;
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let speed = Vec2::<f32>::from(velocity).magnitude();
let lab: f32 = 0.65 * s_a.tempo;
let speednorm = (speed / 12.0).powf(0.4);
let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab + PI * 1.4).sin());
let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab + PI * 0.4).sin());
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
@ -65,85 +56,20 @@ impl Animation for AlphaAnimation {
let pullback = 1.0 - move3; let pullback = 1.0 - move3;
let move1 = move1base * pullback; let move1 = move1base * pullback;
let move2 = move2base * pullback; let move2 = move2base * pullback;
let subtract = global_time - timer; let subtract = global_time - timer;
let check = subtract - subtract.trunc(); let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum(); let mirror = (check - 0.5).signum();
next.second.position = Vec3::new(0.0, 0.0, 0.0); let speed = Vec2::<f32>::from(velocity).magnitude();
next.second.orientation = Quaternion::rotation_x(0.0);
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation =
Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
next.shoulder_r.position = Vec3::new( let foothorir = init_biped_large_alpha(&mut next, s_a, speed, acc_vel, move1);
s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothoril * 1.0,
);
next.shoulder_r.orientation =
Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
next.hand_l.orientation = Quaternion::rotation_x(0.0);
next.hand_r.orientation = Quaternion::rotation_x(0.0);
match active_tool_kind { match active_tool_kind {
Some(ToolKind::Sword) => { Some(ToolKind::Sword) => {
next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); biped_large_alpha_sword(&mut next, s_a, move1, move2);
next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
* Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.control.position = Vec3::new(
-3.0 + move1 * -4.0 + move2 * 5.0,
5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
-4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.5 + move2 * -0.7);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.5 + move2 * 0.7);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(-0.2);
next.control_r.orientation =
Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(0.2)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -2.0)
* Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
}, },
Some(ToolKind::Hammer) => { Some(ToolKind::Hammer) => {
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); biped_large_alpha_hammer(&mut next, s_a, move1, move2);
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
next.control.position = Vec3::new(
4.0 + move1 * -12.0 + move2 * 20.0,
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
(-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
);
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
* Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
* Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
}, },
Some(ToolKind::Axe) => match ability_id { Some(ToolKind::Axe) => match ability_id {
Some("common.abilities.custom.gigas_frost.cleave") => { Some("common.abilities.custom.gigas_frost.cleave") => {
@ -257,32 +183,7 @@ impl Animation for AlphaAnimation {
next.main.orientation = Quaternion::rotation_y(move1 * 0.4 + move2 * -1.2); next.main.orientation = Quaternion::rotation_y(move1 * 0.4 + move2 * -1.2);
}, },
_ => { _ => {
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); biped_large_alpha_axe(&mut next, s_a, move1, move2);
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
next.control.position = Vec3::new(
4.0 + move1 * -12.0 + move2 * 28.0,
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
(-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * 8.0,
);
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
* Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.upper_torso.orientation =
Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
next.lower_torso.orientation =
Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
* Quaternion::rotation_y(-0.0);
next.control_r.orientation =
Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
* Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5)
* Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5);
}, },
}, },
Some(ToolKind::Natural) => match ability_id { Some(ToolKind::Natural) => match ability_id {
@ -306,7 +207,6 @@ impl Animation for AlphaAnimation {
* Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
next.head.orientation = Quaternion::rotation_x(move1 * 0.3); next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
}, },
Some("common.abilities.custom.tidalwarrior.pincer") => { Some("common.abilities.custom.tidalwarrior.pincer") => {
if mirror > 0.0 { if mirror > 0.0 {
next.head.orientation = Quaternion::rotation_z(move1 * 0.75); next.head.orientation = Quaternion::rotation_z(move1 * 0.75);

View File

@ -1,5 +1,6 @@
use super::{ use super::{
super::{vek::*, Animation}, super::{vek::*, Animation},
biped_large_beta_axe, biped_large_beta_hammer, biped_large_beta_sword, init_biped_large_beta,
BipedLargeSkeleton, SkeletonAttr, BipedLargeSkeleton, SkeletonAttr,
}; };
use common::{ use common::{
@ -43,17 +44,7 @@ impl Animation for BetaAnimation {
) -> Self::Skeleton { ) -> Self::Skeleton {
*rate = 1.0; *rate = 1.0;
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let speed = Vec2::<f32>::from(velocity).magnitude();
let lab: f32 = 0.65 * s_a.tempo;
let speednorm = (speed / 12.0).powf(0.4);
let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab + PI * 1.4).sin());
let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab + PI * 0.4).sin());
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
@ -64,108 +55,19 @@ impl Animation for BetaAnimation {
let move1 = move1base * pullback; let move1 = move1base * pullback;
let move2 = move2base * pullback; let move2 = move2base * pullback;
next.shoulder_l.position = Vec3::new( let speed = Vec2::<f32>::from(velocity).magnitude();
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation =
Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
next.shoulder_r.position = Vec3::new( init_biped_large_beta(&mut next, s_a, speed, acc_vel, move1);
s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothoril * 1.0,
);
next.shoulder_r.orientation =
Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
next.torso.orientation = Quaternion::rotation_z(0.0);
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
next.hand_l.orientation = Quaternion::rotation_x(0.0);
next.hand_r.orientation = Quaternion::rotation_x(0.0);
match active_tool_kind { match active_tool_kind {
Some(ToolKind::Sword) => { Some(ToolKind::Sword) => {
next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); biped_large_beta_sword(&mut next, s_a, move1base, move1, move2);
next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
* Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.control.position = Vec3::new(
-3.0 + move1 * -4.0 + move2 * 5.0,
5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
-4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
);
next.upper_torso.orientation =
Quaternion::rotation_z(move1base * 0.5 + move2 * -0.7);
next.lower_torso.orientation =
Quaternion::rotation_z(move1base * -0.5 + move2 * 0.7);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(-0.2);
next.control_r.orientation =
Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(0.2)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5)
* Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
}, },
Some(ToolKind::Hammer) => { Some(ToolKind::Hammer) => {
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); biped_large_beta_hammer(&mut next, s_a, move1, move2);
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
next.control.position = Vec3::new(
4.0 + move1 * -12.0 + move2 * 20.0,
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
(-s_a.grip.0 / 0.8) + move1 * 6.0 + move2 * 8.0,
);
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
* Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -1.5);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 1.5);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-1.0 + move1 * -1.5 + move2 * -0.3)
* Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
}, },
Some(ToolKind::Axe) => { Some(ToolKind::Axe) => {
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); biped_large_beta_axe(&mut next, s_a, move1, move2);
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
next.control.position = Vec3::new(
4.0 + move1 * -18.0 + move2 * 20.0,
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 12.0,
(-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 4.0,
);
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
* Quaternion::rotation_z(move1 * -0.9 + move2 * 0.6);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 1.2 + move2 * -1.0);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -1.2 + move2 * 1.0);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-1.0 + move1 * 0.0 + move2 * -0.8)
* Quaternion::rotation_y(-1.8 + move1 * 3.0 + move2 * -0.9)
* Quaternion::rotation_z(move1 * -0.2 + move2 * -1.5);
}, },
Some(ToolKind::Natural) => match ability_id { Some(ToolKind::Natural) => match ability_id {
Some("common.abilities.custom.wendigomagic.singlestrike") => { Some("common.abilities.custom.wendigomagic.singlestrike") => {

View File

@ -1,5 +1,7 @@
use super::{ use super::{
super::{vek::*, Animation}, super::{vek::*, Animation},
biped_large_alpha_axe, biped_large_alpha_hammer, biped_large_alpha_sword, biped_large_beta_axe,
biped_large_beta_hammer, biped_large_beta_sword, init_biped_large_alpha, init_biped_large_beta,
BipedLargeSkeleton, SkeletonAttr, BipedLargeSkeleton, SkeletonAttr,
}; };
use common::states::utils::{AbilityInfo, StageSection}; use common::states::utils::{AbilityInfo, StageSection};
@ -13,6 +15,8 @@ impl Animation for ComboAnimation {
Option<AbilityInfo>, Option<AbilityInfo>,
usize, usize,
Vec2<f32>, Vec2<f32>,
Vec3<f32>,
f32,
); );
type Skeleton = BipedLargeSkeleton; type Skeleton = BipedLargeSkeleton;
@ -22,7 +26,7 @@ impl Animation for ComboAnimation {
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_combo")] #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_combo")]
fn update_skeleton_inner( fn update_skeleton_inner(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(ability_id, stage_section, _ability_info, current_strike, _move_dir): Self::Dependency<'_>, (ability_id, stage_section, _ability_info, current_strike, _move_dir, velocity, acc_vel): Self::Dependency<'_>,
anim_time: f32, anim_time: f32,
rate: &mut f32, rate: &mut f32,
s_a: &SkeletonAttr, s_a: &SkeletonAttr,
@ -108,6 +112,114 @@ impl Animation for ComboAnimation {
_ => {}, _ => {},
} }
}, },
Some(
"common.abilities.custom.cyclops.doublestrike"
| "common.abilities.hammersimple.doublestrike",
) => {
let speed = Vec2::<f32>::from(velocity).magnitude();
match strike {
0 => {
let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 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 = move1base * pullback;
let move2 = move2base * pullback;
init_biped_large_alpha(&mut next, s_a, speed, acc_vel, move1);
biped_large_alpha_hammer(&mut next, s_a, move1, move2);
},
1 => {
let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(6)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - move3;
let move1 = move1base * pullback;
let move2 = move2base * pullback;
init_biped_large_beta(&mut next, s_a, speed, acc_vel, move1);
biped_large_beta_hammer(&mut next, s_a, move1, move2);
},
_ => {},
}
},
Some(
"common.abilities.custom.dullahan.melee"
| "common.abilities.swordsimple.doublestrike",
) => {
let speed = Vec2::<f32>::from(velocity).magnitude();
match strike {
0 => {
let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 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 = move1base * pullback;
let move2 = move2base * pullback;
init_biped_large_alpha(&mut next, s_a, speed, acc_vel, move1);
biped_large_alpha_sword(&mut next, s_a, move1, move2);
},
1 => {
let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(6)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - move3;
let move1 = move1base * pullback;
let move2 = move2base * pullback;
init_biped_large_beta(&mut next, s_a, speed, acc_vel, move1);
biped_large_beta_sword(&mut next, s_a, move1base, move1, move2);
},
_ => {},
}
},
Some("common.abilities.custom.oni.doublestrike") => {
let speed = Vec2::<f32>::from(velocity).magnitude();
match strike {
0 => {
let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 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 = move1base * pullback;
let move2 = move2base * pullback;
init_biped_large_alpha(&mut next, s_a, speed, acc_vel, move1);
biped_large_alpha_axe(&mut next, s_a, move1, move2);
},
1 => {
let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(6)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - move3;
let move1 = move1base * pullback;
let move2 = move2base * pullback;
init_biped_large_beta(&mut next, s_a, speed, acc_vel, move1);
biped_large_beta_axe(&mut next, s_a, move1, move2);
},
_ => {},
}
},
_ => {}, _ => {},
} }
} }

View File

@ -633,3 +633,268 @@ fn mount_point(body: &Body) -> Vec3<f32> {
} }
.into() .into()
} }
pub fn init_biped_large_alpha(
next: &mut BipedLargeSkeleton,
s_a: &SkeletonAttr,
speed: f32,
acc_vel: f32,
move1: f32,
) -> f32 {
let lab: f32 = 0.65 * s_a.tempo;
let speednorm = (speed / 12.0).powf(0.4);
let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab + PI * 1.4).sin());
let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab + PI * 0.4).sin());
next.second.position = Vec3::new(0.0, 0.0, 0.0);
next.second.orientation = Quaternion::rotation_x(0.0);
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation =
Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
next.shoulder_r.position = Vec3::new(
s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothoril * 1.0,
);
next.shoulder_r.orientation =
Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
next.hand_l.orientation = Quaternion::rotation_x(0.0);
next.hand_r.orientation = Quaternion::rotation_x(0.0);
foothorir
}
pub fn init_biped_large_beta(
next: &mut BipedLargeSkeleton,
s_a: &SkeletonAttr,
speed: f32,
acc_vel: f32,
move1: f32,
) {
let lab: f32 = 0.65 * s_a.tempo;
let speednorm = (speed / 12.0).powf(0.4);
let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab + PI * 1.4).sin());
let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab + PI * 0.4).sin());
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation =
Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
next.shoulder_r.position = Vec3::new(
s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothoril * 1.0,
);
next.shoulder_r.orientation =
Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
next.torso.orientation = Quaternion::rotation_z(0.0);
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
next.hand_l.orientation = Quaternion::rotation_x(0.0);
next.hand_r.orientation = Quaternion::rotation_x(0.0);
}
pub fn biped_large_alpha_hammer(
next: &mut BipedLargeSkeleton,
s_a: &SkeletonAttr,
move1: f32,
move2: f32,
) {
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
next.control.position = Vec3::new(
4.0 + move1 * -12.0 + move2 * 20.0,
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
(-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
);
next.head.orientation =
Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
* Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
}
pub fn biped_large_beta_hammer(
next: &mut BipedLargeSkeleton,
s_a: &SkeletonAttr,
move1: f32,
move2: f32,
) {
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
next.control.position = Vec3::new(
4.0 + move1 * -12.0 + move2 * 20.0,
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
(-s_a.grip.0 / 0.8) + move1 * 6.0 + move2 * 8.0,
);
next.head.orientation =
Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -1.5);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 1.5);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -1.5 + move2 * -0.3)
* Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
}
pub fn biped_large_alpha_sword(
next: &mut BipedLargeSkeleton,
s_a: &SkeletonAttr,
move1: f32,
move2: f32,
) {
next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
next.head.orientation =
Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.control.position = Vec3::new(
-3.0 + move1 * -4.0 + move2 * 5.0,
5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
-4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.5 + move2 * -0.7);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.5 + move2 * 0.7);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(-0.2);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(0.2)
* Quaternion::rotation_z(0.0);
next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -2.0)
* Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
}
pub fn biped_large_beta_sword(
next: &mut BipedLargeSkeleton,
s_a: &SkeletonAttr,
move1base: f32,
move1: f32,
move2: f32,
) {
next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
next.head.orientation =
Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.control.position = Vec3::new(
-3.0 + move1 * -4.0 + move2 * 5.0,
5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
-4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
);
next.upper_torso.orientation = Quaternion::rotation_z(move1base * 0.5 + move2 * -0.7);
next.lower_torso.orientation = Quaternion::rotation_z(move1base * -0.5 + move2 * 0.7);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(-0.2);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(0.2)
* Quaternion::rotation_z(0.0);
next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5)
* Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
}
pub fn biped_large_alpha_axe(
next: &mut BipedLargeSkeleton,
s_a: &SkeletonAttr,
move1: f32,
move2: f32,
) {
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
next.control.position = Vec3::new(
4.0 + move1 * -12.0 + move2 * 28.0,
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
(-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * 8.0,
);
next.head.orientation =
Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
* Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5)
* Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5);
}
pub fn biped_large_beta_axe(
next: &mut BipedLargeSkeleton,
s_a: &SkeletonAttr,
move1: f32,
move2: f32,
) {
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
next.control.position = Vec3::new(
4.0 + move1 * -18.0 + move2 * 20.0,
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 12.0,
(-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 4.0,
);
next.head.orientation =
Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.9 + move2 * 0.6);
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 1.2 + move2 * -1.0);
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -1.2 + move2 * 1.0);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * 0.0 + move2 * -0.8)
* Quaternion::rotation_y(-1.8 + move1 * 3.0 + move2 * -0.9)
* Quaternion::rotation_z(move1 * -0.2 + move2 * -1.5);
}

View File

@ -1,6 +1,7 @@
use super::{ use super::{
super::{vek::*, Animation}, super::{vek::*, Animation},
BipedSmallSkeleton, SkeletonAttr, biped_small_alpha_axe, biped_small_alpha_dagger, biped_small_alpha_spear,
init_biped_small_alpha, BipedSmallSkeleton, SkeletonAttr,
}; };
use common::{comp::item::ToolKind, states::utils::StageSection}; use common::{comp::item::ToolKind, states::utils::StageSection};
use std::f32::consts::PI; use std::f32::consts::PI;
@ -49,12 +50,12 @@ impl Animation for AlphaAnimation {
) -> Self::Skeleton { ) -> Self::Skeleton {
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let speed = Vec2::<f32>::from(velocity).magnitude(); let speed = Vec2::<f32>::from(velocity).magnitude();
let speednorm = speed / 9.4;
let speednormcancel = 1.0 - speednorm;
let fast = (anim_time * 10.0).sin(); let fast = (anim_time * 10.0).sin();
let fastalt = (anim_time * 10.0 + PI / 2.0).sin(); let fastalt = (anim_time * 10.0 + PI / 2.0).sin();
let speednorm = speed / 9.4;
let speednormcancel = 1.0 - speednorm;
let anim_time = anim_time.min(1.0); let anim_time = anim_time.min(1.0);
let (move1base, move2base, move3) = match stage_section { let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0),
@ -70,105 +71,26 @@ impl Animation for AlphaAnimation {
let move2 = move2base * pullback * mirror; let move2 = move2base * pullback * mirror;
let move1abs = move1base * pullback; let move1abs = move1base * pullback;
let move2abs = move2base * pullback; let move2abs = move2base * pullback;
next.hand_l.position = Vec3::new(s_a.grip.0 * 4.0, 0.0, s_a.grip.2);
next.hand_r.position = Vec3::new(-s_a.grip.0 * 4.0, 0.0, s_a.grip.2); init_biped_small_alpha(&mut next, s_a);
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.orientation = Quaternion::rotation_x(0.0);
next.hand_r.orientation = Quaternion::rotation_x(0.0);
match active_tool_kind { match active_tool_kind {
Some(ToolKind::Spear) => { Some(ToolKind::Spear) => {
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); biped_small_alpha_spear(
next.head.orientation = Quaternion::rotation_x(move1abs * 0.2 + move2abs * 0.3) &mut next,
* Quaternion::rotation_z(move1abs * -0.2 + move2abs * 0.6) s_a,
* Quaternion::rotation_y(move1abs * 0.3 + move2abs * -0.5); move1abs,
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1); move2abs,
next.chest.orientation = Quaternion::rotation_x(move1abs * -0.2 + move2abs * 0.3) fast,
* Quaternion::rotation_z(move1abs * 0.5 + move2abs * -0.6); fastalt,
speednormcancel,
next.pants.position = Vec3::new(0.0, s_a.pants.0, s_a.pants.1);
next.pants.orientation = Quaternion::rotation_x(move1abs * 0.2 + move2abs * -0.3)
* Quaternion::rotation_z(move1abs * -0.2 + move2abs * 0.2);
next.control_l.position = Vec3::new(1.0 - s_a.grip.0 * 2.0, 2.0, -2.0);
next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 2.0, 2.0);
next.control.position = Vec3::new(
-3.0 + move1abs * -3.0 + move2abs * 5.0,
s_a.grip.2 + move1abs * -12.0 + move2abs * 17.0,
-s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0 + move2abs * 5.0,
); );
next.control_l.orientation =
Quaternion::rotation_x(PI / 1.5 + move1abs * -1.5 + move2abs * 2.5)
* Quaternion::rotation_y(-0.3);
next.control_r.orientation = Quaternion::rotation_x(
PI / 1.5 + s_a.grip.0 * 0.2 + move1abs * -1.5 + move2abs * 2.5,
) * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2);
next.control.orientation =
Quaternion::rotation_x(-1.35 + move1abs * -0.3 + move2abs * 0.5)
* Quaternion::rotation_z(move1abs * 1.0 + move2abs * -1.0)
* Quaternion::rotation_y(move2abs * 0.0);
next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1);
next.tail.orientation = Quaternion::rotation_x(0.05 * fastalt * speednormcancel)
* Quaternion::rotation_z(fast * 0.15 * speednormcancel);
}, },
Some(ToolKind::Axe | ToolKind::Hammer | ToolKind::Pick | ToolKind::Shovel) => { Some(ToolKind::Axe | ToolKind::Hammer | ToolKind::Pick | ToolKind::Shovel) => {
next.head.orientation = Quaternion::rotation_z(move1abs * 0.3 + move2abs * -0.6); biped_small_alpha_axe(&mut next, s_a, move1abs, move2abs);
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
next.control_r.position = Vec3::new(
9.0 + move1abs * -10.0 + s_a.grip.0 * 2.0,
-1.0 + move1abs * 2.0,
move1abs * 3.0 - 2.0,
);
next.control.position = Vec3::new(
-5.0 + move1abs * 5.0,
-1.0 + s_a.grip.2,
-1.0 + move1abs * 3.0 + -s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0,
);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2abs * 1.0)
* Quaternion::rotation_y(-0.0)
* Quaternion::rotation_z(-0.0);
next.control_r.orientation =
Quaternion::rotation_x(0.5 + move1abs * 1.5 + s_a.grip.0 * 0.2)
* Quaternion::rotation_y(0.2 + s_a.grip.0 * 0.2)
* Quaternion::rotation_z(-0.0);
next.control.orientation = Quaternion::rotation_x(-0.3 + move2abs * -1.0)
* Quaternion::rotation_y(move1abs * -0.9 + move2abs * 2.0)
* Quaternion::rotation_z(-0.3);
}, },
Some(ToolKind::Dagger) => { Some(ToolKind::Dagger) => {
next.head.orientation = Quaternion::rotation_x(move1abs * 0.15 + move2abs * -0.15) biped_small_alpha_dagger(&mut next, s_a, move1abs, move2abs);
* Quaternion::rotation_z(move1abs * 0.15 + move2abs * -0.3);
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
next.control_r.position = Vec3::new(
9.0 + move1abs * -7.0 + s_a.grip.0 * 2.0,
-1.0 + move1abs * 6.0,
-2.0,
);
next.control.position = Vec3::new(
-5.0 + move1abs * 5.0 + move2abs * 9.0,
-1.0 + move2abs * -3.0 + s_a.grip.2,
-1.0 + move1abs * 3.0 + -s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0,
);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0)
* Quaternion::rotation_y(-0.0)
* Quaternion::rotation_z(-0.0);
next.control_r.orientation =
Quaternion::rotation_x(0.5 + move1abs * 1.5 + s_a.grip.0 * 0.2)
* Quaternion::rotation_y(0.2 + s_a.grip.0 * 0.2)
* Quaternion::rotation_z(-0.0);
next.control.orientation = Quaternion::rotation_x(-0.3 + move2abs * -1.0)
* Quaternion::rotation_y(move1abs * -0.4 + move2abs * 1.0)
* Quaternion::rotation_z(-0.3 + move2abs * -2.2);
}, },
Some(ToolKind::Staff) => match ability_id { Some(ToolKind::Staff) => match ability_id {
Some("common.abilities.custom.dwarves.flamekeeper.flamecrush") => { Some("common.abilities.custom.dwarves.flamekeeper.flamecrush") => {

View File

@ -1,18 +1,14 @@
use super::{ use super::{
super::{vek::*, Animation}, super::{vek::*, Animation},
BipedSmallSkeleton, SkeletonAttr, biped_small_alpha_axe, biped_small_alpha_dagger, biped_small_alpha_spear,
init_biped_small_alpha, BipedSmallSkeleton, SkeletonAttr,
}; };
use common::states::utils::{AbilityInfo, StageSection}; use common::states::utils::StageSection;
use std::f32::consts::PI;
pub struct ComboAnimation; pub struct ComboAnimation;
impl Animation for ComboAnimation { impl Animation for ComboAnimation {
type Dependency<'a> = ( type Dependency<'a> = (Option<&'a str>, StageSection, usize, Vec3<f32>, f32, f32);
Option<&'a str>,
Option<StageSection>,
Option<AbilityInfo>,
usize,
Vec2<f32>,
);
type Skeleton = BipedSmallSkeleton; type Skeleton = BipedSmallSkeleton;
#[cfg(feature = "use-dyn-lib")] #[cfg(feature = "use-dyn-lib")]
@ -21,7 +17,7 @@ impl Animation for ComboAnimation {
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_combo")] #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_combo")]
fn update_skeleton_inner( fn update_skeleton_inner(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(ability_id, stage_section, _ability_info, current_strike, _move_dir): Self::Dependency<'_>, (ability_id, stage_section, current_strike, velocity, _global_time, _timer): Self::Dependency<'_>,
anim_time: f32, anim_time: f32,
rate: &mut f32, rate: &mut f32,
s_a: &SkeletonAttr, s_a: &SkeletonAttr,
@ -32,7 +28,7 @@ impl Animation for ComboAnimation {
next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_z(0.0); next.main.orientation = Quaternion::rotation_z(0.0);
let multi_strike_pullback = 1.0 let multi_strike_pullback = 1.0
- if matches!(stage_section, Some(StageSection::Recover)) { - if matches!(stage_section, StageSection::Recover) {
anim_time.powi(4) anim_time.powi(4)
} else { } else {
0.0 0.0
@ -50,11 +46,11 @@ impl Animation for ComboAnimation {
) => { ) => {
let (move1, move2) = if strike == current_strike { let (move1, move2) = if strike == current_strike {
match stage_section { match stage_section {
Some(StageSection::Buildup) => { StageSection::Buildup => {
(((anim_time.max(0.4) - 0.4) * 1.5).powf(0.5), 0.0) (((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)), StageSection::Action => (1.0, (anim_time.min(0.4) * 2.5).powi(2)),
Some(StageSection::Recover) => (1.0, 1.0), StageSection::Recover => (1.0, 1.0),
_ => (0.0, 0.0), _ => (0.0, 0.0),
} }
} else { } else {
@ -81,6 +77,68 @@ impl Animation for ComboAnimation {
_ => {}, _ => {},
} }
}, },
Some(
"common.abilities.axesimple.doublestrike"
| "common.abilities.custom.boreal_warrior.hammer",
) => {
let anim_time = anim_time.min(1.0);
let (move1base, move2base, move3) = match stage_section {
StageSection::Buildup => (anim_time.sqrt(), 0.0, 0.0),
StageSection::Action => (1.0, anim_time.powi(4), 0.0),
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;
init_biped_small_alpha(&mut next, s_a);
biped_small_alpha_axe(&mut next, s_a, move1abs, move2abs);
},
Some("common.abilities.daggersimple.singlestrike") => {
let anim_time = anim_time.min(1.0);
let (move1base, move2base, move3) = match stage_section {
StageSection::Buildup => (anim_time.sqrt(), 0.0, 0.0),
StageSection::Action => (1.0, anim_time.powi(4), 0.0),
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;
init_biped_small_alpha(&mut next, s_a);
biped_small_alpha_dagger(&mut next, s_a, move1abs, move2abs);
},
Some("common.abilities.spear.doublestrike") => {
let anim_time = anim_time.min(1.0);
let speed = Vec2::<f32>::from(velocity).magnitude();
let speednorm = speed / 9.4;
let speednormcancel = 1.0 - speednorm;
let fast = (anim_time * 10.0).sin();
let fastalt = (anim_time * 10.0 + PI / 2.0).sin();
let (move1base, move2base, move3) = match stage_section {
StageSection::Buildup => (anim_time.sqrt(), 0.0, 0.0),
StageSection::Action => (1.0, anim_time.powi(4), 0.0),
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;
init_biped_small_alpha(&mut next, s_a);
biped_small_alpha_spear(
&mut next,
s_a,
move1abs,
move2abs,
fast,
fastalt,
speednormcancel,
);
},
_ => {}, _ => {},
} }
} }

View File

@ -22,6 +22,7 @@ pub use self::{
use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton}; use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton};
use common::comp::{self}; use common::comp::{self};
use core::convert::TryFrom; use core::convert::TryFrom;
use std::f32::consts::PI;
pub type Body = comp::biped_small::Body; pub type Body = comp::biped_small::Body;
@ -280,3 +281,123 @@ impl<'a> From<&'a Body> for SkeletonAttr {
} }
} }
} }
pub fn init_biped_small_alpha(next: &mut BipedSmallSkeleton, s_a: &SkeletonAttr) {
next.hand_l.position = Vec3::new(s_a.grip.0 * 4.0, 0.0, s_a.grip.2);
next.hand_r.position = Vec3::new(-s_a.grip.0 * 4.0, 0.0, s_a.grip.2);
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.orientation = Quaternion::rotation_x(0.0);
next.hand_r.orientation = Quaternion::rotation_x(0.0);
}
pub fn biped_small_alpha_spear(
next: &mut BipedSmallSkeleton,
s_a: &SkeletonAttr,
move1abs: f32,
move2abs: f32,
fast: f32,
fastalt: f32,
speednormcancel: f32,
) {
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
next.head.orientation = Quaternion::rotation_x(move1abs * 0.2 + move2abs * 0.3)
* Quaternion::rotation_z(move1abs * -0.2 + move2abs * 0.6)
* Quaternion::rotation_y(move1abs * 0.3 + move2abs * -0.5);
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1);
next.chest.orientation = Quaternion::rotation_x(move1abs * -0.2 + move2abs * 0.3)
* Quaternion::rotation_z(move1abs * 0.5 + move2abs * -0.6);
next.pants.position = Vec3::new(0.0, s_a.pants.0, s_a.pants.1);
next.pants.orientation = Quaternion::rotation_x(move1abs * 0.2 + move2abs * -0.3)
* Quaternion::rotation_z(move1abs * -0.2 + move2abs * 0.2);
next.control_l.position = Vec3::new(1.0 - s_a.grip.0 * 2.0, 2.0, -2.0);
next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 2.0, 2.0);
next.control.position = Vec3::new(
-3.0 + move1abs * -3.0 + move2abs * 5.0,
s_a.grip.2 + move1abs * -12.0 + move2abs * 17.0,
-s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0 + move2abs * 5.0,
);
next.control_l.orientation =
Quaternion::rotation_x(PI / 1.5 + move1abs * -1.5 + move2abs * 2.5)
* Quaternion::rotation_y(-0.3);
next.control_r.orientation =
Quaternion::rotation_x(PI / 1.5 + s_a.grip.0 * 0.2 + move1abs * -1.5 + move2abs * 2.5)
* Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2);
next.control.orientation = Quaternion::rotation_x(-1.35 + move1abs * -0.3 + move2abs * 0.5)
* Quaternion::rotation_z(move1abs * 1.0 + move2abs * -1.0)
* Quaternion::rotation_y(move2abs * 0.0);
next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1);
next.tail.orientation = Quaternion::rotation_x(0.05 * fastalt * speednormcancel)
* Quaternion::rotation_z(fast * 0.15 * speednormcancel);
}
pub fn biped_small_alpha_axe(
next: &mut BipedSmallSkeleton,
s_a: &SkeletonAttr,
move1abs: f32,
move2abs: f32,
) {
next.head.orientation = Quaternion::rotation_z(move1abs * 0.3 + move2abs * -0.6);
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
next.control_r.position = Vec3::new(
9.0 + move1abs * -10.0 + s_a.grip.0 * 2.0,
-1.0 + move1abs * 2.0,
move1abs * 3.0 - 2.0,
);
next.control.position = Vec3::new(
-5.0 + move1abs * 5.0,
-1.0 + s_a.grip.2,
-1.0 + move1abs * 3.0 + -s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0,
);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2abs * 1.0)
* Quaternion::rotation_y(-0.0)
* Quaternion::rotation_z(-0.0);
next.control_r.orientation = Quaternion::rotation_x(0.5 + move1abs * 1.5 + s_a.grip.0 * 0.2)
* Quaternion::rotation_y(0.2 + s_a.grip.0 * 0.2)
* Quaternion::rotation_z(-0.0);
next.control.orientation = Quaternion::rotation_x(-0.3 + move2abs * -1.0)
* Quaternion::rotation_y(move1abs * -0.9 + move2abs * 2.0)
* Quaternion::rotation_z(-0.3);
}
pub fn biped_small_alpha_dagger(
next: &mut BipedSmallSkeleton,
s_a: &SkeletonAttr,
move1abs: f32,
move2abs: f32,
) {
next.head.orientation = Quaternion::rotation_x(move1abs * 0.15 + move2abs * -0.15)
* Quaternion::rotation_z(move1abs * 0.15 + move2abs * -0.3);
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
next.control_r.position = Vec3::new(
9.0 + move1abs * -7.0 + s_a.grip.0 * 2.0,
-1.0 + move1abs * 6.0,
-2.0,
);
next.control.position = Vec3::new(
-5.0 + move1abs * 5.0 + move2abs * 9.0,
-1.0 + move2abs * -3.0 + s_a.grip.2,
-1.0 + move1abs * 3.0 + -s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0,
);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0)
* Quaternion::rotation_y(-0.0)
* Quaternion::rotation_z(-0.0);
next.control_r.orientation = Quaternion::rotation_x(0.5 + move1abs * 1.5 + s_a.grip.0 * 0.2)
* Quaternion::rotation_y(0.2 + s_a.grip.0 * 0.2)
* Quaternion::rotation_z(-0.0);
next.control.orientation = Quaternion::rotation_x(-0.3 + move2abs * -1.0)
* Quaternion::rotation_y(move1abs * -0.4 + move2abs * 1.0)
* Quaternion::rotation_z(-0.3 + move2abs * -2.2);
}

View File

View File

@ -1,60 +0,0 @@
use super::{
super::{vek::*, Animation},
QuadrupedLowSkeleton, SkeletonAttr,
};
use common::states::utils::StageSection;
//use std::ops::Rem;
pub struct AlphaAnimation;
impl Animation for AlphaAnimation {
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
type Skeleton = QuadrupedLowSkeleton;
#[cfg(feature = "use-dyn-lib")]
const UPDATE_FN: &'static [u8] = b"quadruped_low_alpha\0";
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_alpha")]
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>,
anim_time: f32,
_rate: &mut f32,
_s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let twitch3 = (mirror * movement3 * 9.0).sin();
let movement1 = mirror * movement1base * pullback;
let movement2 = mirror * movement2base * pullback;
let movement1abs = movement1base * pullback;
let movement2abs = movement2base * pullback;
next.head_upper.orientation = Quaternion::rotation_z(twitch3 * -0.7);
next.head_lower.orientation =
Quaternion::rotation_x(movement1abs * 0.35 + movement2abs * -0.9)
* Quaternion::rotation_y(movement1 * 0.7 + movement2 * -1.0);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * 0.5);
next.chest.orientation = Quaternion::rotation_y(movement1 * -0.08 + movement2 * 0.15)
* Quaternion::rotation_z(movement1 * -0.2 + movement2 * 0.6);
next.tail_front.orientation = Quaternion::rotation_x(0.15)
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * -0.2);
next.tail_rear.orientation = Quaternion::rotation_x(-0.12)
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * -0.2);
next
}
}

View File

@ -1,14 +1,11 @@
use super::{ use super::{super::Animation, quadruped_low_beta, QuadrupedLowSkeleton, SkeletonAttr};
super::{vek::*, Animation},
QuadrupedLowSkeleton, SkeletonAttr,
};
use common::states::utils::StageSection; use common::states::utils::StageSection;
//use std::ops::Rem; //use std::ops::Rem;
pub struct BetaAnimation; pub struct BetaAnimation;
impl Animation for BetaAnimation { impl Animation for BetaAnimation {
type Dependency<'a> = (f32, f32, Option<StageSection>, f32); type Dependency<'a> = (f32, f32, StageSection, f32);
type Skeleton = QuadrupedLowSkeleton; type Skeleton = QuadrupedLowSkeleton;
#[cfg(feature = "use-dyn-lib")] #[cfg(feature = "use-dyn-lib")]
@ -20,41 +17,12 @@ impl Animation for BetaAnimation {
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>, (_velocity, global_time, stage_section, timer): Self::Dependency<'_>,
anim_time: f32, anim_time: f32,
_rate: &mut f32, _rate: &mut f32,
_s_a: &SkeletonAttr, s_a: &SkeletonAttr,
) -> Self::Skeleton { ) -> Self::Skeleton {
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let (movement1base, movement2base, movement3) = match stage_section { quadruped_low_beta(&mut next, s_a, stage_section, anim_time, global_time, timer);
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let twitch3 = (mirror * movement3 * 9.0).sin();
let movement1 = mirror * movement1base * pullback;
let movement2 = mirror * movement2base * pullback;
let movement1abs = movement1base * pullback;
let movement2abs = movement2base * pullback;
next.head_upper.orientation = Quaternion::rotation_z(twitch3 * 0.2);
next.head_lower.orientation =
Quaternion::rotation_x(movement1abs * 0.15 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.1 + movement2 * 0.15);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.9);
next.chest.orientation = Quaternion::rotation_y(movement1 * 0.08 + movement2 * -0.15)
* Quaternion::rotation_z(movement1 * 0.2 + movement2 * -0.3);
next.tail_front.orientation = Quaternion::rotation_x(0.15)
* Quaternion::rotation_z(movement1 * 0.4 + movement2 * 0.2);
next.tail_rear.orientation = Quaternion::rotation_x(-0.12)
* Quaternion::rotation_z(movement1 * 0.4 + movement2 * 0.2);
next next
} }
} }

View File

@ -1,19 +1,12 @@
use super::{ use super::{
super::{vek::*, Animation}, super::{vek::*, Animation},
QuadrupedLowSkeleton, SkeletonAttr, quadruped_low_alpha, quadruped_low_beta, QuadrupedLowSkeleton, SkeletonAttr,
}; };
use common::states::utils::{AbilityInfo, StageSection}; use common::states::utils::StageSection;
pub struct ComboAnimation; pub struct ComboAnimation;
impl Animation for ComboAnimation { impl Animation for ComboAnimation {
type Dependency<'a> = ( type Dependency<'a> = (Option<&'a str>, StageSection, usize, f32, f32);
Option<&'a str>,
Option<StageSection>,
Option<AbilityInfo>,
usize,
f32,
f32,
);
type Skeleton = QuadrupedLowSkeleton; type Skeleton = QuadrupedLowSkeleton;
#[cfg(feature = "use-dyn-lib")] #[cfg(feature = "use-dyn-lib")]
@ -22,16 +15,16 @@ impl Animation for ComboAnimation {
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_combo")] #[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_combo")]
fn update_skeleton_inner( fn update_skeleton_inner(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(ability_id, stage_section, _ability_info, current_strike, global_time, timer): Self::Dependency<'_>, (ability_id, stage_section, current_strike, global_time, timer): Self::Dependency<'_>,
anim_time: f32, anim_time: f32,
rate: &mut f32, rate: &mut f32,
_s_a: &SkeletonAttr, s_a: &SkeletonAttr,
) -> Self::Skeleton { ) -> Self::Skeleton {
*rate = 1.0; *rate = 1.0;
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let _multi_strike_pullback = 1.0 let _multi_strike_pullback = 1.0
- if matches!(stage_section, Some(StageSection::Recover)) { - if matches!(stage_section, StageSection::Recover) {
anim_time.powi(4) anim_time.powi(4)
} else { } else {
0.0 0.0
@ -45,9 +38,9 @@ impl Animation for ComboAnimation {
| "common.abilities.custom.driggle.bite", | "common.abilities.custom.driggle.bite",
) => { ) => {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0), StageSection::Buildup => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0), StageSection::Action => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), StageSection::Recover => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
let pullback = 1.0 - movement3; let pullback = 1.0 - movement3;
@ -102,6 +95,71 @@ impl Animation for ComboAnimation {
_ => {}, _ => {},
} }
}, },
Some(
"common.abilities.custom.asp.singlestrike"
| "comon.abilities.custom.maneater.singlestrike"
| "common.abilities.custom.quadlowbasic.singlestrike",
) => {
quadruped_low_alpha(
&mut next,
s_a,
stage_section,
anim_time,
global_time,
timer,
);
},
Some(
"common.abilities.custom.basilisk.triplestrike"
| "common.abilities.custom.quadlowbasic.triplestrike"
| "common.abilities.custom.quadlowbreathe.triplestrike"
| "common.abilities.custom.quadlowtail.triplestrike",
) => match strike {
0 | 2 => {
quadruped_low_alpha(
&mut next,
s_a,
stage_section,
anim_time,
global_time,
timer,
);
},
1 => {
quadruped_low_beta(
&mut next,
s_a,
stage_section,
anim_time,
global_time,
timer,
);
},
_ => {},
},
Some("common.abilities.custom.quadlowquick.quadstrike") => match strike {
0 | 2 | 3 => {
quadruped_low_alpha(
&mut next,
s_a,
stage_section,
anim_time,
global_time,
timer,
);
},
1 => {
quadruped_low_beta(
&mut next,
s_a,
stage_section,
anim_time,
global_time,
timer,
);
},
_ => {},
},
_ => {}, _ => {},
} }
} }

View File

@ -1,4 +1,3 @@
pub mod alpha;
pub mod beta; pub mod beta;
pub mod breathe; pub mod breathe;
pub mod combomelee; pub mod combomelee;
@ -14,14 +13,17 @@ pub mod tailwhip;
// Reexports // Reexports
pub use self::{ pub use self::{
alpha::AlphaAnimation, beta::BetaAnimation, breathe::BreatheAnimation, beta::BetaAnimation, breathe::BreatheAnimation, combomelee::ComboAnimation,
combomelee::ComboAnimation, dash::DashAnimation, idle::IdleAnimation, jump::JumpAnimation, dash::DashAnimation, idle::IdleAnimation, jump::JumpAnimation, run::RunAnimation,
run::RunAnimation, shockwave::ShockwaveAnimation, shoot::ShootAnimation, shockwave::ShockwaveAnimation, shoot::ShootAnimation, spritesummon::SpriteSummonAnimation,
spritesummon::SpriteSummonAnimation, stunned::StunnedAnimation, tailwhip::TailwhipAnimation, stunned::StunnedAnimation, tailwhip::TailwhipAnimation,
}; };
use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton}; use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton};
use common::comp::{self}; use common::{
comp::{self},
states::utils::StageSection,
};
use core::convert::TryFrom; use core::convert::TryFrom;
pub type Body = comp::quadruped_low::Body; pub type Body = comp::quadruped_low::Body;
@ -435,3 +437,83 @@ fn mount_point(body: &Body) -> Vec3<f32> {
} }
.into() .into()
} }
pub fn quadruped_low_alpha(
next: &mut QuadrupedLowSkeleton,
_s_a: &SkeletonAttr,
stage_section: StageSection,
anim_time: f32,
global_time: f32,
timer: f32,
) {
let (movement1base, movement2base, movement3) = match stage_section {
StageSection::Buildup => (anim_time.sqrt(), 0.0, 0.0),
StageSection::Action => (1.0, anim_time.powi(4), 0.0),
StageSection::Recover => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let twitch3 = (mirror * movement3 * 9.0).sin();
let movement1 = mirror * movement1base * pullback;
let movement2 = mirror * movement2base * pullback;
let movement1abs = movement1base * pullback;
let movement2abs = movement2base * pullback;
next.head_upper.orientation = Quaternion::rotation_z(twitch3 * -0.7);
next.head_lower.orientation = Quaternion::rotation_x(movement1abs * 0.35 + movement2abs * -0.9)
* Quaternion::rotation_y(movement1 * 0.7 + movement2 * -1.0);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * 0.5);
next.chest.orientation = Quaternion::rotation_y(movement1 * -0.08 + movement2 * 0.15)
* Quaternion::rotation_z(movement1 * -0.2 + movement2 * 0.6);
next.tail_front.orientation =
Quaternion::rotation_x(0.15) * Quaternion::rotation_z(movement1 * -0.4 + movement2 * -0.2);
next.tail_rear.orientation =
Quaternion::rotation_x(-0.12) * Quaternion::rotation_z(movement1 * -0.4 + movement2 * -0.2);
}
pub fn quadruped_low_beta(
next: &mut QuadrupedLowSkeleton,
_s_a: &SkeletonAttr,
stage_section: StageSection,
anim_time: f32,
global_time: f32,
timer: f32,
) {
let (movement1base, movement2base, movement3) = match stage_section {
StageSection::Buildup => (anim_time.sqrt(), 0.0, 0.0),
StageSection::Action => (1.0, anim_time.powi(4), 0.0),
StageSection::Recover => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let twitch3 = (mirror * movement3 * 9.0).sin();
let movement1 = mirror * movement1base * pullback;
let movement2 = mirror * movement2base * pullback;
let movement1abs = movement1base * pullback;
let movement2abs = movement2base * pullback;
next.head_upper.orientation = Quaternion::rotation_z(twitch3 * 0.2);
next.head_lower.orientation = Quaternion::rotation_x(movement1abs * 0.15 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.1 + movement2 * 0.15);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.9);
next.chest.orientation = Quaternion::rotation_y(movement1 * 0.08 + movement2 * -0.15)
* Quaternion::rotation_z(movement1 * 0.2 + movement2 * -0.3);
next.tail_front.orientation =
Quaternion::rotation_x(0.15) * Quaternion::rotation_z(movement1 * 0.4 + movement2 * 0.2);
next.tail_rear.orientation =
Quaternion::rotation_x(-0.12) * Quaternion::rotation_z(movement1 * 0.4 + movement2 * 0.2);
}

View File

@ -1,99 +0,0 @@
use super::{
super::{vek::*, Animation},
QuadrupedMediumSkeleton, SkeletonAttr,
};
use common::states::utils::StageSection;
pub struct AlphaAnimation;
impl Animation for AlphaAnimation {
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
type Skeleton = QuadrupedMediumSkeleton;
#[cfg(feature = "use-dyn-lib")]
const UPDATE_FN: &'static [u8] = b"quadruped_medium_alpha\0";
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_alpha")]
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(velocity, global_time, stage_section, timer): Self::Dependency<'_>,
anim_time: f32,
_rate: &mut f32,
s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let speed = (Vec2::<f32>::from(velocity).magnitude()).min(24.0);
let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 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.powi(4)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let movement1 = movement1base * mirror * pullback;
let movement1abs = movement1base * pullback;
let movement2 = movement2base * mirror * pullback;
let movement2abs = movement2base * pullback;
let twitch1 = (movement1 * 10.0).sin() * pullback;
let twitch2 = (movement3 * 5.0).sin() * pullback;
let twitchmovement = twitch1 + twitch2;
next.head.orientation = Quaternion::rotation_x(movement1abs * -0.3 + movement2abs * 0.6)
* Quaternion::rotation_y(movement1 * 0.35 + movement2 * -0.15)
* Quaternion::rotation_z(movement1 * 0.15 + movement2 * -0.5);
next.neck.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * -0.2)
* Quaternion::rotation_y(movement1 * 0.0)
* Quaternion::rotation_z(movement1 * 0.10 + movement1 * -0.15);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * 0.4);
next.tail.orientation = Quaternion::rotation_z(
movement1 * 0.5 + movement2 * -0.8 + twitchmovement * 0.2 * mirror,
);
next.torso_front.position = Vec3::new(
0.0,
s_a.torso_front.0 + movement1abs * -4.0,
s_a.torso_front.1,
);
next.torso_front.orientation = Quaternion::rotation_y(movement1 * -0.25 * movement2 * 0.25)
* Quaternion::rotation_z(movement1 * 0.35 + movement2 * -0.45);
next.torso_back.orientation = Quaternion::rotation_y(movement1 * 0.25 + movement1 * -0.25)
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * 0.65);
next.ears.orientation = Quaternion::rotation_x(twitchmovement * 0.2);
if speed < 0.5 {
next.leg_fl.orientation =
Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_fr.orientation =
Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_bl.orientation = Quaternion::rotation_x(movement1 * 0.1 + movement2 * -0.3);
next.leg_br.orientation = Quaternion::rotation_x(movement1 * -0.1 + movement2 * 0.3);
next.foot_fl.orientation =
Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_fr.orientation =
Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_bl.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
next.foot_br.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
};
next
}
}

View File

@ -1,99 +0,0 @@
use super::{
super::{vek::*, Animation},
QuadrupedMediumSkeleton, SkeletonAttr,
};
use common::states::utils::StageSection;
pub struct BetaAnimation;
impl Animation for BetaAnimation {
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
type Skeleton = QuadrupedMediumSkeleton;
#[cfg(feature = "use-dyn-lib")]
const UPDATE_FN: &'static [u8] = b"quadruped_medium_beta\0";
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_beta")]
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(velocity, global_time, stage_section, timer): Self::Dependency<'_>,
anim_time: f32,
_rate: &mut f32,
s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let speed = (Vec2::<f32>::from(velocity).magnitude()).min(24.0);
let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.sqrt(), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let movement1 = movement1base * mirror * pullback;
let movement1abs = movement1base * pullback;
let movement2 = movement2base * mirror * pullback;
let movement2abs = movement2base * pullback;
let twitch1 = (movement1 * 10.0).sin() * pullback;
let twitch2 = (movement2abs * -8.0).sin();
let twitchmovement = twitch1 + twitch2;
next.head.orientation = Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * 1.1)
* Quaternion::rotation_y(movement1 * -0.35 + movement2 * 0.25)
* Quaternion::rotation_z(movement1 * -0.25 + movement2 * 0.5);
next.neck.orientation = Quaternion::rotation_x(movement1abs * 0.0 + movement2abs * -0.2)
* Quaternion::rotation_y(movement1 * 0.0)
* Quaternion::rotation_z(movement1 * -0.10 + movement1 * 0.15);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.5 + twitch2 * -0.4);
next.tail.orientation = Quaternion::rotation_z(
movement1 * 0.5 + movement2 * -0.8 + twitchmovement * 0.2 * mirror,
);
next.torso_front.position = Vec3::new(
0.0,
s_a.torso_front.0 + movement1abs * -4.0,
s_a.torso_front.1,
);
next.torso_front.orientation = Quaternion::rotation_y(movement1 * -0.25 * movement2 * 0.25)
* Quaternion::rotation_z(movement1 * 0.35 + movement2 * -0.45);
next.torso_back.orientation = Quaternion::rotation_y(movement1 * 0.25 + movement1 * -0.25)
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * 0.65);
next.ears.orientation = Quaternion::rotation_x(twitchmovement * 0.2);
if speed < 0.5 {
next.leg_fl.orientation =
Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_fr.orientation =
Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_bl.orientation = Quaternion::rotation_x(movement1 * 0.1 + movement2 * -0.3);
next.leg_br.orientation = Quaternion::rotation_x(movement1 * -0.1 + movement2 * 0.3);
next.foot_fl.orientation =
Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_fr.orientation =
Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_bl.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
next.foot_br.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
};
next
}
}

View File

@ -1,19 +1,12 @@
use super::{ use super::{
super::{vek::*, Animation}, super::{vek::*, Animation},
QuadrupedMediumSkeleton, SkeletonAttr, quadruped_medium_alpha, quadruped_medium_beta, QuadrupedMediumSkeleton, SkeletonAttr,
}; };
use common::states::utils::{AbilityInfo, StageSection}; use common::states::utils::StageSection;
pub struct ComboAnimation; pub struct ComboAnimation;
impl Animation for ComboAnimation { impl Animation for ComboAnimation {
type Dependency<'a> = ( type Dependency<'a> = (Option<&'a str>, StageSection, usize, f32, f32, f32);
Option<&'a str>,
Option<StageSection>,
Option<AbilityInfo>,
usize,
f32,
f32,
);
type Skeleton = QuadrupedMediumSkeleton; type Skeleton = QuadrupedMediumSkeleton;
#[cfg(feature = "use-dyn-lib")] #[cfg(feature = "use-dyn-lib")]
@ -22,16 +15,18 @@ impl Animation for ComboAnimation {
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_combo")] #[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_combo")]
fn update_skeleton_inner( fn update_skeleton_inner(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(ability_id, stage_section, _ability_info, current_strike, global_time, timer): Self::Dependency<'_>, (ability_id, stage_section, current_strike, speed, global_time, timer): Self::Dependency<
'_,
>,
anim_time: f32, anim_time: f32,
rate: &mut f32, rate: &mut f32,
_s_a: &SkeletonAttr, s_a: &SkeletonAttr,
) -> Self::Skeleton { ) -> Self::Skeleton {
*rate = 1.0; *rate = 1.0;
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let _multi_strike_pullback = 1.0 let _multi_strike_pullback = 1.0
- if matches!(stage_section, Some(StageSection::Recover)) { - if matches!(stage_section, StageSection::Recover) {
anim_time.powi(4) anim_time.powi(4)
} else { } else {
0.0 0.0
@ -44,9 +39,9 @@ impl Animation for ComboAnimation {
| "common.abilities.custom.frostfang.triplestrike", | "common.abilities.custom.frostfang.triplestrike",
) => { ) => {
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0), StageSection::Buildup => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0), StageSection::Action => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), StageSection::Recover => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
let pullback = 1.0 - movement3; let pullback = 1.0 - movement3;
@ -101,6 +96,77 @@ impl Animation for ComboAnimation {
_ => {}, _ => {},
} }
}, },
Some("common.abilities.custom.quadmedbasic.singlestrike") => match strike {
0 => {
quadruped_medium_alpha(
&mut next,
s_a,
speed,
stage_section,
anim_time,
global_time,
timer,
);
},
_ => {},
},
Some(
"common.abilities.custom.quadmedbasic.triplestrike"
| "common.abilities.custom.quadmedquick.triplestrike",
) => match strike {
0 | 2 => {
quadruped_medium_alpha(
&mut next,
s_a,
speed,
stage_section,
anim_time,
global_time,
timer,
);
},
1 => {
quadruped_medium_beta(
&mut next,
s_a,
speed,
stage_section,
anim_time,
global_time,
timer,
);
},
_ => {},
},
Some(
"common.abilities.custom.quadmedcharge.doublestrike"
| "common.abilities.custom.quadmedjump.doublestrike"
| "common.abilities.custom.roshwalr.doublehusk",
) => match strike {
0 => {
quadruped_medium_alpha(
&mut next,
s_a,
speed,
stage_section,
anim_time,
global_time,
timer,
);
},
1 => {
quadruped_medium_beta(
&mut next,
s_a,
speed,
stage_section,
anim_time,
global_time,
timer,
);
},
_ => {},
},
_ => {}, _ => {},
} }
} }

View File

@ -1,5 +1,3 @@
pub mod alpha;
pub mod beta;
pub mod combomelee; pub mod combomelee;
pub mod dash; pub mod dash;
pub mod feed; pub mod feed;
@ -13,14 +11,16 @@ pub mod stunned;
// Reexports // Reexports
pub use self::{ pub use self::{
alpha::AlphaAnimation, beta::BetaAnimation, combomelee::ComboAnimation, dash::DashAnimation, combomelee::ComboAnimation, dash::DashAnimation, feed::FeedAnimation, hoof::HoofAnimation,
feed::FeedAnimation, hoof::HoofAnimation, idle::IdleAnimation, jump::JumpAnimation, idle::IdleAnimation, jump::JumpAnimation, leapmelee::LeapMeleeAnimation, run::RunAnimation,
leapmelee::LeapMeleeAnimation, run::RunAnimation, shockwave::ShockwaveAnimation, shockwave::ShockwaveAnimation, stunned::StunnedAnimation,
stunned::StunnedAnimation,
}; };
use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton}; use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton};
use common::comp::{self}; use common::{
comp::{self},
states::utils::StageSection,
};
use core::convert::TryFrom; use core::convert::TryFrom;
pub type Body = comp::quadruped_medium::Body; pub type Body = comp::quadruped_medium::Body;
@ -797,3 +797,159 @@ fn mount_point(body: &Body) -> Vec3<f32> {
} }
.into() .into()
} }
pub fn quadruped_medium_alpha(
next: &mut QuadrupedMediumSkeleton,
s_a: &SkeletonAttr,
speed: f32,
stage_section: StageSection,
anim_time: f32,
global_time: f32,
timer: f32,
) {
let speed = (Vec2::<f32>::from(speed).magnitude()).min(24.0);
let (movement1base, movement2base, movement3) = match stage_section {
StageSection::Buildup => (anim_time.powf(0.25), 0.0, 0.0),
StageSection::Action => (1.0, anim_time.powf(0.25), 0.0),
StageSection::Recover => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let movement1 = movement1base * mirror * pullback;
let movement1abs = movement1base * pullback;
let movement2 = movement2base * mirror * pullback;
let movement2abs = movement2base * pullback;
let twitch1 = (movement1 * 10.0).sin() * pullback;
let twitch2 = (movement3 * 5.0).sin() * pullback;
let twitchmovement = twitch1 + twitch2;
next.head.orientation = Quaternion::rotation_x(movement1abs * -0.3 + movement2abs * 0.6)
* Quaternion::rotation_y(movement1 * 0.35 + movement2 * -0.15)
* Quaternion::rotation_z(movement1 * 0.15 + movement2 * -0.5);
next.neck.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * -0.2)
* Quaternion::rotation_y(movement1 * 0.0)
* Quaternion::rotation_z(movement1 * 0.10 + movement1 * -0.15);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * 0.4);
next.tail.orientation =
Quaternion::rotation_z(movement1 * 0.5 + movement2 * -0.8 + twitchmovement * 0.2 * mirror);
next.torso_front.position = Vec3::new(
0.0,
s_a.torso_front.0 + movement1abs * -4.0,
s_a.torso_front.1,
);
next.torso_front.orientation = Quaternion::rotation_y(movement1 * -0.25 * movement2 * 0.25)
* Quaternion::rotation_z(movement1 * 0.35 + movement2 * -0.45);
next.torso_back.orientation = Quaternion::rotation_y(movement1 * 0.25 + movement1 * -0.25)
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * 0.65);
next.ears.orientation = Quaternion::rotation_x(twitchmovement * 0.2);
if speed < 0.5 {
next.leg_fl.orientation = Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_fr.orientation = Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_bl.orientation = Quaternion::rotation_x(movement1 * 0.1 + movement2 * -0.3);
next.leg_br.orientation = Quaternion::rotation_x(movement1 * -0.1 + movement2 * 0.3);
next.foot_fl.orientation = Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_fr.orientation = Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_bl.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
next.foot_br.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
};
}
pub fn quadruped_medium_beta(
next: &mut QuadrupedMediumSkeleton,
s_a: &SkeletonAttr,
speed: f32,
stage_section: StageSection,
anim_time: f32,
global_time: f32,
timer: f32,
) {
let speed = (Vec2::<f32>::from(speed).magnitude()).min(24.0);
let (movement1base, movement2base, movement3) = match stage_section {
StageSection::Buildup => (anim_time.powf(0.25), 0.0, 0.0),
StageSection::Action => (1.0, anim_time.sqrt(), 0.0),
StageSection::Recover => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let movement1 = movement1base * mirror * pullback;
let movement1abs = movement1base * pullback;
let movement2 = movement2base * mirror * pullback;
let movement2abs = movement2base * pullback;
let twitch1 = (movement1 * 10.0).sin() * pullback;
let twitch2 = (movement2abs * -8.0).sin();
let twitchmovement = twitch1 + twitch2;
next.head.orientation = Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * 1.1)
* Quaternion::rotation_y(movement1 * -0.35 + movement2 * 0.25)
* Quaternion::rotation_z(movement1 * -0.25 + movement2 * 0.5);
next.neck.orientation = Quaternion::rotation_x(movement1abs * 0.0 + movement2abs * -0.2)
* Quaternion::rotation_y(movement1 * 0.0)
* Quaternion::rotation_z(movement1 * -0.10 + movement1 * 0.15);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.5 + twitch2 * -0.4);
next.tail.orientation =
Quaternion::rotation_z(movement1 * 0.5 + movement2 * -0.8 + twitchmovement * 0.2 * mirror);
next.torso_front.position = Vec3::new(
0.0,
s_a.torso_front.0 + movement1abs * -4.0,
s_a.torso_front.1,
);
next.torso_front.orientation = Quaternion::rotation_y(movement1 * -0.25 * movement2 * 0.25)
* Quaternion::rotation_z(movement1 * 0.35 + movement2 * -0.45);
next.torso_back.orientation = Quaternion::rotation_y(movement1 * 0.25 + movement1 * -0.25)
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * 0.65);
next.ears.orientation = Quaternion::rotation_x(twitchmovement * 0.2);
if speed < 0.5 {
next.leg_fl.orientation = Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_fr.orientation = Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_bl.orientation = Quaternion::rotation_x(movement1 * 0.1 + movement2 * -0.3);
next.leg_br.orientation = Quaternion::rotation_x(movement1 * -0.1 + movement2 * 0.3);
next.foot_fl.orientation = Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_fr.orientation = Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_bl.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
next.foot_br.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
};
}

View File

@ -8,7 +8,7 @@ use common::states::utils::StageSection;
pub struct AlphaAnimation; pub struct AlphaAnimation;
impl Animation for AlphaAnimation { impl Animation for AlphaAnimation {
type Dependency<'a> = (f32, f32, Option<StageSection>, f32); type Dependency<'a> = (f32, StageSection, f32);
type Skeleton = QuadrupedSmallSkeleton; type Skeleton = QuadrupedSmallSkeleton;
#[cfg(feature = "use-dyn-lib")] #[cfg(feature = "use-dyn-lib")]
@ -17,7 +17,7 @@ impl Animation for AlphaAnimation {
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_small_alpha")] #[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_small_alpha")]
fn update_skeleton_inner( fn update_skeleton_inner(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>, (global_time, stage_section, timer): Self::Dependency<'_>,
anim_time: f32, anim_time: f32,
_rate: &mut f32, _rate: &mut f32,
_s_a: &SkeletonAttr, _s_a: &SkeletonAttr,
@ -25,9 +25,9 @@ impl Animation for AlphaAnimation {
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let (movement1base, movement2base, movement3) = match stage_section { let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0), StageSection::Buildup => (anim_time.sqrt(), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0), StageSection::Action => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time), StageSection::Recover => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
let pullback = 1.0 - movement3; let pullback = 1.0 - movement3;

View File

@ -1,66 +0,0 @@
use super::{
super::{vek::*, Animation},
SkeletonAttr, TheropodSkeleton,
};
use common::states::utils::StageSection;
pub struct AlphaAnimation;
impl Animation for AlphaAnimation {
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
type Skeleton = TheropodSkeleton;
#[cfg(feature = "use-dyn-lib")]
const UPDATE_FN: &'static [u8] = b"theropod_alpha\0";
#[cfg_attr(feature = "be-dyn-lib", export_name = "theropod_alpha")]
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>,
anim_time: f32,
_rate: &mut f32,
_s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powi(2), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let movement1 = mirror * movement1base * pullback;
let movement2 = mirror * movement2base * pullback;
let movement1abs = movement1base * pullback;
let movement2abs = movement2base * pullback;
next.head.orientation = Quaternion::rotation_x(movement1abs * 0.2)
* Quaternion::rotation_y(movement1 * 0.1 + movement2 * 0.2);
next.neck.orientation = Quaternion::rotation_x(movement1abs * -0.3)
* Quaternion::rotation_y(movement1 * 0.1 + movement2 * 0.1);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * 0.5);
next.chest_front.orientation = Quaternion::rotation_x(movement1abs * -0.2);
next.chest_back.orientation = Quaternion::rotation_x(movement1abs * 0.2);
next.leg_l.orientation = Quaternion::rotation_x(movement1abs * -0.1);
next.leg_r.orientation = Quaternion::rotation_x(movement1abs * -0.1);
next.foot_l.orientation = Quaternion::rotation_x(movement1abs * -0.3);
next.foot_r.orientation = Quaternion::rotation_x(movement1abs * -0.3);
next.tail_front.orientation =
Quaternion::rotation_x(0.1 + movement1abs * -0.1 + movement2abs * -0.3)
* Quaternion::rotation_z(movement1 * -0.1 + movement2 * -0.2);
next.tail_back.orientation =
Quaternion::rotation_x(0.1 + movement1abs * -0.1 + movement2abs * -0.3)
* Quaternion::rotation_z(movement1 * -0.1 + movement2 * -0.2);
next
}
}

View File

@ -1,65 +0,0 @@
use super::{
super::{vek::*, Animation},
SkeletonAttr, TheropodSkeleton,
};
use common::states::utils::StageSection;
//use std::ops::Rem;
pub struct BetaAnimation;
impl Animation for BetaAnimation {
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
type Skeleton = TheropodSkeleton;
#[cfg(feature = "use-dyn-lib")]
const UPDATE_FN: &'static [u8] = b"theropod_beta\0";
#[cfg_attr(feature = "be-dyn-lib", export_name = "theropod_beta")]
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>,
anim_time: f32,
_rate: &mut f32,
_s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powi(2), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powi(4), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let movement1 = mirror * movement1base * pullback;
let movement2 = mirror * movement2base * pullback;
let movement1abs = movement1base * pullback;
let movement2abs = movement2base * pullback;
next.head.orientation = Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * 1.2)
* Quaternion::rotation_y(movement1 * 0.1 + movement2 * -0.1);
next.neck.orientation = Quaternion::rotation_x(movement1abs * 0.4 + movement2abs * -1.2)
* Quaternion::rotation_y(movement1 * 0.1 + movement2 * -0.1);
next.chest_front.orientation =
Quaternion::rotation_x(movement1abs * 0.6 + movement2abs * -1.5);
next.chest_back.orientation =
Quaternion::rotation_x(movement1abs * -0.6 + movement2abs * 1.5);
next.leg_l.orientation = Quaternion::rotation_x(movement1abs * -0.5);
next.leg_r.orientation = Quaternion::rotation_x(movement1abs * -0.5);
next.foot_l.orientation = Quaternion::rotation_x(movement1abs * 0.4);
next.foot_r.orientation = Quaternion::rotation_x(movement1abs * 0.4);
next.tail_front.orientation =
Quaternion::rotation_x(0.1 + movement1abs * -0.1 + movement2abs * -0.3);
next.tail_back.orientation =
Quaternion::rotation_x(0.1 + movement1abs * -0.1 + movement2abs * -0.3);
next
}
}

View File

@ -0,0 +1,118 @@
use super::{
super::{vek::*, Animation},
SkeletonAttr, TheropodSkeleton,
};
use common::states::utils::StageSection;
pub struct ComboAnimation;
impl Animation for ComboAnimation {
type Dependency<'a> = (Option<&'a str>, StageSection, usize, f32, f32);
type Skeleton = TheropodSkeleton;
#[cfg(feature = "use-dyn-lib")]
const UPDATE_FN: &'static [u8] = b"theropod_combo\0";
#[cfg_attr(feature = "be-dyn-lib", export_name = "theropod_combo")]
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(_ability_id, stage_section, current_strike, global_time, timer): Self::Dependency<'_>,
anim_time: f32,
_rate: &mut f32,
_s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let multi_strike_pullback = 1.0
- if matches!(stage_section, StageSection::Recover) {
anim_time.powi(4)
} else {
0.0
};
for strike in 0..=current_strike {
match strike {
0 => {
let (movement1base, movement2base) = match stage_section {
StageSection::Buildup => (anim_time.powi(2), 0.0),
StageSection::Action => (1.0, anim_time.powi(4)),
_ => (0.0, 0.0),
};
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let movement1 = mirror * movement1base * multi_strike_pullback;
let movement2 = mirror * movement2base * multi_strike_pullback;
let movement1abs = movement1base * multi_strike_pullback;
let movement2abs = movement2base * multi_strike_pullback;
next.head.orientation = Quaternion::rotation_x(movement1abs * 0.2)
* Quaternion::rotation_y(movement1 * 0.1 + movement2 * 0.2);
next.neck.orientation = Quaternion::rotation_x(movement1abs * -0.3)
* Quaternion::rotation_y(movement1 * 0.1 + movement2 * 0.1);
next.jaw.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * 0.5);
next.chest_front.orientation = Quaternion::rotation_x(movement1abs * -0.2);
next.chest_back.orientation = Quaternion::rotation_x(movement1abs * 0.2);
next.leg_l.orientation = Quaternion::rotation_x(movement1abs * -0.1);
next.leg_r.orientation = Quaternion::rotation_x(movement1abs * -0.1);
next.foot_l.orientation = Quaternion::rotation_x(movement1abs * -0.3);
next.foot_r.orientation = Quaternion::rotation_x(movement1abs * -0.3);
next.tail_front.orientation =
Quaternion::rotation_x(0.1 + movement1abs * -0.1 + movement2abs * -0.3)
* Quaternion::rotation_z(movement1 * -0.1 + movement2 * -0.2);
next.tail_back.orientation =
Quaternion::rotation_x(0.1 + movement1abs * -0.1 + movement2abs * -0.3)
* Quaternion::rotation_z(movement1 * -0.1 + movement2 * -0.2);
},
1 | 2 => {
let (movement1base, movement2base) = match stage_section {
StageSection::Buildup => (anim_time.powi(2), 0.0),
StageSection::Action => (1.0, anim_time.powi(4)),
_ => (0.0, 0.0),
};
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum();
let movement1 = mirror * movement1base * multi_strike_pullback;
let movement2 = mirror * movement2base * multi_strike_pullback;
let movement1abs = movement1base * multi_strike_pullback;
let movement2abs = movement2base * multi_strike_pullback;
next.head.orientation =
Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * 1.2)
* Quaternion::rotation_y(movement1 * 0.1 + movement2 * -0.1);
next.neck.orientation =
Quaternion::rotation_x(movement1abs * 0.4 + movement2abs * -1.2)
* Quaternion::rotation_y(movement1 * 0.1 + movement2 * -0.1);
next.chest_front.orientation =
Quaternion::rotation_x(movement1abs * 0.6 + movement2abs * -1.5);
next.chest_back.orientation =
Quaternion::rotation_x(movement1abs * -0.6 + movement2abs * 1.5);
next.leg_l.orientation = Quaternion::rotation_x(movement1abs * -0.5);
next.leg_r.orientation = Quaternion::rotation_x(movement1abs * -0.5);
next.foot_l.orientation = Quaternion::rotation_x(movement1abs * 0.4);
next.foot_r.orientation = Quaternion::rotation_x(movement1abs * 0.4);
next.tail_front.orientation =
Quaternion::rotation_x(0.1 + movement1abs * -0.1 + movement2abs * -0.3);
next.tail_back.orientation =
Quaternion::rotation_x(0.1 + movement1abs * -0.1 + movement2abs * -0.3);
},
_ => {},
}
}
next
}
}

View File

@ -1,5 +1,4 @@
pub mod alpha; pub mod combomelee;
pub mod beta;
pub mod dash; pub mod dash;
pub mod idle; pub mod idle;
pub mod jump; pub mod jump;
@ -7,8 +6,8 @@ pub mod run;
// Reexports // Reexports
pub use self::{ pub use self::{
alpha::AlphaAnimation, beta::BetaAnimation, dash::DashAnimation, idle::IdleAnimation, combomelee::ComboAnimation, dash::DashAnimation, idle::IdleAnimation, jump::JumpAnimation,
jump::JumpAnimation, run::RunAnimation, run::RunAnimation,
}; };
use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton}; use super::{make_bone, vek::*, FigureBoneData, Offsets, Skeleton};

View File

@ -1,7 +1,7 @@
use crate::{widgets::two_col_row, SelectedEntityInfo}; use crate::{widgets::two_col_row, SelectedEntityInfo};
use common::{ use common::{
comp::CharacterState, comp::CharacterState,
states::{charged_melee, combo_melee, dash_melee, leap_melee}, states::{charged_melee, dash_melee, leap_melee},
}; };
use egui::{Grid, Ui}; use egui::{Grid, Ui};
@ -15,9 +15,6 @@ pub fn draw_char_state_group(
ui.label(character_state.to_string()); ui.label(character_state.to_string());
}); });
match character_state { match character_state {
CharacterState::ComboMelee(data) => {
combo_melee_grid(ui, data);
},
CharacterState::DashMelee(data) => dash_melee_grid(ui, data), CharacterState::DashMelee(data) => dash_melee_grid(ui, data),
CharacterState::ChargedMelee(data) => charged_melee_grid(ui, data), CharacterState::ChargedMelee(data) => charged_melee_grid(ui, data),
// Character states with no associated data to display // Character states with no associated data to display
@ -47,18 +44,6 @@ fn charged_melee_grid(ui: &mut Ui, data: &charged_melee::Data) {
}); });
} }
fn combo_melee_grid(ui: &mut Ui, data: &combo_melee::Data) {
Grid::new("selected_entity_combo_melee_grid")
.spacing([40.0, 4.0])
.max_col_width(100.0)
.striped(true)
.show(ui, |ui| #[rustfmt::skip] {
two_col_row(ui, "Stage", data.stage.to_string());
two_col_row(ui, "Timer", format!("{}ms", data.timer.as_millis()));
two_col_row(ui, "num_stages", data.static_data.num_stages.to_string());
});
}
fn dash_melee_grid(ui: &mut Ui, data: &dash_melee::Data) { fn dash_melee_grid(ui: &mut Ui, data: &dash_melee::Data) {
Grid::new("selected_entity_dash_melee_grid") Grid::new("selected_entity_dash_melee_grid")
.spacing([40.0, 4.0]) .spacing([40.0, 4.0])

View File

@ -115,128 +115,6 @@ fn maps_basic_melee() {
); );
} }
#[test]
fn matches_ability_stage() {
let loadout = LoadoutBuilder::empty()
.active_mainhand(Some(Item::new_from_asset_expect(
"common.items.weapons.sword.starter",
)))
.build();
let inventory = Inventory::with_loadout_humanoid(loadout);
let result = CombatEventMapper::map_event(
&CharacterState::ComboMelee(states::combo_melee::Data {
static_data: states::combo_melee::StaticData {
num_stages: 1,
stage_data: vec![states::combo_melee::Stage {
stage: 1,
base_damage: 100.0,
base_poise_damage: 100.0,
damage_increase: 10.0,
poise_damage_increase: 10.0,
knockback: 10.0,
range: 4.0,
angle: 30.0,
base_buildup_duration: Duration::from_millis(500),
base_swing_duration: Duration::from_millis(200),
hit_timing: 0.5,
base_recover_duration: Duration::from_millis(400),
forward_movement: 0.5,
damage_kind: DamageKind::Slashing,
damage_effect: None,
}],
initial_energy_gain: 0.0,
max_energy_gain: 100.0,
energy_increase: 20.0,
speed_increase: 0.05,
max_speed_increase: 0.8,
scales_from_combo: 2,
ori_modifier: 1.0,
ability_info: empty_ability_info(),
},
exhausted: false,
stage: 1,
timer: Duration::default(),
stage_section: states::utils::StageSection::Action,
}),
&PreviousEntityState {
event: SfxEvent::Idle,
time: Instant::now(),
weapon_drawn: true,
},
&inventory,
);
assert_eq!(
result,
SfxEvent::Attack(
CharacterAbilityType::ComboMelee(states::utils::StageSection::Action, 1),
ToolKind::Sword
)
);
}
#[test]
fn ignores_different_ability_stage() {
let loadout = LoadoutBuilder::empty()
.active_mainhand(Some(Item::new_from_asset_expect(
"common.items.weapons.axe.starter_axe",
)))
.build();
let inventory = Inventory::with_loadout_humanoid(loadout);
let result = CombatEventMapper::map_event(
&CharacterState::ComboMelee(states::combo_melee::Data {
static_data: states::combo_melee::StaticData {
num_stages: 1,
stage_data: vec![states::combo_melee::Stage {
stage: 1,
base_damage: 100.0,
base_poise_damage: 100.0,
damage_increase: 100.0,
poise_damage_increase: 10.0,
knockback: 10.0,
range: 4.0,
angle: 30.0,
base_buildup_duration: Duration::from_millis(500),
base_swing_duration: Duration::from_millis(200),
hit_timing: 0.5,
base_recover_duration: Duration::from_millis(400),
forward_movement: 0.5,
damage_kind: DamageKind::Slashing,
damage_effect: None,
}],
initial_energy_gain: 0.0,
max_energy_gain: 100.0,
energy_increase: 20.0,
speed_increase: 0.05,
max_speed_increase: 0.8,
scales_from_combo: 2,
ori_modifier: 1.0,
ability_info: empty_ability_info(),
},
exhausted: false,
stage: 1,
timer: Duration::default(),
stage_section: states::utils::StageSection::Action,
}),
&PreviousEntityState {
event: SfxEvent::Idle,
time: Instant::now(),
weapon_drawn: true,
},
&inventory,
);
assert_ne!(
result,
SfxEvent::Attack(
CharacterAbilityType::ComboMelee(states::utils::StageSection::Action, 2),
ToolKind::Sword
)
);
}
fn empty_ability_info() -> states::utils::AbilityInfo { fn empty_ability_info() -> states::utils::AbilityInfo {
states::utils::AbilityInfo { states::utils::AbilityInfo {
tool: None, tool: None,

View File

@ -71,13 +71,6 @@
//! ], //! ],
//! threshold: 1.2, //! threshold: 1.2,
//! ), //! ),
//! // A multi-stage attack ability which depends on the weapon
//! Attack(ComboMelee(Swing, 1), Sword): (
//! files: [
//! "voxygen.audio.sfx.abilities.swing_sword",
//! ],
//! threshold: 0.5,
//! ),
//! ``` //! ```
mod event_mapper; mod event_mapper;

View File

@ -1835,7 +1835,7 @@ impl FigureMgr {
skeleton_attr, skeleton_attr,
) )
}, },
CharacterState::ComboMelee(s) => { CharacterState::ComboMeleeDeprecated(s) => {
let stage_index = (s.stage - 1) as usize; let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();
let stage_progress = let stage_progress =
@ -2313,40 +2313,29 @@ impl FigureMgr {
), ),
}; };
let target_bones = match &character { let target_bones = match &character {
CharacterState::ComboMelee(s) => { CharacterState::BasicMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();
let stage_progress =
if let Some(stage) = s.static_data.stage_data.get(stage_index) { let stage_progress = match s.stage_section {
match s.stage_section { StageSection::Buildup => {
StageSection::Buildup => { stage_time / s.static_data.buildup_duration.as_secs_f32()
stage_time / stage.base_buildup_duration.as_secs_f32() },
}, StageSection::Action => {
StageSection::Action => { stage_time / s.static_data.swing_duration.as_secs_f32()
stage_time / stage.base_swing_duration.as_secs_f32() },
}, StageSection::Recover => {
StageSection::Recover => { stage_time / s.static_data.recover_duration.as_secs_f32()
stage_time / stage.base_recover_duration.as_secs_f32() },
},
_ => 0.0, _ => 0.0,
} };
} else { anim::quadruped_small::AlphaAnimation::update_skeleton(
0.0 &target_base,
}; (time, s.stage_section, state.state_time),
{ stage_progress,
anim::quadruped_small::AlphaAnimation::update_skeleton( &mut state_animation_rate,
&target_base, skeleton_attr,
( )
rel_vel.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
)
}
}, },
CharacterState::ComboMelee2(s) => { CharacterState::ComboMelee2(s) => {
let timer = s.timer.as_secs_f32(); let timer = s.timer.as_secs_f32();
@ -2675,65 +2664,6 @@ impl FigureMgr {
skeleton_attr, skeleton_attr,
) )
}, },
CharacterState::ComboMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f32();
let stage_progress =
if let Some(stage) = s.static_data.stage_data.get(stage_index) {
match s.stage_section {
StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32()
},
StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32()
},
StageSection::Recover => {
stage_time / stage.base_recover_duration.as_secs_f32()
},
_ => 0.0,
}
} else {
0.0
};
match s.stage {
1 => anim::quadruped_medium::AlphaAnimation::update_skeleton(
&target_base,
(
rel_vel.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
2 => anim::quadruped_medium::BetaAnimation::update_skeleton(
&target_base,
(
rel_vel.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
_ => anim::quadruped_medium::AlphaAnimation::update_skeleton(
&target_base,
(
rel_vel.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
}
},
CharacterState::ComboMelee2(s) => { CharacterState::ComboMelee2(s) => {
let timer = s.timer.as_secs_f32(); let timer = s.timer.as_secs_f32();
let current_strike = s.completed_strikes % s.static_data.strikes.len(); let current_strike = s.completed_strikes % s.static_data.strikes.len();
@ -2755,9 +2685,9 @@ impl FigureMgr {
&target_base, &target_base,
( (
ability_id, ability_id,
Some(s.stage_section), s.stage_section,
Some(s.static_data.ability_info),
current_strike, current_strike,
rel_vel.magnitude(),
time, time,
state.state_time, state.state_time,
), ),
@ -3028,12 +2958,7 @@ impl FigureMgr {
}; };
anim::quadruped_low::BetaAnimation::update_skeleton( anim::quadruped_low::BetaAnimation::update_skeleton(
&target_base, &target_base,
( (rel_vel.magnitude(), time, s.stage_section, state.state_time),
rel_vel.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress, stage_progress,
&mut state_animation_rate, &mut state_animation_rate,
skeleton_attr, skeleton_attr,
@ -3141,8 +3066,7 @@ impl FigureMgr {
&target_base, &target_base,
( (
ability_id, ability_id,
Some(s.stage_section), s.stage_section,
Some(s.static_data.ability_info),
current_strike, current_strike,
time, time,
state.state_time, state.state_time,
@ -3152,65 +3076,6 @@ impl FigureMgr {
skeleton_attr, skeleton_attr,
) )
}, },
CharacterState::ComboMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f32();
let stage_progress =
if let Some(stage) = s.static_data.stage_data.get(stage_index) {
match s.stage_section {
StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32()
},
StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32()
},
StageSection::Recover => {
stage_time / stage.base_recover_duration.as_secs_f32()
},
_ => 0.0,
}
} else {
0.0
};
match s.stage {
1 => anim::quadruped_low::AlphaAnimation::update_skeleton(
&target_base,
(
rel_vel.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
2 => anim::quadruped_low::BetaAnimation::update_skeleton(
&target_base,
(
rel_vel.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
_ => anim::quadruped_low::AlphaAnimation::update_skeleton(
&target_base,
(
rel_vel.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
}
},
CharacterState::BasicBeam(s) => { CharacterState::BasicBeam(s) => {
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();
let stage_progress = match s.stage_section { let stage_progress = match s.stage_section {
@ -3417,27 +3282,20 @@ impl FigureMgr {
skeleton_attr, skeleton_attr,
) )
}, },
CharacterState::ComboMelee(s) => { CharacterState::BasicMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();
let stage_progress = let stage_progress = match s.stage_section {
if let Some(stage) = s.static_data.stage_data.get(stage_index) { StageSection::Buildup => {
match s.stage_section { stage_time / s.static_data.buildup_duration.as_secs_f32()
StageSection::Buildup => { },
stage_time / stage.base_buildup_duration.as_secs_f32() StageSection::Action => {
}, stage_time / s.static_data.swing_duration.as_secs_f32()
StageSection::Action => { },
stage_time / stage.base_swing_duration.as_secs_f32() StageSection::Recover => {
}, stage_time / s.static_data.recover_duration.as_secs_f32()
StageSection::Recover => { },
stage_time / stage.base_recover_duration.as_secs_f32() _ => 0.0,
}, };
_ => 0.0,
}
} else {
0.0
};
anim::bird_medium::AlphaAnimation::update_skeleton( anim::bird_medium::AlphaAnimation::update_skeleton(
&target_base, &target_base,
( (
@ -3878,10 +3736,11 @@ impl FigureMgr {
&target_base, &target_base,
( (
ability_id, ability_id,
Some(s.stage_section), s.stage_section,
Some(s.static_data.ability_info),
current_strike, current_strike,
move_dir, rel_vel,
time,
state.state_time,
), ),
progress, progress,
&mut state_animation_rate, &mut state_animation_rate,
@ -4054,65 +3913,6 @@ impl FigureMgr {
skeleton_attr, skeleton_attr,
) )
}, },
CharacterState::ComboMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f32();
let stage_progress =
if let Some(stage) = s.static_data.stage_data.get(stage_index) {
match s.stage_section {
StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32()
},
StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32()
},
StageSection::Recover => {
stage_time / stage.base_recover_duration.as_secs_f32()
},
_ => 0.0,
}
} else {
0.0
};
match s.stage {
1 => anim::biped_small::AlphaAnimation::update_skeleton(
&target_base,
(
ability_id,
active_tool_kind,
rel_vel,
ori * anim::vek::Vec3::<f32>::unit_y(),
state.last_ori * anim::vek::Vec3::<f32>::unit_y(),
time,
rel_avg_vel,
state.acc_vel,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
_ => anim::biped_small::AlphaAnimation::update_skeleton(
&target_base,
(
ability_id,
active_tool_kind,
rel_vel,
ori * anim::vek::Vec3::<f32>::unit_y(),
state.last_ori * anim::vek::Vec3::<f32>::unit_y(),
time,
rel_avg_vel,
state.acc_vel,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
}
},
CharacterState::BasicMelee(s) => { CharacterState::BasicMelee(s) => {
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();
let stage_progress = match s.stage_section { let stage_progress = match s.stage_section {
@ -4431,52 +4231,36 @@ impl FigureMgr {
), ),
}; };
let target_bones = match &character { let target_bones = match &character {
CharacterState::ComboMelee(s) => { CharacterState::ComboMelee2(s) => {
let stage_index = (s.stage - 1) as usize; let timer = s.timer.as_secs_f32();
let stage_time = s.timer.as_secs_f32(); let current_strike = s.completed_strikes % s.static_data.strikes.len();
let stage_progress = let strike_data = s.static_data.strikes[current_strike];
if let Some(stage) = s.static_data.stage_data.get(stage_index) { let progress = match s.stage_section {
match s.stage_section { StageSection::Buildup => {
StageSection::Buildup => { timer / strike_data.buildup_duration.as_secs_f32()
stage_time / stage.base_buildup_duration.as_secs_f32() },
}, StageSection::Action => {
StageSection::Action => { timer / strike_data.swing_duration.as_secs_f32()
stage_time / stage.base_swing_duration.as_secs_f32() },
}, StageSection::Recover => {
StageSection::Recover => { timer / strike_data.recover_duration.as_secs_f32()
stage_time / stage.base_recover_duration.as_secs_f32() },
}, _ => 0.0,
_ => 0.0, };
}
} else { anim::theropod::ComboAnimation::update_skeleton(
0.0 &target_base,
}; (
match s.stage { ability_id,
1 => anim::theropod::AlphaAnimation::update_skeleton( s.stage_section,
&target_base, current_strike,
( time,
rel_vel.magnitude(), state.state_time,
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
), ),
_ => anim::theropod::BetaAnimation::update_skeleton( progress,
&target_base, &mut state_animation_rate,
( skeleton_attr,
rel_vel.magnitude(), )
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
}
}, },
CharacterState::DashMelee(s) => { CharacterState::DashMelee(s) => {
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();
@ -4610,52 +4394,36 @@ impl FigureMgr {
), ),
}; };
let target_bones = match &character { let target_bones = match &character {
CharacterState::ComboMelee(s) => { CharacterState::ComboMelee2(s) => {
let stage_index = (s.stage - 1) as usize; let timer = s.timer.as_secs_f32();
let stage_time = s.timer.as_secs_f32(); let current_strike = s.completed_strikes % s.static_data.strikes.len();
let stage_progress = let strike_data = s.static_data.strikes[current_strike];
if let Some(stage) = s.static_data.stage_data.get(stage_index) { let progress = match s.stage_section {
match s.stage_section { StageSection::Buildup => {
StageSection::Buildup => { timer / strike_data.buildup_duration.as_secs_f32()
stage_time / stage.base_buildup_duration.as_secs_f32() },
}, StageSection::Action => {
StageSection::Action => { timer / strike_data.swing_duration.as_secs_f32()
stage_time / stage.base_swing_duration.as_secs_f32() },
}, StageSection::Recover => {
StageSection::Recover => { timer / strike_data.recover_duration.as_secs_f32()
stage_time / stage.base_recover_duration.as_secs_f32() },
}, _ => 0.0,
_ => 0.0, };
}
} else { anim::arthropod::ComboAnimation::update_skeleton(
0.0 &target_base,
}; (
match s.stage { ability_id,
1 => anim::arthropod::AlphaAnimation::update_skeleton( s.stage_section,
&target_base, current_strike,
( time,
rel_vel.magnitude(), state.state_time,
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
), ),
_ => anim::arthropod::AlphaAnimation::update_skeleton( progress,
&target_base, &mut state_animation_rate,
( skeleton_attr,
rel_vel.magnitude(), )
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
}
}, },
CharacterState::LeapMelee(s) => { CharacterState::LeapMelee(s) => {
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();
@ -5733,6 +5501,8 @@ impl FigureMgr {
Some(s.static_data.ability_info), Some(s.static_data.ability_info),
current_strike, current_strike,
move_dir, move_dir,
rel_vel,
state.acc_vel,
), ),
progress, progress,
&mut state_animation_rate, &mut state_animation_rate,
@ -5899,75 +5669,6 @@ impl FigureMgr {
skeleton_attr, skeleton_attr,
) )
}, },
CharacterState::ComboMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f32();
let stage_progress =
if let Some(stage) = s.static_data.stage_data.get(stage_index) {
match s.stage_section {
StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32()
},
StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32()
},
StageSection::Recover => {
stage_time / stage.base_recover_duration.as_secs_f32()
},
_ => 0.0,
}
} else {
0.0
};
match s.stage {
1 => anim::biped_large::AlphaAnimation::update_skeleton(
&target_base,
(
active_tool_kind,
(second_tool_kind, second_tool_spec),
rel_vel,
time,
Some(s.stage_section),
state.acc_vel,
state.state_time,
ability_id,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
2 => anim::biped_large::BetaAnimation::update_skeleton(
&target_base,
(
active_tool_kind,
(second_tool_kind, second_tool_spec),
rel_vel,
time,
Some(s.stage_section),
state.acc_vel,
ability_id,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
_ => anim::biped_large::BetaAnimation::update_skeleton(
&target_base,
(
active_tool_kind,
(second_tool_kind, second_tool_spec),
rel_vel,
time,
Some(s.stage_section),
state.acc_vel,
ability_id,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
}
},
CharacterState::RapidMelee(s) => { CharacterState::RapidMelee(s) => {
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();
let stage_progress = match s.stage_section { let stage_progress = match s.stage_section {
@ -6288,35 +5989,6 @@ impl FigureMgr {
), ),
}; };
let target_bones = match &character { let target_bones = match &character {
CharacterState::ComboMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f32();
let stage_progress =
if let Some(stage) = s.static_data.stage_data.get(stage_index) {
match s.stage_section {
StageSection::Buildup => {
stage_time / stage.base_buildup_duration.as_secs_f32()
},
StageSection::Action => {
stage_time / stage.base_swing_duration.as_secs_f32()
},
StageSection::Recover => {
stage_time / stage.base_recover_duration.as_secs_f32()
},
_ => 0.0,
}
} else {
0.0
};
anim::golem::AlphaAnimation::update_skeleton(
&target_base,
(Some(s.stage_section), time, state.state_time, ability_id),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
)
},
CharacterState::BasicRanged(s) => { CharacterState::BasicRanged(s) => {
let stage_time = s.timer.as_secs_f32(); let stage_time = s.timer.as_secs_f32();