anchor.diff:  end;
   
   
  -{Remove the tree and place a falling tree instead}
  +// Remove the tree and place a falling tree instead
   function TKMTerrain.FallTree(const Loc: TKMPoint): Boolean;
   var
     I: Integer;
  
positive.code: var
    transition: TStoneTransitionType;
  begin
    transition := GetStoneTransitionType(Loc.X,Loc.Y + 1); //Check transition type by lower point (Y + 1)
  
    Result := True;
    //Replace with smaller ore deposit tile (there are 2 sets of tiles, we can choose random)
     case Land^[Loc.Y,Loc.X].BaseLayer.Terrain of
      132, 137: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 131 + KaMRandom(2, 'TKMTerrain.DecStoneDeposit')*5;
      131, 136: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 130 + KaMRandom(2, 'TKMTerrain.DecStoneDeposit 2')*5;
      130, 135: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 129 + KaMRandom(2, 'TKMTerrain.DecStoneDeposit 3')*5;
      129, 134: case transition of
                  sttNone,
                  sttGrass:       Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 128 + KaMRandom(2, 'TKMTerrain.DecStoneDeposit 4')*5;
                  sttCoastSand:   Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 266 + KaMRandom(2, 'TKMTerrain.DecStoneDeposit 5');
                  sttDirt:        Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 275 + KaMRandom(2, 'TKMTerrain.DecStoneDeposit 6');
                  sttSnow:        Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 283 + KaMRandom(2, 'TKMTerrain.DecStoneDeposit 7');
                  sttSnowOnDirt:  Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 291 + KaMRandom(2, 'TKMTerrain.DecStoneDeposit 8');
                end;
      128, 133,
      266, 267,
      275, 276,
      283, 284,
      291, 292: begin
                  Land^[Loc.Y,Loc.X].BaseLayer.Terrain  := TranTiles[transition, 0]; //Remove stone tile (so tile will have no stone)
                  Land^[Loc.Y,Loc.X].BaseLayer.Rotation := KaMRandom(4, 'TKMTerrain.DecStoneDeposit 9');
  
                  InitVisited;
                  //Tile type has changed and we need to update these 5 tiles transitions:
                  UpdateTransition(Loc.X,  Loc.Y, 0);
                end;
      else      Exit(False);
    end;
  
    FlattenTerrain(Loc, True, True); //Ignore canElevate since it can prevent stonehill from being still walkable and cause a crash
  end;
  
  
  { Try to extract one unit of ore
    It may fail cos of two miners mining the same last piece of ore }
  function TKMTerrain.DecOreDeposit(const Loc: TKMPoint; rt: TKMWareType): Boolean;
  begin
    if not (rt in [wtIronOre,wtGoldOre,wtCoal]) then
      raise ELocError.Create('Wrong ore decrease',Loc);
  
    Result := true;
    case Land^[Loc.Y,Loc.X].BaseLayer.Terrain of
      144: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 157 + KaMRandom(3, 'TKMTerrain.DecOreDeposit'); //Gold
      145: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 144;
      146: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 145;
      147: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 146;
      307: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 147;
      148: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 160 + KaMRandom(4, 'TKMTerrain.DecOreDeposit 2'); //Iron
      149: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 148;
      150: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 149;
      259: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 149;
      151: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 150 + KaMRandom(2, 'TKMTerrain.DecOreDeposit 3')*(259 - 150);
      260: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 151;
      152: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 35  + KaMRandom(2, 'TKMTerrain.DecOreDeposit 4'); //Coal
      153: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 152;
      154: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 153;
      155: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 154;
      263: Land^[Loc.Y,Loc.X].BaseLayer.Terrain := 155;
      else Result := false;
    end;
    Land^[Loc.Y,Loc.X].BaseLayer.Rotation := KaMRandom(4, 'TKMTerrain.DecOreDeposit 5');
    UpdatePassability(Loc);
  end;
  
  
  
negative.code:     function CutCorn(const Loc: TKMPoint): Boolean;
      function CutGrapes(const Loc: TKMPoint): Boolean;
  
      function DecStoneDeposit(const aLoc: TKMPoint): Boolean;
      function DecOreDeposit(const aLoc: TKMPoint; aWare: TKMWareType): Boolean;
  
      function GetPassablePointWithinSegment(aOriginPoint, aTargetPoint: TKMPoint; aPass: TKMTerrainPassability; aMaxDistance: Integer = -1): TKMPoint;
      function CheckPassability(X, Y: Integer; aPass: TKMTerrainPassability): Boolean; overload;
      function CheckPassability(const Loc: TKMPoint; aPass: TKMTerrainPassability): Boolean; overload;
      function HasUnit(const Loc: TKMPoint): Boolean;
  