Fortification objects can reference details about the wall defenses of your cities.
Fortification objects can be referenced as as:
m_city.cityManager.fortification.property or city.fortification.property
The .property at the end is how you will specify which detail you are referencing. Using the table below, you can for example get the current count of trebs built on your walls with city.fortification.rockfall.
Properties
Property |
Type |
Description |
fortification.arrowTower |
int |
Get the current number of ATs on the walls. |
fortification.abatis |
int |
Get the current number of abatis on the walls. |
fortification.rockfall |
int |
Get the current number of trebs on the walls. |
fortification.rollingLogs |
int |
Get the current number of logs on the walls. |
fortification.trap |
int |
Get the current number of traps on the walls. |
fortificationsRequirement.arrowTower |
int |
Get the number of ATs to be built in the city's goals. |
fortificationsRequirement.abatis |
int |
Get the number of abatis to be built in the city's goals. |
fortificationsRequirement.rockfall |
int |
Get the number of trebs to be built in the city's goals. |
fortificationsRequirement.rollingLogs |
int |
Get the number of logs to be built in the city's goals. |
fortificationsRequirement.trap |
int |
Get the number of traps to be built in the city's goals. |
Examples
// Find the current number of trebs in the city, and build enough more to total 11k. current = city.fortification.rockfall need = 11000 - current echo "We have " + current + " trebs, and need to build " + need + " more to total 11k." execute "walldefense tre " + need