-
Notifications
You must be signed in to change notification settings - Fork 17
SpaceDamage
Lemonymous edited this page May 6, 2023
·
7 revisions
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)
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
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
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)