Bug #2457
openai: buys barracks before defenders
0%
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
Updated by Marko Lindqvist 3 days ago
The difference between "building Unit + Barracks" vs "building Barracks + Unit" is that in the latter case the unit gained veterancy from the Barracks when built.
City Walls OTOH provides nothing without a unit in the city.
Updated by Sweet Tea Dorminy 3 days ago
It is true, and it is a reasonable argument. I've never played with building barracks first, but it's plausible that it's a playstyle that is superior. Fine to close this as invalid / not obviously a correct change of behavior. Thanks!