merge
authorunc0rr
Fri, 17 May 2013 00:08:05 +0400
changeset 9008 e9d88f2522f4
parent 9005 15a6ed0bd074 (diff)
parent 9007 9705ac06bab4 (current diff)
child 9009 f8e9d1147dd8
merge
--- a/hedgewars/uAI.pas	Thu May 16 20:05:43 2013 +0200
+++ b/hedgewars/uAI.pas	Fri May 17 00:08:05 2013 +0400
@@ -129,7 +129,7 @@
             Score:= AmmoTests[a].proc(Me, Targets.ar[i], BotLevel, ap);
 {$HINTS ON}
             if Actions.Score + Score > BestActions.Score then
-                if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel) * 2048) then
+                if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel - 1) * 2048) then
                     begin
                     BestActions:= Actions;
                     inc(BestActions.Score, Score);
--- a/hedgewars/uAIAmmoTests.pas	Thu May 16 20:05:43 2013 +0200
+++ b/hedgewars/uAIAmmoTests.pas	Fri May 17 00:08:05 2013 +0400
@@ -607,8 +607,8 @@
     if (EY < cWaterLine) and (dY >= 0) then
         begin
         Score:= RateExplosion(Me, EX, EY, 91);
-        if (Score = 0) and (Targ.Kind = gtHedgehog) and (Targ.Score > 0) then
-            if (dY > 0.15) then
+        if (Score = 0) then
+            if (dY > 0.15) and (Targ.Kind = gtHedgehog) and (Targ.Score > 0) then
                 Score:= - abs(Targ.Point.Y - EY) div 32
             else
                 Score:= BadTurn