hedgewars/GSHandlers.inc
changeset 5716 9505a6f3fe05
parent 5715 59a8dd33f274
child 5722 3b7f2bfc8632
equal deleted inserted replaced
5715:59a8dd33f274 5716:9505a6f3fe05
  4923     begin
  4923     begin
  4924     if (Gear^.Timer = 0) then
  4924     if (Gear^.Timer = 0) then
  4925         begin
  4925         begin
  4926         if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible = 0) then
  4926         if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible = 0) then
  4927             begin
  4927             begin
       
  4928 	    AfterAttack;
  4928             if Gear = CurAmmoGear then CurAmmoGear := nil;
  4929             if Gear = CurAmmoGear then CurAmmoGear := nil;
  4929             DeleteCI(HH^.Gear);
  4930             DeleteCI(HH^.Gear);
  4930             RemoveGearFromList(HH^.Gear);
  4931             RemoveGearFromList(HH^.Gear);
  4931             with HH^.Gear^ do
  4932             with HH^.Gear^ do
  4932                 begin
  4933                 begin
  5007     1. Hog is last of his clan
  5008     1. Hog is last of his clan
  5008     2. Sudden Death is in play
  5009     2. Sudden Death is in play
  5009     3. Hog is a king
  5010     3. Hog is a king
  5010 *)
  5011 *)
  5011     HH:= Gear^.Hedgehog;
  5012     HH:= Gear^.Hedgehog;
  5012     if HH^.Gear <> nil then 
       
  5013         begin
       
  5014         HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack;
       
  5015         HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking;
       
  5016         end;
       
  5017     if (HH^.Gear = nil) or (HH^.King) or (SuddenDeathDmg) then
  5013     if (HH^.Gear = nil) or (HH^.King) or (SuddenDeathDmg) then
  5018         begin
  5014         begin
       
  5015 	if HH^.Gear <> nil then 
       
  5016 	    begin
       
  5017 	    HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack;
       
  5018 	    HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking;
       
  5019 	    end;
  5019         PlaySound(sndDenied);
  5020         PlaySound(sndDenied);
  5020         DeleteGear(gear);
  5021         DeleteGear(gear);
  5021         exit
  5022         exit
  5022         end;
  5023         end;
  5023     cnt:= 0;
  5024     cnt:= 0;
  5027                ((HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.State and gstDrowning) = 0) and
  5028                ((HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.State and gstDrowning) = 0) and
  5028                (HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Health >
  5029                (HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Health >
  5029                 HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Damage) then inc(cnt);
  5030                 HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Damage) then inc(cnt);
  5030     if cnt < 2 then
  5031     if cnt < 2 then
  5031         begin
  5032         begin
       
  5033 	if HH^.Gear <> nil then 
       
  5034 	    begin
       
  5035 	    HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack;
       
  5036 	    HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking;
       
  5037 	    end;
  5032         PlaySound(sndDenied);
  5038         PlaySound(sndDenied);
  5033         DeleteGear(gear);
  5039         DeleteGear(gear);
  5034         exit
  5040         exit
  5035         end;
  5041         end;
  5036     AfterAttack;
       
  5037     Gear^.doStep:= @doStepTardisWarp
  5042     Gear^.doStep:= @doStepTardisWarp
  5038 end;
  5043 end;
  5039 
  5044 
  5040 ////////////////////////////////////////////////////////////////////////////////
  5045 ////////////////////////////////////////////////////////////////////////////////
  5041 
  5046