Class: Statlist
- Inherits:
-
Object
- Object
- Statlist
- Defined in:
- lib/stattr.rb
Constant Summary collapse
- @@sides =
6
- @@dicenum =
3
Instance Attribute Summary collapse
-
#cha ⇒ Object
Returns the value of attribute cha.
-
#con ⇒ Object
Returns the value of attribute con.
-
#dex ⇒ Object
Returns the value of attribute dex.
-
#int ⇒ Object
Returns the value of attribute int.
-
#str ⇒ Object
Returns the value of attribute str.
-
#wis ⇒ Object
Returns the value of attribute wis.
Instance Method Summary collapse
-
#initialize ⇒ Statlist
constructor
A new instance of Statlist.
Constructor Details
#initialize ⇒ Statlist
Returns a new instance of Statlist.
65 66 67 68 69 70 71 72 |
# File 'lib/stattr.rb', line 65 def initialize @str = modstat(rollmanyd(@@sides, @@dicenum)) @dex = modstat(rollmanyd(@@sides, @@dicenum)) @cha = modstat(rollmanyd(@@sides, @@dicenum)) @con = modstat(rollmanyd(@@sides, @@dicenum)) @wis = modstat(rollmanyd(@@sides, @@dicenum)) @int = modstat(rollmanyd(@@sides, @@dicenum)) end |
Instance Attribute Details
#cha ⇒ Object
Returns the value of attribute cha.
62 63 64 |
# File 'lib/stattr.rb', line 62 def cha @cha end |
#con ⇒ Object
Returns the value of attribute con.
62 63 64 |
# File 'lib/stattr.rb', line 62 def con @con end |
#dex ⇒ Object
Returns the value of attribute dex.
62 63 64 |
# File 'lib/stattr.rb', line 62 def dex @dex end |
#int ⇒ Object
Returns the value of attribute int.
62 63 64 |
# File 'lib/stattr.rb', line 62 def int @int end |
#str ⇒ Object
Returns the value of attribute str.
62 63 64 |
# File 'lib/stattr.rb', line 62 def str @str end |
#wis ⇒ Object
Returns the value of attribute wis.
62 63 64 |
# File 'lib/stattr.rb', line 62 def wis @wis end |