AI: Add reuse bonus to SMine (like shotgun)
authorWuzzy <Wuzzy2@mail.ru>
Thu, 08 Oct 2020 14:45:28 +0200
changeset 15766 97a9ac5d4c83
parent 15765 b74ce48abdea
child 15767 bbcf037af2f2
AI: Add reuse bonus to SMine (like shotgun)
hedgewars/uAIAmmoTests.pas
--- a/hedgewars/uAIAmmoTests.pas	Thu Oct 08 14:43:00 2020 +0200
+++ b/hedgewars/uAIAmmoTests.pas	Thu Oct 08 14:45:28 2020 +0200
@@ -1960,6 +1960,9 @@
             end;
         end
 until rTime > 5050 - Level * 800;
+if valueResult <> BadTurn then
+    // 27/20 is reuse bonus
+    valueResult:= valueResult * 27 div 20;
 TestSMine:= valueResult
 end;