hedgewars/uAIMisc.pas
changeset 6396 71dd6b8494e5
parent 6347 27931e3ceff8
child 6474 42e9773eedfd
equal deleted inserted replaced
6395:bb04d7a9f7e2 6396:71dd6b8494e5
   141           gtFlame: if (Gear^.State and gsttmpFlag) <> 0 then
   141           gtFlame: if (Gear^.State and gsttmpFlag) <> 0 then
   142                   AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 20, -50);
   142                   AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 20, -50);
   143 // avoid mines unless they are very likely to be duds, or are duds. also avoid if they are about to blow 
   143 // avoid mines unless they are very likely to be duds, or are duds. also avoid if they are about to blow 
   144           gtMine:  if ((Gear^.State and gstAttacking) = 0) and 
   144           gtMine:  if ((Gear^.State and gstAttacking) = 0) and 
   145                       (((cMineDudPercent < 90) and (Gear^.Health <> 0)) or
   145                       (((cMineDudPercent < 90) and (Gear^.Health <> 0)) or
   146                        ((Gear^.Health = 0) and (Gear^.Damage > 30))) then
   146                        (isAfterAttack and (Gear^.Health = 0) and (Gear^.Damage > 30))) then
   147                           AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 50, -50)
   147                           AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 50, -50)
   148                       else if (Gear^.State and gstAttacking) <> 0 then
   148                       else if (Gear^.State and gstAttacking) <> 0 then
   149                           AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 100, -50); // mine is on
   149                           AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 100, -50); // mine is on
   150           gtExplosives: AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 75, -60+Gear^.Health);
   150           gtExplosives: if isAfterAttack then AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 75, -60+Gear^.Health);
   151           gtSMine:    AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 50, -30);
   151           gtSMine:    AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 50, -30);
   152           gtDynamite: AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -75);
   152           gtDynamite: AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -75);
   153           gtHedgehog: begin
   153           gtHedgehog: begin
   154                       if Gear^.Damage >= Gear^.Health then
   154                       if Gear^.Damage >= Gear^.Health then
   155                           AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25)
   155                           AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25)