hedgewars/uAmmos.pas
changeset 4148 eaff5615f976
parent 4143 eb7981f34800
child 4234 60920aeb1606
equal deleted inserted replaced
4147:5efa80494e31 4148:eaff5615f976
    90 procedure AddAmmoStore;
    90 procedure AddAmmoStore;
    91 const probability: array [0..8] of LongWord = (0,20,30,60,100,200,400,600,800);
    91 const probability: array [0..8] of LongWord = (0,20,30,60,100,200,400,600,800);
    92 var cnt: Longword;
    92 var cnt: Longword;
    93     a: TAmmoType;
    93     a: TAmmoType;
    94     ammos: TAmmoCounts;
    94     ammos: TAmmoCounts;
    95     substr: shortstring; // TEMPORARY
       
    96 begin
    95 begin
    97 TryDo((byte(ammoLoadout[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoProbability[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoDelay[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoReinforcement[0]) = byte(ord(High(TAmmoType)))), 'Incomplete or missing ammo scheme set (incompatible frontend or demo/save?)', true);
    96 TryDo((byte(ammoLoadout[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoProbability[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoDelay[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoReinforcement[0]) = byte(ord(High(TAmmoType)))), 'Incomplete or missing ammo scheme set (incompatible frontend or demo/save?)', true);
    98 
    97 
    99 inc(StoreCnt);
    98 inc(StoreCnt);
   100 TryDo(StoreCnt <= cMaxHHs, 'Ammo stores overflow', true);
    99 TryDo(StoreCnt <= cMaxHHs, 'Ammo stores overflow', true);