hedgewars/uGears.pas
changeset 3172 ae5c7f97df44
parent 3165 3ec07a7d8456
child 3180 724e094a8912
equal deleted inserted replaced
3171:601f092071e7 3172:ae5c7f97df44
   589 	while Gear <> nil do
   589 	while Gear <> nil do
   590 	begin
   590 	begin
   591 		if Gear^.Kind = gtHedgehog then
   591 		if Gear^.Kind = gtHedgehog then
   592 			begin
   592 			begin
   593             if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then
   593             if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then
       
   594                 begin
   594                 inc(Gear^.Damage, min(5, max(0,Gear^.Health - 1 - Gear^.Damage)));
   595                 inc(Gear^.Damage, min(5, max(0,Gear^.Health - 1 - Gear^.Damage)));
       
   596                 if getRandom(2) = 0 then
       
   597                     PlaySound(sndPoisonCough, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
       
   598                 else
       
   599                     PlaySound(sndPoisonMoan, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
       
   600                 end;
   595             inc(Gear^.Damage, min(cHealthDecrease, max(0,Gear^.Health - 1 - Gear^.Damage)));
   601             inc(Gear^.Damage, min(cHealthDecrease, max(0,Gear^.Health - 1 - Gear^.Damage)));
   596             if PHedgehog(Gear^.Hedgehog)^.King then
   602             if PHedgehog(Gear^.Hedgehog)^.King then
   597                 begin
   603                 begin
   598                 flag:= false;
   604                 flag:= false;
   599                 team:= PHedgehog(Gear^.Hedgehog)^.Team;
   605                 team:= PHedgehog(Gear^.Hedgehog)^.Team;
   634 t:= GearsList;
   640 t:= GearsList;
   635 while t <> nil do
   641 while t <> nil do
   636     begin
   642     begin
   637     Gear:= t;
   643     Gear:= t;
   638     t:= Gear^.NextGear;
   644     t:= Gear^.NextGear;
   639     if (((GameTicks + Gear^.UID * 100) mod 1000) = 0) and (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog <> nil) and (PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned]) and (getRandom(100) = 0) then
       
   640         if getRandom(2) = 0 then
       
   641             PlaySound(sndPoisonCough, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
       
   642         else
       
   643             PlaySound(sndPoisonMoan, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
       
   644 
   645 
   645     if Gear^.Active then
   646     if Gear^.Active then
   646         begin
   647         begin
   647         if Gear^.RenderTimer and (Gear^.Timer > 500) and ((Gear^.Timer mod 1000) = 0) then
   648         if Gear^.RenderTimer and (Gear^.Timer > 500) and ((Gear^.Timer mod 1000) = 0) then
   648             begin
   649             begin