anchor.diff:        for K := 2 to 4 do
           if (HA[I - 1, K] <> 0) and (HA[I, K - 1] <> 0)
           and (HA[I - 1, K - 1] <> 0) and (HA[I, K] <> 0) then
  -          Land^[Loc.Y + I - 4, Loc.X + K - 3].Obj := 68 + KaMRandom(6, 'TKMTerrain.AddHouseRemainder');
  +          Land^[aLoc.Y + I - 4, aLoc.X + K - 3].Obj := 68 + KaMRandom(6, 'TKMTerrain.AddHouseRemainder');
   
       //Leave dug terrain
       for I := 1 to 4 do
         for K := 1 to 4 do
           if HA[I, K] <> 0 then
           begin
  -          Land^[Loc.Y + I - 4, Loc.X + K - 3].TileOverlay := toDig3;
  -          Land^[Loc.Y + I - 4, Loc.X + K - 3].TileLock    := tlNone;
  +          Land^[aLoc.Y + I - 4, aLoc.X + K - 3].TileOverlay := toDig3;
  +          Land^[aLoc.Y + I - 4, aLoc.X + K - 3].TileLock    := tlNone;
           end;
     end else
     begin
  
positive.code: begin
    // Objects killed when surrounded with road on all 4 sides
    // Check for quads this tile affects
    KillByRoadCorner(Loc);
    KillByRoadCorner(KMPoint(Loc.X + 1, Loc.Y));
    KillByRoadCorner(KMPoint(Loc.X, Loc.Y + 1));
    KillByRoadCorner(KMPoint(Loc.X + 1, Loc.Y + 1));
  
    // Objects killed by roads on sides only
    // Check 2 tiles this tile affects
    if TileHasRoad(Loc.X - 1, Loc.Y) then
      RemoveIfWest(Loc);
    if TileHasRoad(Loc.X + 1, Loc.Y) then
      RemoveIfWest(KMPoint(Loc.X + 1, Loc.Y));
  end;
  
  
  procedure TKMTerrain.SowCorn(const Loc: TKMPoint);
  begin
    Land^[Loc.Y,Loc.X].FieldAge := 1;
    Land^[Loc.Y,Loc.X].BaseLayer.Terrain  := 61; //Plant it right away, don't wait for update state
    UpdatePassability(KMRectGrow(KMRect(Loc), 1));
  end;
  
  
  function TKMTerrain.CutCorn(const Loc: TKMPoint): Boolean;
  begin
    Result := TileIsCornField(Loc) and (GetCornStage(Loc) = 5); //todo: refactor: use enum instead of magic numbers !
    if not Result then Exit; //We have no corn here actually, nothing to cut
    
    Land^[Loc.Y,Loc.X].FieldAge := 0;
    Land^[Loc.Y,Loc.X].BaseLayer.Terrain  := 63;
    Land^[Loc.Y,Loc.X].Obj := OBJ_NONE;
  end;
  
  
  function TKMTerrain.CutGrapes(const Loc: TKMPoint): Boolean;
  begin
    Result := TileIsWineField(Loc) and (GetWineStage(Loc) = 3);
    if not Result then Exit; //We have no wine here actually, nothing to cut
    
    Land^[Loc.Y,Loc.X].FieldAge := 1;
    Land^[Loc.Y,Loc.X].Obj := 54; //Reset the grapes
  end;
  
  
  
negative.code: 
  // Return random tile surrounding Loc with aPass property. PusherLoc is the unit that pushed us
  // which is preferable to other units (otherwise we can get two units swapping places forever)
  function TKMTerrain.GetOutOfTheWay(aUnit: Pointer; const aPusherLoc: TKMPoint; aPass: TKMTerrainPassability; aPusherWasPushed: Boolean = False): TKMPoint;
  var
    U: TKMUnit;
    loc: TKMPoint;
  