unit AI;

interface
uses
Model, Otshelm_A, MForm, Otshelm_C;

implementation

function wheremodel( i : word): boolean;
begin
  with Model.Pers[i].A do
    begin
      if  (Position.X>GameCube.Position.X+20)
      and (Position.X>GameCube.Position.X-20)
      and (Position.Y>GameCube.Position.Y+20)
      and (Position.Y>GameCube.Position.Y-20)
      then
        begin
          Visible:=false;
          result:=false;
        end
      else
        begin
          Visible:=true;
          result:=true;
        end;
    end;
end;

procedure atack(i : byte);
begin
  with Model.Pers[i] do
  if (A.Position.X+EtLiveObj[Et].R> Model.Pers[NHERO].A.Position.X
    - EtLiveObj[Model.Pers[NHERO].Et].R)
  and (A.Position.X-EtLiveObj[Et].R< Model.Pers[NHERO].A.Position.X
    + EtLiveObj[Model.Pers[NHERO].Et].R)
  and (A.Position.Y+EtLiveObj[Et].R> Model.Pers[NHERO].A.Position.Y
    - EtLiveObj[Model.Pers[NHERO].Et].R)
  and (A.Position.Y-EtLiveObj[Et].R< Model.Pers[NHERO].A.Position.Y
    + EtLiveObj[Model.Pers[NHERO].Et].R)
  then
  begin

  end;  
end;

end.
