hedgewars/uScript.pas
changeset 13457 38814954a248
parent 13456 794dcf69a5aa
child 13467 854caa3c9212
equal deleted inserted replaced
13456:794dcf69a5aa 13457:38814954a248
  2602         begin
  2602         begin
  2603         at:= LuaToAmmoTypeOrd(L, 1, call, params);
  2603         at:= LuaToAmmoTypeOrd(L, 1, call, params);
  2604         if at >= 0 then
  2604         if at >= 0 then
  2605             begin
  2605             begin
  2606             // Ammo count
  2606             // Ammo count
  2607             i:= Ammoz[TAmmoType(at)].Ammo.Count;
  2607             i:= InitialAmmoCounts[TAmmoType(at)];
  2608             if i = AMMO_INFINITE then
  2608             if i = AMMO_INFINITE then
  2609                 i:= 9;
  2609                 i:= 9;
  2610             lua_pushnumber(L, i);
  2610             lua_pushnumber(L, i);
  2611             // Probability
  2611             // Probability
  2612             rawProb:=  Ammoz[TAmmoType(at)].Probability;
  2612             rawProb:=  Ammoz[TAmmoType(at)].Probability;