hedgewars/uAI.pas
changeset 10084 83156a03e574
parent 10015 4feced261c68
child 10098 f00dee04b5d7
equal deleted inserted replaced
10083:b20f9481e5cb 10084:83156a03e574
   133                     begin
   133                     begin
   134                     BestActions:= Actions;
   134                     BestActions:= Actions;
   135                     inc(BestActions.Score, Score);
   135                     inc(BestActions.Score, Score);
   136                     BestActions.isWalkingToABetterPlace:= false;
   136                     BestActions.isWalkingToABetterPlace:= false;
   137 
   137 
       
   138                     if HHHasAmmo(Me^.Hedgehog^, amInvulnerable) > 0 then
       
   139                         begin
       
   140                         AddAction(BestActions, aia_Weapon, Longword(amInvulnerable), 80, 0, 0);
       
   141                         AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
       
   142                         AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
       
   143                         end;
       
   144                         
       
   145                     if HHHasAmmo(Me^.Hedgehog^, amExtraDamage) > 0 then
       
   146                         begin
       
   147                         AddAction(BestActions, aia_Weapon, Longword(amExtraDamage), 80, 0, 0);
       
   148                         AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
       
   149                         AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
       
   150                         end; 
       
   151     
   138                     AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);
   152                     AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);
   139 
   153 
   140                     if (ap.Angle > 0) then
   154                     if (ap.Angle > 0) then
   141                         AddAction(BestActions, aia_LookRight, 0, 200, 0, 0)
   155                         AddAction(BestActions, aia_LookRight, 0, 200, 0, 0)
   142                     else if (ap.Angle < 0) then
   156                     else if (ap.Angle < 0) then