Complete.Org: Mailing Lists: Archives: freeciv-ai: March 2004:
[freeciv-ai] (PR#7299) ai breaks alliance; then immediately reforms it
Home

[freeciv-ai] (PR#7299) ai breaks alliance; then immediately reforms it

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] (PR#7299) ai breaks alliance; then immediately reforms it
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 26 Mar 2004 11:28:55 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7299 >

[jshort@xxxxxxxxxxxxxx - Sat Jan 24 16:35:23 2004]:
> When I proposed alliance again immediately after they broke it, they
> accepted.

Attached patch should fix this. No more AI love for you!

  - Per
Index: ai/advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.17
diff -u -r1.17 advdiplomacy.c
--- ai/advdiplomacy.c   26 Mar 2004 19:20:27 -0000      1.17
+++ ai/advdiplomacy.c   26 Mar 2004 19:28:02 -0000
@@ -1089,9 +1089,7 @@
          /* to peace */
          handle_diplomacy_cancel_pact(pplayer, aplayer->player_no,
                                       CLAUSE_ALLIANCE);
-          if (adip->love > 0) {
-            adip->love /= 4;
-          }
+          adip->love = MIN(adip->love, 0);
           if (gives_shared_vision(pplayer, aplayer)) {
             remove_shared_vision(pplayer, aplayer);
           }

[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] (PR#7299) ai breaks alliance; then immediately reforms it, Per I. Mathisen <=