activate_buffs
Activates any buff that is not active yet and can be activated.
Errors
- Returns an error if any buff cannot be activated.
Signature
---@return nil|error
function Entity:activate_buffs()
Example of Usage
-- bind the exposed entity UserData to a local variable
local entityAPI = alacrity.Entity
-- create a new Entity instance
local e = entityAPI.new({
id = id,
name = "My new Ad-Hoc Entity",
description = "This is an Ad-Hoc entity used to test the activate_buffs method",
attributes = {
{ name = "str", value = 10 },
},
properties = {
{ name = "level", value = 1, hide_from_conditions = false },
},
buffs = {
-- assume the buff is defined elsewhere
{ "6fabe498-ac41-44fe-aa5c-d606dcbc0646" },
},
})
local ok, err = pcall(function()
e:activate_buffs()
end)
assert(ok, true)