Class engine.generator.interface.ActorProject

Handles actors projecting damage to zones/targets

Methods



Methods

engine.generator.interface.ActorProject: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 or a function to be called as damtype(px, py, t, self) on each grid
  • dam damage to be done
  • particles particles effect configuration, or nil
engine.generator.interface.ActorProject: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 (stopx, stopy) and one for where any radius effect should start from (radiusx, radiusy). 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 table a type table describing the attack, passed to engine.Target:getType() for interpretation
  • x number target coords
  • y number target coords

Returns:

  1. can_project
  2. stop_x
  3. stop_y
  4. radius_x
  5. radius_y
engine.generator.interface.ActorProject:getTargetLimited (t)
Calls :getTarget and :canProject to limit the results and returns the same as getTarget

Parameters:

  • t
engine.generator.interface.ActorProject:getTargetLimitedWallStop (t)
Calls :getTarget and :canProject to limit the results and returns the same as getTarget

Parameters:

  • t
engine.generator.interface.ActorProject: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
engine.generator.interface.ActorProject:projectDoMove (typ, tgtx, tgty, x, y, srcx, srcy)
Do move

Parameters:

  • typ a target type table
  • tgtx the target's x-coordinate
  • tgty the target's y-coordinate
  • x the projectile's x-coordinate
  • y the projectile's y-coordinate
  • srcx the sourcs's x-coordinate
  • srcy the source's y-coordinate

Returns:

  1. lx x-coordinate the projectile travels to next
  2. ly y-coordinate the projectile travels to next
  3. act should we call projectDoAct() (usually only for beam)
  4. stop is this the last (blocking) tile?
engine.generator.interface.ActorProject:projectDoAct (typ, tg, damtype, dam, particles, px, py, tmp)
projectDoAct

Parameters:

  • typ
  • tg
  • damtype
  • dam
  • particles
  • px
  • py
  • tmp Now project on each grid, one type Call the projected method of the target grid if possible
engine.generator.interface.ActorProject:projectDoStop (typ, tg, damtype, dam, particles, lx, ly, tmp, rx, ry, projectile)
projectDoStop

Parameters:

  • typ
  • tg
  • damtype
  • dam
  • particles
  • lx
  • ly
  • tmp
  • rx
  • ry
  • projectile
generated by LDoc 1.4.3