The tile object

From Scenario League Wiki
Revision as of 22:17, 1 January 2019 by Prof. Garfield (talk | contribs) (x,y,z had (get in the link)
Jump to navigationJump to search

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.