<div class="markdown_content"><ul>
<li><strong>summary</strong>: Enemy which is "Ignored for "Alone" AI" doesn't count as alone when there are no other enemies --> If the last enemy has the "Ignored for "Alone" AI" bit set, it doesn't count as alone</li>
<li><strong>status</strong>: open --> closed</li>
<li><strong>Comment</strong>:</li>
</ul>
<p>Fixed. For a moment I was worried about backcompat problems, but the change in 2009 was already a far larger incompatibility risk and affected far more games.</p>
<hr/>
<p><strong> <a class="alink strikethrough" href="https://sourceforge.net/p/ohrrpgce/bugs/2038/">[bugs:#2038]</a> If the last enemy has the "Ignored for "Alone" AI" bit set, it doesn't count as alone</strong></p>
<p><strong>Status:</strong> closed<br/>
<strong>Milestone:</strong> OHRRPGCE<br/>
<strong>Labels:</strong> AI attacks <br/>
<strong>Created:</strong> Tue Sep 11, 2018 03:48 PM UTC by TeeEmCee<br/>
<strong>Last Updated:</strong> Tue Sep 11, 2018 03:48 PM UTC<br/>
<strong>Owner:</strong> nobody</p>
<p>Reading the source, I notice:</p>
<div class="codehilite"><pre><span></span> 'if targetable enemy count is 1, go into alone mode
 IF targenemycount(bslot(), YES) = 1 THEN ai = aiAlone
</pre></div>


<p>Here, targenemycount counts enemies, ignoring ones with the "Ignored for "Alone" AI" bit. So if the last enemy has this bit set, it returns 0.<br/>
"= 1" should be "<= 1"</p>
<p>Until that bit was added in 2009 (in r2815) targenemycount instead counted the number of enemies that weren't untargetable.</p>
<hr/>
<p>Sent from sourceforge.net because ohrrpgce@lists.motherhamster.org is subscribed to <a href="https://sourceforge.net/p/ohrrpgce/bugs/">https://sourceforge.net/p/ohrrpgce/bugs/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/ohrrpgce/admin/bugs/options.">https://sourceforge.net/p/ohrrpgce/admin/bugs/options.</a>  Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>