hedgewars/uAIAmmoTests.pas
changeset 743 6b314e907f6d
parent 556 49675457d76e
child 744 7a9663194767
equal deleted inserted replaced
742:29609363c36c 743:6b314e907f6d
   121      Score:= CheckTrace;
   121      Score:= CheckTrace;
   122      if Result <= Score then
   122      if Result <= Score then
   123         begin
   123         begin
   124         ap.Angle:= DxDy2AttackAngle(Vx, Vy) + AIrndSign(random((Level - 1) * 9));
   124         ap.Angle:= DxDy2AttackAngle(Vx, Vy) + AIrndSign(random((Level - 1) * 9));
   125         ap.Power:= hwRound(r * cMaxPower) - random((Level - 1) * 17 + 1);
   125         ap.Power:= hwRound(r * cMaxPower) - random((Level - 1) * 17 + 1);
       
   126 AddFilelog('r = '+floattostr(r)+' power = '+ inttostr(hwRound(r * cMaxPower))+' ==> '+inttostr(ap.Power));
   126         ap.ExplR:= 100;
   127         ap.ExplR:= 100;
   127         ap.ExplX:= EX;
   128         ap.ExplX:= EX;
   128         ap.ExplY:= EY;
   129         ap.ExplY:= EY;
   129         Result:= Score
   130         Result:= Score
   130         end;
   131         end;