Help for this page

Select Code to Download


  1. or download this
      if($goblin<0){
      $goblin=0;
      }if($wizard<0){
      $wizard=0;
      }
    
  2. or download this
    # Early in the code, i.e. in some configuration section
    my @max_damages = (0) x $number_of_rooms;
    ...
    
    # ... then
    $wizard -= 1 + int(rand($max_damages[$room]));
    
  3. or download this
       $wizard -= 1 + int(rand($room + 1));