<URL: http://bugs.freeciv.org/Ticket/Display.html?id=35908 >
Jason Short wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=35908 >
>
> Here is an updated patch for the crazy ocean graphics.
...
Index: doc/README.effects
===================================================================
--- doc/README.effects (revision 12674)
+++ doc/README.effects (working copy)
@@ -120,9 +120,6 @@
No_Anarchy
No period of anarchy between government changes.
-No_Sink_Deep
- Triremes no longer sink when on dangerous seas.
-
Nuke_Proof
City is nuke proof.
Index: server/unithand.c
===================================================================
--- server/unithand.c (revision 12674)
+++ server/unithand.c (working copy)
@@ -951,10 +951,6 @@
notify_player(unit_owner(punit), src_tile, E_BAD_COMMAND,
_("%s can only move into your own zone of control."),
unit_type(punit)->name);
- } else if (reason == MR_TRIREME) {
- notify_player(unit_owner(punit), src_tile, E_BAD_COMMAND,
- _("%s cannot move that far from the coast line."),
- unit_type(punit)->name);
}
return FALSE;
}
Index: data/amplio/terrain2.spec
===================================================================
--- data/amplio/terrain2.spec (revision 12674)
+++ data/amplio/terrain2.spec (working copy)
@@ -68,60 +68,60 @@
;forrests as overlay
- 4, 0, "t.l1.forest_n0e0s0w0"
- 4, 1, "t.l1.forest_n1e0s0w0"
- 4, 2, "t.l1.forest_n0e1s0w0"
- 4, 3, "t.l1.forest_n1e1s0w0"
- 4, 4, "t.l1.forest_n0e0s1w0"
- 4, 5, "t.l1.forest_n1e0s1w0"
- 4, 6, "t.l1.forest_n0e1s1w0"
- 4, 7, "t.l1.forest_n1e1s1w0"
- 5, 0, "t.l1.forest_n0e0s0w1"
- 5, 1, "t.l1.forest_n1e0s0w1"
- 5, 2, "t.l1.forest_n0e1s0w1"
- 5, 3, "t.l1.forest_n1e1s0w1"
- 5, 4, "t.l1.forest_n0e0s1w1"
- 5, 5, "t.l1.forest_n1e0s1w1"
- 5, 6, "t.l1.forest_n0e1s1w1"
- 5, 7, "t.l1.forest_n1e1s1w1"
+ 4, 0, "t.l2.forest_n0e0s0w0"
+ 4, 1, "t.l2.forest_n1e0s0w0"
+ 4, 2, "t.l2.forest_n0e1s0w0"
+ 4, 3, "t.l2.forest_n1e1s0w0"
+ 4, 4, "t.l2.forest_n0e0s1w0"
+ 4, 5, "t.l2.forest_n1e0s1w0"
+ 4, 6, "t.l2.forest_n0e1s1w0"
+ 4, 7, "t.l2.forest_n1e1s1w0"
+ 5, 0, "t.l2.forest_n0e0s0w1"
+ 5, 1, "t.l2.forest_n1e0s0w1"
+ 5, 2, "t.l2.forest_n0e1s0w1"
+ 5, 3, "t.l2.forest_n1e1s0w1"
+ 5, 4, "t.l2.forest_n0e0s1w1"
+ 5, 5, "t.l2.forest_n1e0s1w1"
+ 5, 6, "t.l2.forest_n0e1s1w1"
+ 5, 7, "t.l2.forest_n1e1s1w1"
;mountains as overlay
- 6, 0, "t.l1.mountains_n0e0s0w0"
- 6, 1, "t.l1.mountains_n0e0s0w1"
- 6, 2, "t.l1.mountains_n0e0s1w0"
- 6, 3, "t.l1.mountains_n0e0s1w1"
- 6, 4, "t.l1.mountains_n0e1s0w0"
- 6, 5, "t.l1.mountains_n0e1s0w1"
- 6, 6, "t.l1.mountains_n0e1s1w0"
- 6, 7, "t.l1.mountains_n0e1s1w1"
- 7, 0, "t.l1.mountains_n1e0s0w0"
- 7, 1, "t.l1.mountains_n1e0s0w1"
- 7, 2, "t.l1.mountains_n1e0s1w0"
- 7, 3, "t.l1.mountains_n1e0s1w1"
- 7, 4, "t.l1.mountains_n1e1s0w0"
- 7, 5, "t.l1.mountains_n1e1s0w1"
- 7, 6, "t.l1.mountains_n1e1s1w0"
- 7, 7, "t.l1.mountains_n1e1s1w1"
+ 6, 0, "t.l2.mountains_n0e0s0w0"
+ 6, 1, "t.l2.mountains_n0e0s0w1"
+ 6, 2, "t.l2.mountains_n0e0s1w0"
+ 6, 3, "t.l2.mountains_n0e0s1w1"
+ 6, 4, "t.l2.mountains_n0e1s0w0"
+ 6, 5, "t.l2.mountains_n0e1s0w1"
+ 6, 6, "t.l2.mountains_n0e1s1w0"
+ 6, 7, "t.l2.mountains_n0e1s1w1"
+ 7, 0, "t.l2.mountains_n1e0s0w0"
+ 7, 1, "t.l2.mountains_n1e0s0w1"
+ 7, 2, "t.l2.mountains_n1e0s1w0"
+ 7, 3, "t.l2.mountains_n1e0s1w1"
+ 7, 4, "t.l2.mountains_n1e1s0w0"
+ 7, 5, "t.l2.mountains_n1e1s0w1"
+ 7, 6, "t.l2.mountains_n1e1s1w0"
+ 7, 7, "t.l2.mountains_n1e1s1w1"
;hills as overlay
- 8, 0, "t.l1.hills_n0e0s0w0"
- 8, 1, "t.l1.hills_n0e0s0w1"
- 8, 2, "t.l1.hills_n0e0s1w0"
- 8, 3, "t.l1.hills_n0e0s1w1"
- 8, 4, "t.l1.hills_n0e1s0w0"
- 8, 5, "t.l1.hills_n0e1s0w1"
- 8, 6, "t.l1.hills_n0e1s1w0"
- 8, 7, "t.l1.hills_n0e1s1w1"
- 9, 0, "t.l1.hills_n1e0s0w0"
- 9, 1, "t.l1.hills_n1e0s0w1"
- 9, 2, "t.l1.hills_n1e0s1w0"
- 9, 3, "t.l1.hills_n1e0s1w1"
- 9, 4, "t.l1.hills_n1e1s0w0"
- 9, 5, "t.l1.hills_n1e1s0w1"
- 9, 6, "t.l1.hills_n1e1s1w0"
- 9, 7, "t.l1.hills_n1e1s1w1"
+ 8, 0, "t.l2.hills_n0e0s0w0"
+ 8, 1, "t.l2.hills_n0e0s0w1"
+ 8, 2, "t.l2.hills_n0e0s1w0"
+ 8, 3, "t.l2.hills_n0e0s1w1"
+ 8, 4, "t.l2.hills_n0e1s0w0"
+ 8, 5, "t.l2.hills_n0e1s0w1"
+ 8, 6, "t.l2.hills_n0e1s1w0"
+ 8, 7, "t.l2.hills_n0e1s1w1"
+ 9, 0, "t.l2.hills_n1e0s0w0"
+ 9, 1, "t.l2.hills_n1e0s0w1"
+ 9, 2, "t.l2.hills_n1e0s1w0"
+ 9, 3, "t.l2.hills_n1e0s1w1"
+ 9, 4, "t.l2.hills_n1e1s0w0"
+ 9, 5, "t.l2.hills_n1e1s0w1"
+ 9, 6, "t.l2.hills_n1e1s1w0"
+ 9, 7, "t.l2.hills_n1e1s1w1"
;river outlets
@@ -144,76 +144,113 @@
tiles = { "row", "column","tag"
; ocean cell sprites. See doc/README.graphics
- 0, 0, "t.l0.ocean_cell_u000"
- 0, 2, "t.l0.ocean_cell_u100"
- 0, 4, "t.l0.ocean_cell_u010"
- 0, 6, "t.l0.ocean_cell_u110"
- 0, 8, "t.l0.ocean_cell_u001"
- 0, 10, "t.l0.ocean_cell_u101"
- 0, 12, "t.l0.ocean_cell_u011"
- 0, 14, "t.l0.ocean_cell_u111"
-
- 1, 0, "t.l0.ocean_cell_d000"
- 1, 2, "t.l0.ocean_cell_d100"
- 1, 4, "t.l0.ocean_cell_d010"
- 1, 6, "t.l0.ocean_cell_d110"
- 1, 8, "t.l0.ocean_cell_d001"
- 1, 10, "t.l0.ocean_cell_d101"
- 1, 12, "t.l0.ocean_cell_d011"
- 1, 14, "t.l0.ocean_cell_d111"
+; 0, 0, "t.l0.ocean_cell_u000"
+; 0, 2, "t.l0.ocean_cell_u100"
+; 0, 4, "t.l0.ocean_cell_u010"
+; 0, 6, "t.l0.ocean_cell_u110"
+; 0, 8, "t.l0.ocean_cell_u001"
+; 0, 10, "t.l0.ocean_cell_u101"
+; 0, 12, "t.l0.ocean_cell_u011"
+; 0, 14, "t.l0.ocean_cell_u111"
- 2, 0, "t.l0.ocean_cell_l000"
- 2, 2, "t.l0.ocean_cell_l100"
- 2, 4, "t.l0.ocean_cell_l010"
- 2, 6, "t.l0.ocean_cell_l110"
- 2, 8, "t.l0.ocean_cell_l001"
- 2, 10, "t.l0.ocean_cell_l101"
- 2, 12, "t.l0.ocean_cell_l011"
- 2, 14, "t.l0.ocean_cell_l111"
+; 1, 0, "t.l0.ocean_cell_d000"
+; 1, 2, "t.l0.ocean_cell_d100"
+; 1, 4, "t.l0.ocean_cell_d010"
+; 1, 6, "t.l0.ocean_cell_d110"
+; 1, 8, "t.l0.ocean_cell_d001"
+; 1, 10, "t.l0.ocean_cell_d101"
+; 1, 12, "t.l0.ocean_cell_d011"
+; 1, 14, "t.l0.ocean_cell_d111"
- 2, 1, "t.l0.ocean_cell_r000"
- 2, 3, "t.l0.ocean_cell_r100"
- 2, 5, "t.l0.ocean_cell_r010"
- 2, 7, "t.l0.ocean_cell_r110"
- 2, 9, "t.l0.ocean_cell_r001"
- 2, 11, "t.l0.ocean_cell_r101"
- 2, 13, "t.l0.ocean_cell_r011"
- 2, 15, "t.l0.ocean_cell_r111"
+; 2, 0, "t.l0.ocean_cell_l000"
+; 2, 2, "t.l0.ocean_cell_l100"
+; 2, 4, "t.l0.ocean_cell_l010"
+; 2, 6, "t.l0.ocean_cell_l110"
+; 2, 8, "t.l0.ocean_cell_l001"
+; 2, 10, "t.l0.ocean_cell_l101"
+; 2, 12, "t.l0.ocean_cell_l011"
+; 2, 14, "t.l0.ocean_cell_l111"
+; 2, 1, "t.l0.ocean_cell_r000"
+; 2, 3, "t.l0.ocean_cell_r100"
+; 2, 5, "t.l0.ocean_cell_r010"
+; 2, 7, "t.l0.ocean_cell_r110"
+; 2, 9, "t.l0.ocean_cell_r001"
+; 2, 11, "t.l0.ocean_cell_r101"
+; 2, 13, "t.l0.ocean_cell_r011"
+; 2, 15, "t.l0.ocean_cell_r111"
+
+; deep ocean coasts.
+; 0, 1, "t.l0.deep_cell_u000"
+; 6, 2, "t.l0.deep_cell_u100"
+; 6, 4, "t.l0.deep_cell_u010"
+; 6, 6, "t.l0.deep_cell_u110"
+; 6, 8, "t.l0.deep_cell_u001"
+; 6, 10, "t.l0.deep_cell_u101"
+; 6, 12, "t.l0.deep_cell_u011"
+; 6, 14, "t.l0.deep_cell_u111"
+
+; 0, 1, "t.l0.deep_cell_d000"
+; 7, 2, "t.l0.deep_cell_d100"
+ ;7, 4, "t.l0.deep_cell_d010"
+; 7, 6, "t.l0.deep_cell_d110"
+; 7, 8, "t.l0.deep_cell_d001"
+; 7, 10, "t.l0.deep_cell_d101"
+; 7, 12, "t.l0.deep_cell_d011"
+; 7, 14, "t.l0.deep_cell_d111"
+
+; 0, 1, "t.l0.deep_cell_l000"
+ ;8, 2, "t.l0.deep_cell_l100"
+; 8, 4, "t.l0.deep_cell_l010"
+; 8, 6, "t.l0.deep_cell_l110"
+; 8, 8, "t.l0.deep_cell_l001"
+; 8, 10, "t.l0.deep_cell_l101"
+; 8, 12, "t.l0.deep_cell_l011"
+; 8, 14, "t.l0.deep_cell_l111"
+
+; 0, 1, "t.l0.deep_cell_r000"
+; 8, 3, "t.l0.deep_cell_r100"
+; 8, 5, "t.l0.deep_cell_r010"
+; 8, 7, "t.l0.deep_cell_r110"
+; 8, 9, "t.l0.deep_cell_r001"
+; 8, 11, "t.l0.deep_cell_r101"
+; 8, 13, "t.l0.deep_cell_r011"
+; 8, 15, "t.l0.deep_cell_r111"
+
; Deep Ocean sprites.
- 3, 0, "t.l0.deep_cell_u000"
- 3, 2, "t.l0.deep_cell_u100"
- 3, 4, "t.l0.deep_cell_u010"
- 3, 6, "t.l0.deep_cell_u110"
- 3, 8, "t.l0.deep_cell_u001"
- 3, 10, "t.l0.deep_cell_u101"
- 3, 12, "t.l0.deep_cell_u011"
- 3, 14, "t.l0.deep_cell_u111"
-
- 4, 0, "t.l0.deep_cell_d000"
- 4, 2, "t.l0.deep_cell_d100"
- 4, 4, "t.l0.deep_cell_d010"
- 4, 6, "t.l0.deep_cell_d110"
- 4, 8, "t.l0.deep_cell_d001"
- 4, 10, "t.l0.deep_cell_d101"
- 4, 12, "t.l0.deep_cell_d011"
- 4, 14, "t.l0.deep_cell_d111"
+; 3, 0, "t.l1.deep_cell_u000"
+; 3, 2, "t.l1.deep_cell_u100"
+; 3, 4, "t.l1.deep_cell_u010"
+; 3, 6, "t.l1.deep_cell_u110"
+; 3, 8, "t.l1.deep_cell_u001"
+; 3, 10, "t.l1.deep_cell_u101"
+; 3, 12, "t.l1.deep_cell_u011"
+; 3, 14, "t.l1.deep_cell_u111"
- 5, 0, "t.l0.deep_cell_l000"
- 5, 2, "t.l0.deep_cell_l100"
- 5, 4, "t.l0.deep_cell_l010"
- 5, 6, "t.l0.deep_cell_l110"
- 5, 8, "t.l0.deep_cell_l001"
- 5, 10, "t.l0.deep_cell_l101"
- 5, 12, "t.l0.deep_cell_l011"
- 5, 14, "t.l0.deep_cell_l111"
+; 4, 0, "t.l1.deep_cell_d000"
+; 4, 2, "t.l1.deep_cell_d100"
+; 4, 4, "t.l1.deep_cell_d010"
+; 4, 6, "t.l1.deep_cell_d110"
+; 4, 8, "t.l1.deep_cell_d001"
+; 4, 10, "t.l1.deep_cell_d101"
+; 4, 12, "t.l1.deep_cell_d011"
+; 4, 14, "t.l1.deep_cell_d111"
- 5, 1, "t.l0.deep_cell_r000"
- 5, 3, "t.l0.deep_cell_r100"
- 5, 5, "t.l0.deep_cell_r010"
- 5, 7, "t.l0.deep_cell_r110"
- 5, 9, "t.l0.deep_cell_r001"
- 5, 11, "t.l0.deep_cell_r101"
- 5, 13, "t.l0.deep_cell_r011"
- 5, 15, "t.l0.deep_cell_r111"
+; 5, 0, "t.l1.deep_cell_l000"
+; 5, 2, "t.l1.deep_cell_l100"
+; 5, 4, "t.l1.deep_cell_l010"
+; 5, 6, "t.l1.deep_cell_l110"
+; 5, 8, "t.l1.deep_cell_l001"
+; 5, 10, "t.l1.deep_cell_l101"
+; 5, 12, "t.l1.deep_cell_l011"
+; 5, 14, "t.l1.deep_cell_l111"
+
+; 5, 1, "t.l1.deep_cell_r000"
+; 5, 3, "t.l1.deep_cell_r100"
+; 5, 5, "t.l1.deep_cell_r010"
+; 5, 7, "t.l1.deep_cell_r110"
+; 5, 9, "t.l1.deep_cell_r001"
+; 5, 11, "t.l1.deep_cell_r101"
+; 5, 13, "t.l1.deep_cell_r011"
+; 5, 15, "t.l1.deep_cell_r111"
}
Index: data/amplio/terrain1.spec
===================================================================
--- data/amplio/terrain1.spec (revision 12674)
+++ data/amplio/terrain1.spec (working copy)
@@ -27,27 +27,27 @@
tiles = { "row", "column","tag"
; terrain
- 0, 0, "t.l0.desert1"
+ 0, 0, "t.l1.desert1"
- 1, 0, "t.l0.plains1"
+ 1, 0, "t.l1.plains1"
- 2, 0, "t.l0.grassland1"
+ 2, 0, "t.l1.grassland1"
2, 0, "t.l0.t_river1"
- 3, 0, "t.l0.forest1"
+ 3, 0, "t.l1.forest1"
- 4, 0, "t.l0.hills1"
+ 4, 0, "t.l1.hills1"
- 5, 0, "t.l0.mountains1"
+ 5, 0, "t.l1.mountains1"
- 6, 0, "t.l0.tundra1"
+ 6, 0, "t.l1.tundra1"
- 7, 0, "t.l0.arctic1"
+ 7, 0, "t.l1.arctic1"
- 8, 0, "t.l0.swamp1"
+ 8, 0, "t.l1.swamp1"
- 9, 0, "t.l0.jungle1"
+ 9, 0, "t.l1.jungle1"
; Terrain special resources:
@@ -122,8 +122,8 @@
15, 0, "tx.darkness"
15, 2, "mask.tile"
15, 2, "t.unknown1"
- 15, 3, "t.l0.ocean1"
- 15, 3, "t.l0.deep1"
+ 15, 3, "t.l1.ocean1"
+ 15, 3, "t.l1.deep1"
15, 4, "user.attention"
15, 5, "tx.fog"
}
Index: data/amplio.tilespec
===================================================================
--- data/amplio.tilespec (revision 12674)
+++ data/amplio.tilespec (working copy)
@@ -40,6 +40,8 @@
unit_offset_x = 19
unit_offset_y = 18
+blend_layer = 1
+
;Enable citybar
is_full_citybar = 1
; offset the citybar text by this amount (from the city tile origin)
@@ -61,6 +63,7 @@
files =
"amplio/terrain1.spec",
"amplio/terrain2.spec",
+ "amplio/ocean.spec",
"amplio/tiles.spec",
"amplio/fog.spec",
"misc/small.spec",
@@ -91,101 +94,115 @@
; Terrain info - see README.graphics
[layer0]
-match_style = "BOOL"
-match_types = "ocean", "land"
+match_style = "FULL"
+match_types = "c", "o", "d"
[layer1]
+match_style = "NONE"
+
+[layer2]
match_style = "BOOL"
match_types = "forest", "hills", "mountains", "deep"
[terrain_arctic]
is_blended = 1
-num_layers = 1
-layer0_match_type = "land"
+num_layers = 2
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
mine_sprite = "tx.oil_mine"
[terrain_desert]
is_blended = 1
-num_layers = 1
-layer0_match_type = "land"
+num_layers = 2
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
mine_sprite = "tx.oil_mine"
[terrain_forest]
is_blended = 1
-num_layers = 2
-layer0_match_type = "land"
-layer1_match_type = "forest"
-layer1_match_style = "bool"
+num_layers = 3
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
+layer2_match_type = "forest"
+layer2_match_style = "bool"
[terrain_grassland]
is_blended = 1
-num_layers = 1
-layer0_match_type = "land"
+num_layers = 2
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
[terrain_hills]
is_blended = 1
-num_layers = 2
-layer0_match_type = "land"
-layer1_match_type = "hills"
-layer1_match_style = "bool"
+num_layers = 3
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
+layer2_match_type = "hills"
+layer2_match_style = "bool"
mine_sprite = "tx.mine"
[terrain_jungle]
is_blended = 1
-num_layers = 1
-layer0_match_type = "land"
+num_layers = 2
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
[terrain_mountains]
is_blended = 1
-num_layers = 2
-layer0_match_type = "land"
-layer1_match_type = "mountains"
-layer1_match_style = "bool"
+num_layers = 3
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
+layer2_match_type = "mountains"
+layer2_match_style = "bool"
mine_sprite = "tx.mine"
[terrain_ocean]
-is_blended = 1
+is_blended = 0
num_layers = 1
-layer0_match_style = "bool"
-layer0_match_type = "ocean"
+layer0_match_style = "full"
+layer0_match_type = "o"
layer0_cell_type = "rect"
-; Deep Ocean is currently quite a hack:
-; - Blending is disabled so there will be no blending
-; between Ocean and Deep Ocean. Ocean blending tile
-; is of land colour and we don't want that to appear
-; in the middle of the ocean.
-; - Deep Ocean is in two layers. Layer0 is setup just
-; for match_type = "ocean". Ocean will match this
-; and will not draw coast sprites between Ocean and
-; Deep Ocean. Layer1 is for actual Deep Ocean drawing.
-; Ocean will not match this, so Deep Ocean to Ocean
-; sprites will be drawn.
-;
-; Problems:
-; - There is no blending between Deep Ocean and land tiles
-; - There is no coast drawn beteen Deep Ocean and land tiles
[terrain_deep]
is_blended = 0
-num_layers = 2
-layer0_match_style = "bool"
-layer0_match_type = "ocean"
+num_layers = 1
+layer0_match_style = "full"
+layer0_match_type = "d"
layer0_cell_type = "rect"
-layer1_match_style = "bool"
-layer1_match_type = "deep"
-layer1_cell_type = "rect"
[terrain_plains]
is_blended = 1
-num_layers = 1
-layer0_match_type = "land"
+num_layers = 2
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
[terrain_swamp]
is_blended = 1
-num_layers = 1
-layer0_match_type = "land"
+num_layers = 2
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
[terrain_tundra]
is_blended = 1
-num_layers = 1
-layer0_match_type = "land"
+num_layers = 2
+layer0_match_style = "full"
+layer0_match_type = "c"
+layer0_cell_type = "rect"
+layer1_match_style = "none"
Index: data/default/effects.ruleset
===================================================================
--- data/default/effects.ruleset (revision 12674)
+++ data/default/effects.ruleset (working copy)
@@ -886,6 +886,15 @@
"UnitClass", "Sea", "Local"
}
+[effect_coastal_defense_trireme]
+name = "Defend_Bonus"
+value = 100
+reqs =
+ { "type", "name", "range"
+ "Building", "Coastal Defense", "City"
+ "UnitClass", "Trireme", "Local"
+ }
+
[effect_colosseum]
name = "Make_Content"
value = 3
@@ -1248,6 +1257,24 @@
"UnitClass", "Sea", "Local"
}
+[effect_port_facility_trireme]
+name = "Veteran_Build"
+value = 1
+reqs =
+ { "type", "name", "range"
+ "Building", "Port Facility", "City"
+ "UnitClass", "Trireme", "Local"
+ }
+
+[effect_port_facility_trireme_1]
+name = "HP_Regen"
+value = 100
+reqs =
+ { "type", "name", "range"
+ "Building", "Port Facility", "City"
+ "UnitClass", "Trireme", "Local"
+ }
+
[effect_power_plant]
name = "Output_Bonus"
value = 25
@@ -1673,6 +1700,24 @@
"UnitClass", "Sea", "Local"
}
+[effect_lighthouse_trireme_move]
+name = "Move_Bonus"
+value = 1
+reqs =
+ { "type", "name", "range"
+ "Building", "Lighthouse", "Player"
+ "UnitClass", "Trireme", "Local"
+ }
+
+[effect_lighthouse_trireme_veteran]
+name = "Veteran_Build"
+value = 1
+reqs =
+ { "type", "name", "range"
+ "Building", "Lighthouse", "Player"
+ "UnitClass", "Trireme", "Local"
+ }
+
[effect_magellans_expedition]
name = "Move_Bonus"
value = 2
@@ -1682,6 +1727,15 @@
"UnitClass", "Sea", "Local"
}
+[effect_magellan_trireme]
+name = "Move_Bonus"
+value = 2
+reqs =
+ { "type", "name", "range"
+ "Building", "Magellan's Expedition", "Player"
+ "UnitClass", "Trireme", "Local"
+ }
+
[effect_manhattan_project]
name = "Enable_Nuke"
value = 1
Index: data/default/units.ruleset
===================================================================
--- data/default/units.ruleset (revision 12674)
+++ data/default/units.ruleset (working copy)
@@ -95,6 +95,13 @@
hp_loss_pct = 0
flags = "TerrainSpeed", "DamageSlows"
+[unitclass_trireme]
+name = _("Trireme")
+move_type = "Sea"
+min_speed = 2
+hp_loss_pct = 0
+flags = "TerrainSpeed", "DamageSlows"
+
[unitclass_heli]
name = _("Helicopter")
move_type = "Both"
@@ -1182,7 +1189,7 @@
[unit_trireme]
name = _("Trireme")
-class = "Sea"
+class = "Trireme"
tech_req = "Map Making"
obsolete_by = "Caravel"
graphic = "u.trireme"
@@ -1206,7 +1213,7 @@
uk_food = 0
uk_gold = 0
cargo = "Land"
-flags = "Trireme", "BadCityDefender"
+flags = "BadCityDefender"
roles = "Ferryboat"
[unit_caravel]
Index: data/default/terrain.ruleset
===================================================================
--- data/default/terrain.ruleset (revision 12674)
+++ data/default/terrain.ruleset (working copy)
@@ -216,6 +216,45 @@
work with.\
")
+[terrain_deep_ocean]
+name = _("Deep Ocean")
+graphic = "deep"
+graphic_alt = "ocean"
+identifier = " "
+movement_cost = 1
+defense_bonus = 0
+food = 1
+shield = 0
+trade = 2
+resources = "Fish", "Whales"
+road_trade_incr = 0
+road_time = 0
+irrigation_result = "no"
+irrigation_food_incr = 0
+irrigation_time = 0
+mining_result = "no"
+mining_shield_incr = 0
+mining_time = 0
+transform_result = "Ocean"
+transform_time = 36
+rail_time = 3
+airbase_time = 3
+fortress_time = 3
+clean_pollution_time = 3
+clean_fallout_time = 3
+warmer_wetter_result = "no"
+warmer_drier_result = "no"
+cooler_wetter_result = "no"
+cooler_drier_result = "no"
+native_to = "Sea", "Air", "Missile", "Helicopter"
+flags = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+property_ocean_depth = 80
+helptext = _("\
+Oceans cover much of the world, and only sea units can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
+
[terrain_desert]
name = _("Desert")
graphic = "desert"
@@ -453,7 +492,7 @@
name = _("Ocean")
graphic = "ocean"
graphic_alt = "-"
-identifier = " "
+identifier = "_"
movement_cost = 1
defense_bonus = 0
food = 1
@@ -479,9 +518,9 @@
warmer_drier_result = "no"
cooler_wetter_result = "no"
cooler_drier_result = "no"
-native_to = "Sea", "Air", "Missile", "Helicopter"
+native_to = "Sea", "Trireme", "Air", "Missile", "Helicopter"
flags = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
-property_ocean_depth = 10
+property_ocean_depth = 30
helptext = _("\
Oceans cover much of the world, and only sea units (Triremes and\
other boats) can travel on them.\
Index: data/isotrident.tilespec
===================================================================
--- data/isotrident.tilespec (revision 12674)
+++ data/isotrident.tilespec (working copy)
@@ -149,6 +149,7 @@
[terrain_deep]
is_blended = 0
+is_reversed = 1
num_layers = 1
layer0_match_style = "bool"
layer0_match_type = "ocean"
Index: common/unittype.c
===================================================================
--- common/unittype.c (revision 12674)
+++ common/unittype.c (working copy)
@@ -48,7 +48,7 @@
"TradeRoute" ,"HelpWonder", "IgZOC", "NonMil", "IgTer",
"OneAttack", "Pikemen", "Horse", "IgWall", "FieldUnit",
"AEGIS", "AttackAny", "Marines", "Partial_Invis", "Settlers", "Diplomat",
- "Trireme", "Nuclear", "Spy", "Transform", "Paratroopers",
+ "Nuclear", "Spy", "Transform", "Paratroopers",
"Airbase", "Cities", "No_Land_Attack",
"AddToCity", "Fanatic", "GameLoss", "Unique", "Unbribable",
"Undisbandable", "SuperSpy", "NoHome", "NoVeteran", "Bombarder",
Index: common/unit.h
===================================================================
--- common/unit.h (revision 12674)
+++ common/unit.h (working copy)
@@ -73,7 +73,7 @@
MR_BAD_ACTIVITY, MR_BAD_DESTINATION, MR_BAD_MAP_POSITION,
MR_DESTINATION_OCCUPIED_BY_NON_ALLIED_UNIT,
MR_NO_TRANSPORTER_CAPACITY,
- MR_DESTINATION_OCCUPIED_BY_NON_ALLIED_CITY, MR_TRIREME
+ MR_DESTINATION_OCCUPIED_BY_NON_ALLIED_CITY
};
enum add_build_city_result {
Index: common/unittype.h
===================================================================
--- common/unittype.h (revision 12674)
+++ common/unittype.h (working copy)
@@ -75,7 +75,6 @@
F_PARTIAL_INVIS, /* Invisibile except when adjacent (Submarine) */
F_SETTLERS, /* Does not include ability to found cities */
F_DIPLOMAT,
- F_TRIREME, /* Trireme sinking effect */
F_NUCLEAR, /* Nuclear attack effect */
F_SPY, /* Enhanced spy abilities */
F_TRANSFORM, /* Can transform terrain types (Engineers) */
Index: common/aicore/pf_tools.c
===================================================================
--- common/aicore/pf_tools.c (revision 12674)
+++ common/aicore/pf_tools.c (working copy)
@@ -38,11 +38,7 @@
const struct tile *src_tile,
const struct tile *dest_tile)
{
- if (!dest_tile->city
- && BV_ISSET(param->unit_flags, F_TRIREME)
- && !is_safe_ocean(dest_tile)) {
- return PF_IMPOSSIBLE_MC;
- } else if (unit_class_flag(param->class, UCF_TERRAIN_SPEED)) {
+ if (unit_class_flag(param->class, UCF_TERRAIN_SPEED)) {
return map_move_cost(src_tile, dest_tile);
} else {
return SINGLE_MOVE;
Index: common/movement.c
===================================================================
--- common/movement.c (revision 12674)
+++ common/movement.c (working copy)
@@ -169,11 +169,6 @@
return TRUE;
}
- /* A trireme unit cannot exist in an ocean tile without access to land. */
- if (unit_flag(punit, F_TRIREME) && !is_safe_ocean(ptile)) {
- return FALSE;
- }
-
return is_native_tile(punit->type, ptile);
}
@@ -379,7 +374,6 @@
6) There are no peaceful but un-allied units on the target tile.
7) There is not a peaceful but un-allied city on the target tile.
8) There is no non-allied unit blocking (zoc) [or igzoc is true].
- 9) Triremes cannot move out of sight from land.
**************************************************************************/
enum unit_move_result test_unit_move_to_tile(const struct unit_type *punittype,
const struct player *unit_owner,
@@ -458,11 +452,6 @@
return MR_ZOC;
}
- /* 9) */
- if (unit_type_flag(punittype, F_TRIREME) && !is_safe_ocean(dst_tile)) {
- return MR_TRIREME;
- }
-
return MR_OK;
}
Index: common/packets_gen.c
===================================================================
--- common/packets_gen.c (revision 12674)
+++ common/packets_gen.c (working copy)
@@ -22503,7 +22503,7 @@
if(!differ) {
int i;
for (i = 0; i < MAX_VET_LEVELS; i++) {
- if (old->work_veteran_chance[i] != real_packet->work_veteran_chance[i]) {
+ if (old->veteran_chance[i] != real_packet->veteran_chance[i]) {
differ = TRUE;
break;
}
Index: common/map.c
===================================================================
--- common/map.c (revision 12674)
+++ common/map.c (working copy)
@@ -548,20 +548,6 @@
return count_terrain_flag_near_tile(ptile, TRUE, FALSE, TER_OCEANIC) > 0;
}
-/****************************************************************************
- Return TRUE if this ocean terrain is adjacent to a safe coastline.
-****************************************************************************/
-bool is_safe_ocean(const struct tile *ptile)
-{
- adjc_iterate(ptile, adjc_tile) {
- if (adjc_tile->terrain != T_UNKNOWN
- && !terrain_has_flag(adjc_tile->terrain, TER_UNSAFE_COAST)) {
- return TRUE;
- }
- } adjc_iterate_end;
- return FALSE;
-}
-
/***************************************************************
...
***************************************************************/
Index: common/map.h
===================================================================
--- common/map.h (revision 12674)
+++ common/map.h (working copy)
@@ -246,7 +246,6 @@
int map_move_cost_unit(struct unit *punit, const struct tile *ptile);
int map_move_cost_ai(const struct tile *tile0, const struct tile *tile1);
int map_move_cost(const struct tile *src_tile, const struct tile *dst_tile);
-bool is_safe_ocean(const struct tile *ptile);
bool is_cardinally_adj_to_ocean(const struct tile *ptile);
bv_special get_tile_infrastructure_set(const struct tile *ptile,
int *count);
Index: ai/aitools.c
===================================================================
--- ai/aitools.c (revision 12674)
+++ ai/aitools.c (working copy)
@@ -544,10 +544,6 @@
const double p_killed = chance_killed_at(ptile, risk_cost, param);
double danger = value * p_killed;
- if (is_ocean(ptile->terrain) && !is_safe_ocean(ptile)) {
- danger += risk_cost->ocean_cost;
- }
-
/* Adjust for the fact that we might not stop at this tile,
* and for our fearfulness */
risk += danger * risk_cost->fearfulness;
Index: ai/aitools.h
===================================================================
--- ai/aitools.h (revision 12674)
+++ ai/aitools.h (working copy)
@@ -47,7 +47,6 @@
{
double base_value;
double fearfulness;
- double ocean_cost;
double unsafe_terrain_cost;
double enemy_zoc_cost;
};
Index: ai/aicity.c
===================================================================
--- ai/aicity.c (revision 12674)
+++ ai/aicity.c (working copy)
@@ -1410,13 +1410,8 @@
}
if (punittype) {
int cost = unit_upgrade_price(pplayer, punit->type, punittype);
- int real_limit = limit;
- /* Triremes are DANGEROUS!! We'll do anything to upgrade 'em. */
- if (unit_flag(punit, F_TRIREME)) {
- real_limit = pplayer->ai.est_upkeep;
- }
- if (pplayer->economic.gold - cost > real_limit) {
+ if (pplayer->economic.gold - cost > limit) {
CITY_LOG(LOG_BUY, pcity, "Upgraded %s to %s for %d (%s)",
unit_type(punit)->name, punittype->name, cost,
military ? "military" : "civilian");
Index: ai/aidata.c
===================================================================
--- ai/aidata.c (revision 12674)
+++ ai/aidata.c (working copy)
@@ -202,9 +202,6 @@
break;
}
- if (unit_flag(punit, F_TRIREME)) {
- ai->stats.units.triremes++;
- }
if (unit_class_flag(get_unit_class(unit_type(punit)), UCF_MISSILE)) {
ai->stats.units.missiles++;
}
Index: ai/aidata.h
===================================================================
--- ai/aidata.h (revision 12674)
+++ ai/aidata.h (working copy)
@@ -110,7 +110,7 @@
/* Counts of specific types of units. */
struct {
/* Unit-flag counts. */
- int triremes, missiles;
+ int missiles;
/* Move-type counts (air includes helicoptor here). */
int land, sea, air;
Index: ai/aiunit.c
===================================================================
--- ai/aiunit.c (revision 12674)
+++ ai/aiunit.c (working copy)
@@ -1066,11 +1066,6 @@
int boatspeed = boattype->move_rate;
int move_time = (WARMAP_SEACOST(acity->tile)) / boatspeed;
- if (unit_type_flag(boattype, F_TRIREME) && move_time > 2) {
- /* FIXME: Should also check for LIGHTHOUSE */
- /* Return something prohibitive */
- return 999;
- }
if (boat) {
/* Time to get to the boat */
move_time += (WARMAP_COST(boat->tile) + speed - 1) / speed;
Index: client/helpdata.c
===================================================================
--- client/helpdata.c (revision 12674)
+++ client/helpdata.c (working copy)
@@ -1007,11 +1007,6 @@
sprintf(buf + strlen(buf),
_("* May become veteran through training or combat.\n"));
}
- if (unit_type_flag(utype, F_TRIREME)) {
- sprintf(buf + strlen(buf),
- _("* Must end turn in a city or next to land,"
- " or has a 50%% risk of being lost at sea.\n"));
- }
if (utype->fuel > 0) {
char allowed_units[10][64];
int num_allowed_units = 0;
Index: client/tilespec.c
===================================================================
--- client/tilespec.c (revision 12674)
+++ client/tilespec.c (working copy)
@@ -84,7 +84,7 @@
CELL_SINGLE, CELL_RECT
};
-#define MAX_NUM_LAYERS 2
+#define MAX_NUM_LAYERS 3
struct terrain_drawing_data {
char *name;
@@ -372,6 +372,8 @@
int city_flag_offset_x, city_flag_offset_y;
int unit_offset_x, unit_offset_y;
+ int blend_layer;
+
int citybar_offset_y;
#define NUM_CORNER_DIRS 4
@@ -785,11 +787,9 @@
if (draw->mine_tag) {
free(draw->mine_tag);
}
- if (draw->is_blended && t->is_isometric) {
- for (i = 0; i < 4; i++) {
- if (draw->blend[i]) {
- free_sprite(draw->blend[i]);
- }
+ for (i = 0; i < 4; i++) {
+ if (draw->blend[i]) {
+ free_sprite(draw->blend[i]);
}
}
for (i = 0; i < draw->num_layers; i++) {
@@ -1379,6 +1379,8 @@
t->unit_offset_x = secfile_lookup_int(file, "tilespec.unit_offset_x");
t->unit_offset_y = secfile_lookup_int(file, "tilespec.unit_offset_y");
+ t->blend_layer = secfile_lookup_int(file, "tilespec.blend_layer");
+
t->citybar_offset_y
= secfile_lookup_int(file, "tilespec.citybar_offset_y");
@@ -2517,6 +2519,7 @@
_("Don't have graphics tags %s or %s for %s %s"),
tag, alt, what, name);
if (required) {
+ abort();
exit(EXIT_FAILURE);
}
return NULL;
@@ -2762,25 +2765,26 @@
}
}
- if (draw->is_blended && t->is_isometric) {
+ if (t->blend_layer >= 0 && t->blend_layer < MAX_NUM_LAYERS) {
/* Set up blending sprites. This only works in iso-view! */
const int W = t->normal_tile_width, H = t->normal_tile_height;
const int offsets[4][2] = {
{W / 2, 0}, {0, H / 2}, {W / 2, H / 2}, {0, 0}
};
enum direction4 dir;
+ const int l = t->blend_layer;
- if (draw->layer[0].base.size < 1) {
- my_snprintf(buffer1, sizeof(buffer1), "t.l0.%s1", draw->name);
- sprite_vector_reserve(&draw->layer[0].base, 1);
- draw->layer[0].base.p[0]
+ if (draw->layer[l].base.size < 1) {
+ my_snprintf(buffer1, sizeof(buffer1), "t.l%d.%s1", l, draw->name);
+ sprite_vector_reserve(&draw->layer[l].base, 1);
+ draw->layer[l].base.p[0]
= lookup_sprite_tag_alt(t, buffer1, "", TRUE, "tile_type",
pterrain->name);
}
for (dir = 0; dir < 4; dir++) {
- assert(sprite_vector_size(&draw->layer[0].base) > 0);
- draw->blend[dir] = crop_sprite(draw->layer[0].base.p[0],
+ assert(sprite_vector_size(&draw->layer[l].base) > 0);
+ draw->blend[dir] = crop_sprite(draw->layer[l].base.p[0],
offsets[dir][0], offsets[dir][1],
W / 2, H / 2,
t->sprites.dither_tile, 0, 0);
@@ -3459,33 +3463,31 @@
{
struct drawn_sprite *saved_sprs = sprs;
struct terrain *pterrain = tile_get_terrain(ptile);
+ enum direction4 dir;
+ const int W = t->normal_tile_width, H = t->normal_tile_height;
+ const int offsets[4][2] = {
+ {W/2, 0}, {0, H / 2}, {W / 2, H / 2}, {0, 0}
+ };
- if (t->is_isometric && t->sprites.terrain[pterrain->index]->is_blended) {
- enum direction4 dir;
- const int W = t->normal_tile_width, H = t->normal_tile_height;
- const int offsets[4][2] = {
- {W/2, 0}, {0, H / 2}, {W / 2, H / 2}, {0, 0}
- };
+ /*
+ * We want to mark unknown tiles so that an unreal tile will be
+ * given the same marking as our current tile - that way we won't
+ * get the "unknown" dither along the edge of the map.
+ */
+ for (dir = 0; dir < 4; dir++) {
+ struct tile *tile1 = mapstep(ptile, DIR4_TO_DIR8[dir]);
+ struct terrain *other = tterrain_near[DIR4_TO_DIR8[dir]];
- /*
- * We want to mark unknown tiles so that an unreal tile will be
- * given the same marking as our current tile - that way we won't
- * get the "unknown" dither along the edge of the map.
- */
- for (dir = 0; dir < 4; dir++) {
- struct tile *tile1 = mapstep(ptile, DIR4_TO_DIR8[dir]);
- struct terrain *other = tterrain_near[DIR4_TO_DIR8[dir]];
+ if (!tile1
+ || client_tile_get_known(tile1) == TILE_UNKNOWN
+ || other == pterrain
+ || !(t->sprites.terrain[pterrain->index]->is_blended
+ || t->sprites.terrain[other->index]->is_blended)) {
+ continue;
+ }
- if (!tile1
- || client_tile_get_known(tile1) == TILE_UNKNOWN
- || other == pterrain
- || !t->sprites.terrain[other->index]->is_blended) {
- continue;
- }
-
- ADD_SPRITE(t->sprites.terrain[other->index]->blend[dir], TRUE,
- offsets[dir][0], offsets[dir][1]);
- }
+ ADD_SPRITE(t->sprites.terrain[other->index]->blend[dir], TRUE,
+ offsets[dir][0], offsets[dir][1]);
}
return sprs - saved_sprs;
@@ -3578,10 +3580,7 @@
}
}
- if (l >= draw->num_layers) {
- return 0;
- }
-
+ if (l < draw->num_layers) {
if (draw->layer[l].match_style == MATCH_NONE) {
int count = sprite_vector_size(&draw->layer[l].base);
@@ -3684,9 +3683,10 @@
}
#undef MATCH
}
+ }
/* Add blending on top of the first layer. */
- if (l == 0 && draw->is_blended) {
+ if (l == t->blend_layer) {
sprs += fill_blending_sprite_array(t, sprs, ptile, tterrain_near);
}
@@ -4008,12 +4008,15 @@
case LAYER_TERRAIN1:
case LAYER_TERRAIN2:
+ case LAYER_TERRAIN3:
/* Terrain and specials. These are drawn in multiple layers so that
* upper layers will cover layers underneath. */
if (ptile && !solid_bg && client_tile_get_known(ptile) != TILE_UNKNOWN) {
- assert(MAX_NUM_LAYERS == 2);
- sprs += fill_terrain_sprite_array(t, sprs,
- (layer == LAYER_TERRAIN1) ? 0 : 1,
+ int l = (layer == LAYER_TERRAIN1)
+ ? 0 : ((layer == LAYER_TERRAIN2) ? 1 : 2);
+
+ assert(MAX_NUM_LAYERS == 3);
+ sprs += fill_terrain_sprite_array(t, sprs, l,
ptile, tterrain_near);
}
break;
Index: client/tilespec.h
===================================================================
--- client/tilespec.h (revision 12674)
+++ client/tilespec.h (working copy)
@@ -69,6 +69,7 @@
LAYER_BACKGROUND,
LAYER_TERRAIN1,
LAYER_TERRAIN2,
+ LAYER_TERRAIN3,
LAYER_WATER,
LAYER_ROADS,
LAYER_SPECIAL1,
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev