hedgewars/uAIMisc.pas
changeset 6773 46cd5dad1a28
parent 6772 13d13aefa4de
child 6774 237b96f06aae
equal deleted inserted replaced
6772:13d13aefa4de 6773:46cd5dad1a28
   317                 dX:= 0.005 * dmg + 0.01;
   317                 dX:= 0.005 * dmg + 0.01;
   318                 dY:= dX;
   318                 dY:= dX;
   319                 end;
   319                 end;
   320             if (Flags and 1 <> 0) and TraceDrown(x, y, Point.x, Point.y, dX, dY, erasure) then
   320             if (Flags and 1 <> 0) and TraceDrown(x, y, Point.x, Point.y, dX, dY, erasure) then
   321                 if Score > 0 then
   321                 if Score > 0 then
   322                     inc(rate, KillScore + Score)   // Add a bit of a bonus for bigger hog drownings
   322                     inc(rate, KillScore + Score div 10)   // Add a bit of a bonus for bigger hog drownings
   323                 else
   323                 else
   324                     dec(rate, KillScore * friendlyfactor div 100 - Score) // and more of a punishment for drowning bigger friendly hogs
   324                     dec(rate, KillScore * friendlyfactor div 100 - Score div 10) // and more of a punishment for drowning bigger friendly hogs
   325             else if dmg >= abs(Score) then
   325             else if dmg >= abs(Score) then
   326                 if Score > 0 then
   326                 if Score > 0 then
   327                     inc(rate, KillScore)
   327                     inc(rate, KillScore)
   328                 else
   328                 else
   329                     dec(rate, KillScore * friendlyfactor div 100)
   329                     dec(rate, KillScore * friendlyfactor div 100)