anchor.diff:      Exhaustion := 99;
       if (ActualConsumption - Production > 0) then
         Exhaustion := Min( Exhaustion, gHands[fOwner].Stats.GetWareBalance(aWT) / (ActualConsumption - Production) );
  -    HouseReqCnt := Ceil(( Max(ActualConsumption, FinalConsumption) - Production) / Max(0.0001, PRODUCTION_RATE[aWT]*1.0));
  -    Fraction := HouseReqCnt / Max(1.0,((fCityStats.Houses[HT] + HouseReqCnt)*1.0));
  -  end;
  -  RequiredHouses[HT] := HouseReqCnt;
  +    houseReqCnt := Ceil(( Max(ActualConsumption, FinalConsumption) - Production) / Max(0.0001, PRODUCTION_RATE[aWT]*1.0));
  +    Fraction := houseReqCnt / Max(1.0,((fCityStats.Houses[HT] + houseReqCnt)*1.0));
  +  end;
  +  RequiredHouses[HT] := houseReqCnt;
   end;
   
   
  
positive.code:     fWareBalance[wtStone].ActualConsumption := Min(fCityStats.Citizens[utBuilder]+8, fWorkerCount) * AI_Par[PREDICTOR_WareNeedPerAWorker_Stone];
      fWareBalance[wtStone].FinalConsumption := Max(fCityStats.Citizens[utBuilder], fWorkerCount) * AI_Par[PREDICTOR_WareNeedPerAWorker_Stone];
      UpdateWareDerivation(wtStone);
      RequiredHouses[htSchool] := Max(0, 1 - Planner.PlannedHouses[htSchool].Count);
      Exit;
    end;
  
  
negative.code:         end;
          if (I > 1) then // Keep the latest older element
          begin
            cnt := 0;
            for K := I - 1 to Count - 1 do // Remove old ticks
            begin
              Quantity[cnt] := Quantity[K];
              Tick[cnt] := Tick[K];
              cnt := cnt + 1;
            end;
            Count := cnt;
          end;
        end;
        cnt := gHands[fOwner].Stats.GetHouseQty(htFarm);
        if (Quantity[Count-1] <> cnt) then
        begin
          if (Length(Quantity) <= Count) then
          begin
            SetLength(Quantity, Length(Quantity) + 5);
            SetLength(Tick, Length(Tick) + 5);
          end;
          Quantity[Count] := cnt;
          Tick[Count] := aTick + CORN_DELAY;
          Count := Count + 1;
        end;
  