AI citizen focus change (#11908)

* AI behaviour changes

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Automation.kt

* Reverting some changes

* Changes

* revert changes

* revert changes

* revert changes

* revert changes

* Update CityLocationTileRanker.kt

* Citizen assignment for stat conversion

* Update CityLocationTileRanker.kt

* Reduce AI settling

* Avoid AI building units when in negative Supply

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update build.gradle.kts

* Update gradle-wrapper.properties

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update CityLocationTileRanker.kt

* AI changes for humans

* Fix puppet focus

* Update Automation.kt

* Puppet focus

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Stats.kt

* Update CityTurnManager.kt

* Remove specialist science modifier
This commit is contained in:
EmperorPinguin 2024-07-27 22:42:18 +02:00 committed by GitHub
parent 34f614c54b
commit 099a2385c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 24 deletions

View File

@ -82,31 +82,30 @@ object Automation {
else else
yieldStats.food /= 2 yieldStats.food /= 2
} else if (!city.avoidGrowth) { } else if (!city.avoidGrowth) {
// NoFocus or Food/Growth Focus. Target +2 Food Surplus // NoFocus or Food/Growth Focus. Target +10 Food Surplus when happy
if (surplusFood < 2) if (surplusFood < 0)
yieldStats.food *= 8 yieldStats.food *= 8 // Starving, need Food, get to 0
else if (city.population.population < 5) else if (surplusFood < 10 && city.civ.getHappiness() > -1)
yieldStats.food *= 3 yieldStats.food *= 2
else if (city.civ.getHappiness() < 0) {
// 75% of excess food is wasted when in negative happiness
yieldStats.food /= 4
}
} }
if (city.population.population < 5) { if (city.population.population < 10) {
// "small city" - we care more about food and less about global problems like gold science and culture // "small city" - we care more about food and less about global problems like gold science and culture
// Food already handled above. Science/Culture have low weights in Stats already // Food already handled above. Gold/Culture have low weights in Stats already
yieldStats.gold /= 2 // it's barely worth anything at this point yieldStats.science /= 2
} else { }
if (city.civ.gold < 0 && city.civ.stats.statsForNextTurn.gold <= 0)
yieldStats.gold *= 2 // We have a global problem
if (city.tiles.size < 12) if (city.civ.stats.statsForNextTurn.gold < 0) {
yieldStats.culture *= 2 // We have a global problem, we need to deal with it before it leads to science loss
yieldStats.gold *= 2
if (city.civ.getHappiness() < 0) }
yieldStats.happiness *= 2
}
if (city.civ.getHappiness() < 0) { if (city.civ.getHappiness() < 0) {
// 75% of excess food is wasted when in negative happiness yieldStats.happiness *= 2
yieldStats.food /= 4
} }
if (allTechsAreResearched) { if (allTechsAreResearched) {
@ -115,7 +114,7 @@ object Automation {
} }
if (city.cityConstructions.getCurrentConstruction() is PerpetualConstruction) { if (city.cityConstructions.getCurrentConstruction() is PerpetualConstruction) {
// With 4:1 conversion of production to gold, production is overvalued by a factor (12*4)/8 = 6 // With 4:1 conversion of production to science, production is overvalued by a factor (12*4)/7 = 6.9
yieldStats.production /= 6 yieldStats.production /= 6
} }

View File

@ -148,11 +148,11 @@ open class Stats(
fun applyRankingWeights() { fun applyRankingWeights() {
food *= 14 food *= 14
production *= 12 production *= 12
gold *= 8 // 3 gold worth about 2 production gold *= 6 // 2 gold worth about 1 production
science *= 7 science *= 9
culture *= 6 culture *= 8
happiness *= 10 // base happiness *= 10 // base
faith *= 5 faith *= 7
} }
/** ***Not*** only a debug helper. It returns a string representing the content, already _translated_. /** ***Not*** only a debug helper. It returns a string representing the content, already _translated_.