equal
deleted
inserted
replaced
53 procedure AwareOfExplosion(x, y, r: integer); |
53 procedure AwareOfExplosion(x, y, r: integer); |
54 function RatePlace(Gear: PGear): integer; |
54 function RatePlace(Gear: PGear): integer; |
55 function DxDy2AttackAngle(const _dY, _dX: Extended): integer; |
55 function DxDy2AttackAngle(const _dY, _dX: Extended): integer; |
56 function TestColl(x, y, r: integer): boolean; |
56 function TestColl(x, y, r: integer): boolean; |
57 function RateExplosion(Me: PGear; x, y, r: integer): integer; |
57 function RateExplosion(Me: PGear; x, y, r: integer): integer; |
|
58 function RateShove(Me: PGear; x, y, r, power: integer): integer; |
58 function HHGo(Gear: PGear; out GoInfo: TGoInfo): boolean; |
59 function HHGo(Gear: PGear; out GoInfo: TGoInfo): boolean; |
59 |
60 |
60 var ThinkingHH: PGear; |
61 var ThinkingHH: PGear; |
61 Targets: TTargets; |
62 Targets: TTargets; |
62 |
63 |
214 end; |
215 end; |
215 end; |
216 end; |
216 Result:= Result * 1024 |
217 Result:= Result * 1024 |
217 end; |
218 end; |
218 |
219 |
|
220 function RateShove(Me: PGear; x, y, r, power: integer): integer; |
|
221 var i, dmg: integer; |
|
222 begin |
|
223 Result:= 0; |
|
224 for i:= 0 to Targets.Count do |
|
225 with Targets.ar[i] do |
|
226 begin |
|
227 dmg:= r - Round(sqrt(sqr(Point.x - x) + sqr(Point.y - y))); |
|
228 if dmg > 0 then |
|
229 begin |
|
230 if power > abs(Score) then |
|
231 if Score > 0 then inc(Result, KillScore) |
|
232 else dec(Result, KillScore * 3) |
|
233 else |
|
234 if Score > 0 then inc(Result, power) |
|
235 else dec(Result, power * 3) |
|
236 end; |
|
237 end; |
|
238 Result:= Result * 1024 |
|
239 end; |
|
240 |
219 function HHGo(Gear: PGear; out GoInfo: TGoInfo): boolean; |
241 function HHGo(Gear: PGear; out GoInfo: TGoInfo): boolean; |
220 var pX, pY: integer; |
242 var pX, pY: integer; |
221 begin |
243 begin |
222 Result:= false; |
244 Result:= false; |
223 GoInfo.Ticks:= 0; |
245 GoInfo.Ticks:= 0; |