hedgewars/HHHandlers.inc
changeset 2502 f67c603c23b5
parent 2500 31ba68a50208
child 2585 0899ce8ad77f
equal deleted inserted replaced
2501:51ebab1b446d 2502:f67c603c23b5
   232         end else Message:= Message and not gm_Attack;
   232         end else Message:= Message and not gm_Attack;
   233      end
   233      end
   234 end;
   234 end;
   235 
   235 
   236 procedure AfterAttack;
   236 procedure AfterAttack;
       
   237 var s: shortstring;
   237 begin
   238 begin
   238 with CurrentHedgehog^.Gear^,
   239 with CurrentHedgehog^.Gear^,
   239 		CurrentHedgehog^ do
   240 		CurrentHedgehog^ do
   240 	begin
   241 	begin
   241 	State:= State and not gstAttacking;
   242 	State:= State and not gstAttacking;
   242 	if ((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_Utility) = 0 then
   243 	if ((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_Utility) = 0 then
   243 		begin
   244 		begin
   244 		Inc(AttacksNum);
   245 		Inc(AttacksNum);
       
   246 		
   245 		if (Ammo^[CurSlot, CurAmmo].NumPerTurn >= AttacksNum) then
   247 		if (Ammo^[CurSlot, CurAmmo].NumPerTurn >= AttacksNum) then
   246 			AddCaption(inttostr(Ammo^[CurSlot, CurAmmo].NumPerTurn+1-AttacksNum)+' '+trmsg[sidRemaining], $FFFFFF, capgrpAmmostate);
   248 			begin
   247 		isInMultiShoot:= (Ammo^[CurSlot, CurAmmo].NumPerTurn >= AttacksNum) or
   249 			s:= inttostr(Ammo^[CurSlot, CurAmmo].NumPerTurn + 1 - AttacksNum);
   248 				((GameFlags and gfMultiWeapon) <> 0)
   250 			AddCaption(format(trmsg[sidRemaining], s),
       
   251 				$FFFFFF,
       
   252 				capgrpAmmostate);
       
   253 			end;
       
   254 				
       
   255 		if (Ammo^[CurSlot, CurAmmo].NumPerTurn >= AttacksNum) or
       
   256 		((GameFlags and gfMultiWeapon) <> 0) then
       
   257 			begin
       
   258 			isInMultiShoot:= true
       
   259 			end
   249 		else
   260 		else
   250 			begin
   261 			begin
   251 			TurnTimeLeft:= Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].TimeAfterTurn;
   262 			TurnTimeLeft:= Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].TimeAfterTurn;
   252 			State:= State or gstAttacked;
   263 			State:= State or gstAttacked;
   253 			OnUsedAmmo(CurrentHedgehog^);
   264 			OnUsedAmmo(CurrentHedgehog^);