diff --git a/assets/common/abilities/axe/doublestrike.ron b/assets/common/abilities/axe/doublestrike.ron index 7151798fd1..08f6d33346 100644 --- a/assets/common/abilities/axe/doublestrike.ron +++ b/assets/common/abilities/axe/doublestrike.ron @@ -27,10 +27,10 @@ ComboMelee( forward_movement: 0.25, ), ], - initial_energy_gain: 0, - max_energy_gain: 100, - energy_increase: 20, - speed_increase: 0.05, + initial_energy_gain: 25, + max_energy_gain: 175, + energy_increase: 30, + speed_increase: 0.075, max_speed_increase: 1.6, is_interruptible: false, ) \ No newline at end of file diff --git a/assets/common/abilities/axe/spin.ron b/assets/common/abilities/axe/spin.ron index 8a31ce4361..20b77caa8a 100644 --- a/assets/common/abilities/axe/spin.ron +++ b/assets/common/abilities/axe/spin.ron @@ -1,6 +1,6 @@ SpinMelee( buildup_duration: 100, - swing_duration: 250, + swing_duration: 300, recover_duration: 100, base_damage: 60, knockback: 0.0, diff --git a/assets/common/abilities/bow/basic.ron b/assets/common/abilities/bow/basic.ron index 4747e5a087..9492e92013 100644 --- a/assets/common/abilities/bow/basic.ron +++ b/assets/common/abilities/bow/basic.ron @@ -1,11 +1,11 @@ BasicRanged( energy_cost: 0, - buildup_duration: 200, + buildup_duration: 500, recover_duration: 300, projectile: Arrow( - damage: 40.0, - knockback: 10.0, - energy_regen: 50, + damage: 80.0, + knockback: 5.0, + energy_regen: 100, ), projectile_body: Object(Arrow), projectile_light: None, diff --git a/assets/common/abilities/bow/charged.ron b/assets/common/abilities/bow/charged.ron index 2b52e6804b..f54e499c60 100644 --- a/assets/common/abilities/bow/charged.ron +++ b/assets/common/abilities/bow/charged.ron @@ -1,8 +1,8 @@ ChargedRanged( energy_cost: 1, energy_drain: 300, - initial_damage: 40, - max_damage: 200, + initial_damage: 50, + max_damage: 250, initial_knockback: 10.0, max_knockback: 20.0, speed: 1.0, diff --git a/assets/common/abilities/hammer/singlestrike.ron b/assets/common/abilities/hammer/singlestrike.ron index 1f12ee07ef..75769c5d39 100644 --- a/assets/common/abilities/hammer/singlestrike.ron +++ b/assets/common/abilities/hammer/singlestrike.ron @@ -8,13 +8,13 @@ ComboMelee( range: 4.5, angle: 50.0, base_buildup_duration: 600, - base_swing_duration: 60, + base_swing_duration: 150, base_recover_duration: 300, forward_movement: 0.0, )], - initial_energy_gain: 0, - max_energy_gain: 100, - energy_increase: 20, + initial_energy_gain: 50, + max_energy_gain: 150, + energy_increase: 50, speed_increase: 0.05, max_speed_increase: 1.4, is_interruptible: false, diff --git a/assets/common/abilities/sword/dash.ron b/assets/common/abilities/sword/dash.ron index 94243a76d5..6c167ef5f0 100644 --- a/assets/common/abilities/sword/dash.ron +++ b/assets/common/abilities/sword/dash.ron @@ -1,12 +1,12 @@ DashMelee( - energy_cost: 200, - base_damage: 120, + energy_cost: 100, + base_damage: 80, max_damage: 240, base_knockback: 8.0, max_knockback: 15.0, range: 5.0, angle: 45.0, - energy_drain: 500, + energy_drain: 600, forward_speed: 4.0, buildup_duration: 250, charge_duration: 600, diff --git a/assets/common/abilities/sword/spin.ron b/assets/common/abilities/sword/spin.ron index 94b55b93bc..237bd7fdcc 100644 --- a/assets/common/abilities/sword/spin.ron +++ b/assets/common/abilities/sword/spin.ron @@ -1,11 +1,11 @@ SpinMelee( - buildup_duration: 750, - swing_duration: 500, + buildup_duration: 600, + swing_duration: 400, recover_duration: 500, - base_damage: 140, + base_damage: 160, knockback: 10.0, range: 3.5, - energy_cost: 200, + energy_cost: 150, is_infinite: false, is_helicopter: false, is_interruptible: true, diff --git a/assets/common/abilities/sword/triplestrike.ron b/assets/common/abilities/sword/triplestrike.ron index ffdd3097b8..23bd0864f9 100644 --- a/assets/common/abilities/sword/triplestrike.ron +++ b/assets/common/abilities/sword/triplestrike.ron @@ -41,9 +41,9 @@ ComboMelee( ), ], initial_energy_gain: 0, - max_energy_gain: 100, - energy_increase: 20, - speed_increase: 0.05, + max_energy_gain: 200, + energy_increase: 25, + speed_increase: 0.1, max_speed_increase: 1.8, is_interruptible: true, ) \ No newline at end of file diff --git a/common/src/comp/agent.rs b/common/src/comp/agent.rs index 70df3d16eb..05f4189b1b 100644 --- a/common/src/comp/agent.rs +++ b/common/src/comp/agent.rs @@ -154,11 +154,20 @@ impl Agent { self } - pub fn new(patrol_origin: Option>, can_speak: bool, body: &Body) -> Self { + pub fn new( + patrol_origin: Option>, + can_speak: bool, + body: &Body, + no_flee: bool, + ) -> Self { Agent { patrol_origin, can_speak, - psyche: Psyche::from(body), + psyche: if no_flee { + Psyche { aggro: 1.0 } + } else { + Psyche::from(body) + }, ..Default::default() } } diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index f0efe04035..24dbdad9d6 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -479,7 +479,11 @@ impl Body { }, Body::Object(_) => 1, Body::Golem(_) => 256, - Body::Theropod(_) => 2, + Body::Theropod(theropod) => match theropod.species { + theropod::Species::Archaeos => 90, + theropod::Species::Odonto => 80, + _ => 50, + }, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { quadruped_low::Species::Crocodile => 10, quadruped_low::Species::Alligator => 10, @@ -498,25 +502,6 @@ impl Body { } } - #[allow(unreachable_patterns)] - pub fn base_exp_increase(&self) -> u32 { - match self { - Body::Humanoid(_) => 2, - Body::QuadrupedSmall(_) => 1, - Body::QuadrupedMedium(_) => 1, - Body::BirdMedium(_) => 1, - Body::FishMedium(_) => 1, - Body::Dragon(_) => 32, - Body::BirdSmall(_) => 1, - Body::FishSmall(_) => 1, - Body::BipedLarge(_) => 2, - Body::Object(_) => 0, - Body::Golem(_) => 12, - Body::Theropod(_) => 1, - Body::QuadrupedLow(_) => 1, - } - } - #[allow(unreachable_patterns)] pub fn base_dmg(&self) -> u32 { match self { diff --git a/common/src/states/dash_melee.rs b/common/src/states/dash_melee.rs index b62854e2a4..e150fa72b3 100644 --- a/common/src/states/dash_melee.rs +++ b/common/src/states/dash_melee.rs @@ -105,11 +105,15 @@ impl CharacterBehavior for Data { && update.energy.current() > 0 { // Forward movement + let charge_frac = (self.timer.as_secs_f32() + / self.static_data.charge_duration.as_secs_f32()) + .min(1.0); + handle_forced_movement( data, &mut update, ForcedMovement::Forward { - strength: self.static_data.forward_speed, + strength: self.static_data.forward_speed * charge_frac.sqrt(), }, 0.1, ); @@ -119,9 +123,6 @@ impl CharacterBehavior for Data { if !self.exhausted { // Hit attempt (also checks if player is moving) if update.vel.0.distance_squared(Vec3::zero()) > 1.0 { - let charge_frac = (self.timer.as_secs_f32() - / self.static_data.charge_duration.as_secs_f32()) - .min(1.0); let mut damage = Damage { source: DamageSource::Melee, value: self.static_data.max_damage as f32, diff --git a/common/src/states/spin_melee.rs b/common/src/states/spin_melee.rs index ebc1b8bb40..c18419e291 100644 --- a/common/src/states/spin_melee.rs +++ b/common/src/states/spin_melee.rs @@ -62,13 +62,8 @@ impl CharacterBehavior for Data { let mut update = StateUpdate::from(data); if self.static_data.is_helicopter { - let delta_vel_z = if update.vel.0.z > 0.0 && update.vel.0.z <= 1.0 { - GRAVITY * data.dt.0 - } else { - 0.0 - }; - update.vel.0 = - Vec3::new(0.0, 0.0, update.vel.0.z + delta_vel_z) + data.inputs.move_dir * 5.0; + let new_vel_z = update.vel.0.z + GRAVITY * data.dt.0 * 0.5; + update.vel.0 = Vec3::new(0.0, 0.0, new_vel_z) + data.inputs.move_dir * 5.0; } if !ability_key_is_pressed(data, self.static_data.ability_key) { diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 2dfdf20f3f..878997eb8e 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -260,9 +260,8 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc const MAX_EXP_DIST: f32 = 150.0; // Attacker gets same as exp of everyone else const ATTACKER_EXP_WEIGHT: f32 = 1.0; - let mut exp_reward = (entity_stats.body_type.base_exp() - + entity_stats.level.level() * entity_stats.body_type.base_exp_increase()) - as f32; + let mut exp_reward = entity_stats.body_type.base_exp() as f32 + * (1.0 + entity_stats.level.level() as f32 * 0.1); // Distribute EXP to group let positions = state.ecs().read_storage::(); diff --git a/server/src/rtsim/tick.rs b/server/src/rtsim/tick.rs index 5a830de70c..6f749ec7c5 100644 --- a/server/src/rtsim/tick.rs +++ b/server/src/rtsim/tick.rs @@ -103,7 +103,7 @@ impl<'a> System<'a> for Sys { health: comp::Health::new(body, 10), loadout: entity.get_loadout(&ability_map), body, - agent: Some(comp::Agent::new(None, true, &body)), + agent: Some(comp::Agent::new(None, true, &body, false)), alignment: comp::Alignment::Npc, scale: comp::Scale(1.0), drop_item: None, diff --git a/server/src/sys/terrain.rs b/server/src/sys/terrain.rs index ce50bc7e0a..883f769272 100644 --- a/server/src/sys/terrain.rs +++ b/server/src/sys/terrain.rs @@ -189,7 +189,12 @@ impl<'a> System<'a> for Sys { health, loadout, agent: if entity.has_agency { - Some(comp::Agent::new(Some(entity.pos), can_speak, &body)) + Some(comp::Agent::new( + Some(entity.pos), + can_speak, + &body, + matches!(config, Some(common::loadout_builder::LoadoutConfig::Guard)), + )) } else { None },