From 1c99542df9cab5d713aa72738db564247e22907a Mon Sep 17 00:00:00 2001 From: gGmMsS123 <82216659+gGmMsS123@users.noreply.github.com> Date: Fri, 23 Apr 2021 22:16:36 +0300 Subject: [PATCH] Sceptre M2 Revamp --- .../common/abilities/sceptre/targetedheal.ron | 3 +- .../unique/quadlowbeam/healingbeam.ron | 4 +- .../abilities/weapon_ability_manifest.ron | 2 +- assets/voxygen/i18n/en/skills.ron | 2 +- common/src/combat.rs | 10 +- common/src/comp/ability.rs | 88 ++-------- common/src/comp/beam.rs | 1 - common/src/comp/character_state.rs | 5 - common/src/event.rs | 6 +- common/src/states/behavior.rs | 5 +- common/src/states/healing_beam.rs | 163 ------------------ common/src/states/mod.rs | 1 - common/src/states/targeted_effect.rs | 23 ++- common/sys/src/buff.rs | 2 +- common/sys/src/character_behavior.rs | 8 +- common/sys/src/stats.rs | 1 - server/src/events/mod.rs | 2 +- voxygen/src/audio/sfx/mod.rs | 2 +- voxygen/src/render/pipelines/particle.rs | 1 - voxygen/src/scene/figure/mod.rs | 26 --- voxygen/src/scene/particle.rs | 13 -- 21 files changed, 53 insertions(+), 315 deletions(-) delete mode 100644 common/src/states/healing_beam.rs diff --git a/assets/common/abilities/sceptre/targetedheal.ron b/assets/common/abilities/sceptre/targetedheal.ron index 954d5c8ede..19ba1a7842 100644 --- a/assets/common/abilities/sceptre/targetedheal.ron +++ b/assets/common/abilities/sceptre/targetedheal.ron @@ -2,5 +2,6 @@ TargetedEffect( buildup_duration: 0.5, recover_duration: 0.5, max_range: 25.0, - effect: heal: 100.0, + heal: 100.0, + energy_cost:150, ) \ No newline at end of file diff --git a/assets/common/abilities/unique/quadlowbeam/healingbeam.ron b/assets/common/abilities/unique/quadlowbeam/healingbeam.ron index 6776a79944..85d0922038 100644 --- a/assets/common/abilities/unique/quadlowbeam/healingbeam.ron +++ b/assets/common/abilities/unique/quadlowbeam/healingbeam.ron @@ -10,5 +10,5 @@ BasicBeam( energy_regen: 25, energy_drain: 0, orientation_behavior: Normal, - specifier: HealingBeam, -) \ No newline at end of file + specifier: LifestealBeam, +) diff --git a/assets/common/abilities/weapon_ability_manifest.ron b/assets/common/abilities/weapon_ability_manifest.ron index 21a39831a8..33bd80f41b 100644 --- a/assets/common/abilities/weapon_ability_manifest.ron +++ b/assets/common/abilities/weapon_ability_manifest.ron @@ -76,7 +76,7 @@ ), Sceptre: ( primary: "common.abilities.sceptre.lifestealbeam", - secondary: "common.abilities.sceptre.healingbeam", + secondary: "common.abilities.sceptre.targetedheal", abilities: [ (Some(Sceptre(UnlockAura)), "common.abilities.sceptre.wardingaura"), ], diff --git a/assets/voxygen/i18n/en/skills.ron b/assets/voxygen/i18n/en/skills.ron index 496038f3b4..a509ec773a 100644 --- a/assets/voxygen/i18n/en/skills.ron +++ b/assets/voxygen/i18n/en/skills.ron @@ -61,7 +61,7 @@ "hud.skill.sc_heal_cost_title": "Stamina Cost", "hud.skill.sc_heal_cost": "Healing others requires 20% less stamina{SP}", "hud.skill.sc_heal_range_title": "Range", - "hud.skill.sc_heal_range": "Your beam reachs 20% further{SP}", + "hud.skill.sc_heal_range": "The duration is decreased by 15%{SP}", "hud.skill.sc_wardaura_unlock_title": "Warding Aura Unlock", "hud.skill.sc_wardaura_unlock": "Allows you to ward your allies against enemy attacks{SP}", "hud.skill.sc_wardaura_strength_title": "Strength", diff --git a/common/src/combat.rs b/common/src/combat.rs index 6486a40a47..e932de24b2 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -138,7 +138,7 @@ impl Attack { accumulated_damage += applied_damage; emit_outcome(Outcome::Damage { pos: target.pos }); if change.amount != 0 { - emit(ServerEvent::Damage { + emit(ServerEvent::HealthChange { entity: target.entity, change, }); @@ -183,7 +183,7 @@ impl Attack { }, }; if change.amount != 0 { - emit(ServerEvent::Damage { + emit(ServerEvent::HealthChange { entity: attacker_entity, change, }); @@ -208,7 +208,7 @@ impl Attack { }, }; if change.amount != 0 { - emit(ServerEvent::Damage { + emit(ServerEvent::HealthChange { entity: target.entity, change, }); @@ -318,7 +318,7 @@ impl Attack { }, }; if change.amount != 0 { - emit(ServerEvent::Damage { + emit(ServerEvent::HealthChange { entity: attacker_entity, change, }); @@ -343,7 +343,7 @@ impl Attack { }, }; if change.amount != 0 { - emit(ServerEvent::Damage { + emit(ServerEvent::HealthChange { entity: target.entity, change, }); diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index bb7d4a1372..02c3e29edb 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -30,6 +30,7 @@ pub enum CharacterAbilityType { BasicBeam, RepeaterRanged, BasicAura, + } impl From<&CharacterState> for CharacterAbilityType { @@ -48,7 +49,7 @@ impl From<&CharacterState> for CharacterAbilityType { CharacterState::Shockwave(_) => Self::Shockwave, CharacterState::BasicBeam(_) => Self::BasicBeam, CharacterState::RepeaterRanged(_) => Self::RepeaterRanged, - CharacterState::BasicAura(_) => Self::BasicAura, + CharacterState::BasicAura(_) => Self::BasicAura, _ => Self::BasicMelee, } } @@ -241,17 +242,6 @@ pub enum CharacterAbility { range: f32, energy_cost: f32, }, - HealingBeam { - buildup_duration: f32, - recover_duration: f32, - beam_duration: f32, - heal: f32, - tick_rate: f32, - range: f32, - max_angle: f32, - energy_cost: f32, - specifier: beam::FrontendSpecifier, - }, Blink { buildup_duration: f32, recover_duration: f32, @@ -269,6 +259,7 @@ pub enum CharacterAbility { recover_duration: f32, max_range: f32, heal: f32, + energy_cost: f32, }, } @@ -334,8 +325,15 @@ impl CharacterAbility { .try_change_by(-(*energy_cost as i32), EnergySource::Ability) .is_ok() }, - CharacterAbility::HealingBeam { .. } => data.combo.counter() > 0, - _ => true, + CharacterAbility::TargetedEffect { energy_cost, .. } => { + data.combo.counter() > 0 && + update + .energy + .try_change_by(-(*energy_cost as i32), EnergySource::Ability) + .is_ok() + } + + _=> true, } } @@ -538,18 +536,6 @@ impl CharacterAbility { *recover_duration /= speed; aura.strength *= power; }, - HealingBeam { - ref mut buildup_duration, - ref mut recover_duration, - ref mut heal, - ref mut tick_rate, - .. - } => { - *buildup_duration /= speed; - *recover_duration /= speed; - *heal *= power; - *tick_rate *= speed; - }, Blink { ref mut buildup_duration, ref mut recover_duration, @@ -594,7 +580,6 @@ impl CharacterAbility { | ChargedMelee { energy_cost, .. } | ChargedRanged { energy_cost, .. } | Shockwave { energy_cost, .. } - | HealingBeam { energy_cost, .. } | BasicAura { energy_cost, .. } => *energy_cost as u32, BasicBeam { energy_drain, .. } => { if *energy_drain > f32::EPSILON { @@ -1077,26 +1062,6 @@ impl CharacterAbility { *lifesteal *= 1.15_f32.powi(level.into()); } }, - HealingBeam { - ref mut heal, - ref mut energy_cost, - ref mut range, - ref mut beam_duration, - .. - } => { - if let Ok(Some(level)) = skillset.skill_level(Sceptre(HHeal)) { - *heal *= 1.2_f32.powi(level.into()); - } - if let Ok(Some(level)) = skillset.skill_level(Sceptre(HRange)) { - let range_mod = 1.2_f32.powi(level.into()); - *range *= range_mod; - // Duration modified to keep velocity constant - *beam_duration *= range_mod; - } - if let Ok(Some(level)) = skillset.skill_level(Sceptre(HCost)) { - *energy_cost *= 0.8_f32.powi(level.into()); - } - }, BasicAura { ref mut aura, ref mut range, @@ -1581,32 +1546,6 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState { timer: Duration::default(), stage_section: StageSection::Buildup, }), - CharacterAbility::HealingBeam { - buildup_duration, - recover_duration, - beam_duration, - heal, - tick_rate, - range, - max_angle, - energy_cost, - specifier, - } => CharacterState::HealingBeam(healing_beam::Data { - static_data: healing_beam::StaticData { - buildup_duration: Duration::from_secs_f32(*buildup_duration), - recover_duration: Duration::from_secs_f32(*recover_duration), - beam_duration: Duration::from_secs_f32(*beam_duration), - heal: *heal, - tick_rate: *tick_rate, - range: *range, - max_angle: *max_angle, - energy_cost: *energy_cost, - ability_info, - specifier: *specifier, - }, - timer: Duration::default(), - stage_section: StageSection::Buildup, - }), CharacterAbility::Blink { buildup_duration, recover_duration, @@ -1622,6 +1561,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState { stage_section: StageSection::Buildup, }), CharacterAbility::TargetedEffect { + energy_cost, buildup_duration, recover_duration, max_range, heal } => CharacterState::TargetedEffect(targeted_effect::Data { @@ -1630,7 +1570,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState { recover_duration: Duration::from_secs_f32(*recover_duration), max_range: *max_range, ability_info, - heal, + heal: *heal, }, timer: Duration::default(), stage_section: StageSection::Buildup, diff --git a/common/src/comp/beam.rs b/common/src/comp/beam.rs index da888d03d0..38578e84f4 100644 --- a/common/src/comp/beam.rs +++ b/common/src/comp/beam.rs @@ -50,6 +50,5 @@ impl Component for Beam { pub enum FrontendSpecifier { Flamethrower, LifestealBeam, - HealingBeam, Cultist, } diff --git a/common/src/comp/character_state.rs b/common/src/comp/character_state.rs index 80505f9ee2..fb830e5ccf 100644 --- a/common/src/comp/character_state.rs +++ b/common/src/comp/character_state.rs @@ -92,8 +92,6 @@ pub enum CharacterState { /// beam as a large amount of functionality needed to be special cased /// specifically for the healing beam. There was also functionality present /// on basic beam which was unnecessary for the healing beam. - HealingBeam(healing_beam::Data), - /// A short teleport that targets either a position or entity Blink(blink::Data), /// Summons creatures that fight for the caster BasicSummon(basic_summon::Data), @@ -119,7 +117,6 @@ impl CharacterState { | CharacterState::Shockwave(_) | CharacterState::BasicBeam(_) | CharacterState::BasicAura(_) - | CharacterState::HealingBeam(_) ) } @@ -142,7 +139,6 @@ impl CharacterState { | CharacterState::Shockwave(_) | CharacterState::BasicBeam(_) | CharacterState::BasicAura(_) - | CharacterState::HealingBeam(_) ) } @@ -163,7 +159,6 @@ impl CharacterState { | CharacterState::Stunned(_) | CharacterState::Wielding | CharacterState::Talk - | CharacterState::HealingBeam(_) ) } diff --git a/common/src/event.rs b/common/src/event.rs index 7aaccffa6f..b95bf75c89 100644 --- a/common/src/event.rs +++ b/common/src/event.rs @@ -35,16 +35,12 @@ pub enum LocalEvent { #[allow(clippy::large_enum_variant)] // TODO: Pending review in #587 pub enum ServerEvent { - HealthChange { - entity: EcsEntity, - change: comp::HealthChange, - }, Explosion { pos: Vec3, explosion: Explosion, owner: Option, }, - Damage { + HealthChange { entity: EcsEntity, change: comp::HealthChange, }, diff --git a/common/src/states/behavior.rs b/common/src/states/behavior.rs index 0735b01bad..f3058ea874 100644 --- a/common/src/states/behavior.rs +++ b/common/src/states/behavior.rs @@ -5,7 +5,7 @@ use crate::{ InventoryAction, Melee, Ori, PhysicsState, Pos, SkillSet, StateUpdate, Stats, Vel, }, resources::DeltaTime, - uid::Uid, + uid::{Uid, UidAllocator}, }; use specs::{ hibitset, @@ -95,6 +95,7 @@ pub struct JoinData<'a> { pub msm: &'a MaterialStatManifest, pub combo: &'a Combo, pub alignment: Option<&'a comp::Alignment>, + pub uid_allocator: &'a UidAllocator, } type RestrictedMut<'a, C> = PairedStorage< @@ -125,6 +126,7 @@ pub struct JoinStruct<'a> { pub skill_set: &'a SkillSet, pub combo: &'a Combo, pub alignment: Option<&'a comp::Alignment>, + pub uid_allocator: &'a UidAllocator, } impl<'a> JoinData<'a> { @@ -156,6 +158,7 @@ impl<'a> JoinData<'a> { msm, combo: j.combo, alignment: j.alignment, + uid_allocator: j.uid_allocator, } } } diff --git a/common/src/states/healing_beam.rs b/common/src/states/healing_beam.rs deleted file mode 100644 index 23caaded52..0000000000 --- a/common/src/states/healing_beam.rs +++ /dev/null @@ -1,163 +0,0 @@ -use crate::{ - combat::{Attack, AttackEffect, CombatEffect, CombatRequirement, GroupTarget}, - comp::{beam, CharacterState, Ori, Pos, StateUpdate}, - event::ServerEvent, - states::{ - behavior::{CharacterBehavior, JoinData}, - utils::*, - }, - uid::Uid, -}; -use serde::{Deserialize, Serialize}; -use std::time::Duration; -use vek::*; - -/// Separated out to condense update portions of character state -#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct StaticData { - /// How long until state should deal damage or heal - pub buildup_duration: Duration, - /// How long the state has until exiting - pub recover_duration: Duration, - /// How long each beam segment persists for - pub beam_duration: Duration, - /// Base healing per tick - pub heal: f32, - /// Ticks of healing per second - pub tick_rate: f32, - /// Max range - pub range: f32, - /// Max angle (45.0 will give you a 90.0 angle window) - pub max_angle: f32, - /// Energy consumed per second for heal ticks - pub energy_cost: f32, - /// What key is used to press ability - pub ability_info: AbilityInfo, - /// Used to specify the beam to the frontend - pub specifier: beam::FrontendSpecifier, -} - -#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct Data { - /// Struct containing data that does not change over the course of the - /// character state - pub static_data: StaticData, - /// Timer for each stage - pub timer: Duration, - /// What section the character stage is in - pub stage_section: StageSection, -} - -impl CharacterBehavior for Data { - fn behavior(&self, data: &JoinData) -> StateUpdate { - let mut update = StateUpdate::from(data); - - handle_move(data, &mut update, 0.4); - handle_jump(data, &mut update, 1.0); - - match self.stage_section { - StageSection::Buildup => { - if self.timer < self.static_data.buildup_duration { - // Build up - update.character = CharacterState::HealingBeam(Data { - timer: self - .timer - .checked_add(Duration::from_secs_f32(data.dt.0)) - .unwrap_or_default(), - ..*self - }); - } else { - // Creates beam - data.updater.insert(data.entity, beam::Beam { - hit_entities: Vec::::new(), - tick_dur: Duration::from_secs_f32(1.0 / self.static_data.tick_rate), - timer: Duration::default(), - }); - // Build up - update.character = CharacterState::HealingBeam(Data { - timer: Duration::default(), - stage_section: StageSection::Cast, - ..*self - }); - } - }, - StageSection::Cast => { - if input_is_pressed(data, self.static_data.ability_info.input) { - let speed = - self.static_data.range / self.static_data.beam_duration.as_secs_f32(); - let heal = AttackEffect::new( - Some(GroupTarget::InGroup), - CombatEffect::Heal(self.static_data.heal), - ) - .with_requirement(CombatRequirement::Energy(self.static_data.energy_cost)) - .with_requirement(CombatRequirement::Combo(1)); - let attack = Attack::default().with_effect(heal); - - let properties = beam::Properties { - attack, - angle: self.static_data.max_angle.to_radians(), - speed, - duration: self.static_data.beam_duration, - owner: Some(*data.uid), - specifier: self.static_data.specifier, - }; - // Gets offsets - let body_offsets = Vec3::new( - (data.body.radius() + 0.2) * data.inputs.look_dir.x, - (data.body.radius() + 0.2) * data.inputs.look_dir.y, - data.body.eye_height() * 0.6, - ); - let pos = Pos(data.pos.0 + body_offsets); - // Create beam segment - update.server_events.push_front(ServerEvent::BeamSegment { - properties, - pos, - ori: Ori::from(data.inputs.look_dir), - }); - update.character = CharacterState::HealingBeam(Data { - timer: self - .timer - .checked_add(Duration::from_secs_f32(data.dt.0)) - .unwrap_or_default(), - ..*self - }); - } else { - update.character = CharacterState::HealingBeam(Data { - timer: Duration::default(), - stage_section: StageSection::Recover, - ..*self - }); - } - }, - StageSection::Recover => { - if self.timer < self.static_data.recover_duration { - update.character = CharacterState::HealingBeam(Data { - timer: self - .timer - .checked_add(Duration::from_secs_f32(data.dt.0)) - .unwrap_or_default(), - ..*self - }); - } else { - // Done - update.character = CharacterState::Wielding; - // Make sure attack component is removed - data.updater.remove::(data.entity); - } - }, - _ => { - // If it somehow ends up in an incorrect stage section - update.character = CharacterState::Wielding; - // Make sure attack component is removed - data.updater.remove::(data.entity); - }, - } - - // At end of state logic so an interrupt isn't overwritten - if !input_is_pressed(data, self.static_data.ability_info.input) { - handle_state_interrupt(data, &mut update, false); - } - - update - } -} diff --git a/common/src/states/mod.rs b/common/src/states/mod.rs index 31936d689c..e257923658 100644 --- a/common/src/states/mod.rs +++ b/common/src/states/mod.rs @@ -16,7 +16,6 @@ pub mod dash_melee; pub mod equipping; pub mod glide; pub mod glide_wield; -pub mod healing_beam; pub mod idle; pub mod leap_melee; pub mod repeater_ranged; diff --git a/common/src/states/targeted_effect.rs b/common/src/states/targeted_effect.rs index 59f63f9a12..7a7af9ea41 100644 --- a/common/src/states/targeted_effect.rs +++ b/common/src/states/targeted_effect.rs @@ -8,6 +8,7 @@ use crate::{ }; use serde::{Deserialize, Serialize}; use std::time::Duration; +use specs::saveload::MarkerAllocator; /// Separated out to condense update portions of character state #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -16,12 +17,12 @@ pub struct StaticData { pub buildup_duration: Duration, /// How long the state recovers for pub recover_duration: Duration, - /// What the max range of the teleport is + /// What the max range of the heal is pub max_range: f32, /// Miscellaneous information about the ability pub ability_info: AbilityInfo, /// Heal - pub heal: HealthChange, + pub heal: f32, } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -53,12 +54,18 @@ impl CharacterBehavior for Data { // Heals a target if let Some(input_attr) = self.static_data.ability_info.input_attr { if let Some(target) = input_attr.target_entity { - update.server_events.push_front(ServerEvent::HealthChange { - entity: target, - change: HealthChange { - amount: self.static_data.heal as i32, - cause: HealthSource::Heal { by: Some(*data.uid) }, - }}); + if let Some(target) = data.uid_allocator.retrieve_entity_internal(target.into()) { + update.server_events.push_front(ServerEvent::HealthChange { + entity: target, + change: HealthChange { + amount: self.static_data.heal as i32, + cause: HealthSource::Heal { by: Some(*data.uid) }, + }}); + update.server_events.push_front(ServerEvent::ComboChange { + entity: data.entity, + change: -1, + }) + } } } // Transitions to recover section of stage diff --git a/common/sys/src/buff.rs b/common/sys/src/buff.rs index 9d379af810..e29b7d5b9c 100644 --- a/common/sys/src/buff.rs +++ b/common/sys/src/buff.rs @@ -132,7 +132,7 @@ impl<'a> System<'a> for Sys { (health.maximum() as f32 * *accumulated) as i32 }, }; - server_emitter.emit(ServerEvent::Damage { + server_emitter.emit(ServerEvent::HealthChange { entity, change: HealthChange { amount, cause }, }); diff --git a/common/sys/src/character_behavior.rs b/common/sys/src/character_behavior.rs index e8d3c3919d..2742af735e 100644 --- a/common/sys/src/character_behavior.rs +++ b/common/sys/src/character_behavior.rs @@ -20,6 +20,7 @@ use common::{ behavior::{CharacterBehavior, JoinData, JoinStruct}, }, uid::Uid, + uid::UidAllocator, }; use common_ecs::{Job, Origin, Phase, System}; use std::time::Duration; @@ -77,6 +78,7 @@ pub struct ReadData<'a> { msm: Read<'a, MaterialStatManifest>, combos: ReadStorage<'a, Combo>, alignments: ReadStorage<'a, comp::Alignment>, + uid_allocator: Read<'a, UidAllocator>, } /// ## Character Behavior System @@ -265,6 +267,8 @@ impl<'a> System<'a> for Sys { skill_set: &skill_set, combo: &combo, alignment: read_data.alignments.get(entity), + uid_allocator: &read_data.uid_allocator, + }; for action in actions { @@ -311,7 +315,6 @@ impl<'a> System<'a> for Sys { CharacterState::Shockwave(data) => data.handle_event(&j, action), CharacterState::BasicBeam(data) => data.handle_event(&j, action), CharacterState::BasicAura(data) => data.handle_event(&j, action), - CharacterState::HealingBeam(data) => data.handle_event(&j, action), CharacterState::Blink(data) => data.handle_event(&j, action), CharacterState::BasicSummon(data) => data.handle_event(&j, action), CharacterState::TargetedEffect(data) => data.handle_event(&j, action), @@ -319,7 +322,7 @@ impl<'a> System<'a> for Sys { local_emitter.append(&mut state_update.local_events); server_emitter.append(&mut state_update.server_events); incorporate_update(&mut join_struct, state_update); - } + } // Mounted occurs after control actions have been handled // If mounted, character state is controlled by mount @@ -366,7 +369,6 @@ impl<'a> System<'a> for Sys { CharacterState::Shockwave(data) => data.behavior(&j), CharacterState::BasicBeam(data) => data.behavior(&j), CharacterState::BasicAura(data) => data.behavior(&j), - CharacterState::HealingBeam(data) => data.behavior(&j), CharacterState::Blink(data) => data.behavior(&j), CharacterState::BasicSummon(data) => data.behavior(&j), CharacterState::TargetedEffect(data) => data.behavior(&j), diff --git a/common/sys/src/stats.rs b/common/sys/src/stats.rs index 6e6b7cdced..538bd0e0d0 100644 --- a/common/sys/src/stats.rs +++ b/common/sys/src/stats.rs @@ -246,7 +246,6 @@ impl<'a> System<'a> for Sys { | CharacterState::Shockwave { .. } | CharacterState::BasicBeam { .. } | CharacterState::BasicAura { .. } - | CharacterState::HealingBeam { .. } | CharacterState::Blink { .. } | CharacterState::TargetedEffect { .. } | CharacterState::BasicSummon { .. } => { diff --git a/server/src/events/mod.rs b/server/src/events/mod.rs index 418cdd930d..c47d5737a6 100644 --- a/server/src/events/mod.rs +++ b/server/src/events/mod.rs @@ -92,7 +92,7 @@ impl Server { ServerEvent::Knockback { entity, impulse } => { handle_knockback(&self, entity, impulse) }, - ServerEvent::Damage { entity, change } => handle_damage(&self, entity, change), + ServerEvent::HealthChange { entity, change } => handle_damage(&self, entity, change), ServerEvent::PoiseChange { entity, change, diff --git a/voxygen/src/audio/sfx/mod.rs b/voxygen/src/audio/sfx/mod.rs index 5c937c418f..8841fdd959 100644 --- a/voxygen/src/audio/sfx/mod.rs +++ b/voxygen/src/audio/sfx/mod.rs @@ -390,7 +390,7 @@ impl SfxMgr { audio.play_sfx(file_ref, *pos, None); }, Outcome::Beam { pos, specifier } => match specifier { - beam::FrontendSpecifier::LifestealBeam | beam::FrontendSpecifier::HealingBeam => { + beam::FrontendSpecifier::LifestealBeam => { let file_ref = "voxygen.audio.sfx.abilities.sceptre_channeling"; if thread_rng().gen_bool(0.5) { audio.play_sfx(file_ref, *pos, None); diff --git a/voxygen/src/render/pipelines/particle.rs b/voxygen/src/render/pipelines/particle.rs index 32a73abfde..2f8eee0a13 100644 --- a/voxygen/src/render/pipelines/particle.rs +++ b/voxygen/src/render/pipelines/particle.rs @@ -110,7 +110,6 @@ pub enum ParticleMode { Firefly = 11, Bee = 12, GroundShockwave = 13, - HealingBeam = 14, EnergyNature = 15, FlameThrower = 16, FireShockwave = 17, diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 4baf065e78..1e7454e814 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1284,32 +1284,6 @@ impl FigureMgr { skeleton_attr, ) }, - CharacterState::HealingBeam(s) => { - let stage_time = s.timer.as_secs_f32(); - let stage_progress = match s.stage_section { - StageSection::Buildup => { - stage_time / s.static_data.buildup_duration.as_secs_f32() - }, - StageSection::Cast => s.timer.as_secs_f32(), - StageSection::Recover => { - stage_time / s.static_data.recover_duration.as_secs_f32() - }, - _ => 0.0, - }; - anim::character::BeamAnimation::update_skeleton( - &target_base, - ( - Some(s.static_data.ability_info), - hands, - time, - rel_vel.magnitude(), - Some(s.stage_section), - ), - stage_progress, - &mut state_animation_rate, - skeleton_attr, - ) - }, CharacterState::ComboMelee(s) => { let stage_index = (s.stage - 1) as usize; let stage_time = s.timer.as_secs_f32(); diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index b58bbff27f..36d0a2c059 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -718,19 +718,6 @@ impl ParticleMgr { }, ); }, - beam::FrontendSpecifier::HealingBeam => { - // Emit a light when using healing - lights.push(Light::new(pos.0, Rgb::new(0.1, 1.0, 0.15), 1.0)); - for i in 0..beam_tick_count { - self.particles.push(Particle::new_directed( - beam.properties.duration, - time + i as f64 / 1000.0, - ParticleMode::HealingBeam, - pos.0, - pos.0 + *ori.look_dir() * range, - )); - } - }, beam::FrontendSpecifier::LifestealBeam => { // Emit a light when using lifesteal beam lights.push(Light::new(pos.0, Rgb::new(0.8, 1.0, 0.5), 1.0));