319 end; |
319 end; |
320 end; |
320 end; |
321 |
321 |
322 uStats.HedgehogDamaged(Gear, AttackerHog, Damage, false); |
322 uStats.HedgehogDamaged(Gear, AttackerHog, Damage, false); |
323 |
323 |
324 if AprilOne and (Gear^.Hedgehog^.Hat = 'fr_tomato') and (Damage > 2) then |
324 if AprilOne and (Gear^.Hedgehog^.Hat = 'fr_tomato') and (Damage > 2) then |
325 for i := 0 to random(min(Damage,20))+5 do |
325 for i := 0 to random(min(Damage,20))+5 do |
326 begin |
326 begin |
327 vg:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtStraightShot); |
327 vg:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtStraightShot); |
328 if vg <> nil then |
328 if vg <> nil then |
329 with vg^ do |
329 with vg^ do |
330 begin |
330 begin |
331 dx:= 0.001 * (random(100)+10); |
331 dx:= 0.001 * (random(100)+10); |
332 dy:= 0.001 * (random(100)+10); |
332 dy:= 0.001 * (random(100)+10); |
333 tdy:= -cGravityf; |
333 tdy:= -cGravityf; |
334 if random(2) = 0 then |
334 if random(2) = 0 then |
335 dx := -dx; |
335 dx := -dx; |
336 FrameTicks:= random(500) + 1000; |
336 FrameTicks:= random(500) + 1000; |
337 State:= ord(sprBubbles); |
337 State:= ord(sprBubbles); |
338 Tint:= $ff0000ff |
338 Tint:= $ff0000ff |
|
339 end |
339 end |
340 end |
340 end |
341 end else if AttackerHog <> nil then |
341 end else |
342 Gear^.Hedgehog:= AttackerHog; |
342 Gear^.Hedgehog:= AttackerHog; |
|
343 inc(Gear^.Damage, Damage); |
343 inc(Gear^.Damage, Damage); |
344 |
344 |
345 ScriptCall('onGearDamage', Gear^.UID, Damage); |
345 ScriptCall('onGearDamage', Gear^.UID, Damage); |
346 end; |
346 end; |
347 |
347 |