303 end |
303 end |
304 end; |
304 end; |
305 |
305 |
306 procedure AfterAttack; |
306 procedure AfterAttack; |
307 var s: shortstring; |
307 var s: shortstring; |
|
308 a: TAmmoType; |
308 begin |
309 begin |
309 with CurrentHedgehog^.Gear^, |
310 with CurrentHedgehog^.Gear^, |
310 CurrentHedgehog^ do |
311 CurrentHedgehog^ do |
311 begin |
312 begin |
|
313 a:= CurAmmoType; |
312 State:= State and not gstAttacking; |
314 State:= State and not gstAttacking; |
313 if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Effect) = 0 then |
315 if (Ammoz[a].Ammo.Propz and ammoprop_Effect) = 0 then |
314 begin |
316 begin |
315 Inc(MultiShootAttacks); |
317 Inc(MultiShootAttacks); |
316 |
318 |
317 if (Ammoz[CurAmmoType].Ammo.NumPerTurn >= MultiShootAttacks) then |
319 if (Ammoz[a].Ammo.NumPerTurn >= MultiShootAttacks) then |
318 begin |
320 begin |
319 s:= inttostr(Ammoz[CurAmmoType].Ammo.NumPerTurn - MultiShootAttacks + 1); |
321 s:= inttostr(Ammoz[a].Ammo.NumPerTurn - MultiShootAttacks + 1); |
320 AddCaption(format(trmsg[sidRemaining], s), cWhiteColor, capgrpAmmostate); |
322 AddCaption(format(trmsg[sidRemaining], s), cWhiteColor, capgrpAmmostate); |
321 end; |
323 end; |
322 |
324 |
323 if (Ammoz[CurAmmoType].Ammo.NumPerTurn >= MultiShootAttacks) or |
325 if (Ammoz[a].Ammo.NumPerTurn >= MultiShootAttacks) or |
324 ((GameFlags and gfMultiWeapon) <> 0) then |
326 ((GameFlags and gfMultiWeapon) <> 0) then |
325 begin |
327 begin |
326 isInMultiShoot:= true |
328 isInMultiShoot:= true |
327 end |
329 end |
328 else |
330 else |
329 begin |
331 begin |
330 if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) and ((GameFlags and gfInfAttack) = 0) then |
332 OnUsedAmmo(CurrentHedgehog^); |
331 begin |
333 if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) and ((GameFlags and gfInfAttack) = 0) then |
332 TurnTimeLeft:= Ammoz[CurAmmoType].TimeAfterTurn; |
334 TurnTimeLeft:= Ammoz[a].TimeAfterTurn; |
333 State:= State or gstAttacked |
335 if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) then State:= State or gstAttacked; |
334 end; |
336 if (Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0 then ApplyAmmoChanges(CurrentHedgehog^) |
335 if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0 then ApplyAmmoChanges(CurrentHedgehog^); |
|
336 if (GameFlags and gfInfAttack) <> 0 then State:= State or gstAttacked; |
|
337 OnUsedAmmo(CurrentHedgehog^) |
|
338 end; |
337 end; |
339 end |
338 end |
340 else |
339 else |
341 begin |
340 begin |
342 OnUsedAmmo(CurrentHedgehog^); |
341 OnUsedAmmo(CurrentHedgehog^); |