hedgewars/uAIAmmoTests.pas
changeset 14227 1d678dee55d1
parent 14226 545b85c0f2e3
child 14546 7e4862823649
child 14585 8736f3a0ff7f
equal deleted inserted replaced
14226:545b85c0f2e3 14227:1d678dee55d1
   196         if (value = 0) and (Targ.Kind = gtHedgehog) and (Targ.Score > 0) then
   196         if (value = 0) and (Targ.Kind = gtHedgehog) and (Targ.Score > 0) then
   197             if GameFlags and gfSolidLand = 0 then
   197             if GameFlags and gfSolidLand = 0 then
   198                  value := 1024 - Metric(Targ.Point.X, Targ.Point.Y, EX, EY) div 64
   198                  value := 1024 - Metric(Targ.Point.X, Targ.Point.Y, EX, EY) div 64
   199             else value := BadTurn;
   199             else value := BadTurn;
   200 
   200 
   201         if (valueResult < value) or (valueResult = value and Level < 3) then
   201         if (valueResult < value) or ((valueResult = value) and (Level < 3)) then
   202             begin
   202             begin
   203             ap.Angle:= DxDy2AttackAnglef(Vx, Vy) + AIrndSign(random((Level - 1) * 9));
   203             ap.Angle:= DxDy2AttackAnglef(Vx, Vy) + AIrndSign(random((Level - 1) * 9));
   204             ap.Power:= trunc(sqrt(r) * cMaxPower) - random((Level - 1) * 17 + 1);
   204             ap.Power:= trunc(sqrt(r) * cMaxPower) - random((Level - 1) * 17 + 1);
   205             ap.ExplR:= 100;
   205             ap.ExplR:= 100;
   206             ap.ExplX:= EX;
   206             ap.ExplX:= EX;