678 begin |
678 begin |
679 if Gear^.Kind = gtHedgehog then |
679 if Gear^.Kind = gtHedgehog then |
680 begin |
680 begin |
681 tmp:= 0; |
681 tmp:= 0; |
682 if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then |
682 if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then |
|
683 begin |
683 inc(tmp, ModifyDamage(5, Gear)); |
684 inc(tmp, ModifyDamage(5, Gear)); |
|
685 if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth) // does not need a minimum check since <= 1 basically disables it |
|
686 end; |
684 inc(tmp, cHealthDecrease); |
687 inc(tmp, cHealthDecrease); |
|
688 if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth, cHealthDecrease); |
685 if PHedgehog(Gear^.Hedgehog)^.King then |
689 if PHedgehog(Gear^.Hedgehog)^.King then |
686 begin |
690 begin |
687 flag:= false; |
691 flag:= false; |
688 team:= PHedgehog(Gear^.Hedgehog)^.Team; |
692 team:= PHedgehog(Gear^.Hedgehog)^.Team; |
689 for i:= 0 to Pred(team^.HedgehogsNumber) do |
693 for i:= 0 to Pred(team^.HedgehogsNumber) do |
690 if (team^.Hedgehogs[i].Gear <> nil) and |
694 if (team^.Hedgehogs[i].Gear <> nil) and |
691 (not team^.Hedgehogs[i].King) and |
695 (not team^.Hedgehogs[i].King) and |
692 (team^.Hedgehogs[i].Gear^.Health > team^.Hedgehogs[i].Gear^.Damage) |
696 (team^.Hedgehogs[i].Gear^.Health > team^.Hedgehogs[i].Gear^.Damage) |
693 then flag:= true; |
697 then flag:= true; |
694 if not flag then inc(tmp, 5) |
698 if not flag then |
|
699 begin |
|
700 inc(tmp, 5); |
|
701 if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth, 5) |
|
702 end |
695 end; |
703 end; |
696 if tmp > 0 then |
704 if tmp > 0 then |
697 begin |
705 begin |
698 inc(Gear^.Damage, min(tmp, max(0,Gear^.Health - 1 - Gear^.Damage))); |
706 inc(Gear^.Damage, min(tmp, max(0,Gear^.Health - 1 - Gear^.Damage))); |
699 HHHurt(Gear^.Hedgehog, dsPoison); |
707 HHHurt(Gear^.Hedgehog, dsPoison); |