hedgewars/uAI.pas
changeset 2580 aeccc8f51d3f
parent 2376 ece7b87f1334
child 2599 c7153d2348f3
equal deleted inserted replaced
2579:e5e4ebf528b5 2580:aeccc8f51d3f
   235        Rate:= RatePlace(Me);
   235        Rate:= RatePlace(Me);
   236        if Rate > BestRate then
   236        if Rate > BestRate then
   237           begin
   237           begin
   238           BestActions:= Actions;
   238           BestActions:= Actions;
   239           BestRate:= Rate;
   239           BestRate:= Rate;
   240           Me^.State:= Me^.State or gstAttacked // we have better place, go there and don't use ammo
   240           Me^.State:= Me^.State or gstAttacked // we have better place, go there and do not use ammo
   241           end
   241           end
   242        else if Rate < BestRate then break;
   242        else if Rate < BestRate then break;
   243        if ((Me^.State and gstAttacked) = 0)
   243        if ((Me^.State and gstAttacked) = 0)
   244            and ((steps mod 4) = 0) then TestAmmos(Actions, Me, true);
   244            and ((steps mod 4) = 0) then TestAmmos(Actions, Me, true);
   245        if GoInfo.FallPix >= FallPixForBranching then
   245        if GoInfo.FallPix >= FallPixForBranching then