Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2005:
[Freeciv-Dev] (PR#11726) City improvements are still available inspite o
Home

[Freeciv-Dev] (PR#11726) City improvements are still available inspite o

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: carllobo@xxxxxxxxx, holy_moly@xxxxxx
Subject: [Freeciv-Dev] (PR#11726) City improvements are still available inspite of wonders.
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sat, 1 Jan 2005 11:47:37 -0800
Reply-to: bugs@xxxxxxxxxxx

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

> [carllobo@xxxxxxxxx - Thu Dec 30 08:27:31 2004]:
> 
> One can still build an improvement in a city inspite of having a
> wonder. To illustrate, all my cities can build a granary inspite of
> having built the Pyramids. Simillarly Barracks are also available in
> all cities, inspite of having the Sun Tzu's war academy. When I
> conquer a city, the barracks are not shown with an asterix and they
> don't get sold automatically.  However all my troops are veteran as
> soon as they're built.
> Attached is the save game. The Sun Tzu's war academy is in Sparta and
> the Pyramids are in Athenae. I'm using a CVS checkout. This does not
> happen with the 2.0 5th beta release.
> Great job however guys!!

I've been thinking about this a bit more, for Granary/Pyramids, it
seems an equiv effects group was missing in the ruleset. This patch
adds that, as well as the equivalences for the land veteran effect.
This should make the AI stop building this if it has Pyramids among
other things.

However, Sun Tzu and Barracks are *not* equivalent under the current
ruleset! Barracks have the Land Unit regeneration bonus while Sun Tzu
does not, Sun Tzu has the instant veteran after Land Unit combat
victory, while Barracks do not.

In the old code Sun Tzu also provided the Land Unit regen on cities
bonus. So we really should consider reinstating it. If this is done,
then Barracks will be considered as replaced by Sun Tzu as it used to
be.


Index: data/default/buildings.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/buildings.ruleset,v
retrieving revision 1.64
diff -u -r1.64 buildings.ruleset
--- data/default/buildings.ruleset      21 Dec 2004 03:36:19 -0000      1.64
+++ data/default/buildings.ruleset      1 Jan 2005 19:36:05 -0000
@@ -75,6 +75,16 @@
 ; exists wins.
 ;
 
+[group_barracks]
+name           = "Academies"
+elements       =
+    { "building", "range"
+      "Barracks III", "City"
+      "Sun Tzu's War Academy", "Player"
+      "Barracks II", "City"
+      "Barracks", "City"
+    }
+
 [group_cathedrals]
 name           = "Cathedrals"
 elements       =
@@ -93,6 +103,14 @@
       "Power Plant", "City"
     }
 
+[group_granaries]
+name           = "Granaries"
+elements       =
+    { "building", "range"
+      "Pyramids", "Player"
+      "Granary", "City"
+    }
+
 [group_janitors]
 name            = "Janitors"
 elements       =
@@ -225,8 +243,8 @@
 upkeep         = 1
 sabotage       = 100
 effect         =
-    { "name"
-      "Land_Veteran"
+    { "name", "equiv"
+      "Land_Veteran", "Academies"
       "Land_Regen"
     }
 sound          = "b_barracks_i"
@@ -254,8 +272,8 @@
 upkeep         = 1
 sabotage       = 100
 effect         =
-    { "name"
-      "Land_Veteran"
+    { "name", "equiv"
+      "Land_Veteran", "Academies"
       "Land_Regen"
     }
 sound          = "b_barracks_ii"
@@ -282,8 +300,8 @@
 upkeep         = 1
 sabotage       = 100
 effect         =
-    { "name"
-      "Land_Veteran"
+    { "name", "equiv"
+      "Land_Veteran", "Academies"
       "Land_Regen"
     }
 sound          = "b_barracks_iii"
@@ -342,7 +360,7 @@
 effect         =
     { "name", "value", "equiv"
       "Land_Defend", 200, "Defenders"
-      "Unit_No_Lose_Pop"
+      "Unit_No_Lose_Pop", 1, "Defenders"
     }
 sound          = "b_city_walls"
 sound_alt      = "b_generic"
@@ -472,8 +490,8 @@
 upkeep         = 1
 sabotage       = 100
 effect         =
-    { "name", "value"
-      "Growth_Food", 50
+    { "name", "value", "equiv"
+      "Growth_Food", 50, "Granaries"
     }
 sound          = "b_granary"
 sound_alt      = "b_generic"
@@ -1440,7 +1458,7 @@
 effect         =
     { "name", "range", "value", "equiv"
       "Land_Defend", "Player", 200, "Defenders"
-      "Unit_No_Lose_Pop", "Player"
+      "Unit_No_Lose_Pop", "Player", 1, "Defenders"
     }
 sound          = "w_great_wall"
 sound_alt      = "w_generic"
@@ -1764,8 +1782,8 @@
 upkeep         = 0
 sabotage       = 0
 effect         =
-    { "name", "value", "range"
-      "Growth_Food", 50, "Player"
+    { "name", "value", "range", "equiv"
+      "Growth_Food", 50, "Player", "Granaries"
     }
 sound          = "w_pyramids"
 sound_alt      = "w_generic"
@@ -1859,8 +1877,8 @@
 upkeep         = 0
 sabotage       = 0
 effect         =
-    { "name", "range", "value"
-      "Land_Veteran", "Player"
+    { "name", "range", "value", "equiv"
+      "Land_Veteran", "Player", 1, "Academies"
       "Land_Vet_Combat", "Player", 50
     }
 sound          = "w_sun_tzus_war_academy"

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