tweak cluster test to reduce AI fail a bit, also weaking its overal rating. 0.9.14
authornemo
Sat, 13 Nov 2010 14:56:35 -0500
branch0.9.14
changeset 4296 53d98ea25ac0
parent 4294 5f589af376a5
child 4298 68b29fb094e1
tweak cluster test to reduce AI fail a bit, also weaking its overal rating.
hedgewars/uAIAmmoTests.pas
--- a/hedgewars/uAIAmmoTests.pas	Sat Nov 13 12:59:56 2010 -0500
+++ b/hedgewars/uAIAmmoTests.pas	Sat Nov 13 14:56:35 2010 -0500
@@ -296,7 +296,7 @@
     until TestCollExcludingMe(Me, hwRound(x), hwRound(y), 5) or (t = 0);
     EX:= hwRound(x);
     EY:= hwRound(y);
-    if t < 50 then CheckTrace:= RateExplosion(Me, EX, EY, 81)
+    if t < 50 then CheckTrace:= RateExplosion(Me, EX, EY, 41)
               else CheckTrace:= BadTurn
     end;
 begin
@@ -310,7 +310,7 @@
       Vx:= (int2hwFloat(Targ.X+10) - Me^.X) / int2hwFloat(TestTime + tDelta)
   else
       Vx:= (int2hwFloat(Targ.X-10) - Me^.X) / int2hwFloat(TestTime + tDelta);
-  Vy:= cGravity * ((TestTime + tDelta) div 2) - (int2hwFloat(Targ.Y-25) - Me^.Y) / int2hwFloat(TestTime + tDelta);
+  Vy:= cGravity * ((TestTime + tDelta) div 2) - (int2hwFloat(Targ.Y-150) - Me^.Y) / int2hwFloat(TestTime + tDelta);
   r:= Distance(Vx, Vy);
   if not (r > _1) then
      begin
@@ -318,7 +318,7 @@
      if valueResult < Score then
         begin
         ap.Angle:= DxDy2AttackAngle(Vx, Vy) + AIrndSign(random(Level));
-        ap.Power:= hwRound(r * cMaxPower) + AIrndSign(random(Level) * 15);
+        ap.Power:= hwRound(r * cMaxPower * _0_9) + AIrndSign(random(Level) * 15);
         ap.Time:= TestTime;
         ap.ExplR:= 90;
         ap.ExplX:= EX;