mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-29 00:50:43 +07:00
Military units no longer try to accompany great generals - great geenerals should follow the army units, not the other way round!
Culture building priority is dependant on whether the city is producing culture at all Gold is now less highly valued by the AI when picking tiles to work
This commit is contained in:
parent
3ff78ef6b3
commit
9559894a86
@ -35,7 +35,7 @@ class Automation {
|
||||
else rank += (2.4f + (stats.food - 2) / 2) // 1.2 point for each food up to 2, from there on half a point
|
||||
|
||||
if (civInfo.gold < 0 && civInfo.statsForNextTurn.gold <= 0) rank += stats.gold
|
||||
else rank += stats.gold / 2
|
||||
else rank += stats.gold / 3 // 3 gold is much worse than 2 production
|
||||
|
||||
rank += stats.production
|
||||
rank += stats.science
|
||||
|
@ -120,7 +120,9 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
||||
private fun addCultureBuildingChoice() {
|
||||
val cultureBuilding = buildableNotWonders.filter { it.isStatRelated(Stat.Culture) }.minBy { it.cost }
|
||||
if (cultureBuilding != null) {
|
||||
var modifier = 0.8f
|
||||
var modifier = 0.5f
|
||||
if(cityInfo.cityStats.currentCityStats.culture==0f) // It won't grow if we don't help it
|
||||
modifier=0.8f
|
||||
if (preferredVictoryType == VictoryType.Cultural) modifier = 1.6f
|
||||
addChoice(relativeCostEffectiveness, cultureBuilding.name, modifier)
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ class UnitAutomation{
|
||||
private fun tryAccompanySettlerOrGreatPerson(unit: MapUnit): Boolean {
|
||||
val settlerOrGreatPersonToAccompany = unit.civInfo.getCivUnits()
|
||||
.firstOrNull { val tile = it.currentTile
|
||||
(it.name== Constants.settler || it.name.startsWith("Great") && it.type.isCivilian())
|
||||
(it.name== Constants.settler || it.name in GreatPersonManager().statToGreatPersonMapping.values)
|
||||
&& tile.militaryUnit==null && unit.canMoveTo(tile) && unit.movementAlgs().canReach(tile) }
|
||||
if(settlerOrGreatPersonToAccompany==null) return false
|
||||
unit.movementAlgs().headTowards(settlerOrGreatPersonToAccompany.currentTile)
|
||||
|
Loading…
Reference in New Issue
Block a user