EXPORT lidi_na_vyber;

VAR ah,av;

// vraci sex daneho vojaka - sanze na zenskou 1/5
function get_sex;
begin
  if Prob(20) then result=sex_female
              else result=sex_male;
end;

// vraci povolani daneho vojaka ...
function get_class;
VAR a;
VAR pom;
begin
  pom=Rand(1,4);
  case pom of
   1:a=class_soldier;
   2:a=class_mechanic;
   3:a=class_engineer;
   4:a=classtype_scientist;
  end;
  result=a;
end;


// vraci cislo creatnuteho humana
function get_human(sex,clas,level,name);
var pom;
begin
  PrepareHuman(sex,clas,level);
  hc_name:=name;
  pom=CreateHuman;
  result:=pom;
end;

// priprava lidi na vyber k misi
EXPORT function prepare_people;
VAR i;
VAR pom,pom1;
begin
  uc_side=You;
  uc_nation=nat;

  sef=get_human(sex_male,class_soldier,10,'');
  pl=get_human(sex_male,class_soldier,levely_vojaku[dif]+2,player_name);
  ls=get_human(sex_female,class_scientistic,levely_vojaku[dif]+1,'Lucie Sebel');

  pom=[];
  for i=1 to pocet_vojaku_na_zacatku*2 do
    begin
      pom1=get_human(get_sex,get_class,levely_vojaku[dif],'');
      pom=pom^pom1;
    end;
  lidi_na_vyber=pom;
end;