Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CityLocationTileRanker.kt #12774

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,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
Expand Down
Loading