hedgewars/uAI.pas
changeset 14674 fd22b6d474e7
parent 14591 e54e41554529
child 15370 fcdb6e3a9d36
equal deleted inserted replaced
14673:38836d6c5c8a 14674:fd22b6d474e7
   482 
   482 
   483             FillBonuses(false);
   483             FillBonuses(false);
   484 
   484 
   485             // Hog has no idea what to do. Use tardis or skip
   485             // Hog has no idea what to do. Use tardis or skip
   486             if not bonuses.activity then
   486             if not bonuses.activity then
   487                 if (((GameFlags and gfInfAttack) <> 0) or (not isInMultiShoot)) and ((HHHasAmmo(Me^.Hedgehog^, amTardis) > 0)) and (CanUseTardis(Me^.Hedgehog^.Gear)) and (random(4) < 3) then
   487                 if (((GameFlags and gfInfAttack) <> 0) or (CurrentHedgehog^.MultiShootAttacks = 0)) and (HHHasAmmo(Me^.Hedgehog^, amTardis) > 0) and (CanUseTardis(Me^.Hedgehog^.Gear)) and (random(4) < 3) then
   488                     // Tardis brings hog to a random place. Perfect for clueless AI
   488                     // Tardis brings hog to a random place. Perfect for clueless AI
   489                     begin
   489                     begin
   490                     AddAction(BestActions, aia_Weapon, Longword(amTardis), 80, 0, 0);
   490                     AddAction(BestActions, aia_Weapon, Longword(amTardis), 80, 0, 0);
   491                     AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   491                     AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   492                     AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   492                     AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);