hedgewars/uAI.pas
changeset 15524 fbcee515b946
parent 15442 6031c0cfec89
child 15599 dc62f1c13bb2
equal deleted inserted replaced
15523:f4f6060b536c 15524:fbcee515b946
   121             and ((not rareChecks) or ((AmmoTests[a].flags and amtest_Rare) = 0))
   121             and ((not rareChecks) or ((AmmoTests[a].flags and amtest_Rare) = 0))
   122             and ((i = 0) or ((AmmoTests[a].flags and amtest_NoTarget) = 0))
   122             and ((i = 0) or ((AmmoTests[a].flags and amtest_NoTarget) = 0))
   123             then
   123             then
   124             begin
   124             begin
   125 {$HINTS OFF}
   125 {$HINTS OFF}
   126             Score:= AmmoTests[a].proc(Me, Targets.ar[i], BotLevel, ap);
   126             Score:= AmmoTests[a].proc(Me, Targets.ar[i], BotLevel, ap, AmmoTests[a].flags);
   127 {$HINTS ON}
   127 {$HINTS ON}
   128             if (Score > BadTurn) and (Actions.Score + Score > BestActions.Score) then
   128             if (Score > BadTurn) and (Actions.Score + Score > BestActions.Score) then
   129                 if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel - 1) * 2048) then
   129                 if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel - 1) * 2048) then
   130                     begin
   130                     begin
   131                     if useThisActions then
   131                     if useThisActions then