hedgewars/uAI.pas
changeset 15659 fd1a580a35d6
parent 15658 34c32a11203e
child 15703 a92220611821
equal deleted inserted replaced
15658:34c32a11203e 15659:fd1a580a35d6
   149                             begin
   149                             begin
   150                             AddAction(BestActions, aia_Weapon, Longword(amLaserSight), 80, 0, 0);
   150                             AddAction(BestActions, aia_Weapon, Longword(amLaserSight), 80, 0, 0);
   151                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   151                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   152                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   152                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   153                             end;
   153                             end;
   154                         if (HHHasAmmo(Me^.Hedgehog^, amInvulnerable) > 0) and (Me^.Hedgehog^.Effects[heInvulnerable] = 0) then
   154                         if ((AmmoTests[a].flags and amtest_NoInvulnerable) = 0) and
       
   155                             (HHHasAmmo(Me^.Hedgehog^, amInvulnerable) > 0) and (Me^.Hedgehog^.Effects[heInvulnerable] = 0) then
   155                             begin
   156                             begin
   156                             AddAction(BestActions, aia_Weapon, Longword(amInvulnerable), 80, 0, 0);
   157                             AddAction(BestActions, aia_Weapon, Longword(amInvulnerable), 80, 0, 0);
   157                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   158                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   158                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   159                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   159                             end;
   160                             end;
   161                             begin
   162                             begin
   162                             AddAction(BestActions, aia_Weapon, Longword(amExtraDamage), 80, 0, 0);
   163                             AddAction(BestActions, aia_Weapon, Longword(amExtraDamage), 80, 0, 0);
   163                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   164                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   164                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   165                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   165                             end;
   166                             end;
   166                         if (HHHasAmmo(Me^.Hedgehog^, amVampiric) > 0) and (not cVampiric) then
   167                         if (not cVampiric) and ((AmmoTests[a].flags and amtest_NoVampiric) = 0) and
       
   168                             (HHHasAmmo(Me^.Hedgehog^, amVampiric) > 0) then
   167                             begin
   169                             begin
   168                             AddAction(BestActions, aia_Weapon, Longword(amVampiric), 80, 0, 0);
   170                             AddAction(BestActions, aia_Weapon, Longword(amVampiric), 80, 0, 0);
   169                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   171                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   170                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   172                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   171                             end;
   173                             end;