anchor.diff:  const
     BUILD_TOWER_DELAY = 17 * 60 * 10; // 17 minutes before end of peace
   var
  +  I, RequiredStones, RequiredWood: Integer;
     TrunkBalance: Single;
     HT: TKMHouseType;
  -begin
  -  StoneShortage := False;
  -  TrunkShortage := False;
  -  WoodShortage := False;
  -  GoldShortage := False;
  +  H: TKMHouse;
  +begin
  +  fStoneShortage := False;
  +  fTrunkShortage := False;
  +  fWoodShortage := False;
  +  fGoldShortage := False;
     RequiredHouses := fPredictor.RequiredHouses;
     WareBalance := fPredictor.WareBalance;
   
     // Analyze basic force stats (max possible plans, construction ware, gold)
  -  //MaxPlans := Ceil(aFreeWorkersCnt / 5);
  -  //MaxPlans := Ceil(gHands[fOwner].Stats.GetUnitQty(ut_Worker) / GA_BUILDER_ChHTB_AllWorkerCoef) - fPlanner.ConstructedHouses;
     MaxPlans := Ceil(gHands[fOwner].Stats.GetUnitQty(ut_Worker) / GA_BUILDER_ChHTB_AllWorkerCoef) - fPlanner.ConstructedHouses;
     MaxPlans := Max(MaxPlans, Ceil(aFreeWorkersCnt / GA_BUILDER_ChHTB_FreeWorkerCoef));
   
     // Quarries have minimal delay + stones use only workers (towers after peace time) -> exhaustion for wt_Stone is OK
     if (WareBalance[wt_Stone].Exhaustion < GA_BUILDER_STONE_SHORTAGE) then
  -    StoneShortage := True;
  +    fStoneShortage := True;
   
     // Secure wood production: only process trunk -> wood => minimal delay, exhaustion is OK
     if (WareBalance[wt_Wood].Exhaustion < GA_BUILDER_WOOD_SHORTAGE) then
  -    WoodShortage := True;
  +    fWoodShortage := True;
   
     // Make sure that gold will be produced ASAP -> minimal delay, exhaustion is OK
     if (WareBalance[wt_Gold].Exhaustion < GA_BUILDER_GOLD_SHORTAGE) then
  -    GoldShortage := True;
  +    fGoldShortage := True;
   
     // Woodcutters have huge delay (8 min) + trunk is used only to produce wood -> decide shortage based on actual consumption and reserves
     TrunkBalance := (gHands[fOwner].Stats.GetWareBalance(wt_Trunk) + gHands[fOwner].Stats.GetWareBalance(wt_Wood) / 2) / Max(0.1,WareBalance[wt_Trunk].ActualConsumption);
     if (TrunkBalance < GA_BUILDER_TRUNK_SHORTAGE) then
  -    TrunkShortage := True;
  +    fTrunkShortage := True;
   
     // Find place for chop-only woodcutters when we start to be out of wood
     if ((GA_BUILDER_ChHTB_TrunkBalance - TrunkBalance) / GA_BUILDER_ChHTB_TrunkFactor - GetChopOnlyCnt() > 0) then // Max 2 chop-only woodcutters
  
positive.code: function TKMCityBuilder.BuildHouse(aUnlockProcedure, aHouseReservation, aIgnoreExistingPlans: Boolean; aHT: TKMHouseType): TConstructionState;
  var
    Output: TConstructionState;
    FieldsComplete: Boolean;
    I, Node1Idx, Node2Idx, HouseIdx: Integer;
    Loc: TKMPoint;
  begin
  
negative.code:   I, Cnt: Integer;
  begin
    LoadStream.ReadAssert('CityBuilder');
    LoadStream.Read(fStoneShortage);
    LoadStream.Read(fWoodShortage);
    LoadStream.Read(fTrunkShortage);
    LoadStream.Read(fGoldShortage);
    LoadStream.Read(fOwner);
  
    LoadStream.Read(Cnt);
  