62 PoisonClan : Longword = 0; // Poisoned own clan members in turn |
62 PoisonClan : Longword = 0; // Poisoned own clan members in turn |
63 PoisonTeam : Longword = 0; // Poisoned own team members in turn |
63 PoisonTeam : Longword = 0; // Poisoned own team members in turn |
64 PoisonTotal : Longword = 0; // Poisoned hogs in whole round |
64 PoisonTotal : Longword = 0; // Poisoned hogs in whole round |
65 KillsClan : LongWord = 0; // Own clan members killed in turn |
65 KillsClan : LongWord = 0; // Own clan members killed in turn |
66 KillsTeam : LongWord = 0; // Own team members killed in turn |
66 KillsTeam : LongWord = 0; // Own team members killed in turn |
67 Kills : LongWord = 0; // Killed hedgehogs in turn |
67 KillsSD : LongWord = 0; // Killed hedgehogs in turn that died by Sudden Death water rise |
|
68 Kills : LongWord = 0; // Killed hedgehogs in turn (including those that died by Sudden Death water rise) |
68 KillsTotal : LongWord = 0; // Total killed hedgehogs in game |
69 KillsTotal : LongWord = 0; // Total killed hedgehogs in game |
69 HitTargets : LongWord = 0; // Target (gtTarget) hits in turn |
70 HitTargets : LongWord = 0; // Target (gtTarget) hits in turn |
70 AmmoUsedCount : Longword = 0; // Number of times an ammo has been used this turn |
71 AmmoUsedCount : Longword = 0; // Number of times an ammo has been used this turn |
71 AmmoDamagingUsed : boolean = false; // true if damaging ammo was used in turn |
72 AmmoDamagingUsed : boolean = false; // true if damaging ammo was used in turn |
72 FirstBlood : boolean = false; // true if the “First blood” taunt has been used in this game |
73 FirstBlood : boolean = false; // true if the “First blood” taunt has been used in this game |
136 if killed then |
137 if killed then |
137 begin |
138 begin |
138 Gear^.Hedgehog^.stats.StepDied:= true; |
139 Gear^.Hedgehog^.stats.StepDied:= true; |
139 inc(Attacker^.stats.StepKills); |
140 inc(Attacker^.stats.StepKills); |
140 inc(Kills); |
141 inc(Kills); |
|
142 |
141 inc(KillsTotal); |
143 inc(KillsTotal); |
142 inc(Attacker^.Team^.stats.Kills); |
144 |
143 if (Attacker^.Team^.TeamName = Gear^.Hedgehog^.Team^.TeamName) then |
145 if bDuringWaterRise then |
144 begin |
146 inc(KillsSD) |
145 inc(Attacker^.Team^.stats.TeamKills); |
147 else |
146 inc(Attacker^.Team^.stats.TeamDamage, Gear^.Damage); |
148 begin |
147 end; |
149 inc(Attacker^.Team^.stats.Kills); |
148 if Gear = Attacker^.Gear then |
150 if (Attacker^.Team^.TeamName = Gear^.Hedgehog^.Team^.TeamName) then |
149 inc(Attacker^.Team^.stats.Suicides); |
151 begin |
150 if Attacker^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then |
152 inc(Attacker^.Team^.stats.TeamKills); |
151 begin |
153 inc(Attacker^.Team^.stats.TeamDamage, Gear^.Damage); |
152 inc(KillsClan); |
154 end; |
153 if Attacker^.Team = Gear^.Hedgehog^.Team then |
155 if Gear = Attacker^.Gear then |
154 inc(KillsTeam); |
156 inc(Attacker^.Team^.stats.Suicides); |
|
157 if Attacker^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then |
|
158 begin |
|
159 inc(KillsClan); |
|
160 if Attacker^.Team = Gear^.Hedgehog^.Team then |
|
161 inc(KillsTeam); |
|
162 end; |
155 end; |
163 end; |
156 end; |
164 end; |
157 |
165 |
158 inc(DamageTotal, Damage); |
166 inc(DamageTotal, Damage); |
159 inc(DamageTurn, Damage) |
167 inc(DamageTurn, Damage) |
248 |
256 |
249 if FinishedTurnsTotal <> 0 then |
257 if FinishedTurnsTotal <> 0 then |
250 begin |
258 begin |
251 s:= ansistring(CurrentHedgehog^.Name); |
259 s:= ansistring(CurrentHedgehog^.Name); |
252 inc(CurrentHedgehog^.stats.FinishedTurns); |
260 inc(CurrentHedgehog^.stats.FinishedTurns); |
253 // If the hog sacrificed (=kamikaze/piano) itself, this needs to be taken into accounts for the reactions later |
261 |
|
262 // killsCheck is used to take deaths into account that were not a traditional "kill" |
|
263 // Hogs that died during SD water rise do not count as "kills" for taunts |
|
264 killsCheck:= KillsSD; |
|
265 // If the hog sacrificed (=kamikaze/piano) itself, this needs to be taken into account for the reactions later |
254 if (CurrentHedgehog^.stats.Sacrificed) then |
266 if (CurrentHedgehog^.stats.Sacrificed) then |
255 killsCheck:= 1 |
267 inc(killsCheck); |
256 else |
|
257 killsCheck:= 0; |
|
258 |
268 |
259 // First blood (first damage, poison or kill) |
269 // First blood (first damage, poison or kill) |
260 if (not FirstBlood) and (ClansCount > 1) and ((DamageTotal > 0) or (KillsTotal > 0) or (PoisonTotal > 0)) and ((CurrentHedgehog^.stats.DamageGiven = DamageTotal) and (CurrentHedgehog^.stats.StepKills = KillsTotal) and (PoisonTotal = PoisonTurn + PoisonClan)) then |
270 if (not FirstBlood) and (ClansCount > 1) and ((DamageTotal > 0) or (KillsTotal > 0) or (PoisonTotal > 0)) and ((CurrentHedgehog^.stats.DamageGiven = DamageTotal) and (CurrentHedgehog^.stats.StepKills = KillsTotal) and (PoisonTotal = PoisonTurn + PoisonClan)) then |
261 begin |
271 begin |
262 FirstBlood:= true; |
272 FirstBlood:= true; |
281 else |
291 else |
282 AddVoice(sndStupid, PreviousTeam^.voicepack) |
292 AddVoice(sndStupid, PreviousTeam^.voicepack) |
283 |
293 |
284 // Hog hurts, poisons or kills own team/clan member. Sacrifice is taken into account |
294 // Hog hurts, poisons or kills own team/clan member. Sacrifice is taken into account |
285 else if (DamageClan <> 0) or (KillsClan > killsCheck) or (PoisonClan <> 0) then |
295 else if (DamageClan <> 0) or (KillsClan > killsCheck) or (PoisonClan <> 0) then |
286 if (DamageTurn > DamageClan) or (Kills > KillsClan) then |
296 if (DamageTurn > DamageClan) or ((Kills-KillsSD) > KillsClan) then |
287 if random(2) = 0 then |
297 if random(2) = 0 then |
288 AddVoice(sndNutter, CurrentTeam^.voicepack) |
298 AddVoice(sndNutter, CurrentTeam^.voicepack) |
289 else |
299 else |
290 AddVoice(sndWatchIt, vpHurtSameClan) |
300 AddVoice(sndWatchIt, vpHurtSameClan) |
291 else |
301 else |