# HG changeset patch # User Wuzzy # Date 1594036301 -7200 # Node ID 31ca6451056a1aef9467e7fd4aea783209b3e0bf # Parent 326b024a24e3dfac416fcbe1a9e5fae6cb0e8306 AI: 0.01% chance to use kamikaze with "wishes" ;-) diff -r 326b024a24e3 -r 31ca6451056a hedgewars/uAI.pas --- a/hedgewars/uAI.pas Mon Jul 06 12:46:22 2020 +0200 +++ b/hedgewars/uAI.pas Mon Jul 06 13:51:41 2020 +0200 @@ -241,6 +241,14 @@ if (a = amResurrector) and (BotLevel < 4) then AddAction(BestActions, aia_Up, aim_release, ap.Power, 0, 0); AddAction(BestActions, aia_attack, aim_release, ap.Power, 0, 0); + + // Just for fun: 0.01% chance for kamikaze with "wishes" ;-) + if (a = amKamikaze) and (random(10000) = 0) then + begin + AddAction(BestActions, aia_Switch, 0, 1, 0, 0); + AddAction(BestActions, aia_Precise, aim_push, 1, 0, 0); + AddAction(BestActions, aia_Precise, aim_release, 5000, 0, 0); + end; end; if (Ammoz[a].Ammo.Propz and ammoprop_Track) <> 0 then