mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 05:41:11 +07:00
Resolved #3489 - City state influence is affected by declaring war and making peace with their enemies
This commit is contained in:
@ -477,10 +477,11 @@ class DiplomacyManager() {
|
||||
otherCivDiplomacy.setModifier(DiplomaticModifiers.DeclaredWarOnUs,-20f)
|
||||
if(otherCiv.isCityState()) otherCivDiplomacy.influence -= 60
|
||||
|
||||
for(thirdCiv in civInfo.getKnownCivs()){
|
||||
if(thirdCiv.isAtWarWith(otherCiv))
|
||||
thirdCiv.getDiplomacyManager(civInfo).addModifier(DiplomaticModifiers.SharedEnemy,5f)
|
||||
else thirdCiv.getDiplomacyManager(civInfo).addModifier(DiplomaticModifiers.WarMongerer,-5f)
|
||||
for(thirdCiv in civInfo.getKnownCivs()) {
|
||||
if (thirdCiv.isAtWarWith(otherCiv)) {
|
||||
if (thirdCiv.isCityState()) thirdCiv.getDiplomacyManager(civInfo).influence += 10
|
||||
else thirdCiv.getDiplomacyManager(civInfo).addModifier(DiplomaticModifiers.SharedEnemy, 5f)
|
||||
} else thirdCiv.getDiplomacyManager(civInfo).addModifier(DiplomaticModifiers.WarMongerer, -5f)
|
||||
}
|
||||
|
||||
if(hasFlag(DiplomacyFlags.DeclarationOfFriendship)) {
|
||||
@ -530,10 +531,14 @@ class DiplomacyManager() {
|
||||
for (unit in civInfo.getCivUnits().filter { it.getTile().getOwner() == otherCiv })
|
||||
unit.movement.teleportToClosestMoveableTile()
|
||||
|
||||
// Our ally city states make peace with us
|
||||
for (thirdCiv in civInfo.getKnownCivs())
|
||||
for (thirdCiv in civInfo.getKnownCivs()) {
|
||||
// Our ally city states make peace with us
|
||||
if (thirdCiv.getAllyCiv() == civInfo.civName && thirdCiv.isAtWarWith(otherCiv))
|
||||
thirdCiv.getDiplomacyManager(otherCiv).makePeace()
|
||||
// Other ccity states that are not our ally don't like the fact that we made peace with their enemy
|
||||
if (thirdCiv.getAllyCiv() != civInfo.civName && thirdCiv.isAtWarWith(otherCiv))
|
||||
thirdCiv.getDiplomacyManager(civInfo).influence -= 10
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ class Technology {
|
||||
|
||||
val revealedResource = ruleset.tileResources.values.filter { it.revealedBy == name }
|
||||
.map { it.name }.firstOrNull() // can only be one
|
||||
if (revealedResource != null) lineList += "Reveals [$revealedResource] on the map".tr()
|
||||
if (revealedResource != null) lineList += "Reveals [$revealedResource] on the map"
|
||||
|
||||
val tileImprovements = ruleset.tileImprovements.values.filter { it.techRequired == name }
|
||||
if (tileImprovements.isNotEmpty())
|
||||
|
Reference in New Issue
Block a user