The tile object: Difference between revisions

From Scenario League Wiki
Jump to navigationJump to search
(Created Page)
 
m (x,y,z had (get in the link)
Line 2: Line 2:
Back To [[TOTPP Functions]]
Back To [[TOTPP Functions]]


[[tile.x|x (]]get)
[[tile.x|x]] (get)


<code>tile.x -> integer</code>
<code>tile.x -> integer</code>
Line 9: Line 9:




[[tile.y|y (]]get)
[[tile.y|y]] (get)


<code>tile.y -> integer</code>
<code>tile.y -> integer</code>
Line 16: Line 16:




[[tile.z|z (]]get)
[[tile.z|z]] (get)


<code>tile.z -> integer</code>
<code>tile.z -> integer</code>

Revision as of 22:17, 1 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.