Lua: Allow using Lua to manipulate effects and define requirements #2514
Labels
enhancement
New feature or request
server
This issue requires changes to the server
spec-file
Related to Rulesets, Tilesets, Musicsets, Soundsets, etc.
Is your feature request related to a problem? Please describe.
Lua scripts can be very useful, but currently they are based around creating handlers for emitted signals and adding behaviour to occur at these moments. Effects on the other hand are used to modify existing functionality by feeding data back to something that is processing a behaviour based on a set of rules. I would like to be able to leverage the power of Lua for effects also, and define more advanced requirements for effects.
Describe the solution you'd like
effects.create(name, type, value, multiplier, reqs)
function to define an effect.signal.connect()
works, that accept the contextual parameters and returns true or false for if the effect should be appliedeffects.remove(name)
function to remove an effect.effects.define(type)
function for defining new custom effect types that we can use witheffects.X_bonus()
functions in signal handlers.Additional context
Discussion thread in Discord
The text was updated successfully, but these errors were encountered: