Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Let AI engulf even if running out of atp #5729
Let AI engulf even if running out of atp #5729
Changes from 11 commits
5f0afe5
7a68e2e
4d70c95
208ff3c
4ba706d
1b5d95d
502ea9b
c9eb9cb
e698eea
10ce6e6
fecacc8
d7b3e19
98aa729
1ec349a
a558d50
b032d5f
6241339
aa72d08
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be cleaner to not split out the
isHunting
variable here? There's already a very similar block of code above that doesn't use a temporary variable. (will also need to add braces here as the if is then so long)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the
EnterEngulfModeForcedState
call now, but now I'm wondering why the ATP level is checked here? BecauseEnterEngulfModeForcedState
ultimately callsForceStateApplyIfRequired
which only causes problems if ATP is not sufficient, so the AI code doesn't actually need this duplicate check, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we just use
EnterEngulfModeForcedState
withourSetStateColonyAware
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I didn't fully read the PR again but from a quick look
EnterEngulfModeForcedState
already has colony handling and checking for the ATP levels. So my comment is just about reducing unnecessary code in the AI system in this spot.