hedgewars/uAI.pas
changeset 139 340ded7cc336
parent 136 89970b70b076
child 143 3dacbd83209b
equal deleted inserted replaced
138:00e8d3693e90 139:340ded7cc336
    73        aa:= a;
    73        aa:= a;
    74        repeat
    74        repeat
    75         if CanUseAmmo[a] then
    75         if CanUseAmmo[a] then
    76            begin
    76            begin
    77            Score:= AmmoTests[a](Me, Targets.ar[i].Point, BotLevel, Time, Angle, Power, ExplX, ExplY, ExplR);
    77            Score:= AmmoTests[a](Me, Targets.ar[i].Point, BotLevel, Time, Angle, Power, ExplX, ExplY, ExplR);
    78            if Actions.Score + Score + Targets.ar[i].Score > BestActions.Score then
    78            if Actions.Score + Score > BestActions.Score then
    79               begin
    79               begin
    80               BestActions:= Actions;
    80               BestActions:= Actions;
    81               inc(BestActions.Score, Score);
    81               inc(BestActions.Score, Score);
    82               AddAction(BestActions, aia_Weapon, Longword(a), 500);
    82               AddAction(BestActions, aia_Weapon, Longword(a), 500);
    83               if Time <> 0 then AddAction(BestActions, aia_Timer, Time div 1000, 400);
    83               if Time <> 0 then AddAction(BestActions, aia_Timer, Time div 1000, 400);