copypasta to make AI use vampirism too
authornemo
Fri, 18 Mar 2016 13:27:30 -0400
changeset 11613 ed70d59479d7
parent 11610 dc8de75747f9
child 11614 b77870abb3c4
copypasta to make AI use vampirism too
hedgewars/uAI.pas
--- a/hedgewars/uAI.pas	Mon Mar 14 22:04:39 2016 +0300
+++ b/hedgewars/uAI.pas	Fri Mar 18 13:27:30 2016 -0400
@@ -163,6 +163,12 @@
                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
                             end;
+                        if HHHasAmmo(Me^.Hedgehog^, amVampiric) > 0 then
+                            begin
+                            AddAction(BestActions, aia_Weapon, Longword(amVampiric), 80, 0, 0);
+                            AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
+                            AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
+                            end;
                         end;
 
                     AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);