420 end; |
420 end; |
421 gtGasBomb: |
421 gtGasBomb: |
422 begin |
422 begin |
423 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLAutoSound); |
423 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLAutoSound); |
424 for i:= 0 to 2 do |
424 for i:= 0 to 2 do |
425 AddGear(hwRound(Gear^.X) - 30 + GetRandom(60), hwRound(Gear^.Y) - 20 + GetRandom(40), gtPoisonCloud, 0, _0, _0, 0); |
425 AddGear(int64(hwRound(Gear^.X)) - 30 + GetRandom(60), int64(hwRound(Gear^.Y)) - 20 + GetRandom(40), gtPoisonCloud, 0, _0, _0, 0); |
426 end; |
426 end; |
427 end; |
427 end; |
428 DeleteGear(Gear); |
428 DeleteGear(Gear); |
429 exit |
429 exit |
430 end; |
430 end; |
4099 DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy - |
4099 DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy - |
4100 cHHRadius - 14 - hh^.HealthTagTex^.h, hh^.HealthTagTex); |
4100 cHHRadius - 14 - hh^.HealthTagTex^.h, hh^.HealthTagTex); |
4101 DrawCircle(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius, 1.5, 0, 0, $FF, |
4101 DrawCircle(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius, 1.5, 0, 0, $FF, |
4102 $FF); |
4102 $FF); |
4103 |
4103 |
|
4104 doStepHedgehogMoving(hh^.Gear); |
|
4105 |
4104 if ((Gear^.Message and gmUp) <> 0) then begin |
4106 if ((Gear^.Message and gmUp) <> 0) then begin |
4105 if (GameTicks and $F) <> 0 then exit; |
4107 if (GameTicks and $F) <> 0 then exit; |
4106 end else begin |
4108 end else begin |
4107 if (GameTicks and $1FF) <> 0 then exit; |
4109 if (GameTicks and $1FF) <> 0 then exit; |
4108 end; |
4110 end; |
4109 |
4111 |
4110 graves := GearsNear(hh^.Gear, gtGrave, Gear^.Radius); |
4112 graves := GearsNear(hh^.Gear, gtGrave, Gear^.Radius); |
4111 |
4113 |
|
4114 if Length(graves) = 0 then begin |
|
4115 Gear^.Timer := 250; |
|
4116 Gear^.doStep := @doStepIdle; |
|
4117 exit; |
|
4118 end; |
|
4119 |
4112 if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) then begin |
4120 if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) then begin |
4113 i := getRandom(Length(graves)); |
4121 i := getRandom(Length(graves)); |
4114 writeln(i); |
|
4115 dec(hh^.Gear^.Health); |
4122 dec(hh^.Gear^.Health); |
4116 inc(graves[i]^.Health); |
4123 inc(graves[i]^.Health); |
4117 {-for i:= 0 to High(graves) do begin |
4124 {-for i:= 0 to High(graves) do begin |
4118 if hh^.Gear^.Health > 0 then begin |
4125 if hh^.Gear^.Health > 0 then begin |
4119 dec(hh^.Gear^.Health); |
4126 dec(hh^.Gear^.Health); |