hedgewars/uStats.pas
changeset 12291 e2b30aba00e1
parent 12290 4ce7cb441c75
child 12292 93434ab299a0
equal deleted inserted replaced
12290:4ce7cb441c75 12291:e2b30aba00e1
   131 
   131 
   132     // First blood (first damage, poison or kill)
   132     // First blood (first damage, poison or kill)
   133     if ((DamageTotal > 0) or (KillsTotal > 0) or (PoisonTotal > 0)) and ((CurrentHedgehog^.stats.DamageGiven = DamageTotal) and (CurrentHedgehog^.stats.StepKills = KillsTotal) and (PoisonTotal = PoisonTurn + PoisonClan)) then
   133     if ((DamageTotal > 0) or (KillsTotal > 0) or (PoisonTotal > 0)) and ((CurrentHedgehog^.stats.DamageGiven = DamageTotal) and (CurrentHedgehog^.stats.StepKills = KillsTotal) and (PoisonTotal = PoisonTurn + PoisonClan)) then
   134         AddVoice(sndFirstBlood, CurrentTeam^.voicepack)
   134         AddVoice(sndFirstBlood, CurrentTeam^.voicepack)
   135 
   135 
   136     // Hog hurts or poisons itself
   136     // Hog hurts, poisons or kills itself
   137     else if (CurrentHedgehog^.stats.StepDamageRecv > 0) or (CurrentHedgehog^.stats.StepPoisoned) then
   137     else if (CurrentHedgehog^.stats.StepDamageRecv > 0) or (CurrentHedgehog^.stats.StepPoisoned) or (CurrentHedgehog^.Gear = nil) then
   138         begin
   138         begin
   139         AddVoice(sndStupid, PreviousTeam^.voicepack);
   139         AddVoice(sndStupid, PreviousTeam^.voicepack);
   140         if CurrentHedgehog^.stats.DamageGiven = CurrentHedgehog^.stats.StepDamageRecv then
   140         // Message for hurting itself only (not drowning)
       
   141         if (CurrentHedgehog^.stats.DamageGiven = CurrentHedgehog^.stats.StepDamageRecv) and (CurrentHedgehog^.stats.StepDamageRecv >= 1) then
   141             AddCaption(FormatA(GetEventString(eidHurtSelf), s), cWhiteColor, capgrpMessage);
   142             AddCaption(FormatA(GetEventString(eidHurtSelf), s), cWhiteColor, capgrpMessage);
   142         end
   143         end
   143 
   144 
   144     // Hog hurts, poisons or kills own team/clan member
   145     // Hog hurts, poisons or kills own team/clan member
   145     else if (DamageClan <> 0) or (KillsClan <> 0) or (PoisonClan <> 0) then
   146     else if (DamageClan <> 0) or (KillsClan <> 0) or (PoisonClan <> 0) then