668 begin |
668 begin |
669 if Gear^.Kind = gtHedgehog then |
669 if Gear^.Kind = gtHedgehog then |
670 begin |
670 begin |
671 tmp:= 0; |
671 tmp:= 0; |
672 if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then |
672 if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then |
673 inc(tmp, min(ModifyDamage(5,Gear), max(0,Gear^.Health - 1 - Gear^.Damage))); |
673 inc(tmp, ModifyDamage(cHealthDecrease, Gear)); |
674 inc(tmp, min(cHealthDecrease, max(0,Gear^.Health - 1 - Gear^.Damage))); |
674 inc(tmp, cHealthDecrease); |
675 if PHedgehog(Gear^.Hedgehog)^.King then |
675 if PHedgehog(Gear^.Hedgehog)^.King then |
676 begin |
676 begin |
677 flag:= false; |
677 flag:= false; |
678 team:= PHedgehog(Gear^.Hedgehog)^.Team; |
678 team:= PHedgehog(Gear^.Hedgehog)^.Team; |
679 for i:= 0 to Pred(team^.HedgehogsNumber) do |
679 for i:= 0 to Pred(team^.HedgehogsNumber) do |
680 if (team^.Hedgehogs[i].Gear <> nil) and |
680 if (team^.Hedgehogs[i].Gear <> nil) and |
681 (not team^.Hedgehogs[i].King) and |
681 (not team^.Hedgehogs[i].King) and |
682 (team^.Hedgehogs[i].Gear^.Health > team^.Hedgehogs[i].Gear^.Damage) |
682 (team^.Hedgehogs[i].Gear^.Health > team^.Hedgehogs[i].Gear^.Damage) |
683 then flag:= true; |
683 then flag:= true; |
684 if not flag then inc(tmp, min(5, max(0,Gear^.Health - 1 - Gear^.Damage))) |
684 if not flag then inc(tmp, cHealthDecrease) |
685 end; |
685 end; |
686 if tmp > 0 then ApplyDamage(Gear, tmp, dsPoison); |
686 if tmp > 0 then |
|
687 begin |
|
688 inc(Gear^.Damage, min(tmp, max(0,Gear^.Health - 1 - Gear^.Damage))); |
|
689 HHHurt(Gear^.Hedgehog, dsPoison); |
|
690 end |
687 end; |
691 end; |
688 |
692 |
689 Gear:= Gear^.NextGear |
693 Gear:= Gear^.NextGear |
690 end; |
694 end; |
691 end; |
695 end; |