Resolved #10004 - Defensive pact allies *meet* the aggressor civ so they can declare war on them, if they haven't already met

This commit is contained in:
Yair Morgenstern 2023-08-30 23:14:51 +03:00
parent 5585dfa470
commit 96e96cf449

View File

@ -5,8 +5,6 @@ import com.unciv.Constants
import com.unciv.logic.IsPartOfGameInfoSerialization
import com.unciv.logic.civilization.AlertType
import com.unciv.logic.civilization.Civilization
import com.unciv.logic.civilization.DiplomacyAction
import com.unciv.logic.civilization.LocationAction
import com.unciv.logic.civilization.NotificationCategory
import com.unciv.logic.civilization.NotificationIcon
import com.unciv.logic.civilization.PopupAlert
@ -803,6 +801,7 @@ class DiplomacyManager() : IsPartOfGameInfoSerialization {
&& !ourDipManager.otherCiv().isAtWarWith(civAtWarWith)
}) {
val ally = ourDefensivePact.otherCiv()
if (!civAtWarWith.knows(ally)) civAtWarWith.diplomacyFunctions.makeCivilizationsMeet(ally, true)
// Have the aggressor declare war on the ally.
civAtWarWith.getDiplomacyManager(ally).declareWar(true)
// Notify the aggressor