stattr 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/stattr.rb +2 -5
- metadata +1 -1
data/lib/stattr.rb
CHANGED
@@ -1,17 +1,14 @@
|
|
1
1
|
$statlist = ['STR', 'DEX', 'CHA', 'INT', 'WIS', 'CON']
|
2
2
|
|
3
3
|
# Roll a D(sides) size die.
|
4
|
-
def
|
4
|
+
def rolld(sides)
|
5
5
|
return rand(sides) + 1
|
6
6
|
end
|
7
7
|
|
8
8
|
|
9
9
|
# Rolls a number of dice of particular sizes.
|
10
|
-
def
|
10
|
+
def rollmanyd(sides, dice)
|
11
11
|
rolls = 0
|
12
|
-
#for i in (1..dice)
|
13
|
-
#rolls = rolls + rollD(sides)
|
14
|
-
#end
|
15
12
|
(1..dice).each do |i|
|
16
13
|
rolls = rolls + rollD(sides)
|
17
14
|
end
|