Class engine.generator.interface.ActorTemporaryEffects

Handles actors temporary effects (temporary boost of a stat, ...)

Functions

Methods



Functions

engine.generator.interface.ActorTemporaryEffects.loadDefinition (file, env) STATIC
Defines actor temporary effects

Parameters:

  • file
  • env
engine.generator.interface.ActorTemporaryEffects.newEffect (t) STATIC
Defines one effect

Parameters:

  • t

Methods

engine.generator.interface.ActorTemporaryEffects:init (t)
init

Parameters:

  • t
engine.generator.interface.ActorTemporaryEffects:getEffectFromId (id)
Returns the effect definition

Parameters:

  • id
engine.generator.interface.ActorTemporaryEffects: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
engine.generator.interface.ActorTemporaryEffects: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
engine.generator.interface.ActorTemporaryEffects:hasEffect (eff_id)
Check timed effect

Parameters:

  • eff_id the effect to check for

Returns:

    nil

Or

    the parameters table for the effect
engine.generator.interface.ActorTemporaryEffects:removeEffect (eff, silent, force)
Removes the effect

Parameters:

  • eff
  • silent
  • force
engine.generator.interface.ActorTemporaryEffects:copyEffect (eff_id)
Copy an effect ensuring temporary values are managed properly

Parameters:

  • eff_id the effect to copy

Returns:

    nil

Or

    the parameters table for the effect
engine.generator.interface.ActorTemporaryEffects:alterEffectDuration (eff_id, v)
Reduces time remaining

Parameters:

  • eff_id
  • v
engine.generator.interface.ActorTemporaryEffects:removeAllEffects ()
Removes the effect
engine.generator.interface.ActorTemporaryEffects:effectTemporaryValue (eff, k, v)
Helper function to add temporary values and not have to remove them manualy

Parameters:

  • eff
  • k
  • v
engine.generator.interface.ActorTemporaryEffects:effectParticles (eff, ...)
Helper function to add particles and not have to remove them manualy

Parameters:

  • eff
  • ...
engine.generator.interface.ActorTemporaryEffects:callEffect (eff_id, name, ...)
Trigger an effect method

Parameters:

  • eff_id
  • name
  • ...
generated by LDoc 1.4.3