mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'character_ability_refactor' into 'master'
rel: #938 - Replaces fields in CharacterAbility enum that are integers with a float See merge request veloren/veloren!1752
This commit is contained in:
commit
2ebe0915f4
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 8.0,
|
||||
range: 3.5,
|
||||
angle: 50.0,
|
||||
base_buildup_duration: 350,
|
||||
base_swing_duration: 75,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.35,
|
||||
base_swing_duration: 0.075,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 0.5,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 12.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 500,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.5,
|
||||
forward_movement: 0.25,
|
||||
),
|
||||
],
|
||||
|
@ -1,9 +1,9 @@
|
||||
LeapMelee(
|
||||
energy_cost: 450,
|
||||
buildup_duration: 200,
|
||||
movement_duration: 200,
|
||||
swing_duration: 200,
|
||||
recover_duration: 200,
|
||||
buildup_duration: 0.2,
|
||||
movement_duration: 0.2,
|
||||
swing_duration: 0.2,
|
||||
recover_duration: 0.2,
|
||||
base_damage: 240,
|
||||
base_poise_damage: 0,
|
||||
knockback: 12.0,
|
||||
|
@ -1,7 +1,7 @@
|
||||
SpinMelee(
|
||||
buildup_duration: 200,
|
||||
swing_duration: 400,
|
||||
recover_duration: 200,
|
||||
buildup_duration: 0.2,
|
||||
swing_duration: 0.4,
|
||||
recover_duration: 0.2,
|
||||
base_damage: 60,
|
||||
base_poise_damage: 0,
|
||||
knockback: 0.0,
|
||||
|
@ -1,7 +1,7 @@
|
||||
BasicRanged(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 500,
|
||||
recover_duration: 300,
|
||||
buildup_duration: 0.5,
|
||||
recover_duration: 0.3,
|
||||
projectile: Arrow(
|
||||
damage: 70.0,
|
||||
knockback: 5.0,
|
||||
|
@ -6,9 +6,9 @@ ChargedRanged(
|
||||
initial_knockback: 10.0,
|
||||
scaled_knockback: 10.0,
|
||||
speed: 1.0,
|
||||
buildup_duration: 100,
|
||||
charge_duration: 1500,
|
||||
recover_duration: 500,
|
||||
buildup_duration: 0.1,
|
||||
charge_duration: 1.5,
|
||||
recover_duration: 0.5,
|
||||
projectile_body: Object(MultiArrow),
|
||||
projectile_light: None,
|
||||
projectile_gravity: Some(Gravity(0.2)),
|
||||
|
@ -1,9 +1,9 @@
|
||||
RepeaterRanged(
|
||||
energy_cost: 450,
|
||||
movement_duration: 300,
|
||||
buildup_duration: 200,
|
||||
shoot_duration: 200,
|
||||
recover_duration: 800,
|
||||
movement_duration: 0.3,
|
||||
buildup_duration: 0.2,
|
||||
shoot_duration: 0.2,
|
||||
recover_duration: 0.8,
|
||||
leap: Some(5.0),
|
||||
projectile: Arrow(
|
||||
damage: 40.0,
|
||||
|
@ -1,8 +1,8 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 100,
|
||||
swing_duration: 100,
|
||||
recover_duration: 300,
|
||||
buildup_duration: 0.1,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.3,
|
||||
base_damage: 50,
|
||||
base_poise_damage: 0,
|
||||
knockback: 0.0,
|
||||
|
@ -1,4 +1,4 @@
|
||||
Boost(
|
||||
movement_duration: 50,
|
||||
movement_duration: 0.05,
|
||||
only_up: false,
|
||||
)
|
@ -1,7 +1,7 @@
|
||||
BasicRanged(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 1,
|
||||
recover_duration: 10,
|
||||
buildup_duration: 0.001,
|
||||
recover_duration: 0.01,
|
||||
projectile: Possess,
|
||||
projectile_body: Object(ArrowSnake),
|
||||
/*projectile_light: Some(LightEmitter {
|
||||
|
@ -1,4 +1,4 @@
|
||||
Boost(
|
||||
movement_duration: 50,
|
||||
movement_duration: 0.05,
|
||||
only_up: true,
|
||||
)
|
@ -1,8 +1,8 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 0,
|
||||
swing_duration: 100,
|
||||
recover_duration: 900,
|
||||
buildup_duration: 0.0,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.9,
|
||||
base_damage: 20,
|
||||
base_poise_damage: 0,
|
||||
knockback: 0.0,
|
||||
|
@ -1,8 +1,8 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 600,
|
||||
swing_duration: 100,
|
||||
recover_duration: 150,
|
||||
buildup_duration: 0.6,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.15,
|
||||
base_damage: 50,
|
||||
base_poise_damage: 0,
|
||||
knockback: 0.0,
|
||||
|
@ -10,8 +10,8 @@ ChargedMelee(
|
||||
range: 3.5,
|
||||
max_angle: 30.0,
|
||||
speed: 1.0,
|
||||
charge_duration: 1200,
|
||||
swing_duration: 200,
|
||||
charge_duration: 1.2,
|
||||
swing_duration: 0.2,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 300,
|
||||
recover_duration: 0.3,
|
||||
)
|
||||
|
@ -1,9 +1,9 @@
|
||||
LeapMelee(
|
||||
energy_cost: 700,
|
||||
buildup_duration: 100,
|
||||
movement_duration: 800,
|
||||
swing_duration: 150,
|
||||
recover_duration: 200,
|
||||
buildup_duration: 0.1,
|
||||
movement_duration: 0.8,
|
||||
swing_duration: 0.15,
|
||||
recover_duration: 0.2,
|
||||
base_damage: 240,
|
||||
base_poise_damage: 0,
|
||||
knockback: 25.0,
|
||||
|
@ -8,9 +8,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 4.5,
|
||||
angle: 50.0,
|
||||
base_buildup_duration: 600,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.6,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 0.0,
|
||||
)],
|
||||
initial_energy_gain: 50,
|
||||
|
@ -1,7 +1,7 @@
|
||||
BasicBeam(
|
||||
buildup_duration: 250,
|
||||
recover_duration: 250,
|
||||
beam_duration: 1000,
|
||||
buildup_duration: 0.25,
|
||||
recover_duration: 0.25,
|
||||
beam_duration: 1.0,
|
||||
base_hps: 60,
|
||||
base_dps: 60,
|
||||
tick_rate: 2.0,
|
||||
|
@ -1,7 +1,7 @@
|
||||
BasicRanged(
|
||||
energy_cost: 450,
|
||||
buildup_duration: 800,
|
||||
recover_duration: 50,
|
||||
buildup_duration: 0.8,
|
||||
recover_duration: 0.05,
|
||||
projectile: Heal(
|
||||
heal: 80.0,
|
||||
damage: 60.0,
|
||||
|
@ -1,8 +1,8 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 100,
|
||||
swing_duration: 100,
|
||||
recover_duration: 300,
|
||||
buildup_duration: 0.1,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.3,
|
||||
base_damage: 40,
|
||||
base_poise_damage: 0,
|
||||
knockback: 0.0,
|
||||
|
@ -1,7 +1,7 @@
|
||||
BasicRanged(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 500,
|
||||
recover_duration: 350,
|
||||
buildup_duration: 0.5,
|
||||
recover_duration: 0.35,
|
||||
projectile: Fireball(
|
||||
damage: 100.0,
|
||||
radius: 5.0,
|
||||
|
@ -1,15 +1,15 @@
|
||||
Shockwave(
|
||||
energy_cost: 600,
|
||||
buildup_duration: 700,
|
||||
swing_duration: 100,
|
||||
recover_duration: 300,
|
||||
buildup_duration: 0.7,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.3,
|
||||
damage: 200,
|
||||
poise_damage: 0,
|
||||
knockback: ( strength: 25.0, direction: Away),
|
||||
shockwave_angle: 360.0,
|
||||
shockwave_vertical_angle: 90.0,
|
||||
shockwave_speed: 20.0,
|
||||
shockwave_duration: 500,
|
||||
shockwave_duration: 0.5,
|
||||
requires_ground: false,
|
||||
move_efficiency: 0.1,
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
BasicBeam(
|
||||
buildup_duration: 250,
|
||||
recover_duration: 250,
|
||||
beam_duration: 500,
|
||||
buildup_duration: 0.25,
|
||||
recover_duration: 0.25,
|
||||
beam_duration: 0.5,
|
||||
base_hps: 0,
|
||||
base_dps: 150,
|
||||
tick_rate: 3.0,
|
||||
|
@ -10,10 +10,10 @@ DashMelee(
|
||||
angle: 45.0,
|
||||
energy_drain: 600,
|
||||
forward_speed: 4.0,
|
||||
buildup_duration: 250,
|
||||
charge_duration: 600,
|
||||
swing_duration: 100,
|
||||
recover_duration: 500,
|
||||
buildup_duration: 0.25,
|
||||
charge_duration: 0.6,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.5,
|
||||
infinite_charge: true,
|
||||
is_interruptible: true,
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
SpinMelee(
|
||||
buildup_duration: 600,
|
||||
swing_duration: 400,
|
||||
recover_duration: 500,
|
||||
buildup_duration: 0.6,
|
||||
swing_duration: 0.4,
|
||||
recover_duration: 0.5,
|
||||
base_damage: 160,
|
||||
base_poise_damage: 0,
|
||||
knockback: 10.0,
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 4.0,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 350,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.35,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 0.5,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 12.0,
|
||||
range: 3.5,
|
||||
angle: 180.0,
|
||||
base_buildup_duration: 400,
|
||||
base_swing_duration: 600,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.4,
|
||||
base_swing_duration: 0.6,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 0.0,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 14.0,
|
||||
range: 6.0,
|
||||
angle: 10.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 200,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.2,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.2,
|
||||
),
|
||||
],
|
||||
|
@ -1,8 +1,8 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 250,
|
||||
swing_duration: 250,
|
||||
recover_duration: 250,
|
||||
buildup_duration: 0.25,
|
||||
swing_duration: 0.25,
|
||||
recover_duration: 0.25,
|
||||
knockback: 25.0,
|
||||
base_damage: 200,
|
||||
base_poise_damage: 0,
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 3.5,
|
||||
angle: 60.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 3.0,
|
||||
),
|
||||
],
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.9,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 2.0,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.5,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.5,
|
||||
),
|
||||
],
|
||||
|
@ -10,10 +10,10 @@ DashMelee(
|
||||
angle: 45.0,
|
||||
energy_drain: 0,
|
||||
forward_speed: 4.0,
|
||||
buildup_duration: 500,
|
||||
charge_duration: 1000,
|
||||
swing_duration: 100,
|
||||
recover_duration: 800,
|
||||
buildup_duration: 0.5,
|
||||
charge_duration: 1.0,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.8,
|
||||
infinite_charge: true,
|
||||
is_interruptible: false,
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
BasicBeam(
|
||||
buildup_duration: 400,
|
||||
recover_duration: 250,
|
||||
beam_duration: 500,
|
||||
buildup_duration: 0.4,
|
||||
recover_duration: 0.25,
|
||||
beam_duration: 0.5,
|
||||
base_hps: 0,
|
||||
base_dps: 150,
|
||||
tick_rate: 3.0,
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 4.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.9,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 2.0,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.5,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.5,
|
||||
),
|
||||
],
|
||||
|
@ -10,10 +10,10 @@ DashMelee(
|
||||
angle: 45.0,
|
||||
energy_drain: 0,
|
||||
forward_speed: 2.0,
|
||||
buildup_duration: 500,
|
||||
charge_duration: 300,
|
||||
swing_duration: 100,
|
||||
recover_duration: 500,
|
||||
buildup_duration: 0.5,
|
||||
charge_duration: 0.3,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.5,
|
||||
infinite_charge: true,
|
||||
is_interruptible: false,
|
||||
)
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 2.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 600,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 100,
|
||||
base_buildup_duration: 0.6,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.1,
|
||||
forward_movement: 1.5,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 2.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 200,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 100,
|
||||
base_buildup_duration: 0.2,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.1,
|
||||
forward_movement: 0.8,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 2.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 200,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 100,
|
||||
base_buildup_duration: 0.2,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.1,
|
||||
forward_movement: 0.8,
|
||||
),
|
||||
(
|
||||
@ -51,9 +51,9 @@ ComboMelee(
|
||||
knockback: 8.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 200,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 100,
|
||||
base_buildup_duration: 0.2,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.1,
|
||||
forward_movement: 0.8,
|
||||
),
|
||||
],
|
||||
|
@ -1,7 +1,7 @@
|
||||
BasicRanged(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 800,
|
||||
recover_duration: 350,
|
||||
buildup_duration: 0.8,
|
||||
recover_duration: 0.35,
|
||||
projectile: Fireball(
|
||||
damage: 100.0,
|
||||
radius: 5.0,
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 3.5,
|
||||
angle: 60.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 3.0,
|
||||
),
|
||||
],
|
||||
|
@ -10,8 +10,8 @@ ChargedMelee(
|
||||
range: 6.0,
|
||||
max_angle: 90.0,
|
||||
speed: 1.0,
|
||||
charge_duration: 1200,
|
||||
swing_duration: 700,
|
||||
charge_duration: 1.2,
|
||||
swing_duration: 0.7,
|
||||
hit_timing: 0.9,
|
||||
recover_duration: 1200,
|
||||
recover_duration: 1.2,
|
||||
)
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 200,
|
||||
base_buildup_duration: 0.9,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.2,
|
||||
forward_movement: 2.0,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 200,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 200,
|
||||
base_buildup_duration: 0.2,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.2,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 200,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 200,
|
||||
base_buildup_duration: 0.2,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.2,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
],
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 3.5,
|
||||
angle: 60.0,
|
||||
base_buildup_duration: 650,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.65,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
],
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.9,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 300,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 200,
|
||||
base_buildup_duration: 0.3,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.2,
|
||||
forward_movement: 0.0,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 300,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 200,
|
||||
base_buildup_duration: 0.3,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.2,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
],
|
||||
|
@ -10,10 +10,10 @@ DashMelee(
|
||||
angle: 45.0,
|
||||
energy_drain: 0,
|
||||
forward_speed: 2.0,
|
||||
buildup_duration: 500,
|
||||
charge_duration: 1200,
|
||||
swing_duration: 100,
|
||||
recover_duration: 1100,
|
||||
buildup_duration: 0.5,
|
||||
charge_duration: 1.2,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 1.1,
|
||||
infinite_charge: true,
|
||||
is_interruptible: false,
|
||||
)
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.9,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 0.5,
|
||||
),
|
||||
],
|
||||
|
@ -1,8 +1,8 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 600,
|
||||
swing_duration: 500,
|
||||
recover_duration: 350,
|
||||
buildup_duration: 0.6,
|
||||
swing_duration: 0.5,
|
||||
recover_duration: 0.35,
|
||||
base_damage: 130,
|
||||
base_poise_damage: 0,
|
||||
knockback: 25.0,
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 8.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.9,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 8.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.1,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.5,
|
||||
),
|
||||
],
|
||||
|
@ -1,9 +1,9 @@
|
||||
LeapMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 500,
|
||||
movement_duration: 400,
|
||||
swing_duration: 75,
|
||||
recover_duration: 200,
|
||||
buildup_duration: 0.5,
|
||||
movement_duration: 0.4,
|
||||
swing_duration: 0.075,
|
||||
recover_duration: 0.2,
|
||||
base_damage: 240,
|
||||
base_poise_damage: 0,
|
||||
knockback: 12.0,
|
||||
|
@ -1,9 +1,9 @@
|
||||
LeapMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 200,
|
||||
movement_duration: 300,
|
||||
swing_duration: 75,
|
||||
recover_duration: 125,
|
||||
buildup_duration: 0.2,
|
||||
movement_duration: 0.3,
|
||||
swing_duration: 0.075,
|
||||
recover_duration: 0.125,
|
||||
base_damage: 120,
|
||||
base_poise_damage: 0,
|
||||
knockback: 7.0,
|
||||
|
@ -10,10 +10,10 @@ DashMelee(
|
||||
angle: 45.0,
|
||||
energy_drain: 0,
|
||||
forward_speed: 2.0,
|
||||
buildup_duration: 1200,
|
||||
charge_duration: 300,
|
||||
swing_duration: 100,
|
||||
recover_duration: 500,
|
||||
buildup_duration: 1.2,
|
||||
charge_duration: 0.3,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.5,
|
||||
infinite_charge: true,
|
||||
is_interruptible: false,
|
||||
)
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 3.5,
|
||||
angle: 60.0,
|
||||
base_buildup_duration: 800,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.8,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 0.3,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 3.5,
|
||||
angle: 60.0,
|
||||
base_buildup_duration: 600,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.6,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 0.5,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 3.5,
|
||||
angle: 60.0,
|
||||
base_buildup_duration: 600,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.6,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 0.5,
|
||||
),
|
||||
],
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 3.5,
|
||||
angle: 60.0,
|
||||
base_buildup_duration: 300,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.3,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
],
|
||||
|
@ -1,8 +1,8 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 400,
|
||||
swing_duration: 100,
|
||||
recover_duration: 250,
|
||||
buildup_duration: 0.4,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.25,
|
||||
knockback: 25.0,
|
||||
base_damage: 200,
|
||||
base_poise_damage: 0,
|
||||
|
@ -1,15 +1,15 @@
|
||||
Shockwave(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 500,
|
||||
swing_duration: 200,
|
||||
recover_duration: 800,
|
||||
buildup_duration: 0.5,
|
||||
swing_duration: 0.2,
|
||||
recover_duration: 0.8,
|
||||
damage: 500,
|
||||
poise_damage: 0,
|
||||
knockback: (strength: 40.0, direction: TowardsUp),
|
||||
shockwave_angle: 90.0,
|
||||
shockwave_vertical_angle: 90.0,
|
||||
shockwave_speed: 50.0,
|
||||
shockwave_duration: 1000,
|
||||
shockwave_duration: 1.0,
|
||||
requires_ground: true,
|
||||
move_efficiency: 0.05,
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
SpinMelee(
|
||||
buildup_duration: 100,
|
||||
swing_duration: 300,
|
||||
recover_duration: 100,
|
||||
buildup_duration: 0.1,
|
||||
swing_duration: 0.3,
|
||||
recover_duration: 0.1,
|
||||
base_damage: 500,
|
||||
base_poise_damage: 0,
|
||||
knockback: 0.0,
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 7.5,
|
||||
angle: 60.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 3.0,
|
||||
),
|
||||
],
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 7.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.9,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 5.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 150,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.15,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 5.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 350,
|
||||
base_swing_duration: 125,
|
||||
base_recover_duration: 900,
|
||||
base_buildup_duration: 0.35,
|
||||
base_swing_duration: 0.125,
|
||||
base_recover_duration: 0.9,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
],
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 5.0,
|
||||
range: 5.5,
|
||||
angle: 5.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 400,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.4,
|
||||
forward_movement: 3.0,
|
||||
),
|
||||
],
|
||||
|
@ -9,9 +9,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 4.5,
|
||||
angle: 5.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 300,
|
||||
base_buildup_duration: 0.9,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.3,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
@ -23,9 +23,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 4.0,
|
||||
angle: 10.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 150,
|
||||
base_recover_duration: 150,
|
||||
base_buildup_duration: 0.5,
|
||||
base_swing_duration: 0.15,
|
||||
base_recover_duration: 0.15,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
@ -37,9 +37,9 @@ ComboMelee(
|
||||
knockback: 10.0,
|
||||
range: 4.0,
|
||||
angle: 10.0,
|
||||
base_buildup_duration: 350,
|
||||
base_swing_duration: 125,
|
||||
base_recover_duration: 900,
|
||||
base_buildup_duration: 0.35,
|
||||
base_swing_duration: 0.125,
|
||||
base_recover_duration: 0.9,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
],
|
||||
|
@ -201,7 +201,7 @@ impl Attack {
|
||||
..
|
||||
}) = attacker_info
|
||||
{
|
||||
let sufficient_energy = e.current() >= *r;
|
||||
let sufficient_energy = e.current() as f32 >= *r;
|
||||
if sufficient_energy {
|
||||
emit(ServerEvent::EnergyChange {
|
||||
entity,
|
||||
@ -347,7 +347,7 @@ pub enum CombatEffect {
|
||||
Heal(f32),
|
||||
Buff(CombatBuff),
|
||||
Knockback(Knockback),
|
||||
EnergyReward(u32),
|
||||
EnergyReward(f32),
|
||||
Lifesteal(f32),
|
||||
Poise(f32),
|
||||
}
|
||||
@ -355,7 +355,7 @@ pub enum CombatEffect {
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum CombatRequirement {
|
||||
AnyDamage,
|
||||
SufficientEnergy(u32),
|
||||
SufficientEnergy(f32),
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, Serialize, Deserialize)]
|
||||
|
@ -56,20 +56,20 @@ impl From<&CharacterState> for CharacterAbilityType {
|
||||
#[derive(Clone, PartialEq, Debug, Serialize, Deserialize)]
|
||||
pub enum CharacterAbility {
|
||||
BasicMelee {
|
||||
energy_cost: u32,
|
||||
buildup_duration: u64,
|
||||
swing_duration: u64,
|
||||
recover_duration: u64,
|
||||
base_damage: u32,
|
||||
base_poise_damage: u32,
|
||||
energy_cost: f32,
|
||||
buildup_duration: f32,
|
||||
swing_duration: f32,
|
||||
recover_duration: f32,
|
||||
base_damage: f32,
|
||||
base_poise_damage: f32,
|
||||
knockback: f32,
|
||||
range: f32,
|
||||
max_angle: f32,
|
||||
},
|
||||
BasicRanged {
|
||||
energy_cost: u32,
|
||||
buildup_duration: u64,
|
||||
recover_duration: u64,
|
||||
energy_cost: f32,
|
||||
buildup_duration: f32,
|
||||
recover_duration: f32,
|
||||
projectile: ProjectileConstructor,
|
||||
projectile_body: Body,
|
||||
projectile_light: Option<LightEmitter>,
|
||||
@ -78,11 +78,11 @@ pub enum CharacterAbility {
|
||||
can_continue: bool,
|
||||
},
|
||||
RepeaterRanged {
|
||||
energy_cost: u32,
|
||||
movement_duration: u64,
|
||||
buildup_duration: u64,
|
||||
shoot_duration: u64,
|
||||
recover_duration: u64,
|
||||
energy_cost: f32,
|
||||
movement_duration: f32,
|
||||
buildup_duration: f32,
|
||||
shoot_duration: f32,
|
||||
recover_duration: f32,
|
||||
leap: Option<f32>,
|
||||
projectile: ProjectileConstructor,
|
||||
projectile_body: Body,
|
||||
@ -92,55 +92,55 @@ pub enum CharacterAbility {
|
||||
reps_remaining: u32,
|
||||
},
|
||||
Boost {
|
||||
movement_duration: u64,
|
||||
movement_duration: f32,
|
||||
only_up: bool,
|
||||
},
|
||||
DashMelee {
|
||||
energy_cost: u32,
|
||||
base_damage: u32,
|
||||
scaled_damage: u32,
|
||||
base_poise_damage: u32,
|
||||
scaled_poise_damage: u32,
|
||||
energy_cost: f32,
|
||||
base_damage: f32,
|
||||
scaled_damage: f32,
|
||||
base_poise_damage: f32,
|
||||
scaled_poise_damage: f32,
|
||||
base_knockback: f32,
|
||||
scaled_knockback: f32,
|
||||
range: f32,
|
||||
angle: f32,
|
||||
energy_drain: u32,
|
||||
energy_drain: f32,
|
||||
forward_speed: f32,
|
||||
buildup_duration: u64,
|
||||
charge_duration: u64,
|
||||
swing_duration: u64,
|
||||
recover_duration: u64,
|
||||
buildup_duration: f32,
|
||||
charge_duration: f32,
|
||||
swing_duration: f32,
|
||||
recover_duration: f32,
|
||||
infinite_charge: bool,
|
||||
is_interruptible: bool,
|
||||
},
|
||||
BasicBlock,
|
||||
Roll {
|
||||
energy_cost: u32,
|
||||
buildup_duration: u64,
|
||||
movement_duration: u64,
|
||||
recover_duration: u64,
|
||||
energy_cost: f32,
|
||||
buildup_duration: f32,
|
||||
movement_duration: f32,
|
||||
recover_duration: f32,
|
||||
roll_strength: f32,
|
||||
immune_melee: bool,
|
||||
},
|
||||
ComboMelee {
|
||||
stage_data: Vec<combo_melee::Stage<u64>>,
|
||||
initial_energy_gain: u32,
|
||||
max_energy_gain: u32,
|
||||
energy_increase: u32,
|
||||
stage_data: Vec<combo_melee::Stage<f32>>,
|
||||
initial_energy_gain: f32,
|
||||
max_energy_gain: f32,
|
||||
energy_increase: f32,
|
||||
speed_increase: f32,
|
||||
max_speed_increase: f32,
|
||||
scales_from_combo: u32,
|
||||
is_interruptible: bool,
|
||||
},
|
||||
LeapMelee {
|
||||
energy_cost: u32,
|
||||
buildup_duration: u64,
|
||||
movement_duration: u64,
|
||||
swing_duration: u64,
|
||||
recover_duration: u64,
|
||||
base_damage: u32,
|
||||
base_poise_damage: u32,
|
||||
energy_cost: f32,
|
||||
buildup_duration: f32,
|
||||
movement_duration: f32,
|
||||
swing_duration: f32,
|
||||
recover_duration: f32,
|
||||
base_damage: f32,
|
||||
base_poise_damage: f32,
|
||||
range: f32,
|
||||
max_angle: f32,
|
||||
knockback: f32,
|
||||
@ -148,14 +148,14 @@ pub enum CharacterAbility {
|
||||
vertical_leap_strength: f32,
|
||||
},
|
||||
SpinMelee {
|
||||
buildup_duration: u64,
|
||||
swing_duration: u64,
|
||||
recover_duration: u64,
|
||||
base_damage: u32,
|
||||
base_poise_damage: u32,
|
||||
buildup_duration: f32,
|
||||
swing_duration: f32,
|
||||
recover_duration: f32,
|
||||
base_damage: f32,
|
||||
base_poise_damage: f32,
|
||||
knockback: f32,
|
||||
range: f32,
|
||||
energy_cost: u32,
|
||||
energy_cost: f32,
|
||||
is_infinite: bool,
|
||||
movement_behavior: spin_melee::MovementBehavior,
|
||||
is_interruptible: bool,
|
||||
@ -163,33 +163,33 @@ pub enum CharacterAbility {
|
||||
num_spins: u32,
|
||||
},
|
||||
ChargedMelee {
|
||||
energy_cost: u32,
|
||||
energy_drain: u32,
|
||||
initial_damage: u32,
|
||||
scaled_damage: u32,
|
||||
initial_poise_damage: u32,
|
||||
scaled_poise_damage: u32,
|
||||
energy_cost: f32,
|
||||
energy_drain: f32,
|
||||
initial_damage: f32,
|
||||
scaled_damage: f32,
|
||||
initial_poise_damage: f32,
|
||||
scaled_poise_damage: f32,
|
||||
initial_knockback: f32,
|
||||
scaled_knockback: f32,
|
||||
range: f32,
|
||||
max_angle: f32,
|
||||
speed: f32,
|
||||
charge_duration: u64,
|
||||
swing_duration: u64,
|
||||
charge_duration: f32,
|
||||
swing_duration: f32,
|
||||
hit_timing: f32,
|
||||
recover_duration: u64,
|
||||
recover_duration: f32,
|
||||
},
|
||||
ChargedRanged {
|
||||
energy_cost: u32,
|
||||
energy_drain: u32,
|
||||
initial_damage: u32,
|
||||
scaled_damage: u32,
|
||||
energy_cost: f32,
|
||||
energy_drain: f32,
|
||||
initial_damage: f32,
|
||||
scaled_damage: f32,
|
||||
initial_knockback: f32,
|
||||
scaled_knockback: f32,
|
||||
speed: f32,
|
||||
buildup_duration: u64,
|
||||
charge_duration: u64,
|
||||
recover_duration: u64,
|
||||
buildup_duration: f32,
|
||||
charge_duration: f32,
|
||||
recover_duration: f32,
|
||||
projectile_body: Body,
|
||||
projectile_light: Option<LightEmitter>,
|
||||
projectile_gravity: Option<Gravity>,
|
||||
@ -198,45 +198,45 @@ pub enum CharacterAbility {
|
||||
move_speed: f32,
|
||||
},
|
||||
Shockwave {
|
||||
energy_cost: u32,
|
||||
buildup_duration: u64,
|
||||
swing_duration: u64,
|
||||
recover_duration: u64,
|
||||
damage: u32,
|
||||
poise_damage: u32,
|
||||
energy_cost: f32,
|
||||
buildup_duration: f32,
|
||||
swing_duration: f32,
|
||||
recover_duration: f32,
|
||||
damage: f32,
|
||||
poise_damage: f32,
|
||||
knockback: Knockback,
|
||||
shockwave_angle: f32,
|
||||
shockwave_vertical_angle: f32,
|
||||
shockwave_speed: f32,
|
||||
shockwave_duration: u64,
|
||||
shockwave_duration: f32,
|
||||
requires_ground: bool,
|
||||
move_efficiency: f32,
|
||||
},
|
||||
BasicBeam {
|
||||
buildup_duration: u64,
|
||||
recover_duration: u64,
|
||||
beam_duration: u64,
|
||||
base_hps: u32,
|
||||
base_dps: u32,
|
||||
buildup_duration: f32,
|
||||
recover_duration: f32,
|
||||
beam_duration: f32,
|
||||
base_hps: f32,
|
||||
base_dps: f32,
|
||||
tick_rate: f32,
|
||||
range: f32,
|
||||
max_angle: f32,
|
||||
lifesteal_eff: f32,
|
||||
energy_regen: u32,
|
||||
energy_cost: u32,
|
||||
energy_drain: u32,
|
||||
energy_regen: f32,
|
||||
energy_cost: f32,
|
||||
energy_drain: f32,
|
||||
},
|
||||
}
|
||||
|
||||
impl Default for CharacterAbility {
|
||||
fn default() -> Self {
|
||||
CharacterAbility::BasicMelee {
|
||||
energy_cost: 0,
|
||||
buildup_duration: 250,
|
||||
swing_duration: 250,
|
||||
recover_duration: 500,
|
||||
base_damage: 10,
|
||||
base_poise_damage: 0,
|
||||
energy_cost: 0.0,
|
||||
buildup_duration: 0.25,
|
||||
swing_duration: 0.25,
|
||||
recover_duration: 0.5,
|
||||
base_damage: 10.0,
|
||||
base_poise_damage: 0.0,
|
||||
knockback: 0.0,
|
||||
range: 3.5,
|
||||
max_angle: 15.0,
|
||||
@ -313,10 +313,10 @@ impl CharacterAbility {
|
||||
|
||||
pub fn default_roll() -> CharacterAbility {
|
||||
CharacterAbility::Roll {
|
||||
energy_cost: 150,
|
||||
buildup_duration: 50,
|
||||
movement_duration: 280,
|
||||
recover_duration: 125,
|
||||
energy_cost: 0.15,
|
||||
buildup_duration: 0.05,
|
||||
movement_duration: 0.28,
|
||||
recover_duration: 0.125,
|
||||
roll_strength: 1.8,
|
||||
immune_melee: false,
|
||||
}
|
||||
@ -333,11 +333,11 @@ impl CharacterAbility {
|
||||
ref mut base_poise_damage,
|
||||
..
|
||||
} => {
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*swing_duration = (*swing_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*base_damage = (*base_damage as f32 * power) as u32;
|
||||
*base_poise_damage = (*base_poise_damage as f32 * poise_strength) as u32;
|
||||
*buildup_duration /= speed;
|
||||
*swing_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
*base_damage *= power;
|
||||
*base_poise_damage *= poise_strength;
|
||||
},
|
||||
BasicRanged {
|
||||
ref mut buildup_duration,
|
||||
@ -345,8 +345,8 @@ impl CharacterAbility {
|
||||
ref mut projectile,
|
||||
..
|
||||
} => {
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*buildup_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
*projectile = projectile.modified_projectile(power, 1_f32, 1_f32, power);
|
||||
},
|
||||
RepeaterRanged {
|
||||
@ -357,17 +357,17 @@ impl CharacterAbility {
|
||||
ref mut projectile,
|
||||
..
|
||||
} => {
|
||||
*movement_duration = (*movement_duration as f32 / speed) as u64;
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*shoot_duration = (*shoot_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*movement_duration /= speed;
|
||||
*buildup_duration /= speed;
|
||||
*shoot_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
*projectile = projectile.modified_projectile(power, 1_f32, 1_f32, power);
|
||||
},
|
||||
Boost {
|
||||
ref mut movement_duration,
|
||||
..
|
||||
} => {
|
||||
*movement_duration = (*movement_duration as f32 / speed) as u64;
|
||||
*movement_duration /= speed;
|
||||
},
|
||||
DashMelee {
|
||||
ref mut base_damage,
|
||||
@ -379,13 +379,13 @@ impl CharacterAbility {
|
||||
ref mut recover_duration,
|
||||
..
|
||||
} => {
|
||||
*base_damage = (*base_damage as f32 * power) as u32;
|
||||
*scaled_damage = (*scaled_damage as f32 * power) as u32;
|
||||
*base_poise_damage = (*base_damage as f32 * poise_strength) as u32;
|
||||
*scaled_poise_damage = (*scaled_poise_damage as f32 * poise_strength) as u32;
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*swing_duration = (*swing_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*base_damage *= power;
|
||||
*scaled_damage *= power;
|
||||
*base_poise_damage *= poise_strength;
|
||||
*scaled_poise_damage *= poise_strength;
|
||||
*buildup_duration /= speed;
|
||||
*swing_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
},
|
||||
BasicBlock => {},
|
||||
Roll {
|
||||
@ -394,9 +394,9 @@ impl CharacterAbility {
|
||||
ref mut recover_duration,
|
||||
..
|
||||
} => {
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*movement_duration = (*movement_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*buildup_duration /= speed;
|
||||
*movement_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
},
|
||||
ComboMelee {
|
||||
ref mut stage_data, ..
|
||||
@ -414,11 +414,11 @@ impl CharacterAbility {
|
||||
ref mut base_poise_damage,
|
||||
..
|
||||
} => {
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*swing_duration = (*swing_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*base_damage = (*base_damage as f32 * power) as u32;
|
||||
*base_poise_damage = (*base_poise_damage as f32 * poise_strength) as u32;
|
||||
*buildup_duration /= speed;
|
||||
*swing_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
*base_damage *= power;
|
||||
*base_poise_damage *= poise_strength;
|
||||
},
|
||||
SpinMelee {
|
||||
ref mut buildup_duration,
|
||||
@ -428,11 +428,11 @@ impl CharacterAbility {
|
||||
ref mut base_poise_damage,
|
||||
..
|
||||
} => {
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*swing_duration = (*swing_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*base_damage = (*base_damage as f32 * power) as u32;
|
||||
*base_poise_damage = (*base_poise_damage as f32 * poise_strength) as u32;
|
||||
*buildup_duration /= speed;
|
||||
*swing_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
*base_damage *= power;
|
||||
*base_poise_damage *= poise_strength;
|
||||
},
|
||||
ChargedMelee {
|
||||
ref mut initial_damage,
|
||||
@ -445,14 +445,14 @@ impl CharacterAbility {
|
||||
ref mut recover_duration,
|
||||
..
|
||||
} => {
|
||||
*initial_damage = (*initial_damage as f32 * power) as u32;
|
||||
*scaled_damage = (*scaled_damage as f32 * power) as u32;
|
||||
*initial_poise_damage = (*initial_poise_damage as f32 * poise_strength) as u32;
|
||||
*scaled_poise_damage = (*scaled_poise_damage as f32 * poise_strength) as u32;
|
||||
*initial_damage *= power;
|
||||
*scaled_damage *= power;
|
||||
*initial_poise_damage *= poise_strength;
|
||||
*scaled_poise_damage *= poise_strength;
|
||||
*ability_speed *= speed;
|
||||
*charge_duration = (*charge_duration as f32 / speed) as u64;
|
||||
*swing_duration = (*swing_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*charge_duration /= speed;
|
||||
*swing_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
},
|
||||
ChargedRanged {
|
||||
ref mut initial_damage,
|
||||
@ -463,12 +463,12 @@ impl CharacterAbility {
|
||||
ref mut recover_duration,
|
||||
..
|
||||
} => {
|
||||
*initial_damage = (*initial_damage as f32 * power) as u32;
|
||||
*scaled_damage = (*scaled_damage as f32 * power) as u32;
|
||||
*initial_damage *= power;
|
||||
*scaled_damage *= power;
|
||||
*ability_speed *= speed;
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*charge_duration = (*charge_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*buildup_duration /= speed;
|
||||
*charge_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
},
|
||||
Shockwave {
|
||||
ref mut buildup_duration,
|
||||
@ -478,11 +478,11 @@ impl CharacterAbility {
|
||||
ref mut poise_damage,
|
||||
..
|
||||
} => {
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*swing_duration = (*swing_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*damage = (*damage as f32 * power) as u32;
|
||||
*poise_damage = (*poise_damage as f32 * poise_strength) as u32;
|
||||
*buildup_duration /= speed;
|
||||
*swing_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
*damage *= power;
|
||||
*poise_damage *= poise_strength;
|
||||
},
|
||||
BasicBeam {
|
||||
ref mut buildup_duration,
|
||||
@ -492,11 +492,11 @@ impl CharacterAbility {
|
||||
ref mut tick_rate,
|
||||
..
|
||||
} => {
|
||||
*buildup_duration = (*buildup_duration as f32 / speed) as u64;
|
||||
*recover_duration = (*recover_duration as f32 / speed) as u64;
|
||||
*buildup_duration /= speed;
|
||||
*recover_duration /= speed;
|
||||
// hps and dps adjusted by speed as they are normalized by tick rate already
|
||||
*base_hps = (*base_hps as f32 * power * speed) as u32;
|
||||
*base_dps = (*base_dps as f32 * power * speed) as u32;
|
||||
*base_hps *= power * speed;
|
||||
*base_dps *= power * speed;
|
||||
*tick_rate *= speed;
|
||||
},
|
||||
}
|
||||
@ -516,7 +516,7 @@ impl CharacterAbility {
|
||||
| ChargedMelee { energy_cost, .. }
|
||||
| ChargedRanged { energy_cost, .. }
|
||||
| Shockwave { energy_cost, .. }
|
||||
| BasicBeam { energy_cost, .. } => *energy_cost,
|
||||
| BasicBeam { energy_cost, .. } => *energy_cost as u32,
|
||||
BasicBlock | Boost { .. } | ComboMelee { .. } => 0,
|
||||
}
|
||||
}
|
||||
@ -561,10 +561,10 @@ impl CharacterAbility {
|
||||
} else {
|
||||
0
|
||||
};
|
||||
*max_energy_gain = (*max_energy_gain as f32
|
||||
*max_energy_gain = *max_energy_gain
|
||||
* ((energy_level + 1) * stage_data.len() as u16 - 1) as f32
|
||||
/ ((Sword(TsRegen).max_level().unwrap() + 1) * stage_data.len() as u16
|
||||
- 1) as f32) as u32;
|
||||
/ (Sword(TsRegen).max_level().unwrap() + 1) as f32
|
||||
* (stage_data.len() - 1) as f32;
|
||||
*scales_from_combo = skillset
|
||||
.skill_level(Sword(TsDamage))
|
||||
.unwrap_or(None)
|
||||
@ -583,20 +583,16 @@ impl CharacterAbility {
|
||||
} => {
|
||||
*is_interruptible = skillset.has_skill(Sword(InterruptingAttacks));
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sword(DCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.75_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.75_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sword(DDrain)) {
|
||||
*energy_drain =
|
||||
(*energy_drain as f32 * 0.75_f32.powi(level.into())) as u32;
|
||||
*energy_drain *= 0.75_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sword(DDamage)) {
|
||||
*base_damage =
|
||||
(*base_damage as f32 * 1.2_f32.powi(level.into())) as u32;
|
||||
*base_damage *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sword(DScaling)) {
|
||||
*scaled_damage =
|
||||
(*scaled_damage as f32 * 1.2_f32.powi(level.into())) as u32;
|
||||
*scaled_damage *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if skillset.has_skill(Sword(DSpeed)) {
|
||||
*forward_speed *= 1.3;
|
||||
@ -613,16 +609,13 @@ impl CharacterAbility {
|
||||
} => {
|
||||
*is_interruptible = skillset.has_skill(Sword(InterruptingAttacks));
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sword(SDamage)) {
|
||||
*base_damage =
|
||||
(*base_damage as f32 * 1.4_f32.powi(level.into())) as u32;
|
||||
*base_damage *= 1.4_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sword(SSpeed)) {
|
||||
*swing_duration =
|
||||
(*swing_duration as f32 * 0.8_f32.powi(level.into())) as u64;
|
||||
*swing_duration *= 0.8_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sword(SCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.75_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.75_f32.powi(level.into());
|
||||
}
|
||||
*num_spins = skillset
|
||||
.skill_level(Sword(SSpins))
|
||||
@ -662,10 +655,10 @@ impl CharacterAbility {
|
||||
} else {
|
||||
0
|
||||
};
|
||||
*max_energy_gain = (*max_energy_gain as f32
|
||||
*max_energy_gain = *max_energy_gain
|
||||
* ((energy_level + 1) * stage_data.len() as u16 - 1) as f32
|
||||
/ ((Axe(DsRegen).max_level().unwrap() + 1) * stage_data.len() as u16
|
||||
- 1) as f32) as u32;
|
||||
/ (Axe(DsRegen).max_level().unwrap() + 1) as f32
|
||||
* (stage_data.len() - 1) as f32;
|
||||
*scales_from_combo = skillset
|
||||
.skill_level(Axe(DsDamage))
|
||||
.unwrap_or(None)
|
||||
@ -687,16 +680,13 @@ impl CharacterAbility {
|
||||
spin_melee::MovementBehavior::ForwardGround
|
||||
};
|
||||
if let Ok(Some(level)) = skillset.skill_level(Axe(SDamage)) {
|
||||
*base_damage =
|
||||
(*base_damage as f32 * 1.3_f32.powi(level.into())) as u32;
|
||||
*base_damage *= 1.3_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Axe(SSpeed)) {
|
||||
*swing_duration =
|
||||
(*swing_duration as f32 * 0.8_f32.powi(level.into())) as u64;
|
||||
*swing_duration *= 0.8_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Axe(SCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.75_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.75_f32.powi(level.into());
|
||||
}
|
||||
},
|
||||
LeapMelee {
|
||||
@ -708,15 +698,13 @@ impl CharacterAbility {
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Axe(LDamage)) {
|
||||
*base_damage =
|
||||
(*base_damage as f32 * 1.35_f32.powi(level.into())) as u32;
|
||||
*base_damage *= 1.35_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Axe(LKnockback)) {
|
||||
*knockback *= 1.4_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Axe(LCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.75_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.75_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Axe(LDistance)) {
|
||||
*forward_leap_strength *= 1.2_f32.powi(level.into());
|
||||
@ -741,7 +729,7 @@ impl CharacterAbility {
|
||||
*stage_data = (*stage_data)
|
||||
.iter()
|
||||
.map(|s| s.modify_strike(1.5_f32.powi(level.into())))
|
||||
.collect::<Vec<combo_melee::Stage<u64>>>();
|
||||
.collect::<Vec<combo_melee::Stage<f32>>>();
|
||||
}
|
||||
let speed_segments = Hammer(SsSpeed).max_level().unwrap_or(1) as f32;
|
||||
let speed_level = skillset
|
||||
@ -758,10 +746,10 @@ impl CharacterAbility {
|
||||
} else {
|
||||
0
|
||||
};
|
||||
*max_energy_gain = (*max_energy_gain as f32
|
||||
*max_energy_gain = *max_energy_gain
|
||||
* ((energy_level + 1) * stage_data.len() as u16) as f32
|
||||
/ ((Hammer(SsRegen).max_level().unwrap() + 1) * stage_data.len() as u16)
|
||||
as f32) as u32;
|
||||
as f32;
|
||||
*scales_from_combo = skillset
|
||||
.skill_level(Hammer(SsDamage))
|
||||
.unwrap_or(None)
|
||||
@ -776,15 +764,13 @@ impl CharacterAbility {
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Hammer(CDamage)) {
|
||||
*scaled_damage =
|
||||
(*scaled_damage as f32 * 1.25_f32.powi(level.into())) as u32;
|
||||
*scaled_damage *= 1.25_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Hammer(CKnockback)) {
|
||||
*scaled_knockback *= 1.5_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Hammer(CDrain)) {
|
||||
*energy_drain =
|
||||
(*energy_drain as f32 * 0.75_f32.powi(level.into())) as u32;
|
||||
*energy_drain *= 0.75_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Hammer(CSpeed)) {
|
||||
*speed *= 1.25_f32.powi(level.into());
|
||||
@ -800,15 +786,13 @@ impl CharacterAbility {
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Hammer(LDamage)) {
|
||||
*base_damage =
|
||||
(*base_damage as f32 * 1.4_f32.powi(level.into())) as u32;
|
||||
*base_damage *= 1.4_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Hammer(LKnockback)) {
|
||||
*knockback *= 1.5_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Hammer(LCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.75_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.75_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Hammer(LDistance)) {
|
||||
*forward_leap_strength *= 1.25_f32.powi(level.into());
|
||||
@ -858,8 +842,7 @@ impl CharacterAbility {
|
||||
*initial_projectile_speed *= 1.3_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CDamage)) {
|
||||
*scaled_damage =
|
||||
(*scaled_damage as f32 * 1.2_f32.powi(level.into())) as u32;
|
||||
*scaled_damage *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CKnockback)) {
|
||||
*scaled_knockback *= 1.25_f32.powi(level.into());
|
||||
@ -868,8 +851,7 @@ impl CharacterAbility {
|
||||
*scaled_projectile_speed *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CDrain)) {
|
||||
*energy_drain =
|
||||
(*energy_drain as f32 * 0.85_f32.powi(level.into())) as u32;
|
||||
*energy_drain *= 0.85_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CSpeed)) {
|
||||
*speed *= 1.10_f32.powi(level.into());
|
||||
@ -895,14 +877,13 @@ impl CharacterAbility {
|
||||
projectile.modified_projectile(power, 1_f32, 1_f32, 1_f32);
|
||||
}
|
||||
if !skillset.has_skill(Bow(RGlide)) {
|
||||
*buildup_duration = 1;
|
||||
*buildup_duration = 0.001;
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(RArrows)) {
|
||||
*reps_remaining += level as u32;
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(RCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.70_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.70_f32.powi(level.into());
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
@ -942,22 +923,21 @@ impl CharacterAbility {
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Staff(FDamage)) {
|
||||
*base_dps = (*base_dps as f32 * 1.3_f32.powi(level.into())) as u32;
|
||||
*base_dps *= 1.3_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Staff(FRange)) {
|
||||
let range_mod = 1.25_f32.powi(level.into());
|
||||
*range *= range_mod;
|
||||
// Duration modified to keep velocity constant
|
||||
*beam_duration = (*beam_duration as f32 * range_mod) as u64;
|
||||
*beam_duration *= range_mod;
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Staff(FDrain)) {
|
||||
*energy_drain =
|
||||
(*energy_drain as f32 * 0.8_f32.powi(level.into())) as u32;
|
||||
*energy_drain *= 0.8_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Staff(FVelocity)) {
|
||||
let velocity_increase = 1.25_f32.powi(level.into());
|
||||
let duration_mod = 1.0 / (1.0 + velocity_increase);
|
||||
*beam_duration = (*beam_duration as f32 * duration_mod) as u64;
|
||||
*beam_duration *= duration_mod;
|
||||
}
|
||||
},
|
||||
Shockwave {
|
||||
@ -968,18 +948,16 @@ impl CharacterAbility {
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Staff(SDamage)) {
|
||||
*damage = (*damage as f32 * 1.3_f32.powi(level.into())) as u32;
|
||||
*damage *= 1.3_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Staff(SKnockback)) {
|
||||
*knockback = knockback.modify_strength(1.3_f32.powi(level.into()));
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Staff(SRange)) {
|
||||
*shockwave_duration =
|
||||
(*shockwave_duration as f32 * 1.2_f32.powi(level.into())) as u64;
|
||||
*shockwave_duration *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Staff(SCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.8_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.8_f32.powi(level.into());
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
@ -999,27 +977,25 @@ impl CharacterAbility {
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(BHeal)) {
|
||||
*base_hps = (*base_hps as f32 * 1.15_f32.powi(level.into())) as u32;
|
||||
*base_hps *= 1.15_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(BDamage)) {
|
||||
*base_dps = (*base_dps as f32 * 1.25_f32.powi(level.into())) as u32;
|
||||
*base_dps *= 1.25_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(BRange)) {
|
||||
let range_mod = 1.20_f32.powi(level.into());
|
||||
*range *= range_mod;
|
||||
// Duration modified to keep velocity constant
|
||||
*beam_duration = (*beam_duration as f32 * range_mod) as u64;
|
||||
*beam_duration *= range_mod;
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(BLifesteal)) {
|
||||
*lifesteal_eff *= 1.25_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(BRegen)) {
|
||||
*energy_regen =
|
||||
(*energy_regen as f32 * 1.1_f32.powi(level.into())) as u32;
|
||||
*energy_regen *= 1.1_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(BCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.9_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.9_f32.powi(level.into());
|
||||
}
|
||||
},
|
||||
BasicRanged {
|
||||
@ -1047,8 +1023,7 @@ impl CharacterAbility {
|
||||
*projectile = projectile.modified_projectile(power, 1_f32, range, heal);
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(PCost)) {
|
||||
*energy_cost =
|
||||
(*energy_cost as f32 * 0.85_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.85_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(PProjSpeed)) {
|
||||
*projectile_speed *= 1.25_f32.powi(level.into());
|
||||
@ -1069,14 +1044,13 @@ impl CharacterAbility {
|
||||
{
|
||||
*immune_melee = skillset.has_skill(Skill::Roll(ImmuneMelee));
|
||||
if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Cost)) {
|
||||
*energy_cost = (*energy_cost as f32 * 0.8_f32.powi(level.into())) as u32;
|
||||
*energy_cost *= 0.8_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Strength)) {
|
||||
*roll_strength *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Duration)) {
|
||||
*movement_duration =
|
||||
(*movement_duration as f32 * 1.2_f32.powi(level.into())) as u64;
|
||||
*movement_duration *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1101,9 +1075,9 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
energy_cost: _,
|
||||
} => CharacterState::BasicMelee(basic_melee::Data {
|
||||
static_data: basic_melee::StaticData {
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
swing_duration: Duration::from_millis(*swing_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
swing_duration: Duration::from_secs_f32(*swing_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
base_damage: *base_damage,
|
||||
base_poise_damage: *base_poise_damage,
|
||||
knockback: *knockback,
|
||||
@ -1127,8 +1101,8 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
energy_cost: _,
|
||||
} => CharacterState::BasicRanged(basic_ranged::Data {
|
||||
static_data: basic_ranged::StaticData {
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
projectile: *projectile,
|
||||
projectile_body: *projectile_body,
|
||||
projectile_light: *projectile_light,
|
||||
@ -1147,7 +1121,7 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
only_up,
|
||||
} => CharacterState::Boost(boost::Data {
|
||||
static_data: boost::StaticData {
|
||||
movement_duration: Duration::from_millis(*movement_duration),
|
||||
movement_duration: Duration::from_secs_f32(*movement_duration),
|
||||
only_up: *only_up,
|
||||
},
|
||||
timer: Duration::default(),
|
||||
@ -1183,10 +1157,10 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
energy_drain: *energy_drain,
|
||||
forward_speed: *forward_speed,
|
||||
infinite_charge: *infinite_charge,
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
charge_duration: Duration::from_millis(*charge_duration),
|
||||
swing_duration: Duration::from_millis(*swing_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
charge_duration: Duration::from_secs_f32(*charge_duration),
|
||||
swing_duration: Duration::from_secs_f32(*swing_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
is_interruptible: *is_interruptible,
|
||||
ability_key: key,
|
||||
},
|
||||
@ -1206,9 +1180,9 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
immune_melee,
|
||||
} => CharacterState::Roll(roll::Data {
|
||||
static_data: roll::StaticData {
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
movement_duration: Duration::from_millis(*movement_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
movement_duration: Duration::from_secs_f32(*movement_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
roll_strength: *roll_strength,
|
||||
immune_melee: *immune_melee,
|
||||
},
|
||||
@ -1261,10 +1235,10 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
vertical_leap_strength,
|
||||
} => CharacterState::LeapMelee(leap_melee::Data {
|
||||
static_data: leap_melee::StaticData {
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
movement_duration: Duration::from_millis(*movement_duration),
|
||||
swing_duration: Duration::from_millis(*swing_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
movement_duration: Duration::from_secs_f32(*movement_duration),
|
||||
swing_duration: Duration::from_secs_f32(*swing_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
base_damage: *base_damage,
|
||||
base_poise_damage: *base_poise_damage,
|
||||
knockback: *knockback,
|
||||
@ -1294,9 +1268,9 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
num_spins,
|
||||
} => CharacterState::SpinMelee(spin_melee::Data {
|
||||
static_data: spin_melee::StaticData {
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
swing_duration: Duration::from_millis(*swing_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
swing_duration: Duration::from_secs_f32(*swing_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
base_damage: *base_damage,
|
||||
base_poise_damage: *base_poise_damage,
|
||||
knockback: *knockback,
|
||||
@ -1343,10 +1317,10 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
speed: *speed,
|
||||
range: *range,
|
||||
max_angle: *max_angle,
|
||||
charge_duration: Duration::from_millis(*charge_duration),
|
||||
swing_duration: Duration::from_millis(*swing_duration),
|
||||
charge_duration: Duration::from_secs_f32(*charge_duration),
|
||||
swing_duration: Duration::from_secs_f32(*swing_duration),
|
||||
hit_timing: *hit_timing,
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
ability_key: key,
|
||||
},
|
||||
stage_section: StageSection::Charge,
|
||||
@ -1373,9 +1347,9 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
move_speed,
|
||||
} => CharacterState::ChargedRanged(charged_ranged::Data {
|
||||
static_data: charged_ranged::StaticData {
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
charge_duration: Duration::from_millis(*charge_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
charge_duration: Duration::from_secs_f32(*charge_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
energy_drain: *energy_drain,
|
||||
initial_damage: *initial_damage,
|
||||
scaled_damage: *scaled_damage,
|
||||
@ -1409,10 +1383,10 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
reps_remaining,
|
||||
} => CharacterState::RepeaterRanged(repeater_ranged::Data {
|
||||
static_data: repeater_ranged::StaticData {
|
||||
movement_duration: Duration::from_millis(*movement_duration),
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
shoot_duration: Duration::from_millis(*shoot_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
movement_duration: Duration::from_secs_f32(*movement_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
shoot_duration: Duration::from_secs_f32(*shoot_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
leap: *leap,
|
||||
projectile: *projectile,
|
||||
projectile_body: *projectile_body,
|
||||
@ -1441,16 +1415,16 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
move_efficiency,
|
||||
} => CharacterState::Shockwave(shockwave::Data {
|
||||
static_data: shockwave::StaticData {
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
swing_duration: Duration::from_millis(*swing_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
swing_duration: Duration::from_secs_f32(*swing_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
damage: *damage,
|
||||
poise_damage: *poise_damage,
|
||||
knockback: *knockback,
|
||||
shockwave_angle: *shockwave_angle,
|
||||
shockwave_vertical_angle: *shockwave_vertical_angle,
|
||||
shockwave_speed: *shockwave_speed,
|
||||
shockwave_duration: Duration::from_millis(*shockwave_duration),
|
||||
shockwave_duration: Duration::from_secs_f32(*shockwave_duration),
|
||||
requires_ground: *requires_ground,
|
||||
move_efficiency: *move_efficiency,
|
||||
ability_key: key,
|
||||
@ -1473,9 +1447,9 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
|
||||
energy_drain,
|
||||
} => CharacterState::BasicBeam(basic_beam::Data {
|
||||
static_data: basic_beam::StaticData {
|
||||
buildup_duration: Duration::from_millis(*buildup_duration),
|
||||
recover_duration: Duration::from_millis(*recover_duration),
|
||||
beam_duration: Duration::from_millis(*beam_duration),
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
recover_duration: Duration::from_secs_f32(*recover_duration),
|
||||
beam_duration: Duration::from_secs_f32(*beam_duration),
|
||||
base_hps: *base_hps,
|
||||
base_dps: *base_dps,
|
||||
tick_rate: *tick_rate,
|
||||
|
@ -535,82 +535,82 @@ impl Body {
|
||||
}
|
||||
|
||||
#[allow(unreachable_patterns)]
|
||||
pub fn base_dmg(&self) -> u32 {
|
||||
pub fn base_dmg(&self) -> f32 {
|
||||
match self {
|
||||
Body::Humanoid(_) => 50,
|
||||
Body::Humanoid(_) => 50.0,
|
||||
Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
|
||||
quadruped_small::Species::Dodarock => 30,
|
||||
quadruped_small::Species::Hyena => 40,
|
||||
quadruped_small::Species::Holladon => 40,
|
||||
quadruped_small::Species::Porcupine => 30,
|
||||
_ => 20,
|
||||
quadruped_small::Species::Dodarock => 30.0,
|
||||
quadruped_small::Species::Hyena => 40.0,
|
||||
quadruped_small::Species::Holladon => 40.0,
|
||||
quadruped_small::Species::Porcupine => 30.0,
|
||||
_ => 20.0,
|
||||
},
|
||||
Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
|
||||
quadruped_medium::Species::Grolgar => 50,
|
||||
quadruped_medium::Species::Lion => 60,
|
||||
quadruped_medium::Species::Tarasque => 70,
|
||||
quadruped_medium::Species::Mouflon => 30,
|
||||
quadruped_medium::Species::Catoblepas => 20,
|
||||
quadruped_medium::Species::Bonerattler => 50,
|
||||
quadruped_medium::Species::Deer => 30,
|
||||
quadruped_medium::Species::Hirdrasil => 50,
|
||||
quadruped_medium::Species::Roshwalr => 60,
|
||||
quadruped_medium::Species::Donkey => 40,
|
||||
quadruped_medium::Species::Camel => 40,
|
||||
quadruped_medium::Species::Zebra => 40,
|
||||
quadruped_medium::Species::Antelope => 6,
|
||||
quadruped_medium::Species::Kelpie => 60,
|
||||
quadruped_medium::Species::Horse => 50,
|
||||
_ => 40,
|
||||
quadruped_medium::Species::Grolgar => 50.0,
|
||||
quadruped_medium::Species::Lion => 60.0,
|
||||
quadruped_medium::Species::Tarasque => 70.0,
|
||||
quadruped_medium::Species::Mouflon => 30.0,
|
||||
quadruped_medium::Species::Catoblepas => 20.0,
|
||||
quadruped_medium::Species::Bonerattler => 50.0,
|
||||
quadruped_medium::Species::Deer => 30.0,
|
||||
quadruped_medium::Species::Hirdrasil => 50.0,
|
||||
quadruped_medium::Species::Roshwalr => 60.0,
|
||||
quadruped_medium::Species::Donkey => 40.0,
|
||||
quadruped_medium::Species::Camel => 40.0,
|
||||
quadruped_medium::Species::Zebra => 40.0,
|
||||
quadruped_medium::Species::Antelope => 6.0,
|
||||
quadruped_medium::Species::Kelpie => 60.0,
|
||||
quadruped_medium::Species::Horse => 50.0,
|
||||
_ => 40.0,
|
||||
},
|
||||
Body::BirdMedium(bird_medium) => match bird_medium.species {
|
||||
bird_medium::Species::Chicken => 10,
|
||||
bird_medium::Species::Duck => 10,
|
||||
bird_medium::Species::Goose => 10,
|
||||
bird_medium::Species::Parrot => 20,
|
||||
bird_medium::Species::Peacock => 40,
|
||||
bird_medium::Species::Cockatrice => 60,
|
||||
bird_medium::Species::Eagle => 60,
|
||||
_ => 30,
|
||||
bird_medium::Species::Chicken => 10.0,
|
||||
bird_medium::Species::Duck => 10.0,
|
||||
bird_medium::Species::Goose => 10.0,
|
||||
bird_medium::Species::Parrot => 20.0,
|
||||
bird_medium::Species::Peacock => 40.0,
|
||||
bird_medium::Species::Cockatrice => 60.0,
|
||||
bird_medium::Species::Eagle => 60.0,
|
||||
_ => 30.0,
|
||||
},
|
||||
Body::FishMedium(_) => 10,
|
||||
Body::Dragon(_) => 5000,
|
||||
Body::BirdSmall(_) => 10,
|
||||
Body::FishSmall(_) => 10,
|
||||
Body::FishMedium(_) => 10.0,
|
||||
Body::Dragon(_) => 5000.0,
|
||||
Body::BirdSmall(_) => 10.0,
|
||||
Body::FishSmall(_) => 10.0,
|
||||
Body::BipedLarge(biped_large) => match biped_large.species {
|
||||
biped_large::Species::Ogre => 60,
|
||||
biped_large::Species::Cyclops => 60,
|
||||
biped_large::Species::Wendigo => 60,
|
||||
biped_large::Species::Troll => 60,
|
||||
biped_large::Species::Dullahan => 80,
|
||||
biped_large::Species::Mindflayer => 200,
|
||||
_ => 60,
|
||||
biped_large::Species::Ogre => 60.0,
|
||||
biped_large::Species::Cyclops => 60.0,
|
||||
biped_large::Species::Wendigo => 60.0,
|
||||
biped_large::Species::Troll => 60.0,
|
||||
biped_large::Species::Dullahan => 80.0,
|
||||
biped_large::Species::Mindflayer => 200.0,
|
||||
_ => 60.0,
|
||||
},
|
||||
Body::Object(_) => 0,
|
||||
Body::Golem(_) => 250,
|
||||
Body::Object(_) => 0.0,
|
||||
Body::Golem(_) => 250.0,
|
||||
Body::Theropod(theropod) => match theropod.species {
|
||||
theropod::Species::Archaeos => 150,
|
||||
theropod::Species::Odonto => 130,
|
||||
_ => 70,
|
||||
theropod::Species::Archaeos => 150.0,
|
||||
theropod::Species::Odonto => 130.0,
|
||||
_ => 70.0,
|
||||
},
|
||||
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
|
||||
quadruped_low::Species::Crocodile => 50,
|
||||
quadruped_low::Species::Alligator => 50,
|
||||
quadruped_low::Species::Salamander => 50,
|
||||
quadruped_low::Species::Monitor => 30,
|
||||
quadruped_low::Species::Asp => 35,
|
||||
quadruped_low::Species::Tortoise => 10,
|
||||
quadruped_low::Species::Rocksnapper => 80,
|
||||
quadruped_low::Species::Pangolin => 10,
|
||||
quadruped_low::Species::Maneater => 40,
|
||||
quadruped_low::Species::Sandshark => 60,
|
||||
quadruped_low::Species::Hakulaq => 40,
|
||||
_ => 20,
|
||||
quadruped_low::Species::Crocodile => 50.0,
|
||||
quadruped_low::Species::Alligator => 50.0,
|
||||
quadruped_low::Species::Salamander => 50.0,
|
||||
quadruped_low::Species::Monitor => 30.0,
|
||||
quadruped_low::Species::Asp => 35.0,
|
||||
quadruped_low::Species::Tortoise => 10.0,
|
||||
quadruped_low::Species::Rocksnapper => 80.0,
|
||||
quadruped_low::Species::Pangolin => 10.0,
|
||||
quadruped_low::Species::Maneater => 40.0,
|
||||
quadruped_low::Species::Sandshark => 60.0,
|
||||
quadruped_low::Species::Hakulaq => 40.0,
|
||||
_ => 20.0,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn base_poise_dmg(&self) -> u32 { 0 }
|
||||
pub fn base_poise_dmg(&self) -> f32 { 0.0 }
|
||||
|
||||
pub fn base_range(&self) -> f32 {
|
||||
match self {
|
||||
|
@ -347,10 +347,10 @@ impl Item {
|
||||
quality: empty_def.quality,
|
||||
item_config: Some(ItemConfig {
|
||||
ability1: Some(CharacterAbility::BasicMelee {
|
||||
energy_cost: 10,
|
||||
buildup_duration: 500,
|
||||
swing_duration: 100,
|
||||
recover_duration: 100,
|
||||
energy_cost: 0.010,
|
||||
buildup_duration: 0.5,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.1,
|
||||
base_damage: body.base_dmg(),
|
||||
base_poise_damage: body.base_poise_dmg(),
|
||||
knockback: 0.0,
|
||||
|
@ -42,16 +42,16 @@ pub enum ProjectileConstructor {
|
||||
Arrow {
|
||||
damage: f32,
|
||||
knockback: f32,
|
||||
energy_regen: u32,
|
||||
energy_regen: f32,
|
||||
},
|
||||
Fireball {
|
||||
damage: f32,
|
||||
radius: f32,
|
||||
energy_regen: u32,
|
||||
energy_regen: f32,
|
||||
},
|
||||
Firebolt {
|
||||
damage: f32,
|
||||
energy_regen: u32,
|
||||
energy_regen: f32,
|
||||
},
|
||||
Heal {
|
||||
heal: f32,
|
||||
@ -207,7 +207,7 @@ impl ProjectileConstructor {
|
||||
..
|
||||
} => {
|
||||
*damage *= power;
|
||||
*energy_regen = (*energy_regen as f32 * regen) as u32;
|
||||
*energy_regen *= regen;
|
||||
},
|
||||
Fireball {
|
||||
ref mut damage,
|
||||
@ -216,7 +216,7 @@ impl ProjectileConstructor {
|
||||
..
|
||||
} => {
|
||||
*damage *= power;
|
||||
*energy_regen = (*energy_regen as f32 * regen) as u32;
|
||||
*energy_regen *= regen;
|
||||
*radius *= range;
|
||||
},
|
||||
Firebolt {
|
||||
@ -225,7 +225,7 @@ impl ProjectileConstructor {
|
||||
..
|
||||
} => {
|
||||
*damage *= power;
|
||||
*energy_regen = (*energy_regen as f32 * regen) as u32;
|
||||
*energy_regen *= regen;
|
||||
},
|
||||
Heal {
|
||||
ref mut damage,
|
||||
@ -251,7 +251,7 @@ impl ProjectileConstructor {
|
||||
{
|
||||
ProjectileConstructor::Firebolt {
|
||||
damage,
|
||||
energy_regen: energy_regen * 2,
|
||||
energy_regen: energy_regen * 2.0,
|
||||
}
|
||||
} else {
|
||||
self
|
||||
|
@ -25,9 +25,9 @@ pub struct StaticData {
|
||||
/// How long each beam segment persists for
|
||||
pub beam_duration: Duration,
|
||||
/// Base healing per second
|
||||
pub base_hps: u32,
|
||||
pub base_hps: f32,
|
||||
/// Base damage per second
|
||||
pub base_dps: u32,
|
||||
pub base_dps: f32,
|
||||
/// Ticks of damage/healing per second
|
||||
pub tick_rate: f32,
|
||||
/// Max range
|
||||
@ -38,11 +38,11 @@ pub struct StaticData {
|
||||
/// 100% conversion of damage to health)
|
||||
pub lifesteal_eff: f32,
|
||||
/// Energy regened per second for damage ticks
|
||||
pub energy_regen: u32,
|
||||
pub energy_regen: f32,
|
||||
/// Energy consumed per second for heal ticks
|
||||
pub energy_cost: u32,
|
||||
pub energy_cost: f32,
|
||||
/// Energy drained per
|
||||
pub energy_drain: u32,
|
||||
pub energy_drain: f32,
|
||||
/// What key is used to press ability
|
||||
pub ability_key: AbilityKey,
|
||||
}
|
||||
@ -120,7 +120,8 @@ impl CharacterBehavior for Data {
|
||||
},
|
||||
StageSection::Cast => {
|
||||
if ability_key_is_pressed(data, self.static_data.ability_key)
|
||||
&& (self.static_data.energy_drain == 0 || update.energy.current() > 0)
|
||||
&& (self.static_data.energy_drain <= f32::EPSILON
|
||||
|| update.energy.current() > 0)
|
||||
{
|
||||
let speed =
|
||||
self.static_data.range / self.static_data.beam_duration.as_secs_f32();
|
||||
|
@ -20,9 +20,9 @@ pub struct StaticData {
|
||||
/// How long the state has until exiting
|
||||
pub recover_duration: Duration,
|
||||
/// Base damage
|
||||
pub base_damage: u32,
|
||||
pub base_damage: f32,
|
||||
/// Base poise reduction
|
||||
pub base_poise_damage: u32,
|
||||
pub base_poise_damage: f32,
|
||||
/// Knockback
|
||||
pub knockback: f32,
|
||||
/// Max range
|
||||
@ -103,7 +103,7 @@ impl CharacterBehavior for Data {
|
||||
}),
|
||||
)
|
||||
.with_requirement(CombatRequirement::AnyDamage);
|
||||
let energy = AttackEffect::new(None, CombatEffect::EnergyReward(50))
|
||||
let energy = AttackEffect::new(None, CombatEffect::EnergyReward(50.0))
|
||||
.with_requirement(CombatRequirement::AnyDamage);
|
||||
let buff = CombatEffect::Buff(CombatBuff::default_physical());
|
||||
let damage = AttackDamage::new(
|
||||
|
@ -14,17 +14,17 @@ use std::time::Duration;
|
||||
/// Separated out to condense update portions of character state
|
||||
pub struct StaticData {
|
||||
/// How much energy is drained per second when charging
|
||||
pub energy_drain: u32,
|
||||
pub energy_drain: f32,
|
||||
/// Energy cost per attack
|
||||
pub energy_cost: u32,
|
||||
pub energy_cost: f32,
|
||||
/// How much damage is dealt with no charge
|
||||
pub initial_damage: u32,
|
||||
pub initial_damage: f32,
|
||||
/// How much the damage is scaled by
|
||||
pub scaled_damage: u32,
|
||||
pub scaled_damage: f32,
|
||||
/// How much poise damage is dealt with no charge
|
||||
pub initial_poise_damage: u32,
|
||||
pub initial_poise_damage: f32,
|
||||
/// How much poise damage is scaled by
|
||||
pub scaled_poise_damage: u32,
|
||||
pub scaled_poise_damage: f32,
|
||||
/// How much knockback there is with no charge
|
||||
pub initial_knockback: f32,
|
||||
/// How much the knockback is scaled by
|
||||
@ -81,7 +81,7 @@ impl CharacterBehavior for Data {
|
||||
match self.stage_section {
|
||||
StageSection::Charge => {
|
||||
if ability_key_is_pressed(data, self.static_data.ability_key)
|
||||
&& update.energy.current() >= self.static_data.energy_cost
|
||||
&& update.energy.current() as f32 >= self.static_data.energy_cost
|
||||
&& self.timer < self.static_data.charge_duration
|
||||
{
|
||||
let charge = (self.timer.as_secs_f32()
|
||||
@ -108,7 +108,7 @@ impl CharacterBehavior for Data {
|
||||
source: EnergySource::Ability,
|
||||
});
|
||||
} else if ability_key_is_pressed(data, self.static_data.ability_key)
|
||||
&& update.energy.current() >= self.static_data.energy_cost
|
||||
&& update.energy.current() as f32 >= self.static_data.energy_cost
|
||||
{
|
||||
// Maintains charge
|
||||
update.character = CharacterState::ChargedMelee(Data {
|
||||
|
@ -26,11 +26,11 @@ pub struct StaticData {
|
||||
/// How long the state has until exiting
|
||||
pub recover_duration: Duration,
|
||||
/// How much energy is drained per second when charging
|
||||
pub energy_drain: u32,
|
||||
pub energy_drain: f32,
|
||||
/// How much damage is dealt with no charge
|
||||
pub initial_damage: u32,
|
||||
pub initial_damage: f32,
|
||||
/// How much the damage scales as it is charged
|
||||
pub scaled_damage: u32,
|
||||
pub scaled_damage: f32,
|
||||
/// How much knockback there is with no charge
|
||||
pub initial_knockback: f32,
|
||||
/// How much the knockback scales as it is charged
|
||||
|
@ -15,13 +15,13 @@ pub struct Stage<T> {
|
||||
/// Specifies which stage the combo attack is in
|
||||
pub stage: u32,
|
||||
/// Initial damage of stage
|
||||
pub base_damage: u32,
|
||||
pub base_damage: f32,
|
||||
/// Damage scaling per combo
|
||||
pub damage_increase: u32,
|
||||
pub damage_increase: f32,
|
||||
/// Initial poise damage of stage
|
||||
pub base_poise_damage: u32,
|
||||
pub base_poise_damage: f32,
|
||||
/// Poise damage scaling per combo
|
||||
pub poise_damage_increase: u32,
|
||||
pub poise_damage_increase: f32,
|
||||
/// Knockback of stage
|
||||
pub knockback: f32,
|
||||
/// Range of attack
|
||||
@ -39,7 +39,7 @@ pub struct Stage<T> {
|
||||
pub forward_movement: f32,
|
||||
}
|
||||
|
||||
impl Stage<u64> {
|
||||
impl Stage<f32> {
|
||||
pub fn to_duration(self) -> Stage<Duration> {
|
||||
Stage::<Duration> {
|
||||
stage: self.stage,
|
||||
@ -50,21 +50,21 @@ impl Stage<u64> {
|
||||
knockback: self.knockback,
|
||||
range: self.range,
|
||||
angle: self.angle,
|
||||
base_buildup_duration: Duration::from_millis(self.base_buildup_duration),
|
||||
base_swing_duration: Duration::from_millis(self.base_swing_duration),
|
||||
base_recover_duration: Duration::from_millis(self.base_recover_duration),
|
||||
base_buildup_duration: Duration::from_secs_f32(self.base_buildup_duration),
|
||||
base_swing_duration: Duration::from_secs_f32(self.base_swing_duration),
|
||||
base_recover_duration: Duration::from_secs_f32(self.base_recover_duration),
|
||||
forward_movement: self.forward_movement,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn adjusted_by_stats(mut self, power: f32, poise_strength: f32, speed: f32) -> Self {
|
||||
self.base_damage = (self.base_damage as f32 * power) as u32;
|
||||
self.damage_increase = (self.damage_increase as f32 * power) as u32;
|
||||
self.base_poise_damage = (self.base_poise_damage as f32 * poise_strength) as u32;
|
||||
self.poise_damage_increase = (self.poise_damage_increase as f32 * poise_strength) as u32;
|
||||
self.base_buildup_duration = (self.base_buildup_duration as f32 / speed) as u64;
|
||||
self.base_swing_duration = (self.base_swing_duration as f32 / speed) as u64;
|
||||
self.base_recover_duration = (self.base_recover_duration as f32 / speed) as u64;
|
||||
self.base_damage *= power;
|
||||
self.damage_increase *= power;
|
||||
self.base_poise_damage *= poise_strength;
|
||||
self.poise_damage_increase *= poise_strength;
|
||||
self.base_buildup_duration /= speed;
|
||||
self.base_swing_duration /= speed;
|
||||
self.base_recover_duration /= speed;
|
||||
self
|
||||
}
|
||||
|
||||
@ -82,11 +82,11 @@ pub struct StaticData {
|
||||
/// Data for each stage
|
||||
pub stage_data: Vec<Stage<Duration>>,
|
||||
/// Initial energy gain per strike
|
||||
pub initial_energy_gain: u32,
|
||||
pub initial_energy_gain: f32,
|
||||
/// Max energy gain per strike
|
||||
pub max_energy_gain: u32,
|
||||
pub max_energy_gain: f32,
|
||||
/// Energy gain increase per combo
|
||||
pub energy_increase: u32,
|
||||
pub energy_increase: f32,
|
||||
/// (100% - speed_increase) is percentage speed increases from current to
|
||||
/// max per combo increase
|
||||
pub speed_increase: f32,
|
||||
@ -167,20 +167,23 @@ impl CharacterBehavior for Data {
|
||||
|
||||
// Hit attempt
|
||||
let damage = self.static_data.stage_data[stage_index].base_damage
|
||||
+ self
|
||||
+ (self
|
||||
.static_data
|
||||
.scales_from_combo
|
||||
.min(self.combo / self.static_data.num_stages)
|
||||
as f32)
|
||||
* self.static_data.stage_data[stage_index].damage_increase;
|
||||
|
||||
let poise = self.static_data.stage_data[stage_index].base_poise_damage
|
||||
+ self
|
||||
+ (self
|
||||
.static_data
|
||||
.scales_from_combo
|
||||
.min(self.combo / self.static_data.num_stages)
|
||||
as f32)
|
||||
* self.static_data.stage_data[stage_index].poise_damage_increase;
|
||||
let poise = AttackEffect::new(
|
||||
Some(GroupTarget::OutOfGroup),
|
||||
CombatEffect::Poise(poise as f32),
|
||||
CombatEffect::Poise(poise),
|
||||
)
|
||||
.with_requirement(CombatRequirement::AnyDamage);
|
||||
let knockback = AttackEffect::new(
|
||||
@ -193,7 +196,7 @@ impl CharacterBehavior for Data {
|
||||
.with_requirement(CombatRequirement::AnyDamage);
|
||||
let energy = self.static_data.max_energy_gain.min(
|
||||
self.static_data.initial_energy_gain
|
||||
+ self.combo * self.static_data.energy_increase,
|
||||
+ self.combo as f32 * self.static_data.energy_increase,
|
||||
);
|
||||
let energy = AttackEffect::new(None, CombatEffect::EnergyReward(energy))
|
||||
.with_requirement(CombatRequirement::AnyDamage);
|
||||
|
@ -15,13 +15,13 @@ use vek::Vec3;
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct StaticData {
|
||||
/// How much damage the attack initially does
|
||||
pub base_damage: u32,
|
||||
pub base_damage: f32,
|
||||
/// How much the attack scales in damage
|
||||
pub scaled_damage: u32,
|
||||
pub scaled_damage: f32,
|
||||
/// Initial poise damage
|
||||
pub base_poise_damage: u32,
|
||||
pub base_poise_damage: f32,
|
||||
/// How much the attac scales in poise damage
|
||||
pub scaled_poise_damage: u32,
|
||||
pub scaled_poise_damage: f32,
|
||||
/// How much the attack knocks the target back initially
|
||||
pub base_knockback: f32,
|
||||
/// How much the attack scales in knockback
|
||||
@ -31,7 +31,7 @@ pub struct StaticData {
|
||||
/// Angle of the attack
|
||||
pub angle: f32,
|
||||
/// Rate of energy drain
|
||||
pub energy_drain: u32,
|
||||
pub energy_drain: f32,
|
||||
/// How quickly dasher moves forward
|
||||
pub forward_speed: f32,
|
||||
/// Whether state keeps charging after reaching max charge duration
|
||||
|
@ -22,9 +22,9 @@ pub struct StaticData {
|
||||
/// How long the state has until exiting
|
||||
pub recover_duration: Duration,
|
||||
/// Base damage
|
||||
pub base_damage: u32,
|
||||
pub base_damage: f32,
|
||||
/// Base poise damage
|
||||
pub base_poise_damage: u32,
|
||||
pub base_poise_damage: f32,
|
||||
/// Knockback
|
||||
pub knockback: f32,
|
||||
/// Max range
|
||||
|
@ -23,9 +23,9 @@ pub struct StaticData {
|
||||
/// How long the state has until exiting
|
||||
pub recover_duration: Duration,
|
||||
/// Base damage
|
||||
pub damage: u32,
|
||||
pub damage: f32,
|
||||
/// Base poise damage
|
||||
pub poise_damage: u32,
|
||||
pub poise_damage: f32,
|
||||
/// Knockback
|
||||
pub knockback: Knockback,
|
||||
/// Angle of the shockwave
|
||||
|
@ -22,15 +22,15 @@ pub struct StaticData {
|
||||
/// How long until state ends
|
||||
pub recover_duration: Duration,
|
||||
/// Base damage
|
||||
pub base_damage: u32,
|
||||
pub base_damage: f32,
|
||||
/// Base poise damage
|
||||
pub base_poise_damage: u32,
|
||||
pub base_poise_damage: f32,
|
||||
/// Knockback
|
||||
pub knockback: f32,
|
||||
/// Range
|
||||
pub range: f32,
|
||||
/// Energy cost per attack
|
||||
pub energy_cost: u32,
|
||||
pub energy_cost: f32,
|
||||
/// Whether spin state is infinite
|
||||
pub is_infinite: bool,
|
||||
/// Used to dictate how movement functions in this state
|
||||
@ -173,7 +173,7 @@ impl CharacterBehavior for Data {
|
||||
.unwrap_or_default(),
|
||||
..*self
|
||||
});
|
||||
} else if update.energy.current() >= self.static_data.energy_cost
|
||||
} else if update.energy.current() as f32 >= self.static_data.energy_cost
|
||||
&& (self.spins_remaining != 0
|
||||
|| (self.static_data.is_infinite
|
||||
&& ability_key_is_pressed(data, self.static_data.ability_key)))
|
||||
|
@ -73,8 +73,8 @@ fn maps_basic_melee() {
|
||||
buildup_duration: Duration::default(),
|
||||
swing_duration: Duration::default(),
|
||||
recover_duration: Duration::default(),
|
||||
base_damage: 10,
|
||||
base_poise_damage: 10,
|
||||
base_damage: 10.0,
|
||||
base_poise_damage: 10.0,
|
||||
knockback: 0.0,
|
||||
range: 1.0,
|
||||
max_angle: 1.0,
|
||||
@ -113,10 +113,10 @@ fn matches_ability_stage() {
|
||||
num_stages: 1,
|
||||
stage_data: vec![states::combo_melee::Stage {
|
||||
stage: 1,
|
||||
base_damage: 100,
|
||||
base_poise_damage: 100,
|
||||
damage_increase: 10,
|
||||
poise_damage_increase: 10,
|
||||
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,
|
||||
@ -125,9 +125,9 @@ fn matches_ability_stage() {
|
||||
base_recover_duration: Duration::from_millis(400),
|
||||
forward_movement: 0.5,
|
||||
}],
|
||||
initial_energy_gain: 0,
|
||||
max_energy_gain: 100,
|
||||
energy_increase: 20,
|
||||
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,
|
||||
@ -172,10 +172,10 @@ fn ignores_different_ability_stage() {
|
||||
num_stages: 1,
|
||||
stage_data: vec![states::combo_melee::Stage {
|
||||
stage: 1,
|
||||
base_damage: 100,
|
||||
base_poise_damage: 100,
|
||||
damage_increase: 10,
|
||||
poise_damage_increase: 10,
|
||||
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,
|
||||
@ -184,9 +184,9 @@ fn ignores_different_ability_stage() {
|
||||
base_recover_duration: Duration::from_millis(400),
|
||||
forward_movement: 0.5,
|
||||
}],
|
||||
initial_energy_gain: 0,
|
||||
max_energy_gain: 100,
|
||||
energy_increase: 20,
|
||||
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,
|
||||
|
@ -377,7 +377,7 @@ impl ParticleMgr {
|
||||
if let CharacterState::BasicBeam(b) = character_state {
|
||||
let particle_ori = b.particle_ori.unwrap_or(*ori.vec());
|
||||
if b.stage_section == StageSection::Cast {
|
||||
if b.static_data.base_hps > 0 {
|
||||
if b.static_data.base_hps > 0.0 {
|
||||
// Emit a light when using healing
|
||||
lights.push(Light::new(pos.0 + b.offset, Rgb::new(0.1, 1.0, 0.15), 1.0));
|
||||
for i in 0..self.scheduler.heartbeats(Duration::from_millis(1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user