stattr 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/stattr.rb +6 -6
  2. metadata +1 -1
data/lib/stattr.rb CHANGED
@@ -1,8 +1,8 @@
1
- $statlist = ['STR', 'DEX', 'CHA', 'INT', 'WIS', 'CON']
1
+ Statlist = ['STR', 'DEX', 'CHA', 'INT', 'WIS', 'CON']
2
2
 
3
3
  # Roll a D(sides) size die.
4
4
  def rolld(sides)
5
- return rand(sides) + 1
5
+ rand(sides) + 1
6
6
  end
7
7
 
8
8
 
@@ -10,7 +10,7 @@ end
10
10
  def rollmanyd(sides, dice)
11
11
  rolls = 0
12
12
  (1..dice).each do |i|
13
- rolls = rolls + rollD(sides)
13
+ rolls = rolls + rolld(sides)
14
14
  end
15
15
  rolls
16
16
  end
@@ -39,7 +39,7 @@ modlist = []
39
39
  else
40
40
  puts "nothing"
41
41
  end
42
- modlist
42
+ modlist
43
43
  end
44
44
 
45
45
 
@@ -47,8 +47,8 @@ end
47
47
  #This iterates through the Stat list and turns each stat into a key. It then rolls 3 d6's to get the starting value for that stat.
48
48
  def statroll
49
49
  stathash = {}
50
- $statlist.each do |stat|
51
- stathash[stat] = modstat(rollmanyD(3,6))
50
+ Statlist.each do |stat|
51
+ stathash[stat] = modstat(rollmanyd(6,3))
52
52
  end
53
53
  stathash
54
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stattr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: