anchor.diff:  
     procedure CheckMinArmyReq();
     const
  -    DEFAULT_COEFICIENT = 100;
  -    DEFAULT_ARMY_REQUIREMENTS: array[WARRIOR_EQUIPABLE_MIN..WARRIOR_EQUIPABLE_MAX] of Word = (
  +    DEFAULT_COEFICIENT = 5;
  +    DEFAULT_ARMY_REQUIREMENTS: array[WARRIOR_EQUIPABLE_MIN..WARRIOR_EQUIPABLE_MAX] of Single = (
         1, 1, 1, 3,//ut_Militia,      ut_AxeFighter,   ut_Swordsman,     ut_Bowman,
  -      3, 1, 1, 1,//ut_Arbaletman,   ut_Pikeman,      ut_Hallebardman,  ut_HorseScout,
  -      1//ut_Cavalry
  +      3, 1, 1, 0.5,//ut_Arbaletman,   ut_Pikeman,      ut_Hallebardman,  ut_HorseScout,
  +      0.5//ut_Cavalry
       );
  +    WOOD_ARMY: set of TKMUnitType = [ut_AxeFighter, ut_Bowman, ut_Pikeman]; //ut_HorseScout,
  +    IRON_ARMY: set of TKMUnitType = [ut_Swordsman, ut_Arbaletman, ut_Hallebardman]; //ut_Cavalry
     var
  -    SoldierCnt: Integer;
  +    I, WoodReq, IronReq: Integer;
       UT: TKMUnitType;
     begin
  -    SoldierCnt := 0;
  -    for UT := Low(fWarriorsDemands) to High(fWarriorsDemands) do
  -      SoldierCnt := SoldierCnt + fWarriorsDemands[UT];
  -    if (SoldierCnt > 30) then
  -      Exit;
  -
  -    for UT := Low(fWarriorsDemands) to High(fWarriorsDemands) do
  +    WoodReq := Max(+ fRequiredWeapons[wt_Armor].Available - fRequiredWeapons[wt_Armor].Required,
  +                   + fRequiredWeapons[wt_Axe].Available - fRequiredWeapons[wt_Axe].Required
  +                   + fRequiredWeapons[wt_Bow].Available - fRequiredWeapons[wt_Bow].Required
  +                   + fRequiredWeapons[wt_Pike].Available - fRequiredWeapons[wt_Pike].Required
  +                  );
  +    IronReq := Max(+ fRequiredWeapons[wt_MetalArmor].Available - fRequiredWeapons[wt_MetalArmor].Required,
  +                   + fRequiredWeapons[wt_Sword].Available - fRequiredWeapons[wt_Sword].Required
  +                   + fRequiredWeapons[wt_Arbalet].Available - fRequiredWeapons[wt_Arbalet].Required
  +                   + fRequiredWeapons[wt_Hallebard].Available - fRequiredWeapons[wt_Hallebard].Required
  +                  );
  +    WoodReq := Round((Max(0, WoodReq) + DEFAULT_COEFICIENT)/5.0);
  +    IronReq := Round((Max(0, IronReq) + DEFAULT_COEFICIENT)/5.0);
  +
  +    for UT in WOOD_ARMY do
         if not gHands[fOwner].Locks.GetUnitBlocked(UT) then
  -        fWarriorsDemands[UT] := fWarriorsDemands[UT] + DEFAULT_ARMY_REQUIREMENTS[UT] * DEFAULT_COEFICIENT;
  +        for I := Low(TroopCost[UT]) to High(TroopCost[UT]) do
  +          if (TroopCost[UT,I] <> wt_None) then
  +            with fRequiredWeapons[ TroopCost[UT,I] ] do
  +              Required := Required + Round(DEFAULT_ARMY_REQUIREMENTS[UT] * WoodReq);
  +
  +    for UT in IRON_ARMY do
  +      if not gHands[fOwner].Locks.GetUnitBlocked(UT) then
  +        for I := Low(TroopCost[UT]) to High(TroopCost[UT]) do
  +          if (TroopCost[UT,I] <> wt_None) then
  +            with fRequiredWeapons[ TroopCost[UT,I] ] do
  +              Required := Required + Round(DEFAULT_ARMY_REQUIREMENTS[UT] * IronReq);
     end;
   //AITroopTrainOrder: array [TKMGroupType, 1..3] of TKMUnitType = (
   //  (ut_Swordsman,    ut_AxeFighter, ut_Militia),
  
positive.code:     end
      else
      begin
        AvaiableWares[AvaiableCnt] := aWare;
        AvaiableCnt := AvaiableCnt + 1;
      end;
    end;
  
  
negative.code:     end;
  
    for I := 0 to RequiedCnt - 1 do
      if (I < AvailableCnt) then
        TryBuyItem(AvailableWares[I], RequiredWares[I])
    else
      break;
  end;
  