Closed CameronJung closed 2 weeks ago
This bug is rare, moving forward accounts of its occurrence should be documented here to pin down the cause.
While play testing Operation: Flyswatter I observed this bug, where an AI helicopter didn't attack an adjacent player's tank. The tank was in a canyon. This might mean that the AI isn't recognizing attacks that are on tiles the AI's unit can't traverse.
I had another thought on this issue recently too. Currently, attack commands have their safety assessed for the hex of the target. Of course, this is erroneous since the attacking unit doesn't move to where the destroyed unit is, but the implications are usually close enough to not matter. It might be the case that moving next to the space of the unit keeps it out of harms way, but the would be victim is on a hex that is covered by another unit.
I might have figured it out. Yesterday I found some boolean logic that erroneously tosses out attack possibilities for units on tiles that the attacking unit can't cross. This seems to have fixed the issue, but I want to make sure so I will wait to mark this as done.
This still happens with the new AI update in 1.6; to prevent it I added a safeguard that checks if the AI could destroy a unit whenever it moves a unit. Improving the AI so that it never misses an opportunity would be better, but this should be enough to close the issue for now.
Sometimes the AI will move a unit next to one of the player's units, but not destroy it.