Module ...
Handles actors projecting damage to zones/targets
Functions
_M:canProject (t, x, y) | Can we project to this grid ? This function can be used for either just the boolean, or to tell you where the projection stops. |
_M:project (t, x, y, damtype, dam, particles) | Project damage to a distance |
_M:projectile (t, x, y, damtype, dam, particles) | Project damage to a distance using a moving projectile |
Functions
- _M:canProject (t, x, y)
-
Can we project to this grid ? This function can be used for either just the boolean, or to tell you where the projection stops. Two sets of coordinates will be returned, one for where the projection stops (stop_x, stop_y) and one for where any radius effect should start from (radius_x, radius_y). The distinction is made because a projection should hit the wall, but explosions should start one tile back to avoid "leaking" through a one tile thick wall.
Parameters
- t: a type table describing the attack, passed to engine.Target:getType() for interpretation
- x: target coords
- y: target coords
Return value:
can_project, stop_x, stop_y, radius_x, radius_y. - _M:project (t, x, y, damtype, dam, particles)
-
Project damage to a distance
Parameters
- t: a type table describing the attack, passed to engine.Target:getType() for interpretation
- x: target coords
- y: target coords
- damtype: a damage type ID from the DamageType class
- dam: damage to be done
- particles: particles effect configuration, or nil
- _M:projectile (t, x, y, damtype, dam, particles)
-
Project damage to a distance using a moving projectile
Parameters
- t: a type table describing the attack, passed to engine.Target:getType() for interpretation
- x: target coords
- y: target coords
- damtype: a damage type ID from the DamageType class
- dam: damage to be done
- particles: particles effect configuration, or nil