anchor.diff:  end;
   
   
  -function TKMCityPlanner.GetPlan(aHT: TKMHouseType; out aLoc: TKMPoint; out aIdx: Integer): Boolean;
  +function TKMCityPlanner.GetPlan(aHT: TKMHouseType; aOnlyLatest: Boolean; out aLoc: TKMPoint; out aIdx: Integer): Boolean;
   const
     MAX_BID = 1000000;
  -  CHOP_ONLY_ADVANTAGE = 10;
  +  CHOP_ONLY_ADVANTAGE = 200;
   
     // Try find gold / iron in range of mine
     function IsExhaustedMine(aMineLoc: TKMPoint; aIsGold: Boolean): Boolean;
  
positive.code: function TKMCityPlanner.FindForestAround(const aPoint: TKMPoint; aCountByInfluence: Boolean = False): Boolean;
  const
    MIN_TREES = 3;
    MAX_DIST = 10;
    SQR_MIN_DIST_FROM_ACTIVE_FORESTS = 10*10;
    SQR_MIN_DIST_FROM_CHOP_ONLY = 12*12;
  var
    Output, Check: Boolean;
    I,K: Integer;
    Bid, BestBid: Byte;
    Loc, BestLoc: TKMPoint;
  begin
    Output := False;
  
    if (fForestsNearby <> nil) then
    begin
      BestBid := 0;
      for I := fForestsNearby.Count-1 downto 0 do
      begin
        Loc := fForestsNearby.Items[I];
        if (aCountByInfluence OR (KMDistanceAbs(aPoint, Loc) < MAX_DIST))
          AND (fForestsNearby.Tag2[I] >= MIN_TREES)
          AND (gAIFields.Influences.AvoidBuilding[ Loc.Y, Loc.X ] < AVOID_BUILDING_FOREST_MINIMUM) then
        begin
          Bid := gAIFields.Influences.Ownership[ fOwner, Loc.Y, Loc.X ]; // This is equivalent of distance
          if (Bid > BestBid) then
          begin
            BestBid := Bid;
            Check := True;
            for K := 0 to fPlannedHouses[htWoodcutters].Count - 1 do
              if (KMDistanceSqr(Loc, fPlannedHouses[htWoodcutters].Plans[K].SpecPoint) < SQR_MIN_DIST_FROM_ACTIVE_FORESTS) then
  
negative.code:            - gAIFields.Influences.GetOtherOwnerships(fOwner, aLoc.X, aLoc.Y) * GA_PLANNER_FindPlaceForHouse_Influence
             + gAIFields.Influences.EvalArea[aLoc.Y, aLoc.X] * GA_PLANNER_FindPlaceForHouse_EvalArea;
      if (aHT = htFarm) OR (aHT = htWineyard) then
        Gain := Gain + FieldCrit(aHT, aLoc)
      else if (aHT = htStore) OR (aHT = htBarracks) then
        Gain := Gain + EvalFreeEntrance(aLoc);
      for L := 0 to BEST_PLANS_CNT - 1 do
        if KMSamePoint(aLoc, aBestLocs[L]) then
          break
        else if (Gain > BestGainArr[L]) then // Insert sort for BEST_PLANS_CNT elements ...
        begin
          KMSwapPoints(aLoc, aBestLocs[L]);
          KMSwapFloat(Gain, BestGainArr[L]);
        end;
    end;
  
  