Index: ai/advdiplomacy.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v retrieving revision 1.67 diff -u -r1.67 advdiplomacy.c --- ai/advdiplomacy.c 19 Feb 2005 23:26:25 -0000 1.67 +++ ai/advdiplomacy.c 5 Mar 2005 14:06:37 -0000 @@ -355,15 +355,20 @@ break; } - /* If this lucky fella got a ceasefire with da boss, then + /* If this lucky fella got a ceasefire or peace with da boss, then * let him live. */ - if (pplayer_get_diplstate(aplayer, ai->diplomacy.alliance_leader)->type - == DS_CEASEFIRE && pclause->type == CLAUSE_CEASEFIRE) { + if ((pplayer_get_diplstate(aplayer, ai->diplomacy.alliance_leader)->type + == DS_CEASEFIRE + || pplayer_get_diplstate(aplayer, ai->diplomacy.alliance_leader)->type + == DS_PEACE) + && pclause->type == CLAUSE_CEASEFIRE) { notify(aplayer, _("*%s (AI)* %s recommended that I give you a ceasefire." " This is your lucky day."), pplayer->name, ai->diplomacy.alliance_leader->name); if (ai->diplomacy.target == aplayer) { /* Damn, we lost our target, too! Stupid boss! */ + /* FIXME: We shouldn't do this here - the other player may not + * accept the whole treaty! */ ai->diplomacy.target = NULL; ai->diplomacy.timer = 0; ai->diplomacy.countdown = 0; @@ -465,7 +470,7 @@ } else if (give) { /* AI must be crazy to trade away its cities */ worth -= city_gold_worth(offer); - if (is_capital(offer)) { + if (is_capital(offer) || city_list_size(pplayer->cities) <= 3) { worth = -BIG_NUMBER; /* Never! Ever! */ } else { worth *= 15; @@ -716,9 +721,9 @@ /* Remember: pplayers_allied() returns true when aplayer == eplayer */ if (!cancel_excuse && pplayers_allied(aplayer, eplayer)) { - if (ds == DS_CEASEFIRE) { + if (ds == DS_NEUTRAL) { kill_desire -= kill_desire / 10; /* 10% off */ - } else if (ds == DS_NEUTRAL) { + } else if (ds == DS_CEASEFIRE) { kill_desire -= kill_desire / 7; /* 15% off */ } else if (ds == DS_PEACE) { kill_desire -= kill_desire / 5; /* 20% off */