diff --git a/buildSrc/src/main/kotlin/BuildConfig.kt b/buildSrc/src/main/kotlin/BuildConfig.kt index 38d449a1a8..12226ca2d1 100644 --- a/buildSrc/src/main/kotlin/BuildConfig.kt +++ b/buildSrc/src/main/kotlin/BuildConfig.kt @@ -3,8 +3,8 @@ package com.unciv.build object BuildConfig { const val kotlinVersion = "1.3.71" const val appName = "Unciv" - const val appCodeNumber = 431 - const val appVersion = "3.8.12" + const val appCodeNumber = 432 + const val appVersion = "3.8.12-patch1" const val gdxVersion = "1.9.10" const val roboVMVersion = "2.3.1" diff --git a/core/src/com/unciv/logic/automation/WorkerAutomation.kt b/core/src/com/unciv/logic/automation/WorkerAutomation.kt index 7f17dfe823..9aee7e88a0 100644 --- a/core/src/com/unciv/logic/automation/WorkerAutomation.kt +++ b/core/src/com/unciv/logic/automation/WorkerAutomation.kt @@ -77,7 +77,8 @@ class WorkerAutomation(val unit: MapUnit) { return } val tileFurthestFromEnemy = reachableTiles.keys.filter { unit.movement.canMoveTo(it) } - .maxBy(this::countDistanceToClosestEnemy)!! + .maxBy(this::countDistanceToClosestEnemy) + if(tileFurthestFromEnemy==null) return // can't move anywhere! unit.movement.moveToTile(tileFurthestFromEnemy) }