baseTerrainObject πŸ”—

A base terrain object is a data type provided by the Test of Time Patch Project Lua Interpreter. It represents the β€˜basic’ terrain characteristics for a terrain type, which is to say those aspects of terrain which do not change for special resources. The β€˜terrain’ object deals with the characteristics that do change for special resources. Lua Function Reference

abbrev πŸ”—

baseTerrainObject.abbrev --> string

(get) The terrain abbreviation for this baseTerrain (e.g. β€˜Drt’, β€˜Pln’ etc.).

canIrrigate πŸ”—

baseTerrainObject.canIrrigate --> boolean

(get/set - ephemeral) Returns true if the underlying terrain type allows irrigation, false otherwise.

canMine πŸ”—

baseTerrainObject.canMine --> boolean

(get/set - ephemeral) Returns true if the underlying terrain type allows mining, false otherwise.

defense πŸ”—

baseTerrainObject.defense --> integer

(get/set - ephemeral) The defense factor of the underlying terrain type.

getTerrain πŸ”—

(method) baseTerrainObject:getTerrain(resource: 0|1|2)
  -> terrain: terrainObject

Returns the terrain object corresponding to the underlying terrain type and the given resource.

resource:
    \| 0 -- no resource
    \| 1 -- fish resource
    \| 2 -- whales resource

impassable πŸ”—

baseTerrainObject.impassable --> boolean

(get/set - ephemeral) Returns true if the underlying terrain type is impassable, false otherwise.

irrigateAI πŸ”—

baseTerrainObject.irrigateAI --> integer

(get/set - ephemeral) The minimum government level needed for the AI to consider irrigating.

irrigateBonus πŸ”—

baseTerrainObject.irrigateBonus --> integer

(get/set - ephemeral) The extra amount of food from irrigation.

irrigateTo πŸ”—

baseTerrainObject.irrigateTo --> baseTerrainObject|nil

(get/set - ephemeral) If the irrigation order changes the underlying terrain type return the baseTerrain of the new terrain type, nil otherwise.

irrigateTurns πŸ”—

baseTerrainObject.irrigateTurns --> integer

(get/set - ephemeral) The number of turns for settlers to irrigate.

map πŸ”—

baseTerrainObject.map --> integer

(get) The map associated with the baseTerrain object.

mineAI πŸ”—

baseTerrainObject.mineAI --> integer

(get/set - ephemeral) The minimum government level needed for the AI to consider mining.

mineBonus πŸ”—

baseTerrainObject.mineBonus --> integer

(get/set - ephemeral) The extra amount of production from mining.

mineTo πŸ”—

baseTerrainObject.mineTo --> baseTerrainObject|nil

(get/set - ephemeral) If the mine order changes the underlying terrain type return the baseTerrain of the new terrain type, nil otherwise.

mineTurns πŸ”—

baseTerrainObject.mineTurns --> integer

(get/set - ephemeral) The number of turns for settlers to mine.

moveCost πŸ”—

baseTerrainObject.moveCost --> integer

(get/set - ephemeral) The movement cost of the underlying terrain type.

name πŸ”—

baseTerrainObject.name --> string

(get) The name of this baseTerrain.

transformTo πŸ”—

baseTerrainObject.transformTo --> baseTerrainObject|nil

(get/set - ephemeral) If the underlying terrain type can be transformed return the baseTerrain of the new terrain type, nil otherwise.

type πŸ”—

baseTerrainObject.type --> integer

(get) The terrain type associated with the baseTerrain object.