mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-06 00:09:23 +07:00
Better AI choice for annexing and razing cities. (#1132)
This commit is contained in:

committed by
Yair Morgenstern

parent
3ce1c7ee9d
commit
1607d0b17c
@ -429,6 +429,11 @@ class NextTurnAutomation{
|
||||
|
||||
private fun reassignWorkedTiles(civInfo: CivilizationInfo) {
|
||||
for (city in civInfo.cities) {
|
||||
if (city.isPuppet && city.population.population > 9
|
||||
&& city.resistanceCounter == 0) {
|
||||
city.annexCity()
|
||||
}
|
||||
|
||||
city.reassignWorkers()
|
||||
|
||||
city.cityConstructions.chooseNextConstruction()
|
||||
|
@ -230,7 +230,13 @@ class Battle(val gameInfo:GameInfo) {
|
||||
|
||||
if (attacker.getCivInfo().isPlayerCivilization())
|
||||
attackerCiv.popupAlerts.add(PopupAlert(AlertType.CityConquered, city.name))
|
||||
else city.puppetCity(attacker.getCivInfo())
|
||||
else {
|
||||
city.puppetCity(attacker.getCivInfo())
|
||||
if (city.population.population < 4) {
|
||||
city.annexCity()
|
||||
city.isBeingRazed = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun getMapCombatantOfTile(tile:TileInfo): ICombatant? {
|
||||
|
Reference in New Issue
Block a user