Skip to content
Tomasz Bachmiński edited this page Jun 22, 2019 · 12 revisions

Table of Contents

 

SkillEffect


SkillEffect:AddQueuedAirStrike

Adds a queued air strike to the skill effect.


SkillEffect:AddQueuedAnimation

Adds a queued animation to the skill effect.


SkillEffect:AddQueuedBoardshake

Adds a queued board shake to the skill effect.


SkillEffect:AddQueuedBounce

Adds a queued bounce to the skill effect.


SkillEffect:AddQueuedDelay

Adds a queued delay to the skill effect.


SkillEffect:AddQueuedDropper

Adds a queued dropper to the skill effect.


SkillEffect:AddQueuedEmitter

Adds a queued emitter to the skill effect.


SkillEffect:AddQueuedGrapple

Adds a queued grappling attack to the skill effect.


SkillEffect:AddQueuedLeap

Adds a queued leap to the skill effect.


SkillEffect:AddQueuedSound

Adds a queued sound to the skill effect.


SkillEffect:GetMetadata

Extracts metadata from the skill effect's damage list instance and returns it as a list of tables. Each index in the list corresponds to a SpaceDamage instance in the skill effect's damage list. If the damage list is empty (skill effect consists only of queued attacks), the metadata list is also be empty.

Shared metadata table fields:

  • type - type of the SpaceDamage
  • source - location of the pawn using the skill effect, or nil if not available. Not sure how it'll behave when used via Board:AddEffect.
  • target - location of the SpaceDamage instance (SpaceDamage.loc)

Currently, metadata is only available for SpaceDamage instances added via the following methods (and their queued variants):

  • SkillEffect:AddGrapple
    • anim - third argument passed to AddGrapple function, assuming it specifies the grappling animation
  • SkillEffect:AddProjectile
    • projectileArt - sprite used for the projectile
  • SkillEffect:AddArtillery
    • projectileArt - sprite used for the projectile

Example:

local fx -- the skill effect
local metadata = fx:GetMetadata()

if #metadata == 0 then
    -- table is empty, the skill effect only has queued entries
end

for i, v in ipairs(metadata) do
    -- each index in the metadata table corresponds to a SpaceDamage instance in the skill effect
    if v then
        -- we have metadata available for this index
        LOG(i, save_table(v)) -- print it to the console for inspection
    end
end

SkillEffect:GetQueuedMetadata

See SkillEffect:GetMetadata - this does the same thing, except for queued SpaceDamage instances.

Clone this wiki locally