mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed references to Healing Beam, which Healing Aura is replacing
This commit is contained in:
parent
42c3872528
commit
146f86be2c
@ -191,7 +191,7 @@
|
|||||||
abilities: [],
|
abilities: [],
|
||||||
),
|
),
|
||||||
Custom("Quad Low Beam"): (
|
Custom("Quad Low Beam"): (
|
||||||
primary: "common.abilities.custom.quadlowbeam.healingbeam",
|
primary: "common.abilities.custom.quadlowbeam.lifestealbeam",
|
||||||
secondary: "common.abilities.custom.quadlowbreathe.triplestrike",
|
secondary: "common.abilities.custom.quadlowbreathe.triplestrike",
|
||||||
abilities: [
|
abilities: [
|
||||||
(None, "common.abilities.custom.quadlowbreathe.dash"),
|
(None, "common.abilities.custom.quadlowbreathe.dash"),
|
||||||
|
@ -11,5 +11,5 @@ BasicBeam(
|
|||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
ori_rate: 0.3,
|
ori_rate: 0.3,
|
||||||
specifier: HealingBeam,
|
specifier: LifestealBeam,
|
||||||
)
|
)
|
@ -1,11 +0,0 @@
|
|||||||
HealingBeam(
|
|
||||||
buildup_duration: 0.25,
|
|
||||||
recover_duration: 0.25,
|
|
||||||
beam_duration: 1.0,
|
|
||||||
heal: 40,
|
|
||||||
tick_rate: 2.0,
|
|
||||||
range: 25.0,
|
|
||||||
max_angle: 1.0,
|
|
||||||
energy_cost: 75,
|
|
||||||
specifier: HealingBeam,
|
|
||||||
)
|
|
@ -261,18 +261,7 @@ pub enum CharacterAbility {
|
|||||||
range: f32,
|
range: f32,
|
||||||
energy_cost: f32,
|
energy_cost: f32,
|
||||||
scales_with_combo: bool,
|
scales_with_combo: bool,
|
||||||
specifier: aura::FrontendSpecifier,
|
specifier: aura::Specifier,
|
||||||
},
|
|
||||||
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 {
|
Blink {
|
||||||
buildup_duration: f32,
|
buildup_duration: f32,
|
||||||
@ -381,7 +370,6 @@ impl CharacterAbility {
|
|||||||
.try_change_by(-(*energy_cost as i32), EnergySource::Ability)
|
.try_change_by(-(*energy_cost as i32), EnergySource::Ability)
|
||||||
.is_ok()
|
.is_ok()
|
||||||
},
|
},
|
||||||
CharacterAbility::HealingBeam { .. } => data.combo.counter() > 0,
|
|
||||||
CharacterAbility::ComboMelee { .. }
|
CharacterAbility::ComboMelee { .. }
|
||||||
| CharacterAbility::Boost { .. }
|
| CharacterAbility::Boost { .. }
|
||||||
| CharacterAbility::BasicBeam { .. }
|
| CharacterAbility::BasicBeam { .. }
|
||||||
@ -733,26 +721,6 @@ impl CharacterAbility {
|
|||||||
*range *= stats.range;
|
*range *= stats.range;
|
||||||
*energy_cost /= stats.energy_efficiency;
|
*energy_cost /= stats.energy_efficiency;
|
||||||
},
|
},
|
||||||
HealingBeam {
|
|
||||||
ref mut buildup_duration,
|
|
||||||
ref mut recover_duration,
|
|
||||||
ref mut beam_duration,
|
|
||||||
ref mut heal,
|
|
||||||
ref mut tick_rate,
|
|
||||||
ref mut range,
|
|
||||||
max_angle: _,
|
|
||||||
ref mut energy_cost,
|
|
||||||
specifier: _,
|
|
||||||
} => {
|
|
||||||
*buildup_duration /= stats.speed;
|
|
||||||
*recover_duration /= stats.speed;
|
|
||||||
*heal *= stats.power;
|
|
||||||
*tick_rate *= stats.speed;
|
|
||||||
*range *= stats.range;
|
|
||||||
// Duration modified to keep velocity constant
|
|
||||||
*beam_duration *= stats.range;
|
|
||||||
*energy_cost /= stats.energy_efficiency;
|
|
||||||
},
|
|
||||||
Blink {
|
Blink {
|
||||||
ref mut buildup_duration,
|
ref mut buildup_duration,
|
||||||
ref mut recover_duration,
|
ref mut recover_duration,
|
||||||
@ -825,7 +793,6 @@ impl CharacterAbility {
|
|||||||
| ChargedMelee { energy_cost, .. }
|
| ChargedMelee { energy_cost, .. }
|
||||||
| ChargedRanged { energy_cost, .. }
|
| ChargedRanged { energy_cost, .. }
|
||||||
| Shockwave { energy_cost, .. }
|
| Shockwave { energy_cost, .. }
|
||||||
| HealingBeam { energy_cost, .. }
|
|
||||||
| BasicAura { energy_cost, .. }
|
| BasicAura { energy_cost, .. }
|
||||||
| BasicBlock { energy_cost, .. }
|
| BasicBlock { energy_cost, .. }
|
||||||
| SelfBuff { energy_cost, .. } => *energy_cost as u32,
|
| SelfBuff { energy_cost, .. } => *energy_cost as u32,
|
||||||
@ -1320,26 +1287,6 @@ impl CharacterAbility {
|
|||||||
*lifesteal *= 1.15_f32.powi(level.into());
|
*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 {
|
BasicAura {
|
||||||
ref mut aura,
|
ref mut aura,
|
||||||
ref mut range,
|
ref mut range,
|
||||||
@ -1347,7 +1294,7 @@ impl CharacterAbility {
|
|||||||
ref specifier,
|
ref specifier,
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
if matches!(*specifier, aura::FrontendSpecifier::WardingAura) {
|
if matches!(*specifier, aura::Specifier::WardingAura) {
|
||||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(AStrength)) {
|
if let Ok(Some(level)) = skillset.skill_level(Sceptre(AStrength)) {
|
||||||
aura.strength *= 1.15_f32.powi(level.into());
|
aura.strength *= 1.15_f32.powi(level.into());
|
||||||
}
|
}
|
||||||
@ -1360,7 +1307,7 @@ impl CharacterAbility {
|
|||||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(ACost)) {
|
if let Ok(Some(level)) = skillset.skill_level(Sceptre(ACost)) {
|
||||||
*energy_cost *= 0.85_f32.powi(level.into());
|
*energy_cost *= 0.85_f32.powi(level.into());
|
||||||
}
|
}
|
||||||
} else if matches!(*specifier, aura::FrontendSpecifier::HealingAura) {
|
} else if matches!(*specifier, aura::Specifier::HealingAura) {
|
||||||
if let Ok(Some(level)) = skillset.skill_level(Sceptre(HHeal)) {
|
if let Ok(Some(level)) = skillset.skill_level(Sceptre(HHeal)) {
|
||||||
aura.strength *= 1.15_f32.powi(level.into());
|
aura.strength *= 1.15_f32.powi(level.into());
|
||||||
}
|
}
|
||||||
@ -1898,32 +1845,6 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
|||||||
timer: Duration::default(),
|
timer: Duration::default(),
|
||||||
stage_section: StageSection::Buildup,
|
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 {
|
CharacterAbility::Blink {
|
||||||
buildup_duration,
|
buildup_duration,
|
||||||
recover_duration,
|
recover_duration,
|
||||||
|
@ -72,7 +72,7 @@ pub enum AuraTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
|
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||||
pub enum FrontendSpecifier {
|
pub enum Specifier {
|
||||||
WardingAura,
|
WardingAura,
|
||||||
HealingAura,
|
HealingAura,
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ impl Component for Beam {
|
|||||||
pub enum FrontendSpecifier {
|
pub enum FrontendSpecifier {
|
||||||
Flamethrower,
|
Flamethrower,
|
||||||
LifestealBeam,
|
LifestealBeam,
|
||||||
HealingBeam,
|
|
||||||
Cultist,
|
Cultist,
|
||||||
ClayGolem,
|
ClayGolem,
|
||||||
Bubbles,
|
Bubbles,
|
||||||
|
@ -93,11 +93,6 @@ pub enum CharacterState {
|
|||||||
BasicBeam(basic_beam::Data),
|
BasicBeam(basic_beam::Data),
|
||||||
/// Creates an aura that persists as long as you are actively casting
|
/// Creates an aura that persists as long as you are actively casting
|
||||||
BasicAura(basic_aura::Data),
|
BasicAura(basic_aura::Data),
|
||||||
/// A directed beam that heals targets in range. This is separate from basic
|
|
||||||
/// 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
|
/// A short teleport that targets either a position or entity
|
||||||
Blink(blink::Data),
|
Blink(blink::Data),
|
||||||
/// Summons creatures that fight for the caster
|
/// Summons creatures that fight for the caster
|
||||||
@ -128,7 +123,6 @@ impl CharacterState {
|
|||||||
| CharacterState::Shockwave(_)
|
| CharacterState::Shockwave(_)
|
||||||
| CharacterState::BasicBeam(_)
|
| CharacterState::BasicBeam(_)
|
||||||
| CharacterState::BasicAura(_)
|
| CharacterState::BasicAura(_)
|
||||||
| CharacterState::HealingBeam(_)
|
|
||||||
| CharacterState::SelfBuff(_)
|
| CharacterState::SelfBuff(_)
|
||||||
| CharacterState::Blink(_)
|
| CharacterState::Blink(_)
|
||||||
| CharacterState::BasicSummon(_)
|
| CharacterState::BasicSummon(_)
|
||||||
@ -155,7 +149,6 @@ impl CharacterState {
|
|||||||
| CharacterState::Shockwave(_)
|
| CharacterState::Shockwave(_)
|
||||||
| CharacterState::BasicBeam(_)
|
| CharacterState::BasicBeam(_)
|
||||||
| CharacterState::BasicAura(_)
|
| CharacterState::BasicAura(_)
|
||||||
| CharacterState::HealingBeam(_)
|
|
||||||
| CharacterState::SelfBuff(_)
|
| CharacterState::SelfBuff(_)
|
||||||
| CharacterState::Blink(_)
|
| CharacterState::Blink(_)
|
||||||
| CharacterState::BasicSummon(_)
|
| CharacterState::BasicSummon(_)
|
||||||
@ -181,7 +174,6 @@ impl CharacterState {
|
|||||||
| CharacterState::UseItem(_)
|
| CharacterState::UseItem(_)
|
||||||
| CharacterState::Wielding
|
| CharacterState::Wielding
|
||||||
| CharacterState::Talk
|
| CharacterState::Talk
|
||||||
| CharacterState::HealingBeam(_)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
combat::GroupTarget,
|
combat::GroupTarget,
|
||||||
comp::{
|
comp::{
|
||||||
aura::{AuraBuffConstructor, AuraChange, AuraKind, AuraTarget, FrontendSpecifier},
|
aura::{AuraBuffConstructor, AuraChange, AuraKind, AuraTarget, Specifier},
|
||||||
CharacterState, StateUpdate,
|
CharacterState, StateUpdate,
|
||||||
},
|
},
|
||||||
event::ServerEvent,
|
event::ServerEvent,
|
||||||
@ -35,7 +35,7 @@ pub struct StaticData {
|
|||||||
/// Whether the aura's effect scales with the user's current combo
|
/// Whether the aura's effect scales with the user's current combo
|
||||||
pub scales_with_combo: bool,
|
pub scales_with_combo: bool,
|
||||||
/// Used to specify aura to the frontend
|
/// Used to specify aura to the frontend
|
||||||
pub specifier: FrontendSpecifier,
|
pub specifier: Specifier,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
@ -1,155 +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_orientation(data, &mut update, 0.6);
|
|
||||||
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: tick_attack_or_default(data, self.timer, None),
|
|
||||||
..*self
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Creates beam
|
|
||||||
data.updater.insert(data.entity, beam::Beam {
|
|
||||||
hit_entities: Vec::<Uid>::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: tick_attack_or_default(data, self.timer, None),
|
|
||||||
..*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: tick_attack_or_default(data, self.timer, None),
|
|
||||||
..*self
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Done
|
|
||||||
update.character = CharacterState::Wielding;
|
|
||||||
// Make sure attack component is removed
|
|
||||||
data.updater.remove::<beam::Beam>(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::<beam::Beam>(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
|
|
||||||
}
|
|
||||||
}
|
|
@ -16,7 +16,6 @@ pub mod dash_melee;
|
|||||||
pub mod equipping;
|
pub mod equipping;
|
||||||
pub mod glide;
|
pub mod glide;
|
||||||
pub mod glide_wield;
|
pub mod glide_wield;
|
||||||
pub mod healing_beam;
|
|
||||||
pub mod idle;
|
pub mod idle;
|
||||||
pub mod leap_melee;
|
pub mod leap_melee;
|
||||||
pub mod repeater_ranged;
|
pub mod repeater_ranged;
|
||||||
|
@ -339,7 +339,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
CharacterState::Shockwave(data) => data.handle_event(&j, action),
|
CharacterState::Shockwave(data) => data.handle_event(&j, action),
|
||||||
CharacterState::BasicBeam(data) => data.handle_event(&j, action),
|
CharacterState::BasicBeam(data) => data.handle_event(&j, action),
|
||||||
CharacterState::BasicAura(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::Blink(data) => data.handle_event(&j, action),
|
||||||
CharacterState::BasicSummon(data) => data.handle_event(&j, action),
|
CharacterState::BasicSummon(data) => data.handle_event(&j, action),
|
||||||
CharacterState::SelfBuff(data) => data.handle_event(&j, action),
|
CharacterState::SelfBuff(data) => data.handle_event(&j, action),
|
||||||
@ -396,7 +395,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
CharacterState::Shockwave(data) => data.behavior(&j),
|
CharacterState::Shockwave(data) => data.behavior(&j),
|
||||||
CharacterState::BasicBeam(data) => data.behavior(&j),
|
CharacterState::BasicBeam(data) => data.behavior(&j),
|
||||||
CharacterState::BasicAura(data) => data.behavior(&j),
|
CharacterState::BasicAura(data) => data.behavior(&j),
|
||||||
CharacterState::HealingBeam(data) => data.behavior(&j),
|
|
||||||
CharacterState::Blink(data) => data.behavior(&j),
|
CharacterState::Blink(data) => data.behavior(&j),
|
||||||
CharacterState::BasicSummon(data) => data.behavior(&j),
|
CharacterState::BasicSummon(data) => data.behavior(&j),
|
||||||
CharacterState::SelfBuff(data) => data.behavior(&j),
|
CharacterState::SelfBuff(data) => data.behavior(&j),
|
||||||
|
@ -276,7 +276,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
| CharacterState::Shockwave { .. }
|
| CharacterState::Shockwave { .. }
|
||||||
| CharacterState::BasicBeam { .. }
|
| CharacterState::BasicBeam { .. }
|
||||||
| CharacterState::BasicAura { .. }
|
| CharacterState::BasicAura { .. }
|
||||||
| CharacterState::HealingBeam { .. }
|
|
||||||
| CharacterState::Blink { .. }
|
| CharacterState::Blink { .. }
|
||||||
| CharacterState::BasicSummon { .. }
|
| CharacterState::BasicSummon { .. }
|
||||||
| CharacterState::SelfBuff { .. }
|
| CharacterState::SelfBuff { .. }
|
||||||
|
@ -479,7 +479,7 @@ impl SfxMgr {
|
|||||||
audio.emit_sfx(sfx_trigger_item, *pos, None, false);
|
audio.emit_sfx(sfx_trigger_item, *pos, None, false);
|
||||||
},
|
},
|
||||||
Outcome::Beam { pos, specifier } => match specifier {
|
Outcome::Beam { pos, specifier } => match specifier {
|
||||||
beam::FrontendSpecifier::LifestealBeam | beam::FrontendSpecifier::HealingBeam => {
|
beam::FrontendSpecifier::LifestealBeam => {
|
||||||
if thread_rng().gen_bool(0.5) {
|
if thread_rng().gen_bool(0.5) {
|
||||||
let sfx_trigger_item = triggers.get_key_value(&SfxEvent::HealingBeam);
|
let sfx_trigger_item = triggers.get_key_value(&SfxEvent::HealingBeam);
|
||||||
audio.emit_sfx(sfx_trigger_item, *pos, None, false);
|
audio.emit_sfx(sfx_trigger_item, *pos, None, false);
|
||||||
|
@ -1309,32 +1309,6 @@ impl FigureMgr {
|
|||||||
skeleton_attr,
|
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) => {
|
CharacterState::ComboMelee(s) => {
|
||||||
let stage_index = (s.stage - 1) as usize;
|
let stage_index = (s.stage - 1) as usize;
|
||||||
let stage_time = s.timer.as_secs_f32();
|
let stage_time = s.timer.as_secs_f32();
|
||||||
|
@ -826,20 +826,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));
|
|
||||||
self.particles.reserve(beam_tick_count as usize);
|
|
||||||
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 => {
|
beam::FrontendSpecifier::LifestealBeam => {
|
||||||
// Emit a light when using lifesteal beam
|
// Emit a light when using lifesteal beam
|
||||||
lights.push(Light::new(pos.0, Rgb::new(0.8, 1.0, 0.5), 1.0));
|
lights.push(Light::new(pos.0, Rgb::new(0.8, 1.0, 0.5), 1.0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user