hedgewars/uAIAmmoTests.pas
changeset 6767 ccbf07b38a43
parent 6700 e04da46ee43c
child 6769 44ad49a3a126
equal deleted inserted replaced
6766:31ba56a8ec43 6767:ccbf07b38a43
   156             dec(t)
   156             dec(t)
   157         until TestCollExcludingMe(Me, trunc(x), trunc(y), 5) or (t <= 0);
   157         until TestCollExcludingMe(Me, trunc(x), trunc(y), 5) or (t <= 0);
   158         
   158         
   159         EX:= trunc(x);
   159         EX:= trunc(x);
   160         EY:= trunc(y);
   160         EY:= trunc(y);
   161         value:= RateExplosion(Me, EX, EY, 101);
   161         if Me^.Hedgehog^.BotLevel = 1 then
       
   162             value:= RateExplosion(Me, EX, EY, 101, 3)
       
   163         else value:= RateExplosion(Me, EX, EY, 101);
   162         if value = 0 then
   164         if value = 0 then
   163             value:= - Metric(Targ.X, Targ.Y, EX, EY) div 64;
   165             value:= - Metric(Targ.X, Targ.Y, EX, EY) div 64;
   164     if valueResult <= value then
   166     if valueResult <= value then
   165         begin
   167         begin
   166         ap.Angle:= DxDy2AttackAngle(Vx, Vy) + AIrndSign(random((Level - 1) * 9));
   168         ap.Angle:= DxDy2AttackAngle(Vx, Vy) + AIrndSign(random((Level - 1) * 9));