Help for this page

Select Code to Download


  1. or download this
    $Data{gen} = {
       'beholder' => {b => 1, pg => 21},
       'death kiss' => {pg => 21},
       ...
    };
    
  2. or download this
    sub random
    {
    ...
        my $chosen = $choices[rand @choices];
        return $Data{$key}{$chosen};  # or maybe just return $chosen ?
    }
    
  3. or download this
    my $output = my $randomkey = random( "gen" );
    
  4. or download this
    $output .= " beholder" unless ( exists( $Data{gen}{$randomkey}{b} ));
    
  5. or download this
    my $addon = '';
    if ( exists( $Data{gen}{$randomkey}{bk} ) or
    ...
            if ( exists( $Data{gen}{$randomkey}{pg} ));
    }
    $output .= " ($addon)" if ( $addon );