Skip to content
Tomasz Bachmiński edited this page Jun 25, 2019 · 7 revisions

Table of Contents

 

Board

 

MovePawnsFromTile

Argument name Type Description
loc Point The location to move the pawns from

Moves all pawns on the specified tile off the board. Returns a list of all pawns that have been moved, in reverse order in which they have been placed on the tile

Use in conjunction with RestorePawnsToTile

Example:

local loc = Point(2,2)
local fx = SkillEffect()
fx:AddScript(string.format([[
	local loc = %s
	local pawnstack = Board:MovePawnsFromTile(loc)

	Board:DamageSpace(SpaceDamage(loc, 1))
	-- Tile will be damaged, but no pawns will be harmed

	Board:RestorePawnsToTile(loc, pawnstack)
]], loc:GetLuaString()))

Board:AddEffect(fx)

 

RestorePawnsToTile

Argument name Type Description
loc Point The location to restore the pawns to
pawnStack table List of all pawns that have been moved using MovePawnsFromTile

Restores all pawns in the list to the specified location, honoring the order in which they've been placed originally.

Use in conjunction with MovePawnsFromTile

 

SetFire

Argument name Type Description
loc Point The tile that will be affected
fire boolean Whether the tile should be set on fire, or extinguished

Sets the specified tile on fire if the second argument is true, or extinguishes it if it is false. Extinguishing the tile does not remove the Fire status from pawns standing on the tile.

 

IsMissionBoard

Argument name Type Description
mission table Optional argument. If provided, the function will check whether this instance is the board used in the specified mission. Defaults to currently active mission.

Returns true if this Board is the main board used in the specified mission. false otherwise, or when no mission is currently active.

Clone this wiki locally