Make AI avoid barrels the more they are damaged
authornemo
Sun, 13 Nov 2011 10:34:35 -0500
changeset 6347 27931e3ceff8
parent 6345 0cf6f1e24dce
child 6349 b10715d6b986
Make AI avoid barrels the more they are damaged
hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Sun Nov 13 09:51:01 2011 -0500
+++ b/hedgewars/uAIMisc.pas	Sun Nov 13 10:34:35 2011 -0500
@@ -147,6 +147,7 @@
                           AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 50, -50)
                       else if (Gear^.State and gstAttacking) <> 0 then
                           AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 100, -50); // mine is on
+          gtExplosives: AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 75, -60+Gear^.Health);
           gtSMine:    AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 50, -30);
           gtDynamite: AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -75);
           gtHedgehog: begin