855 |
854 |
856 Gear^.Hedgehog^.Gear:= nil; |
855 Gear^.Hedgehog^.Gear:= nil; |
857 |
856 |
858 if Gear^.Hedgehog^.King then |
857 if Gear^.Hedgehog^.King then |
859 begin |
858 begin |
860 // are there any other kings left? Just doing nil check. Presumably a mortally wounded king will get reaped soon enough |
859 Gear^.Hedgehog^.Team^.hasKing:= false; |
861 k:= false; |
|
862 for i:= 0 to Pred(team^.Clan^.TeamsNumber) do |
860 for i:= 0 to Pred(team^.Clan^.TeamsNumber) do |
863 if (team^.Clan^.Teams[i]^.Hedgehogs[0].Gear <> nil) then |
861 with team^.Clan^.Teams[i]^ do |
864 k:= true; |
862 for t:= 0 to cMaxHHIndex do |
865 if not k then |
863 if Hedgehogs[t].Gear <> nil then |
866 for i:= 0 to Pred(team^.Clan^.TeamsNumber) do |
864 Hedgehogs[t].Gear^.Health:= 0 |
867 with team^.Clan^.Teams[i]^ do |
865 else if (Hedgehogs[t].GearHidden <> nil) then |
868 for t:= 0 to cMaxHHIndex do |
866 Hedgehogs[t].GearHidden^.Health:= 0 // hog is still hidden. if tardis should return though, lua, eh... |
869 if Hedgehogs[t].Gear <> nil then |
|
870 Hedgehogs[t].Gear^.Health:= 0 |
|
871 else if (Hedgehogs[t].GearHidden <> nil) then |
|
872 Hedgehogs[t].GearHidden^.Health:= 0 // hog is still hidden. if tardis should return though, lua, eh... |
|
873 end; |
867 end; |
874 |
868 |
875 // should be not CurrentHedgehog, but hedgehog of the last gear which caused damage to this hog |
869 // should be not CurrentHedgehog, but hedgehog of the last gear which caused damage to this hog |
876 // same stand for CheckHHDamage |
870 // same stand for CheckHHDamage |
877 if (Gear^.LastDamage <> nil) and (CurrentHedgehog <> nil) then |
871 if (Gear^.LastDamage <> nil) and (CurrentHedgehog <> nil) then |