Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Mixy.roll, to not use negative weights
Spotted by [Coke]++ and further investigated by timotimo++
  • Loading branch information
lizmat committed Oct 31, 2013
1 parent 0358bae commit 1dd6720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Mixy.pm
Expand Up @@ -39,7 +39,7 @@ my role Mixy does Baggy { # should really be QuantHash, but that's for later
}

method roll ($count = 1) {
my $total = self.total;
my $total = [+] self.values.grep: * > 0;
my $rolls = $count ~~ Num ?? $total min $count !! $count;
# my @pairs := %!elems.values;
my @pairs := self.pairs;
Expand Down

0 comments on commit 1dd6720

Please sign in to comment.