anchor.diff:    // Estimation of final weapons production (productions are independence - in builder will be higher priority given to iron weapons)
   
     // Update peace factor if it is needed
  -  fUpdatedPeaceFactor := Min(1,
  +  UpdatedPeaceFactor := Min(1,
                                fPeaceFactor + Max(0,
  -                                                (gGame.GameTickCount - gGame.GameOptions.Peacetime * 10 * 60) * AFTER_PEACE_SCALING
  +                                                (Integer(gGame.GameTickCount) //Cast to Integer to avoid Integer overflow error for possible negative Cardinal during calc
  +                                                  - gGame.GameOptions.Peacetime * 10 * 60) * AFTER_PEACE_SCALING
                                                  )
                               );
   
  
positive.code:   // Wood weapons
    MaxWoodWeapProd := Max(MIN_WOOD_PRODUCTION,
                           Min(MAX_WOOD_PRODUCTION,
                               Max(0, MaxWoodWeapProd - MaxIronWeapProd) * fUpdatedPeaceFactor // Consider also peace time
                              )
                          );
    // Transform to house production
  
negative.code:   AFTER_PEACE_SCALING = 1 / (40*10*60); // Peace factor will be completely removed after {40} ticks since end of peace
  var
    I: Integer;
    MaxIronWeapProd, MaxWoodWeapProd, UpdatedPeaceFactor: Single;
    //PeaceFactorChange:
    WT: TKMWareType;
  begin
    // Max field / build cnt -> max ~ 8000 tiles; in real map ~ 1500-2500 for fields and ~ 2000-4000 for build
  