From b43257cea8de538bf40d87146c05c7c349e71a11 Mon Sep 17 00:00:00 2001 From: Xander Lenstra <71121390+xlenstra@users.noreply.github.com> Date: Thu, 24 Jun 2021 14:54:25 +0200 Subject: [PATCH] Fixes #4232 (#4245) --- core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt index c36d4a1bd0..2e835ae6ba 100644 --- a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt +++ b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt @@ -40,11 +40,13 @@ class UnitMovementAlgorithms(val unit:MapUnit) { if (unit.doubleMovementInForestAndJungle && (to.terrainFeatures.contains(Constants.forest) || to.terrainFeatures.contains(Constants.jungle))) return 1f + extraCost // usually forest and jungle take 2 movements, so here it is 1 - if (civInfo.nation.ignoreHillMovementCost && to.isHill()) - return 1f + extraCost // usually hills take 2 movements, so here it is 1 if (unit.roughTerrainPenalty && to.isRoughTerrain()) - return 4f + extraCost + return 100f // units that have to sped all movement in rough terrain, have to spend all movement in rough terrain + // Placement of this 'if' based on testing, see #4232 + + if (civInfo.nation.ignoreHillMovementCost && to.isHill()) + return 1f + extraCost // usually hills take 2 movements, so here it is 1 if (unit.doubleMovementInCoast && to.baseTerrain == Constants.coast) return 1 / 2f + extraCost