Unciv
Unciv copied to clipboard
AI cannot buy unbuildable constructions
Is there an existing issue for this?
- [X] I have searched the existing issues
Game Version
4.9.2
Describe the bug
Reporting a bug someone on discord noticed:
AIs cannot buy units or buildings that are purchasable via a stat if it has the unbuildable unique. This is because the AI cannot purchase objects unless it is currently building it. See here. Funny side effect of how the function is written is it can only ever purchase one object a turn per city. Also it cannot purchase with anything except gold unless you talk about hardcoded unit categories
Seems like the AI purchase logic in general needs fixing up
Steps to Reproduce
N/A
Expected Behavior
I will pretend the answer is "N/A"
Screenshots
No response
Link to save file
No response
Operating System
Android
Additional Information
No response
I will pretend the answer is 42
Good catch - except I expect most of the original coders were aware they were building better-than-nothing limited approaches, only the big picture got lost...?
Anyway, go ahead, we know you're a proficient coder.
we know you're a proficient coder
Yeah, but I'm not much of an AI dev. I'd probably copy over some of the build construction logic and call it a day. I know Tuvus has been making adjustments to the AI, so this issue is more making note of something to fix than just a setup for me to fix
not much of an AI dev
Exactly, me neither. And you might just as well have added a @
to spam them right away... I reined myself in on that.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.
Removing Stale label, but only as an aide to #11264
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.
I am unstaling this since it is important and is relatively high on my list. I'll see when I can get to it.