51 |
51 |
52 implementation |
52 implementation |
53 uses uSound, uLocale, uVariables, uUtils, uIO, uCaptions, uMisc, uConsole, uScript; |
53 uses uSound, uLocale, uVariables, uUtils, uIO, uCaptions, uMisc, uConsole, uScript; |
54 |
54 |
55 var DamageClan : Longword = 0; |
55 var DamageClan : Longword = 0; |
|
56 DamageTeam : Longword = 0; |
56 DamageTotal : Longword = 0; |
57 DamageTotal : Longword = 0; |
57 DamageTurn : Longword = 0; |
58 DamageTurn : Longword = 0; |
58 PoisonTurn : Longword = 0; // Poisoned enemies per turn |
59 PoisonTurn : Longword = 0; // Poisoned enemies per turn |
59 PoisonClan : Longword = 0; // Poisoned own clan members in turn |
60 PoisonClan : Longword = 0; // Poisoned own clan members in turn |
|
61 PoisonTeam : Longword = 0; // Poisoned own team members in turn |
60 PoisonTotal : Longword = 0; // Poisoned hogs in whole round |
62 PoisonTotal : Longword = 0; // Poisoned hogs in whole round |
61 KillsClan : LongWord = 0; |
63 KillsClan : LongWord = 0; |
|
64 KillsTeam : LongWord = 0; |
62 Kills : LongWord = 0; |
65 Kills : LongWord = 0; |
63 KillsTotal : LongWord = 0; |
66 KillsTotal : LongWord = 0; |
64 HitTargets : LongWord = 0; // Target (gtTarget) hits per turn |
67 HitTargets : LongWord = 0; // Target (gtTarget) hits per turn |
65 AmmoUsedCount : Longword = 0; |
68 AmmoUsedCount : Longword = 0; |
66 AmmoDamagingUsed : boolean = false; |
69 AmmoDamagingUsed : boolean = false; |
70 vpHurtSameClan: PVoicepack = nil; |
73 vpHurtSameClan: PVoicepack = nil; |
71 vpHurtEnemy: PVoicepack = nil; |
74 vpHurtEnemy: PVoicepack = nil; |
72 |
75 |
73 procedure HedgehogPoisoned(Gear: PGear; Attacker: PHedgehog); |
76 procedure HedgehogPoisoned(Gear: PGear; Attacker: PHedgehog); |
74 begin |
77 begin |
75 if Attacker^.Team^.Clan = Gear^.HEdgehog^.Team^.Clan then |
78 if Attacker^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then |
76 begin |
79 begin |
77 vpHurtSameClan:= CurrentHedgehog^.Team^.voicepack; |
80 vpHurtSameClan:= Gear^.Hedgehog^.Team^.voicepack; |
78 inc(PoisonClan) |
81 inc(PoisonClan); |
|
82 if Attacker^.Team = Gear^.Hedgehog^.Team then |
|
83 inc(PoisonTeam); |
79 end |
84 end |
80 else |
85 else |
81 begin |
86 begin |
82 vpHurtEnemy:= Gear^.Hedgehog^.Team^.voicepack; |
87 vpHurtEnemy:= Gear^.Hedgehog^.Team^.voicepack; |
83 inc(PoisonTurn) |
88 inc(PoisonTurn) |
121 |
126 |
122 inc(Attacker^.stats.StepDamageGiven, Damage); |
127 inc(Attacker^.stats.StepDamageGiven, Damage); |
123 inc(Gear^.Hedgehog^.stats.StepDamageRecv, Damage); |
128 inc(Gear^.Hedgehog^.stats.StepDamageRecv, Damage); |
124 |
129 |
125 if CurrentHedgehog^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then inc(DamageClan, Damage); |
130 if CurrentHedgehog^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then inc(DamageClan, Damage); |
|
131 if CurrentHedgehog^.Team = Gear^.Hedgehog^.Team then inc(DamageTeam, Damage); |
126 |
132 |
127 if killed then |
133 if killed then |
128 begin |
134 begin |
129 Gear^.Hedgehog^.stats.StepDied:= true; |
135 Gear^.Hedgehog^.stats.StepDied:= true; |
130 inc(Attacker^.stats.StepKills); |
136 inc(Attacker^.stats.StepKills); |
137 inc(Attacker^.Team^.stats.TeamDamage, Gear^.Damage); |
143 inc(Attacker^.Team^.stats.TeamDamage, Gear^.Damage); |
138 end; |
144 end; |
139 if Gear = Attacker^.Gear then |
145 if Gear = Attacker^.Gear then |
140 inc(Attacker^.Team^.stats.Suicides); |
146 inc(Attacker^.Team^.stats.Suicides); |
141 if Attacker^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then |
147 if Attacker^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then |
|
148 begin |
142 inc(KillsClan); |
149 inc(KillsClan); |
|
150 if Attacker^.Team = Gear^.Hedgehog^.Team then |
|
151 inc(KillsTeam); |
|
152 end; |
143 end; |
153 end; |
144 |
154 |
145 inc(DamageTotal, Damage); |
155 inc(DamageTotal, Damage); |
146 inc(DamageTurn, Damage) |
156 inc(DamageTurn, Damage) |
147 end; |
157 end; |
271 if random(2) = 0 then |
281 if random(2) = 0 then |
272 AddVoice(sndNutter, CurrentTeam^.voicepack) |
282 AddVoice(sndNutter, CurrentTeam^.voicepack) |
273 else |
283 else |
274 AddVoice(sndWatchIt, vpHurtSameClan) |
284 AddVoice(sndWatchIt, vpHurtSameClan) |
275 else |
285 else |
276 if random(2) = 0 then |
286 // Attacked same team |
|
287 if (random(2) = 0) and ((DamageTeam <> 0) or (KillsTeam > killsCheck) or (PoisonTeam <> 0)) then |
277 AddVoice(sndSameTeam, vpHurtSameClan) |
288 AddVoice(sndSameTeam, vpHurtSameClan) |
|
289 // Attacked same team or a clan member |
278 else |
290 else |
279 AddVoice(sndTraitor, vpHurtSameClan) |
291 AddVoice(sndTraitor, vpHurtSameClan) |
280 |
292 |
281 // Hog hurts, kills or poisons enemy |
293 // Hog hurts, kills or poisons enemy |
282 else if (CurrentHedgehog^.stats.StepDamageGiven <> 0) or (CurrentHedgehog^.stats.StepKills > killsCheck) or (PoisonTurn <> 0) then |
294 else if (CurrentHedgehog^.stats.StepDamageGiven <> 0) or (CurrentHedgehog^.stats.StepKills > killsCheck) or (PoisonTurn <> 0) then |