-
Notifications
You must be signed in to change notification settings - Fork 17
Board
- GetHighlighted
- IsHighlighted
- IsMissionBoard
- IsTipImage
- MovePawnsFromTile
- RestorePawnsToTile
- SetFire
- SetShield
Signature: Point GetHighlighted()
Returns the current tile being highlighted by the mouse cursor.
Returns nil
if no tile is highlighted.
Argument name | Type | Description |
---|---|---|
loc |
Point | The tile we want to check |
Returns true if the specified tile is currently highlighted by the mouse cursor. false
otherwise.
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.
Signature: boolean IsTipImage()
Returns true if this board is part of a tip image. false
otherwise.
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)
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
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.
Argument name | Type | Description |
---|---|---|
loc |
Point | The tile that will be affected |
shield |
boolean | Whether the tile should be shielded, or unshielded |
Adds a shield to any pawn, building or mountain on the specified tile if the second argument is true
, or removes any shield if it is false
.