245 |
245 |
246 procedure Walk(Me: PGear; var Actions: TActions); |
246 procedure Walk(Me: PGear; var Actions: TActions); |
247 const FallPixForBranching = cHHRadius; |
247 const FallPixForBranching = cHHRadius; |
248 var |
248 var |
249 maxticks, oldticks, steps, tmp: Longword; |
249 maxticks, oldticks, steps, tmp: Longword; |
250 BaseRate, BestRate, Rate: LongInt; |
250 BaseRate, BestRate, Rate, i: LongInt; |
251 GoInfo: TGoInfo; |
251 GoInfo: TGoInfo; |
252 CanGo: boolean; |
252 CanGo: boolean; |
253 AltMe: TGear; |
253 AltMe: TGear; |
254 BotLevel: Byte; |
254 BotLevel: Byte; |
255 a: TAmmoType; |
255 a: TAmmoType; |
319 begin |
319 begin |
320 BestActions.Count:= 0; |
320 BestActions.Count:= 0; |
321 AddAction(BestActions, aia_Weapon, Longword(amExtraTime), 80, 0, 0); |
321 AddAction(BestActions, aia_Weapon, Longword(amExtraTime), 80, 0, 0); |
322 AddAction(BestActions, aia_attack, aim_push, 10, 0, 0); |
322 AddAction(BestActions, aia_attack, aim_push, 10, 0, 0); |
323 AddAction(BestActions, aia_attack, aim_release, 10, 0, 0); |
323 AddAction(BestActions, aia_attack, aim_release, 10, 0, 0); |
|
324 // Better bot levels know they can spam extra time if infinite |
|
325 if (BotLevel < 3) and (HHHasAmmo(Me^.Hedgehog^, amExtraTime) = AMMO_INFINITE) then |
|
326 for i:= 1 to 3 do |
|
327 begin |
|
328 AddAction(BestActions, aia_attack, aim_push, 100, 0, 0); |
|
329 AddAction(BestActions, aia_attack, aim_release, 100, 0, 0); |
|
330 end; |
324 end; |
331 end; |
325 |
332 |
326 break; |
333 break; |
327 end; |
334 end; |
328 |
335 |