The tile object: Difference between revisions

From Scenario League Wiki
Jump to navigationJump to search
m (x,y,z had (get in the link)
m (Added to category lua resources)
 
Line 1: Line 1:
[[Category: Resources]]
[[Category:Lua Resources]]
Back To [[TOTPP Functions]]
Back To [[TOTPP Functions]]



Latest revision as of 20:10, 26 January 2019

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.