fix: prevent AI armies from getting permanently stuck at destroyed en…#1417
Merged
braedonsaunders merged 1 commit intomainfrom Feb 10, 2026
Merged
Conversation
…emy bases Four fixes for AI combat behavior in FFA games: 1. Hunt mode stuck detection: armies that have had no combat for 300 ticks (~15s) during hunt mode now force-disengage and return to base, instead of sitting at destroyed enemy bases forever. 2. At-target dead zone: completely idle units (assault mode already timed out) near a target building are no longer skipped by the re-command system. Previously these units fell into a dead zone where CombatSystem skipped them (not in hot cell) AND AITacticsManager skipped them (within at-target threshold), leaving them permanently stuck. 3. Threat retarget range: units attacking buildings now detect approaching enemy combat units at sight range instead of attack range, so armies won't ignore enemies walking right past them. 4. Moving units scan for threats: all moving units now check for enemies within attack range (immediate threats only), so armies don't walk past enemies in their face without reacting. https://claude.ai/code/session_01GvKdDRj8RdBUFmnvyPSYJK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…emy bases
Four fixes for AI combat behavior in FFA games:
Hunt mode stuck detection: armies that have had no combat for 300 ticks (~15s) during hunt mode now force-disengage and return to base, instead of sitting at destroyed enemy bases forever.
At-target dead zone: completely idle units (assault mode already timed out) near a target building are no longer skipped by the re-command system. Previously these units fell into a dead zone where CombatSystem skipped them (not in hot cell) AND AITacticsManager skipped them (within at-target threshold), leaving them permanently stuck.
Threat retarget range: units attacking buildings now detect approaching enemy combat units at sight range instead of attack range, so armies won't ignore enemies walking right past them.
Moving units scan for threats: all moving units now check for enemies within attack range (immediate threats only), so armies don't walk past enemies in their face without reacting.
https://claude.ai/code/session_01GvKdDRj8RdBUFmnvyPSYJK