-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
base: master
Are you sure you want to change the base?
Let AI engulf even if running out of atp #5729
Conversation
This is for the AI, right? That's unclear from just the title (so I had to open up this PR immediately when I received the notification to make sure this wasn't a fix for a critical regression in the game). |
Yes it is, sorry for not being clear |
From testing this today, the AI still doesn't engulf while out of ATP. |
It should work now, the "if statement" was built improperly |
{ | ||
if (cellHealth.CurrentHealth > 2 * Constants.ENGULF_NO_ATP_DAMAGE) | ||
{ | ||
// even if we are out of ATP and there is microbe nearby, engulf them. |
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.
// even if we are out of ATP and there is microbe nearby, engulf them. | |
// Even if we are out of ATP and there is microbe nearby, engulf them. |
Comments should be started with a capital letter. I'll comment just this once but I saw this elsewhere as well).
{ | ||
// even if we are out of ATP and there is microbe nearby, engulf them. | ||
// make sure engulfing doesn't kill the cell | ||
bool isMicrobeHunting = CheckForHuntingConditions(ref ai, ref position, ref organelles, |
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 would have asked to add a blank line for readability before if (isMicrobeHunting)
but I think it makes more sense to just inline this method call in there.
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'm not seeing any references to EnterEngulfModeForcedState
so how does this actually force the engulf mode?
Well, tried rebasing onto master but it seems to mess up my branch again |
Probably easiest if you just start a new fresh local branch and either cherry-pick the commits you want from here or just redo the changes manually. Then delete your local branch named Edit: also I wanted to mention that usually when duplicate commits get created like that you've either messed up a merge (with losing the info that the branch is actually merged) or an interactive rebase ended up rebasing remote commits (this is pretty easy to accidentally do if you do an interactive rebase onto a different branch and you have merge commits made in your branch, it's better to either rebase or squash first). |
1d8f921
to
fecacc8
Compare
Brief Description of What This PR Does
If there is a microbe nearby and the cell is not moving make it able to engulf the prey in order to survive
Related Issues
closes #5678
Progress Checklist
Note: before starting this checklist the PR should be marked as non-draft.
break existing features:
https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
(this is important as to not waste the time of Thrive team
members reviewing this PR)
styleguide.
Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.