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

Table of Contents

 

SpaceDamage

 

ListFields

Signature: table ListFields()

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

Example:

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

 

Clone

Signature: SpaceDamage 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 = dmg1:Clone()
dmg2.iDamage = 2
Board:DamageSpace(dmg1)
Board:DamageSpace(dmg2)
-- 3 damage total to Point(0, 0)

 

ToTable

Signature: table ToTable()

Converts this SpaceDamage to a table.

Example:

local spaceDamage = SpaceDamage(Point(1, 2), 3)
local table = spaceDamage:ToTable()
LOG(table.loc, table.iDamage)

 

IsMetadata

Signature: boolean 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