anchor.diff:      end;
   
     SelectHouse(ALL_WARE);
  -  if (MaxPlans > 0) then
  -  begin
  -
  -    //SelectHouse(FOOD_WARE);
  -    //if (MaxPlans > 0) then
  -    //if (KaMRandom < 0.5) then
  -    //  SelectHouse(WEAPON_WARE);
  -  end;
   end;
   
   
  
positive.code: 
    function AddToConstruction(aHT: TKMHouseType; aUnlockProcedureRequired: Boolean = False; aIgnoreWareReserves: Boolean = False): TConstructionState;
    var
      UnlockProcedure, MaterialShortage: Boolean;
      FollowingHouse: TKMHouseType;
      Output: TConstructionState;
    begin
  
negative.code:         begin
            MaxPlans := 0; // This house is critical so dont plan anything else
            Exit;
          end;
        end;
      end;
    end;
  
    procedure CheckHouseReservation();
    const
      // Reservation sets must be able to unlock specific houses!!!
      RESERVATION_FullSet: array[0..28] of TKMHouseType = (
        htSchool, htQuary, htMarketplace, htWoodcutters, htSawmill,
        htGoldMine, htCoalMine, htMetallurgists, htBarracks, htInn,
        htFarm, htMill, htBakery, htSwine, htButchers, htStables, htFisherHut,
        htIronMine, htIronSmithy, htArmorSmithy, htWeaponSmithy,
        htTannery, htArmorWorkshop, htWeaponWorkshop,
        htSiegeWorkshop, htTownHall, htWineyard, htStore, htWatchTower
      );
      STONE_SHORTAGE_IDX = 2;
      TRUNK_SHORTAGE_IDX = 3;
      WOOD_SHORTAGE_IDX = 4;
      GOLD_SHORTAGE_IDX = 7;
      FULL_SET = 28;
    var
      I,K, MaxIdx: Integer;
      HT: TKMHouseType;
    begin
      if fStoneShortage then
        MaxIdx := STONE_SHORTAGE_IDX
      else if fTrunkShortage then
        MaxIdx := TRUNK_SHORTAGE_IDX
      else if fWoodShortage then
        MaxIdx := WOOD_SHORTAGE_IDX
      else if fGoldShortage then
        MaxIdx := GOLD_SHORTAGE_IDX
      else
        MaxIdx := FULL_SET;
      for I := 0 to MaxIdx do
      begin
        HT := RESERVATION_FullSet[I];
        for K := 0 to fPlanner.PlannedHouses[HT].Count - 1 do
          with fPlanner.PlannedHouses[HT].Plans[K] do
            if not Placed
               AND (HouseReservation OR RemoveTreeInPlanProcedure)
               AND (cs_HousePlaced = AddToConstruction(HT,False,True)) then
            begin
              MaxPlace := MaxPlace - 1;
              RequiredHouses[HT] := 0;
              if (MaxPlace <= 0) then
                Exit;
            end;
      end;
    end;
  
    function GetChopOnlyCnt(): Word;
  