diff --git a/(1) Community Patch/Database Changes/AI/CoreNewDiplomacyResponses.xml b/(1) Community Patch/Database Changes/AI/CoreNewDiplomacyResponses.xml
index c8f4e09727..1239df07c6 100644
--- a/(1) Community Patch/Database Changes/AI/CoreNewDiplomacyResponses.xml
+++ b/(1) Community Patch/Database Changes/AI/CoreNewDiplomacyResponses.xml
@@ -88,6 +88,12 @@
TXT_KEY_GENERIC_RESPONSE_SHARE_INTRIGUE_COOP_WAR%
+
+
+ RESPONSE_COOP_WAR_WARNING
+ TXT_KEY_GENERIC_RESPONSE_COOP_WAR_WARNING%
+
+
RESPONSE_GENEROUS_OFFER
diff --git a/(1) Community Patch/Database Changes/Text/en_US/AI/CoreNewDiplomacyResponseText.xml b/(1) Community Patch/Database Changes/Text/en_US/AI/CoreNewDiplomacyResponseText.xml
index b0e2e29144..3e50a35846 100644
--- a/(1) Community Patch/Database Changes/Text/en_US/AI/CoreNewDiplomacyResponseText.xml
+++ b/(1) Community Patch/Database Changes/Text/en_US/AI/CoreNewDiplomacyResponseText.xml
@@ -2311,6 +2311,15 @@
Our spies have uncovered that {1_PlayerName} and {2_PlayerName} are preparing to go to war with you. We hope that you will share any intrigue your agents discover with us.
+
+
+
+ {1_PlayerName} attempted to persuade us to start a cooperative war against you. I hope my rejection of their offer pleases you.
+
+
+ While {1_PlayerName} is my friend, I just told them their plan for a joint war against you was unacceptable. Beware their intentions!
+
+
diff --git a/CvGameCoreDLLUtil/include/CvEnums.h b/CvGameCoreDLLUtil/include/CvEnums.h
index 31817fe543..ad2d08c983 100644
--- a/CvGameCoreDLLUtil/include/CvEnums.h
+++ b/CvGameCoreDLLUtil/include/CvEnums.h
@@ -438,6 +438,8 @@ enum CLOSED_ENUM DiploMessageTypes
DIPLO_MESSAGE_SHARE_INTRIGUE_BRIBE_WAR,
DIPLO_MESSAGE_SHARE_INTRIGUE_COOP_WAR,
+ DIPLO_MESSAGE_COOP_WAR_WARNING, // Technically intrigue, but not shared in the same way
+
DIPLO_MESSAGE_HUMAN_KILLED_MY_SPY_UNFORGIVEN,
DIPLO_MESSAGE_HUMAN_KILLED_MY_SPY_FORGIVEN,
diff --git a/CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp b/CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp
index 421cb01e2f..fa17a710b7 100644
--- a/CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp
+++ b/CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp
@@ -37311,6 +37311,11 @@ const char* CvDiplomacyAI::GetDiploStringForMessage(DiploMessageTypes eDiploMess
strText = GetDiploTextFromTag("RESPONSE_SHARE_INTRIGUE_COOP_WAR", strOptionalKey1, strOptionalKey2);
break;
+ // AI warns human that another AI asked them to start a coop war against human
+ case DIPLO_MESSAGE_COOP_WAR_WARNING:
+ strText = GetDiploTextFromTag("RESPONSE_COOP_WAR_WARNING", strOptionalKey1);
+ break;
+
// Human catches enemy spy and does not forgive the thief
case DIPLO_MESSAGE_HUMAN_KILLED_MY_SPY_UNFORGIVEN:
strText = GetDiploTextFromTag("RESPONSE_HUMAN_KILLED_MY_SPY_UNFORGIVEN");
@@ -41871,12 +41876,6 @@ CoopWarStates CvDiplomacyAI::RespondToCoopWarRequest(PlayerTypes eAskingPlayer,
/// We rejected eAskingPlayer's request to go to war with eTargetPlayer, but should we warn the target?
bool CvDiplomacyAI::IsCoopWarRequestUnacceptable(PlayerTypes eAskingPlayer, PlayerTypes eTargetPlayer) const
{
- // Don't warn humans - no dialogue for this
- if (GET_PLAYER(eTargetPlayer).isHuman())
- {
- return false;
- }
-
CivApproachTypes eApproachTowardsAsker = GetCivApproach(eAskingPlayer);
CivOpinionTypes eOpinionOfAsker = GetCivOpinion(eAskingPlayer);
CivApproachTypes eApproachTowardsTarget = GetCivApproach(eTargetPlayer);
@@ -41989,6 +41988,29 @@ void CvDiplomacyAI::DoWarnCoopWarTarget(PlayerTypes eAskingPlayer, PlayerTypes e
{
PlayerTypes eLoopPlayer = (PlayerTypes) iPlayerLoop;
+ // If human was target, send message
+ if (GET_PLAYER(eLoopPlayer).isHuman())
+ {
+ if (GET_PLAYER(eLoopPlayer).getTeam() == eTargetTeam && !CvPreGame::isNetworkMultiplayerGame() && GC.getGame().getActivePlayer() == eLoopPlayer && !GC.getGame().IsAllDiploStatementsDisabled())
+ {
+ const char* szPlayerName = NULL;
+ if (GC.getGame().isGameMultiPlayer() && GET_PLAYER(eAskingPlayer).isHuman())
+ {
+ szPlayerName = GET_PLAYER(eAskingPlayer).getNickName();
+ }
+ else
+ {
+ szPlayerName = GET_PLAYER(eAskingPlayer).getNameKey();
+ }
+
+ DLLUI->SetForceDiscussionModeQuitOnBack(true); // Set force quit so that when discuss mode pops up the Back button won't go to leader root
+ const char* strText = GetDiploStringForMessage(DIPLO_MESSAGE_COOP_WAR_WARNING, NO_PLAYER, szPlayerName);
+ gDLL->GameplayDiplomacyAILeaderMessage(GetID(), DIPLO_UI_STATE_BLANK_DISCUSSION, strText, LEADERHEAD_ANIM_POSITIVE);
+ }
+ continue;
+ }
+
+ // Process global reactions for AI players
if (IsPlayerValid(eLoopPlayer, true) && eLoopPlayer != eMyPlayer)
{
CvDiplomacyAI* pDiplo = GET_PLAYER(eLoopPlayer).GetDiplomacyAI();