# HG changeset patch # User nemo # Date 1365121901 14400 # Node ID 85eb1f4b4a5f210fc2e810ef09198f6b3e66329f # Parent b216fe93bab191a355ee00b528ea7c2bd38afb83 drill test tweak based on watching AI play diff -r b216fe93bab1 -r 85eb1f4b4a5f hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Thu Apr 04 15:54:34 2013 -0400 +++ b/hedgewars/uAIAmmoTests.pas Thu Apr 04 20:31:41 2013 -0400 @@ -249,6 +249,8 @@ end; EX:= trunc(x); EY:= trunc(y); + // Try to prevent AI from thinking firing into water will cause a drowning + if (EY < cWaterLine-5) and (Timer > 0) and (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) > 21) then exit(BadTurn); if Level = 1 then value:= RateExplosion(Me, EX, EY, 101, afTrackFall or afErasesLand) else value:= RateExplosion(Me, EX, EY, 101);