This commit is contained in:
EmperorPinguin 2025-02-20 17:31:55 +00:00 committed by GitHub
commit 4794c2fd1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -136,16 +136,15 @@ object CityLocationTileRanker {
// If it is not higher the settler may get stuck when it ranks the same tile differently
// as it moves away from the city and doesn't include it in the calculation
// and values it higher than when it moves closer to the city
distanceToCity == 7 -> 2f
distanceToCity == 6 -> 4f
distanceToCity == 6 -> 3f
distanceToCity == 5 -> 8f // Settling further away sacrifices tempo
distanceToCity == 4 -> 6f
distanceToCity == 3 -> -25f
distanceToCity < 3 -> -30f // Even if it is a mod that lets us settle closer, lets still not do it
distanceToCity == 4 -> 4f
distanceToCity < 4 -> -30f // Even if it is a mod that lets us settle closer, lets still not do it
else -> 0f
}
val rankDistanceToCapital = city.isCapital() && distanceToCity > 3 //exclude first 3 rings
// We want a defensive ring around our capital
if (city.civ == civ) distanceToCityModifier *= if (city.isCapital()) 2 else 1
if (city.civ == civ) distanceToCityModifier += if (rankDistanceToCapital) 3 * (10 - distanceToCity).coerceAtLeast(0) else 0
modifier += distanceToCityModifier
}
return modifier