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

On 3/12/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
>
> On 3/12/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
> >
> >  Whether city is drawn with walls or not is decided by calling
> > city_got_citywalls(). That just checks if city has *any*
> > "Defend_Bonus" effect active.
>
>  Attached patch adds "Visible_Wall" effect. City Walls has it in one
> city range and Great Wall in player range.
>
>  This version is for trunk and applies on top of #37980 and #37983.

 Trunk version.

 - Updated against svn
 - Fixed typo in Great Wall effect (in all three ruleset)


 - ML

diff -Nurd -X.diff_ignore freeciv/ai/aicity.c freeciv/ai/aicity.c
--- freeciv/ai/aicity.c	2007-03-12 03:00:48.000000000 +0200
+++ freeciv/ai/aicity.c	2007-03-14 09:38:35.000000000 +0200
@@ -645,6 +645,9 @@
   case EFT_OUTPUT_INC_TILE_CELEBRATE:
   case EFT_TRADE_REVENUE_BONUS:
     break;
+    /* This has no effect for AI */
+  case EFT_VISIBLE_WALLS:
+    break;
   case EFT_LAST:
     freelog(LOG_ERROR, "Bad effect type.");
     break;
diff -Nurd -X.diff_ignore freeciv/common/city.c freeciv/common/city.c
--- freeciv/common/city.c	2007-03-13 17:43:30.000000000 +0200
+++ freeciv/common/city.c	2007-03-14 09:38:35.000000000 +0200
@@ -985,7 +985,7 @@
 **************************************************************************/
 bool city_got_citywalls(const struct city *pcity)
 {
-  return (get_city_bonus(pcity, EFT_DEFEND_BONUS) > 0);
+  return (get_city_bonus(pcity, EFT_VISIBLE_WALLS) > 0);
 }
 
 /**************************************************************************
diff -Nurd -X.diff_ignore freeciv/common/effects.c freeciv/common/effects.c
--- freeciv/common/effects.c	2007-03-12 03:00:48.000000000 +0200
+++ freeciv/common/effects.c	2007-03-14 09:39:34.000000000 +0200
@@ -116,7 +116,8 @@
   "Output_Penalty_Tile",
   "Output_Inc_Tile_Celebrate",
   "City_Unhappy_Size",
-  "Upgrade_Price_Pct"
+  "Upgrade_Price_Pct",
+  "Visible_Walls"
 };
 
 static bool initialized = FALSE;
diff -Nurd -X.diff_ignore freeciv/common/effects.h freeciv/common/effects.h
--- freeciv/common/effects.h	2007-03-12 03:00:48.000000000 +0200
+++ freeciv/common/effects.h	2007-03-14 09:40:03.000000000 +0200
@@ -105,6 +105,7 @@
   EFT_OUTPUT_INC_TILE_CELEBRATE,
   EFT_CITY_UNHAPPY_SIZE, /* all citizens after this are unhappy */
   EFT_UPGRADE_PRICE_PCT,
+  EFT_VISIBLE_WALLS,     /* City should use walls gfx */
   EFT_LAST	/* keep this last */
 };
 
diff -Nurd -X.diff_ignore freeciv/data/civ1/effects.ruleset freeciv/data/civ1/effects.ruleset
--- freeciv/data/civ1/effects.ruleset	2007-03-05 21:10:00.000000000 +0200
+++ freeciv/data/civ1/effects.ruleset	2007-03-14 09:41:27.000000000 +0200
@@ -626,6 +626,14 @@
       "Building", "City Walls", "City"
     }
 
+[effect_city_walls_visible]
+name	= "Visible_Walls"
+value	= 1
+reqs	=
+    { "type", "name", "range"
+      "Building", "City Walls", "City"
+    }
+
 [effect_colosseum]
 name	= "Make_Content"
 value	= 3
@@ -999,6 +1007,14 @@
       "UnitClass", "Sea", "Local"
     }
 
+[effect_great_wall_visible]
+name	= "Visible_Walls"
+value	= 1
+reqs	=
+    { "type", "name", "range"
+      "Building", "Great Wall", "Player"
+    }
+
 [effect_hanging_gardens]
 name	= "Make_Happy"
 value	= 1
diff -Nurd -X.diff_ignore freeciv/data/civ2/effects.ruleset freeciv/data/civ2/effects.ruleset
--- freeciv/data/civ2/effects.ruleset	2007-03-05 21:10:01.000000000 +0200
+++ freeciv/data/civ2/effects.ruleset	2007-03-14 09:41:19.000000000 +0200
@@ -1000,6 +1000,14 @@
       "Building", "City Walls", "City"
     }
 
+[effect_city_walls_visible]
+name	= "Visible_Walls"
+value	= 1
+reqs	=
+    { "type", "name", "range"
+      "Building", "City Walls", "City"
+    }
+
 [effect_coastal_defense]
 name	= "Defend_Bonus"
 value	= 100
@@ -1664,6 +1672,14 @@
       "Building", "Great Wall", "Player"
     }
 
+[effect_great_wall_visible]
+name	= "Visible_Walls"
+value	= 1
+reqs	=
+    { "type", "name", "range"
+      "Building", "Great Wall", "Player"
+    }
+
 [effect_hanging_gardens]
 name	= "Make_Happy"
 value	= 1
diff -Nurd -X.diff_ignore freeciv/data/default/effects.ruleset freeciv/data/default/effects.ruleset
--- freeciv/data/default/effects.ruleset	2007-03-05 21:10:03.000000000 +0200
+++ freeciv/data/default/effects.ruleset	2007-03-14 09:41:08.000000000 +0200
@@ -888,6 +888,14 @@
       "Building", "City Walls", "City"
     }
 
+[effect_city_walls_visible]
+name	= "Visible_Walls"
+value	= 1
+reqs	=
+    { "type", "name", "range"
+      "Building", "City Walls", "City"
+    }
+
 [effect_coastal_defense]
 name	= "Defend_Bonus"
 value	= 100
@@ -1635,6 +1643,14 @@
       "Building", "Great Wall", "Player"
     }
 
+[effect_great_wall_visible]
+name	= "Visible_Walls"
+value	= 1
+reqs	=
+    { "type", "name", "range"
+      "Building", "Great Wall", "Player"
+    }
+
 [effect_hanging_gardens]
 name	= "Make_Happy"
 value	= 1
diff -Nurd -X.diff_ignore freeciv/doc/README.effects freeciv/doc/README.effects
--- freeciv/doc/README.effects	2007-03-12 03:00:47.000000000 +0200
+++ freeciv/doc/README.effects	2007-03-14 09:40:47.000000000 +0200
@@ -292,3 +292,6 @@
     Increases unit upgrade cost by amount percent. This effect works at
     player level. You cannot adjust upgrade costs for certain unit type or
     for units upgraded in certain city.
+
+Visible_Wall
+    Positive amount only instructs clients to use wall graphics for city.
diff -Nurd -X.diff_ignore freeciv/version.in freeciv/version.in
--- freeciv/version.in	2007-03-12 20:47:50.000000000 +0200
+++ freeciv/version.in	2007-03-14 09:41:55.000000000 +0200
@@ -24,4 +24,4 @@
 #   - Avoid adding a new manditory capbility to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-FREECIV_NETWORK_CAPSTRING("+Freeciv.Devel.2007.Mar.12-2")
+FREECIV_NETWORK_CAPSTRING("+Freeciv.Devel.2007.Mar.14")
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to