From a38034ed918ecd2c6e11a393cbe9174fe5596406 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 17 Feb 2022 23:39:49 +0200 Subject: [PATCH] AI only builds work boats for water resources whose improvement can actually be constructed --- .../src/com/unciv/logic/automation/ConstructionAutomation.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/automation/ConstructionAutomation.kt b/core/src/com/unciv/logic/automation/ConstructionAutomation.kt index 6f2b821227..59918aea16 100644 --- a/core/src/com/unciv/logic/automation/ConstructionAutomation.kt +++ b/core/src/com/unciv/logic/automation/ConstructionAutomation.kt @@ -154,7 +154,10 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){ } for (i in 1..10) bfs.nextStep() if (!bfs.getReachedTiles() - .any { it.hasViewableResource(civInfo) && it.improvement == null && it.getOwner() == civInfo } + .any { it.hasViewableResource(civInfo) && it.improvement == null && it.getOwner() == civInfo + && it.tileResource.improvement != null + && it.canBuildImprovement(it.ruleset.tileImprovements[it.tileResource.improvement]!!, civInfo) + } ) return addChoice(