Module buff

Source

Structs§

Buff
Actual de/buff. Buff can timeout after some time if time is Some. If time is None, Buff will last indefinitely, until removed manually (by some action, like uncursing).
BuffData
BuffKey
BuffKindIter
An iterator over the variants of BuffKind
Buffs
Component holding all de/buffs that gets resolved each tick. On each tick, remaining time of buffs get lowered and buff effect of each buff is applied or not, depending on the BuffEffect (specs system will decide based on BuffEffect, to simplify implementation). TODO: Something like once flag for Buff to remove the dependence on BuffEffect enum?
DestInfo

Enums§

BuffCategory
De/buff category ID. Similar to BuffKind, but to mark a category (for more generic usage, like positive/negative buffs).
BuffChange
Information about whether buff addition or removal was requested. This to implement “on_add” and “on_remove” hooks for constant buffs.
BuffDescriptor
Tells a little more about the buff kind than simple buff/debuff
BuffEffect
Data indicating and configuring behaviour of a de/buff.
BuffKind
De/buff Kind. This is used to determine what effects a buff will have
BuffSource
Source of the de/buff
MiscBuffData
ModifierKind

Functions§

compare_end_time 🔒