Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
Modified dice to allow for 4 digit dice count
Browse files Browse the repository at this point in the history
  • Loading branch information
warthurton committed Mar 14, 2012
1 parent f318b77 commit aac345a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/DDG/Goodie/Dice.pm
Expand Up @@ -24,7 +24,7 @@ handle remainder => sub {
}
return join(' ', @output) if @output;
}
elsif ($_ =~ /^(\d{0,2})[d|w](\d+)\s?([+-])?\s?(\d+|[lh])?$/) { # 'w' is the German form
elsif ($_ =~ /^(\d{0,4})[d|w](\d+)\s?([+-])?\s?(\d+|[lh])?$/) { # 'w' is the German form
my $output;
my $number_of_dice = $1 || 1;
my $number_of_faces = $2;
Expand All @@ -42,7 +42,7 @@ handle remainder => sub {
} else {
push(@rolls, -(pop(@rolls)));
}
} elsif ($3 eq '+' && ($4 eq 'l' || $4 eq 'h')) {
} elsif ($3 eq '+' && ($4 eq 'l' || $4 eq 'h')) {
return;
} else {
push(@rolls, int("$3$4"));
Expand Down

0 comments on commit aac345a

Please sign in to comment.