lib/cinch/plugins/dicebag/bag.rb
# Roll the bag of dice, this will roll the dice and update the current
#   score and count
Roll the bag of dice, this will roll the dice and update the current
score and count
Roll the bag of dice this will roll the dice and update the current score and count
def roll
          dice = die_array
          @score = Die.roll(dice)
          @count = dice.map { |d| d[/(\d+)d\d+/, 1].to_i || 1 }.inject(0, :+)
          return self
        end
def roll dice = die_array @score = Die . roll ( dice ) @count = dice . map { | d | d [ / ( \d +)d \d + / , 1 ] . to_i || 1 } . inject ( 0 , :+ ) return self end
Roll the bag of dice, this will roll the dice and update the current
score and count
Roll the bag of dice this will roll the dice and update the current score and count