From 4817f49ce9b71916b69280447c141e89f0945b1d Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 3 Feb 2022 22:59:38 +0200 Subject: [PATCH] Flood plains no longer generate on desert hills --- core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt | 5 ++++- core/src/com/unciv/models/ruleset/unique/UniqueType.kt | 2 +- docs/uniques.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt b/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt index f3cd7dd927..e8cf1a2044 100644 --- a/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt +++ b/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt @@ -130,7 +130,10 @@ class MapGenerator(val ruleset: Ruleset) { .firstOrNull { tile.isAdjacentTo(it.params[1]) } ?: continue val terrain = ruleset.terrains[conversionUnique.params[0]] ?: continue - if (terrain.type == TerrainType.TerrainFeature) tile.terrainFeatures.add(terrain.name) + if (!terrain.occursOn.contains(tile.getLastTerrain().name)) continue + + if (terrain.type == TerrainType.TerrainFeature) + tile.terrainFeatures.add(terrain.name) else tile.baseTerrain = terrain.name tile.setTerrainTransients() } diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index 4929fa5263..ee5fd8e9fd 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -726,7 +726,7 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: PercentProductionConstructionsCities("+[amount]% Production when constructing [constructionFilter] [cityFilter]", UniqueTarget.Global), - @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [terrainFilter]"), DeprecationLevel.ERROR) + @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [Coast]"), DeprecationLevel.ERROR) DoubleMovementCoast("Double movement in coast", UniqueTarget.Unit), @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [terrainFilter]"), DeprecationLevel.ERROR) DoubleMovementForestJungle("Double movement rate through Forest and Jungle", UniqueTarget.Unit), diff --git a/docs/uniques.md b/docs/uniques.md index 863d3a544b..335321471b 100644 --- a/docs/uniques.md +++ b/docs/uniques.md @@ -1518,7 +1518,7 @@ Applicable to: Conditional - "+[amount]% Strength in [tileFilter]" - Deprecated as of 3.17.5 - removed 3.18.5, replace with "[amount]% Strength " - "[amount] Visibility Range" - Deprecated as of 3.17.5 - removed 3.18.5, replace with "[amount] Sight" - "Limited Visibility" - Deprecated as of 3.17.5 - removed 3.18.5, replace with "[-1] Sight" - - "Double movement in coast" - Deprecated As of 3.17.1 - removed 3.17.13, replace with "Double movement in [terrainFilter]" + - "Double movement in coast" - Deprecated As of 3.17.1 - removed 3.17.13, replace with "Double movement in [Coast]" - "Double movement rate through Forest and Jungle" - Deprecated As of 3.17.1 - removed 3.17.13, replace with "Double movement in [terrainFilter]" - "Double movement in Snow, Tundra and Hills" - Deprecated As of 3.17.1 - removed 3.17.13, replace with "Double movement in [terrainFilter]" - "+[amount]% Strength" - Deprecated As of 3.17.3 - removed 3.17.13, replace with "[amount]% Strength"