mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Balance tweaks to staff abilities.
This commit is contained in:
parent
4b2eba71e7
commit
1ba8a6cfb3
@ -190,6 +190,7 @@ pub enum CharacterAbility {
|
||||
shockwave_speed: f32,
|
||||
shockwave_duration: Duration,
|
||||
requires_ground: bool,
|
||||
move_efficiency: f32,
|
||||
},
|
||||
BasicBeam {
|
||||
buildup_duration: Duration,
|
||||
@ -258,10 +259,6 @@ impl CharacterAbility {
|
||||
.energy
|
||||
.try_change_by(-(*energy_cost as i32), EnergySource::Ability)
|
||||
.is_ok(),
|
||||
CharacterAbility::BasicBeam { energy_drain, .. } => update
|
||||
.energy
|
||||
.try_change_by(-(*energy_drain as i32), EnergySource::Ability)
|
||||
.is_ok(),
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
@ -637,6 +634,7 @@ impl From<&CharacterAbility> for CharacterState {
|
||||
shockwave_speed,
|
||||
shockwave_duration,
|
||||
requires_ground,
|
||||
move_efficiency,
|
||||
} => CharacterState::Shockwave(shockwave::Data {
|
||||
static_data: shockwave::StaticData {
|
||||
buildup_duration: *buildup_duration,
|
||||
@ -648,6 +646,7 @@ impl From<&CharacterAbility> for CharacterState {
|
||||
shockwave_speed: *shockwave_speed,
|
||||
shockwave_duration: *shockwave_duration,
|
||||
requires_ground: *requires_ground,
|
||||
move_efficiency: *move_efficiency,
|
||||
},
|
||||
timer: Duration::default(),
|
||||
stage_section: StageSection::Buildup,
|
||||
|
@ -433,9 +433,9 @@ impl Tool {
|
||||
projectile: Projectile {
|
||||
hit_solid: vec![
|
||||
projectile::Effect::Explode(Explosion {
|
||||
radius: 4.0,
|
||||
max_damage: (100.0 * self.base_power()) as u32,
|
||||
min_damage: (10.0 * self.base_power()) as u32,
|
||||
radius: 5.0,
|
||||
max_damage: (80.0 * self.base_power()) as u32,
|
||||
min_damage: (20.0 * self.base_power()) as u32,
|
||||
max_heal: 0,
|
||||
min_heal: 0,
|
||||
terrain_destruction_power: 0.0,
|
||||
@ -445,9 +445,9 @@ impl Tool {
|
||||
],
|
||||
hit_entity: vec![
|
||||
projectile::Effect::Explode(Explosion {
|
||||
radius: 4.0,
|
||||
max_damage: (100.0 * self.base_power()) as u32,
|
||||
min_damage: (10.0 * self.base_power()) as u32,
|
||||
radius: 5.0,
|
||||
max_damage: (80.0 * self.base_power()) as u32,
|
||||
min_damage: (20.0 * self.base_power()) as u32,
|
||||
max_heal: 0,
|
||||
min_heal: 0,
|
||||
terrain_destruction_power: 0.0,
|
||||
@ -474,26 +474,27 @@ impl Tool {
|
||||
beam_duration: Duration::from_millis(500),
|
||||
base_hps: 0,
|
||||
base_dps: (200.0 * self.base_power()) as u32,
|
||||
tick_rate: 2.0,
|
||||
tick_rate: 3.0,
|
||||
range: 15.0,
|
||||
max_angle: 22.5,
|
||||
lifesteal_eff: 0.0,
|
||||
energy_regen: 0,
|
||||
energy_cost: 0,
|
||||
energy_drain: 0,
|
||||
energy_drain: 400,
|
||||
ability_key: AbilityKey::Mouse2,
|
||||
},
|
||||
Shockwave {
|
||||
energy_cost: 0,
|
||||
energy_cost: 600,
|
||||
buildup_duration: Duration::from_millis(400),
|
||||
swing_duration: Duration::from_millis(100),
|
||||
recover_duration: Duration::from_millis(300),
|
||||
damage: (200.0 * self.base_power()) as u32,
|
||||
knockback: 20.0,
|
||||
knockback: 25.0,
|
||||
shockwave_angle: 360.0,
|
||||
shockwave_speed: 20.0,
|
||||
shockwave_duration: Duration::from_millis(500),
|
||||
requires_ground: false,
|
||||
move_efficiency: 0.8,
|
||||
},
|
||||
],
|
||||
Shield(_) => vec![
|
||||
@ -531,6 +532,7 @@ impl Tool {
|
||||
shockwave_speed: 20.0,
|
||||
shockwave_duration: Duration::from_millis(2000),
|
||||
requires_ground: true,
|
||||
move_efficiency: 0.05,
|
||||
},
|
||||
]
|
||||
} else {
|
||||
|
@ -28,6 +28,8 @@ pub struct StaticData {
|
||||
pub shockwave_duration: Duration,
|
||||
/// Whether the shockwave requires the target to be on the ground
|
||||
pub requires_ground: bool,
|
||||
/// Movement speed efficiency
|
||||
pub move_efficiency: f32,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
@ -45,7 +47,7 @@ impl CharacterBehavior for Data {
|
||||
fn behavior(&self, data: &JoinData) -> StateUpdate {
|
||||
let mut update = StateUpdate::from(data);
|
||||
|
||||
handle_move(data, &mut update, 0.05);
|
||||
handle_move(data, &mut update, self.static_data.move_efficiency);
|
||||
|
||||
match self.stage_section {
|
||||
StageSection::Buildup => {
|
||||
|
@ -225,12 +225,13 @@ impl<'a> System<'a> for Sys {
|
||||
shockwave_hit_list.hit_entities.push(*uid_b);
|
||||
}
|
||||
if shockwave.knockback != 0.0 && damage.healthchange != 0.0 {
|
||||
let kb_dir = Dir::new((pos_b.0 - pos.0).try_normalized().unwrap_or(*ori.0));
|
||||
let impulse = if shockwave.knockback < 0.0 {
|
||||
shockwave.knockback
|
||||
* *Dir::slerp(ori.0, Dir::new(Vec3::new(0.0, 0.0, -1.0)), 0.85)
|
||||
* *Dir::slerp(kb_dir, Dir::new(Vec3::new(0.0, 0.0, -1.0)), 0.85)
|
||||
} else {
|
||||
shockwave.knockback
|
||||
* *Dir::slerp(ori.0, Dir::new(Vec3::new(0.0, 0.0, 1.0)), 0.5)
|
||||
* *Dir::slerp(kb_dir, Dir::new(Vec3::new(0.0, 0.0, 1.0)), 0.5)
|
||||
};
|
||||
server_emitter.emit(ServerEvent::Knockback { entity: b, impulse });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user