Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2005:
[Freeciv-Dev] (PR#14815) remove allied wins
Home

[Freeciv-Dev] (PR#14815) remove allied wins

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#14815) remove allied wins
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 10 Dec 2005 08:54:07 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14815 >

allied wins are an abomination. this removes them. in a game, if all who
are left are allied, then someone must backstab in order to win the game.

-mike

Index: server/srv_main.c
===================================================================
--- server/srv_main.c   (revision 11332)
+++ server/srv_main.c   (working copy)
@@ -205,7 +205,6 @@
 bool is_game_over(void)
 {
   int barbs = 0, alive = 0;
-  bool all_allied;
   struct player *victor = NULL;
 
   /* quit if we are past the year limit */
@@ -275,30 +274,6 @@
     return TRUE;
   }
 
-  /* quit if all remaining players are allied to each other */
-  all_allied = TRUE;
-  players_iterate(pplayer) {
-    players_iterate(aplayer) {
-      if (!pplayers_allied(pplayer, aplayer)
-          && pplayer->is_alive
-          && aplayer->is_alive
-          && !pplayer->surrendered
-          && !aplayer->surrendered) {
-        all_allied = FALSE;
-        break;
-      }
-    } players_iterate_end;
-    if (!all_allied) {
-      break;
-    }
-  } players_iterate_end;
-  if (all_allied) {
-    notify_conn(game.est_connections, NULL, E_GAME_END, 
-                  _("Game ended in allied victory"));
-    gamelog(GAMELOG_JUDGE, GL_ALLIEDWIN);
-    return TRUE;
-  }
-
   return FALSE;
 }
 
Index: server/gamelog.c
===================================================================
--- server/gamelog.c    (revision 11332)
+++ server/gamelog.c    (working copy)
@@ -64,7 +64,6 @@
   "Draw",
   "Lone Win",
   "Team Win",
-  "Allied Win"
 };
 
 /**************************************************************************
@@ -537,15 +536,6 @@
                   : "Game ended in victory for the %s",
                   get_nation_name_plural(pplayer->nation));
       break;
-    case GL_ALLIEDWIN:
-      my_snprintf(buf, sizeof(buf), "<type>%s</type>", endgame_strings[num]);
-      players_iterate(aplayer) {
-        if (aplayer->is_alive) {
-          cat_snprintf(buf, sizeof(buf), "<n>%d</n>", aplayer->player_no);
-        }
-      } players_iterate_end;
-      my_snprintf(msg, sizeof(msg), "Game ended in allied victory");
-      break;
     case GL_TEAMWIN:
       pteam = va_arg(args, struct team *);
       my_snprintf(buf, sizeof(buf), "<type>%s</type>", endgame_strings[num]);
Index: server/gamelog.h
===================================================================
--- server/gamelog.h    (revision 11332)
+++ server/gamelog.h    (working copy)
@@ -50,8 +50,7 @@
   GL_NONE,
   GL_DRAW,
   GL_LONEWIN,
-  GL_TEAMWIN,
-  GL_ALLIEDWIN
+  GL_TEAMWIN
 };
 
 /* treaty clause types */

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