Class: D20Disadvantage

Inherits:
D20
  • Object
show all
Defined in:
lib/dicebag/systems/dnd.rb

Overview

Roll a d20 with Disadvantage

Instance Attribute Summary

Attributes inherited from D20

#dc, #mod

Instance Method Summary collapse

Methods inherited from D20

#initialize, roll, #roll, #stringify_mod

Constructor Details

This class inherits a constructor from D20

Instance Method Details

#roll_for_resultObject



59
60
61
62
63
64
# File 'lib/dicebag/systems/dnd.rb', line 59

def roll_for_result
  r1 = @roll.roll
  r2 = @roll.roll

  [r1, r2].min
end