hedgewars/uAIAmmoTests.pas
changeset 15680 3224d0d970ac
parent 15679 b64f96d43f1f
child 15685 78e383fff605
equal deleted inserted replaced
15679:b64f96d43f1f 15680:3224d0d970ac
  1443             begin
  1443             begin
  1444             fexit:= false;
  1444             fexit:= false;
  1445             if TestColl(trunc(X) + LongWord(i * 30), trunc(Y), 4) then
  1445             if TestColl(trunc(X) + LongWord(i * 30), trunc(Y), 4) then
  1446                 begin
  1446                 begin
  1447                 b[i]:= false;
  1447                 b[i]:= false;
  1448                 dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 58);
  1448                 if Level = 1 then
       
  1449                     dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 58, afTrackFall or afErasesLand)
       
  1450                 else
       
  1451                     dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 58);
  1449                 // 58 (instead of 60) for better prediction (hh moves after explosion of one of the rockets)
  1452                 // 58 (instead of 60) for better prediction (hh moves after explosion of one of the rockets)
  1450                 if (not firstHit) then
  1453                 if (not firstHit) then
  1451                     begin
  1454                     begin
  1452                     firstHit:= true;
  1455                     firstHit:= true;
  1453                     // remember Y of first hit, used for target pos
  1456                     // remember Y of first hit, used for target pos
  1567                 collided:= true;
  1570                 collided:= true;
  1568 
  1571 
  1569             // Simulate explosion
  1572             // Simulate explosion
  1570             if collided then
  1573             if collided then
  1571                 begin
  1574                 begin
  1572                 dmg[i]:= RateExplosion(Me, trunc(drillX), trunc(drillY), 58);
  1575                 if Level = 1 then
       
  1576                     dmg[i]:= RateExplosion(Me, trunc(drillX), trunc(drillY), 58, afTrackFall or afErasesLand)
       
  1577                 else
       
  1578                     dmg[i]:= RateExplosion(Me, trunc(drillX), trunc(drillY), 58);
  1573                 // 58 (instead of 60) for better prediction (hh moves after explosion of one of the rockets)
  1579                 // 58 (instead of 60) for better prediction (hh moves after explosion of one of the rockets)
  1574                 if not firstHit then
  1580                 if not firstHit then
  1575                     begin
  1581                     begin
  1576                     targetY:= trunc(drillY);
  1582                     targetY:= trunc(drillY);
  1577                     firstHit:= true;
  1583                     firstHit:= true;
  1688             begin
  1694             begin
  1689             fexit:= false;
  1695             fexit:= false;
  1690             if TestColl(trunc(X) + LongWord(i * 30), trunc(Y), 4) then
  1696             if TestColl(trunc(X) + LongWord(i * 30), trunc(Y), 4) then
  1691                 begin
  1697                 begin
  1692                 b[i]:= false;
  1698                 b[i]:= false;
  1693                 dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 96);
  1699                 if Level = 1 then
       
  1700                     dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 96, afTrackFall or afErasesLand)
       
  1701                 else
       
  1702                     dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 96);
       
  1703 
  1694                 if (not firstHit) then
  1704                 if (not firstHit) then
  1695                     begin
  1705                     begin
  1696                     targetY:= trunc(Y);
  1706                     targetY:= trunc(Y);
  1697                     firstHit:= true;
  1707                     firstHit:= true;
  1698                     end;
  1708                     end;