anchor.diff:  end;
   
   
  -// City initialization, estimation of maximal possible production and restriction by peace time and loc properties
  -procedure TKMCityPredictor.CityInitialization(aGoldMineCnt, aIronMineCnt, aFieldCnt, aBuildCnt: Integer);
  +procedure TKMCityPredictor.ActualizeWeaponProduction();
   const
     IRON_WARFARE: set of TKMWareType = [wt_MetalShield, wt_MetalArmor, wt_Sword, wt_Hallebard, wt_Arbalet];
     STANDARD_WARFARE: array[0..3] of TKMWareType = (wt_Axe, wt_Pike, wt_Bow, wt_Shield);
     MIN_WOOD_PRODUCTION = 1;
     MAX_WOOD_PRODUCTION = 4;
  -  SCALE_MIN_PEACE_TIME = 60;
  -  SCALE_MAX_PEACE_TIME = 90;
  -  SCALE_PEACE_FACTOR = 1.0 / ((SCALE_MAX_PEACE_TIME - SCALE_MIN_PEACE_TIME)*1.0);
   var
     I: Integer;
     MaxIronWeapProd, MaxWoodWeapProd, PeaceFactor: Single;
     WT: TKMWareType;
   begin
  -  // Max field / build cnt ~ 8000 tiles in real map it is 1500-2500 for fields and 2000-4000 for build
  +  // Max field / build cnt -> max ~ 8000 tiles; in real map ~ 1500-2500 for fields and ~ 2000-4000 for build
  +  // Maximal 4 houses for production of weapons and minimal 1 house
     // Estimation of final weapons production (productions are independence - in builder will be higher priority given to iron weapons)
   
  -  PeaceFactor := Max(0,(Min(SCALE_MAX_PEACE_TIME, gGame.GameOptions.Peacetime) - SCALE_MIN_PEACE_TIME)) * SCALE_PEACE_FACTOR;
  +  PeaceFactor := 0;
   
     // Iron weapons
  -  MaxIronWeapProd := Min(Round(aBuildCnt / GA_PREDICTOR_CityInitialization_Space), aIronMineCnt) * ProductionRate[wt_IronOre] * 0.5; // Division into half because of iron weapon and armor
  +  MaxIronWeapProd := Min(Round(fBuildCnt * GA_PREDICTOR_CityInitialization_Space), fIronMineCnt);
  +  // Wood weapons (depends on available space) - here is maximal possible production in this loc
  +  MaxWoodWeapProd := Round(Min(fFieldCnt,fBuildCnt) * GA_PREDICTOR_CityInitialization_Fertility);
  +
  +  // Iron weapons
  +  MaxIronWeapProd := MaxIronWeapProd * ProductionRate[wt_IronOre] * 0.5; // Division into half because of iron weapon and armor
     for WT in IRON_WARFARE do
       fWareBalance[WT].FinalConsumption := MaxIronWeapProd;
   
  -  // Wood weapons (depends on available space) - here is maximal possible production in this loc
  -  MaxWoodWeapProd := Round(Min(aFieldCnt,aBuildCnt) * GA_PREDICTOR_CityInitialization_Fertility);
  +  // Wood weapons
     // Consider peace time
     MaxWoodWeapProd := Max(1, MaxWoodWeapProd * PeaceFactor);
     // Transform to house production
  
positive.code:   //GA_PREDICTOR_CityInitialization_Space         : Single = 1 / 750.0; // factor for iron weapons
    //GA_PREDICTOR_CityInitialization_Fertility     : Single = 1 / 800.0; // factor for wood weapons
    //GA_PREDICTOR_CityInitialization_Worker        : Single = 1 / 105.0;
    GA_PREDICTOR_CityInitialization_Space         : Single = 0.005257239565;
    GA_PREDICTOR_CityInitialization_Fertility     : Single = 0; // factor for wood weapons
    GA_PREDICTOR_CityInitialization_Worker        : Single = 0.052704036;
  
  type
    TWareBalance = record
  
negative.code:   TKMCityPredictor = class
    private
      fOwner: TKMHandIndex;
      fWorkerCount: Word;
      fGoldMineCnt, fIronMineCnt, fFieldCnt, fBuildCnt: Integer;
      fMaxIronWeapProd, fMaxWoodWeapProd, fMaxSoldiersInMin: Single;
      fCityStats: TCityStats;
      fWareBalance: TWareBalanceArray;
      fFarmBuildHistory: THouseBuildHistory;
  