-
Notifications
You must be signed in to change notification settings - Fork 17
SkillEffect
- AddQueuedAirStrike
- AddQueuedAnimation
- AddQueuedBoardshake
- AddQueuedBounce
- AddQueuedDelay
- AddQueuedDropper
- AddQueuedEmitter
- AddQueuedGrapple
- AddQueuedLeap
- AddQueuedSound
- GetMetadata
- GetQueuedMetadata
- AddSafeDamage
- AddQueuedSafeDamage
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 theSpaceDamage
-
source
- location of the pawn using the skill effect, or nil if not available. Not sure how it'll behave when used viaBoard:AddEffect
. -
target
- location of theSpaceDamage
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 toAddGrapple
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
See GetMetadata
- this does the same thing, except for queued SpaceDamage
instances.
Argument name | Type | Description |
---|---|---|
spaceDamage |
SpaceDamage | The space damage instance describing the damage to deal |
Adds the specified damage instance to this SkillEffect in a way that deals damage only to pawns at the specified location, without causing any side effects to the board. Does nothing if the space damage's location points to a building.
Example:
local pawn = Board:GetPawn(0)
Board:SetTerrain(pawn:GetSpace(), TERRAIN_FOREST)
local fx = SkillEffect()
fx:AddSafeDamage(SpaceDamage(1))
Board:AddEffect(fx)
-- The pawn will be damaged, but the forest it is standing on will not be set on fire
See AddSafeDamage
- this does the same thing, except for queued SpaceDamage
instances.
Adds a queued air strike to the skill effect.
Adds a queued animation to the skill effect.
Adds a queued board shake to the skill effect.
Adds a queued bounce to the skill effect.
Adds a queued delay to the skill effect.
Adds a queued dropper to the skill effect.
Adds a queued emitter to the skill effect.
Adds a queued grappling attack to the skill effect.
Adds a queued leap to the skill effect.
Adds a queued sound to the skill effect.