Module ...
Handles actors temporary effects (temporary boost of a stat, ...)
Functions
| _M:callEffect (eff_id, name, ...) | Trigger an effect method | 
| _M:copyEffect (eff_id) | Copy an effect ensuring temporary values are managed properly | 
| _M:effectTemporaryValue (eff, k, v) | Helper function to add temporary values and not have to remove them manualy | 
| _M:hasEffect (eff_id) | Check timed effect | 
| _M:loadDefinition (file, env) | Defines actor temporary effects Static! | 
| _M:newEffect (t) | Defines one effect Static! | 
| _M:removeAllEffects () | Removes the effect | 
| _M:removeEffect (eff, silent, force) | Removes the effect | 
| _M:setEffect (eff_id, dur, p, silent) | Sets a timed effect on the actor | 
| _M:timedEffects (filter) | Counts down timed effects, call from your actors "act" method | 
Functions
- _M:callEffect (eff_id, name, ...)
- 
Trigger an effect method
Parameters- eff_id:
- name:
- ...:
 
- _M:copyEffect (eff_id)
- 
Copy an effect ensuring temporary values are managed properly
Parameters- eff_id: the effect to copy
 Return value:either nil or the parameters table for the effect
- _M:effectTemporaryValue (eff, k, v)
- 
Helper function to add temporary values and not have to remove them manualy
Parameters- eff:
- k:
- v:
 
- _M:hasEffect (eff_id)
- 
Check timed effect
Parameters- eff_id: the effect to check for
 Return value:either nil or the parameters table for the effect
- _M:loadDefinition (file, env)
- 
Defines actor temporary effects Static!
Parameters- file:
- env:
 
- _M:newEffect (t)
- 
Defines one effect Static!
Parameters- t:
 
- _M:removeAllEffects ()
- Removes the effect
- _M:removeEffect (eff, silent, force)
- 
Removes the effect
Parameters- eff:
- silent:
- force:
 
- _M:setEffect (eff_id, dur, p, silent)
- 
Sets a timed effect on the actor
Parameters- eff_id: the effect to set
- dur: the number of turns to go on
- p: a table containing the effects parameters
- silent: true to suppress messages
 
- _M:timedEffects (filter)
- 
Counts down timed effects, call from your actors "act" method
Parameters- filter: if not nil a function that gets passed the effect and its parameters, must return true to handle the effect