Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak AI isSub logic. #11817

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Conversation

asvitkine
Copy link
Contributor

Change Summary & Additional Notes

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 caf296c.

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.

Release Note

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 triplea-game@caf296c.

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.
@asvitkine asvitkine merged commit c345ed7 into triplea-game:master Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant