hedgewars/uAIAmmoTests.pas
changeset 7790 040fc517fece
parent 7789 838d2e06c377
child 7873 266fe9f1e5a9
equal deleted inserted replaced
7789:838d2e06c377 7790:040fc517fece
   285                   
   285                   
   286         if valueResult < Score then
   286         if valueResult < Score then
   287             begin
   287             begin
   288             ap.Angle:= DxDy2AttackAnglef(Vx, Vy) + AIrndSign(random(Level));
   288             ap.Angle:= DxDy2AttackAnglef(Vx, Vy) + AIrndSign(random(Level));
   289             ap.Power:= trunc(sqrt(r) * cMaxPower) + AIrndSign(random(Level) * 15);
   289             ap.Power:= trunc(sqrt(r) * cMaxPower) + AIrndSign(random(Level) * 15);
   290             ap.Time:= TestTime;
       
   291             ap.ExplR:= 100;
   290             ap.ExplR:= 100;
   292             ap.ExplX:= EX;
   291             ap.ExplX:= EX;
   293             ap.ExplY:= EY;
   292             ap.ExplY:= EY;
   294             valueResult:= Score
   293             valueResult:= Score
   295             end;
   294             end;
   494     TestTime: Longword;
   493     TestTime: Longword;
   495     x, y, dY, meX, meY: real;
   494     x, y, dY, meX, meY: real;
   496 begin
   495 begin
   497     TestMortar:= BadTurn;
   496     TestMortar:= BadTurn;
   498     ap.ExplR:= 0;
   497     ap.ExplR:= 0;
       
   498 
   499     meX:= hwFloat2Float(Me^.X);
   499     meX:= hwFloat2Float(Me^.X);
   500     meY:= hwFloat2Float(Me^.Y);
   500     meY:= hwFloat2Float(Me^.Y);
   501 
   501 
   502     if (Level > 2) then
   502     if (Level > 2) then
   503         exit(BadTurn);
   503         exit(BadTurn);