mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 18:28:42 +07:00
Resolved #11803 - units teleport out of open borders on war declaration
This commit is contained in:
@ -135,6 +135,9 @@ object DeclareWar {
|
||||
diplomacyManager.trades.clear()
|
||||
diplomacyManager.civInfo.tradeRequests.removeAll { it.requestingCiv == diplomacyManager.otherCivName }
|
||||
|
||||
// Must come *before* state is "at war" so units know they're not allowed in tiles without open borders anymore
|
||||
diplomacyManager.updateHasOpenBorders()
|
||||
|
||||
val civAtWarWith = diplomacyManager.otherCiv()
|
||||
|
||||
// If we attacked, then we need to end all of our defensive pacts acording to Civ 5
|
||||
@ -154,8 +157,6 @@ object DeclareWar {
|
||||
diplomacyManager.civInfo.cityStateFunctions.removeProtectorCiv(civAtWarWith, forced = true)
|
||||
}
|
||||
|
||||
diplomacyManager.updateHasOpenBorders()
|
||||
|
||||
diplomacyManager.removeModifier(DiplomaticModifiers.YearsOfPeace)
|
||||
diplomacyManager.setFlag(DiplomacyFlags.DeclinedPeace, diplomacyManager.civInfo.gameInfo.ruleset.modOptions.constants.minimumWarDuration) // AI won't propose peace for 10 turns
|
||||
diplomacyManager.setFlag(DiplomacyFlags.DeclaredWar, diplomacyManager.civInfo.gameInfo.ruleset.modOptions.constants.minimumWarDuration) // AI won't agree to trade for 10 turns
|
||||
|
Reference in New Issue
Block a user