hedgewars/uAI.pas
changeset 7375 16ae2e1c9005
parent 7250 304d3d98662e
child 7416 2f2f78fc65a3
--- a/hedgewars/uAI.pas	Mon Jul 09 23:28:02 2012 -0400
+++ b/hedgewars/uAI.pas	Wed Jul 11 22:18:43 2012 -0400
@@ -336,7 +336,9 @@
 switchesNum:= 0;
 
 switchImmediatelyAvailable:= (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtSwitcher);
-switchCount:= HHHasAmmo(PGear(Me)^.Hedgehog^, amSwitch);
+if PGear(Me)^.Hedgehog^.BotLevel <> 5 then
+    switchCount:= HHHasAmmo(PGear(Me)^.Hedgehog^, amSwitch)
+else switchCount:= 0;
 
 if (PGear(Me)^.State and gstAttacked) = 0 then
     if Targets.Count > 0 then
@@ -390,6 +392,11 @@
     BackMe:= PGear(Me)^;
     while (not StopThinking) and (BestActions.Count = 0) do
         begin
+(*
+        // Maybe this would get a bit of movement out of them? Hopefully not *toward* water. Need to check how often he'd choose that strategy
+        if SuddenDeathDmg and ((hwRound(BackMe.Y)+cWaterRise*2) > cWaterLine) then
+            AddBonus(hwRound(BackMe.X), hwRound(BackMe.Y), 250, -40);
+*)
         FillBonuses(true);
         WalkMe:= BackMe;
         Actions.Count:= 0;