anchor.diff:      begin
         if not gGame.IsPeaceTime then
         begin
  -        CheckAttack();
  -        RecruitSoldiers();
  +        CheckAttack;
  +        RecruitSoldiers;
         end;
  -      CheckGroupsState();
  +      CheckGroupsState;
         fAttackNew.UpdateState(aTick);
         fDefence.UpdateState(aTick);
       end;
  
positive.code:       repeat
          GT := TKMGroupType(GROUP_TYPE_MIN_OFF + KaMRandom(4, 'TKMArmyManagement.RecruitSoldiers')); //Pick random from overall count
          Inc(L);
        until (GroupReq[GT] > 0) OR (L > 9); // Limit number of attempts to guarantee it doesn't loop forever
  
        if (GroupReq[GT] = 0) then
          Continue; // Don't train
  
negative.code: end;
  
  
  procedure TKMArmyManagement.CheckAttack;
  type
    TKMAvailableGroups = record
      Count: Word;
  