-
Notifications
You must be signed in to change notification settings - Fork 17
[Vanilla] Board
This page describes the vanilla functions of Board
.
- For a page about the
Board
class functions added by the mod loader, see Board. - For a page about the
Board
class functions added by the memedit, see Board.
-
Board
- AddAlert
- AddAnimation
- AddBurst
- AddEffect
- AddPawn
- AddShield
- AddTeleport
- AddUniqueBuilding
- BlockSpawn
- Bounce
- ClearBlockSpawns
- ClearSpace
- Crack
- DamageSpace
- Fade
- GetAnotherPlayerPawn
- GetBuildings
- GetBuildingCount
- GetBusyState
- GetCustomTile
- GetDeployLocScore
- GetDistance
- GetDistanceToBuilding
- GetDistanceToPawn
- GetEnemyCount
- GetHealth
- GetInfectedCount
- GetItem
- GetMechDamage
- GetPath
- GetPawn
- GetPawns
- GetPawnCount
- GetPawnSpace
- GetPawnTeam
- GetRandomBuilding
- GetReachable
- GetSimplePath
- GetSimpleReachable
- GetSize
- GetTerrain
- GetTurn
- GetZone
- IsAcid
- IsBlocked
- IsBuilding
- IsBusy
- IsCrackable
- IsCracked
- IsDamaged
- IsDangerous
- IsDangerousItem
- IsDeadly
- IsEdge
- IsEnvironmentDanger
- IsFire
- IsFrozen
- IsItem
- IsPawnAlive
- IsPawnSpace
- IsPawnTeam
- IsPod
- IsPowered
- IsSafe
- IsSmoke
- IsSpawning
- IsTargeted
- IsTerrain
- IsUniqueBuilding
- IsValid
- IsVines
- IsWall
- LockBomb
- MarkFlashing
- MarkSpaceColor
- MarkSpaceDamage
- MarkSpaceDesc
- MarkSpaceImage
- MarkSpaceSimpleColor
- Ping
- RandomizeTerrain
- RemovePawn
- RemoveShield
- SetAcid
- SetCustomTile
- SetDangerous
- SetFrozen
- SetHealth
- SetItem
- SetLava
- SetPopulated
- SetSmoke
- SetTerrain
- SetTerrainIcon
- SetWall
- SetWeather
- Slide
- SpawnPawn
- SpawnQueued
- StartMechTravel
- StartPopEvent
- StartShake
- StopWeather
-
void
Board:AddAlert(tile, alert)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to add the alert on |
alert |
string | The text to display |
Displays text at the chosen tile.
-
void
Board:AddAnimation(location, animationId, delayIndex)
Argument name | Type | Description |
---|---|---|
location |
Point | The board tile we want to add the animation to |
animationId |
string | The id of the animation we want to add |
delayIndex |
number | An index specifying the direction of the animation, and whether it makes the board busy |
Adds an animation to the board at the specified location. The animation id is the name of the animation in the table ANIMS
, which holds all animations.
Delay index:
Index | Global name | Direction | Busy Board |
---|---|---|---|
1 | ANIM_NO_DELAY | forward | no |
2 | ANIM_DELAY | forward | yes |
4 | ANIM_REVERSE | reverse | no |
6 | - | reverse | yes |
-
void
Board:AddBurst(Point, string, int)
Missing argument list
Missing description
-
void
Board:AddEffect(SpaceDamage)
-
void
Board:AddEffect(SkillEffect)
Argument name | Type | Description |
---|---|---|
spaceDamage |
SpaceDamage | The SpaceDamage object we want to apply to the board |
skillEffect |
SkillEffect | The SkillEffect object we want to apply to the board |
Applies a SkillEffect object to the board, which is essentially a list of SpaceDamage objects carried out in sequence; or applies a single SpaceDamage object to the board.
-
Point
Board:AddPawn(pawnType, zone)
-
Point
Board:AddPawn(pawnType, location)
-
Point
Board:AddPawn(pawnType)
-
Point
Board:AddPawn(pawn, zone)
-
Point
Board:AddPawn(pawn, location)
-
Point
Board:AddPawn(pawn)
Argument name | Type | Description |
---|---|---|
pawnType |
string | The name of the pawn we want to add |
pawn |
BoardPawn | The BoardPawn object we want to add to the board |
location |
Point | The zone we want to add the pawn to |
zone |
string | The zone we want to add the pawn to |
Adds a unit to the board, with several possible signatures. The first argument specified what to place. The second argument, if any, specified where to place it.
- If a
pawnType
is specified, a unit with this type will be created and placed according to the second argument - If a
pawn
object is specified, this unit will be placed according the second argument - If a
location
is given, the unit will be placed there - If a
zone
is given, the unit will be placed on one of the remaining available tiles in that zone. Otherwise it will not be placed - If there is no second argument, the unit will be placed on a random location
-
void
Board:AddShield(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The board tile we want to add the shield to |
Adds a shield to Mountains, Buildings or the unit occupying the specified tile.
-
void
Board:AddTeleport(tileA, tileB)
Argument name | Type | Description |
---|---|---|
tileA |
Point | The board tile of the first end of the teleporter |
tileB |
Point | The board tile of the other end of the teleporter |
Adds two teleporter pads that teleport between each other. The first call to this function creates red teleporter pads. The second, and every subsequent call adds blue teleporter pads. It is possible to remove teleporter pad graphics by changing the terrain; but there are currently no known ways to remove their effect once they have been placed.
-
Point
Board:AddUniqueBuilding(buildingType)
Argument name | Type | Description |
---|---|---|
buildingType |
string | The type of the unique building |
Changes a random building into a unique building of the specified type, and returns the tile that was changed.
-
void
Board:BlockSpawn(location, blockDurationIndex)
Argument name | Type | Description |
---|---|---|
location |
Point | The location of the board tile we want to block |
blockDurationIndex |
number | An index specifying how long the spawn block will last |
Block units that have random spawning locations from spawning on the specific tile. Does not block spawning units if their spawn location is specified with tile or zone.
Block duration index:
Index | Global name | Duration |
---|---|---|
1 | BLOCK_TEMP | 1 turn |
2 | BLOCK_PERM | Until mission end |
-
int
Board:Bounce(tile, height)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to bounce |
height |
int | The amount of bounciness |
Visually moves a tile up or down, then returns it to its original position. Positive values move it down, negative values move it up. A value of 0 makes the tile invisible until the board graphics are updated (unsure this is the correct term, it reappears on turn reset), even if damaged.
-
void
Board:ClearBlockSpawns()
Clears blocked spawns set by BlockSpawn.
-
void
Board:ClearSpace(location)
Argument name | Type | Description |
---|---|---|
location |
Point | The location we want to clear |
Clears the specified tile on the board for most things. Removing any units on it, and changing it to TERRAIN_ROAD.
Note: There are certain features that will not be removed by this function.
-
void
Board:Crack(int)
Missing argument list
Missing description
-
void
Board:DamageSpace(Point, int)
-
void
Board:DamageSpace(SpaceDamage)
Missing argument list
Missing description
-
void
Board:Fade(int)
Missing argument list
Missing description
-
int
Board:GetAnotherPlayerPawn(int, int)
Missing argument list
Missing description
-
PointList
Board:GetBuildings()
Missing argument list
Missing description
-
int
Board:GetBuildingCount(int)
Missing argument list
Missing description
-
int
Board:GetBusyState()
Returns an integer larger than 0 if the board is busy, or 0 if the board is busy. The return value indicates what the Board is busy doing.
-
string
Board:GetCustomTile(Point)
Missing argument list
Missing description
-
number
Board:GetDeployLocScore(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Unknown.
-
int
Board:GetDistance(Point, Point, int)
Missing argument list
Missing description
-
int
Board:GetDistanceToBuilding(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns the distance from tile
to the closest building. Returns 0 if tile
contains a buillding.
-
int
Board:GetDistanceToPawn(tile, team)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
team |
int | The constant representing the team of the pawn |
Returns the closest pawn to tile
that belongs to team
. Returns 0 if a pawn of team
is on tile
. team
takes values like TEAM_ENEMY
, TEAM_PLAYER
, or TEAM_ANY
.
-
int
Board:GetEnemyCount()
Missing argument list
Missing description
-
int
Board:GetHealth(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns the health of a board tile; intact mountains return 2, damaged mountains return 1, buildings return however many buildings are still standing on that tile. Returns strange results for ground tiles.
-
int
Board:GetInfectedCount()
Unknown.
-
string
Board:GetItem(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns the string of the item definition that is on the specified tile
, or a blank string if there is none.
-
int
Board:GetMechDamage()
Returns the total amount of damage currently taken by mechs. This is used in the "finish battle with less than 4 Mech Damage" objective.
-
PointList
Board:GetPath(start, end, pathProfile)
Argument name | Type | Description |
---|---|---|
start |
Point | The board tile we want to start from |
end |
Point | The board tile we want to end at |
pathProfile |
int | The path profile governing movement |
Returns a PointList
consisting of the path a pawn with pathProfile
would use to move from start
to end
.
For a pawn with 4 movement, it would contain up to 5 points, starting with start
and ending with end
.
-
Pawn
Board:GetPawn(int)
-
Pawn
Board:GetPawn(Point, bool)
-
Pawn
Board:GetPawn(Point)
Missing argument list
Missing description
-
IntList
Board:GetPawns(team)
Argument name | Type | Description |
---|---|---|
team |
int | The team whose pawns you want |
Returns a list containing the IDs of all pawns on the board in team
. You can also use TEAM_ANY
as the value for team
to get all pawns.
-
int
Board:GetPawnCount(int)
-
int
Board:GetPawnCount(string)
Missing argument list
Missing description
-
Point
Board:GetPawnSpace(int)
Missing argument list
Missing description
-
int
Board:GetPawnTeam(int, int)
-
int
Board:GetPawnTeam(Point)
Missing argument list
Missing description
-
Point
Board:GetRandomBuilding(bool)
Missing argument list
Missing description
-
PointList
Board:GetReachable(originTile, distance, pathProfile)
Argument name | Type | Description |
---|---|---|
originTile |
Point | The board tile we want to start from |
distance |
int | The max distance from originTile |
pathProfile |
int | The path profile governing movement |
Returns the list of all points a pawn with pathProfile
in originTile
can move to within a distance of distance
or less.
-
PointList
Board:GetSimplePath(originTile, destinationTile)
Argument name | Type | Description |
---|---|---|
originTile |
Point | The board tile we want to start from |
destinationTile |
string | The board tile we want to end up at |
Returns a PointList of Points between originTile
and destinationTile
. If a simple path cannot be found, and empty PointList will be returned. (needs more investigation regarding what constitutes a simple path)
-
PointList
Board:GetSimpleReachable(originTile, distance, flag)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
distance |
int | The distance from the original tile we want to travel |
flag |
boolean | unknown - something with diagonals |
Returns a PointList of Points. (needs more investigation)
-
Point
Board:GetSize()
Returns a Point with x and y equal the size of the Board.
-
int
Board:GetTerrain(int, int)
-
int
Board:GetTerrain(Point)
Missing argument list
Missing description
-
int
Board:GetTurn()
Missing argument list
Missing description
-
PointList
Board:GetZone(zone)
Argument name | Type | Description |
---|---|---|
zone |
string | The name of the zone we want to retrieve the PointList for |
Some maps have special "zones" defined in the map file. These "zones" are a list of Point
s on the board, and are usually used by the missions to place units, or interact with certain tiles in some way.
Some examples of deployment zones used in vanilla maps. Modded maps could have additional zones defined.
Zone | Description |
---|---|
acid | unknown |
barrels | Barrel locations |
belt | Belt locations |
deployment | Custom deployment zone used in some maps. Most maps use the default 3x6 deployment zone minus invalid deployment tiles |
disposal | Disposal Unit locations |
enemy | Enemy deployment zone |
falling | Falling tiles when the first phase of the final battle is over. Does not account for Mechs standing outside this region, whose tiles collapse as a special hard-coded case |
filler | Earth Mover locations |
lasers | Laser locations |
pistons | Piston locations |
pylons | Pylon locations in the final battle |
return | seems to be used in some unused capture the flag maps |
satellite | Satellite Rockets locations |
-
bool
Board:IsAcid(Point)
Missing argument list
Missing description
-
boolean
Board:IsBlocked(tile, pathing)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
pathing |
int | The pathing type we want to check |
Returns true
if the tile
is blocked for the specified pathing
type; otherwise false
.
-
bool
Board:IsBuilding(int, int)
-
bool
Board:IsBuilding(Point)
Missing argument list
Missing description
-
boolean
Board:IsBusy()
Returns true
if the Board is busy doing something; otherwise false
.
-
boolean
Board:IsCrackable(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if the tile is crackable; otherwise false
. NOTE: This function was not available last I checked, but maybe it is available in a newer version of the game.
-
boolean
Board:IsCracked(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if the tile is cracked; otherwise false
.
-
bool
Board:IsDamaged(Point)
Missing argument list
Missing description
-
boolean
Board:IsDangerous(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if the specified tile
is marked as dangerous with SetDangerous; otherwise false
.
-
boolean
Board:IsDangerousItem(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if there is a dangerous item on the specified tile
; otherwise false
. A dangerous item is an item that deals damage. (needs verification)
-
boolean
Board:IsDeadly(spaceDamage, pawn)
Argument name | Type | Description |
---|---|---|
spaceDamage |
SpaceDamage | The damage event we want to test on a target pawn |
pawn |
Pawn | The pawn we want to test the damage event on |
Returns true
if the specified spaceDamage
would kill the specified pawn
if applied to the Board; otherwise false
.
-
bool
Board:IsEdge(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Checks whether a given tile is on the edge of the board(x = 1 or x = 8 or y = 1 or y = 8). Used for vanilla position score: Veks on the edge are hard to push, so they are discouraged from moving to an edge.
-
boolean
Board:IsEnvironmentDanger(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if there is an environement danger on the specified tile
; otherwise false
. Unknown what consitutes environment danger.
-
bool
Board:IsFire(Point)
Missing argument list
Missing description
-
bool
Board:IsFrozen(Point)
Missing argument list
Missing description
-
boolean
Board:IsItem(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if there is an item on the specified tile
; otherwise false
.
-
bool
Board:IsPawnAlive(int)
Missing argument list
Missing description
-
boolean
Board:IsPawnSpace(tile)
-
boolean
Board:IsPawnSpace(tile, flag)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
flag |
boolean | unknown |
Returns true
if there is a pawn on the specified tile
; otherwise false
. Unknown what the flag does.
-
bool
Board:IsPawnTeam(int, int, int)
-
bool
Board:IsPawnTeam(Point, int)
Missing argument list
Missing description
-
boolean
Board:IsPod(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if there is a pod on the specified tile
; otherwise false
.
-
bool
Board:IsPowered(Point)
Missing argument list
Missing description
-
bool
Board:IsSafe(Point)
Missing argument list
Missing description
-
bool
Board:IsSmoke(Point)
Missing argument list
Missing description
-
bool
Board:IsSpawning(Point)
Missing argument list
Missing description
-
bool
Board:IsTargeted(Point)
Missing argument list
Missing description
-
bool
Board:IsTerrain(Point, int)
Missing argument list
Missing description
-
bool
Board:IsUniqueBuilding(Point)
Missing argument list
Missing description
-
boolean
Board:IsValid(tile)
-
boolean
Board:IsValid(x, y)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
x |
int | X coordinate of the board tile we want to check |
y |
int | Y coordinate of the board tile we want to check |
Returns true
if the specified tile
is on the Board; otherwise false
.
-
bool
Board:IsVines(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Used for a scrapped enemy that spread "vines" on the battlefield. The corresponding SpaceDamage field does nothing when applied; this function likely does nothing.
-
bool
Board:IsWall(Point, int, int)
Missing argument list
Missing description
-
void
Board:LockBomb()
Missing argument list
Missing description
-
void
Board:MarkFlashing(Point, bool)
Missing argument list
Missing description
-
void
Board:MarkSpaceColor(Point, GL_Color)
Missing argument list
Missing description
-
void
Board:MarkSpaceDamage(SpaceDamage)
Missing argument list
Missing description
-
void
Board:MarkSpaceDesc(Point, string, bool)
-
void
Board:MarkSpaceDesc(Point, string)
Missing argument list
Missing description
-
void
Board:MarkSpaceImage(Point, string, GL_Color)
Missing argument list
Missing description
-
void
Board:MarkSpaceSimpleColor(Point, GL_Color)
Missing argument list
Missing description
-
void
Board:Ping(Point, GL_Color)
Missing argument list
Missing description
-
void
Board:RandomizeTerrain(int, int)
Missing argument list
Missing description
-
void
Board:RemovePawn(Pawn)
-
void
Board:RemovePawn(Point)
Missing argument list
Missing description
-
int
Board:RemoveShield(Point)
Missing argument list
Missing description
-
void
Board:SetAcid(Point, bool)
Missing argument list
Missing description
-
void
Board:SetCustomTile(Point, string)
Missing argument list
Missing description
-
boolean
Board:SetDangerous(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Marks the specified tile
as dangerous. This will make the function IsDangerous return true
for this tile
until the start of the next enemy turn. A tile that is marked as dangerous affects Vek AI (needs verification for whether it is any next turn or the next enemy turn, and how this affects Vek AI)
-
void
Board:SetFrozen(Point, bool)
Missing argument list
Missing description
-
void
Board:SetHealth(Point, int, int)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to set health |
health_curr |
int | The amount of buildings standing |
health_max |
int | The total amount of buildings (standing and destroyed) |
Change the amount of buildings on a tile: health_curr
is the amount of standing buildings and health_max
is the total amount of buildings. (so the amount of destroyed building is the difference between them)
Only works on tiles with buildings (it doesn't work on buildings' rubbles either).
This doesn't affect the Power Grid.
-
void
Board:SetItem(tile, itemType)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
itemType |
string | The item definition of the item we want to create |
Creates an item of the specified itemType
on the specified tile
.
-
void
Board:SetLava(Point, bool)
Missing argument list
Missing description
-
void
Board:SetPopulated(bool, Point)
Missing argument list
Missing description
-
void
Board:SetSmoke(Point, bool, bool)
Missing argument list
Missing description
-
void
Board:SetTerrain(Point, int)
Missing argument list
Missing description
-
void
Board:SetTerrainIcon(Point, string)
Missing argument list
Missing description
-
void
Board:SetWall(bool, Point, int)
Missing argument list
Missing description
-
void
Board:SetWeather(intensity, weather, startLoc, endLoc, duration)
Argument name | Type | Description |
---|---|---|
intensity |
int | The intensity of the weather |
weather |
int | The kind of weather |
startLoc |
Point | The first point affected |
endLoc |
Point | The last point affected |
duration |
int | The duration in seconds |
Sets the weather over a part of the board.
intensity
determines the amount of rain drops/snowflakes falling, visually speaking.
weather
determines the kind of visual effect playing. It can be either RAIN_NORMAL, RAIN_ACID, or RAIN_SNOW.
startLoc
determines the first tile affected.
endLoc
determines the last tile affected.
duration
determines the duration of the weather in seconds.
Note that only one weather may be active at once; even if they don't overlap, creating a second weather will cancel the first.
-
void
Board:Slide(int)
Missing argument list
Missing description
-
int
Board:SpawnPawn(string)
-
int
Board:SpawnPawn(string, string)
-
int
Board:SpawnPawn(string, Point)
-
void
Board:SpawnPawn(Pawn)
-
void
Board:SpawnPawn(Pawn, string)
-
void
Board:SpawnPawn(Pawn, Point)
Missing argument list
Missing description
-
void
Board:SpawnQueued()
Missing argument list
Missing description
-
void
Board:StartMechTravel()
Missing argument list
Missing description
-
void
Board:StartPopEvent(message)
Argument name | Type | Description |
---|---|---|
message |
string | The message to display |
Displays a message from a populated building. The possible values for message
are:
Opening, Closing, Closing_Dead, Closing_Perfect, Closing_Bad, Threatened, Killed, Shielded, Frozen, Wind_Triggered, Smoked.
-
void
Board:StartShake(duration)
Argument name | Type | Description |
---|---|---|
duration |
float | The duration, in seconds, for which to shake the board |
Visually shakes the board for a given duration.
-
void
Board:StopWeather()
Missing argument list
Missing description