104 |
104 |
105 |
105 |
106 procedure TestAmmos(var Actions: TActions; Me: PGear; rareChecks: boolean); |
106 procedure TestAmmos(var Actions: TActions; Me: PGear; rareChecks: boolean); |
107 var BotLevel: Byte; |
107 var BotLevel: Byte; |
108 ap: TAttackParams; |
108 ap: TAttackParams; |
109 Score, i, dAngle: LongInt; |
109 Score, i, t, n, dAngle: LongInt; |
110 a, aa: TAmmoType; |
110 a, aa: TAmmoType; |
111 begin |
111 begin |
112 BotLevel:= Me^.Hedgehog^.BotLevel; |
112 BotLevel:= Me^.Hedgehog^.BotLevel; |
113 windSpeed:= hwFloat2Float(cWindSpeed); |
113 windSpeed:= hwFloat2Float(cWindSpeed); |
114 |
114 |
180 AddAction(BestActions, aia_attack, aim_push, 1, 0, 0); |
180 AddAction(BestActions, aia_attack, aim_push, 1, 0, 0); |
181 AddAction(BestActions, aia_attack, aim_release, 1, 0, 0); |
181 AddAction(BestActions, aia_attack, aim_release, 1, 0, 0); |
182 end else |
182 end else |
183 if (Ammoz[a].Ammo.Propz and ammoprop_AttackingPut) = 0 then |
183 if (Ammoz[a].Ammo.Propz and ammoprop_AttackingPut) = 0 then |
184 begin |
184 begin |
|
185 if (AmmoTests[a].flags and amtest_MultipleAttacks) = 0 then |
|
186 n:= 1 else n:= ap.AttacksNum; |
|
187 |
185 AddAction(BestActions, aia_attack, aim_push, 650 + random(300), 0, 0); |
188 AddAction(BestActions, aia_attack, aim_push, 650 + random(300), 0, 0); |
|
189 for t:= 2 to n do |
|
190 begin |
|
191 AddAction(BestActions, aia_attack, aim_push, 150, 0, 0); |
|
192 AddAction(BestActions, aia_attack, aim_release, ap.Power, 0, 0); |
|
193 end; |
186 AddAction(BestActions, aia_attack, aim_release, ap.Power, 0, 0); |
194 AddAction(BestActions, aia_attack, aim_release, ap.Power, 0, 0); |
187 end; |
195 end; |
188 |
196 |
189 if (Ammoz[a].Ammo.Propz and ammoprop_Track) <> 0 then |
197 if (Ammoz[a].Ammo.Propz and ammoprop_Track) <> 0 then |
190 begin |
198 begin |