Number of strategic resources now directly dependant on the number of settlable land tiles

This commit is contained in:
Yair Morgenstern 2019-04-17 20:34:03 +03:00
parent 9dabbb7946
commit 4576056b9f
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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)