[Freeciv-Dev] (PR#10654) /away still makes alliances
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10654 >
> [jdorje - Thu Oct 21 00:02:56 2004]:
>
> /list: Lee Teng Hui (user michael, AI, difficulty level away, nation
> Taiwanese) 1 connection:
> /list: michael from
> CPE00608c86a77d-CM00e06f1f5286.cpe.net.cable.rogers.com (command
>
> Yet this AI player just signed an alliance with me...
>
> jason
>
This patch disallows away AI to sign diplomatic treatment.
It can still exchange techs, gold and cities but IMO it's OK.
--
mateusz
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:49:54 -0000
@@ -240,6 +240,15 @@
case CLAUSE_ALLIANCE:
case CLAUSE_PEACE:
case CLAUSE_CEASEFIRE:
+ /* Don't do anything */
+ if (ai_handicap(pplayer, H_AWAY)) {
+ notify(aplayer, _("*%s (AI)* In away mode AI can't sign such a treaty"),
+ pplayer->name,
+ ai->diplomacy.alliance_leader->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
|
|