Skip to content

2023-July-26 - 2.6.14440

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Jul 02:24
c345ed7
Tweak AI isSub logic. (#11817)

Previously, it was based on getCanNotTarget(), but actually getCanEvade() is the better option since canNotTarget can be set on non-sub units. This also restores the sub purchase logic that was changed in https://github.com/triplea-game/triplea/commit/caf296caf95f65ad81bace4dcca522304b34eac5.

I think this is a safer version of the change, since the above one may have had an effect where AI would start buying subs for defense, when it shouldn't.

Note: I verified all standard A&A maps and all the subs have canEvade set, so this should ensure the AI continues to behave as before on those maps.