# HG changeset patch
# User nemo
# Date 1270222899 0
# Node ID 6d6f4241debe7d40ee69d9710c97968fd4948b71
# Parent  eb1382353361778165b767fdf16a914b81e32fe7
Alter distribution of probabilities from frontend, allow utility crates in shoppa if probabilities permit (still ban health crates)

diff -r eb1382353361 -r 6d6f4241debe hedgewars/uAmmos.pas
--- a/hedgewars/uAmmos.pas	Fri Apr 02 15:33:11 2010 +0000
+++ b/hedgewars/uAmmos.pas	Fri Apr 02 15:41:39 2010 +0000
@@ -82,7 +82,7 @@
 end;
 
 procedure AddAmmoStore(s: shortstring);
-const probability: array [0..8] of LongWord = (0,20,30,60,100,150,200,400,600);
+const probability: array [0..8] of LongWord = (0,20,30,60,100,200,400,600,800);
 var cnt: Longword;
     a: TAmmoType;
     ammos: TAmmoCounts;
diff -r eb1382353361 -r 6d6f4241debe hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Fri Apr 02 15:33:11 2010 +0000
+++ b/hedgewars/uGears.pas	Fri Apr 02 15:41:39 2010 +0000
@@ -2161,13 +2161,11 @@
 
 FollowGear:= nil;
 
-if shoppa then  // FIXME -  TEMPORARY  REMOVE WHEN CRATE PROBABILITY IS ADDED, INCLUDING DISABLING OF HEALTH CRATES
-    t:= 7
-else
-    t:= getrandom(20);
+t:= getrandom(20);
 
-// avoid health crates if all hogs are invulnerable
-if (t < 13) and ((GameFlags and gfInvulnerable) <> 0) then t:= t * 13 div 20 + 7;
+// FIXME - shoppa is TEMPORARY REMOVE WHEN CRATE PROBABILITY ALLOWS DISABLING OF HEALTH CRATES                               
+// avoid health crates if all hogs are invulnerable                                                                          
+if (t < 13) and (shoppa or ((GameFlags and gfInvulnerable) <> 0)) then t:= t * 13 div 20 + 7;                                
     
 //case getrandom(20) of
 case t of