# HG changeset patch
# User unc0rr
# Date 1368734761 -14400
# Node ID 896c6b21c87fc432a612ebb48b0ca708a102ef15
# Parent  2e4cf893c0602b440a682f17bf76b711234827c0
Best level AI should maximize the score at all costs.

diff -r 2e4cf893c060 -r 896c6b21c87f hedgewars/uAI.pas
--- a/hedgewars/uAI.pas	Thu May 16 17:33:25 2013 +0200
+++ b/hedgewars/uAI.pas	Fri May 17 00:06:01 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);