From cf4fd63959c98f8393952659158ed5eccf7029b4 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Tue, 10 Dec 2024 23:10:11 +0200 Subject: [PATCH] Fixed AI religion belief assessment (far too much weight given to tiles) --- .../logic/automation/civilization/ReligionAutomation.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt b/core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt index c43939da84..d0e9e0ed7b 100644 --- a/core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt +++ b/core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt @@ -208,15 +208,15 @@ object ReligionAutomation { // region rate beliefs fun rateBelief(civInfo: Civilization, belief: Belief): Float { - var score = 0f + var score = 0f // Roughly equivalent to the sum of stats gained across all cities for (city in civInfo.cities) { for (tile in city.getCenterTile().getTilesInDistance(city.getWorkRange())) { val tileScore = beliefBonusForTile(belief, tile, city) score += tileScore * when { - city.workedTiles.contains(tile.position) -> 8 - tile.getCity() == city -> 5 - else -> 3 + city.workedTiles.contains(tile.position) -> 1f // worked + tile.getCity() == city -> 0.7f // workable + else -> 0.3f // unavailable } * (Random.nextFloat() * 0.05f + 0.975f) }