hedgewars/uAIMisc.pas
changeset 7385 4acb5c021cb9
parent 7378 ac9ce7f033df
child 7426 55b49cc1f33a
child 7430 9c132b368ddb
equal deleted inserted replaced
7382:b158940f83e2 7385:4acb5c021cb9
   195             gtHedgehog:
   195             gtHedgehog:
   196                 begin
   196                 begin
   197                 if Gear^.Damage >= Gear^.Health then
   197                 if Gear^.Damage >= Gear^.Health then
   198                     AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25)
   198                     AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25)
   199                 else
   199                 else
   200                     if isAfterAttack and (ThinkingHH^.Hedgehog <> Gear^.Hedgehog) then
   200                     if isAfterAttack
       
   201                       and (ThinkingHH^.Hedgehog <> Gear^.Hedgehog)
       
   202                       and ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_1) then
   201                         if (ClansCount > 2) or (MyClan = Gear^.Hedgehog^.Team^.Clan) then
   203                         if (ClansCount > 2) or (MyClan = Gear^.Hedgehog^.Team^.Clan) then
   202                             AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -3) // hedgehog-friend
   204                             AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -3) // hedgehog-friend
   203                         else
   205                         else
   204                             AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 100, 3)
   206                             AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 100, 3)
   205                 end;
   207                 end;