The wonder object

From Scenario League Wiki
Revision as of 20:15, 26 January 2019 by Prof. Garfield (talk | contribs) (Added to category lua resources)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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)`.