# HG changeset patch # User Wuzzy # Date 1593977115 -7200 # Node ID 3224d0d970ac12ea69e449eb32f11b93e9b9bcbe # Parent b64f96d43f1f8182db90bd3a0c94ef8ecfbde3ec Teach top AI level to track falling with airstrikes diff -r b64f96d43f1f -r 3224d0d970ac hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Sun Jul 05 21:14:44 2020 +0200 +++ b/hedgewars/uAIAmmoTests.pas Sun Jul 05 21:25:15 2020 +0200 @@ -1445,7 +1445,10 @@ if TestColl(trunc(X) + LongWord(i * 30), trunc(Y), 4) then begin b[i]:= false; - dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 58); + if Level = 1 then + dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 58, afTrackFall or afErasesLand) + else + dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 58); // 58 (instead of 60) for better prediction (hh moves after explosion of one of the rockets) if (not firstHit) then begin @@ -1569,7 +1572,10 @@ // Simulate explosion if collided then begin - dmg[i]:= RateExplosion(Me, trunc(drillX), trunc(drillY), 58); + if Level = 1 then + dmg[i]:= RateExplosion(Me, trunc(drillX), trunc(drillY), 58, afTrackFall or afErasesLand) + else + dmg[i]:= RateExplosion(Me, trunc(drillX), trunc(drillY), 58); // 58 (instead of 60) for better prediction (hh moves after explosion of one of the rockets) if not firstHit then begin @@ -1690,7 +1696,11 @@ if TestColl(trunc(X) + LongWord(i * 30), trunc(Y), 4) then begin b[i]:= false; - dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 96); + if Level = 1 then + dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 96, afTrackFall or afErasesLand) + else + dmg[i]:= RateExplosion(Me, trunc(X) + LongWord(i * 30), trunc(Y), 96); + if (not firstHit) then begin targetY:= trunc(Y);