# HG changeset patch # User Wuzzy # Date 1602531517 -7200 # Node ID 82fd124e6512b0a89162ae984ff908306455703f # Parent ff8bd08f7d987d0c9c982a7af51a0a669694b716 AI: Nerf piano rating; AI will now only use it if it expects huge damage diff -r ff8bd08f7d98 -r 82fd124e6512 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Mon Oct 12 01:25:04 2020 +0200 +++ b/hedgewars/uAIAmmoTests.pas Mon Oct 12 21:38:37 2020 +0200 @@ -1967,7 +1967,8 @@ end; function TestPiano(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams; Flags: LongWord): LongInt; -const BOUNCES = 5; +// TODO: Test all 5 bounces +const BOUNCES = 1; // we only test 1 bounce to avoid the rating getting excessively high var X, Y: real; dmg: array[0..BOUNCES-1] of LongInt; i, e, rate, valueResult, targetY: LongInt; @@ -2014,6 +2015,8 @@ for e:= -1 to 1 do begin + // TODO: RateExplosion should remember hogs that already died in the simulation; + // because currently, dead hogs might still be counted for damage rate:= RateExplosion(Me, trunc(X) + 30*e, trunc(Y)+40, 161, afIgnoreMe); if rate <> BadTurn then dmg[i]:= dmg[i] + rate;