mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 22:34:32 +07:00
Fixed AI religion belief assessment (far too much weight given to tiles)
This commit is contained in:
parent
a9908e877c
commit
cf4fd63959
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user