The improvement object: Difference between revisions

From Scenario League Wiki
Jump to navigationJump to search
(Created Page)
 
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:12, 26 January 2019

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.