The tile object

From Scenario League Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Back To TOTPP Functions

x (get)

tile.x -> integer

Returns the `x` coordinate of the tile.


y (get)

tile.y -> integer

Returns the `y` coordinate of the tile.


z (get)

tile.z -> integer

Returns the `z` coordinate of the tile (map number).


terrainType (get/set)

tile.terrainType -> integer

Returns the terrain type of the tile.


owner (get)

tile.owner -> tribe

Returns the tribe owning the tile.


improvements (get/set)

tile.improvements -> integer

Returns the tile's improvements (bitmask).


fertility (get/set)

tile.fertility -> integer

Returns the tile's fertility.


landmass (get/set)

tile.landmass -> integer

Returns the tile's landmass index.


city (get)

tile.city -> city

Returns the city at the tile's location, or `nil` if there's no city there.


units (get)

tile.units -> iterator

Returns an iterator yielding all units at the tile's location.


defender (get)

tile.defender -> tribe

Returns the tile's defender.