Conditions

In Alacrity, conditions are a powerful tool that allow you to specify when buffs should be applied to entities. Conditions are expressions that evaluate to either true or false, and can be used to check the values of an entity's attributes or properties, as well as other conditions such as the time of day or the presence of other entities.

When a buff is applied to an entity, its conditions are evaluated in order. If all conditions evaluate to true, the buff is applied to the entity; otherwise, it is skipped. Conditions can be used to create complex buff systems that respond dynamically to changes in the simulation.

Conditions can be expressed using the Lua programming language, which allows for a high degree of expressiveness and flexibility. You can also use built-in conditional functions provided by the Alacrity library, which provide convenient shortcuts for common conditional checks.

The Conditions section of the documentation provides more information on working with conditions in Alacrity, including how to write conditional expressions in Lua, and how to use the built-in conditional functions.