: I have seen the formulae for special tiles somewhere in downloaded (C++?) code , but can't find it back. Does someone know where they are(or give the formulae)?
--> You can found it in protocol.pas source file.
function SpecialTile(Loc,TerrType,lx: integer): integer;
var
x,y,qx,qy,a: integer;
begin
if TerrType=fOcean then result:=0
else
begin
y:=Loc div lx;
x:=Loc-y*lx;
if TerrType=fGrass then {formula for productive grassland}
if Odd((lymax+x-y shr 1) shr 1+x+(y+1) shr 1) then result:=1
else result:=0
else {formula for special resources}
begin
a:=4*x-y+9980;
qx:=a div 10;
if (qx*10=a) and (qx and 3<>0) then
begin
qy:=(y+x) div 5;
if qy and 3<>qx shr 2 and 1 *2 then
if TerrType=fArctic then result:=1
else if TerrType=fShore then
begin
if (qx+qy) and 1=0 then
if qx and 3=2 then result:=2
else result:=1
else result:=0
end
else result:=(qx+qy) and 1+1
else result:=0;
end
else result:=0;
end
end;
end;
Posted 19-Apr-06 15:16 by Pablo
