anchor.diff:  {$I KaM_Remake.inc}
   interface
   uses Classes, SysUtils,
  -  KM_Defaults, KM_Points, KM_Terrain;
  +  KM_Defaults, KM_Points, KM_Terrain, KM_Units;
   
   
   type
  -  TRawDeposit = (rdStone, rdCoal, rdIron, rdGold);
  +  TRawDeposit = (rdStone, rdCoal, rdIron, rdGold, rdFish);
   
     //Scans the map and reports raw resources deposits info
     TKMDeposits = class
  
positive.code:       fArea[R,Y,X] := AreaID;
        Inc(Count);
        //Dont test diagonals to save time
        if X-1 >= 0 then     FillArea(X-1, Y);
        if Y-1 >= 0 then     FillArea(X, Y-1);
        if Y+1 <= fTerrain.MapY-1 then FillArea(X, Y+1);
        if X+1 <= fTerrain.MapX-1 then FillArea(X+1, Y);
      end;
    end;
  var I,K,J: Integer;
  begin
    Assert(fTerrain <> nil);
    for J := Low(aMat) to High(aMat) do
  
negative.code: 
  //Get tile resource deposit
  function TKMDeposits.TileDeposit(aMat: TRawDeposit; X,Y: Word): Byte;
  var
  curUnit : TKMUnit;
  begin
    case aMat of
      rdStone: Result := 3*fTerrain.TileIsStone(X+1, Y+1); //3 stone produced by each time
      rdCoal:  Result := fTerrain.TileIsCoal(X+1, Y+1);
      rdIron:  Result := fTerrain.TileIsIron(X+1, Y+1);
      rdGold:  Result := fTerrain.TileIsGold(X+1, Y+1);
      rdFish:  begin
                    curUnit := fTerrain.Land[Y + 1, X + 1].IsUnit;
                   if (curUnit <> nil) and (curUnit is TKMUnitAnimal) then
                       Result := TKMUnitAnimal(curUnit).FishCount
                   else
                       Result := 0;
               end
      else     Result := 0;
    end;
  end;
  
  procedure TKMDeposits.FloodFill(const aMat: array of TRawDeposit);
  var
    R: TRawDeposit;
    AreaID: Word;
    Count: Integer;
    //Procedure uses recurence to check test area then it creates one deposit
    //Deposit is created when tiles are connected - but not diagonally
    procedure FillArea(X,Y: Word);
    begin
      //Untested area that matches passability
  