hedgewars/uStats.pas
changeset 14409 9561bf634b21
parent 14371 2ab312c47dc3
child 14470 ca851d0957cf
equal deleted inserted replaced
14408:8af01d65ccda 14409:9561bf634b21
    65     Kills       : LongWord = 0;
    65     Kills       : LongWord = 0;
    66     KillsTotal  : LongWord = 0;
    66     KillsTotal  : LongWord = 0;
    67     HitTargets  : LongWord = 0; // Target (gtTarget) hits per turn
    67     HitTargets  : LongWord = 0; // Target (gtTarget) hits per turn
    68     AmmoUsedCount : Longword = 0;
    68     AmmoUsedCount : Longword = 0;
    69     AmmoDamagingUsed : boolean = false;
    69     AmmoDamagingUsed : boolean = false;
       
    70     FirstBlood  : boolean = false;
    70     LeaveMeAlone : boolean = false;
    71     LeaveMeAlone : boolean = false;
    71     SkippedTurns: LongWord = 0;
    72     SkippedTurns: LongWord = 0;
    72     isTurnSkipped: boolean = false;
    73     isTurnSkipped: boolean = false;
    73     vpHurtSameClan: PVoicepack = nil;
    74     vpHurtSameClan: PVoicepack = nil;
    74     vpHurtEnemy: PVoicepack = nil;
    75     vpHurtEnemy: PVoicepack = nil;
   252         killsCheck:= 1
   253         killsCheck:= 1
   253     else
   254     else
   254         killsCheck:= 0;
   255         killsCheck:= 0;
   255 
   256 
   256     // First blood (first damage, poison or kill)
   257     // First blood (first damage, poison or kill)
   257     if ((DamageTotal > 0) or (KillsTotal > 0) or (PoisonTotal > 0)) and ((CurrentHedgehog^.stats.DamageGiven = DamageTotal) and (CurrentHedgehog^.stats.StepKills = KillsTotal) and (PoisonTotal = PoisonTurn + PoisonClan)) then
   258     if (not FirstBlood) and ((DamageTotal > 0) or (KillsTotal > 0) or (PoisonTotal > 0)) and ((CurrentHedgehog^.stats.DamageGiven = DamageTotal) and (CurrentHedgehog^.stats.StepKills = KillsTotal) and (PoisonTotal = PoisonTurn + PoisonClan)) then
   258         AddVoice(sndFirstBlood, CurrentTeam^.voicepack)
   259         begin
       
   260         FirstBlood:= true;
       
   261         AddVoice(sndFirstBlood, CurrentTeam^.voicepack);
       
   262         end
   259 
   263 
   260     // Hog hurts, poisons or kills itself (except sacrifice)
   264     // Hog hurts, poisons or kills itself (except sacrifice)
   261     else if (CurrentHedgehog^.stats.Sacrificed = false) and ((CurrentHedgehog^.stats.StepDamageRecv > 0) or (CurrentHedgehog^.stats.StepPoisoned) or (CurrentHedgehog^.stats.StepDied)) then
   265     else if (CurrentHedgehog^.stats.Sacrificed = false) and ((CurrentHedgehog^.stats.StepDamageRecv > 0) or (CurrentHedgehog^.stats.StepPoisoned) or (CurrentHedgehog^.stats.StepDied)) then
   262         // Hurt itself only (without dying)
   266         // Hurt itself only (without dying)
   263         if (CurrentHedgehog^.stats.StepDamageGiven = CurrentHedgehog^.stats.StepDamageRecv) and (CurrentHedgehog^.stats.StepDamageRecv >= 1) and (not CurrentHedgehog^.stats.StepDied) then
   267         if (CurrentHedgehog^.stats.StepDamageGiven = CurrentHedgehog^.stats.StepDamageRecv) and (CurrentHedgehog^.stats.StepDamageRecv >= 1) and (not CurrentHedgehog^.stats.StepDied) then
   596     Kills       := 0;
   600     Kills       := 0;
   597     KillsTotal  := 0;
   601     KillsTotal  := 0;
   598     HitTargets  := 0;
   602     HitTargets  := 0;
   599     AmmoUsedCount := 0;
   603     AmmoUsedCount := 0;
   600     AmmoDamagingUsed := false;
   604     AmmoDamagingUsed := false;
       
   605     FirstBlood:= false;
   601     LeaveMeAlone := false;
   606     LeaveMeAlone := false;
   602     SkippedTurns:= 0;
   607     SkippedTurns:= 0;
   603     isTurnSkipped:= false;
   608     isTurnSkipped:= false;
   604     vpHurtSameClan:= nil;
   609     vpHurtSameClan:= nil;
   605     vpHurtEnemy:= nil;
   610     vpHurtEnemy:= nil;