The improvement object

From Scenario League Wiki
Revision as of 22:28, 1 January 2019 by Prof. Garfield (talk | contribs) (Created Page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Back To TOTPP Functions

id (get)

improvement.id -> integer

Returns the id of the improvement.


name (get)

improvement.name -> string

Returns the name of the improvement (e.g. "Barracks").


prereq (get/set)

improvement.prereq -> tech

Returns the prerequisite tech of the improvement. Ephemeral.


cost (get/set)

improvement.cost -> integer

Returns the cost of the improvement in rows. Multiply by civ.cosmic.shieldRows for the actual production cost. Ephemeral.


cantSell (get/set)

improvement.cantSell -> boolean

Returns `true` if the improvement cannot be sold, `false` otherwise. Requires the "Improvement flags" patch. Ephemeral.


onCapture (get/set)

improvement.onCapture -> integer

Returns what happens to this improvement when a city is captured (0 - Default, 1 - Preserve, 2 - Destroy, 3 - Random). Requires the "Improvement flags" patch. Ephemeral.