hedgewars/uAIMisc.pas
changeset 13472 d3209e0caf12
parent 13470 0d27f0c21b71
child 13668 2b194214732d
equal deleted inserted replaced
13471:b688e2ca9a8d 13472:d3209e0caf12
   613                     if abs(subrate) > 2000 then inc(Rate,subrate);
   613                     if abs(subrate) > 2000 then inc(Rate,subrate);
   614                     end
   614                     end
   615                 end
   615                 end
   616             end;
   616             end;
   617 
   617 
   618 if hadSkips and (rate = 0) then
   618 if hadSkips and (rate <= 0) then
   619     RealRateExplosion:= BadTurn
   619     RealRateExplosion:= BadTurn
   620 else
   620 else
   621     RealRateExplosion:= rate;
   621     RealRateExplosion:= rate;
   622 end;
   622 end;
   623 
   623 
   699                 end
   699                 end
   700             end
   700             end
   701         else
   701         else
   702             hadSkips:= true;
   702             hadSkips:= true;
   703 
   703 
   704 if hadSkips and (rate = 0) then
   704 if hadSkips and (rate <= 0) then
   705     RateShove:= BadTurn
   705     RateShove:= BadTurn
   706 else
   706 else
   707     RateShove:= rate * 1024;
   707     RateShove:= rate * 1024;
   708 ResetTargets
   708 ResetTargets
   709 end;
   709 end;
   805                     if abs(subrate) > 2000 then inc(Rate,subrate div 1024);
   805                     if abs(subrate) > 2000 then inc(Rate,subrate div 1024);
   806                     end
   806                     end
   807                 end
   807                 end
   808             end;
   808             end;
   809 
   809 
   810 if hadSkips and (rate = 0) then
   810 if hadSkips and (rate <= 0) then
   811     RateShotgun:= BadTurn
   811     RateShotgun:= BadTurn
   812 else
   812 else
   813     RateShotgun:= rate * 1024;
   813     RateShotgun:= rate * 1024;
   814 ResetTargets;
   814 ResetTargets;
   815 end;
   815 end;
   837                     inc(rate, Score div 3)
   837                     inc(rate, Score div 3)
   838                 else
   838                 else
   839                     inc(rate, Score div 3 * friendlyfactor div 100)
   839                     inc(rate, Score div 3 * friendlyfactor div 100)
   840             end;
   840             end;
   841 
   841 
   842 if hadSkips and (rate = 0) then
   842 if hadSkips and (rate <= 0) then
   843     RateHammer:= BadTurn
   843     RateHammer:= BadTurn
   844 else
   844 else
   845     RateHammer:= rate * 1024;
   845     RateHammer:= rate * 1024;
   846 end;
   846 end;
   847 
   847