Skip to content
Tomasz Bachmiński edited this page Jun 26, 2019 · 7 revisions

Table of Contents

 

SpaceDamage

 

ListFields

Lists all fields a SpaceDamage can hold. Useful for iterating.

Example:

for _, k in ipairs(spaceDamage:ListFields()) do
    LOG(k)
end

 

Clone

Copies this SpaceDamage instance and returns a new one, that holds the exact same data.

Example:

local dmg1 = SpaceDamage(Point(0, 0), 1)
local dmg2 = source:Clone()
dmg2.iDamage = 2
Board:DamageSpace(dmg1)
Board:DamageSpace(dmg2)
-- 3 damage total to Point(0, 0)

 

ToTable

Converts this SpaceDamage to a table.

Example:

local table = spaceDamage:ToTable()
LOG(table.loc, table.iDamage)

 

IsMetadata

Returns true if this SpaceDamage instance is a metadata instance added by the mod loader.
Metadata instances hold additional information about the SpaceDamage instance that comes after them in the DamageList.

For details, see SkillEffect:GetMetadata

Clone this wiki locally