Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] (PR#2930) building requirements for units
Home

[Freeciv-Dev] (PR#2930) building requirements for units

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#2930) building requirements for units
From: "Per I. Mathisen via RT" <rt@xxxxxxxxxxxxxx>
Date: Tue, 28 Jan 2003 13:35:35 -0800
Reply-to: rt@xxxxxxxxxxxxxx

This patch adds a new field to units.ruleset called "impr_req", which
makes the building of a unit conditional upon the presence of the given
building.

I thought this was going to be an easy thing to code, but I stumbled into
a _lot_ of bugs during the ride, and ended up with a lot bigger patch than
I had hoped.

It may not need the mandatory capability, but I don't have a clear picture
of what would happen to a non-patched clients (could trigger some rather
complex issues), so I guess it is best that way.

The AI had a number of issues, most notably process_attacker_want() and
kill_something_with(), the latter which I attacked with a chainsaw. The
result may not be pretty, but I at least I managed to remove some lines of
code, and it doesn't crash anymore.

Now, to test this patch, you will need a custom ruleset, so I have
attached a rewritten-from-scratch "perrin" ruleset which makes use of this
to require buildings for almost any unit. ICS this! For a full list of
changes, see CHANGES.

I want some preliminary comments on this patch. It is probably not yet
ready for committing.

  - Per

Index: ai/advdomestic.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdomestic.c,v
retrieving revision 1.99
diff -u -r1.99 advdomestic.c
--- ai/advdomestic.c    13 Jan 2003 23:27:03 -0000      1.99
+++ ai/advdomestic.c    28 Jan 2003 21:15:51 -0000
@@ -956,7 +956,8 @@
 
   unit_type = best_role_unit(pcity, F_SETTLERS);
 
-  if (est_food > utype_food_cost(get_unit_type(unit_type), gov)) {
+  if (unit_type != U_LAST
+      && est_food > utype_food_cost(get_unit_type(unit_type), gov)) {
     /* settler_want calculated in settlers.c called from ai_manage_city() */
     int want = pcity->ai.settler_want;
 
@@ -985,7 +986,8 @@
 
   unit_type = best_role_unit(pcity, F_CITIES);
 
-  if (est_food > utype_food_cost(get_unit_type(unit_type), gov)) {
+  if (unit_type != U_LAST
+      && est_food > utype_food_cost(get_unit_type(unit_type), gov)) {
     /* founder_want calculated in settlers.c, called from ai_manage_city(). */
     int want = pcity->ai.founder_want;
 
@@ -1013,24 +1015,24 @@
 
     init_choice(&cur);
     ai_advisor_choose_building(pcity, &cur);
-    /* Allowing buy of peaceful units after much testing. -- Syela */
-    /* want > 100 means BUY RIGHT NOW */
-    /* if (choice->want > 100) choice->want = 100; */
     copy_if_better_choice(&cur, choice);
   }
 
-  /* FIXME: rather !is_valid_choice() --rwetmore */
   if (choice->want == 0) {
     /* Oh dear, better think of something! */
     unit_type = best_role_unit(pcity, F_TRADE_ROUTE);
     
+    choice->want = 1;
     if (unit_type != U_LAST) {
-      choice->want = 1;
       choice->type = CT_NONMIL;
       choice->choice = unit_type;
+    } else {
+      /* Capitalization is last resort */
+      choice->type = CT_BUILDING;
+      choice->choice = B_CAPITAL;
     }
   }
-  
+
   /* If we don't do following, we buy caravans in city X when we should be
    * saving money to buy defenses for city Y. -- Syela */
   if (choice->want >= 200) choice->want = 199;
Index: ai/advmilitary.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advmilitary.c,v
retrieving revision 1.132
diff -u -r1.132 advmilitary.c
--- ai/advmilitary.c    27 Jan 2003 19:40:36 -0000      1.132
+++ ai/advmilitary.c    28 Jan 2003 21:15:51 -0000
@@ -81,6 +81,7 @@
     }
   } simple_ai_unit_type_iterate_end;
 
+  assert(bestid == -1 || (bestid < 200 && bestid >= 0));
   return bestid;
 }
 
@@ -122,6 +123,8 @@
       }
     }
   } simple_ai_unit_type_iterate_end;
+
+  assert(bestid == -1 || (bestid < 200 && bestid >= 0));
   return bestid;
 }
 
@@ -800,27 +803,23 @@
   TODO: Get rid of these parameters :).
 
   (x,y) is location of the target.
-  (best_value, best_choice) is pre-filled with our current choice, we only 
+  best_choice is pre-filled with our current choice, we only 
   consider units of the same move_type as best_choice
 **************************************************************************/
 static void process_attacker_want(struct player *pplayer, struct city *pcity,
                                   int value, Unit_Type_id victim_unit_type,
                                   bool veteran, int x, int y, bool unhap,
-                                  int *best_value, int *best_choice,
+                                  struct ai_choice *best_choice,
                                   struct unit *boat, Unit_Type_id boattype,
                                   int needferry)
 { 
   /* The enemy city.  acity == NULL means stray enemy unit */
   struct city *acity = map_get_city(x, y);
   bool shore = is_ocean_near_tile(pcity->x, pcity->y);
-  int orig_move_type = unit_types[*best_choice].move_type;
+  int orig_move_type = unit_types[best_choice->choice].move_type;
   int victim_count = 1;
 
-  if (orig_move_type != SEA_MOVING && orig_move_type != LAND_MOVING) {
-    freelog(LOG_ERROR, "ERROR: Attempting to deal with non-trivial" 
-            " move_type in process_attacker_want");
-    return;
-  }
+  assert(orig_move_type == SEA_MOVING || orig_move_type == LAND_MOVING);
 
   if (acity) {
     /* If it is a city, we may have to whack it many times */
@@ -945,22 +944,31 @@
         if (tech_dist > 0) {
           /* This is a future unit, tell the scientist how much we need it */
           pplayer->ai.tech_want[tech_req] += want;
-          
-          freelog(LOG_DEBUG,
-                  "%s wants %s, %s to punish %s@(%d, %d) with desire %d.", 
-                  pcity->name, advances[tech_req].name, unit_name(unit_type),
-                  (acity ? acity->name : "enemy"), x, y, want);
-          
-        } else if (want > *best_value) {
-          /* This is a real unit and we really want it */
-          freelog(LOG_DEBUG, "%s overriding %s(%d) with %s(%d)"
-                  " [attack=%d,value=%d,move_time=%d,vuln=%d,bcost=%d]",
-                  pcity->name, unit_name(*best_choice), *best_value,
-                  unit_name(unit_type), want, attack, value, move_time, vuln,
-                  bcost);
-
-          *best_choice = unit_type;
-          *best_value = want;
+          CITY_LOG(LOG_DEBUG, pcity, "wants %s to build %s to punish 
%s@(%d,%d)"
+                   " with desire %d", advances[tech_req].name, 
unit_name(unit_type),
+                   (acity ? acity->name : "enemy"), x, y, want);          
+        } else if (want > best_choice->want) {
+          if (can_build_unit(pcity, unit_type)) {
+            /* This is a real unit and we really want it */
+            CITY_LOG(LOG_DEBUG, pcity, "overriding %s(%d) with %s(%d)"
+                     " [attack=%d,value=%d,move_time=%d,vuln=%d,bcost=%d]",
+                     unit_name(best_choice->choice), best_choice->want, 
+                     unit_name(unit_type), want, attack, value, move_time, 
+                     vuln, bcost);
+            best_choice->choice = unit_type;
+            best_choice->want = want;
+            best_choice->type = CT_ATTACKER;
+          } else if (can_build_improvement(pcity, 
+                      get_unit_type(unit_type)->impr_requirement)) {
+            Impr_Type_id id = get_unit_type(unit_type)->impr_requirement;
+
+            CITY_LOG(LOG_DEBUG, pcity, "building %s to build %s",
+                     get_improvement_type(id)->name, 
+                     get_unit_type(unit_type)->name);
+            best_choice->choice = id;
+            best_choice->want = want;
+            best_choice->type = CT_BUILDING;
+          }
         }
       }
     }
@@ -986,13 +994,8 @@
   int vuln;
   /* Benefit from fighting the target */
   int benefit;
-  /* Want (amortized) of the operation */
-  int want;
-  /* Build cost of attacker (+adjustments) */
-  int bcost, bcost_bal;
   /* Number of defenders in the stack */
   int victim_count;
-  Unit_Type_id att_type;
   /* Enemy defender type */
   Unit_Type_id def_type;
   /* Our move rate */
@@ -1017,6 +1020,14 @@
   bool go_by_boat;
   /* Is the defender veteran? */
   bool def_vet;
+  struct ai_choice best_choice;
+
+  init_choice(&best_choice);
+  best_choice.choice = myunit->type;
+  best_choice.type = CT_ATTACKER;
+  best_choice.want = choice->want;
+
+  assert(is_military_unit(myunit) && !is_air_unit(myunit));
 
   if (pcity->ai.danger != 0 && assess_defense(pcity) == 0) {
     /* Defence comes first! */
@@ -1049,14 +1060,13 @@
 
   acity = map_get_city(x, y);
 
-  att_type = myunit->type;
   if (myunit->id != 0) {
     freelog(LOG_ERROR, "ERROR: Non-virtual unit in kill_something_with!");
     return;
   }
-  
-  move_rate = unit_types[att_type].move_rate;
-  if (unit_type_flag(att_type, F_IGTER)) {
+
+  move_rate = unit_type(myunit)->move_rate;
+  if (unit_flag(myunit, F_IGTER)) {
     /* See comment in unit_move_turns */
     move_rate *= 3;
   }
@@ -1068,7 +1078,6 @@
   attack *= attack;
   
   if (acity) {
- 
     if (!pplayers_at_war(pplayer, city_owner(acity))) {
       /* Not a valid target */
       return;
@@ -1084,11 +1093,11 @@
     move_time = turns_to_enemy_city(myunit->type, acity, move_rate, go_by_boat,
                                     ferryboat, boattype);
 
-    def_type = ai_choose_defender_versus(acity, att_type);
+    def_type = ai_choose_defender_versus(acity, myunit->type);
     if (move_time > 1) {
       def_vet = do_make_unit_veteran(acity, def_type);
       vuln 
-        = unit_vulnerability_virtual2(att_type, def_type, x, y, FALSE,
+        = unit_vulnerability_virtual2(myunit->type, def_type, x, y, FALSE,
                                       def_vet, FALSE, 0);
       benefit = unit_types[def_type].build_cost;
     } else {
@@ -1097,7 +1106,7 @@
       def_vet = FALSE;
     }
     if (pdef) {
-      int m = unit_vulnerability_virtual2(att_type, pdef->type, x, y, FALSE,
+      int m = unit_vulnerability_virtual2(myunit->type, pdef->type, x, y, 
FALSE,
                                       pdef->veteran, myunit->id != 0,
                                       pdef->hp);
       if (vuln < m) {
@@ -1138,7 +1147,7 @@
       = turns_to_enemy_unit(myunit->type, move_rate, x, y, pdef->type);    
     
     def_type = pdef->type;
-    vuln = unit_vulnerability_virtual2(att_type, def_type, x, y,
+    vuln = unit_vulnerability_virtual2(myunit->type, def_type, x, y,
                                        pdef->activity == ACTIVITY_FORTIFIED,
                                        pdef->veteran, myunit->id != 0,
                                        pdef->hp);
@@ -1154,38 +1163,6 @@
     /* cost of ferry */
     needferry = unit_types[boattype].build_cost;
   }
-  bcost = unit_types[att_type].build_cost;
-  bcost_bal = build_cost_balanced(att_type);
-  
-  if (unit_types[att_type].move_type != LAND_MOVING &&
-      unit_types[att_type].move_type != HELI_MOVING && !pdef) {
-    /* Nobody there to atack! */
-    want = 0;
-  } else if (move_time > THRESHOLD) {
-    /* Too far */
-    want = 0;
-  } else if ((unit_types[att_type].move_type == LAND_MOVING ||
-            unit_types[att_type].move_type == HELI_MOVING) && acity &&
-           acity->ai.invasion == 2) {
-    want = bcost * SHIELD_WEIGHTING;
-  } else {
-    if (!acity) {
-      want = kill_desire(benefit, attack, bcost, vuln, victim_count);
-    } else {
-      int a_squared = acity->ai.attack * acity->ai.attack;
-      
-      want = kill_desire(benefit, attack, bcost + acity->ai.bcost, 
-                         vuln, victim_count);
-      if (benefit * a_squared > acity->ai.bcost * vuln) {
-        want -= kill_desire(benefit, a_squared, acity->ai.bcost, 
-                            vuln, victim_count);
-      }
-    }
-  }
-  want -= move_time * (unhap ? SHIELD_WEIGHTING + 2 * TRADE_WEIGHTING 
-                     : SHIELD_WEIGHTING);
-  want = military_amortize(pplayer, pcity, want, MAX(1, move_time), 
-                           bcost_bal + needferry);
   
   if (myunit->id != 0) {
     freelog(LOG_ERROR, "ERROR: Non-virtual unit in kill_something_with");
@@ -1194,27 +1171,21 @@
 
   if (!go_by_boat) {
     process_attacker_want(pplayer, pcity, benefit, def_type, def_vet, x, y, 
-                          unhap, &want, &att_type, NULL, U_LAST, needferry);
+                          unhap, &best_choice, NULL, U_LAST, needferry);
   } else if (ferryboat) { 
     process_attacker_want(pplayer, pcity, benefit, def_type, def_vet, x, y, 
-                          unhap, &want, &att_type, ferryboat, 
-                          boattype, needferry);
+                          unhap, &best_choice, ferryboat, boattype, needferry);
   } else {
     process_attacker_want(pplayer, pcity, benefit, def_type, def_vet, x, y, 
-                          unhap, &want, &att_type, NULL, boattype, needferry);
+                          unhap, &best_choice, NULL, boattype, needferry);
   }
 
-  if (want > choice->want) { 
-    /* We want attacker more that what we have selected before */
-    choice->choice = att_type;
-    choice->type = CT_ATTACKER;
-    choice->want = want;
+  if (best_choice.want > choice->want) {
+    copy_if_better_choice(&best_choice, choice);
     if (needferry != 0) {
       ai_choose_ferryboat(pplayer, pcity, choice);
     }
-    freelog(LOG_DEBUG, "%s has chosen attacker, %s, want=%d",
-            pcity->name, unit_types[choice->choice].name, choice->want);
-  } 
+  }
 }
 
 /**********************************************************************
@@ -1331,7 +1302,6 @@
 
   ai_choose_diplomat_defensive(pplayer, pcity, choice, def);
 
-
   if (danger != 0) { /* otherwise might be able to wait a little longer to 
defend */
     if (danger >= def) {
       if (urgency == 0) danger = 100; /* don't waste money otherwise */
@@ -1433,6 +1403,7 @@
   if (choice->want <= 0) {
     CITY_LOG(LOGLEVEL_BUILD, pcity, "military advisor has no advice");
   } else if (is_unit_choice_type(choice->type)) {
+    assert(can_build_unit(pcity, choice->choice));
     CITY_LOG(LOGLEVEL_BUILD, pcity, "military advisor choice: %s (want %d)",
              unit_types[choice->choice].name, choice->want);
   } else {
Index: ai/aicity.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aicity.c,v
retrieving revision 1.137
diff -u -r1.137 aicity.c
--- ai/aicity.c 27 Jan 2003 19:30:32 -0000      1.137
+++ ai/aicity.c 28 Jan 2003 21:15:51 -0000
@@ -266,12 +266,10 @@
   if (best_role_unit(pcity, F_TRADE_ROUTE) != U_LAST) {
     pcity->currently_building = best_role_unit(pcity, F_TRADE_ROUTE);
     pcity->is_building_unit = TRUE;
-  } else if (can_build_improvement(pcity, B_CAPITAL)) {
+  } else {
+    /* Capitalization should *always* be available */
     pcity->currently_building = B_CAPITAL;
     pcity->is_building_unit = FALSE;
-  } else if (best_role_unit(pcity, F_SETTLERS) != U_LAST) {
-    pcity->currently_building = best_role_unit(pcity, F_SETTLERS);
-    pcity->is_building_unit = TRUE;
   }
 }
 
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.277
diff -u -r1.277 packhand.c
--- client/packhand.c   27 Jan 2003 22:00:34 -0000      1.277
+++ client/packhand.c   28 Jan 2003 21:15:52 -0000
@@ -405,6 +405,7 @@
 
   pcity->is_building_unit=packet->is_building_unit;
   pcity->currently_building=packet->currently_building;
+  assert(pcity->currently_building < B_LAST && pcity->currently_building >= 0);
   if (city_is_new) {
     init_worklist(&pcity->worklist);
 
@@ -1761,6 +1762,7 @@
   u->defense_strength   = p->defense_strength;
   u->move_rate          = p->move_rate;
   u->tech_requirement   = p->tech_requirement;
+  u->impr_requirement   = p->impr_requirement;
   u->vision_range       = p->vision_range;
   u->transport_capacity = p->transport_capacity;
   u->hp                 = p->hp;
Index: common/capstr.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/capstr.c,v
retrieving revision 1.117
diff -u -r1.117 capstr.c
--- common/capstr.c     16 Jan 2003 18:23:35 -0000      1.117
+++ common/capstr.c     28 Jan 2003 21:15:52 -0000
@@ -75,7 +75,7 @@
  */
 
 #define CAPABILITY "+1.14.0 conn_info +occupied team tech_impr_gfx " \
-                   "city_struct_minor_cleanup"
+                   "city_struct_minor_cleanup +impr_req"
   
 /* "+1.14.0" is protocol for 1.14.0 release.
  *
@@ -92,6 +92,8 @@
  *
  * "city_struct_minor_cleanup" just removes one unused variable from the
  * city struct, which no longer needs to be sent to the client.
+ *
+ * "impr_req" is city improvements as a prerequisite for building units
  */
 
 void init_our_capability(void)
Index: common/city.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.c,v
retrieving revision 1.177
diff -u -r1.177 city.c
--- common/city.c       16 Jan 2003 18:23:35 -0000      1.177
+++ common/city.c       28 Jan 2003 21:15:52 -0000
@@ -398,15 +398,22 @@
   return(could_build_improvement(pcity, id));
 }
 
-
 /**************************************************************************
 Whether given city can build given unit,
 ignoring whether unit is obsolete.
 **************************************************************************/
 bool can_build_unit_direct(struct city *pcity, Unit_Type_id id)
 {
-  if (!can_player_build_unit_direct(city_owner(pcity), id))
+  Impr_Type_id impr_req;
+
+  if (!can_player_build_unit_direct(city_owner(pcity), id)) {
+    return FALSE;
+  }
+  impr_req = get_unit_type(id)->impr_requirement;
+  assert(impr_req <= B_LAST && impr_req >= 0);
+  if (impr_req != B_LAST && !city_got_building(pcity, impr_req)) {
     return FALSE;
+  }
   if (!is_ocean_near_tile(pcity->x, pcity->y) && is_water_unit(id)) {
     return FALSE;
   }
Index: common/packets.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.c,v
retrieving revision 1.229
diff -u -r1.229 packets.c
--- common/packets.c    16 Jan 2003 18:23:35 -0000      1.229
+++ common/packets.c    28 Jan 2003 21:15:52 -0000
@@ -1937,6 +1937,7 @@
   dio_put_uint8(&dout, packet->defense_strength);
   dio_put_uint8(&dout, packet->move_rate);
   dio_put_uint8(&dout, packet->tech_requirement);
+  dio_put_uint8(&dout, packet->impr_requirement);
   dio_put_uint8(&dout, packet->vision_range);
   dio_put_uint8(&dout, packet->transport_capacity);
   dio_put_uint8(&dout, packet->hp);
@@ -1988,6 +1989,7 @@
   dio_get_uint8(&din, &packet->defense_strength);
   dio_get_uint8(&din, &packet->move_rate);
   dio_get_uint8(&din, &packet->tech_requirement);
+  dio_get_uint8(&din, &packet->impr_requirement);
   dio_get_uint8(&din, &packet->vision_range);
   dio_get_uint8(&din, &packet->transport_capacity);
   dio_get_uint8(&din, &packet->hp);
Index: common/packets.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.h,v
retrieving revision 1.131
diff -u -r1.131 packets.h
--- common/packets.h    16 Jan 2003 18:23:36 -0000      1.131
+++ common/packets.h    28 Jan 2003 21:15:52 -0000
@@ -606,6 +606,7 @@
   int defense_strength;
   int move_rate;
   int tech_requirement;
+  int impr_requirement;
   int vision_range;
   int transport_capacity;
   int hp;
Index: common/unittype.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unittype.c,v
retrieving revision 1.25
diff -u -r1.25 unittype.c
--- common/unittype.c   14 Jan 2003 22:24:07 -0000      1.25
+++ common/unittype.c   28 Jan 2003 21:15:52 -0000
@@ -419,6 +419,9 @@
 **************************************************************************/
 bool can_player_build_unit_direct(struct player *p, Unit_Type_id id)
 {
+  Impr_Type_id impr_req;
+  Tech_Type_id tech_req;
+
   if (!unit_type_exists(id))
     return FALSE;
   if (unit_type_flag(id, F_NUCLEAR) && game.global_wonders[B_MANHATTEN] == 0)
@@ -428,6 +431,11 @@
     return FALSE;
   if (get_invention(p,unit_types[id].tech_requirement)!=TECH_KNOWN)
     return FALSE;
+  impr_req = unit_types[id].impr_requirement;
+  tech_req = get_improvement_type(impr_req)->tech_req;
+  if (impr_req != B_LAST && get_invention(p, tech_req) != TECH_KNOWN) {
+    return FALSE;
+  }
   return TRUE;
 }
 
Index: common/unittype.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unittype.h,v
retrieving revision 1.18
diff -u -r1.18 unittype.h
--- common/unittype.h   14 Jan 2003 22:24:07 -0000      1.18
+++ common/unittype.h   28 Jan 2003 21:15:52 -0000
@@ -167,6 +167,7 @@
   int defense_strength;
   int move_rate;
   int tech_requirement;
+  int impr_requirement;
   int vision_range;
   int transport_capacity;
   int hp;
Index: data/default/units.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/units.ruleset,v
retrieving revision 1.43
diff -u -r1.43 units.ruleset
--- data/default/units.ruleset  28 Jan 2003 01:50:14 -0000      1.43
+++ data/default/units.ruleset  28 Jan 2003 21:15:52 -0000
@@ -44,6 +44,7 @@
 ;                for no alternate graphic.
 ; tech_req      = required advance, names from techs.ruleset, or special:
 ;                 "None" => available from start; "Never" => never available
+; impr_req     = required city improvement, names from buildings.ruleset
 ; obsolete_by   = can be upgraded to and made obsolete by another unit by name
 ; move_type     = "Land" or "Sea" or "Air" or "Heli"
 ; transport_cap = Number of units (ground, or air/missiles, depending on flags)
Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.206
diff -u -r1.206 citytools.c
--- server/citytools.c  16 Jan 2003 18:23:36 -0000      1.206
+++ server/citytools.c  28 Jan 2003 21:15:52 -0000
@@ -1009,12 +1009,21 @@
   pcity->trade_prod=0;
   pcity->tile_trade = 0;
   pcity->original = pplayer->player_no;
-  pcity->is_building_unit = TRUE;
+  {
+    int u = best_role_unit(pcity, L_FIRSTBUILD);
+
+    if (u < U_LAST && u >= 0) {
+      pcity->is_building_unit = TRUE;
+      pcity->currently_building = u;
+    } else {
+      pcity->is_building_unit = FALSE;
+      pcity->currently_building = B_CAPITAL;
+    }
+  }
   pcity->turn_founded = game.turn;
   pcity->did_buy = TRUE;
   pcity->did_sell = FALSE;
   pcity->airlift = FALSE;
-  pcity->currently_building=best_role_unit(pcity, L_FIRSTBUILD);
 
   /* Set up the worklist */
   init_worklist(&pcity->worklist);
@@ -1810,8 +1819,9 @@
 
   /* If the city is already building this thing, don't do anything */
   if (pcity->is_building_unit == is_unit &&
-      pcity->currently_building == target)
+      pcity->currently_building == target) {
     return;
+  }
 
   /* Is the city no longer building a wonder? */
   if(!pcity->is_building_unit && is_wonder(pcity->currently_building) &&
@@ -1869,10 +1879,6 @@
                     pcity->name);
   }
 }
-
-
-
-
 
 /**************************************************************************
 ...
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.202
diff -u -r1.202 cityturn.c
--- server/cityturn.c   9 Jan 2003 02:36:37 -0000       1.202
+++ server/cityturn.c   28 Jan 2003 21:15:52 -0000
@@ -619,29 +619,32 @@
   int want=0;
 
   init_choice(&choice);
-  if (!city_owner(pcity)->ai.control)
-    ai_eval_buildings(pcity); /* so that ai_advisor is smart even for humans */
-  ai_advisor_choose_building(pcity, &choice); /* much smarter version -- Syela 
*/
+  if (!city_owner(pcity)->ai.control) {
+    /* so that ai_advisor is smart even for humans */
+    ai_eval_buildings(pcity);
+  }
+  ai_advisor_choose_building(pcity, &choice);
   freelog(LOG_DEBUG, "Advisor_choose_build got %d/%d"
          " from ai_advisor_choose_building.",
          choice.choice, choice.want);
   id = choice.choice;
   want = choice.want;
 
-  if (id!=-1 && id != B_LAST && want > 0) {
+  if (id >= 0 && id < B_LAST && want > 0) {
     change_build_target(pplayer, pcity, id, FALSE, E_IMP_AUTO);
-    /* making something. */    
+    /* making something. */
     return;
   }
 
+  /* Emergency. I have never seen that this code has been called. -- Per */
   impr_type_iterate(i) {
-    if(can_build_improvement(pcity, i) && i != B_PALACE) { /* build something 
random, undecided */
-      pcity->currently_building=i;
+    if (can_build_improvement(pcity, i) && i != B_PALACE) {
+      /* build something random, undecided */
+      pcity->currently_building = i;
       pcity->is_building_unit = FALSE;
       return;
     }
   } impr_type_iterate_end;
-
 }
 
 /**************************************************************************
@@ -802,9 +805,10 @@
 **************************************************************************/
 static void obsolete_building_test(struct city *pcity, int b1, int b2)
 { 
-  if (pcity->currently_building==b1 && 
-      can_build_improvement(pcity, b2))
-    pcity->currently_building=b2;
+  if (pcity->currently_building == b1 && !pcity->is_building_unit
+      && can_build_improvement(pcity, b2)) {
+    pcity->currently_building = b2;
+  }
 }
 
 /**************************************************************************
@@ -866,7 +870,8 @@
   int id2 = unit_upgrades_to(pcity, unit_types[id].obsoleted_by);
 
   if (can_build_unit_direct(pcity, id2)) {
-    pcity->currently_building=id2;
+    assert(id2 < U_LAST && id2 >= 0);
+    pcity->currently_building = id2;
     notify_player_ex(pplayer, pcity->x, pcity->y, E_UNIT_UPGRADED, 
                  _("Game: Production of %s is upgraded to %s in %s."),
                  get_unit_type(id)->name, 
Index: server/ruleset.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v
retrieving revision 1.130
diff -u -r1.130 ruleset.c
--- server/ruleset.c    13 Jan 2003 23:27:12 -0000      1.130
+++ server/ruleset.c    28 Jan 2003 21:15:53 -0000
@@ -651,7 +651,11 @@
   /* main stats: */
   unit_type_iterate(i) {
     u = &unit_types[i];
-    
+
+    u->impr_requirement = find_improvement_by_name(
+                           secfile_lookup_str_default(file, "None", 
+                           "%s.impr_req", sec[i]));
+
     sval = secfile_lookup_str(file, "%s.move_type", sec[i]);
     ival = unit_move_type_from_str(sval);
     if (ival==0) {
@@ -2411,6 +2415,7 @@
     packet.defense_strength = u->defense_strength;
     packet.move_rate = u->move_rate;
     packet.tech_requirement = u->tech_requirement;
+    packet.impr_requirement = u->impr_requirement;
     packet.vision_range = u->vision_range;
     packet.transport_capacity = u->transport_capacity;
     packet.hp = u->hp;
; Modifying this file:
; You should not modify this file except to make bugfixes or
; for other "maintenance".  If you want to make custom changes,
; you should create a new datadir subdirectory and copy this file
; into that directory, and then modify that copy.  Then use the
; command "rulesetdir <mysubdir>" in the server to have freeciv
; use your new customized file.
;
; The AI does not know the value of Partial_Invis, nor does this
; work against the AI, since it knows all. It does not know anything 
; about air units at all. It does not build No_Land_Attack, Missile 
; or Nuclear units.
;
; You should sort role units from worst to better, as often the best
; available role unit of a given sort will be picked by choosing
; the first available (not obsolete) such unit, or by picking the last
; such unit directly.

[datafile]
description="Default unit_type data for Freeciv"
options="1.9"

; Below: The individual units, one per section.
;
; The number can be variable, up to 200.  
; However for the "official" rulesets, units should not be removed 
; because that would break backward compatability with savegames.
;
; The order here matters: later units are considered "better" for
; a given flag or role.  
;
; The actual tag used (the * in [unit_*]) does not matter, except 
; it must be unique within this file, and it may be used in debug 
; output when reading this file.
;
; ** Fields **
;
; name          = name as seen by user 
; graphic       = tag specifing preferred graphic
; graphic_alt   = tag for alternate garphic if preferred graphic is not 
;                 present; especially if preferred graphic is non-standard, 
;                 this should be a standard tag.  Otherwise can use eg "-" 
;                 for no alternate graphic.
; tech_req      = required advance, names from techs.ruleset, or special:
;                 "None" => available from start; "Never" => never available
; impr_req      = required city improvement, names from buildings.ruleset
; obsolete_by   = can be upgraded to and made obsolete by another unit by name
; move_type     = "Land" or "Sea" or "Air" or "Heli"
; transport_cap = Number of units (ground, or air/missiles, depending on flags)
; fuel          = number of turns air units can fly before they crash. For
;                 barbarians this is used as lifetime instead
; uk_*          = upkeep costs, these are used as base values in the game
;                 (NOTE: gold upkeep is still not implemented)
; flags         = special flag strings
; roles         = special role strings
; sound_move    = optional sound effect when the unit moves
; sound_move_alt= optional alternative sound effect if above not
;                 supported in client
; sound_fight   = optional sound effect when the unit fights
; sound_fight_alt= optional alternative sound effect if above not
;                  supported in client
; helptext      = optional help text string; should escape all raw newlines 
;                 so that xgettext parsing works
;
; ** Flags **
;
; "HelpWonder"  = can help build wonders
; "TradeRoute"  = can establish trade routes
; "Missile"     = (air only) some buildings and units have higher defence 
;                  against these
; "IgZOC"       = (land only) ignore Zones of Control (ZOC)
; "NonMil"      = a non-military unit, does not cause unhappiness
; "IgTer"       = ignore terrain/road/rail, treat every tile as 1/3 move cost
; "Carrier"     = can transport air and missile units, but not land units
; "Missile_Carrier" = can transport only missiles, but no aircraft or land units
; "OneAttack"   = can only make a single attack, regardless of movement points
; "Pikemen"     = double defence power against "Horse" flag units
; "Horse"       = (no effect)
; "IgWall"      = ignore effect of city walls
; "FieldUnit"   = cause unhappiness even when not being aggressive
; "AEGIS"       = fivefold increased defence against air attacks and missiles
; "Fighter"     = can attack air units (no other units can normally do this)
; "Marines"     = (land only) can attack from transports
; "Partial_Invis" = visible only to adjancent units; does not hide transported
;                 units other than missiles
; "Settlers"    = can irrigate and build roads
; "Diplomat"    = can do diplomat actions (see diplchance server option)
; "Spy"         = can do poison and sabotage, _must_ be "Diplomat" also
; "Trireme"     = (sea only) sinks on high seas, lots of special rules
; "Nuclear"     = nuke!
; "Transform"   = can transform terrain
; "Paratroopers"= (land only) can paradrop
; "Airbase"     = (land only) can produce airbases
; "Cities"      = can disband to produce a city
; "IgTired"     = ignore tired penalty when attacking
; "No_Land_Attack" = (sea only) cannot attack targets on land
; "AddToCity"   = can disband to add a single point of population to a city
;                 (see cities.ruleset for limitation of this ability)
; "Fanatic"     = can only be built by governments that allow them
;                 (see data/civ2/governments.ruleset, Fanaticism government)
;
; Following flag strings require extra fields:
;  "Paratroopers"
;   paratroopers_range = the maximal range the unit can be paradropped to
;   paratroopers_mr_req = the move rate which is required at least for
;                         paradropping
;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
;
; ** Roles **
;
; "FirstBuild"  = first to be built when city founded
; "Explorer"    = initial explorer unit (only one unit can have this flag)
; "Hut"         = can be found in a hut
; "HutTech"     = can be found in a hut, but its techs required
; "Partisan"    = can be created as a partisan (only one unit can have this 
;                 flag), see end of this file for its tech requirements option
; "DefendOk"    = AI hint: ok for defending with
; "DefendGood"  = AI hint: good for defending with
; "AttackFast"  = AI hint: quick attacking unit (unused)
; "AttackStrong"= AI hint: strong attacker (unused)
; "Ferryboat"   = AI hint: useful for ferrying
; "Barbarian"   = can be created as barbarian
; "BarbarianTech" = can be created as barbarian, if someone has
;                   researched its tech requirements
; "BarbarianBoat" = can be created as barbarian
; "BarbarianBuild" = can be built by barbarians
; "BarbarianBuildTech" = can be built by barbarians if someone has
;                        researched its tech requirements
; "BarbarianLeader" = this unit is the barbarian leader (only one)
; "BarbarianSea" = can be created as a sea barbarian
; "BarbarianSeaTech" = can be created as a sea barbarian if someone
;                      has researched its tech requirements

[unit_settlers]
name          = _("Settlers")
move_type     = "Land"
tech_req      = "None"
obsolete_by   = "None"
graphic       = "u.settlers"
graphic_alt   = "-"
sound_move    = "m_settlers"
sound_move_alt = "m_generic"
sound_fight   = "f_settlers"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 1
attack        = 0
defense       = 1
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 1
uk_food       = 1
uk_gold       = 0
flags         = "NonMil", "AddToCity", "Cities"
roles         = ""
helptext      = _("\
Settlers are one of the key units in the game, as they are used to\
 found new cities. Upkeep for Settlers is in food as well as\
 production, and a Settler can die if its supporting city\
 runs out of food.\
")

[unit_worker]
name          = _("Workers")
move_type     = "Land"
tech_req      = "Pottery"
obsolete_by   = "Engineers"
graphic       = "u.workers"
graphic_alt   = "u.engineers" ; compatibility
sound_move    = "m_workers"
sound_move_alt = "m_generic"
sound_fight   = "f_workers"
sound_fight_alt = "f_generic"
build_cost    = 30
pop_cost      = 0
attack        = 0
defense       = 1  
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Settlers", "NonMil", "Airbase"
roles         = ""
helptext      = _("\
Workers are one of the key units in the game.  They can be used to\
 irrigate land, build roads, railroads,\
 fortresses, airbases and mines, and clean up pollution and nuclear\
 fallout.\
\n\n\
Workers and Engineers may work together to decrease the amount of\
 time required for long projects.  If two or more Workers and/or\
 Engineers are both working on the same task in the same square,\
 their efforts will be added together each turn until the task is\
 finished.  Be careful not to dedicate too many workers to one task,\
 though; excess effort can be wasted, and a group of Workers and/or\
 Engineers is highly vulnerable to enemy attacks.\
")

[unit_engineers]
name          = _("Engineers")
move_type     = "Land"
tech_req      = "Explosives"
obsolete_by   = "None"
graphic       = "u.engineers"
graphic_alt   = "-"
sound_move    = "m_engineers"
sound_move_alt = "m_generic"
sound_fight   = "f_engineers"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 1
attack        = 0
defense       = 2
hitpoints     = 20
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 1
uk_food       = 1
uk_gold       = 0
flags         = "Settlers", "NonMil", "Transform", "Airbase"
roles         = ""
helptext      = _("\
Engineers are similar to Workers, but they work twice as fast and\
 move twice as fast.  Engineers may also perform major terrain\
 transformations (for example, converting Tundra into Desert) which\
 are beyond the capabilities of Workers.\
\n\n\
TIP 1:  Upgrade Workers to Engineers when possible, as Engineers\
 require the same resources as ordinary Workers.\
\n\n\
TIP 2:  If you manage to build Leonardo's Workshop, research\
 Explosives before the Workshop becomes obsolete.  This way,\
 your Worker units will be upgraded for free.\
")

[unit_warriors]
name          = _("Warriors")
move_type     = "Land"
tech_req      = "None"
obsolete_by   = "Pikemen"
graphic       = "u.warriors"
graphic_alt   = "-"
sound_move    = "m_warriors"
sound_move_alt = "m_generic"
sound_fight   = "f_warriors"
sound_fight_alt = "f_generic"
build_cost    = 10
pop_cost      = 0
attack        = 1
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendOk", "FirstBuild"
helptext      = _("\
This unit may be built from the start of the game.  It is the\
 weakest unit.\
")

[unit_phalanx]
name          = _("Phalanx")
move_type     = "Land"
tech_req      = "Bronze Working"
impr_req      = "Barracks"
obsolete_by   = "Pikemen"
graphic       = "u.phalanx"
graphic_alt   = "-"
sound_move    = "m_phalanx"
sound_move_alt = "m_generic"
sound_fight   = "f_phalanx"
sound_fight_alt = "f_generic"
build_cost    = 20
pop_cost      = 0
attack        = 1
defense       = 2
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendGood", "FirstBuild"

[unit_archers]
name          = _("Archers")
move_type     = "Land"
tech_req      = "Warrior Code"
impr_req      = "Barracks"
obsolete_by   = "Musketeers"
graphic       = "u.archers"
graphic_alt   = "-"
sound_move    = "m_archers"
sound_move_alt = "m_generic"
sound_fight   = "f_archers"
sound_fight_alt = "f_generic"
build_cost    = 30
pop_cost      = 0
attack        = 3
defense       = 2
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendOk"

[unit_legion]
name          = _("Legion")
move_type     = "Land"
tech_req      = "Iron Working"
impr_req      = "Barracks"
obsolete_by   = "Musketeers"
graphic       = "u.legion"
graphic_alt   = "-"
sound_move    = "m_legion"
sound_move_alt = "m_generic"
sound_fight   = "f_legion"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 4
defense       = 2
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendOk", "Hut", "BarbarianBuild", "BarbarianSea"

[unit_pikemen]
name          = _("Pikemen")
move_type     = "Land"
tech_req      = "Feudalism"
impr_req      = "Barracks"
obsolete_by   = "Musketeers"
graphic       = "u.pikemen"
graphic_alt   = "-"
sound_move    = "m_pikemen"
sound_move_alt = "m_generic"
sound_fight   = "f_pikemen"
sound_fight_alt = "f_generic"
build_cost    = 20
pop_cost      = 0
attack        = 1
defense       = 2
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Pikemen"
roles         = "DefendGood", "FirstBuild"

[unit_musketeers]
name          = _("Musketeers")
move_type     = "Land"
tech_req      = "Gunpowder"
impr_req      = "Barracks"
obsolete_by   = "Riflemen"
graphic       = "u.musketeers"
graphic_alt   = "-"
sound_move    = "m_musketeers"
sound_move_alt = "m_generic"
sound_fight   = "f_musketeers"
sound_fight_alt = "f_generic"
build_cost    = 30
pop_cost      = 0
attack        = 3
defense       = 3
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendGood", "FirstBuild", "HutTech",
                "BarbarianTech", "BarbarianBuildTech", "BarbarianSeaTech"

[unit_fanatics]
name          = _("Fanatics")
move_type     = "Land"
tech_req      = "Never"
impr_req      = "Temple"
obsolete_by   = "None"
graphic       = "u.fanatics"
graphic_alt   = "-"
sound_move    = "m_fanatics"
sound_move_alt = "m_generic"
sound_fight   = "f_fanatics"
sound_fight_alt = "f_generic"
build_cost    = 20
pop_cost      = 0
attack        = 4
defense       = 4
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendGood"

[unit_partisan]
name          = _("Partisan")
move_type     = "Land"
tech_req      = "Guerilla Warfare"
impr_req      = "Coinage"
obsolete_by   = "None"
graphic       = "u.partisan"
graphic_alt   = "-"
sound_move    = "m_partisan"
sound_move_alt = "m_generic"
sound_fight   = "f_partisan"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 4
defense       = 4
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "IgTer", "IgZOC"
roles         = "DefendGood", "Partisan", "BarbarianTech"
helptext      = _("\
A number of Partisans are granted free when an enemy conquers your\
 city, but only under these conditions:\
\n\n\
 - Guerilla Warfare must be known by at least 1 player.\
\n\n\
 - You must be the player who originally built the city.\
\n\n\
 - You must know about Communism and Gunpowder.\
\n\n\
 - You must run either a Democracy or a Communist government.\
")

[unit_alpine_troops]
name          = _("Alpine Troops")
move_type     = "Land"
tech_req      = "Tactics"
impr_req      = "Barracks"
obsolete_by   = "None"
graphic       = "u.alpine_troops"
graphic_alt   = "-"
sound_move    = "m_alpine_troops"
sound_move_alt = "m_generic"
sound_fight   = "f_alpine_troops"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 5
defense       = 5
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "IgTer"
roles         = "DefendGood"

[unit_riflemen]
name          = _("Riflemen")
move_type     = "Land"
tech_req      = "Conscription"
impr_req      = "Barracks"
obsolete_by   = "None"
graphic       = "u.riflemen"
graphic_alt   = "-"
sound_move    = "m_riflemen"
sound_move_alt = "m_generic"
sound_fight   = "f_riflemen"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 5
defense       = 4
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendGood", "FirstBuild"

[unit_marines]
name          = _("Marines")
move_type     = "Land"
tech_req      = "Amphibious Warfare"
impr_req      = "Port Facility"
obsolete_by   = "None"
graphic       = "u.marines"
graphic_alt   = "-"
sound_move    = "m_marines"
sound_move_alt = "m_generic"
sound_fight   = "f_marines"
sound_fight_alt = "f_generic"
build_cost    = 60
pop_cost      = 0
attack        = 8
defense       = 5
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Marines"
roles         = "DefendOk", "BarbarianSeaTech"

[unit_paratroopers]
name          = _("Paratroopers")
move_type     = "Land"
tech_req      = "Combined Arms"
impr_req      = "Airport"
obsolete_by   = "None"
graphic       = "u.paratroopers"
graphic_alt   = "-"
sound_move    = "m_paratroopers"
sound_move_alt = "m_generic"
sound_fight   = "f_paratroopers"
sound_fight_alt = "f_generic"
build_cost    = 60
pop_cost      = 0
attack        = 6
defense       = 4
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Paratroopers"
roles         = "DefendOk"

paratroopers_range = 10
paratroopers_mr_req = 1
paratroopers_mr_sub = 0

[unit_mech_inf]
name          = _("Mech. Inf.")
move_type     = "Land"
tech_req      = "Labor Union"
impr_req      = "Factory"
obsolete_by   = "None"
graphic       = "u.mech_inf"
graphic_alt   = "-"
sound_move    = "m_mech_inf"
sound_move_alt = "m_generic"
sound_fight   = "f_mech_inf"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 6
defense       = 6
hitpoints     = 30
firepower     = 1
move_rate     = 3
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendGood"
helptext      = _("\
Mechanized Infantry; this unit has the strongest defence strength\
 of any land unit, but is only available near the end of the\
 technology tree.\
")

[unit_horsemen]
name          = _("Horsemen")
move_type     = "Land"
tech_req      = "Horseback Riding"
impr_req      = "Barracks"
obsolete_by   = "Knights"
graphic       = "u.horsemen"
graphic_alt   = "-"
sound_move    = "m_horsemen"
sound_move_alt = "m_generic"
sound_fight   = "f_horsemen"
sound_fight_alt = "f_generic"
build_cost    = 20
pop_cost      = 0
attack        = 2
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Horse"
roles         = "AttackFast", "Hut", "Barbarian"

[unit_chariot]
name          = _("Chariot")
move_type     = "Land"
tech_req      = "The Wheel"
impr_req      = "Barracks"
obsolete_by   = "Knights"
graphic       = "u.chariot"
graphic_alt   = "-"
sound_move    = "m_chariot"
sound_move_alt = "m_generic"
sound_fight   = "f_chariot"
sound_fight_alt = "f_generic"
build_cost    = 30
pop_cost      = 0
attack        = 3
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Horse"
roles         = "AttackFast", "Hut"

[unit_elephants]
name          = _("Elephants")
move_type     = "Land"
tech_req      = "Never"
obsolete_by   = "Crusaders"
graphic       = "u.elephants"
graphic_alt   = "-"
sound_move    = "m_elephants"
sound_move_alt = "m_generic"
sound_fight   = "f_elephants"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 4
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "AttackFast"

[unit_crusaders]
name          = _("Crusaders")
move_type     = "Land"
tech_req      = "Polytheism"
impr_req      = "Temple"
obsolete_by   = "Dragoons"
graphic       = "u.crusaders"
graphic_alt   = "-"
sound_move    = "m_crusaders"
sound_move_alt = "m_generic"
sound_fight   = "f_crusaders"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 5
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Horse"
roles         = "AttackFast"

[unit_knights]
name          = _("Knights")
move_type     = "Land"
tech_req      = "Chivalry"
impr_req      = "Temple"
obsolete_by   = "Dragoons"
graphic       = "u.knights"
graphic_alt   = "-"
sound_move    = "m_knights"
sound_move_alt = "m_generic"
sound_fight   = "f_knights"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 4
defense       = 2
hitpoints     = 10
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Horse"
roles         = "AttackFast", "HutTech", "BarbarianTech",
                "BarbarianBuildTech", "BarbarianSeaTech"

[unit_dragoons]
name          = _("Dragoons")
move_type     = "Land"
tech_req      = "Leadership"
impr_req      = "Barracks"
obsolete_by   = "Cavalry"
graphic       = "u.dragoons"
graphic_alt   = "-"
sound_move    = "m_dragoons"
sound_move_alt = "m_generic"
sound_fight   = "f_dragoons"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 5
defense       = 2
hitpoints     = 20
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Horse"
roles         = "AttackFast", "BarbarianBuildTech", "BarbarianSeaTech"

[unit_cavalry]
name          = _("Cavalry")
move_type     = "Land"
tech_req      = "Tactics"
impr_req      = "Barracks"
obsolete_by   = "Armor"
graphic       = "u.cavalry"
graphic_alt   = "-"
sound_move    = "m_cavalry"
sound_move_alt = "m_generic"
sound_fight   = "f_cavalry"
sound_fight_alt = "f_generic"
build_cost    = 60
pop_cost      = 0
attack        = 8
defense       = 3
hitpoints     = 20
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "AttackFast"

[unit_armor]
name          = _("Armor")
move_type     = "Land"
tech_req      = "Mobile Warfare"
impr_req      = "Factory"
obsolete_by   = "None"
graphic       = "u.armor"
graphic_alt   = "-"
sound_move    = "m_armor"
sound_move_alt = "m_generic"
sound_fight   = "f_armor"
sound_fight_alt = "f_generic"
build_cost    = 80
pop_cost      = 0
attack        = 10
defense       = 5
hitpoints     = 30
firepower     = 1
move_rate     = 3
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "AttackFast"

[unit_catapult]
name          = _("Catapult")
move_type     = "Land"
tech_req      = "Mathematics"
impr_req      = "Barracks"
obsolete_by   = "Cannon"
graphic       = "u.catapult"
graphic_alt   = "-"
sound_move    = "m_catapult"
sound_move_alt = "m_generic"
sound_fight   = "f_catapult"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 6
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "AttackStrong"

[unit_cannon]
name          = _("Cannon")
move_type     = "Land"
tech_req      = "Metallurgy"
impr_req      = "Barracks"
obsolete_by   = "Artillery"
graphic       = "u.cannon"
graphic_alt   = "-"
sound_move    = "m_cannon"
sound_move_alt = "m_generic"
sound_fight   = "f_cannon"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 8
defense       = 1
hitpoints     = 20
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "AttackStrong", "BarbarianTech", "BarbarianBuildTech"

[unit_artillery]
name          = _("Artillery")
move_type     = "Land"
tech_req      = "Machine Tools"
impr_req      = "Barracks"
obsolete_by   = "Howitzer"
graphic       = "u.artillery"
graphic_alt   = "-"
sound_move    = "m_artillery"
sound_move_alt = "m_generic"
sound_fight   = "f_artillery"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 10
defense       = 1
hitpoints     = 20
firepower     = 2
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "AttackStrong"

[unit_howitzer]
name          = _("Howitzer")
move_type     = "Land"
tech_req      = "Robotics"
impr_req      = "Factory"
obsolete_by   = "None"
graphic       = "u.howitzer"
graphic_alt   = "-"
sound_move    = "m_howitzer"
sound_move_alt = "m_generic"
sound_fight   = "f_howitzer"
sound_fight_alt = "f_generic"
build_cost    = 70
pop_cost      = 0
attack        = 12
defense       = 2
hitpoints     = 30
firepower     = 2
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "IgWall"
roles         = "AttackStrong"

[unit_fighter]
name          = _("Fighter")
move_type     = "Air"
tech_req      = "Flight"
impr_req      = "Factory"
obsolete_by   = "Stealth Fighter"
graphic       = "u.fighter"
graphic_alt   = "-"
sound_move    = "m_fighter"
sound_move_alt = "m_generic"
sound_fight   = "f_fighter"
sound_fight_alt = "f_generic"
build_cost    = 60
pop_cost      = 0
attack        = 4
defense       = 3
hitpoints     = 20
firepower     = 2
move_rate     = 10
vision_range  = 2
transport_cap = 0
fuel          = 1
uk_happy      = 0
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Fighter"
roles         = ""

[unit_bomber]
name          = _("Bomber")
move_type     = "Air"
tech_req      = "Advanced Flight"
impr_req      = "Factory"
obsolete_by   = "Stealth Bomber"
graphic       = "u.bomber"
graphic_alt   = "-"
sound_move    = "m_bomber"
sound_move_alt = "m_generic"
sound_fight   = "f_bomber"
sound_fight_alt = "f_generic"
build_cost    = 120
pop_cost      = 0
attack        = 12
defense       = 1
hitpoints     = 20
firepower     = 2
move_rate     = 8
vision_range  = 2
transport_cap = 0
fuel          = 2
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "FieldUnit", "OneAttack"
roles         = ""

[unit_helicopter]
name          = _("Helicopter")
move_type     = "Heli"
tech_req      = "Combined Arms"
impr_req      = "Factory"
obsolete_by   = "None"
graphic       = "u.helicopter"
graphic_alt   = "-"
sound_move    = "m_helicopter"
sound_move_alt = "m_generic"
sound_fight   = "f_helicopter"
sound_fight_alt = "f_generic"
build_cost    = 100
pop_cost      = 0
attack        = 10
defense       = 3
hitpoints     = 20
firepower     = 2
move_rate     = 6
vision_range  = 2
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "FieldUnit", "OneAttack"
roles         = ""
helptext      = _("\
The Helicopter is a very powerful unit, as it can both fly and\
 conquer cities.  Care must be exercised, because Helicopters lose a\
 small amount of health for every turn not spent in a city, unless\
 you have the United Nations wonder.\
")

[unit_stealth_fighter]
name          = _("Stealth Fighter")
move_type     = "Air"
tech_req      = "Stealth"
impr_req      = "Airport"
obsolete_by   = "None"
graphic       = "u.stealth_fighter"
graphic_alt   = "-"
sound_move    = "m_stealth_fighter"
sound_move_alt = "m_generic"
sound_fight   = "f_stealth_fighter"
sound_fight_alt = "f_generic"
build_cost    = 80
pop_cost      = 0
attack        = 8
defense       = 4
hitpoints     = 20
firepower     = 2
move_rate     = 14
vision_range  = 2
transport_cap = 0
fuel          = 1
uk_happy      = 0
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Partial_Invis", "Fighter"
roles         = ""
helptext      = _("\
An improved Fighter, with improved attack and a higher movement\
 radius.\
")

[unit_stealth_bomber]
name          = _("Stealth Bomber")
move_type     = "Air"
tech_req      = "Stealth"
impr_req      = "Airport"
obsolete_by   = "None"
graphic       = "u.stealth_bomber"
graphic_alt   = "-"
sound_move    = "m_stealth_bomber"
sound_move_alt = "m_generic"
sound_fight   = "f_stealth_bomber"
sound_fight_alt = "f_generic"
build_cost    = 160
pop_cost      = 0
attack        = 18
defense       = 5
hitpoints     = 20
firepower     = 2
move_rate     = 12
vision_range  = 2
transport_cap = 0
fuel          = 2
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Partial_Invis", "FieldUnit", "OneAttack"
roles         = ""
helptext      = _("\
An improved Bomber, with improved attack and a higher movement\
 radius.\
")

[unit_awacs]
name          = _("AWACS")
move_type     = "Air"
tech_req      = "Advanced Flight"
impr_req      = "Airport"
obsolete_by   = "None"
graphic       = "u.awacs"
graphic_alt   = "u.bomber"  ; backwards compatibility
sound_move    = "m_awacs"
sound_move_alt = "m_generic"
sound_fight   = "f_awacs"
sound_fight_alt = "f_generic"
build_cost    = 140
pop_cost      = 0
attack        = 0
defense       = 1
hitpoints     = 20
firepower     = 1
move_rate     = 16
vision_range  = 5
transport_cap = 0
fuel          = 2
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = ""
helptext      = _("\
The AWACS (Airborne Warning and Control System) is an airplane with an \
advanced radar that can determine the location of enemy units over a \
wide area.\
")

[unit_trireme]
name          = _("Trireme")
move_type     = "Sea"
tech_req      = "Map Making"
obsolete_by   = "Caravel"
graphic       = "u.trireme"
graphic_alt   = "-"
sound_move    = "m_trireme"
sound_move_alt = "m_generic"
sound_fight   = "f_trireme"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 1
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 3
vision_range  = 1
transport_cap = 2
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Trireme"
roles         = "Ferryboat"

[unit_caravel]
name          = _("Caravel")
move_type     = "Sea"
tech_req      = "Navigation"
impr_req      = "Harbour"
obsolete_by   = "Galleon"
graphic       = "u.caravel"
graphic_alt   = "-"
sound_move    = "m_caravel"
sound_move_alt = "m_generic"
sound_fight   = "f_caravel"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 2
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 3
vision_range  = 1
transport_cap = 3
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "Ferryboat", "BarbarianBoat"

[unit_galleon]
name          = _("Galleon")
move_type     = "Sea"
tech_req      = "Magnetism"
impr_req      = "Harbour"
obsolete_by   = "Transport"
graphic       = "u.galleon"
graphic_alt   = "-"
sound_move    = "m_galleon"
sound_move_alt = "m_generic"
sound_fight   = "f_galleon"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 0
defense       = 2
hitpoints     = 20
firepower     = 1
move_rate     = 4
vision_range  = 1
transport_cap = 4
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "Ferryboat", "BarbarianBoat"

[unit_frigate]
name          = _("Frigate")
move_type     = "Sea"
tech_req      = "Magnetism"
impr_req      = "Harbour"
obsolete_by   = "Ironclad"
graphic       = "u.frigate"
graphic_alt   = "-"
sound_move    = "m_frigate"
sound_move_alt = "m_generic"
sound_fight   = "f_frigate"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 4
defense       = 2
hitpoints     = 20
firepower     = 1
move_rate     = 4
vision_range  = 1
transport_cap = 2
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = ""

[unit_ironclad]
name          = _("Ironclad")
move_type     = "Sea"
tech_req      = "Steam Engine"
impr_req      = "Harbour"
obsolete_by   = "Destroyer"
graphic       = "u.ironclad"
graphic_alt   = "-"
sound_move    = "m_ironclad"
sound_move_alt = "m_generic"
sound_fight   = "f_ironclad"
sound_fight_alt = "f_generic"
build_cost    = 60
pop_cost      = 0
attack        = 4
defense       = 4
hitpoints     = 30
firepower     = 1
move_rate     = 4
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = ""

[unit_destroyer]
name          = _("Destroyer")
move_type     = "Sea"
tech_req      = "Industrialization"
impr_req      = "Factory"
obsolete_by   = "None"
graphic       = "u.destroyer"
graphic_alt   = "-"
sound_move    = "m_destroyer"
sound_move_alt = "m_generic"
sound_fight   = "f_destroyer"
sound_fight_alt = "f_generic"
build_cost    = 60
pop_cost      = 0
attack        = 4
defense       = 4
hitpoints     = 30
firepower     = 1
move_rate     = 6
vision_range  = 2
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = ""
helptext      = _("\
TIP:  A very fast unit, which is very useful for hunting down enemy\
 Transports.\
")

[unit_cruiser]
name          = _("Cruiser")
move_type     = "Sea"
tech_req      = "Steel"
impr_req      = "Factory"
obsolete_by   = "AEGIS Cruiser"
graphic       = "u.cruiser"
graphic_alt   = "-"
sound_move    = "m_cruiser"
sound_move_alt = "m_generic"
sound_fight   = "f_cruiser"
sound_fight_alt = "f_generic"
build_cost    = 80
pop_cost      = 0
attack        = 6
defense       = 6
hitpoints     = 30
firepower     = 2
move_rate     = 5
vision_range  = 2
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "DefendGood"

[unit_aegis_cruiser]
name          = _("AEGIS Cruiser")
move_type     = "Sea"
tech_req      = "Rocketry"
impr_req      = "Mfg. Plant"
obsolete_by   = "None"
graphic       = "u.aegis_cruiser"
graphic_alt   = "-"
sound_move    = "m_aegis_cruiser"
sound_move_alt = "m_generic"
sound_fight   = "f_aegis_cruiser"
sound_fight_alt = "f_generic"
build_cost    = 100
pop_cost      = 0
attack        = 8
defense       = 8
hitpoints     = 30
firepower     = 2
move_rate     = 5
vision_range  = 2
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "AEGIS"
roles         = "DefendGood"

[unit_battleship]
name          = _("Battleship")
move_type     = "Sea"
tech_req      = "Automobile"
impr_req      = "Mfg. Plant"
obsolete_by   = "None"
graphic       = "u.battleship"
graphic_alt   = "-"
sound_move    = "m_battleship"
sound_move_alt = "m_generic"
sound_fight   = "f_battleship"
sound_fight_alt = "f_generic"
build_cost    = 160
pop_cost      = 0
attack        = 12
defense       = 12
hitpoints     = 40
firepower     = 2
move_rate     = 4
vision_range  = 2
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = ""

[unit_submarine]
name          = _("Submarine")
move_type     = "Sea"
tech_req      = "Combustion"
impr_req      = "Factory"
obsolete_by   = "None"
graphic       = "u.submarine"
graphic_alt   = "-"
sound_move    = "m_submarine"
sound_move_alt = "m_generic"
sound_fight   = "f_submarine"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 15
defense       = 2
hitpoints     = 30
firepower     = 2
move_rate     = 5
vision_range  = 2
transport_cap = 8
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Partial_Invis", 
                "Missile_Carrier", "No_Land_Attack"
roles         = ""
helptext      = _("\
Submarines have a very high strategic value, but have a weak\
 defence.\
")

[unit_carrier]
name          = _("Carrier")
move_type     = "Sea"
tech_req      = "Advanced Flight"
impr_req      = "Mfg. Plant"
obsolete_by   = "None"
graphic       = "u.carrier"
graphic_alt   = "-"
sound_move    = "m_carrier"
sound_move_alt = "m_generic"
sound_fight   = "f_carrier"
sound_fight_alt = "f_generic"
build_cost    = 160
pop_cost      = 0
attack        = 1
defense       = 9
hitpoints     = 40
firepower     = 2
move_rate     = 5
vision_range  = 2
transport_cap = 8
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "Carrier"
roles         = ""
helptext      = _("\
TIP:  Guard Carriers with a handful of fast-moving ships and a\
 battleship, as losing a fully-equipped Carrier is VERY\
 painful and expensive.\
")

[unit_transport]
name          = _("Transport")
move_type     = "Sea"
tech_req      = "Industrialization"
impr_req      = "Harbour"
obsolete_by   = "None"
graphic       = "u.transport"
graphic_alt   = "-"
sound_move    = "m_transport"
sound_move_alt = "m_generic"
sound_fight   = "f_transport"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 0
defense       = 3
hitpoints     = 30
firepower     = 1
move_rate     = 5
vision_range  = 2
transport_cap = 8
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = ""
roles         = "Ferryboat"

[unit_cruise_missile]
name          = _("Cruise Missile")
move_type     = "Air"
tech_req      = "Rocketry"
impr_req      = "Factory"
obsolete_by   = "None"
graphic       = "u.cruise_missile"
graphic_alt   = "-"
sound_move    = "m_cruise_missile"
sound_move_alt = "m_generic"
sound_fight   = "f_cruise_missile"
sound_fight_alt = "f_generic"
build_cost    = 60
pop_cost      = 0
attack        = 18
defense       = 0
hitpoints     = 10
firepower     = 3
move_rate     = 12
vision_range  = 1
transport_cap = 0
fuel          = 1
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "FieldUnit", "OneAttack", "Missile"
roles         = ""
helptext      = _("\
TIP:  A handful of these can successfully keep the waters around\
 your treasured homeland free of enemy ships.\
")

[unit_nuclear]
name          = _("Nuclear")
move_type     = "Air"
tech_req      = "Rocketry"
impr_req      = "Nuclear Plant"
obsolete_by   = "None"
graphic       = "u.nuclear"
graphic_alt   = "-"
sound_move    = "m_nuclear"
sound_move_alt = "m_generic"
sound_fight   = "f_nuclear"
sound_fight_alt = "f_generic"
build_cost    = 160
pop_cost      = 0
attack        = 99
defense       = 0
hitpoints     = 10
firepower     = 1
move_rate     = 16
vision_range  = 1
transport_cap = 0
fuel          = 1
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
flags         = "FieldUnit", "OneAttack", "Missile", "Nuclear"
roles         = ""
helptext      = _("\
You can build Nuclear units when you have the required advance, and\
 the Manhattan Project wonder has been built by any player.\
\n\n\
On impact, the blast will destroy any unit in a 3x3-square area,\
 including friendly units.  When striking a city, the city size is\
 halved, and the surrounding squares are subject to nuclear fallout.\
\n\n\
TIP 1:  Nuking the ocean will not generate fallout, and is a most\
 effective (but expensive!!) way of getting rid of enemy\
 ships.\
\n\n\
TIP 2:  You may be involved in a situation where you've invaded an\
 enemy country en masse, but the enemy cities are too strong.\
 Before using a Nuclear unit, assemble a gang of Settlers\
 and/or Engineers next to the city and have them ready to fix\
 the fallout on the same turn it occurs!  This minimizes the\
 chance of nuclear winter.  Eco-friendly nukes!\
")

[unit_diplomat]
name          = _("Diplomat")
move_type     = "Land"
tech_req      = "Writing"
impr_req      = "Courthouse"
obsolete_by   = "Spy"
graphic       = "u.diplomat"
graphic_alt   = "-"
sound_move    = "m_diplomat"
sound_move_alt = "m_generic"
sound_fight   = "f_diplomat"
sound_fight_alt = "f_generic"
build_cost    = 30
pop_cost      = 0
attack        = 0
defense       = 0
hitpoints     = 10
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 0
uk_food       = 0
uk_gold       = 0
flags         = "Diplomat", "IgZOC", "NonMil"
roles         = ""
helptext      = _("\
- A Diplomat can establish embassies with other civilizations\
 by moving into another player's city.\
\n\n\
- Diplomats can also try to sabotage enemy production, or steal\
 an advance from an enemy city.  (An advance can only be stolen\
 once per city).\
\n\n\
- A Diplomat can also bribe an enemy unit, if that unit is the only\
 unit on its square.\
\n\n\
- Diplomats can even start a revolution in an enemy city and turn\
 it into your own, if you have the money!\
\n\n\
- In some game strategies, hordes of Diplomats can be used to wreak\
 havoc on the enemy.  Little wonder that Diplomats are often\
 viewed with suspicion and fear!\
")

[unit_spy]
name          = _("Spy")
move_type     = "Land"
tech_req      = "Espionage"
impr_req      = "Courthouse"
obsolete_by   = "None"
graphic       = "u.spy"
graphic_alt   = "-"
sound_move    = "m_spy"
sound_move_alt = "m_generic"
sound_fight   = "f_spy"
sound_fight_alt = "f_generic"
build_cost    = 30
pop_cost      = 0
attack        = 0
defense       = 0
hitpoints     = 10
firepower     = 1
move_rate     = 3
vision_range  = 2
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 0
uk_food       = 0
uk_gold       = 0
flags         = "Diplomat", "IgZOC", "NonMil", "Spy"
roles         = ""
helptext      = _("\
A Spy is a full time professional and as such is much more\
 skilled in the arts of espionage than her Diplomat predecessor.\
\n\n\
The most inoffensive skills in a Spy's repertoire are her ability\
 to investigate cities - revealing detailed information, and\
 the establishment of embassies.  However, if your Spy has gained\
 herself a reputation for clandestine behaviour she will be\
 executed if she tries to establish an embassy.\
\n\n\
She can also be used to: poison the water supply of an enemy city\
 (reducing the population); steal specific technology; and sabotage\
 predetermined city targets (note: sabotaging improvements in a\
 capital or sabotaging City Walls increases the risks of capture).\
 A Spy can also infiltrate a city and ferment a revolt.\
\n\n\
A Spy can also be of aid on the battlefield - sabotaging enemy units\
 as well as bribing them to change allegiance.\
")

[unit_caravan]
name          = _("Caravan")
move_type     = "Land"
tech_req      = "Trade"
impr_req      = "Marketplace"
obsolete_by   = "Freight"
graphic       = "u.caravan"
graphic_alt   = "-"
sound_move    = "m_caravan"
sound_move_alt = "m_generic"
sound_fight   = "f_caravan"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 0
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 0
uk_food       = 0
uk_gold       = 0
flags         = "TradeRoute", "HelpWonder", "IgZOC", "NonMil"
roles         = ""
helptext      = _("\
Every Caravan that is used to build a wonder will add 50 shields\
 towards the production of the wonder.\
\n\n\
TIP:  You can stockpile a stack of Caravans in advance and bring\
 them all into a city where you have started to build a wonder,\
 and finish it in only one turn!\
")

[unit_freight]
name          = _("Freight")
move_type     = "Land"
tech_req      = "The Corporation"
impr_req      = "Marketplace"
obsolete_by   = "None"
graphic       = "u.freight"
graphic_alt   = "-"
sound_move    = "m_freight"
sound_move_alt = "m_generic"
sound_fight   = "f_freight"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 0
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 0
uk_food       = 0
uk_gold       = 0
flags         = "TradeRoute", "HelpWonder", "IgZOC", "NonMil"
roles         = ""
helptext      = _("\
The Freight unit replaces the Caravan, and moves at twice the speed.\
")

[unit_explorer]
name          = _("Explorer")
move_type     = "Land"
tech_req      = "Seafaring"
obsolete_by   = "Partisan"
graphic       = "u.explorer"
graphic_alt   = "-"
sound_move    = "m_explorer"
sound_move_alt = "m_generic"
sound_fight   = "f_explorer"
sound_fight_alt = "f_generic"
build_cost    = 30
pop_cost      = 0
attack        = 0
defense       = 1
hitpoints     = 10
firepower     = 1
move_rate     = 1
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 0
uk_food       = 0
uk_gold       = 0
flags         = "IgTer", "IgZOC", "NonMil"
roles         = "Explorer"
helptext      = _("\
Explorers are very useful for mapping unknown territory.\
")

[unit_barbarian_leader]
name          = _("Barbarian Leader")
move_type     = "Land"
tech_req      = "None"
obsolete_by   = "Settlers"    ; Ugly hack, to prevent anyone from building it
graphic       = "u.barbarian_leader"
graphic_alt   = "u.diplomat"
sound_move    = "m_barbarian_leader"
sound_move_alt = "m_generic"
sound_fight   = "f_barbarian_leader"
sound_fight_alt = "f_generic"
build_cost    = 40
pop_cost      = 0
attack        = 0
defense       = 0
hitpoints     = 10
firepower     = 1
move_rate     = 2
vision_range  = 1
transport_cap = 0
fuel          = 0
uk_happy      = 0
uk_shield     = 0
uk_food       = 0
uk_gold       = 0
flags         = "IgZOC", "NonMil"
roles         = "BarbarianLeader"
helptext      = _("\
When barbarian leader is killed on a tile without any defending units, \
the 100 gold ransom is paid, but only to land units and helicopters.\
")

[u_specials]
partisan_req = "Gunpowder","Communism"
; Modifying this file:
; You should not modify this file except to make bugfixes or
; for other "maintenance".  If you want to make custom changes,
; you should create a new datadir subdirectory and copy this file
; into that directory, and then modify that copy.  Then use the
; command "rulesetdir <mysubdir>" in the server to have freeciv
; use your new customized file.

; Note that the freeciv AI may not cope well with anything more
; than minor changes.

[datafile]
description="Default buildings data for Freeciv"
options="1.10.1"

; /* <-- avoid gettext warnings
;
; Below: The individual buildings, one per section.
; (Buildings = City Improvements and Wonders)
;
; The actual tag used (the * in [building_*]) does not matter, except 
; it must be unique within this file, and it may be used in debug 
; output when reading this file.
;
; Notes:
;
; name          = name as seen by user 
; tech_req      = advance required to build; special value "None"
;                 means no requirement, special value "Never"
;                 means building is never available
; bldg_req      = another building in same city required to build;
;                 special value "None" means no requirement
; graphic       = icon of improvement (used in city dialog)
; graphic_alt   = alternate icon of improvement
; terr_gate     = list of terrain types, one of which on or adjacent
;                 to city allows city to build improvement; empty
;                 list means always allowed to build if nothing in spec_gate
;                 is given (that means only if both terr_gate and spec_gate
;                 are empty the building can be bulit everywhere)
; spec_gate     = list of special types, one of which on or adjacent
;                 to city allows city to build improvement; empty
;                 list means always allowed to build if nothing in terr_gate
;                 is given (that means only if both terr_gate and spec_gate
;                 are empty the building can be built everywhere)
; equiv_range   = range for which this may be equivalent to another
;                 building; one of:
;                   "None", "Local", "City", "Island", "Player", "World"
; equiv_dupl    = list of buildings that duplicate this building if
;                 this city is within that building's range (may
;                 still build this, but will have no effect)
; equiv_repl    = list of buildings that replace this building if
;                 this city is within that building's range (not
;                 allowed to build this)
; obsolete_by   = advance which makes building obsolete; special
;                 value "None" means does not become obsolete
; is_wonder     = 1 for wonders (only one instance can ever be built)
; build_cost    = production shields required to build
; upkeep        = monetary upkeep value
; sabotage      = percent chance of diplomat sabotage being successful
; effect {      = list of named effects (and parameters thereto):
;
;   ( See doc/README.effects for information and a listing of effects. )
;
; }               (All effects in list(s) are cumulative.)
; sound         = optional sound effect associated
; sound_alt     = optional alternative sound effect if above not
;                 supported in client
; helptext      = optional help text string; should escape all raw
;                 newlines so that xgettext parsing works
;
; */ <-- avoid gettext warnings

[building_airport]
name            = _("Airport")
tech_req        = "Radio"
bldg_req        = "None"
graphic         = "b.airport"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "aff_unit"
        "Unit_Veteran", "City", "Air"
        "Unit_Repair", "City", "Air"
        "Airlift", "City"
    }
sound           = "b_airport"
sound_alt       = "b_generic"
helptext        = _("\
Allows a city to produce veteran air units.  Also, damaged air units\
 which stay in town for one full turn without moving are completely\
 restored.\
\n\n\
Two cities with Airports can airlift one unit per turn. \
 Airlifting instantly transports the unit from one city to another\
 and will use all of the unit's movement points.  A unit must have\
 some movement points left to be airlifted.\
")

[building_aqueduct]
name            = _("Aqueduct")
tech_req        = "Construction"
bldg_req        = "None"
graphic         = "b.aqueduct"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 60
upkeep          = 2
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Size_Unlimit", "City", 8
    }
sound           = "b_aqueduct"
sound_alt       = "b_generic"
; FIXME: use this help text when gen-impr implemented...
; /* (ignore for gettext until fixed)
; helptext      = _("\
; Allows a city to grow larger than size 8.  A Sewer System is also\
;  required for a city to grow larger than size 12.\
; ")
; */

[building_bank]
name            = _("Bank")
tech_req        = "Banking"
bldg_req        = "Marketplace"
graphic         = "b.bank"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 120
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Tax_Bonus", "City", 50, "Marketplace"
        "Luxury_Bonus", "City", 50, "Marketplace"
    }
sound           = "b_bank"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Together with the Marketplace improvement, a Bank increases the\
 luxury and tax production within a city by 100%.\
")

[building_barracks]
name            = _("Barracks")
tech_req        = "None"
bldg_req        = "None"
graphic         = "b.barracks"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     = 
equiv_repl      = "Sun Tzu's War Academy"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 40
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "aff_unit"
        "Unit_Veteran", "City", "Land"
        "Unit_Repair", "City", "Land"
    }
sound           = "b_barracks_i"
sound_alt       = "b_generic"
helptext        = _("\
With a Barracks, each new land unit built in a city will\
 automatically have Veteran status, which means that its attack and\
 defence strengths are increased by 50%.  Also, damaged land units\
 which stay in town for one full turn without moving are completely\
 restored.\
")

[building_barracks_ii]
name            = _("Barracks II")
tech_req        = "Never"
bldg_req        = "None"
graphic         = "b.barracks"
graphic_alt     = "-"
equiv_range     = "City"
equiv_repl      = "Sun Tzu's War Academy"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 40
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "aff_unit"
        "Unit_Veteran", "City", "Land"
        "Unit_Repair", "City", "Land"
    }
helptext        = _("\
")

[building_barracks_iii]
name            = _("Barracks III")
tech_req        = "Never"
bldg_req        = "None"
graphic         = "b.barracks"
graphic_alt     = "-"
equiv_range     = "City"
equiv_repl      = "Sun Tzu's War Academy"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 40
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "aff_unit"
        "Unit_Veteran", "City", "Land"
        "Unit_Repair", "City", "Land"
    }
helptext        = _("\
")

[building_cathedral]
name            = _("Cathedral")
tech_req        = "Monotheism"
bldg_req        = "None"
graphic         = "b.cathedral"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
equiv_repl      = "Michelangelo's Chapel"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 120
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_adv"
        "Make_Content", "City", 3
        "Make_Content", "City", 1, "Theology"
        "Make_Content", "City", -1, "Communism"
    }
sound           = "b_cathedral"
sound_alt       = "b_generic"
helptext        = _("\
A Cathedral makes 3 unhappy citizens content in a city, making it\
 easier to maintain order in that city.  The discovery of Theology\
 increases the effect of a Cathedral, making an additional unhappy\
 citizen content.  The discovery of Communism lessens the effect of\
 a Cathedral, reducing by one the number of unhappy citizens made\
 content.\
")

[building_city_walls]
name            = _("City Walls")
tech_req        = "Masonry"
bldg_req        = "None"
graphic         = "b.city_walls"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
equiv_dupl      = "Great Wall"
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 80
upkeep          = 0
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg", "aff_unit"
        "Unit_Defend", "City", 300, "", "Land"
        "Unit_No_Lose_Pop", "City", 0, "", "Land"
        "Spy_Resistant", "Local", 50
        "Spy_Resistant", "Local", -50, "Palace"
    }
sound           = "b_city_walls"
sound_alt       = "b_generic"
helptext        = _("\
City Walls make it easier to defend a city.  They triple the defence\
 strength of units within the city against ground and helicopter\
 units.  They are ineffective against airborne and sea units as well\
 as Howitzers.  City Walls also prevent the loss of population which\
 occurs when a defending unit is destroyed by a land unit.\
")

[building_coastal_defense]
name            = _("Coastal Defense")
tech_req        = "Metallurgy"
bldg_req        = "None"
graphic = "b.coastal_defense"
graphic_alt     = "-"
terr_gate       = "Ocean"
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 80
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "amount", "aff_unit"
        "Unit_Defend", "City", 200, "Sea"
    }
sound           = "b_coastal_defense"
sound_alt       = "b_generic"
helptext        = _("\
Increases the defence strength of units within a city by a factor\
 of 2 when defending against bombardments from enemy ships.\
")

[building_colosseum]
name            = _("Colosseum")
tech_req        = "Construction"
bldg_req        = "None"
graphic = "b.colosseum"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 100
upkeep          = 4
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_adv"
        "Make_Content", "City", 3
        "Make_Content", "City", 1, "Electricity"
    }
sound           = "b_colosseum"
sound_alt       = "b_generic"
helptext        = _("\
Entertains the citizens of a city, making 3 unhappy citizens content. \
 (Four after the discovery of Electricity.)\
")
; NOTE:
; For Civ2 the "Electricity" condition should be "Electronics"

[building_courthouse]
name            = _("Courthouse")
tech_req        = "Code of Laws"
bldg_req        = "None"
graphic = "b.courthouse"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 80
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_gov"
        "Reduce_Corrupt", "City", 50
        "Make_Content", "City", 1, "Democracy"
        "Revolt_Dist", "City", 50
    }
sound           = "b_courthouse"
sound_alt       = "b_generic"
helptext        = _("\
Reduces the corruption in a city by 50%.  Under a Democracy, a\
 Courthouse makes 1 unhappy citizen content. \
 Also halves the effective distance to the capital, for the purpose\
 of calculating revolt cost.\
")

[building_factory]
name            = _("Factory")
tech_req        = "Industrialization"
bldg_req        = "None"
graphic = "b.factory"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 200
upkeep          = 4
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Prod_Bonus", "City", 50
    }
sound           = "b_factory"
sound_alt       = "b_generic"
helptext        = _("\
Increases the shield production in a city by 50%.  This increase may\
 also contribute significantly to pollution.\
")

[building_granary]
name            = _("Granary")
tech_req        = "Pottery"
bldg_req        = "None"
graphic = "b.granary"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
equiv_repl      = "Pyramids"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 60
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Growth_Food", "City", 50
    }
sound           = "b_granary"
sound_alt       = "b_generic"
helptext        = _("\
The amount of stored food will be set to half full whenever a city\
 with a Granary shrinks or grows. This helps a city to grow faster\
 and more easily withstand famine.\
")
; NOTE:
; In Civ2, city size reduction does not generate food like this.
; Dare I ask where this food comes from?? :-)

[building_harbour]
name            = _("Harbour")
tech_req        = "Seafaring"
bldg_req        = "None"
graphic = "b.harbour"
graphic_alt     = "-"
terr_gate       = "Ocean"
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 60
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "amount", "aff_terr", "aff_spec"
        "Food_Add_Tile", "City", 1, "Ocean", "None"
    }
sound           = "b_harbour"
sound_alt       = "b_generic"
helptext        = _("\
Gives one extra food resource on all Ocean squares.  The city needs\
 to be coastal to build this improvement.\
")

[building_hydro_plant]
name            = _("Hydro Plant")
tech_req        = "Electronics"
bldg_req        = "None"
graphic = "b.hydro_plant"
graphic_alt     = "-"
terr_gate       = "Mountains"
spec_gate       = "River"
equiv_range     = "City"
;equiv_dupl     =
equiv_repl      = "Hoover Dam", "Power Plant", "Nuclear Plant", "Solar Plant"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 240
upkeep          = 4
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Prod_Bonus", "City", 25, "Factory"
        "Prod_Bonus", "City", 25, "Mfg. Plant"
        "Pollu_Adj_Prod", "City", 50
        "Pollu_Adj_Prod", "City", -50, "Recycling Center"
    }
sound           = "b_hydro_plant"
sound_alt       = "b_generic"
helptext        = _("\
Reduces the amount of pollution generated by production in a city\
 by 50%.  It also\
 increases the shield production of a Factory or Mfg. Plant in the\
 city: a Factory and a Hydro Plant together give a 75% production\
 bonus, and a Factory, Mfg. Plant and Hydro Plant together give\
 a 150% production bonus.\
\n\n\
A city can only have one Hydro Plant, Power Plant, or\
 Nuclear Plant.  A city can only build a Hydro Plant if it is next\
 to (or on) a Mountain or River tile.\
")
; FIXME: add Solar Plant to "can have only one" helptext when Solar
; Plant added.
; NOTE:
; For Civ1/2 the first shield production number above should be 100%,
; but the above describes current freeciv rules.

[building_library]
name            = _("Library")
tech_req        = "Writing"
bldg_req        = "None"
graphic = "b.library"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 80
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Science_Bonus", "City", 50
    }
sound           = "b_library"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Increases the science output in a city by 50%.\
")

[building_marketplace]
name            = _("Marketplace")
tech_req        = "Currency"
bldg_req        = "None"
graphic = "b.marketplace"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 80
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Tax_Bonus", "City", 50
        "Luxury_Bonus", "City", 50
    }
sound           = "b_marketplace"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Increases the luxury and tax output in a city by 50%.\
")

[building_mass_transit]
name            = _("Mass Transit")
tech_req        = "Mass Production"
bldg_req        = "None"
graphic = "b.mass_transit"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 4
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Pollu_Set_Pop", "City", 0
    }
sound           = "b_mass_transit"
sound_alt       = "b_generic"
helptext        = _("\
Neutralizes the pollution generated by the population. \
 The population simply has no effect on the pollution generated in\
 the city.\
")

[building_mfg_plant]
name            = _("Mfg. Plant")
tech_req        = "Robotics"
bldg_req        = "Factory"
graphic = "b.mfg_plant"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 320
upkeep          = 6
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Prod_Bonus", "City", 50, "Factory"
    }
sound           = "b_mfg_plant"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Together with a Factory, a Manufacturing Plant increases the shield\
 production in a city by 100%.\
")

[building_nuclear_plant]
name            = _("Nuclear Plant")
tech_req        = "Nuclear Power"
bldg_req        = "None"
graphic = "b.nuclear_plant"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
equiv_repl      = "Hoover Dam", "Power Plant", "Hydro Plant", "Solar Plant"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 2
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Prod_Bonus", "City", 25, "Factory"
        "Prod_Bonus", "City", 25, "Mfg. Plant"
        "Pollu_Adj_Prod", "City", 50
        "Pollu_Adj_Prod", "City", -50, "Recycling Center"
    }
sound           = "b_nuclear_plant"
sound_alt       = "b_generic"
helptext        = _("\
Reduces the amount of pollution generated by production in a city\
 by 50%.  It also\
 increases the shield production of a Factory or Mfg. Plant in\
 the city: a Factory and a Nuclear Plant together give a 75%\
 production bonus, and a Factory, Mfg. Plant and Nuclear Plant\
 together give a 150% production bonus.\
\n\n\
A city can only have one Hydro Plant, Power Plant, or\
 Nuclear Plant.\
")
; FIXME: add Solar Plant to "can have only one" helptext when Solar
; Plant added.
; NOTE:
; For Civ1/2 the first number above should be 100%, but the above
; describes current freeciv rules.
; There would also be a change of meltdown during civil disorder,
; but that has not been implemented yet.

[building_offshore_platform]
name            = _("Offshore Platform")
tech_req        = "Miniaturization"
bldg_req        = "None"
graphic = "b.offshore_platform"
graphic_alt     = "-"
terr_gate       = "Ocean"
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "amount", "aff_terr", "aff_spec"
        "Prod_Add_Tile", "City", 1, "Ocean", "None"
    }
sound           = "b_offshore_platform"
sound_alt       = "b_generic"
helptext        = _("\
Adds 1 extra shield resource on all Ocean squares in a city.  The\
 city needs to be coastal to build this improvement.\
")

[building_palace]
name            = _("Palace")
tech_req        = "Masonry"
bldg_req        = "None"
graphic = "b.palace"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 100
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Capital_City", "City"
        "Capital_Exists", "Player"
        "Spy_Resistant", "City", 50
    }
sound           = "b_palace"
sound_alt       = "b_generic"
helptext        = _("\
Makes a city the capital and the center of your government. \
 Corruption in other cities is related to how far away from the\
 capital they are, except when the government is Democracy or\
 Communism.  The cost of inciting a revolt in a city also depends\
 upon the city's distance from the capital (under all forms of\
 government).\
\n\n\
Take good care of your capital, as its loss may result in your\
 empire plunging into civil war. Losing your current palace also\
 results in losing whatever spaceship you might have.\
")

[building_police_station]
name            = _("Police Station")
tech_req        = "Communism"
bldg_req        = "None"
graphic = "b.police_station"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 60
upkeep          = 2
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_gov"
        "Make_Content_Mil", "City", 1, "Republic"
        "Make_Content_Mil", "City", 2, "Democracy"
    }
sound           = "b_police_station"
sound_alt       = "b_generic"
helptext        = _("\
Reduces the unhappiness caused by military units outside the city\
 by 2 under Democracy and 1 under Republic.  This improvement has no\
 effect under other governments.\
")
; NOTE:
; For Civ2 this should reduce unhappiness by one for *each* unit
; outside a city that is causing at least one unhappiness.

[building_port_facility]
name            = _("Port Facility")
tech_req        = "Amphibious Warfare"
bldg_req        = "Harbour"
graphic         = "b.port_facility"
graphic_alt     = "-"
terr_gate       = "Ocean"
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 80
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "aff_unit"
        "Unit_Veteran", "City", "Sea"
        "Unit_Repair", "City", "Sea"
    }
sound           = "b_port_facility"
sound_alt       = "b_generic"
helptext        = _("\
Allows a city to build veteran sea units.  Also, damaged sea units\
 which stay in town for one full turn without moving are completely\
 restored.\
")

[building_power_plant]
name            = _("Power Plant")
tech_req        = "Refining"
bldg_req        = "None"
graphic = "b.power_plant"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     = 
equiv_repl      = "Hoover Dam", "Nuclear Plant", "Hydro Plant", "Solar Plant"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 4
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Prod_Bonus", "City", 25, "Factory"
        "Prod_Bonus", "City", 25, "Mfg. Plant"
    }
sound           = "b_power_plant"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Increases the shield production of a Factory or Mfg. Plant in a\
 city: a Factory and a Power Plant together give a 75% production\
 bonus, and a Factory, Mfg. Plant and Power Plant together give\
 a 150% production bonus.  The extra production may lead to the city\
 generating more pollution.\
\n\n\
A city can only have one Hydro Plant, Power Plant, or\
 Nuclear Plant.\
")
; NOTE:
; For Civ1/2 the first number above should be 100%, but the above
; describes current freeciv rules.

[building_recycling_center]
name            = _("Recycling Center")
tech_req        = "Recycling"
bldg_req        = "None"
graphic = "b.recycling_center"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 200
upkeep          = 2
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Pollu_Adj_Prod", "City", 34
    }
sound           = "b_recycling_center"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Building a recycling center reduces the amount of pollution\
 generated by production in a city by 66%.\
")

[building_research_lab]
name            = _("Research Lab")
tech_req        = "Computers"
bldg_req        = "Library"
graphic = "b.research_lab"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
equiv_repl      = "SETI Program"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Science_Bonus", "City", 50, "Library"
    }
sound           = "b_research_lab"
sound_alt       = "b_generic"
helptext        = _("\
Together with a Library , a Research Lab increases the science\
 production of a city by 100%. \
Together with a Library and a University, a Research Lab increases\
 the science production of a city by 150%.\
")

[building_sam_battery]
name            = _("SAM Battery")
tech_req        = "Rocketry"
bldg_req        = "None"
graphic = "b.sam_battery"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 100
upkeep          = 2
sabotage        = 100
effect          =
    { "type", "range", "amount", "aff_unit"
        "Unit_Defend", "City", 200, "Air"
        "Unit_Defend", "City", 200, "Missile"
    }
sound           = "b_sam_battery"
sound_alt       = "b_generic"
helptext        = _("\
Doubles the defense of all units inside the city when attacked by\
 non-nuclear air units.\
")

[building_sdi_defense]
name            = _("SDI Defense")
tech_req        = "Laser"
bldg_req        = "None"
graphic = "b.sdi_defense"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 200
upkeep          = 4
sabotage        = 100
effect          =
    { "type", "range", "amount", "aff_unit"
        "Nuke_Proof", "City", 3
        "Unit_Defend", "City", 200, "Missile"
    }
sound           = "b_sdi_defense"
sound_alt       = "b_generic"
helptext        = _("\
Protects a city from attacks from Nuclear units.  Nuclear attacks\
 simply have no effect on the city.  Also, doubles defence against\
 non-nuclear missiles.\
")
; NOTE:
; Civ2 does not document the "Unit_Defend"/"Missile" aspect; does it apply or 
not?

[building_sewer_system]
name            = _("Sewer System")
tech_req        = "Sanitation"
bldg_req        = "Aqueduct"
graphic = "b.sewer_system"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 120
upkeep          = 2
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Size_Unlimit", "City", 12, "Aqueduct"
    }
sound           = "b_sewer_system"
sound_alt       = "b_generic"
; FIXME: use this help text when gen-impr implemented...
; /* (ignore for gettext until fixed)
; helptext      = _("\
; Allows a city to grow larger than size 12.  An Aqueduct is first\
;  required for a city to grow larger than size 8.\
; ")
; */

[building_solar_plant]
name            = _("Solar Plant")
tech_req        = "Never"               ; "Environmentalism"
bldg_req        = "None"
graphic = "b.solar_plant"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
equiv_repl      = "Hoover Dam", "Power Plant", "Hydro Plant", "Nuclear Plant"
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 320
upkeep          = 4
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Prod_Bonus", "City", 25, "Factory"
        "Prod_Bonus", "City", 25, "Mfg. Plant"
        "Pollu_Set_Prod", "City", 0
        "Slow_Global_Warm", "World", 10
    }
sound           = "b_solar_plant"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Eliminates all pollution generated by production in a city. \
 It also\
 increases the shield production of a Factory or Mfg. Plant in the\
 city: a Factory and a Solar Plant together give a 75% production\
 bonus, and a Factory, Mfg. Plant and Solar Plant together give\
 a 150% production bonus.\
\n\n\
A city can only have one Solar Plant, Hydro Plant, Power Plant, or\
 Nuclear Plant.\
")
; NOTE:
; For Civ1/2 the first shield production number above should be 100%,
; but the above describes current freeciv rules.
; NOTE:
; Not implemented.

[building_space_component]
name            = _("Space Component")
tech_req        = "Plastics"
bldg_req        = "None"
graphic = "b.space_component"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 0
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Space_Part", "Local", 2
    }
sound           = "b_space_component"
sound_alt       = "b_generic"
helptext        = _("\
Space Components can be differentiated into Propulsion and Fuel\
 Components.  Each pair of them reduces your spaceship's travel\
 time.  You can build up to 8 pairs.\
\n\n\
Before you can build any spaceship parts, the Apollo Program wonder\
 must have been built by any player.\
")

[building_space_module]
name            = _("Space Module")
tech_req        = "Superconductors"
bldg_req        = "None"
graphic = "b.space_modules"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 320
upkeep          = 0
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Space_Part", "Local", 3
    }
sound           = "b_space_module"
sound_alt       = "b_generic"
helptext        = _("\
Space Modules are the most expensive parts of spaceships.  There\
 are three different types of Space Module:\
\n\n\
- Habitation Module: provides living space for 10,000 people.\
\n\n\
- Life Support Module: provides food and water for the population of\
  one Habitation Module.\
\n\n\
- Solar Panels: provides the energy needed for any two of the other\
  Modules.\
\n\n\
You can build up to 4 Space Modules of each kind.\
\n\n\
Before you can build any spaceship parts, the Apollo Program wonder\
 must have been built by any player.\
")

[building_space_structural]
name            = _("Space Structural")
tech_req        = "Space Flight"
bldg_req        = "None"
graphic = "b.space_structural"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 80
upkeep          = 0
sabotage        = 100
effect          =
    { "type", "range", "amount"
        "Space_Part", "Local", 1
    }
sound           = "b_space_structural"
sound_alt       = "b_generic"
helptext        = _("\
Space Structurals form the base of your spaceship.  All other\
 spaceship parts need to be connected to Structurals in order to\
 function.  You can build up to 32 Space Structurals.\
\n\n\
Before you can build any spaceship parts, the Apollo Program wonder\
 must have been built by any player.\
")

[building_stock_exchange]
name            = _("Stock Exchange")
tech_req        = "Economics"
bldg_req        = "Bank"
graphic = "b.stock_exchange"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 4
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Tax_Bonus", "City", 50, "Bank"
        "Luxury_Bonus", "City", 50, "Bank"
    }
sound           = "b_stock_exchange"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Together with a Marketplace and a Bank, a Stock Exchange boosts\
 tax and luxury production in a city by 150%.\
")

[building_super_highways]
name            = _("Super Highways")
tech_req        = "Automobile"
bldg_req        = "None"
graphic = "b.super_highways"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "amount", "aff_terr", "aff_spec"
        "Trade_Per_Tile", "City", 50, "None", "Road"
    }
sound           = "b_super_highways"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Increases trade resources by 50% on all squares with roads or\
 railroads.\
")
; NOTE:
; Civ2 help says Super Highways increase trade from trade routes.

[building_supermarket]
name            = _("Supermarket")
tech_req        = "Refrigeration"
bldg_req        = "None"
graphic = "b.supermarket"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 120
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "amount", "aff_terr", "aff_spec"
        "Food_Per_Tile", "City", 50, "None", "Farmland"
    }
sound           = "b_supermarket"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Increases the food resources by 50% on each farmland square which\
 is being used around the city.  Farmland squares are those which\
 have been irrigated a second time.\
")

[building_temple]
name            = _("Temple")
tech_req        = "Ceremonial Burial"
bldg_req        = "None"
graphic = "b.temple"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 40
upkeep          = 1
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_adv"
        "Make_Content", "City", 1
        "Make_Content", "City", 1, "Mysticism"
    }
sound           = "b_temple"
sound_alt       = "b_generic"
helptext        = _("\
Makes one unhappy citizen content.  Both the Mysticism advance\
 and the Oracle wonder double this effect.  With both Mysticism\
 and the Oracle, 4 citizens are made content.\
")

[building_university]
name            = _("University")
tech_req        = "University"
bldg_req        = "Library"
graphic = "b.university"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 160
upkeep          = 3
sabotage        = 100
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Science_Bonus", "City", 50, "Library"
    }
sound           = "b_university"
sound_alt       = "b_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Together with a Library, a University increases the science\
 production of a city by 100%.\
")

[building_apollo_program]
name            = _("Apollo Program")
tech_req        = "Space Flight"
bldg_req        = "None"
graphic = "b.apollo_program"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 600
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "survives"
        "Reveal_Map", "Player", 0
        "Enable_Space", "World", 1
    }
sound           = "w_apollo_program"
sound_alt       = "w_generic"
helptext        = _("\
Entire map becomes visible for the player who owns it. \
 It allows all players to start building spaceship parts (assuming\
 they have researched the necessary technologies).\
")

[building_asmiths_trading_co]
name            = _("A.Smith's Trading Co.")
tech_req        = "Economics"
bldg_req        = "None"
graphic = "b.asmiths_trading_co"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 400
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Upkeep_Free", "Player", 1
    }
sound           = "w_asmiths_trading_co"
sound_alt       = "w_generic"
helptext        = _("\
City improvements which would normally have an upkeep of 1 are free\
 of upkeep, for all cities.\
")

[building_colossus]
name            = _("Colossus")
tech_req        = "Bronze Working"
bldg_req        = "None"
graphic = "b.colossus"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Flight"
is_wonder       = 1
build_cost      = 200
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Trade_Inc_Tile", "City", 1
    }
sound           = "w_colossus"
sound_alt       = "w_generic"
helptext        = _("\
Each square around the city where this wonder is built that is already\
 generating some trade produces one extra trade resource.\
")

[building_copernicus_observatory]
name            = _("Copernicus' Observatory")
tech_req        = "Astronomy"
bldg_req        = "None"
graphic = "b.copernicus_observatory"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Science_Bonus", "City", 50
    }
sound           = "w_copernicus_observatory"
sound_alt       = "w_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Boosts science production by 50% in the city where it is built.\
")

[building_cure_for_cancer]
name            = _("Cure For Cancer")
tech_req        = "Genetic Engineering"
bldg_req        = "None"
graphic = "b.cure_for_cancer"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 600
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Make_Content", "Player", 1
    }
sound           = "w_cure_for_cancer"
sound_alt       = "w_generic"
helptext        = _("\
This stunning technological achievement makes one unhappy\
 citizen content in all cities.\
")
; NOTE:
; In Civ2 this makes 1 content citizen happy in all cities.

[building_darwins_voyage]
name            = _("Darwin's Voyage")
tech_req        = "Railroad"
bldg_req        = "None"
graphic = "b.darwins_voyage"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Give_Imm_Adv", "Player", 2
    }
sound           = "w_darwins_voyage"
sound_alt       = "w_generic"
helptext        = _("\
Charles Darwin's voyage sparked the discovery of the evolution\
 of the species, which inspired greater confidence in science.\
 Gives two immediate technology advances.\
")

[building_eiffel_tower]
name            = _("Eiffel Tower")
tech_req        = "Never"               ; "Steam Engine"
bldg_req        = "None"
graphic = "b.eiffel_tower"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Improve_Rep", "Player", 25
    }
sound           = "w_eiffel_tower"
sound_alt       = "w_generic"
; /* xgettext:no-c-format */
helptext        = _("\
When built, every civilization's attitude toward you is improved\
 by 25%.\
")
; NOTE:
; Not implemented.

[building_great_library]
name            = _("Great Library")
tech_req        = "Literacy"
bldg_req        = "None"
graphic = "b.great_library"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Electricity"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Adv_Parasite", "Player", 2
    }
sound           = "w_great_library"
sound_alt       = "w_generic"
helptext        = _("\
The civilization which builds the Great Library gets every advance\
 that at least two other civilizations have achieved.\
")

[building_great_wall]
name            = _("Great Wall")
tech_req        = "Masonry"
bldg_req        = "None"
graphic = "b.great_wall"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Metallurgy"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "aff_unit"
        "Unit_Defend", "Player", 300, "Land"
        "Unit_No_Lose_Pop", "Player", 0, "Land"
    }
sound           = "w_great_wall"
sound_alt       = "w_generic"
helptext        = _("\
Works as a City Wall in all cities.\
")
; NOTE:
; Civ2 also doubles attack -vs- barbs,
; and enemies are forced to offer cease-fire or peace.

[building_hanging_gardens]
name            = _("Hanging Gardens")
tech_req        = "Pottery"
bldg_req        = "None"
graphic = "b.hanging_gardens"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Railroad"
is_wonder       = 1
build_cost      = 200
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Make_Happy", "Player", 1
        "Make_Happy", "City", 2
    }
sound           = "w_hanging_gardens"
sound_alt       = "w_generic"
helptext        = _("\
Makes one content citizen happy in every city. Makes two extra\
 content citizens happy in the city containing the Hanging Gardens\
 (that is, a total of 3).  In the unlikely event where there are no\
 content citizens to get the effect of Hanging Gardens, the wonder\
 applies to unhappy citizens (making them content instead).\
")

[building_hoover_dam]
name            = _("Hoover Dam")
tech_req        = "Electronics"
bldg_req        = "None"
graphic = "b.hoover_dam"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 600
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Prod_Bonus", "Player", 25, "Factory"
        "Prod_Bonus", "Player", 25, "Mfg. Plant"
        "Pollu_Adj_Prod", "Player", 50
        "Pollu_Adj_Prod", "Player", -50, "Recycling Center"
    }
sound           = "w_hoover_dam"
sound_alt       = "w_generic"
helptext        = _("\
Works as if you had a Hydro Plant in every city.  (This reduces\
 pollution and increases the effects of Factories and Mfg. Plants.)\
")

[building_isaac_newtons_college]
name            = _("Isaac Newton's College")
tech_req        = "Theory of Gravity"
bldg_req        = "None"
graphic = "b.isaac_newtons_college"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 400
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Science_Bonus", "City", 100
    }
sound           = "w_isaac_newtons_college"
sound_alt       = "w_generic"
; /* xgettext:no-c-format */
helptext        = _("\
Boosts science production by 100% in the city where it is built.\
")

[building_js_bachs_cathedral]
name            = _("J.S. Bach's Cathedral")
tech_req        = "Theology"
bldg_req        = "None"
graphic = "b.js_bachs_cathedral"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 400
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Make_Content", "Player", 2
    }
sound           = "w_js_bachs_cathedral"
sound_alt       = "w_generic"
helptext        = _("\
Makes two unhappy citizens content in every city.\
")

[building_king_richards_crusade]
name            = _("King Richard's Crusade")
tech_req        = "Engineering"
bldg_req        = "None"
graphic = "b.king_richards_crusade"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Industrialization"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Prod_Add_Tile", "City", 1
    }
sound           = "w_king_richards_crusade"
sound_alt       = "w_generic"
helptext        = _("\
Adds one extra shield resource on every square around the city\
 where it is built.\
")

[building_leonardos_workshop]
name            = _("Leonardo's Workshop")
tech_req        = "Invention"
bldg_req        = "None"
graphic = "b.leonardos_workshop"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Automobile"
is_wonder       = 1
build_cost      = 400
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Upgrade_One_Leap", "Player", 100
    }
sound           = "w_leonardos_workshop"
sound_alt       = "w_generic"
helptext        = _("\
Upgrades one obsolete unit per game turn.\
")

[building_lighthouse]
name            = _("Lighthouse")
tech_req        = "Map Making"
bldg_req        = "None"
graphic = "b.lighthouse"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Magnetism"
is_wonder       = 1
build_cost      = 200
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "aff_unit"
        "Unit_Move", "Player", 1, "Sea"
        "No_Sink_Deep", "Player"
        "Unit_Veteran", "Player", 0, "Sea"
    }
sound           = "w_lighthouse"
sound_alt       = "w_generic"
helptext        = _("\
Gives all sea units 1 additional movement point and eliminates the\
 risk of losing Triremes on the high seas.  Makes all new sea units\
 veterans (for all cities).\
")

[building_magellans_expedition]
name            = _("Magellan's Expedition")
tech_req        = "Navigation"
bldg_req        = "None"
graphic = "b.magellans_expedition"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 400
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "aff_unit"
        "Unit_Move", "Player", 2, "Sea"
    }
sound           = "w_magellans_expedition"
sound_alt       = "w_generic"
helptext        = _("\
Gives all sea units 2 additional movement points.\
")

[building_manhattan_project]
name            = _("Manhattan Project")
tech_req        = "Nuclear Fission"
bldg_req        = "None"
graphic = "b.manhattan_project"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 600
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "survives"
        "Enable_Nuke", "World", 1
    }
sound           = "w_manhattan_project"
sound_alt       = "w_generic"
;helptext is set in client/helpdata.c:helptext_wonder()
;helptext       =

[building_marco_polos_embassy]
name            = _("Marco Polo's Embassy")
tech_req        = "Trade"
bldg_req        = "None"
graphic = "b.marco_polos_embassy"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Communism"
is_wonder       = 1
build_cost      = 200
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range"
        "Have_Embassies", "Player"
    }
sound           = "w_marco_polos_embassy"
sound_alt       = "w_generic"
helptext        = _("\
The player who owns it gets an embassy with all players.\
")

[building_michelangelos_chapel]
name            = _("Michelangelo's Chapel")
tech_req        = "Monotheism"
bldg_req        = "None"
graphic = "b.michelangelos_chapel"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 400
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "cond_adv"
        "Make_Content", "Player", 3
        "Make_Content", "Player", 1, "Theology"
        "Make_Content", "Player", -1, "Communism"
    }
sound           = "w_michelangelos_chapel"
sound_alt       = "w_generic"
helptext        = _("\
Counts as having a Cathedral in each of your cities.  This makes 3\
 unhappy citizens content in each city.  The discovery of Theology\
 increases the effect of a Cathedral, making an additional unhappy\
 citizen content.  The discovery of Communism lessens the effect of\
 a Cathedral, reducing by one the number of unhappy citizens made\
 content.\
")

[building_oracle]
name            = _("Oracle")
tech_req        = "Mysticism"
bldg_req        = "None"
graphic = "b.oracle"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Theology"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "cond_bldg", "cond_adv"
        "Make_Content", "Player", 1, "Temple"
        "Make_Content", "Player", 1, "Temple", "Mysticism"
    }
sound           = "w_oracle"
sound_alt       = "w_generic"
helptext        = _("\
Doubles the effect of Temples, in all cities.\
")

[building_pyramids]
name            = _("Pyramids")
tech_req        = "Masonry"
bldg_req        = "None"
graphic = "b.pyramids"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 200
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Growth_Food", "Player", 50
    }
sound           = "w_pyramids"
sound_alt       = "w_generic"
helptext        = _("\
Counts as having a Granary in every city.\
")

[building_seti_program]
name            = _("SETI Program")
tech_req        = "Computers"
bldg_req        = "None"
graphic = "b.seti_program"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 600
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "cond_bldg"
        "Science_Bonus", "Player", 50, "Library"
    }
sound           = "w_seti_program"
sound_alt       = "w_generic"
helptext        = _("\
Boosts science production in each city with a Library by 50%. \
 (Counts as having a Research Lab in all of your cities.)\
")

[building_shakespeares_theatre]
name            = _("Shakespeare's Theatre")
tech_req        = "Medicine"
bldg_req        = "None"
graphic = "b.shakespeares_theatre"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Make_Content", "City", 99
    }
sound           = "w_shakespeares_theatre"
sound_alt       = "w_generic"
helptext        = _("\
Makes all unhappy citizens content, in the city where it is located.\
")

[building_statue_of_liberty]
name            = _("Statue of Liberty")
tech_req        = "Democracy"
bldg_req        = "None"
graphic = "b.statue_of_liberty"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "None"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 400
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range"
        "Any_Government", "Player"
        "No_Anarchy", "Player"
    }
sound           = "w_statue_of_liberty"
sound_alt       = "w_generic"
helptext        = _("\
Allows you to choose any government, including those that have not yet\
 been researched by your civilization, and without the transition\
 period of Anarchy.\
")

[building_sun_tzus_war_academy]
name            = _("Sun Tzu's War Academy")
tech_req        = "Feudalism"
bldg_req        = "None"
graphic = "b.sun_tzus_war_academy"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "Mobile Warfare"
is_wonder       = 1
build_cost      = 300
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "aff_unit"
        "Unit_Veteran", "Player", 0, "Land"
        "Unit_Vet_Combat", "Player", 100, "Land"
    }
sound           = "w_sun_tzus_war_academy"
sound_alt       = "w_generic"
helptext        = _("\
All your new ground units become veterans (for all cities). \
 The chance of a unit becoming a veteran after a battle increases\
 from 50% to 100%.\
")

[building_united_nations]
name            = _("United Nations")
tech_req        = "Communism"
bldg_req        = "None"
graphic = "b.united_nations"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 600
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "aff_unit"
        "Unit_Recover", "Player", 2, "Air"
        "Unit_Recover", "Player", 2, "Helicopter"
        "Unit_Recover", "Player", 2, "Land"
        "Unit_Recover", "Player", 2, "Missile"
        "Unit_Recover", "Player", 2, "Sea"
    }
sound           = "w_united_nations"
sound_alt       = "w_generic"
helptext        = _("\
Units regain two extra hitpoints per turn.\
")
; NOTE: 
; This does not match Civ1 or Civ2, but diplomatic effects are 
; not very effective in multiplayer, and hitpoints effects do not
; apply for Civ1.  Note in Civ1 Pyramids have a gov-change effect,
; but become obsolete, and the Statue of Liberty does not exist.
; NOTE:
; In Civ2 this provides embassies, forces peaceful enemies and
; allows Democracy to declare war 50% of the time.

[building_womens_suffrage]
name            = _("Women's Suffrage")
tech_req        = "Industrialization"
bldg_req        = "None"
graphic = "b.womens_suffrage"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "Player"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 1
build_cost      = 600
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount", "cond_gov"
        "Make_Content_Mil", "Player", 1, "Republic"
        "Make_Content_Mil", "Player", 2, "Democracy"
    }
sound           = "w_womens_suffrage"
sound_alt       = "w_generic"
helptext        = _("\
Counts as a Police Station in every city.  (That is, for each city,\
 reduces unhappiness for military units outside the city by 2 under\
 Democracy and 1 under Republic.  This wonder has no effect under\
 other governments.)\
")
; NOTE:
; For Civ2 this should reduce unhappiness by one for *each* unit
; outside a city that is causing at least one unhappiness.

[building_capitalization]
; FIXME: these are the real name/tech_req; restore when have a subordnate 
analogue
; /* (ignore for gettext until fixed)
;name           = _("Capitalization")
;tech_req       = "The Corporation"
; */
name            = _("Coinage")
tech_req        = "None"
bldg_req        = "None"
graphic = "b.capitalization"
graphic_alt     = "-"
;terr_gate      =
;spec_gate      =
equiv_range     = "City"
;equiv_dupl     =
;equiv_repl     =
obsolete_by     = "None"
is_wonder       = 0
build_cost      = 999
upkeep          = 0
sabotage        = 0
effect          =
    { "type", "range", "amount"
        "Prod_To_Gold", "City", 100
    }
; FIXME: this is the real helptext; restore when have a subordnate analogue
; /* (ignore for gettext until fixed)
;helptext       = _("\
;This is not a normal improvement.  Instead, setting a city's\
; production to Capitalization means its shield production is\
; converted to tax output (money).\
;")
; */
helptext        = _("\
This is not a normal improvement.  Instead, setting a city's\
 production to Coinage means its shield production is\
 converted to tax output (money, coins!).\
")


; FIXME: remove all of the following when gen-impr implemented...

[b_special]

; Special values:

aqueduct_size=8;
sewer_size=12;

; Techs which modify building effects:

cathedral_plus="Theology"
cathedral_minus="Communism"
colosseum_plus="Electricity"
temple_plus="Mysticism"
Changes:
 - Settlers are not obsoleted, cannot improve terrain..
 - Worker unit can improve terrain, requires Pottery..
 - Acqueduct 80 -> 60 shields.
 - Airport requires Factory
 - Barracks don't become obsolete.
 - Crusaders reactivated.
 - Destroyers require Industrialization instead of Electricity.
 - Several units require buildings before they can be produced.

Building dependencies:
  None:
        Warrior
        Trireme
        Explorer
  Barracks:
        Phalanx
        Archers
        Legion
        Pikemen
        Horsemen
        Chariot
        Musketeers
        Alpine Troops
        Riflemen
        Dragoons
        Cavalry
        Catapult
        Cannon
        Artillery
  Port:
        Marines
  Airport:
        Paratroopers
        Stealth fighter
        Stealth bomber
        AWACS
  Temple:
        Fanatics
        Crusaders
        Knights
  Factory:
        Mech Inf
        Armor
        Howitzer
        Fighter
        Bomber
        Destroyer
        Cruiser
        Submarine
        Cruise Missile
  Mfg Plant:
        AEGIS Cruiser
        Battleship
  Harbour:
        Caravel
        Galleon
        Frigate
        Ironclad
        Transport
  Nuclear Plant:
        Nuclear
  Courthouse:
        Diplomat
        Spy
  Marketplace:
        Caravan
        Freight
  Capitalization:
        Partisan (it can't be built, ok?)

Bugs:
 - AI doesn't understand that it needs to build these buildings first

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