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

"Bombing Raids should be dealt with first!" error with fast ai #11846

Closed
asvitkine opened this issue Aug 2, 2023 · 2 comments · Fixed by #11848
Closed

"Bombing Raids should be dealt with first!" error with fast ai #11846

asvitkine opened this issue Aug 2, 2023 · 2 comments · Fixed by #11848
Assignees
Labels
2.6 Problem A problem, bug, defect - something to fix

Comments

@asvitkine
Copy link
Contributor

Reproduction Steps

  1. Open the save game from: Error with "canNotTarget" #11617 (comment)

Attach a Save Game

See: #11617 (comment)

Engine Version

Engine Version:
2.6 ToT

Is there anything else we should know?

@asvitkine asvitkine added Problem A problem, bug, defect - something to fix 2.6 labels Aug 2, 2023
@asvitkine asvitkine self-assigned this Aug 2, 2023
@asvitkine
Copy link
Contributor Author

So there is a bombing battle pending, but it has no attackers specified.
So it doesn't get handled when bombing battles normally get handled.
But then when the code goes to check for its presence, its still found.

Probably a fast AI bug causing it to create an empty battle.

@asvitkine
Copy link
Contributor Author

OK, it's not quite that!

It seems if you send a unit to do a bombing raid, but it has movement left, you can still within the same combat move move it again, out of there, which could cause the battle to become "empty" (no attackers). So that's what's apparently happening in that AI game - probably the fast AI chooses for whatever reason to move that bomber out, which then creates this issue, where later code still think there's a battle, but was skipped due to being empty.

I think the simple fix is to check that the battle is not empty before throwing that error. (More complicated options can be pursued, for example by preventing further movement by that unit if it was committed to a bombing run - except to cancel the move or the move-back after in non-combat. But I won't do that for now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.6 Problem A problem, bug, defect - something to fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant