hedgewars/uAI.pas
branchios-develop
changeset 13418 ba39a1d396c0
parent 13138 733f3154198c
child 14231 545b85c0f2e3
--- a/hedgewars/uAI.pas	Sun Jun 10 18:56:51 2018 +0200
+++ b/hedgewars/uAI.pas	Sun Jun 10 19:12:26 2018 +0200
@@ -288,7 +288,7 @@
     AddAction(Actions, aia_Weapon, Longword(amSkip), 100 + random(200), 0, 0);
 
 if ((CurrentHedgehog^.MultiShootAttacks = 0) or ((Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NoMoveAfter) = 0))
-    and (GameFlags and gfArtillery = 0) and (cGravityf <> 0) then
+    and (CurrentHedgehog^.Effects[heArtillery] = 0) and (cGravityf <> 0) then
     begin
     tmp:= random(2) + 1;
     Push(0, Actions, Me^, tmp);
@@ -474,7 +474,7 @@
 
             // Hog has no idea what to do. Use tardis or skip
             if not bonuses.activity then
-                if ((HHHasAmmo(Me^.Hedgehog^, amTardis) > 0)) and (CanUseTardis(Me^.Hedgehog^.Gear)) and (random(4) < 3) then
+                if (((GameFlags and gfInfAttack) <> 0) or (not isInMultiShoot)) and ((HHHasAmmo(Me^.Hedgehog^, amTardis) > 0)) and (CanUseTardis(Me^.Hedgehog^.Gear)) and (random(4) < 3) then
                     // Tardis brings hog to a random place. Perfect for clueless AI
                     begin
                     AddAction(BestActions, aia_Weapon, Longword(amTardis), 80, 0, 0);