Actions
Bug #2457
openai: buys barracks before defenders
Status:
New
Priority:
Normal
Assignee:
-
Category:
AI
Target version:
-
Start date:
11/08/2026
Due date:
% Done:
0%
Estimated time:
Description
adjust_ai_unit_choice() in daimilitary.c turns any non-veteran military unit choice into the building that grants veterancy, if it can. It never looks at the city to see if there's an actual defender...
The walls path a few lines down refuses to build walls before the first defender ("Walls will help nothing if there's nobody behind them"); but the same is true for barracks.
Patch keeps the unit when no defender of ours stands in the city.
Files
Actions