mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Mindflayer can now lifesteal off of its own minions
This commit is contained in:
parent
50e832b6d0
commit
5966b1541d
@ -14,4 +14,5 @@ SpinMelee(
|
||||
forward_speed: 0.0,
|
||||
num_spins: 1,
|
||||
specifier: None,
|
||||
target: Some(OutOfGroup),
|
||||
)
|
||||
|
@ -14,4 +14,5 @@ SpinMelee(
|
||||
forward_speed: 1.0,
|
||||
num_spins: 3,
|
||||
specifier: None,
|
||||
target: Some(OutOfGroup),
|
||||
)
|
||||
|
@ -14,4 +14,5 @@ SpinMelee(
|
||||
forward_speed: 0.0,
|
||||
num_spins: 1,
|
||||
specifier: Some(CultistVortex),
|
||||
target: None,
|
||||
)
|
||||
|
@ -14,4 +14,5 @@ SpinMelee(
|
||||
forward_speed: 0.0,
|
||||
num_spins: 1,
|
||||
specifier: None,
|
||||
target: Some(OutOfGroup),
|
||||
)
|
||||
|
@ -165,6 +165,7 @@ pub enum CharacterAbility {
|
||||
forward_speed: f32,
|
||||
num_spins: u32,
|
||||
specifier: Option<spin_melee::FrontendSpecifier>,
|
||||
target: Option<combat::GroupTarget>,
|
||||
},
|
||||
ChargedMelee {
|
||||
energy_cost: f32,
|
||||
@ -1341,6 +1342,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
||||
forward_speed,
|
||||
num_spins,
|
||||
specifier,
|
||||
target,
|
||||
} => CharacterState::SpinMelee(spin_melee::Data {
|
||||
static_data: spin_melee::StaticData {
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
@ -1357,6 +1359,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
||||
is_interruptible: *is_interruptible,
|
||||
forward_speed: *forward_speed,
|
||||
num_spins: *num_spins,
|
||||
target: *target,
|
||||
ability_info,
|
||||
specifier: *specifier,
|
||||
},
|
||||
|
@ -45,6 +45,8 @@ pub struct StaticData {
|
||||
pub forward_speed: f32,
|
||||
/// Number of spins
|
||||
pub num_spins: u32,
|
||||
/// Used to determine targeting of attack
|
||||
pub target: Option<GroupTarget>,
|
||||
/// What key is used to press ability
|
||||
pub ability_info: AbilityInfo,
|
||||
/// Used to specify the melee attack to the frontend
|
||||
@ -110,12 +112,12 @@ impl CharacterBehavior for Data {
|
||||
});
|
||||
|
||||
let poise = AttackEffect::new(
|
||||
Some(GroupTarget::OutOfGroup),
|
||||
self.static_data.target,
|
||||
CombatEffect::Poise(self.static_data.base_poise_damage as f32),
|
||||
)
|
||||
.with_requirement(CombatRequirement::AnyDamage);
|
||||
let knockback = AttackEffect::new(
|
||||
Some(GroupTarget::OutOfGroup),
|
||||
self.static_data.target,
|
||||
CombatEffect::Knockback(self.static_data.knockback),
|
||||
)
|
||||
.with_requirement(CombatRequirement::AnyDamage);
|
||||
@ -124,7 +126,7 @@ impl CharacterBehavior for Data {
|
||||
source: DamageSource::Melee,
|
||||
value: self.static_data.base_damage as f32,
|
||||
},
|
||||
Some(GroupTarget::OutOfGroup),
|
||||
self.static_data.target,
|
||||
);
|
||||
match self.static_data.damage_effect {
|
||||
Some(effect) => damage = damage.with_effect(effect),
|
||||
|
Loading…
Reference in New Issue
Block a user