hedgewars/uGears.pas
changeset 3255 6d6f4241debe
parent 3254 eb1382353361
child 3259 a29ccf4aed82
equal deleted inserted replaced
3254:eb1382353361 3255:6d6f4241debe
  2159    (CountGears(gtCase) >= 5) or
  2159    (CountGears(gtCase) >= 5) or
  2160    (getrandom(cCaseFactor) <> 0) then exit;
  2160    (getrandom(cCaseFactor) <> 0) then exit;
  2161 
  2161 
  2162 FollowGear:= nil;
  2162 FollowGear:= nil;
  2163 
  2163 
  2164 if shoppa then  // FIXME -  TEMPORARY  REMOVE WHEN CRATE PROBABILITY IS ADDED, INCLUDING DISABLING OF HEALTH CRATES
  2164 t:= getrandom(20);
  2165     t:= 7
  2165 
  2166 else
  2166 // FIXME - shoppa is TEMPORARY REMOVE WHEN CRATE PROBABILITY ALLOWS DISABLING OF HEALTH CRATES                               
  2167     t:= getrandom(20);
  2167 // avoid health crates if all hogs are invulnerable                                                                          
  2168 
  2168 if (t < 13) and (shoppa or ((GameFlags and gfInvulnerable) <> 0)) then t:= t * 13 div 20 + 7;                                
  2169 // avoid health crates if all hogs are invulnerable
       
  2170 if (t < 13) and ((GameFlags and gfInvulnerable) <> 0) then t:= t * 13 div 20 + 7;
       
  2171     
  2169     
  2172 //case getrandom(20) of
  2170 //case getrandom(20) of
  2173 case t of
  2171 case t of
  2174      0..6: begin
  2172      0..6: begin
  2175         FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
  2173         FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);