pub enum BuffKind {
Show 35 variants Regeneration, Saturation, Potion, Agility, CampfireHeal, EnergyRegen, IncreaseMaxEnergy, IncreaseMaxHealth, Invulnerability, ProtectingWard, Frenzied, Hastened, Fortitude, Reckless, Flame, Frigid, Lifesteal, Bloodfeast, ImminentCritical, Fury, Sunderer, Defiance, Berserk, Burning, Bleeding, Cursed, Crippled, Frozen, Wet, Ensnared, Poisoned, Parried, PotionSickness, Heatstroke, 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 decreases linearly with strength, 0.5 is 50% and 1.0 is 33%. 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.

§

Burning

Does damage to a creature over time. Strength should be the DPS of the debuff.

§

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.

§

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.

§

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%.

§

Polymorphed

Changed into another body.

Implementations§

source§

impl BuffKind

source

pub fn differentiate(self) -> BuffDescriptor

Tells a little more about buff kind than simple buff/debuff

Read more in BuffDescriptor.

source

pub fn is_buff(self) -> bool

Checks if buff is buff or debuff.

source

pub fn is_simple(self) -> bool

source

pub fn queues(self) -> bool

Checks if buff should queue.

source

pub fn affects_subsequent_buffs(self) -> bool

Checks if the buff can affect other buff effects applied in the same tick.

source

pub fn stacks(self) -> bool

Checks if multiple instances of the buff should be processed, instead of only the strongest.

source

pub fn effects(&self, data: &BuffData, stats: Option<&Stats>) -> Vec<BuffEffect>

source

fn extend_cat_ids(&self, cat_ids: Vec<BuffCategory>) -> Vec<BuffCategory>

Trait Implementations§

source§

impl Clone for BuffKind

source§

fn clone(&self) -> BuffKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BuffKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BuffKind

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Enum for BuffKind

source§

const LENGTH: usize = 35usize

Length of the enum.
source§

fn from_usize(value: usize) -> Self

Takes an usize, and returns an element matching into_usize function.
source§

fn into_usize(self) -> usize

Returns an unique identifier for a value within range of 0..Array::LENGTH.
source§

impl<V> EnumArray<V> for BuffKind

§

type Array = [V; 35]

Representation of an enum map for type V.
source§

impl Hash for BuffKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoEnumIterator for BuffKind

source§

impl Ord for BuffKind

source§

fn cmp(&self, other: &BuffKind) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for BuffKind

source§

fn eq(&self, other: &BuffKind) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for BuffKind

source§

fn partial_cmp(&self, other: &BuffKind) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for BuffKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BuffKind

source§

impl Eq for BuffKind

source§

impl StructuralEq for BuffKind

source§

impl StructuralPartialEq for BuffKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for T
where T: Hash,

§

fn get_hash<H>(&self, hasher: H) -> u64
where H: Hasher,

§

impl<T> CallHasher for T
where T: Hash + ?Sized,

§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<C, M> ConvertSaveload<M> for C

§

type Data = C

(De)Serializable data representation for data type
§

type Error = Infallible

Error may occur during serialization or deserialization of component
§

fn convert_into<F>( &self, _: F ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
where F: FnMut(Entity) -> Option<M>,

Convert this data type into serializable form (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>
where F: FnMut(M) -> Option<Entity>,

Convert this data from a deserializable form (Data) using entity to marker mapping function
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<Context> SubContext<Context> for Context

source§

fn sub_context(self) -> Context

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Event for T
where T: Send + Sync + 'static,

§

impl<T> Resource for T
where T: Any + Send + Sync,