1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
{***********************************************************
Project: C-evo External Map Generator
Copyright: 1999-2024 P Blackman
License: GPLv3+
Routine to report resources of given tile,
and its suitability for use as deadlands
***********************************************************}
procedure tMap.TileResource (const W,H : Integer;
out F,P,Tr : Integer;
out PosDeadLands : Boolean);
var T : tTerrain;
begin
F := 0;
P := 0;
T := GetTerrain (W,H);
Tr := 0; {Trade}
case T of
Coast:
begin
F := 1;
P := 0;
Tr := 3;
end;
Grass:
begin
F := 4;
P := 0;
Tr := 2;
end;
Desert:
begin
F := 0;
P := 2;
Tr := 2;
end;
Prairie:
begin
F := 2;
P := 1;
Tr := 2;
end;
Tundra:
begin
F := 2;
P := 0;
Tr := 2;
end;
Arctic:
begin
F := 0;
P := 3;
Tr := 0;
end;
Swamp:
begin
F := 1;
P := 0;
Tr := 2;
end;
Forest:
begin
F := 1;
P := 2;
Tr := 2;
end;
Hills:
begin
F := 1;
P := 3;
Tr := 1;
end;
Mountain:
begin
F := 0;
P := 3;
Tr := 1;
end;
otherwise
// Ocean;
end;
{ Bonus resources. Only first type usable in early game }
if (GetBonus (W,H) = EarlyBonus) and (T <> Ocean) then
case T of
Grass:
begin
{ plains }
F := 3;
P := 1;
end;
Coast: F := 5;
Desert: F := 3;
Prairie: F := 4;
Forest: F := 3;
Swamp: P := 4;
Mountain: P := 5;
Tundra: Tr:= 7;
Arctic:
begin
F := 3;
Tr := 4;
end;
Hills : Tr := 4;
end;
{ River Trade }
Tr := Tr + Integer(Tiles[W,H].River);
PosDeadLands := (getBonus (W,H) = Nothing) and (T in [Desert, Arctic, Mountain]) and not Tiles[W,H].River;
end;
|