Merge branch 'angryanimals' into 'master'

animal attacks

See merge request 
This commit is contained in:
Marcel 2020-11-25 01:33:20 +00:00
commit 11ede8567d
148 changed files with 4222 additions and 756 deletions
CHANGELOG.md
assets
common/src
server/src
voxygen/src/anim/src

@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Variable dungeon difficulty
- Aurora Borealis (localised entirely within the kitchen)
- Block-based voxel lighting
- Animals now have customized attacks and AI
### Changed

@ -1,6 +1,6 @@
BasicRanged(
energy_cost: 0,
buildup_duration: 0,
buildup_duration: 1,
recover_duration: 10,
projectile: Possess,
projectile_body: Object(ArrowSnake),

@ -10,5 +10,6 @@ ChargedMelee(
speed: 1.0,
charge_duration: 1200,
swing_duration: 200,
hit_timing: 0.5,
recover_duration: 300,
)

@ -1,12 +1,12 @@
ComboMelee(
stage_data: [(
stage: 1,
base_damage: 120,
base_damage: 130,
max_damage: 150,
damage_increase: 10,
knockback: 0.0,
range: 3.5,
angle: 20.0,
range: 4.5,
angle: 50.0,
base_buildup_duration: 600,
base_swing_duration: 60,
base_recover_duration: 300,

@ -14,4 +14,4 @@ DashMelee(
recover_duration: 500,
infinite_charge: true,
is_interruptible: true,
)
)

@ -0,0 +1,23 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
max_damage: 100,
damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 500,
base_swing_duration: 150,
base_recover_duration: 400,
forward_movement: 3.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,49 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 120,
max_damage: 120,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 900,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 2.0,
),
(
stage: 2,
base_damage: 80,
max_damage: 80,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 500,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 1.5,
),
(
stage: 3,
base_damage: 130,
max_damage: 130,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 500,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 1.5,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,17 @@
DashMelee(
energy_cost: 0,
base_damage: 150,
max_damage: 260,
base_knockback: 8.0,
max_knockback: 25.0,
range: 5.0,
angle: 45.0,
energy_drain: 0,
forward_speed: 4.0,
buildup_duration: 500,
charge_duration: 1000,
swing_duration: 100,
recover_duration: 800,
infinite_charge: true,
is_interruptible: false,
)

@ -0,0 +1,14 @@
BasicBeam(
buildup_duration: 400,
recover_duration: 250,
beam_duration: 500,
base_hps: 0,
base_dps: 150,
tick_rate: 3.0,
range: 15.0,
max_angle: 22.5,
lifesteal_eff: 0.0,
energy_regen: 0,
energy_cost: 0,
energy_drain: 0,
)

@ -0,0 +1,49 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
max_damage: 100,
damage_increase: 0,
knockback: 10.0,
range: 4.5,
angle: 30.0,
base_buildup_duration: 900,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 2.0,
),
(
stage: 2,
base_damage: 80,
max_damage: 80,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 500,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 1.5,
),
(
stage: 3,
base_damage: 130,
max_damage: 130,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 500,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 1.5,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,17 @@
DashMelee(
energy_cost: 0,
base_damage: 30,
max_damage: 40,
base_knockback: 8.0,
max_knockback: 15.0,
range: 2.0,
angle: 45.0,
energy_drain: 0,
forward_speed: 2.0,
buildup_duration: 500,
charge_duration: 300,
swing_duration: 100,
recover_duration: 500,
infinite_charge: true,
is_interruptible: false,
)

@ -0,0 +1,62 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
max_damage: 100,
damage_increase: 0,
knockback: 2.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 600,
base_swing_duration: 100,
base_recover_duration: 100,
forward_movement: 1.5,
),
(
stage: 2,
base_damage: 130,
max_damage: 130,
damage_increase: 0,
knockback: 2.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 200,
base_swing_duration: 100,
base_recover_duration: 100,
forward_movement: 0.8,
),
(
stage: 3,
base_damage: 130,
max_damage: 130,
damage_increase: 0,
knockback: 2.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 200,
base_swing_duration: 100,
base_recover_duration: 100,
forward_movement: 0.8,
),
(
stage: 4,
base_damage: 130,
max_damage: 130,
damage_increase: 0,
knockback: 8.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 200,
base_swing_duration: 100,
base_recover_duration: 100,
forward_movement: 0.8,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,18 @@
BasicRanged(
energy_cost: 0,
buildup_duration: 800,
recover_duration: 350,
projectile: Fireball(
damage: 100.0,
radius: 5.0,
energy_regen: 0,
),
projectile_body: Object(BoltFire),
/*projectile_light: Some(LightEmitter {
col: (1.0, 0.75, 0.11).into(),
..Default::default()
}),*/
projectile_gravity: Some(Gravity(5.0)),
projectile_speed: 70.0,
can_continue: true,
)

@ -0,0 +1,23 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 60,
max_damage: 60,
damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 500,
base_swing_duration: 150,
base_recover_duration: 400,
forward_movement: 3.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,15 @@
ChargedMelee(
energy_cost: 0,
energy_drain: 0,
initial_damage: 160,
max_damage: 200,
initial_knockback: 10.0,
max_knockback: 30.0,
range: 6.0,
max_angle: 90.0,
speed: 1.0,
charge_duration: 1200,
swing_duration: 700,
hit_timing: 0.9,
recover_duration: 1200,
)

@ -0,0 +1,49 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
max_damage: 100,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 900,
base_swing_duration: 100,
base_recover_duration: 200,
forward_movement: 2.0,
),
(
stage: 2,
base_damage: 120,
max_damage: 120,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 200,
base_swing_duration: 100,
base_recover_duration: 200,
forward_movement: 1.0,
),
(
stage: 3,
base_damage: 130,
max_damage: 130,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 200,
base_swing_duration: 100,
base_recover_duration: 200,
forward_movement: 1.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,23 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 120,
max_damage: 120,
damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 650,
base_swing_duration: 150,
base_recover_duration: 400,
forward_movement: 1.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,49 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 120,
max_damage: 120,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 900,
base_swing_duration: 100,
base_recover_duration: 400,
forward_movement: 1.0,
),
(
stage: 2,
base_damage: 120,
max_damage: 120,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 300,
base_swing_duration: 100,
base_recover_duration: 200,
forward_movement: 0.0,
),
(
stage: 3,
base_damage: 120,
max_damage: 120,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 300,
base_swing_duration: 100,
base_recover_duration: 200,
forward_movement: 1.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,17 @@
DashMelee(
energy_cost: 0,
base_damage: 150,
max_damage: 190,
base_knockback: 8.0,
max_knockback: 25.0,
range: 4.0,
angle: 45.0,
energy_drain: 0,
forward_speed: 2.0,
buildup_duration: 500,
charge_duration: 1200,
swing_duration: 100,
recover_duration: 1100,
infinite_charge: true,
is_interruptible: false,
)

@ -0,0 +1,36 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
max_damage: 100,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 900,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 1.0,
),
(
stage: 2,
base_damage: 80,
max_damage: 80,
damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 500,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 0.5,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,10 @@
BasicMelee(
energy_cost: 0,
buildup_duration: 600,
swing_duration: 500,
recover_duration: 350,
base_damage: 130,
knockback: 25.0,
range: 3.0,
max_angle: 120.0,
)

@ -0,0 +1,36 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
max_damage: 100,
damage_increase: 0,
knockback: 8.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 900,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 1.0,
),
(
stage: 2,
base_damage: 80,
max_damage: 80,
damage_increase: 0,
knockback: 8.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 500,
base_swing_duration: 100,
base_recover_duration: 300,
forward_movement: 1.5,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,13 @@
LeapMelee(
energy_cost: 0,
buildup_duration: 500,
movement_duration: 400,
swing_duration: 75,
recover_duration: 200,
base_damage: 240,
knockback: 12.0,
range: 4.5,
max_angle: 180.0,
forward_leap_strength: 40.0,
vertical_leap_strength: 10.0,
)

@ -0,0 +1,13 @@
LeapMelee(
energy_cost: 0,
buildup_duration: 200,
movement_duration: 300,
swing_duration: 75,
recover_duration: 125,
base_damage: 120,
knockback: 7.0,
range: 4.5,
max_angle: 180.0,
forward_leap_strength: 20.0,
vertical_leap_strength: 5.0,
)

@ -0,0 +1,17 @@
DashMelee(
energy_cost: 0,
base_damage: 130,
max_damage: 150,
base_knockback: 8.0,
max_knockback: 15.0,
range: 2.0,
angle: 45.0,
energy_drain: 0,
forward_speed: 2.0,
buildup_duration: 1200,
charge_duration: 300,
swing_duration: 100,
recover_duration: 500,
infinite_charge: true,
is_interruptible: false,
)

@ -0,0 +1,49 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 150,
max_damage: 150,
damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 800,
base_swing_duration: 150,
base_recover_duration: 400,
forward_movement: 0.3,
),
(
stage: 2,
base_damage: 150,
max_damage: 150,
damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 600,
base_swing_duration: 150,
base_recover_duration: 300,
forward_movement: 0.5,
),
(
stage: 3,
base_damage: 150,
max_damage: 150,
damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 600,
base_swing_duration: 150,
base_recover_duration: 300,
forward_movement: 0.5,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,23 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 30,
max_damage: 30,
damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 300,
base_swing_duration: 150,
base_recover_duration: 300,
forward_movement: 1.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,23 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 150,
max_damage: 150,
damage_increase: 0,
knockback: 5.0,
range: 7.5,
angle: 60.0,
base_buildup_duration: 500,
base_swing_duration: 150,
base_recover_duration: 400,
forward_movement: 3.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,49 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 170,
max_damage: 170,
damage_increase: 0,
knockback: 10.0,
range: 7.5,
angle: 30.0,
base_buildup_duration: 900,
base_swing_duration: 150,
base_recover_duration: 300,
forward_movement: 1.0,
),
(
stage: 2,
base_damage: 190,
max_damage: 190,
damage_increase: 0,
knockback: 10.0,
range: 5.5,
angle: 30.0,
base_buildup_duration: 500,
base_swing_duration: 150,
base_recover_duration: 150,
forward_movement: 1.0,
),
(
stage: 3,
base_damage: 230,
max_damage: 230,
damage_increase: 0,
knockback: 10.0,
range: 5.5,
angle: 30.0,
base_buildup_duration: 350,
base_swing_duration: 125,
base_recover_duration: 900,
forward_movement: 1.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,23 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 150,
max_damage: 150,
damage_increase: 0,
knockback: 5.0,
range: 5.5,
angle: 5.0,
base_buildup_duration: 500,
base_swing_duration: 150,
base_recover_duration: 400,
forward_movement: 3.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -0,0 +1,49 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 170,
max_damage: 170,
damage_increase: 0,
knockback: 10.0,
range: 4.5,
angle: 5.0,
base_buildup_duration: 900,
base_swing_duration: 150,
base_recover_duration: 300,
forward_movement: 1.0,
),
(
stage: 2,
base_damage: 190,
max_damage: 190,
damage_increase: 0,
knockback: 10.0,
range: 4.0,
angle: 10.0,
base_buildup_duration: 500,
base_swing_duration: 150,
base_recover_duration: 150,
forward_movement: 1.0,
),
(
stage: 3,
base_damage: 230,
max_damage: 230,
damage_increase: 0,
knockback: 10.0,
range: 4.0,
angle: 10.0,
base_buildup_duration: 350,
base_swing_duration: 125,
base_recover_duration: 900,
forward_movement: 1.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 1.0,
is_interruptible: false,
)

@ -61,6 +61,75 @@
secondary: "common.abilities.unique.beastclaws.basic",
skills: [],
),
Unique(QuadMedQuick): (
primary: "common.abilities.unique.quadmedquick.triplestrike",
secondary: "common.abilities.unique.quadmedquick.dash",
skills: [],
),
Unique(QuadMedJump): (
primary: "common.abilities.unique.quadmedjump.leap",
secondary: "common.abilities.unique.quadmedjump.doublestrike",
skills: [
"common.abilities.unique.quadmedjump.quickleap"
],
),
Unique(QuadMedCharge): (
primary: "common.abilities.unique.quadmedcharge.doublestrike",
secondary: "common.abilities.unique.quadmedcharge.dash",
skills: [],
),
Unique(QuadMedHoof): (
primary: "common.abilities.unique.quadmedhoof.basic",
secondary: "common.abilities.unique.quadmedhoof.basic",
skills: [],
),
Unique(QuadMedBasic): (
primary: "common.abilities.unique.quadmedbasic.singlestrike",
secondary: "common.abilities.unique.quadmedbasic.triplestrike",
skills: [],
),
Unique(QuadLowRanged): (
primary: "common.abilities.unique.quadlowranged.singlestrike",
secondary: "common.abilities.unique.quadlowranged.firebomb",
skills: [],
),
Unique(QuadLowBreathe): (
primary: "common.abilities.unique.quadlowbreathe.flamethrower",
secondary: "common.abilities.unique.quadlowbreathe.triplestrike",
skills: [
"common.abilities.unique.quadlowbreathe.dash",
],
),
Unique(QuadLowTail): (
primary: "common.abilities.unique.quadlowtail.charged",
secondary: "common.abilities.unique.quadlowtail.triplestrike",
skills: [],
),
Unique(QuadLowQuick): (
primary: "common.abilities.unique.quadlowquick.dash",
secondary: "common.abilities.unique.quadlowquick.quadstrike",
skills: [],
),
Unique(QuadLowBasic): (
primary: "common.abilities.unique.quadlowbasic.triplestrike",
secondary: "common.abilities.unique.quadlowbasic.singlestrike",
skills: [],
),
Unique(QuadSmallBasic): (
primary: "common.abilities.unique.quadsmallbasic.singlestrike",
secondary: "common.abilities.unique.quadsmallbasic.singlestrike",
skills: [],
),
Unique(TheropodBasic): (
primary: "common.abilities.unique.theropodbasic.triplestrike",
secondary: "common.abilities.unique.theropodbasic.triplestrike",
skills: [],
),
Unique(TheropodBird): (
primary: "common.abilities.unique.theropodbird.triplestrike",
secondary: "common.abilities.unique.theropodbird.triplestrike",
skills: [],
),
Debug: (
primary: "common.abilities.debug.forwardboost",
secondary: "common.abilities.debug.upboost",
@ -78,4 +147,4 @@
secondary: "common.abilities.empty.basic",
skills: [],
),
})
})

@ -7,7 +7,7 @@ ItemDef(
stats: (
equip_time_millis: 500,
power: 1.00,
speed: 1.0
speed: 1.0,
),
)
),

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Low Basic",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadLowBasic),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Low Breathe",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadLowBreathe),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Low Quick",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadLowQuick),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Low Ranged",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadLowRanged),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Low Tail",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadLowTail),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Med Basic",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadMedBasic),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Med Charge",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadMedCharge),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Med Hoof",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadMedHoof),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Med Jump",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadMedJump),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.0,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Med Quick",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadMedQuick),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.0,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Small Basic",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadSmallBasic),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Theropod Basic",
description: "testing123",
kind: Tool(
(
kind: Unique(TheropodBasic),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -0,0 +1,15 @@
ItemDef(
name: "Theropod Bird",
description: "testing123",
kind: Tool(
(
kind: Unique(TheropodBird),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

@ -769,6 +769,10 @@
"hakulaq": {
"keyword": "hakulaq",
"generic": "Hakulaq"
},
"lavadrake": {
"keyword": "lavadrake",
"generic": "Lava Drake"
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -157,11 +157,11 @@
),
(Monitor, Male): (
upper: (
offset: (-3.0, -5.5, -3.0),
offset: (-3.0, 0.0, -3.0),
central: ("npc.monitor.male.head_upper"),
),
lower: (
offset: (-3.0, -3.5, -3.5),
offset: (-3.0, 0.0, -2.0),
central: ("npc.monitor.male.head_lower"),
),
jaw: (
@ -184,11 +184,11 @@
),
(Monitor, Female): (
upper: (
offset: (-3.0, -5.5, -3.0),
offset: (-3.0, 0.0, -3.0),
central: ("npc.monitor.male.head_upper"),
),
lower: (
offset: (-3.0, -3.5, -3.5),
offset: (-3.0, 0.0, -2.0),
central: ("npc.monitor.male.head_lower"),
),
jaw: (
@ -210,11 +210,11 @@
),
(Asp, Male): (
upper: (
offset: (-5.0, -5.0, -5.0),
offset: (-5.0, 0.0, -5.0),
central: ("npc.asp.male.head_upper"),
),
lower: (
offset: (-6.0, -3.0, -7.5),
offset: (-6.0, -0.0, -2.0),
central: ("npc.asp.male.head_lower"),
),
jaw: (
@ -236,11 +236,11 @@
),
(Asp, Female): (
upper: (
offset: (-5.0, -5.0, -5.0),
offset: (-5.0, 0.0, -5.0),
central: ("npc.asp.male.head_upper"),
),
lower: (
offset: (-6.0, -3.0, -7.5),
offset: (-6.0, -0.0, -2.0),
central: ("npc.asp.male.head_lower"),
),
jaw: (
@ -572,4 +572,56 @@
central: ("npc.sandshark.male.tail_front"),
),
),
(Lavadrake, Male): (
upper: (
offset: (-6.5, -2.0, -6.0),
central: ("npc.lavadrake.male.head_upper"),
),
lower: (
offset: (-6.5, -1.0, -3.0),
central: ("npc.lavadrake.male.head_lower"),
),
jaw: (
offset: (-3.5, 0.0, -5.0),
central: ("npc.lavadrake.male.jaw"),
),
chest: (
offset: (-9.5, -11.5, -11.5),
central: ("npc.lavadrake.male.chest"),
),
tail_rear: (
offset: (-6.5, -24.0, -3.5),
central: ("npc.lavadrake.male.tail_rear"),
),
tail_front: (
offset: (-5.5, -12.0, -6.5),
central: ("npc.lavadrake.male.tail_front"),
),
),
(Lavadrake, Female): (
upper: (
offset: (-6.5, -2.0, -6.0),
central: ("npc.lavadrake.male.head_upper"),
),
lower: (
offset: (-6.5, -1.0, -3.0),
central: ("npc.lavadrake.male.head_lower"),
),
jaw: (
offset: (-3.5, 0.0, -5.0),
central: ("npc.lavadrake.male.jaw"),
),
chest: (
offset: (-9.5, -11.5, -11.5),
central: ("npc.lavadrake.male.chest"),
),
tail_rear: (
offset: (-6.5, -24.0, -3.5),
central: ("npc.lavadrake.male.tail_rear"),
),
tail_front: (
offset: (-5.5, -12.0, -6.5),
central: ("npc.lavadrake.male.tail_front"),
),
),
})

@ -395,4 +395,40 @@
lateral: ("npc.sandshark.male.foot_br"),
),
),
(Lavadrake, Male): (
front_left: (
offset: (-14.0, -4.0, -10.0),
lateral: ("npc.lavadrake.male.foot_fl"),
),
front_right: (
offset: (0.0, -4.0, -10.0),
lateral: ("npc.lavadrake.male.foot_fr"),
),
back_left: (
offset: (-14.0, -7.5, -10.0),
lateral: ("npc.lavadrake.male.foot_bl"),
),
back_right: (
offset: (0.0, -7.5, -10.0),
lateral: ("npc.lavadrake.male.foot_br"),
),
),
(Lavadrake, Female): (
front_left: (
offset: (-14.0, -4.0, -10.0),
lateral: ("npc.lavadrake.male.foot_fl"),
),
front_right: (
offset: (0.0, -4.0, -10.0),
lateral: ("npc.lavadrake.male.foot_fr"),
),
back_left: (
offset: (-14.0, -7.5, -10.0),
lateral: ("npc.lavadrake.male.foot_bl"),
),
back_right: (
offset: (0.0, -7.5, -10.0),
lateral: ("npc.lavadrake.male.foot_br"),
),
),
})

@ -65,7 +65,7 @@
central: ("npc.saber.male.head"),
),
neck: (
offset: (-4.0, -5.5, -4.0),
offset: (-4.0, -2.0, -4.0),
central: ("npc.saber.male.neck"),
),
jaw: (
@ -95,7 +95,7 @@
central: ("npc.saber.male.head"),
),
neck: (
offset: (-4.0, -5.5, -4.0),
offset: (-4.0, -2.0, -4.0),
central: ("npc.saber.male.neck"),
),
jaw: (
@ -121,11 +121,11 @@
),
(Tuskram, Male): (
head: (
offset: (-10.0, -6.0, -6.5),
offset: (-10.0, -2.0, -6.5),
central: ("npc.tuskram.male.head"),
),
neck: (
offset: (-4.0, -5.0, -3.5),
offset: (-4.0, -2.0, -3.5),
central: ("npc.tuskram.male.neck"),
),
jaw: (
@ -151,11 +151,11 @@
),
(Tuskram, Female): (
head: (
offset: (-10.0, -6.0, -6.5),
offset: (-10.0, -2.0, -6.5),
central: ("npc.tuskram.male.head"),
),
neck: (
offset: (-4.0, -5.0, -3.5),
offset: (-4.0, -2.0, -3.5),
central: ("npc.tuskram.male.neck"),
),
jaw: (
@ -185,7 +185,7 @@
central: ("npc.lion.male.head"),
),
neck: (
offset: (-7.5, -5.5, -8.5),
offset: (-7.5, -3.0, -8.5),
central: ("npc.lion.male.neck"),
),
jaw: (
@ -215,7 +215,7 @@
central: ("npc.lion.male.head"),
),
neck: (
offset: (-7.5, -5.5, -8.5),
offset: (-7.5, -3.0, -8.5),
central: ("npc.lion.male.neck"),
),
jaw: (
@ -245,7 +245,7 @@
central: ("npc.tarasque.male.head"),
),
neck: (
offset: (-5.0, -3.0, -4.5),
offset: (-5.0, -2.0, -4.5),
central: ("npc.tarasque.male.neck"),
),
jaw: (
@ -275,7 +275,7 @@
central: ("npc.tarasque.male.head"),
),
neck: (
offset: (-5.0, -3.0, -4.5),
offset: (-5.0, -2.0, -4.5),
central: ("npc.tarasque.male.neck"),
),
jaw: (
@ -365,7 +365,7 @@
central: ("npc.wolf.male.head"),
),
neck: (
offset: (-5.0, -4.5, -5.0),
offset: (-5.0, -2.0, -5.0),
central: ("npc.wolf.male.neck"),
),
jaw: (
@ -395,7 +395,7 @@
central: ("npc.wolf.male.head"),
),
neck: (
offset: (-5.0, -4.5, -5.0),
offset: (-5.0, -2.0, -5.0),
central: ("npc.wolf.male.neck"),
),
jaw: (
@ -425,7 +425,7 @@
central: ("npc.frostfang.male.head"),
),
neck: (
offset: (-3.0, -2.0, -4.0),
offset: (-3.0, -1.0, -4.0),
central: ("npc.frostfang.male.neck"),
),
jaw: (
@ -455,7 +455,7 @@
central: ("npc.frostfang.male.head"),
),
neck: (
offset: (-3.0, -2.0, -4.0),
offset: (-3.0, -1.0, -4.0),
central: ("npc.frostfang.male.neck"),
),
jaw: (
@ -485,7 +485,7 @@
central: ("npc.mouflon.male.head"),
),
neck: (
offset: (-4.0, -4.0, -4.5),
offset: (-4.0, -2.0, -4.5),
central: ("npc.mouflon.male.neck"),
),
jaw: (
@ -515,7 +515,7 @@
central: ("npc.mouflon.male.head"),
),
neck: (
offset: (-4.0, -4.0, -4.5),
offset: (-4.0, -2.0, -4.5),
central: ("npc.mouflon.male.neck"),
),
jaw: (
@ -605,7 +605,7 @@
central: ("npc.bonerattler.male.head"),
),
neck: (
offset: (-4.5, -2.0, -5.0),
offset: (-4.5, -1.0, -5.0),
central: ("npc.bonerattler.male.neck"),
),
jaw: (
@ -635,7 +635,7 @@
central: ("npc.bonerattler.male.head"),
),
neck: (
offset: (-4.5, -2.0, -5.0),
offset: (-4.5, -1.0, -5.0),
central: ("npc.bonerattler.male.neck"),
),
jaw: (
@ -665,7 +665,7 @@
central: ("npc.deer.male.head"),
),
neck: (
offset: (-3.0, -3.5, -4.0),
offset: (-3.0, -2.0, -4.0),
central: ("npc.deer.male.neck"),
),
jaw: (
@ -695,7 +695,7 @@
central: ("npc.deer.female.head"),
),
neck: (
offset: (-3.0, -3.5, -4.0),
offset: (-3.0, -2.0, -4.0),
central: ("npc.deer.female.neck"),
),
jaw: (
@ -725,7 +725,7 @@
central: ("npc.hirdrasil.male.head"),
),
neck: (
offset: (-4.0, -4.0, -6.0),
offset: (-4.0, -2.0, -6.0),
central: ("npc.hirdrasil.male.neck"),
),
jaw: (
@ -755,7 +755,7 @@
central: ("npc.hirdrasil.male.head"),
),
neck: (
offset: (-4.0, -4.0, -6.0),
offset: (-4.0, -2.0, -6.0),
central: ("npc.hirdrasil.male.neck"),
),
jaw: (
@ -785,7 +785,7 @@
central: ("npc.roshwalr.male.head"),
),
neck: (
offset: (-7.0, -3.0, -11.5),
offset: (-7.0, -2.0, -11.5),
central: ("npc.roshwalr.male.neck"),
),
jaw: (
@ -815,7 +815,7 @@
central: ("npc.roshwalr.male.head"),
),
neck: (
offset: (-7.0, -3.0, -11.5),
offset: (-7.0, -2.0, -11.5),
central: ("npc.roshwalr.male.neck"),
),
jaw: (

@ -171,6 +171,7 @@ pub enum CharacterAbility {
speed: f32,
charge_duration: u64,
swing_duration: u64,
hit_timing: f32,
recover_duration: u64,
},
ChargedRanged {
@ -792,6 +793,7 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
speed,
charge_duration,
swing_duration,
hit_timing,
recover_duration,
range,
max_angle,
@ -808,6 +810,7 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState {
max_angle: *max_angle,
charge_duration: Duration::from_millis(*charge_duration),
swing_duration: Duration::from_millis(*swing_duration),
hit_timing: *hit_timing,
recover_duration: Duration::from_millis(*recover_duration),
ability_key: key,
},

@ -76,36 +76,36 @@ impl<'a> From<&'a Body> for Psyche {
aggro: match body {
Body::Humanoid(humanoid) => match humanoid.species {
humanoid::Species::Danari => 0.9,
humanoid::Species::Dwarf => 0.9,
humanoid::Species::Elf => 0.95,
humanoid::Species::Human => 0.95,
humanoid::Species::Orc => 1.0,
humanoid::Species::Undead => 1.0,
humanoid::Species::Dwarf => 0.8,
humanoid::Species::Elf => 0.7,
humanoid::Species::Human => 0.6,
humanoid::Species::Orc => 0.9,
humanoid::Species::Undead => 0.9,
},
Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
quadruped_small::Species::Pig => 0.5,
quadruped_small::Species::Fox => 0.4,
quadruped_small::Species::Fox => 0.3,
quadruped_small::Species::Sheep => 0.5,
quadruped_small::Species::Boar => 1.0,
quadruped_small::Species::Boar => 0.8,
quadruped_small::Species::Jackalope => 0.4,
quadruped_small::Species::Skunk => 0.8,
quadruped_small::Species::Skunk => 0.6,
quadruped_small::Species::Cat => 0.2,
quadruped_small::Species::Batfox => 0.7,
quadruped_small::Species::Batfox => 0.6,
quadruped_small::Species::Raccoon => 0.4,
quadruped_small::Species::Quokka => 0.7,
quadruped_small::Species::Quokka => 0.4,
quadruped_small::Species::Dodarock => 0.9,
quadruped_small::Species::Holladon => 1.0,
quadruped_small::Species::Hyena => 0.4,
quadruped_small::Species::Rabbit => 0.1,
quadruped_small::Species::Truffler => 0.8,
quadruped_small::Species::Frog => 0.6,
quadruped_small::Species::Frog => 0.4,
quadruped_small::Species::Hare => 0.2,
_ => 1.0,
_ => 0.0,
},
Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
quadruped_medium::Species::Tuskram => 0.8,
quadruped_medium::Species::Tuskram => 0.7,
quadruped_medium::Species::Frostfang => 0.9,
quadruped_medium::Species::Mouflon => 0.8,
quadruped_medium::Species::Mouflon => 0.7,
quadruped_medium::Species::Catoblepas => 0.8,
quadruped_medium::Species::Deer => 0.6,
quadruped_medium::Species::Hirdrasil => 0.7,
@ -113,17 +113,17 @@ impl<'a> From<&'a Body> for Psyche {
quadruped_medium::Species::Camel => 0.7,
quadruped_medium::Species::Zebra => 0.7,
quadruped_medium::Species::Antelope => 0.6,
quadruped_medium::Species::Horse => 0.8,
_ => 1.0,
quadruped_medium::Species::Horse => 0.7,
_ => 0.5,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Salamander => 0.8,
quadruped_low::Species::Monitor => 0.9,
quadruped_low::Species::Salamander => 0.7,
quadruped_low::Species::Monitor => 0.7,
quadruped_low::Species::Asp => 0.9,
quadruped_low::Species::Pangolin => 0.6,
_ => 1.0,
quadruped_low::Species::Pangolin => 0.4,
_ => 0.6,
},
Body::BirdMedium(_) => 1.0,
Body::BirdMedium(_) => 0.5,
Body::BirdSmall(_) => 0.4,
Body::FishMedium(_) => 0.15,
Body::FishSmall(_) => 0.0,

@ -173,7 +173,12 @@ impl Body {
quadruped_low::Species::Pangolin => 1.3,
_ => 1.6,
},
Body::Theropod(_) => 0.3,
Body::Theropod(body) => match body.species {
theropod::Species::Snowraptor => 0.5,
theropod::Species::Sandraptor => 0.5,
theropod::Species::Woodraptor => 0.5,
_ => 0.9,
},
Body::BirdMedium(_) => 0.35,
Body::FishMedium(_) => 0.35,
Body::Dragon(_) => 8.0,
@ -312,7 +317,11 @@ impl Body {
},
Body::Object(_) => 10000,
Body::Golem(_) => 2740,
Body::Theropod(_) => 1000,
Body::Theropod(theropod) => match theropod.species {
theropod::Species::Archaeos => 3000,
theropod::Species::Odonto => 2700,
_ => 1100,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Crocodile => 600,
quadruped_low::Species::Alligator => 600,
@ -325,6 +334,8 @@ impl Body {
quadruped_low::Species::Maneater => 400,
quadruped_low::Species::Sandshark => 600,
quadruped_low::Species::Hakulaq => 400,
quadruped_low::Species::Lavadrake => 900,
_ => 200,
},
}
@ -481,6 +492,7 @@ impl Body {
quadruped_low::Species::Maneater => 14,
quadruped_low::Species::Sandshark => 12,
quadruped_low::Species::Hakulaq => 10,
quadruped_low::Species::Lavadrake => 20,
_ => 10,
},
}
@ -512,6 +524,7 @@ impl Body {
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,
},
@ -558,11 +571,15 @@ impl Body {
},
Body::Object(_) => 0,
Body::Golem(_) => 250,
Body::Theropod(_) => 10,
Body::Theropod(theropod) => match theropod.species {
theropod::Species::Archaeos => 150,
theropod::Species::Odonto => 130,
_ => 70,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Crocodile => 50,
quadruped_low::Species::Alligator => 50,
quadruped_low::Species::Salamander => 30,
quadruped_low::Species::Salamander => 50,
quadruped_low::Species::Monitor => 30,
quadruped_low::Species::Asp => 35,
quadruped_low::Species::Tortoise => 10,
@ -604,6 +621,8 @@ impl Body {
_ => Vec3::unit_z(),
}
}
pub fn can_strafe(&self) -> bool { matches!(self, Body::Humanoid(_)) }
}
impl Component for Body {

@ -45,6 +45,7 @@ make_case_elim!(
Maneater = 8,
Sandshark = 9,
Hakulaq = 10,
Lavadrake = 11,
}
);
@ -64,6 +65,7 @@ pub struct AllSpecies<SpeciesMeta> {
pub maneater: SpeciesMeta,
pub sandshark: SpeciesMeta,
pub hakulaq: SpeciesMeta,
pub lavadrake: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
@ -83,11 +85,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
Species::Maneater => &self.maneater,
Species::Sandshark => &self.sandshark,
Species::Hakulaq => &self.hakulaq,
Species::Lavadrake => &self.lavadrake,
}
}
}
pub const ALL_SPECIES: [Species; 11] = [
pub const ALL_SPECIES: [Species; 12] = [
Species::Crocodile,
Species::Alligator,
Species::Salamander,
@ -99,6 +102,7 @@ pub const ALL_SPECIES: [Species; 11] = [
Species::Maneater,
Species::Sandshark,
Species::Hakulaq,
Species::Lavadrake,
];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {

@ -172,4 +172,17 @@ impl Asset for AbilityMap {
pub enum UniqueKind {
StoneGolemFist,
BeastClaws,
QuadMedQuick,
QuadMedJump,
QuadMedHoof,
QuadMedBasic,
QuadMedCharge,
QuadLowRanged,
QuadLowBreathe,
QuadLowTail,
QuadLowQuick,
QuadLowBasic,
QuadSmallBasic,
TheropodBasic,
TheropodBird,
}

@ -1,7 +1,7 @@
use crate::comp::{
biped_large, golem,
item::{tool::AbilityMap, Item, ItemKind},
Body, CharacterAbility, ItemConfig, Loadout,
quadruped_low, quadruped_medium, theropod, Body, CharacterAbility, ItemConfig, Loadout,
};
use rand::Rng;
@ -103,6 +103,90 @@ impl LoadoutBuilder {
},
_ => {},
},
Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
quadruped_medium::Species::Wolf
| quadruped_medium::Species::Grolgar
| quadruped_medium::Species::Lion
| quadruped_medium::Species::Bonerattler => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadmedquick",
));
},
quadruped_medium::Species::Donkey
| quadruped_medium::Species::Horse
| quadruped_medium::Species::Zebra
| quadruped_medium::Species::Kelpie
| quadruped_medium::Species::Hirdrasil
| quadruped_medium::Species::Deer
| quadruped_medium::Species::Antelope => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadmedhoof",
));
},
quadruped_medium::Species::Saber => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadmedjump",
));
},
quadruped_medium::Species::Tuskram | quadruped_medium::Species::Roshwalr => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadmedcharge",
));
},
_ => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadmedbasic",
));
},
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Maneater | quadruped_low::Species::Asp => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadlowranged",
));
},
quadruped_low::Species::Crocodile
| quadruped_low::Species::Alligator
| quadruped_low::Species::Salamander => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadlowtail",
));
},
quadruped_low::Species::Monitor | quadruped_low::Species::Pangolin => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadlowquick",
));
},
quadruped_low::Species::Lavadrake => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadlowbreathe",
));
},
_ => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadlowbasic",
));
},
},
Body::QuadrupedSmall(_) => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadsmallbasic",
));
},
Body::Theropod(theropod) => match theropod.species {
theropod::Species::Sandraptor
| theropod::Species::Snowraptor
| theropod::Species::Woodraptor => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.theropodbird",
));
},
_ => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.theropodbasic",
));
},
},
Body::BipedLarge(biped_large) => match (biped_large.species, biped_large.body_type)
{
(biped_large::Species::Occultsaurok, _) => {

@ -131,7 +131,7 @@ impl Route {
// Determine whether we're close enough to the next to to consider it completed
let dist_sqrd = pos.xy().distance_squared(closest_tgt.xy());
if dist_sqrd
< traversal_cfg.node_tolerance.powf(2.0) * if be_precise { 0.25 } else { 1.0 }
< traversal_cfg.node_tolerance.powi(2) * if be_precise { 0.25 } else { 1.0 }
&& (((pos.z - closest_tgt.z > 1.2 || (pos.z - closest_tgt.z > -0.2 && traversal_cfg.on_ground))
&& (pos.z - closest_tgt.z < 1.2 || (pos.z - closest_tgt.z < 2.9 && vel.z < -0.05))
&& vel.z <= 0.0
@ -272,7 +272,7 @@ impl Route {
let straight_factor = next_dir
.dot(vel.xy().try_normalized().unwrap_or(next_dir))
.max(0.0)
.powf(2.0);
.powi(2);
let bez = CubicBezier2 {
start: pos.xy(),
@ -347,7 +347,7 @@ impl Chaser {
.map(|e| e.map(|e| e as f32 + 0.5))
.unwrap_or(tgt);
if ((pos - end) * Vec3::new(1.0, 1.0, 2.0)).magnitude_squared()
< traversal_cfg.min_tgt_dist.powf(2.0)
< traversal_cfg.min_tgt_dist.powi(2)
{
self.route = None;
return None;

@ -1,5 +1,5 @@
use crate::{
comp::{beam, CharacterState, EnergyChange, EnergySource, Ori, Pos, StateUpdate},
comp::{beam, Body, CharacterState, EnergyChange, EnergySource, Ori, Pos, StateUpdate},
event::ServerEvent,
states::utils::*,
sync::Uid,
@ -99,8 +99,8 @@ impl CharacterBehavior for Data {
});
// Gets offsets
let body_offsets = Vec3::new(
data.body.radius() * 3.0 * data.inputs.look_dir.x,
data.body.radius() * 3.0 * data.inputs.look_dir.y,
(data.body.radius() + 1.0) * data.inputs.look_dir.x,
(data.body.radius() + 1.0) * data.inputs.look_dir.y,
data.body.eye_height(),
) * 0.55;
// Build up
@ -145,11 +145,22 @@ impl CharacterBehavior for Data {
owner: Some(*data.uid),
};
// Gets offsets
let body_offsets = Vec3::new(
data.body.radius() + 2.0 * data.inputs.look_dir.x,
data.body.radius() + 2.0 * data.inputs.look_dir.y,
data.body.eye_height(),
) * 0.55;
let body_offsets = match data.body {
Body::Humanoid(_) => {
Vec3::new(
data.body.radius() + 2.0 * data.inputs.look_dir.x,
data.body.radius() + 2.0 * data.inputs.look_dir.y,
data.body.eye_height(),
) * 0.55
},
_ => {
Vec3::new(
data.body.radius() * 3.0 * data.inputs.look_dir.x,
data.body.radius() * 3.0 * data.inputs.look_dir.y,
data.body.eye_height(),
) * 0.55
},
};
let pos = Pos(data.pos.0 + body_offsets);
// Create beam segment
update.server_events.push_front(ServerEvent::BeamSegment {

@ -32,6 +32,8 @@ pub struct StaticData {
pub charge_duration: Duration,
/// How long the weapon is swinging for
pub swing_duration: Duration,
/// At what fraction of the swing duration to apply the melee "hit"
pub hit_timing: f32,
/// How long the state has until exiting
pub recover_duration: Duration,
/// What key is used to press ability
@ -130,7 +132,20 @@ impl CharacterBehavior for Data {
}
},
StageSection::Swing => {
if !self.exhausted {
if self.timer.as_millis() as f32
> self.static_data.hit_timing
* self.static_data.swing_duration.as_millis() as f32
&& !self.exhausted
{
// Swing
update.character = CharacterState::ChargedMelee(Data {
timer: self
.timer
.checked_add(Duration::from_secs_f32(data.dt.0))
.unwrap_or_default(),
exhausted: true,
..*self
});
let mut damage = Damage {
source: DamageSource::Melee,
value: self.static_data.max_damage as f32,
@ -152,16 +167,6 @@ impl CharacterBehavior for Data {
hit_count: 0,
knockback: Knockback::Away(knockback),
});
// Starts swinging
update.character = CharacterState::ChargedMelee(Data {
timer: self
.timer
.checked_add(Duration::from_secs_f32(data.dt.0))
.unwrap_or_default(),
exhausted: true,
..*self
});
} else if self.timer < self.static_data.swing_duration {
// Swings
update.character = CharacterState::ChargedMelee(Data {

@ -44,7 +44,7 @@ impl CharacterBehavior for Data {
// Move player
update.vel.0 += Vec2::broadcast(data.dt.0)
* data.inputs.move_dir
* if update.vel.0.magnitude_squared() < CLIMB_SPEED.powf(2.0) {
* if update.vel.0.magnitude_squared() < CLIMB_SPEED.powi(2) {
HUMANOID_CLIMB_ACCEL
} else {
0.0

@ -41,7 +41,7 @@ impl CharacterBehavior for Data {
// Move player according to movement direction vector
update.vel.0 += Vec2::broadcast(data.dt.0)
* data.inputs.move_dir
* if data.vel.0.magnitude_squared() < GLIDE_SPEED.powf(2.0) {
* if data.vel.0.magnitude_squared() < GLIDE_SPEED.powi(2) {
GLIDE_ACCEL
} else {
0.0
@ -52,10 +52,10 @@ impl CharacterBehavior for Data {
update.ori.0 = Dir::slerp_to_vec3(update.ori.0, ori_dir.into(), 2.0 * data.dt.0);
// Apply Glide antigrav lift
if Vec2::<f32>::from(update.vel.0).magnitude_squared() < GLIDE_SPEED.powf(2.0)
if Vec2::<f32>::from(update.vel.0).magnitude_squared() < GLIDE_SPEED.powi(2)
&& update.vel.0.z < 0.0
{
let lift = GLIDE_ANTIGRAV + update.vel.0.z.abs().powf(2.0) * 0.15;
let lift = GLIDE_ANTIGRAV + update.vel.0.z.abs().powi(2) * 0.15;
update.vel.0.z += data.dt.0
* lift
* (Vec2::<f32>::from(update.vel.0).magnitude() * 0.075)

@ -1,7 +1,7 @@
use crate::{
comp::{
item::{Hands, ItemKind, Tool},
Body, CharacterState, StateUpdate,
quadruped_low, quadruped_medium, theropod, Body, CharacterState, StateUpdate,
},
event::LocalEvent,
states::*,
@ -38,7 +38,28 @@ impl Body {
match self {
Body::Humanoid(_) => 100.0,
Body::QuadrupedSmall(_) => 125.0,
Body::QuadrupedMedium(_) => 180.0,
Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
quadruped_medium::Species::Grolgar => 110.0,
quadruped_medium::Species::Saber => 180.0,
quadruped_medium::Species::Tiger => 150.0,
quadruped_medium::Species::Tuskram => 160.0,
quadruped_medium::Species::Lion => 170.0,
quadruped_medium::Species::Tarasque => 100.0,
quadruped_medium::Species::Wolf => 180.0,
quadruped_medium::Species::Frostfang => 180.0,
quadruped_medium::Species::Mouflon => 100.0,
quadruped_medium::Species::Catoblepas => 70.0,
quadruped_medium::Species::Bonerattler => 130.0,
quadruped_medium::Species::Deer => 150.0,
quadruped_medium::Species::Hirdrasil => 160.0,
quadruped_medium::Species::Roshwalr => 160.0,
quadruped_medium::Species::Donkey => 110.0,
quadruped_medium::Species::Camel => 75.0,
quadruped_medium::Species::Zebra => 150.0,
quadruped_medium::Species::Antelope => 185.0,
quadruped_medium::Species::Kelpie => 180.0,
quadruped_medium::Species::Horse => 180.0,
},
Body::BirdMedium(_) => 80.0,
Body::FishMedium(_) => 50.0,
Body::Dragon(_) => 250.0,
@ -48,7 +69,20 @@ impl Body {
Body::Object(_) => 40.0,
Body::Golem(_) => 60.0,
Body::Theropod(_) => 135.0,
Body::QuadrupedLow(_) => 120.0,
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Crocodile => 130.0,
quadruped_low::Species::Alligator => 110.0,
quadruped_low::Species::Salamander => 85.0,
quadruped_low::Species::Monitor => 160.0,
quadruped_low::Species::Asp => 130.0,
quadruped_low::Species::Tortoise => 60.0,
quadruped_low::Species::Rocksnapper => 70.0,
quadruped_low::Species::Pangolin => 120.0,
quadruped_low::Species::Maneater => 80.0,
quadruped_low::Species::Sandshark => 160.0,
quadruped_low::Species::Hakulaq => 140.0,
quadruped_low::Species::Lavadrake => 100.0,
},
}
}
@ -60,13 +94,13 @@ impl Body {
// Note: we assume no air (this is fine, current physics
// uses max(air_drag, ground_drag)).
// Derived via...
// v = (v + dv / 30) * (1 - drag).powf(2) (accel cancels drag)
// => 1 = (1 + (dv / 30) / v) * (1 - drag).powf(2)
// => 1 / (1 - drag).powf(2) = 1 + (dv / 30) / v
// => 1 / (1 - drag).powf(2) - 1 = (dv / 30) / v
// => 1 / (1 / (1 - drag).powf(2) - 1) = v / (dv / 30)
// => (dv / 30) / (1 / (1 - drag).powf(2) - 1) = v
let v = (-self.base_accel() / 30.0) / ((1.0 - FRIC_GROUND).powf(2.0) - 1.0);
// v = (v + dv / 30) * (1 - drag).powi(2) (accel cancels drag)
// => 1 = (1 + (dv / 30) / v) * (1 - drag).powi(2)
// => 1 / (1 - drag).powi(2) = 1 + (dv / 30) / v
// => 1 / (1 - drag).powi(2) - 1 = (dv / 30) / v
// => 1 / (1 / (1 - drag).powi(2) - 1) = v / (dv / 30)
// => (dv / 30) / (1 / (1 - drag).powi(2) - 1) = v
let v = (-self.base_accel() / 30.0) / ((1.0 - FRIC_GROUND).powi(2) - 1.0);
debug_assert!(v >= 0.0, "Speed must be positive!");
v
}
@ -75,7 +109,7 @@ impl Body {
match self {
Body::Humanoid(_) => 20.0,
Body::QuadrupedSmall(_) => 15.0,
Body::QuadrupedMedium(_) => 10.0,
Body::QuadrupedMedium(_) => 8.0,
Body::BirdMedium(_) => 30.0,
Body::FishMedium(_) => 5.0,
Body::Dragon(_) => 5.0,
@ -84,8 +118,20 @@ impl Body {
Body::BipedLarge(_) => 12.0,
Body::Object(_) => 5.0,
Body::Golem(_) => 8.0,
Body::Theropod(_) => 35.0,
Body::QuadrupedLow(_) => 12.0,
Body::Theropod(theropod) => match theropod.species {
theropod::Species::Archaeos => 2.5,
theropod::Species::Odonto => 2.5,
_ => 7.0,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Monitor => 9.0,
quadruped_low::Species::Asp => 8.0,
quadruped_low::Species::Tortoise => 3.0,
quadruped_low::Species::Rocksnapper => 4.0,
quadruped_low::Species::Maneater => 5.0,
quadruped_low::Species::Lavadrake => 4.0,
_ => 6.0,
},
}
}
@ -166,7 +212,7 @@ pub fn handle_forced_movement(
// Multiply decreasing amount linearly over time (with average of 1)
* 2.0 * progress
// Apply inputted movement directions with some efficiency
+ (data.inputs.move_dir.try_normalized().unwrap_or_default() + update.vel.0.xy())
+ (data.inputs.look_dir.try_normalized().unwrap_or_default())
.try_normalized()
.unwrap_or_default()
// Multiply by forward leap strength
@ -186,7 +232,9 @@ pub fn handle_forced_movement(
pub fn handle_orientation(data: &JoinData, update: &mut StateUpdate, rate: f32) {
// Set direction based on move direction
let ori_dir = if update.character.is_aimed() {
let ori_dir = if (update.character.is_aimed() && data.body.can_strafe())
|| update.character.is_attack()
{
data.inputs.look_dir.xy()
} else if !data.inputs.move_dir.is_approx_zero() {
data.inputs.move_dir
@ -203,7 +251,7 @@ fn swim_move(data: &JoinData, update: &mut StateUpdate, efficiency: f32, depth:
// Update velocity
update.vel.0 += Vec2::broadcast(data.dt.0)
* data.inputs.move_dir
* if update.vel.0.magnitude_squared() < BASE_HUMANOID_WATER_SPEED.powf(2.0) {
* if update.vel.0.magnitude_squared() < BASE_HUMANOID_WATER_SPEED.powi(2) {
BASE_HUMANOID_WATER_ACCEL
} else {
0.0
@ -220,7 +268,7 @@ fn swim_move(data: &JoinData, update: &mut StateUpdate, efficiency: f32, depth:
* data
.inputs
.move_z
.clamped(-1.0, depth.clamped(0.0, 1.0).powf(3.0)))
.clamped(-1.0, depth.clamped(0.0, 1.0).powi(3)))
.min(BASE_HUMANOID_WATER_SPEED);
}
@ -417,7 +465,7 @@ pub fn handle_ability3_input(data: &JoinData, update: &mut StateUpdate) {
/// Checks that player can perform a dodge, then
/// attempts to go into `loadout.active_item.dodge_ability`
pub fn handle_dodge_input(data: &JoinData, update: &mut StateUpdate) {
if data.inputs.roll.is_pressed() {
if data.inputs.roll.is_pressed() && data.body.is_humanoid() {
if let Some(ability) = data
.loadout
.active_item

File diff suppressed because it is too large Load Diff

@ -115,7 +115,7 @@ impl<'a> System<'a> for Sys {
// Have to account for Calc I differential equations due to acceleration
energy.change_by(EnergyChange {
amount: (energy.regen_rate * dt.0
+ ENERGY_REGEN_ACCEL * dt.0.powf(2.0) / 2.0)
+ ENERGY_REGEN_ACCEL * dt.0.powi(2) / 2.0)
as i32,
source: EnergySource::Regen,
});

@ -286,8 +286,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv
)
.join()
.filter(|(_, wild_pos, _)| {
wild_pos.0.distance_squared(pos.0)
< 5.0f32.powf(2.0)
wild_pos.0.distance_squared(pos.0) < 5.0f32.powi(2)
})
.filter(|(_, _, alignment)| {
alignment == &&comp::Alignment::Wild

@ -32,7 +32,7 @@ impl Entity {
}
pub fn get_level(&self) -> u32 {
(self.rng(PERM_LEVEL).gen::<f32>().powf(2.0) * 15.0).ceil() as u32
(self.rng(PERM_LEVEL).gen::<f32>().powi(2) * 15.0).ceil() as u32
}
pub fn get_loadout(&self, ability_map: &AbilityMap) -> comp::Loadout {

@ -352,7 +352,7 @@ impl<'a> System<'a> for Sys {
pos.zip_with(presence, |pos, presence| {
pos.0.xy().distance_squared(o_pos.xy())
< (presence.view_distance as f32 * TerrainChunkSize::RECT_SIZE.x as f32)
.powf(2.0)
.powi(2)
})
};

@ -37,19 +37,17 @@ impl Animation for AlphaAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
let foot = (((1.0)
/ (0.2
+ 0.8
* ((anim_time as f32 * lab as f32 * 2.0 * velocity).sin()).powf(2.0 as f32)))
/ (0.2 + 0.8 * ((anim_time as f32 * lab as f32 * 2.0 * velocity).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 2.0 * velocity).sin());
let slowersmooth = (anim_time as f32 * lab as f32 * 4.0).sin();
let slower = (((1.0)
/ (0.0001 + 0.999 * ((anim_time as f32 * lab as f32 * 4.0).sin()).powf(2.0 as f32)))
/ (0.0001 + 0.999 * ((anim_time as f32 * lab as f32 * 4.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 4.0).sin());

@ -33,7 +33,7 @@ impl Animation for BetaAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};

@ -32,24 +32,21 @@ impl Animation for ChargeAnimation {
let lab = 1.0;
let foot = (((5.0)
/ (0.2 + 4.8 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powf(2.0 as f32)))
.sqrt())
let foot = (((5.0) / (0.2 + 4.8 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 8.0).sin());
let foote = (((5.0)
/ (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 8.0 + 1.57).sin()).powf(2.0 as f32)))
/ (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 8.0 + 1.57).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 8.0).sin());
let stress = (((5.0)
/ (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 20.0).cos()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 20.0).cos());
let quick = (((5.0)
/ (3.5 + 1.5 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powf(2.0 as f32)))
.sqrt())
let stress =
(((5.0) / (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 20.0).cos()).powi(2))).sqrt())
* ((anim_time as f32 * lab as f32 * 20.0).cos());
let quick = (((5.0) / (3.5 + 1.5 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 8.0).sin());
let stop = ((anim_time as f32).powf(0.3 as f32)).min(1.2);
let stopa = ((anim_time as f32).powf(0.9 as f32)).min(5.0);
let stop = ((anim_time as f32).powf(0.3)).min(1.2);
let stopa = ((anim_time as f32).powf(0.9)).min(5.0);
let ori: Vec2<f32> = Vec2::from(orientation);
let last_ori = Vec2::from(last_ori);

@ -40,7 +40,7 @@ impl Animation for DashAnimation {
};
fn short(x: f32) -> f32 {
(((5.0) / (1.5 + 3.5 * ((x * 5.0).sin()).powf(2.0 as f32))).sqrt()) * ((x * 5.0).sin())
(((5.0) / (1.5 + 3.5 * ((x * 5.0).sin()).powi(2))).sqrt()) * ((x * 5.0).sin())
}
fn foothoril(x: f32) -> f32 { (x * 5.0 + PI * 1.45).sin() }
fn foothorir(x: f32) -> f32 { (x * 5.0 + PI * (0.45)).sin() }
@ -49,12 +49,12 @@ impl Animation for DashAnimation {
fn footvertr(x: f32) -> f32 { (x * 5.0 + PI).sin() }
fn footrotl(x: f32) -> f32 {
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 1.4).sin()).powf(2.0 as f32))).sqrt())
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 1.4).sin()).powi(2))).sqrt())
* ((x * 5.0 + PI * 1.4).sin())
}
fn footrotr(x: f32) -> f32 {
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 0.4).sin()).powf(2.0 as f32))).sqrt())
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 0.4).sin()).powi(2))).sqrt())
* ((x * 5.0 + PI * 0.4).sin())
}

@ -47,15 +47,11 @@ impl Animation for RunAnimation {
let lab = 0.65; //.65
let foothoril = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32)))
/ (0.4 + (0.6) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin());
let foothorir = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32)))
/ (0.4 + (0.6) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin());
@ -65,24 +61,20 @@ impl Animation for RunAnimation {
let handhorir = (anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin();
let footrotl = (((5.0)
/ (2.5
+ (2.5)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32)))
/ (2.5 + (2.5) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin());
let footrotr = (((5.0)
/ (1.0
+ (4.0)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32)))
/ (1.0 + (4.0) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin());
let amplitude = (speed / 21.0).max(0.25);
let amplitude2 = (speed * 1.4 / 21.0).powf(0.5).max(0.6);
let amplitude3 = (speed / 21.0).powf(0.5).max(0.35);
let amplitude2 = (speed * 1.4 / 21.0).sqrt().max(0.6);
let amplitude3 = (speed / 21.0).sqrt().max(0.35);
let speedmult = 1.0;
let canceler = (speed / 21.0).powf(0.5);
let canceler = (speed / 21.0).sqrt();
let short = (anim_time as f32 * (16.0) * lab as f32 * speedmult + PI * -0.15).sin();
//

@ -126,7 +126,7 @@ impl Animation for ShootAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
next.main.position = Vec3::new(0.0, 0.0, 0.0);

@ -35,12 +35,12 @@ impl Animation for SpinAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(1.8), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
let foot = (((5.0)
/ (1.1 + 3.9 * ((anim_time as f32 * lab as f32 * 10.32).sin()).powf(2.0 as f32)))
/ (1.1 + 3.9 * ((anim_time as f32 * lab as f32 * 10.32).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 10.32).sin());

@ -52,7 +52,7 @@ impl Animation for SpinMeleeAnimation {
};
let spin = if anim_time < 1.1 && velocity.z.abs() < 0.1 {
0.5 * ((anim_time as f32).powf(2.0))
0.5 * ((anim_time as f32).powi(2))
} else {
lab as f32 * anim_time as f32 * 0.9
};

@ -75,15 +75,11 @@ impl Animation for WieldAnimation {
};
let foothoril = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32)))
/ (0.4 + (0.6) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin());
let foothorir = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32)))
/ (0.4 + (0.6) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin());
@ -93,16 +89,12 @@ impl Animation for WieldAnimation {
let handhorir = (anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin();
let footrotl = (((5.0)
/ (2.5
+ (2.5)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32)))
/ (2.5 + (2.5) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin());
let footrotr = (((5.0)
/ (1.0
+ (4.0)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32)))
/ (1.0 + (4.0) * ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin());

@ -37,23 +37,20 @@ impl Animation for AlphaAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
let foot = (((1.0)
/ (0.2
+ 0.8
* ((anim_time as f32 * lab as f32 * 2.0 * velocity).sin()).powf(2.0 as f32)))
/ (0.2 + 0.8 * ((anim_time as f32 * lab as f32 * 2.0 * velocity).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 2.0 * velocity).sin());
let push = anim_time as f32 * lab as f32 * 4.0;
let slow = (((5.0)
/ (0.4 + 4.6 * ((anim_time as f32 * lab as f32 * 9.0).sin()).powf(2.0 as f32)))
.sqrt())
let slow = (((5.0) / (0.4 + 4.6 * ((anim_time as f32 * lab as f32 * 9.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 9.0).sin());
let slower = (((1.0)
/ (0.0001 + 0.999 * ((anim_time as f32 * lab as f32 * 4.0).sin()).powf(2.0 as f32)))
/ (0.0001 + 0.999 * ((anim_time as f32 * lab as f32 * 4.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 4.0).sin());
@ -116,7 +113,7 @@ impl Animation for AlphaAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
next.control.position = Vec3::new(
@ -148,7 +145,7 @@ impl Animation for AlphaAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
next.main.position = Vec3::new(0.0, 0.0, 0.0);

@ -33,7 +33,7 @@ impl Animation for BetaAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};

@ -36,24 +36,21 @@ impl Animation for ChargeAnimation {
let lab = 1.0;
let foot = (((5.0)
/ (0.2 + 4.8 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powf(2.0 as f32)))
.sqrt())
let foot = (((5.0) / (0.2 + 4.8 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 8.0).sin());
let foote = (((5.0)
/ (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 8.0 + 1.57).sin()).powf(2.0 as f32)))
/ (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 8.0 + 1.57).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 8.0).sin());
let stress = (((5.0)
/ (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 20.0).cos()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 20.0).cos());
let quick = (((5.0)
/ (3.5 + 1.5 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powf(2.0 as f32)))
.sqrt())
let stress =
(((5.0) / (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 20.0).cos()).powi(2))).sqrt())
* ((anim_time as f32 * lab as f32 * 20.0).cos());
let quick = (((5.0) / (3.5 + 1.5 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 8.0).sin());
let stop = ((anim_time as f32).powf(0.3 as f32)).min(1.2);
let stopa = ((anim_time as f32).powf(0.9 as f32)).min(5.0);
let stop = ((anim_time as f32).powf(0.3)).min(1.2);
let stopa = ((anim_time as f32).powf(0.9)).min(5.0);
let ori: Vec2<f32> = Vec2::from(orientation);
let last_ori = Vec2::from(last_ori);

@ -32,9 +32,8 @@ impl Animation for ChargeswingAnimation {
let lab = 1.0;
let short = (((5.0)
/ (1.5 + 3.5 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powf(2.0 as f32)))
.sqrt())
let short = (((5.0) / (1.5 + 3.5 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 8.0).sin());
// end spin stuff
@ -46,7 +45,7 @@ impl Animation for ChargeswingAnimation {
(anim_time as f32 * 18.0 * lab as f32).sin(),
),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4), 0.0),
_ => (0.0, 0.0, 0.0, 0.0),
};
if let Some(ToolKind::Hammer) = active_tool_kind {

@ -39,14 +39,11 @@ impl Animation for ClimbAnimation {
let dropa = (anim_time as f32 * constant as f32 * 4.0).sin();
let quick = (((5.0)
/ (0.6 + 4.0 * ((anim_time as f32 * constant as f32 * 1.5).sin()).powf(2.0 as f32)))
/ (0.6 + 4.0 * ((anim_time as f32 * constant as f32 * 1.5).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * constant as f32 * 1.5).sin());
let quicka = (((5.0)
/ (0.6
+ 4.0
* ((anim_time as f32 * constant as f32 * 1.5 + PI / 2.0).sin())
.powf(2.0 as f32)))
/ (0.6 + 4.0 * ((anim_time as f32 * constant as f32 * 1.5 + PI / 2.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * constant as f32 * 1.5 + PI / 2.0).sin());
let head_look = Vec2::new(

@ -27,9 +27,8 @@ impl Animation for DanceAnimation {
*rate = 1.0;
let lab = 1.0;
let short = (((5.0)
/ (3.0 + 2.0 * ((anim_time as f32 * lab as f32 * 6.0).sin()).powf(2.0 as f32)))
.sqrt())
let short = (((5.0) / (3.0 + 2.0 * ((anim_time as f32 * lab as f32 * 6.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 6.0).sin());
let noisea = (anim_time as f32 * 11.0 + PI / 6.0).sin();
let noiseb = (anim_time as f32 * 19.0 + PI / 4.0).sin();
@ -39,7 +38,7 @@ impl Animation for DanceAnimation {
let shortealt = (anim_time as f32 * lab as f32 * 6.0 + PI / 2.0).sin();
let foot = (((5.0)
/ (1.0 + (4.0) * ((anim_time as f32 * lab as f32 * 8.0).sin()).powf(2.0 as f32)))
/ (1.0 + (4.0) * ((anim_time as f32 * lab as f32 * 8.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 8.0).sin());

@ -35,17 +35,16 @@ impl Animation for DashAnimation {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Charge) => (1.0, anim_time as f32, 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.1, 1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.1, 1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0, 0.0),
};
fn slow(x: f32) -> f32 {
(((5.0) / (1.1 + 3.9 * ((x * 12.4).sin()).powf(2.0 as f32))).sqrt())
* ((x * 12.4).sin())
(((5.0) / (1.1 + 3.9 * ((x * 12.4).sin()).powi(2))).sqrt()) * ((x * 12.4).sin())
}
fn short(x: f32) -> f32 {
(((5.0) / (1.5 + 3.5 * ((x * 5.0).sin()).powf(2.0 as f32))).sqrt()) * ((x * 5.0).sin())
(((5.0) / (1.5 + 3.5 * ((x * 5.0).sin()).powi(2))).sqrt()) * ((x * 5.0).sin())
}
fn foothoril(x: f32) -> f32 { (x * 5.0 + PI * 1.45).sin() }
fn foothorir(x: f32) -> f32 { (x * 5.0 + PI * (0.45)).sin() }
@ -54,12 +53,12 @@ impl Animation for DashAnimation {
fn footvertr(x: f32) -> f32 { (x * 5.0 + PI).sin() }
fn footrotl(x: f32) -> f32 {
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 1.4).sin()).powf(2.0 as f32))).sqrt())
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 1.4).sin()).powi(2))).sqrt())
* ((x * 5.0 + PI * 1.4).sin())
}
fn footrotr(x: f32) -> f32 {
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 0.4).sin()).powf(2.0 as f32))).sqrt())
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 0.4).sin()).powi(2))).sqrt())
* ((x * 5.0 + PI * 0.4).sin())
}

@ -53,30 +53,26 @@ impl Animation for RunAnimation {
let footrotl = (((1.0)
/ (0.5
+ (0.5)
* ((anim_time as f32 * 16.0 * walk * lab as f32 + PI * 1.4).sin())
.powf(2.0 as f32)))
* ((anim_time as f32 * 16.0 * walk * lab as f32 + PI * 1.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * walk * lab as f32 + PI * 1.4).sin());
let footrotr = (((1.0)
/ (0.5
+ (0.5)
* ((anim_time as f32 * 16.0 * walk * lab as f32 + PI * 0.4).sin())
.powf(2.0 as f32)))
* ((anim_time as f32 * 16.0 * walk * lab as f32 + PI * 0.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 16.0 * walk * lab as f32 + PI * 0.4).sin());
let short = (((5.0)
/ (1.5
+ 3.5 * ((anim_time as f32 * lab as f32 * 16.0 * walk).sin()).powf(2.0 as f32)))
/ (1.5 + 3.5 * ((anim_time as f32 * lab as f32 * 16.0 * walk).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 16.0 * walk).sin());
let noisea = (anim_time as f32 * 11.0 + PI / 6.0).sin();
let noiseb = (anim_time as f32 * 19.0 + PI / 4.0).sin();
let shorte = (((5.0)
/ (4.0
+ 1.0 * ((anim_time as f32 * lab as f32 * 16.0 * walk).sin()).powf(2.0 as f32)))
/ (4.0 + 1.0 * ((anim_time as f32 * lab as f32 * 16.0 * walk).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 16.0 * walk).sin());

@ -118,7 +118,7 @@ impl Animation for ShootAnimation {
let (_movement1, movement2, _movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
next.main.position = Vec3::new(0.0, 0.0, 0.0);

@ -39,16 +39,12 @@ impl Animation for SneakAnimation {
let footvertr = (anim_time as f32 * 7.0 * lab as f32 + PI).sin();
let footrotl = (((5.0)
/ (2.5
+ (2.5)
* ((anim_time as f32 * 7.0 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32)))
/ (2.5 + (2.5) * ((anim_time as f32 * 7.0 * lab as f32 + PI * 1.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 7.0 * lab as f32 + PI * 1.4).sin());
let footrotr = (((5.0)
/ (1.0
+ (4.0)
* ((anim_time as f32 * 7.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32)))
/ (1.0 + (4.0) * ((anim_time as f32 * 7.0 * lab as f32 + PI * 0.4).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * 7.0 * lab as f32 + PI * 0.4).sin());
@ -56,10 +52,9 @@ impl Animation for SneakAnimation {
let noisea = (anim_time as f32 * 11.0 + PI / 6.0).sin();
let noiseb = (anim_time as f32 * 19.0 + PI / 4.0).sin();
let shorte = (((5.0)
/ (4.0 + 1.0 * ((anim_time as f32 * lab as f32 * 7.0).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 7.0).sin());
let shorte =
(((5.0) / (4.0 + 1.0 * ((anim_time as f32 * lab as f32 * 7.0).sin()).powi(2))).sqrt())
* ((anim_time as f32 * lab as f32 * 7.0).sin());
let shortalt = (anim_time as f32 * lab as f32 * 7.0 + PI / 2.0).sin();

@ -35,12 +35,12 @@ impl Animation for SpinAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(1.8), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
let foot = (((5.0)
/ (1.1 + 3.9 * ((anim_time as f32 * lab as f32 * 10.32).sin()).powf(2.0 as f32)))
/ (1.1 + 3.9 * ((anim_time as f32 * lab as f32 * 10.32).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 10.32).sin());
@ -110,7 +110,7 @@ impl Animation for SpinAnimation {
let (movement1, movement2, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
@ -156,7 +156,7 @@ impl Animation for SpinAnimation {
* (1.0 - movement3),
);
next.torso.orientation = Quaternion::rotation_z(
movement1.powf(2.0) * -6.0 + movement2 * -1.7 + movement3 * 1.4,
movement1.powi(2) * -6.0 + movement2 * -1.7 + movement3 * 1.4,
);
next.foot_l.position = Vec3::new(

@ -52,7 +52,7 @@ impl Animation for SpinMeleeAnimation {
};
let spin = if anim_time < 1.1 && velocity.z.abs() < 0.1 {
0.5 * ((anim_time as f32).powf(2.0))
0.5 * ((anim_time as f32).powi(2))
} else {
lab as f32 * anim_time as f32 * 0.9
};

Some files were not shown because too many files have changed in this diff Show More