diff --git a/core/src/com/unciv/logic/automation/Automation.kt b/core/src/com/unciv/logic/automation/Automation.kt index 39c701a8a9..88da18ccf2 100644 --- a/core/src/com/unciv/logic/automation/Automation.kt +++ b/core/src/com/unciv/logic/automation/Automation.kt @@ -82,11 +82,11 @@ object Automation { else if (city.civ.getHappiness() < 1) yieldStats.food /= 4 } else if (!city.avoidGrowth) { - // NoFocus or Food/Growth Focus. Target +10 Food Surplus when happy + // NoFocus or Food/Growth Focus. if (surplusFood < 0) yieldStats.food *= 8 // Starving, need Food, get to 0 - else if (surplusFood < 10 && city.civ.getHappiness() > -1) - yieldStats.food *= 2 + else if (city.civ.getHappiness() > -1) + yieldStats.food *= 2 //1.5f is preferred, but 2 provides more protection against badly configured personalities else if (city.civ.getHappiness() < 0) { // 75% of excess food is wasted when in negative happiness yieldStats.food /= 4 diff --git a/core/src/com/unciv/logic/automation/unit/CityLocationTileRanker.kt b/core/src/com/unciv/logic/automation/unit/CityLocationTileRanker.kt index 1c771c5c27..6f40cd5296 100644 --- a/core/src/com/unciv/logic/automation/unit/CityLocationTileRanker.kt +++ b/core/src/com/unciv/logic/automation/unit/CityLocationTileRanker.kt @@ -154,8 +154,6 @@ object CityLocationTileRanker { var locationSpecificTileValue = 0f // Don't settle near but not on the coast if (rankTile.isCoastalTile() && !onCoast) locationSpecificTileValue -= 2 - // Apply the effect of having a lighthouse, since we can probably assume that we will build it - if (onCoast && rankTile.isOcean) locationSpecificTileValue += 1.2f //food is ranked at 1.2 points // Check if there are any new unique luxury resources if (rankTile.resource != null && rankTile.tileResource.resourceType == ResourceType.Luxury && !(civ.hasResource(rankTile.resource!!) || newUniqueLuxuryResources.contains(rankTile.resource))) { @@ -168,8 +166,6 @@ object CityLocationTileRanker { if (rankTile.getOwner() != null && rankTile.getOwner() != civ) return 0f var rankTileValue = Automation.rankStatsValue(rankTile.stats.getTileStats(null, civ, uniqueCache), civ) - // We can't build improvements on water tiles without resources - if (!rankTile.isLand) rankTileValue -= 1 if (rankTile.resource != null) { rankTileValue += when (rankTile.tileResource.resourceType) { diff --git a/desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt b/desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt index 5c4553c51c..0ea2383d0e 100644 --- a/desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt +++ b/desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt @@ -47,7 +47,8 @@ internal object ConsoleLauncher { ruleset.nations[simulationCiv1] = Nation().apply { name = simulationCiv1 } ruleset.nations[simulationCiv2] = Nation().apply { name = simulationCiv2 } - + //These names need PascalCase if applied in-game for testing (e.g. if (civInfo.civName == "SimulationCiv2")) + val gameParameters = getGameParameters(simulationCiv1, simulationCiv2) val mapParameters = getMapParameters() val gameSetupInfo = GameSetupInfo(gameParameters, mapParameters) @@ -56,7 +57,8 @@ internal object ConsoleLauncher { UncivGame.Current.gameInfo = newGame - val simulation = Simulation(newGame, 10, 4) + val simulation = Simulation(newGame, 50, 8) + //Unless the effect size is very large, you'll typically need a large number of games to get a statistically significant result simulation.start() } @@ -71,7 +73,8 @@ internal object ConsoleLauncher { private fun getGameParameters(civilization1: String, civilization2: String): GameParameters { return GameParameters().apply { - difficulty = "Chieftain" + difficulty = "Prince" + numberOfCityStates = 0 speed = Speed.DEFAULT noBarbarians = true players = ArrayList().apply {