-
Notifications
You must be signed in to change notification settings - Fork 17
[Vanilla] SpaceDamage
A SpaceDamage
is an object that describes a single action that affects the game board in some way. This may be actual damage; a move action by a pawn; or a change of terrain on a particular board tile. All damage in the game is specified as damage that happens at a board tile, which then also applies to any Pawn that happens to be standing at that tile.
Dealing damage to a Pawn without affecting the tile it is standing on (or vice versa) is possible with the use of helper functions/libraries, but the game does not provide anything for that out-of-the-box.
Functions:
IsMovementMoveEndMoveStart
Fields:
- bEvacuate
- bHide
- bHidePath
- bSimpleMark
- fDelay
- iAcid
- iFire
- iFrozen
- iShield
- iSmoke
- iDamage
- iPawnTeam
- iPush
- iTerrain
- loc
- sAnimation
- sImageMark
- sItem
- sPawn
- sScript
- sSound
TODO
Type: boolean
Setting this field to true
will cause it to evacuate civillians in the building at the tile specified by this SpaceDamage's loc
field.
Evacuated buildings don't cause the player to lose grid when damaged, and don't reduce the "lives saved" score.
Type: boolean
Setting this field to true
will prevent some of its effects from being previewed on the game board during targeting, or when its parent SkillEffect is queued.
Type: boolean
Unknown?
Type: boolean
Unknown?
Type: float
Setting this to non-zero value will add that much delay (in seconds) after this SpaceDamage has been executed, holding the board in a busy state for a longer period of time, and delaying execution of further SpaceDamage instances.
It is also possible to specify negative values, which the game interprets in some way. For example, -1
supposedly waits until the board is no longer in a busy state.
Type: integer
Setting this field either creates or removes Acid at the tile specified by this SpaceDamage's loc
field.
Technically an integer, but actually takes only the following values:
-
EFFECT_REMOVE
(-1
) - removes the Acid -
EFFECT_CREATE
(1
) - applies the Acid -
0
- does not change the Acid status in any way
Type: integer
Setting this field either creates or removes Fire at the tile specified by this SpaceDamage's loc
field.
Technically an integer, but actually takes only the following values:
-
EFFECT_REMOVE
(-1
) - removes the Fire -
EFFECT_CREATE
(1
) - applies the Fire -
0
- does not change the Fire status in any way
Type: integer
Setting this field either applies or removes Frozen status to the entity at the tile specified by this SpaceDamage's loc
field.
Technically an integer, but actually takes only the following values:
-
EFFECT_REMOVE
(-1
) - removes the Frozen status -
EFFECT_CREATE
(1
) - applies the Frozen status -
0
- does not change the Frozen status in any way
Type: integer
Setting this field either applies or removes Shield status to the entity at the tile specified by this SpaceDamage's loc
field.
Technically an integer, but actually takes only the following values:
-
EFFECT_REMOVE
(-1
) - removes the Shield status -
EFFECT_CREATE
(1
) - applies the Shield status -
0
- does not change the Shield status in any way
Type: integer
Setting this field either creates or removes Smoke at the tile specified by this SpaceDamage's loc
field.
Technically an integer, but actually takes only the following values:
-
EFFECT_REMOVE
(-1
) - removes the Smoke -
EFFECT_CREATE
(1
) - applies the Smoke -
0
- does not change the Smoke status in any way
Type: integer
Specifies the amount of damage dealt at the tile specified by this SpaceDamage's loc
field.
Can also set this to constants recognized by the game:
-
DAMAGE_ZERO
- displays a0
damage counter over the tile -
DAMAGE_DEATH
- displays a skull image over the tile
Type: integer
Changes the team of the pawn at the tile specified by this SpaceDamage's loc
field.
Technically an integer, but actually takes the following constant values:
TEAM_ANY
TEAM_BOTS
TEAM_ENEMY
TEAM_ENEMY_MAJOR
TEAM_MECH
TEAM_NONE
TEAM_PLAYER
Type: integer
Adds a push effect at the tile specified by this SpaceDamage's loc
field.
Technically an integer, but actually takes the following constant values, which define direction of the push:
-
DIR_UP
(0
) - pushes in north-east direction (⬈) -
DIR_RIGHT
(1
) - pushes in south-east direction (⬊) -
DIR_DOWN
(2
) - pushes in south-west direction (⬋) -
DIR_LEFT
(3
) - pushes in north-west direction (⬉)
Type: integer
Changes the terrain at the tile specified by this SpaceDamage's loc
field.
Technically an integer, but actually takes the following constant values, which define the type of terrain to change to:
TERRAIN_ACID
-
TERRAIN_BUILDING
- creates a tile of 4 buildings at the specified tile TERRAIN_FIRE
TERRAIN_FOREST
TERRAIN_HOLE
TERRAIN_ICE
TERRAIN_LAVA
TERRAIN_MOUNTAIN
-
TERRAIN_ROAD
- creates a regular grassy tile -
TERRAIN_RUBBLE
- creates a destroyed mountain tile, if the tile was previously a mountain; or a destroyed building tile, for other tiles. TERRAIN_SAND
TERRAIN_WATER
Type: Point
Specifies the location at which this SpaceDamage's effects will occur. Defaults to Point(-1, -1)
.
Type: string
Unknown?
Type: string
Unknown?
Type: string
Creates an item of the specified type at the tile specified by this SpaceDamage's loc
field.
This generally means things like mines etc. that will trigger a SpaceDamage instance once stepped on by a Pawn.
Type: string
Spawns a pawn of the specified type at the tile specified by this SpaceDamage's loc
field.
Type: string
Executes the lua script specified in the string.
The script is executed in a global scope, and does not have acces to any local variables. In order to pass parameters to the script, you need to use either global variables, or (if they have a stringified representation) pass them as strings.
Example of string-based parameter passing:
local d = SpaceDamage()
d.sScript = string.format([[
local pawn = Board:GetPawn(%s)
pawn:SetSpace(%s)
]],
Point(4, 4):GetString(),
Point(2, 2):GetString()
)
Type: string
Plays the sound at the specified path (inside the game's .bank
sound files) when the SpaceDamage instance is executed.