Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10654) /away still makes alliances
Home

[Freeciv-Dev] (PR#10654) /away still makes alliances

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#10654) /away still makes alliances
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Fri, 22 Oct 2004 04:55:21 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [mstefek - Fri Oct 22 11:51:17 2004]:
> This patch disallows away AI to sign diplomatic treatment.
> It can still exchange techs, gold and cities but IMO it's OK.
> --
> mateusz
> 
Sorry wrong patch, this one is better.

Index: ai/advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.47
diff -u -r1.47 advdiplomacy.c
--- ai/advdiplomacy.c   29 Sep 2004 02:24:18 -0000      1.47
+++ ai/advdiplomacy.c   22 Oct 2004 11:54:10 -0000
@@ -240,6 +240,14 @@
   case CLAUSE_ALLIANCE:
   case CLAUSE_PEACE:
   case CLAUSE_CEASEFIRE:
+    /* Don't do anything in away mode */
+    if (ai_handicap(pplayer, H_AWAY)) {
+      notify(aplayer, _("*%s (AI)* In away mode AI can't sign such a treaty"),
+             pplayer->name);
+      worth = -BIG_NUMBER;
+      break;
+    }
+
     /* This guy is at war with our alliance and we're not alliance
      * leader. */
     if (pplayer != ai->diplomacy.alliance_leader

[Prev in Thread] Current Thread [Next in Thread]