Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2000:
[Freeciv-Dev] patches: barbarians: default skill and in list (PR#324)
Home

[Freeciv-Dev] patches: barbarians: default skill and in list (PR#324)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] patches: barbarians: default skill and in list (PR#324)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sat, 25 Mar 2000 18:34:34 -0800 (PST)

Two small patches related to barbarian skill levels:

- I think the default barbarian skill level should be game.skill_level

- To make adjusting barbarian skills easier, barbarians are shown in
  the server-side player list (on console or players with cmdlevel ctrl
  or better).  Ie, so that you can see their name and current level. 
  (Also makes messages at reload start about setting skill levels 
  less confusing.)

-- David

--- freeciv-cvs/server/barbarian.c      Fri Mar 17 14:19:41 2000
+++ fc-adv/server/barbarian.c   Sun Mar 26 11:28:19 2000
@@ -161,7 +161,7 @@
     barbarians->ai.is_barbarian = LAND_BARBARIAN;
   else
     barbarians->ai.is_barbarian = SEA_BARBARIAN;
-  set_ai_level_directer(barbarians, 5);           /* be a normal player */
+  set_ai_level_directer(barbarians, game.skill_level);
   init_tech(barbarians, game.tech);
 
   game.nplayers++;
--- freeciv-cvs/server/stdinhand.c      Sun Mar 19 15:28:59 2000
+++ fc-adv/server/stdinhand.c   Sun Mar 26 11:35:51 2000
@@ -2653,8 +2653,15 @@
   else
   {
     for(i=0; i<game.nplayers; i++) {
-      if (is_barbarian(&game.players[i])) continue;
-      if (game.players[i].ai.control) {
+      if (is_barbarian(&game.players[i])) {
+       if (caller==NULL || access_level(caller) >= ALLOW_CTRL) {
+         cmd_reply(CMD_LIST, caller, C_COMMENT,
+               _("%s (Barbarian, %s)"),
+               game.players[i].name,
+               name_of_skill_level(game.players[i].ai.skill_level));
+       }
+      }
+      else if (game.players[i].ai.control) {
        if (game.players[i].conn) {
          cmd_reply(CMD_LIST, caller, C_COMMENT,
                _("%s (AI, %s) is being observed from %s"),

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] patches: barbarians: default skill and in list (PR#324), David Pfitzner <=