The wonder 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:15, 26 January 2019

Back To TOTPP Functions


id (get)

wonder.id -> integer

Returns the id of the wonder.


name (get)

wonder.name -> string

Returns the name of the wonder.


city (get/set)

wonder.city -> city

Returns the city that has built the wonder, `nil` if not built yet or destroyed.


destroyed (get)

wonder.destroyed -> boolean

Returns whether or not the wonder is destroyed. Use wonder:destroy() to set this field.


prereq (get/set)

wonder.prereq -> tech

Returns the prerequisite technology of the wonder. Ephemeral.


cost (get/set)

wonder.cost -> integer

Returns the cost of the wonder. Ephemeral.


expires (get/set)

wonder.expires -> tech

Returns the tech that renders the wonder obsolete, or `nil` if there isn't any. Ephemeral.


destroy

wonder:destroy()

Alias for `civ.destroyWonder(wonder)`.