From 1c40218de94d2dfed50845a9f1e20ef3c339b8bf Mon Sep 17 00:00:00 2001 From: Silentium2318 Date: Thu, 2 Jul 2020 23:12:42 -0400 Subject: [PATCH] More weapon and hit box tweaks --- common/src/comp/inventory/item/tool.rs | 20 ++++++++++---------- common/src/loadout_builder.rs | 2 +- common/src/states/dash_melee.rs | 2 +- common/src/states/triple_strike.rs | 10 +++------- server/src/sys/terrain.rs | 6 +++--- 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/common/src/comp/inventory/item/tool.rs b/common/src/comp/inventory/item/tool.rs index 6b322bb31c..401f9925c7 100644 --- a/common/src/comp/inventory/item/tool.rs +++ b/common/src/comp/inventory/item/tool.rs @@ -142,7 +142,7 @@ impl Tool { recover_duration: Duration::from_millis(300), base_healthchange: (-120.0 * self.base_power()) as i32, range: 3.5, - max_angle: 60.0, + max_angle: 20.0, }, LeapMelee { energy_cost: 800, @@ -157,8 +157,8 @@ impl Tool { buildup_duration: Duration::from_millis(700), recover_duration: Duration::from_millis(150), base_healthchange: (-50.0 * self.base_power()) as i32, - range: 3.0, - max_angle: 15.0, + range: 3.5, + max_angle: 20.0, }], Bow(_) => vec![ BasicRanged { @@ -202,7 +202,7 @@ impl Tool { recover_duration: Duration::from_millis(400), base_healthchange: (-50.0 * self.base_power()) as i32, range: 3.5, - max_angle: 60.0, + max_angle: 20.0, }, DashMelee { energy_cost: 700, @@ -219,8 +219,8 @@ impl Tool { buildup_duration: Duration::from_millis(0), recover_duration: Duration::from_millis(300), base_healthchange: (-10.0 * self.base_power()) as i32, - range: 10.0, - max_angle: 45.0, + range: 5.0, + max_angle: 20.0, }, BasicMelee { energy_cost: 350, @@ -238,8 +238,8 @@ impl Tool { buildup_duration: Duration::from_millis(100), recover_duration: Duration::from_millis(300), base_healthchange: (-40.0 * self.base_power()) as i32, - range: 10.0, - max_angle: 45.0, + range: 3.5, + max_angle: 20.0, }, BasicRanged { energy_cost: 0, @@ -348,8 +348,8 @@ impl Tool { buildup_duration: Duration::from_millis(0), recover_duration: Duration::from_millis(1000), base_healthchange: -20, - range: 5.0, - max_angle: 60.0, + range: 3.5, + max_angle: 15.0, }], } } diff --git a/common/src/loadout_builder.rs b/common/src/loadout_builder.rs index 0fc3983039..441b493cd8 100644 --- a/common/src/loadout_builder.rs +++ b/common/src/loadout_builder.rs @@ -73,7 +73,7 @@ impl LoadoutBuilder { recover_duration: Duration::from_millis(100), base_healthchange: -(body.base_dmg() as i32), range: body.base_range(), - max_angle: 80.0, + max_angle: 20.0, }), ability2: None, ability3: None, diff --git a/common/src/states/dash_melee.rs b/common/src/states/dash_melee.rs index d452bfb059..b330a35232 100644 --- a/common/src/states/dash_melee.rs +++ b/common/src/states/dash_melee.rs @@ -57,7 +57,7 @@ impl CharacterBehavior for Data { data.updater.insert(data.entity, Attacking { base_healthchange: -(self.base_damage as i32), range: 3.5, - max_angle: 180_f32.to_radians(), + max_angle: 45_f32.to_radians(), applied: false, hit_count: 0, knockback: 0.0, diff --git a/common/src/states/triple_strike.rs b/common/src/states/triple_strike.rs index b3c5df51ae..42cad17188 100644 --- a/common/src/states/triple_strike.rs +++ b/common/src/states/triple_strike.rs @@ -121,11 +121,7 @@ impl CharacterBehavior for Data { // Move player forward while in first third of each stage if update.vel.0.magnitude_squared() < BASE_SPEED.powf(2.0) { update.vel.0 += data.dt.0 - * (if data.physics.on_ground { - Vec3::new(0.0, 0.0, 500.0) // Jump upwards if on ground - } else { - Vec3::one() - } + adjusted_accel * Vec3::from(data.ori.0.xy())); + * ( adjusted_accel * Vec3::from(data.ori.0.xy())); let mag2 = update.vel.0.magnitude_squared(); if mag2 > BASE_SPEED.powf(2.0) { update.vel.0 = update.vel.0.normalized() * BASE_SPEED; @@ -149,10 +145,10 @@ impl CharacterBehavior for Data { data.updater.insert(data.entity, Attacking { base_healthchange: -(dmg as i32), range: 3.5, - max_angle: 180_f32.to_radians(), + max_angle: 45_f32.to_radians(), applied: false, hit_count: 0, - knockback: 16.0, + knockback: 10.0, }); CharacterState::TripleStrike(Data { diff --git a/server/src/sys/terrain.rs b/server/src/sys/terrain.rs index 9d2775e194..e37ceb1847 100644 --- a/server/src/sys/terrain.rs +++ b/server/src/sys/terrain.rs @@ -137,9 +137,9 @@ impl<'a> System<'a> for Sys { energy_cost: 0, buildup_duration: Duration::from_millis(0), recover_duration: Duration::from_millis(400), - base_healthchange: -60, - range: 5.0, - max_angle: 80.0, + base_healthchange: -40, + range: 3.5, + max_angle: 15.0, }), ability2: None, ability3: None,