Buffs

Buffs are an essential component of Alacrity, enabling dynamic modifications of entity attributes. A buff is a set of rules that determine how an entity's attributes should be modified while the buff is active.

A buff can be triggered in a variety of ways, such as when a player casts a spell or when a particular event occurs in the game. Once a buff is triggered, it can modify one or more attributes of the entity for a specified duration, until specific conditions are met or until the buff is manually deactivated.

Buffs can also define modifiers, which represents a value (or values) that will modify one or more of the attributes of an entity when a buff is applied to it. It is a way to define the actual change that should happen to the attribute's value.

Modifiers can be either additive or multiplicative. Additive modifiers add a fixed amount to the attribute's value, while multiplicative modifiers multiply the attribute's value by a fixed amount. Buffs can have multiple modifiers, which can modify different attributes of an entity in different ways.

In Alacrity, buffs can be defined using Lua scripts, which allows developers to define complex behaviors and conditions in a flexible and extensible way. The Buffs section of the documentation provides more information on working with buffs in Alacrity, including how to define buffs, modifiers, and conditions, and how to attach buffs to entities.