Class: D20Advantage

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

Overview

Roll a d20 with Advantage

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



49
50
51
52
53
54
# File 'lib/dicebag/systems/dnd.rb', line 49

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

  [r1, r2].max
end