<?xml version="1.0" encoding="utf-8"?>
<s1 title="Castle"><p>The Castle objects can reference details about the city the script is run in. </p>
<p><strong>Castle objects can be referenced as:</strong> </p>
<ul><li><p><em>m_city.cityManager.castle.property <strong>or</strong> city.castle.property</em> </p>
</li>
</ul>
<p>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 name of the city with <em>city.castle.name</em>. Some castle properties are aliased via the city object as well, for example city.castle.name and city.name are the same thing. </p>
<p><strong>Properties</strong> </p>
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p><strong>Property </strong> </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p><strong>Type</strong> </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p><strong>Description </strong> </p>
</td></tr><tr><td><p>allowAlliance </p>
</td><td><p>Boolean </p>
</td><td><p>Returns true if the embassy is open. </p>
</td></tr><tr><td><p>buffs </p>
</td><td><p>Object </p>
</td><td><p>Returns an object of the current castles buffs. </p>
</td></tr><tr><td><p>buildingQueuesArray </p>
</td><td><p>Array </p>
</td><td><p>Returns information on the current castles building queues. </p>
</td></tr><tr><td><p>buildingsArray </p>
</td><td><p>Array of Objects </p>
</td><td><p>Returns infromation on the current castles buildings. </p>
</td></tr><tr><td><p>fieldId </p>
</td><td><p>Integer </p>
</td><td><p>Returns the Field ID of the cuttent Castle. </p>
</td></tr><tr><td><p>fieldsArray </p>
</td><td><p>Array </p>
</td><td><p>Returns infromation on the castles fields. </p>
</td></tr><tr><td><p>fortification </p>
</td><td><p>Object </p>
</td><td><p>Returns infromation on the castles fortifications. </p>
</td></tr><tr><td><p>hasEnemy </p>
</td><td><p>Boolean </p>
</td><td><p>Returns true if the castle has incoming attacks. </p>
</td></tr><tr><td><p>herosArray </p>
</td><td><p>Array of Objects </p>
</td><td><p>Returns information on the heroes in the castle. </p>
</td></tr><tr><td><p>id </p>
</td><td><p>Integer </p>
</td><td><p>Returns the unique ID of the castle. </p>
</td></tr><tr><td><p>logUrl </p>
</td><td><p>String </p>
</td><td><p>Returns the path of the Castle image. </p>
</td></tr><tr><td><p>name </p>
</td><td><p>String </p>
</td><td><p>Returns the name of the current castle. </p>
</td></tr><tr><td><p>oid </p>
</td><td><p>Integer </p>
</td><td><p>Returns the old Castle ID. </p>
</td></tr><tr><td><p><jump href="/wiki/CityResource">resource</jump> </p>
</td><td><p>Object </p>
</td><td><p>Returns an object containing the current castles resource information. </p>
</td></tr><tr><td><p>support </p>
</td><td><p>Boolean </p>
</td><td><p>Returns true if supporting troops exist. </p>
</td></tr><tr><td><p>tradesArray </p>
</td><td><p>Array Of Objects </p>
</td><td><p>Returns information on current trades in the castle. </p>
</td></tr><tr><td><p>transingTradesArray </p>
</td><td><p>Array </p>
</td><td><p>Returns infromation on successful ongoing trades. </p>
</td></tr><tr><td><p>troop </p>
</td><td><p>Object </p>
</td><td><p>Returns infroamtion on the current castles troops. </p>
</td></tr><tr><td><p>usePACIFY_SUCCOUR_OR_PACIFY_PRAY </p>
</td><td><p>boolean </p>
</td><td><p>Returns true if conforting is in cooldown. </p>
</td></tr></table><p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> <jump href="/wiki/ScriptObjects">ScriptObjects</jump> </p>
</s1>