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

 This is an attempt to somewhat balance triremes. With current
entirely height map based placement of ocean types they seem to be
able to always easily reach all continents. This patch makes more deep
ocean to appear in the middle of the ocean, cutting these shallow
connections between continents.


 - ML

diff -Nurd -X.diff_ignore freeciv/data/default/terrain.ruleset 
freeciv/data/default/terrain.ruleset
--- freeciv/data/default/terrain.ruleset        2008-07-02 01:47:22.000000000 
+0300
+++ freeciv/data/default/terrain.ruleset        2008-08-01 21:46:52.000000000 
+0300
@@ -245,7 +245,7 @@
 cooler_drier_result  = "no"
 native_to            = "Sea", "Air", "Missile", "Helicopter", "Trireme"
 flags                = "Oceanic", "NoCities", "NoPollution", "UnsafeCoast"
-property_ocean_depth = 36
+property_ocean_depth = 32
 helptext             = _("\
 Oceans cover much of the world, and only sea units (Triremes and\
  other boats) can travel on them.\
diff -Nurd -X.diff_ignore freeciv/server/generator/mapgen.c 
freeciv/server/generator/mapgen.c
--- freeciv/server/generator/mapgen.c   2008-07-03 21:02:58.000000000 +0300
+++ freeciv/server/generator/mapgen.c   2008-08-01 22:13:20.000000000 +0300
@@ -1039,7 +1039,7 @@
 
 /**************************************************************************
   make land simply does it all based on a generated heightmap
-  1) with map.landpercent it generates a ocean/grassland map 
+  1) with map.landpercent it generates a ocean/unknown map
   2) it then calls the above functions to generate the different terrains
 **************************************************************************/
 static void make_land(void)
@@ -1054,10 +1054,27 @@
     tile_set_terrain(ptile, T_UNKNOWN); /* set as oceans count is used */
     if (hmap(ptile) < hmap_shore_level) {
       int depth = (hmap_shore_level - hmap(ptile)) * 100 / hmap_shore_level;
+      int ocean = 0;
+      int land = 0;
+
+      /* This is to make shallow connection between continents less likely */
+      adjc_iterate(ptile, other) {
+        if (hmap(other) < hmap_shore_level) {
+          ocean++;
+        } else {
+          land++;
+          break;
+        }
+      } adjc_iterate_end;
+
+      depth += 30 * (ocean - land) / (ocean + land);
+
+      depth = MIN(depth, TERRAIN_OCEAN_DEPTH_MAXIMUM);
 
       tile_set_terrain(ptile, pick_ocean(depth));
     }
   } whole_map_iterate_end;
+
   if (HAS_POLES) {
     renormalize_hmap_poles();
   } 
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to