Enum veloren_common::comp::buff::BuffKind
source · pub enum BuffKind {
Show 42 variants
Regeneration,
Saturation,
Potion,
Agility,
CampfireHeal,
EnergyRegen,
IncreaseMaxEnergy,
IncreaseMaxHealth,
Invulnerability,
ProtectingWard,
Frenzied,
Hastened,
Fortitude,
Reckless,
Flame,
Frigid,
Lifesteal,
Bloodfeast,
ImminentCritical,
Fury,
Sunderer,
Defiance,
Berserk,
ScornfulTaunt,
Tenacity,
Resilience,
Burning,
Bleeding,
Cursed,
Crippled,
Frozen,
Wet,
Ensnared,
Poisoned,
Parried,
PotionSickness,
Heatstroke,
Rooted,
Winded,
Concussion,
Staggered,
Polymorphed,
}
Expand description
De/buff Kind. This is used to determine what effects a buff will have
Variants§
Regeneration
Restores health/time for some period. Strength should be the healing per second.
Saturation
Restores health/time for some period for consumables. Strength should be the healing per second.
Potion
Applied when drinking a potion. Strength should be the healing per second.
Agility
Increases movement speed and vulnerability to damage as well as decreases the amount of damage dealt. Movement speed increases linearly with strength 1.0 is an 100% increase Damage vulnerability and damage reduction are both hard set to 100%
CampfireHeal
Applied when sitting at a campfire. Strength is fraction of health restored per second.
EnergyRegen
Restores energy/time for some period. Strength should be the healing per second.
IncreaseMaxEnergy
Raises maximum energy. Strength should be 10x the effect to max energy.
IncreaseMaxHealth
Raises maximum health. Strength should be the effect to max health.
Invulnerability
Makes you immune to attacks. Strength does not affect this buff.
ProtectingWard
Reduces incoming damage. Strength scales the damage reduction non-linearly. 0.5 provides 50% DR, 1.0 provides 67% DR.
Frenzied
Increases movement speed and gives health regeneration. Strength scales the movement speed linearly. 0.5 is 150% speed, 1.0 is 200% speed. Provides regeneration at 10x the value of the strength.
Hastened
Increases movement and attack speed, but removes chance to get critical hits. Strength scales strength of both effects linearly. 0.5 is a 50% increase, 1.0 is a 100% increase.
Fortitude
Increases resistance to incoming poise, and poise damage dealt as health is lost. Strength scales the resistance non-linearly. 0.5 provides 50%, 1.0 provides 67%. Strength scales the poise damage increase linearly, a strength of 1.0 and n health less from maximum health will cause poise damage to increase by n%.
Reckless
Increases both attack damage and vulnerability to damage. Damage increases linearly with strength, 1.0 is a 100% increase. Damage reduction decreases linearly with strength, 1.0 is a 100% decrease.
Flame
Provides immunity to burning and increases movement speed in lava. Movement speed increases linearly with strength, 1.0 is a 100% increase. Your attacks cause targets to receive the burning debuff Strength of burning debuff is a fraction of the damage, fraction increases linearly with strength
Frigid
Your attacks cause targets to receive the frozen debuff Strength of frozen debuff is equal to the strength of this buff
Lifesteal
Your attacks have lifesteal Strength increases the fraction of damage restored as life
Bloodfeast
Your attacks against bleeding targets have lifesteal Strength increases the fraction of damage restored as life
ImminentCritical
Guarantees that the next attack is a precise hit. Does this kind of hackily by adding 100% to the precision, will need to be adjusted if we ever allow double precision hits instead of treating 100 as a ceiling.
Fury
Increases combo gain, every 1 strength increases combo per strike by 1, rounds to nearest integer
Sunderer
Allows attacks to ignore DR and increases energy reward DR penetration is non-linear, 0.5 is 50% penetration and 1.0 is a 67% penetration. Energy reward is increased linearly to strength, 1.0 is a 200 % increase.
Defiance
Increases damage resistance and poise resistance, causes combo to be generated when damaged, and decreases movement speed. Damage resistance increases non-linearly with strength, 0.5 is 50% and 1.0 is 67%. Poise resistance increases non-linearly with strength, 0.5 is 50% and 1.0 is 67%. Movement speed is decreased to 50%. Combo generation is linear with strength, 1.0 is 5 combo generated on being hit.
Berserk
Increases both attack damage, vulnerability to damage, attack speed, and movement speed Damage increases linearly with strength, 1.0 is a 100% increase. Damage reduction decreases linearly with strength, 1.0 is a 100% Attack speed increases non-linearly with strength, 0.5 is a 25% increase, 1.0 is a 33% increase Movement speed increases non-linearly with strength, 0.5 is a 12.5% increase, 1.0 is a 16.7% increase decrease.
ScornfulTaunt
Increases poise resistance and energy reward. However if killed, buffs killer with Reckless buff. Poise resistance scales non-linearly with strength, 0.5 is 50% and 1.0 is 67%. Energy reward scales linearly with strength, 0.5 is +50% and 1.0 is +100% strength. Reckless buff reward strength is equal to scornful taunt buff strength.
Tenacity
Increases damage resistance, causes energy to be generated when damaged, and decreases movement speed. Damage resistance increases non-linearly with strength, 0.5 is 50% and 1.0 is 67%. Energy generation is linear with strength, 1.0 is 10 energy per hit. Movement speed is decreased to 70%.
Resilience
Applies to some debuffs that have strong CC effects. Automatically gained upon receiving those debuffs, and causes future instances of those debuffs to be applied with reduced duration. Strength linearly decreases the duration of newly applied, affected debuffs, 0.5 is a 50% reduction.
Burning
Does damage to a creature over time. Strength should be the DPS of the debuff. Provides immunity against Frozen.
Bleeding
Lowers health over time for some duration. Strength should be the DPS of the debuff.
Cursed
Lower a creature’s max health over time. Strength only affects the target max health, 0.5 targets 50% of base max, 1.0 targets 100% of base max.
Crippled
Reduces movement speed and causes bleeding damage. Strength scales the movement speed debuff non-linearly. 0.5 is 50% speed, 1.0 is 33% speed. Bleeding is at 4x the value of the strength.
Frozen
Slows movement and attack speed. Strength scales the attack speed debuff non-linearly. 0.5 is ~50% speed, 1.0 is 33% speed. Movement speed debuff is scaled to be slightly smaller than attack speed debuff. Provides immunity against Heatstroke.
Wet
Makes you wet and causes you to have reduced friction on the ground. Strength scales the friction you ignore non-linearly. 0.5 is 50% ground friction, 1.0 is 33% ground friction. Provides immunity against Burning.
Ensnared
Makes you move slower. Strength scales the movement speed debuff non-linearly. 0.5 is 50% speed, 1.0 is 33% speed.
Poisoned
Drain stamina to a creature over time. Strength should be the energy per second of the debuff.
Parried
Results from having an attack parried. Causes your attack speed to be slower to emulate the recover duration of an ability being lengthened.
PotionSickness
Results from drinking a potion. Decreases the health gained from subsequent potions.
Heatstroke
Slows movement speed and reduces energy reward. Both scales non-linearly to strength, 0.5 lead to movespeed reduction by 25% and energy reward reduced by 150%, 1.0 lead to MS reduction by 33.3% and energy reward reduced by 200%. Energy reward can’t be reduced by more than 200%, to a minimum value of -100%.
Rooted
Reduces movement speed to 0. Strength increases the relative mass of the creature that can be targeted. A strength of 1.0 means that a creature of the same mass gets rooted for the full duration. A strength of 2.0 means a creature of twice the mass gets rooted for the full duration. If the target’s mass is higher than the strength allows for, duration gets reduced using a mutiplier from the ratio of masses.
Winded
Slows movement speed and reduces energy reward Both scale non-linearly with strength, 0.5 leads to 50% reduction of energy reward and 33% reduction of move speed. 1.0 leads to 67% reduction of energy reward and 50% reduction of move speed.
Concussion
Prevents use of auxiliary abilities. Does not scale with strength
Staggered
Increases amount of poise damage received Scales linearly with strength, 1.0 leads to 100% more poise damage received
Polymorphed
Changed into another body.
Implementations§
source§impl BuffKind
impl BuffKind
sourcepub fn differentiate(self) -> BuffDescriptor
pub fn differentiate(self) -> BuffDescriptor
Tells a little more about buff kind than simple buff/debuff
Read more in BuffDescriptor.
pub fn is_simple(self) -> bool
sourcepub fn affects_subsequent_buffs(self) -> bool
pub fn affects_subsequent_buffs(self) -> bool
Checks if the buff can affect other buff effects applied in the same tick.
sourcepub fn stacks(self) -> bool
pub fn stacks(self) -> bool
Checks if multiple instances of the buff should be processed, instead of only the strongest.
pub fn effects(&self, data: &BuffData) -> Vec<BuffEffect>
fn extend_cat_ids(&self, cat_ids: Vec<BuffCategory>) -> Vec<BuffCategory>
fn modify_data( &self, data: BuffData, source_mass: Option<&Mass>, dest_info: DestInfo<'_>, source: BuffSource, ) -> BuffData
sourcepub fn resilience_ccr_strength(&self, data: BuffData) -> Option<f32>
pub fn resilience_ccr_strength(&self, data: BuffData) -> Option<f32>
If a buff kind should also give resilience when applied, return the strength that resilience should have, otherwise return None
pub fn apply_item_effect_reduction( &self, data: &mut BuffData, source: BuffSource, dest_info: DestInfo<'_>, )
Trait Implementations§
source§impl<'de> Deserialize<'de> for BuffKind
impl<'de> Deserialize<'de> for BuffKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl IntoEnumIterator for BuffKind
impl IntoEnumIterator for BuffKind
type Iterator = BuffKindIter
fn iter() -> BuffKindIter ⓘ
source§impl Ord for BuffKind
impl Ord for BuffKind
source§impl PartialEq for BuffKind
impl PartialEq for BuffKind
source§impl PartialOrd for BuffKind
impl PartialOrd for BuffKind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for BuffKind
impl Eq for BuffKind
impl StructuralPartialEq for BuffKind
Auto Trait Implementations§
impl Freeze for BuffKind
impl RefUnwindSafe for BuffKind
impl Send for BuffKind
impl Sync for BuffKind
impl Unpin for BuffKind
impl UnwindSafe for BuffKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
§fn convert_into<F>(
&self,
_: F,
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
fn convert_into<F>( &self, _: F, ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§fn convert_from<F>(
data: <C as ConvertSaveload<M>>::Data,
_: F,
) -> Result<C, <C as ConvertSaveload<M>>::Error>
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F, ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more