AI now puppets cities by default - much better for long-term strategy, since puppeted cities are technically also controlled by AI controllers so...

This commit is contained in:
Yair Morgenstern 2019-09-24 16:57:49 +03:00
parent 38a28888ef
commit 27b8cd5f1b
3 changed files with 7 additions and 9 deletions

View File

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.app" applicationId "com.unciv.app"
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 29 targetSdkVersion 29
versionCode 300 versionCode 301
versionName "3.0.7" versionName "3.1.0"
} }
// Had to add this crap for Travis to build, it wanted to sign the app // Had to add this crap for Travis to build, it wanted to sign the app

View File

@ -212,11 +212,9 @@ class Battle(val gameInfo:GameInfo) {
} }
if (attacker.getCivInfo().isPlayerCivilization()) { if (attacker.getCivInfo().isPlayerCivilization())
attackerCiv.popupAlerts.add(PopupAlert(AlertType.CityConquered, city.name)) attackerCiv.popupAlerts.add(PopupAlert(AlertType.CityConquered, city.name))
} else { else city.puppetCity(attacker.getCivInfo())
city.annexCity(attacker.getCivInfo())
}
} }
fun getMapCombatantOfTile(tile:TileInfo): ICombatant? { fun getMapCombatantOfTile(tile:TileInfo): ICombatant? {

View File

@ -442,7 +442,7 @@ class CityInfo {
But if they don't keep their promise they get a -20 that will only fully disappear in 160 turns. But if they don't keep their promise they get a -20 that will only fully disappear in 160 turns.
There's a lot of triggering going on here. There's a lot of triggering going on here.
*/ */
fun triggerCitiesSettledNearOtherCiv(){ private fun triggerCitiesSettledNearOtherCiv(){
val citiesWithin6Tiles = civInfo.gameInfo.civilizations.filter { it.isMajorCiv() && it!=civInfo } val citiesWithin6Tiles = civInfo.gameInfo.civilizations.filter { it.isMajorCiv() && it!=civInfo }
.flatMap { it.cities } .flatMap { it.cities }
.filter { it.getCenterTile().arialDistanceTo(getCenterTile()) <= 6 } .filter { it.getCenterTile().arialDistanceTo(getCenterTile()) <= 6 }