hedgewars/uAI.pas
changeset 791 928d2830fd0c
parent 741 8bf8c0ac8d94
child 883 07a568ba44e0
equal deleted inserted replaced
790:a6f442173822 791:928d2830fd0c
   218 
   218 
   219        if (BotLevel < 5) and (GoInfo.JumpType = jmpHJump) then // hjump support
   219        if (BotLevel < 5) and (GoInfo.JumpType = jmpHJump) then // hjump support
   220           if Push(ticks, Actions, AltMe, Me^.Message) then
   220           if Push(ticks, Actions, AltMe, Me^.Message) then
   221              with Stack.States[Pred(Stack.Count)] do
   221              with Stack.States[Pred(Stack.Count)] do
   222                   begin
   222                   begin
   223                   AddAction(MadeActions, aia_HJump, 0, 305, 0, 0);
   223                   if Me^.dX.isNegative then AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0)
       
   224                                        else AddAction(MadeActions, aia_LookLeft, 0, 200, 0, 0);
       
   225                   AddAction(MadeActions, aia_HJump, 0, 305 + random(50), 0, 0);
   224                   AddAction(MadeActions, aia_HJump, 0, 350, 0, 0);
   226                   AddAction(MadeActions, aia_HJump, 0, 350, 0, 0);
       
   227                   if Me^.dX.isNegative then AddAction(MadeActions, aia_LookLeft, 0, 200, 0, 0)
       
   228                                        else AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0);
   225                   end;
   229                   end;
   226        if (BotLevel < 3) and (GoInfo.JumpType = jmpLJump) then // ljump support
   230        if (BotLevel < 3) and (GoInfo.JumpType = jmpLJump) then // ljump support
   227           if Push(ticks, Actions, AltMe, Me^.Message) then
   231           if Push(ticks, Actions, AltMe, Me^.Message) then
   228              with Stack.States[Pred(Stack.Count)] do
   232              with Stack.States[Pred(Stack.Count)] do
   229                   AddAction(MadeActions, aia_LJump, 0, 305, 0, 0);
   233                   AddAction(MadeActions, aia_LJump, 0, 305 + random(50), 0, 0);
   230 
   234 
   231        if not CanGo then break;
   235        if not CanGo then break;
   232        inc(steps);
   236        inc(steps);
   233        Actions.actions[Pred(Actions.Count)].Param:= hwRound(Me^.X);
   237        Actions.actions[Pred(Actions.Count)].Param:= hwRound(Me^.X);
   234        Rate:= RatePlace(Me);
   238        Rate:= RatePlace(Me);