mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 07:17:50 +07:00
Update NextTurnAutomation.kt (#12634)
This commit is contained in:
@ -277,7 +277,9 @@ object NextTurnAutomation {
|
||||
val costs = getGroupedResearchableTechs()
|
||||
if (costs.isEmpty()) return
|
||||
|
||||
val cheapestTechs = costs[0]
|
||||
val cheapestTechs = costs.firstOrNull{
|
||||
// Ignore rows where all techs have 0 weight
|
||||
it.any { it.getWeightForAiDecision(stateForConditionals) > 0 } }?: costs.first()
|
||||
//Do not consider advanced techs if only one tech left in cheapest group
|
||||
val techToResearch: Technology =
|
||||
if (cheapestTechs.size == 1 || costs.size == 1) {
|
||||
|
Reference in New Issue
Block a user