Class engine.DamageType

Defines damage types used by actors

Functions

engine.DamageType.loadDefinition (file)

Defines new damage type

engine.DamageType.newDamageType (t)

Defines one ability type(group)

Methods

engine.DamageType:defaultProject (src, x, y, type, dam)

Default damage projector needs to be overridden, as the default functionality just prints to the console

engine.DamageType:get (id)

Fetches the damage type by the string id
throws an assert

engine.DamageType:exists (id)

Checks if our damage type exists

engine.DamageType:projectingFor (src, v)

Allows an actor to project for another actor

engine.DamageType:getProjectingFor (src)

Who is this actor projecting for?



Functions

engine.DamageType.loadDefinition (file) STATIC
Defines new damage type

Parameters:

  • file string loads a definition from a lua file
engine.DamageType.newDamageType (t) STATIC
Defines one ability type(group)

Parameters:

Methods

engine.DamageType:defaultProject (src, x, y, type, dam)
Default damage projector needs to be overridden, as the default functionality just prints to the console

Parameters:

  • src Actor what is projecting
  • x int x coordinate
  • y int y coordinate
  • type type of damage
  • dam int amount of damage
engine.DamageType:get (id)
Fetches the damage type by the string id
throws an assert

Parameters:

Returns:

    damage type
engine.DamageType:exists (id)
Checks if our damage type exists

Parameters:

Returns:

    nil

Or

    damage type
engine.DamageType:projectingFor (src, v)
Allows an actor to project for another actor

Parameters:

engine.DamageType:getProjectingFor (src)
Who is this actor projecting for?

Parameters:

Returns:

    Actor
generated by LDoc 1.4.3