mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 22:37:02 -04:00
Bugfix - AIs no longer try to gain influence wth city-states they haven't met yet
This commit is contained in:
parent
18d7446fab
commit
c0f569c826
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.app"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 260
|
versionCode 262
|
||||||
versionName "2.17.9"
|
versionName "2.17.10-patch1"
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -65,7 +65,7 @@ class NextTurnAutomation{
|
|||||||
/** allow AI to spend money to purchase city-state friendship, buildings & unit */
|
/** allow AI to spend money to purchase city-state friendship, buildings & unit */
|
||||||
private fun useGold(civInfo: CivilizationInfo) {
|
private fun useGold(civInfo: CivilizationInfo) {
|
||||||
if(civInfo.victoryType()==VictoryType.Cultural){
|
if(civInfo.victoryType()==VictoryType.Cultural){
|
||||||
for(cityState in civInfo.gameInfo.civilizations
|
for(cityState in civInfo.getKnownCivs()
|
||||||
.filter { it.isCityState() && it.getCityStateType()==CityStateType.Cultured }){
|
.filter { it.isCityState() && it.getCityStateType()==CityStateType.Cultured }){
|
||||||
val diploManager = cityState.getDiplomacyManager(civInfo)
|
val diploManager = cityState.getDiplomacyManager(civInfo)
|
||||||
if(diploManager.influence < 40){ // we want to gain influence with them
|
if(diploManager.influence < 40){ // we want to gain influence with them
|
||||||
@ -76,7 +76,7 @@ class NextTurnAutomation{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(civInfo.getHappiness() < 5){
|
if(civInfo.getHappiness() < 5){
|
||||||
for(cityState in civInfo.gameInfo.civilizations
|
for(cityState in civInfo.getKnownCivs()
|
||||||
.filter { it.isCityState() && it.getCityStateType()==CityStateType.Mercantile }){
|
.filter { it.isCityState() && it.getCityStateType()==CityStateType.Mercantile }){
|
||||||
val diploManager = cityState.getDiplomacyManager(civInfo)
|
val diploManager = cityState.getDiplomacyManager(civInfo)
|
||||||
if(diploManager.influence < 40){ // we want to gain influence with them
|
if(diploManager.influence < 40){ // we want to gain influence with them
|
||||||
|
Loading…
x
Reference in New Issue
Block a user