[Ohrrpgce] [ohrrpgce:bugs] #2038 If the last enemy has the "Ignored for "Alone" AI" bit set, it doesn't count as alone

TeeEmCee teeemcee at users.sourceforge.net
Wed Sep 12 06:07:38 PDT 2018


- **summary**: 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
- **status**: open --> closed
- **Comment**:

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.



---

** [bugs:#2038] If the last enemy has the "Ignored for "Alone" AI" bit set, it doesn't count as alone**

**Status:** closed
**Milestone:** OHRRPGCE
**Labels:** AI attacks 
**Created:** Tue Sep 11, 2018 03:48 PM UTC by TeeEmCee
**Last Updated:** Tue Sep 11, 2018 03:48 PM UTC
**Owner:** nobody


Reading the source, I notice:
~~~
 'if targetable enemy count is 1, go into alone mode
 IF targenemycount(bslot(), YES) = 1 THEN ai = aiAlone
~~~
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.
"= 1" should be "<= 1"

Until that bit was added in 2009 (in r2815) targenemycount instead counted the number of enemies that weren't untargetable.


---

Sent from sourceforge.net because ohrrpgce at lists.motherhamster.org is subscribed to https://sourceforge.net/p/ohrrpgce/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/ohrrpgce/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20180912/dd37a102/attachment.html>


More information about the Ohrrpgce mailing list