City-states allied to Civs no longer attempt to declare war when it does on Civs they haven't met yet

This commit is contained in:
Yair Morgenstern
2019-11-09 20:25:30 +02:00
parent 065b7586b2
commit 637b487a2c
3 changed files with 9 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

View File

@ -346,14 +346,18 @@ class DiplomacyManager() {
if (!civInfo.isCityState()) { if (!civInfo.isCityState()) {
for (thirdCiv in civInfo.getKnownCivs()) { for (thirdCiv in civInfo.getKnownCivs()) {
if (thirdCiv.isCityState() && thirdCiv.getAllyCiv() == civInfo.civName && thirdCiv.getDiplomacyManager(otherCiv).canDeclareWar()) { if (thirdCiv.isCityState() && thirdCiv.getAllyCiv() == civInfo.civName
&& thirdCiv.knows(otherCiv)
&& thirdCiv.getDiplomacyManager(otherCiv).canDeclareWar()) {
thirdCiv.getDiplomacyManager(otherCiv).declareWar() thirdCiv.getDiplomacyManager(otherCiv).declareWar()
} }
} }
} }
if (!otherCiv.isCityState()) { if (!otherCiv.isCityState()) {
for (thirdCiv in otherCiv.getKnownCivs()) { for (thirdCiv in otherCiv.getKnownCivs()) {
if (thirdCiv.isCityState() && thirdCiv.getAllyCiv() == otherCiv.civName && thirdCiv.getDiplomacyManager(civInfo).canDeclareWar()) { if (thirdCiv.isCityState() && thirdCiv.getAllyCiv() == otherCiv.civName
&& thirdCiv.knows(otherCiv)
&& thirdCiv.getDiplomacyManager(civInfo).canDeclareWar()) {
thirdCiv.getDiplomacyManager(civInfo).declareWar() thirdCiv.getDiplomacyManager(civInfo).declareWar()
} }
} }