From 98685ad7c014ba563dc98e1afe10f4e3d6dd98cc Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 28 Dec 2020 17:59:04 +0200 Subject: [PATCH] Resolved #3464 - units only advance improvements when they have movement points left --- core/src/com/unciv/logic/map/MapUnit.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/map/MapUnit.kt b/core/src/com/unciv/logic/map/MapUnit.kt index 52864239e9..617bc037c9 100644 --- a/core/src/com/unciv/logic/map/MapUnit.kt +++ b/core/src/com/unciv/logic/map/MapUnit.kt @@ -447,8 +447,10 @@ class MapUnit { fun endTurn() { doAction() - if (hasUnique(Constants.workerUnique) && getTile().improvementInProgress != null) workOnImprovement() - if (hasUnique("Can construct roads") && currentTile.improvementInProgress == "Road") workOnImprovement() + if (currentMovement > 0 && hasUnique(Constants.workerUnique) + && getTile().improvementInProgress != null) workOnImprovement() + if (currentMovement > 0 && hasUnique("Can construct roads") + && currentTile.improvementInProgress == "Road") workOnImprovement() if (currentMovement == getMaxMovement().toFloat() && isFortified()) { val currentTurnsFortified = getFortificationTurns() if (currentTurnsFortified < 2)