<?xml version="1.0" encoding="utf-8"?>
<s1 title="AnyIdleHero"><p></p>
<s2 id="Function" title="Function">
<p><strong>m_city.AnyIdleHero</strong>(<jump href="/wiki/HeroString">HeroString</jump>) </p>
<p>returns true if specified hero string matches any idle hero in the castle </p>
<p></p>
<s3 id="Example" title="Example">
<p></p>
<source><![CDATA[targetValley = ("123,456")

if m_city.AnyIdleHero("any:att>100,att<300") if city.troops.archer>100k execute "attack "+targetValley+" any:att>100,att<300 a:25k,p:1,sw:1,c:1,cata:1,s:1"]]></source><p>if there is a hero matching the criteria available, and city has more than 100k arch, send it marching on the valley.... </p>
<p>assumes you have the layers constantly being replaced, it could hang waiting for missing layer... so if you use scouts to transport res, leave them out of the march. </p>
<p><strong>see also: </strong> </p>
<p><jump href="/wiki/IsHeroInCastle">IsHeroInCastle</jump> </p>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> <jump href="/wiki/CategoryFunctions">CategoryFunctions</jump> </p>
</s3></s2></s1>