87 var i, t: LongInt; |
87 var i, t: LongInt; |
88 begin |
88 begin |
89 TryDo(not bBetweenTurns, 'Engine bug: TurnReaction between turns', true); |
89 TryDo(not bBetweenTurns, 'Engine bug: TurnReaction between turns', true); |
90 |
90 |
91 inc(FinishedTurnsTotal); |
91 inc(FinishedTurnsTotal); |
92 if FinishedTurnsTotal = 0 then exit; |
92 if FinishedTurnsTotal <> 0 then |
93 |
93 begin |
94 inc(CurrentHedgehog^.stats.FinishedTurns); |
94 inc(CurrentHedgehog^.stats.FinishedTurns); |
95 |
95 |
96 if (DamageGiven = DamageTotal) and (DamageTotal > 0) then |
96 if (DamageGiven = DamageTotal) and (DamageTotal > 0) then |
97 PlaySound(sndFirstBlood, false) |
97 PlaySound(sndFirstBlood, false) |
98 |
98 |
99 else if CurrentHedgehog^.stats.StepDamageRecv > 0 then |
99 else if CurrentHedgehog^.stats.StepDamageRecv > 0 then |
100 PlaySound(sndStupid, false) |
100 PlaySound(sndStupid, false) |
101 |
101 |
102 else if DamageClan <> 0 then |
102 else if DamageClan <> 0 then |
103 if DamageTotal > DamageClan then |
103 if DamageTotal > DamageClan then |
104 if random(2) = 0 then |
104 if random(2) = 0 then |
105 PlaySound(sndNutter, false) |
105 PlaySound(sndNutter, false) |
|
106 else |
|
107 PlaySound(sndWatchIt, false) |
106 else |
108 else |
107 PlaySound(sndWatchIt, false) |
109 if random(2) = 0 then |
|
110 PlaySound(sndSameTeam, false) |
|
111 else |
|
112 PlaySound(sndTraitor, false) |
|
113 |
|
114 else if DamageGiven <> 0 then |
|
115 if Kills > 0 then |
|
116 PlaySound(sndEnemyDown, false) |
|
117 else |
|
118 PlaySound(sndRegret, false) |
|
119 |
|
120 else if AmmoDamagingUsed then |
|
121 PlaySound(sndMissed, false) |
|
122 else if (AmmoUsedCount > 0) and not isTurnSkipped then |
|
123 // nothing ? |
|
124 else if isTurnSkipped then |
|
125 PlaySound(sndBoring, false) |
108 else |
126 else |
109 if random(2) = 0 then |
127 PlaySound(sndCoward, false); |
110 PlaySound(sndSameTeam, false) |
128 end; |
111 else |
129 |
112 PlaySound(sndTraitor, false) |
130 |
113 |
131 for t:= 0 to Pred(TeamsCount) do // send even on zero turn |
114 else if DamageGiven <> 0 then |
|
115 if Kills > 0 then |
|
116 PlaySound(sndEnemyDown, false) |
|
117 else |
|
118 PlaySound(sndRegret, false) |
|
119 |
|
120 else if AmmoDamagingUsed then |
|
121 PlaySound(sndMissed, false) |
|
122 else if (AmmoUsedCount > 0) and not isTurnSkipped then |
|
123 // nothing ? |
|
124 else if isTurnSkipped then |
|
125 PlaySound(sndBoring, false) |
|
126 else |
|
127 PlaySound(sndCoward, false); |
|
128 |
|
129 |
|
130 for t:= 0 to Pred(TeamsCount) do |
|
131 with TeamsArray[t]^ do |
132 with TeamsArray[t]^ do |
132 for i:= 0 to cMaxHHIndex do |
133 for i:= 0 to cMaxHHIndex do |
133 with Hedgehogs[i].stats do |
134 with Hedgehogs[i].stats do |
134 begin |
135 begin |
135 inc(DamageRecv, StepDamageRecv); |
136 inc(DamageRecv, StepDamageRecv); |