From 4576056b9fbe9aa578cc064014ad135e3e44575d Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 17 Apr 2019 20:34:03 +0300 Subject: [PATCH] Number of strategic resources now directly dependant on the number of settlable land tiles --- android/build.gradle | 4 ++-- core/src/com/unciv/logic/map/RandomMapGenerator.kt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 3e730eae66..1fc029f903 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.app" minSdkVersion 14 targetSdkVersion 28 - versionCode 228 - versionName "2.14.8" + versionCode 229 + versionName "2.14.9" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/core/src/com/unciv/logic/map/RandomMapGenerator.kt b/core/src/com/unciv/logic/map/RandomMapGenerator.kt index 34e20dbd6e..dc993b0033 100644 --- a/core/src/com/unciv/logic/map/RandomMapGenerator.kt +++ b/core/src/com/unciv/logic/map/RandomMapGenerator.kt @@ -507,11 +507,12 @@ open class RandomMapGenerator { if(tile.resource!=null && tile.getTileResource().resourceType==ResourceType.Strategic) tile.resource=null - for(resource in GameBasics.TileResources.values.filter { it.resourceType==ResourceType.Strategic }){ + val strategicResources = GameBasics.TileResources.values.filter { it.resourceType==ResourceType.Strategic } + for(resource in strategicResources){ val suitableTiles = mapToReturn.values .filter { it.resource==null && resource.terrainsCanBeFoundOn.contains(it.getLastTerrain().name) } - val numberOfResources = mapToReturn.count() / 100 + val numberOfResources = mapToReturn.values.count{it.isLand() && !it.getBaseTerrain().impassable} / 50 val locations = chooseSpreadOutLocations(numberOfResources,suitableTiles, distance)